Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
Education
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
黄奎
Education
Commits
ca88a728
Commit
ca88a728
authored
Jul 13, 2021
by
liudong1993
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.oytour.com/Kui2/education
parents
123abacc
09628e51
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
81 additions
and
95 deletions
+81
-95
RB_Change_ClassPlan_ViewModel.cs
Edu.Model/ViewModel/EduTask/RB_Change_ClassPlan_ViewModel.cs
+2
-2
RB_Education_Relevance_ViewModel.cs
...del/ViewModel/EduTask/RB_Education_Relevance_ViewModel.cs
+4
-0
ClassModule.cs
Edu.Module.Course/ClassModule.cs
+34
-14
EducationReceiptModule.cs
Edu.Module.EduTask/EducationReceiptModule.cs
+34
-3
RB_Education_ReceiptRepository.cs
Edu.Repository/EduTask/RB_Education_ReceiptRepository.cs
+1
-1
RB_Education_RelevanceRepository.cs
Edu.Repository/EduTask/RB_Education_RelevanceRepository.cs
+4
-0
ClassController.cs
Edu.WebApi/Controllers/Course/ClassController.cs
+2
-4
ChangePlanController.cs
Edu.WebApi/Controllers/EduTask/ChangePlanController.cs
+0
-71
No files found.
Edu.Model/ViewModel/EduTask/RB_Change_ClassPlan_ViewModel.cs
View file @
ca88a728
...
...
@@ -158,7 +158,7 @@ namespace Edu.Model.ViewModel.EduTask
/// <summary>
/// 默认选中的日期、周
/// </summary>
public
string
DateJson
{
get
;
set
;
}
//
public string DateJson { get; set; }
/// <summary>
...
...
@@ -170,7 +170,7 @@ namespace Edu.Model.ViewModel.EduTask
/// <summary>
/// 默认时间字符串JSON
/// </summary>
public
string
DefaultTimeJson
{
get
;
set
;
}
//
public string DefaultTimeJson { get; set; }
}
///<summary>
...
...
Edu.Model/ViewModel/EduTask/RB_Education_Relevance_ViewModel.cs
View file @
ca88a728
...
...
@@ -11,5 +11,9 @@ namespace Edu.Model.ViewModel.EduTask
/// </summary>
public
class
RB_Education_Relevance_ViewModel
:
RB_Education_Relevance
{
/// <summary>
/// 多个单据查询【逗号分隔】
/// </summary>
public
string
QConditionIds
{
get
;
set
;
}
}
}
Edu.Module.Course/ClassModule.cs
View file @
ca88a728
...
...
@@ -268,22 +268,25 @@ namespace Edu.Module.Course
var
classOrderList
=
new
List
<
RB_Order_ViewModel
>();
var
stepPriceList
=
new
List
<
RB_Class_StepPrice_ViewModel
>();
var
otherCourseList
=
new
List
<
RB_Class_Course_Extend
>();
var
planList
=
new
List
<
RB_Class_Plan_ViewModel
>();
string
ids
=
string
.
Join
(
","
,
list
.
Select
(
qitem
=>
qitem
.
ClassId
));
if
(!
string
.
IsNullOrEmpty
(
ids
))
{
classTimeList
=
class_TimeRepository
.
GetClassTimeListRepository
(
ids
);
classOrderList
=
orderRepository
.
GetClassOrderPeopleNumRepository
(
ids
);
otherCourseList
=
GetClassCourseListModule
(
new
RB_Class_Course_Extend
()
{
QClassIds
=
ids
});
planList
=
class_PlanRepository
.
GetClassPlanMaxDataRepository
(
new
RB_Class_Plan_ViewModel
()
{
QClassIds
=
ids
});
}
if
(
isGetStepPrice
)
{
stepPriceList
=
class_StepPriceRepository
.
GetClassStepPriceListRepository
(
new
RB_Class_StepPrice_ViewModel
()
{
QClassIds
=
ids
})?.
ToList
()
??
new
List
<
RB_Class_StepPrice_ViewModel
>();
}
//课程计划上课日期
foreach
(
var
item
in
list
)
{
item
.
FinishTimeStr
=
Common
.
ConvertHelper
.
FormatDate
(
item
.
EndClassDate
);
item
.
NewPlanDateTime
=
classTimeList
?.
Where
(
qitem
=>
qitem
.
ClassId
==
item
.
ClassId
)?.
FirstOrDefault
()?.
NewPlanDateTime
;
item
.
OrderStudentCount
=
classOrderList
?.
Where
(
qitem
=>
qitem
.
ClassId
==
item
.
ClassId
)?.
FirstOrDefault
()?.
GuestNum
??
0
;
if
(
isGetStepPrice
)
...
...
@@ -291,6 +294,12 @@ namespace Edu.Module.Course
item
.
ClassStepPriceList
=
stepPriceList
?.
Where
(
qitem
=>
qitem
.
ClassId
==
item
.
ClassId
)?.
ToList
()
??
new
List
<
RB_Class_StepPrice_ViewModel
>();
}
item
.
OtherCourseList
=
otherCourseList
?.
Where
(
qitem
=>
qitem
.
ClassId
==
item
.
ClassId
)?.
ToList
()
??
new
List
<
RB_Class_Course_Extend
>();
var
tempData
=
planList
.
Where
(
qitem
=>
qitem
.
ClassId
==
item
.
ClassId
)?.
FirstOrDefault
();
if
(
tempData
!=
null
)
{
item
.
EndClassDate
=
tempData
.
ClassDate
;
}
item
.
FinishTimeStr
=
Common
.
ConvertHelper
.
FormatDate
(
item
.
EndClassDate
);
}
}
return
list
;
...
...
@@ -1055,20 +1064,31 @@ namespace Edu.Module.Course
/// <param name="ClassPlanId"></param>
/// <param name="UserInfo">用户信息</param>
/// <returns></returns>
public
bool
RemoveClassPlanModule
(
int
ClassPlanId
,
UserInfo
UserInfo
)
[
TransactionCallHandler
]
public
virtual
bool
RemoveClassPlanModule
(
int
ClassPlanId
,
UserInfo
UserInfo
,
out
string
message
)
{
bool
flag
=
false
;
message
=
""
;
var
planModel
=
class_PlanRepository
.
GetEntity
(
ClassPlanId
);
classLogRepository
.
AddClassLogRepository
(
new
Model
.
Entity
.
Log
.
RB_Class_Log
()
{
LogType
=
Common
.
Enum
.
Course
.
ClassLogTypeEnum
.
Class
,
LogContent
=
"删除【"
+
Common
.
ConvertHelper
.
FormatDate
(
planModel
?.
ClassDate
)
+
"】上课计划"
,
ClassId
=
planModel
.
ClassId
,
CreateBy
=
UserInfo
.
Id
,
Group_Id
=
UserInfo
.
Group_Id
,
School_Id
=
UserInfo
.
School_Id
,
});
UpdateClassEndDateModule
(
planModel
.
ClassId
);
return
class_PlanRepository
.
DeleteOne
(
new
WhereHelper
(
nameof
(
RB_Class_Plan_ViewModel
.
ClassPlanId
),
ClassPlanId
));
if
(
planModel
!=
null
)
{
classLogRepository
.
AddClassLogRepository
(
new
Model
.
Entity
.
Log
.
RB_Class_Log
()
{
LogType
=
Common
.
Enum
.
Course
.
ClassLogTypeEnum
.
Class
,
LogContent
=
"删除【"
+
Common
.
ConvertHelper
.
FormatDate
(
planModel
?.
ClassDate
)
+
"】上课计划"
,
ClassId
=
planModel
.
ClassId
,
CreateBy
=
UserInfo
.
Id
,
Group_Id
=
UserInfo
.
Group_Id
,
School_Id
=
UserInfo
.
School_Id
,
});
flag
=
UpdateClassEndDateModule
(
planModel
.
ClassId
);
flag
=
class_PlanRepository
.
DeleteOne
(
new
WhereHelper
(
nameof
(
RB_Class_Plan_ViewModel
.
ClassPlanId
),
ClassPlanId
));
}
else
{
message
=
"此上课计划不存在,请刷新后再试!"
;
}
return
flag
;
}
/// <summary>
...
...
Edu.Module.EduTask/EducationReceiptModule.cs
View file @
ca88a728
...
...
@@ -78,6 +78,11 @@ namespace Edu.Module.EduTask
//调课申请
List
<
RB_Change_ClassPlan_ViewModel
>
changeClassList
=
new
List
<
RB_Change_ClassPlan_ViewModel
>();
var
groupList
=
list
.
GroupBy
(
qitem
=>
new
{
qitem
.
ReceiptType
}).
Select
(
qitem
=>
new
{
qitem
.
Key
.
ReceiptType
});
string
Ids
=
string
.
Join
(
","
,
list
.
Select
(
qitem
=>
qitem
.
Id
));
var
relevanceList
=
education_RelevanceRepository
.
GetEducationRelevanceListRepository
(
new
RB_Education_Relevance_ViewModel
()
{
QConditionIds
=
Ids
});
foreach
(
var
subItem
in
groupList
)
{
if
(
subItem
.
ReceiptType
==
Common
.
Enum
.
Finance
.
ReceiptTypeEnum
.
BackClass
)
...
...
@@ -109,7 +114,26 @@ namespace Edu.Module.EduTask
//调课
if
(
item
.
ReceiptType
==
Common
.
Enum
.
Finance
.
ReceiptTypeEnum
.
ChangeClass
)
{
DataObj
=
changeClassList
.
Where
(
qitem
=>
qitem
.
Id
==
item
.
RelationId
)?.
FirstOrDefault
();
var
tempModel
=
changeClassList
.
Where
(
qitem
=>
qitem
.
Id
==
item
.
RelationId
)?.
FirstOrDefault
();
if
(
tempModel
!=
null
)
{
if
(!
string
.
IsNullOrEmpty
(
tempModel
.
SourceData
))
{
tempModel
.
OldChangePlanItemList
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
List
<
ChangePlanItem
>>(
tempModel
.
SourceData
);
}
if
(!
string
.
IsNullOrEmpty
(
tempModel
.
TargetData
))
{
if
(
tempModel
.
MoveType
==
1
)
{
tempModel
.
NewChangePlanItemList
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
List
<
ChangePlanItem
>>(
tempModel
.
TargetData
);
}
else
if
(
tempModel
.
MoveType
==
2
)
{
tempModel
.
AllChangePlanModel
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
AllChangePlanItem
>(
tempModel
.
TargetData
);
}
}
}
DataObj
=
tempModel
;
}
var
obj
=
new
{
...
...
@@ -147,7 +171,11 @@ namespace Edu.Module.EduTask
var
backModel
=
student_BackClassRepository
.
GetEntity
(
receipt
.
RelationId
);
ApplyReason
=
backModel
?.
ApplyReason
??
""
;
}
else
if
(
receipt
.
ReceiptType
==
Common
.
Enum
.
Finance
.
ReceiptTypeEnum
.
ChangeClass
)
{
var
changeClassModel
=
change_ClassPlanRepository
.
GetEntity
<
RB_Change_ClassPlan_ViewModel
>(
receipt
.
RelationId
);
ApplyReason
=
changeClassModel
?.
ChangeTypeStr
+
" "
+
changeClassModel
?.
MoveTypeStr
;
}
//获取审核记录
var
aurList
=
education_RecordRepository
.
GetEducationRecordListRepository
(
new
RB_Education_Record_ViewModel
()
{
...
...
@@ -651,7 +679,10 @@ namespace Edu.Module.EduTask
}
if
(
receiptModel
.
ReceiptType
==
Common
.
Enum
.
Finance
.
ReceiptTypeEnum
.
ChangeClass
)
{
if
(
auditModel
.
AuditStatus
==
2
)
{
flag
=
change_ClassPlanRepository
.
UpdateChangeClassPlan
(
receiptModel
.
RelationId
);
}
}
return
flag
;
}
...
...
Edu.Repository/EduTask/RB_Education_ReceiptRepository.cs
View file @
ca88a728
...
...
@@ -78,7 +78,7 @@ WHERE 1=1
}
if
(!
string
.
IsNullOrEmpty
(
query
.
QIds
))
{
builder
.
AppendFormat
(
@" AND A.{0}
IN
({1}) "
,
nameof
(
RB_Education_Receipt_ViewModel
.
Id
),
query
.
QIds
);
builder
.
AppendFormat
(
@" AND A.{0}
IN
({1}) "
,
nameof
(
RB_Education_Receipt_ViewModel
.
Id
),
query
.
QIds
);
}
if
(!
string
.
IsNullOrEmpty
(
query
.
Title
))
{
...
...
Edu.Repository/EduTask/RB_Education_RelevanceRepository.cs
View file @
ca88a728
...
...
@@ -33,6 +33,10 @@ WHERE 1=1
{
builder
.
AppendFormat
(
" AND {0}={1} "
,
nameof
(
RB_Education_Relevance_ViewModel
.
ConditionId
),
query
.
ConditionId
);
}
if
(!
string
.
IsNullOrEmpty
(
query
.
QConditionIds
))
{
builder
.
AppendFormat
(
" AND {0} IN({1}) "
,
nameof
(
RB_Education_Relevance_ViewModel
.
ConditionId
),
query
.
QConditionIds
);
}
}
builder
.
AppendFormat
(
" ORDER BY Sort ASC "
);
return
Get
<
RB_Education_Relevance_ViewModel
>(
builder
.
ToString
()).
ToList
();
...
...
Edu.WebApi/Controllers/Course/ClassController.cs
View file @
ca88a728
...
...
@@ -637,9 +637,8 @@ namespace Edu.WebApi.Controllers.Course
public
ApiResult
RemoveClassPlan
()
{
var
ClassPlanId
=
base
.
ParmJObj
.
GetInt
(
"ClassPlanId"
);
var
flag
=
classModule
.
RemoveClassPlanModule
(
ClassPlanId
,
base
.
UserInfo
);
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
var
flag
=
classModule
.
RemoveClassPlanModule
(
ClassPlanId
,
base
.
UserInfo
,
out
string
message
);
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
(
message
:
message
);
}
/// <summary>
...
...
@@ -1677,7 +1676,6 @@ namespace Edu.WebApi.Controllers.Course
/// <returns></returns>
public
ApiResult
GetNewTeacherPlan
()
{
var
query
=
new
RB_Class_ViewModel
()
{
Group_Id
=
base
.
UserInfo
.
Group_Id
,
...
...
Edu.WebApi/Controllers/EduTask/ChangePlanController.cs
View file @
ca88a728
...
...
@@ -101,74 +101,6 @@ namespace Edu.WebApi.Controllers.EduTask
{
if
(
model
.
ChangeType
==
1
)
{
//排课方式
try
{
// string WeekDayListStr = model.AllChangePlanModel.WeekDayList; // base.ParmJObj.GetStringValue("WeekDayList");
switch
(
model
.
AllChangePlanModel
.
ClassStyle
)
{
//按周排课
case
ClassStyleEnum
.
Week
:
if
(
model
.
AllChangePlanModel
.
WeekDayList
!=
null
&&
model
.
AllChangePlanModel
.
WeekDayList
.
Any
())
{
// model.AllChangePlanModel.WeekDayList = Common.Plugin.JsonHelper.DeserializeObject<List<string>>(WeekDayListStr);
model
.
AllChangePlanModel
.
DateJson
=
Common
.
Plugin
.
JsonHelper
.
Serialize
(
model
.
AllChangePlanModel
.
WeekDayList
);
}
else
{
model
.
AllChangePlanModel
.
DateJson
=
""
;
}
break
;
//固定日期排课
case
ClassStyleEnum
.
FixedDate
:
if
(
model
.
AllChangePlanModel
.
WeekDayList
!=
null
&&
model
.
AllChangePlanModel
.
WeekDayList
.
Any
())
{
// model.AllChangePlanModel.WeekDayList = Common.Plugin.JsonHelper.DeserializeObject<List<string>>(WeekDayListStr);
model
.
AllChangePlanModel
.
DateJson
=
Common
.
Plugin
.
JsonHelper
.
Serialize
(
model
.
AllChangePlanModel
.
WeekDayList
);
}
else
{
model
.
AllChangePlanModel
.
DateJson
=
""
;
}
break
;
//按月排课
case
ClassStyleEnum
.
Month
:
if
(
model
.
AllChangePlanModel
.
WeekDayList
!=
null
&&
model
.
AllChangePlanModel
.
WeekDayList
.
Any
())
{
// model.AllChangePlanModel.WeekDayList = Common.Plugin.JsonHelper.DeserializeObject<List<string>>(WeekDayListStr);
model
.
AllChangePlanModel
.
DateJson
=
Common
.
Plugin
.
JsonHelper
.
Serialize
(
model
.
AllChangePlanModel
.
WeekDayList
);
}
else
{
model
.
AllChangePlanModel
.
DateJson
=
""
;
}
break
;
//网约课
case
ClassStyleEnum
.
OnLine
:
model
.
AllChangePlanModel
.
DateJson
=
""
;
break
;
}
}
catch
(
Exception
ex
)
{
Common
.
Plugin
.
LogHelper
.
Write
(
ex
,
"SetChangeClassPlan"
);
}
//try
//{
// string DefaultPlanTimeListStr = base.ParmJObj.GetStringValue("DefaultPlanTimeList");
// if (!string.IsNullOrEmpty(DefaultPlanTimeListStr))
// {
// model.AllChangePlanModel.DefaultTimeList = Common.Plugin.JsonHelper.DeserializeObject<List<Edu.Model.ViewModel.EduTask.ClassTimeItem>>(DefaultPlanTimeListStr);
// }
// else
// {
// return ApiResult.Failed("请输入上课时间");
// }
//}
//catch (Exception ex)
//{
// Common.Plugin.LogHelper.Write(ex, "SetClass_DefaultPlanTimeList");
//}
List
<
string
>
dayList
=
new
List
<
string
>();
if
(
model
.
AllChangePlanModel
.
DefaultTimeList
!=
null
&&
model
.
AllChangePlanModel
.
DefaultTimeList
.
Count
>
0
)
{
...
...
@@ -233,7 +165,6 @@ namespace Edu.WebApi.Controllers.EduTask
}
return
ApiResult
.
ParamIsNull
(
message
:
"学习时间段"
+
(
tempStr
)
+
message2
.
TrimStart
(
','
)
+
"重复!"
);
}
model
.
AllChangePlanModel
.
DefaultTimeJson
=
Common
.
Plugin
.
JsonHelper
.
Serialize
(
model
.
AllChangePlanModel
.
DefaultTimeList
);
}
else
{
...
...
@@ -250,10 +181,8 @@ namespace Edu.WebApi.Controllers.EduTask
}
else
{
return
ApiResult
.
Failed
(
"班级信息不存在"
);
}
}
else
if
(
model
.
ChangeType
==
2
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment