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
5757fab6
Commit
5757fab6
authored
Dec 25, 2020
by
liudong1993
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.oytour.com/Kui2/education
parents
e64f459f
f4949532
Hide whitespace changes
Inline
Side-by-side
Showing
30 changed files
with
563 additions
and
242 deletions
+563
-242
.editorconfig
.editorconfig
+7
-0
Edu.EducationCore.csproj
Edu.EducationCore/Edu.EducationCore.csproj
+1
-3
Edu.EducationCore.csproj.user
Edu.EducationCore/Edu.EducationCore.csproj.user
+5
-0
LogHelper.cs
Edu.EducationCore/Helper/LogHelper.cs
+6
-6
QuarzHelper.cs
Edu.EducationCore/Helper/QuarzHelper.cs
+1
-1
RB_Student_BackClass.cs
Edu.Model/Entity/Course/RB_Student_BackClass.cs
+6
-1
GuestFinishMinute_ViewModel.cs
Edu.Model/ViewModel/Course/GuestFinishMinute_ViewModel.cs
+5
-0
RB_Post_ViewModel.cs
Edu.Model/ViewModel/User/RB_Post_ViewModel.cs
+5
-0
ClassModule.cs
Edu.Module.Course/ClassModule.cs
+61
-5
OrderModule2.cs
Edu.Module.Course/OrderModule2.cs
+4
-1
StudentBillModule.cs
Edu.Module.Course/StudentBillModule.cs
+119
-62
AttendanceModule.cs
Edu.Module.User/AttendanceModule.cs
+9
-9
AttendanceRecodModule.cs
Edu.Module.User/AttendanceRecodModule.cs
+6
-6
DepartmentModule.cs
Edu.Module.User/DepartmentModule.cs
+35
-34
WorkFlowManagementModule.cs
Edu.Module.User/WorkFlowManagementModule.cs
+11
-11
WorkFlowModule.cs
Edu.Module.User/WorkFlowModule.cs
+52
-64
RB_Class_CheckRepository.cs
Edu.Repository/Course/RB_Class_CheckRepository.cs
+35
-5
RB_Class_LogRepository.cs
Edu.Repository/Log/RB_Class_LogRepository.cs
+2
-1
RB_PostRepository.cs
Edu.Repository/User/RB_PostRepository.cs
+42
-0
SMSService.cs
Edu.ThirdCore/Message/SMSService.cs
+7
-2
ClassController.cs
Edu.WebApi/Controllers/Course/ClassController.cs
+64
-5
OrderController.cs
Edu.WebApi/Controllers/Course/OrderController.cs
+2
-3
StuController.cs
Edu.WebApi/Controllers/Course/StuController.cs
+20
-7
FinanceController.cs
Edu.WebApi/Controllers/Finance/FinanceController.cs
+1
-1
PublicController.cs
Edu.WebApi/Controllers/Public/PublicController.cs
+1
-1
UserCenterController.cs
Edu.WebApi/Controllers/User/UserCenterController.cs
+41
-3
WorkFlowController.cs
Edu.WebApi/Controllers/User/WorkFlowController.cs
+6
-9
WorkFlowManagementController.cs
Edu.WebApi/Controllers/User/WorkFlowManagementController.cs
+0
-1
Edu.WebApi.csproj
Edu.WebApi/Edu.WebApi.csproj
+3
-0
education.sln
education.sln
+6
-1
No files found.
.editorconfig
0 → 100644
View file @
5757fab6
[*.cs]
# IDE1006: 命名样式
dotnet_diagnostic.IDE1006.severity = none
# IDE0059: 不需要赋值
csharp_style_unused_value_assignment_preference = discard_variable:none
Edu.EducationCore/Edu.EducationCore.csproj
View file @
5757fab6
...
...
@@ -47,9 +47,7 @@
</ItemGroup>
<ItemGroup>
<Compile Update="EducationTimerServer.cs">
<SubType>Component</SubType>
</Compile>
<Compile Update="EducationTimerServer.cs" />
<Compile Update="EducationTimerServer.Designer.cs">
<DependentUpon>EducationTimerServer.cs</DependentUpon>
</Compile>
...
...
Edu.EducationCore/Edu.EducationCore.csproj.user
View file @
5757fab6
...
...
@@ -3,4 +3,9 @@
<PropertyGroup>
<_LastSelectedProfileId>
E:\LDWork\LiuDongWork\OnLineItem\Education\Edu.EducationCore\Properties\PublishProfiles\FolderProfile.pubxml
</_LastSelectedProfileId>
</PropertyGroup>
<ItemGroup>
<Compile
Update=
"EducationTimerServer.cs"
>
<SubType>
Component
</SubType>
</Compile>
</ItemGroup>
</Project>
\ No newline at end of file
Edu.EducationCore/Helper/LogHelper.cs
View file @
5757fab6
...
...
@@ -10,12 +10,12 @@ namespace Edu.Education.Helper
/// </summary>
public
class
LogHelper
{
private
static
string
logDir
=
Path
.
Combine
(
AppDomain
.
CurrentDomain
.
BaseDirectory
,
"log/error"
);
private
static
string
infoLogDir
=
Path
.
Combine
(
AppDomain
.
CurrentDomain
.
BaseDirectory
,
"log/info"
);
private
static
string
requestLogDir
=
Path
.
Combine
(
AppDomain
.
CurrentDomain
.
BaseDirectory
,
"log/request"
);
private
static
object
objError
=
new
object
();
private
static
object
objInfo
=
new
object
();
private
static
object
objRequest
=
new
object
();
private
static
readonly
string
logDir
=
Path
.
Combine
(
AppDomain
.
CurrentDomain
.
BaseDirectory
,
"log/error"
);
private
static
readonly
string
infoLogDir
=
Path
.
Combine
(
AppDomain
.
CurrentDomain
.
BaseDirectory
,
"log/info"
);
private
static
readonly
string
requestLogDir
=
Path
.
Combine
(
AppDomain
.
CurrentDomain
.
BaseDirectory
,
"log/request"
);
private
static
readonly
object
objError
=
new
object
();
private
static
readonly
object
objInfo
=
new
object
();
private
static
readonly
object
objRequest
=
new
object
();
/// <summary>
/// 构造函数
...
...
Edu.EducationCore/Helper/QuarzHelper.cs
View file @
5757fab6
...
...
@@ -22,7 +22,7 @@ namespace Edu.Education.Helper
/// <returns></returns>
public
async
Task
TeachingPerfTimer
()
{
string
cronExpression
=
"0 0 */1 * * ?"
;
//每天凌晨1点
//
string cronExpression = "0 0 */1 * * ?"; //每天凌晨1点
NameValueCollection
props
=
new
NameValueCollection
{
{
"quartz.serializer.type"
,
"binary"
}
...
...
Edu.Model/Entity/Course/RB_Student_BackClass.cs
View file @
5757fab6
...
...
@@ -102,5 +102,10 @@ namespace Edu.Model.Entity.Course
/// 财务单据id
/// </summary>
public
int
FinanceId
;
}
/// <summary>
/// 实体退款金额
/// </summary>
public
decimal
RealityBackMoney
{
get
;
set
;
}
}
}
Edu.Model/ViewModel/Course/GuestFinishMinute_ViewModel.cs
View file @
5757fab6
...
...
@@ -9,6 +9,11 @@ namespace Edu.Model.ViewModel.Course
/// </summary>
public
class
GuestFinishMinute_ViewModel
{
/// <summary>
/// 班级编号
/// </summary>
public
int
ClassId
{
get
;
set
;
}
/// <summary>
/// 学员编号
/// </summary>
...
...
Edu.Model/ViewModel/User/RB_Post_ViewModel.cs
View file @
5757fab6
...
...
@@ -57,5 +57,10 @@ namespace Edu.Model.ViewModel.User
/// 部门查询
/// </summary>
public
string
QDeptIds
{
get
;
set
;
}
/// <summary>
/// 部门编号
/// </summary>
public
int
Dept_Id
{
get
;
set
;
}
}
}
Edu.Module.Course/ClassModule.cs
View file @
5757fab6
using
Edu.AOP.CustomerAttribute
;
using
Edu.Common.Enum
;
using
Edu.Common.Enum.Course
;
using
Edu.Model.CacheModel
;
using
Edu.Model.ViewModel.Course
;
using
Edu.Model.ViewModel.User
;
...
...
@@ -64,7 +65,7 @@ namespace Edu.Module.Course
/// <summary>
/// 课程日志记录表
/// </summary>
private
readonly
R
epository
.
User
.
RB_StudentRepository
studentRepository
=
new
Repository
.
User
.
RB_StudentRepository
();
private
readonly
R
B_StudentRepository
studentRepository
=
new
RB_StudentRepository
();
/// <summary>
/// 教室仓储层对象
...
...
@@ -76,13 +77,21 @@ namespace Edu.Module.Course
/// </summary>
private
readonly
RB_TeacherRepository
teacherRepository
=
new
RB_TeacherRepository
();
/// <summary>
/// 开启班级收支仓储层对象
/// </summary>
private
readonly
RB_Class_FinanceRepository
classFinanceRepository
=
new
RB_Class_FinanceRepository
();
/// <summary>
/// 班级签到仓储层对象
/// </summary>
private
readonly
RB_Class_CheckRepository
class_CheckRepository
=
new
RB_Class_CheckRepository
();
/// <summary>
/// 课程基础配置
/// </summary>
private
readonly
RB_Class_ConfigRepository
class_ConfigRepository
=
new
RB_Class_ConfigRepository
();
/// <summary>
/// 获取班级列表
/// </summary>
...
...
@@ -148,7 +157,6 @@ namespace Edu.Module.Course
}
/// <summary>
/// 获取班级日志分页列表
/// </summary>
...
...
@@ -215,11 +223,11 @@ namespace Edu.Module.Course
{
nameof
(
RB_Class_ViewModel
.
CommissionValue
),
model
.
CommissionValue
},
{
nameof
(
RB_Class_ViewModel
.
ClassHours
),
model
.
ClassHours
},
{
nameof
(
RB_Class_ViewModel
.
ClassStyle
),
model
.
ClassStyle
},
{
nameof
(
RB_Class_ViewModel
.
ClassStatus
),
model
.
ClassStatus
},
{
nameof
(
RB_Class_ViewModel
.
InnerRemark
),
model
.
InnerRemark
},
{
nameof
(
RB_Class_ViewModel
.
ClassType
),
model
.
ClassType
},
{
nameof
(
RB_Class_ViewModel
.
DefaultTimeJson
),
model
.
DefaultTimeJson
},
{
nameof
(
RB_Class_ViewModel
.
DateJson
),
model
.
DateJson
},
{
nameof
(
RB_Class_ViewModel
.
School_Id
),
model
.
School_Id
},
};
flag
=
classRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Class_ViewModel
.
ClassId
),
model
.
ClassId
));
}
...
...
@@ -347,6 +355,54 @@ namespace Edu.Module.Course
return
flag
;
}
/// <summary>
/// 修改班级状态
/// </summary>
/// <param name="ClassStatus"></param>
/// <param name="classId"></param>
/// <returns></returns>
public
virtual
bool
SetClassStatusModule
(
ClassStatusEnum
ClassStatus
,
int
classId
)
{
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Class_ViewModel
.
ClassStatus
),(
int
)
ClassStatus
},
};
return
classRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Class_ViewModel
.
ClassId
),
classId
));
}
/// <summary>
/// 更新班级完成进度
/// </summary>
/// <param name="classId">班级Id</param>
/// <returns></returns>
public
virtual
bool
SetClassProcessModule
(
int
classId
)
{
int
CompleteProgress
=
0
;
//进度数
var
classModel
=
classRepository
.
GetEntity
(
classId
);
//班级完成的总分钟数
var
FinishMinutes
=
class_CheckRepository
.
GetClassFinishMinutesRepository
(
classId
.
ToString
())?.
FirstOrDefault
()?.
FinishMinutes
??
0
;
if
(
FinishMinutes
>
0
)
{
//基础课时分钟数
var
BasicMinutes
=
class_ConfigRepository
.
GetClassConfigRepository
(
new
RB_Class_Config_ViewModel
()
{
Group_Id
=
classModel
.
Group_Id
})?.
BasicMinutes
??
45
;
//完成课时数
var
finishHours
=
FinishMinutes
/
BasicMinutes
;
if
(
classModel
.
ClassHours
>
0
)
{
CompleteProgress
=
Convert
.
ToInt32
(
finishHours
/
Convert
.
ToDecimal
(
classModel
.
ClassHours
)
*
100
);
}
else
if
(
classModel
.
ClassHours
<=
0
&&
finishHours
>
0
)
{
CompleteProgress
=
100
;
}
}
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Class_ViewModel
.
CompleteProgress
),
CompleteProgress
},
};
return
classRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Class_ViewModel
.
ClassId
),
classId
));
}
/// <summary>
/// 更新班级结课日期
/// </summary>
...
...
Edu.Module.Course/OrderModule2.cs
View file @
5757fab6
...
...
@@ -112,8 +112,11 @@ namespace Edu.Module.Course
var
totalFinishMinutes
=
stuCheckList
?.
Sum
(
qitem
=>
qitem
.
FinishMinutes
)
??
0
;
//完成课时数
var
FinishHours
=
Convert
.
ToInt32
(
totalFinishMinutes
)
/
BasicMinutes
;
//课时单价
var
classHourPrice
=
Math
.
Round
(
orderModel
.
PreferPrice
/
orderModel
.
GuestNum
/
classModel
.
ClassHours
,
2
);
//预计退款金额
var
backMoney
=
orderModel
.
PreferPrice
/
orderModel
.
GuestNum
-
orderModel
.
PreferPrice
/
orderModel
.
GuestNum
/
classModel
.
ClassHours
*
FinishHours
;
var
backMoney
=
(
classModel
.
ClassHours
-
FinishHours
)
*
classHourPrice
;
var
backClassModel
=
new
RB_Student_BackClass_ViewModel
()
{
...
...
Edu.Module.Course/StudentBillModule.cs
View file @
5757fab6
...
...
@@ -60,11 +60,6 @@ namespace Edu.Module.Course
/// </summary>
private
readonly
RB_SchoolRepository
schoolRepository
=
new
RB_SchoolRepository
();
/// <summary>
/// 流程仓储层对象
/// </summary>
private
readonly
RB_FlowRepository
flowRepository
=
new
RB_FlowRepository
();
/// <summary>
/// 账号
/// </summary>
...
...
@@ -75,6 +70,16 @@ namespace Edu.Module.Course
/// </summary>
private
readonly
RB_User_ChangeLogRepository
changeLogRepository
=
new
RB_User_ChangeLogRepository
();
/// <summary>
/// 班级基础配置表仓储层对象
/// </summary>
private
readonly
RB_Class_ConfigRepository
class_ConfigRepository
=
new
RB_Class_ConfigRepository
();
/// <summary>
/// 学员签到仓储层对象
/// </summary>
private
readonly
RB_Class_CheckRepository
class_CheckRepository
=
new
RB_Class_CheckRepository
();
/// <summary>
/// 获取学员退课单据分页列表
/// </summary>
...
...
@@ -85,15 +90,42 @@ namespace Edu.Module.Course
/// <returns></returns>
public
List
<
RB_Student_BackClass_ViewModel
>
GetStudentBackClassPageListModule
(
int
pageIndex
,
int
pageSize
,
out
long
rowsCount
,
RB_Student_BackClass_ViewModel
query
)
{
var
list
=
student_BackClassRepository
.
GetStudentBackClassPageListRepository
(
pageIndex
,
pageSize
,
out
rowsCount
,
query
);
if
(
list
!=
null
)
{
foreach
(
var
item
in
list
)
{
return
student_BackClassRepository
.
GetStudentBackClassPageListRepository
(
pageIndex
,
pageSize
,
out
rowsCount
,
query
);
}
}
}
return
list
;
/// <summary>
/// 计算学员退课金额
/// </summary>
/// <param name="BackId"></param>
/// <returns></returns>
public
object
GetBackBillMoneyModule
(
int
BackId
)
{
var
backModel
=
student_BackClassRepository
.
GetEntity
(
BackId
);
var
guestModel
=
order_GuestRepository
.
GetEntity
(
backModel
.
GuestId
);
var
orderModel
=
orderRepository
.
GetEntity
(
backModel
.
OrderId
);
//班级实体类
var
classModel
=
classRepository
.
GetEntity
(
backModel
.
ClassId
);
//基础课时分钟数
var
BasicMinutes
=
class_ConfigRepository
.
GetClassConfigRepository
(
new
RB_Class_Config_ViewModel
()
{
Group_Id
=
backModel
.
Group_Id
})?.
BasicMinutes
??
45
;
var
stuCheckList
=
class_CheckRepository
.
GetGuestFinishMinutesRepository
(
backModel
.
GuestId
.
ToString
());
//总签到上课分钟数
var
totalFinishMinutes
=
stuCheckList
?.
Sum
(
qitem
=>
qitem
.
FinishMinutes
)
??
0
;
//完成课时数
var
FinishHours
=
Convert
.
ToInt32
(
totalFinishMinutes
)
/
BasicMinutes
;
//课时单价
var
classHourPrice
=
Math
.
Round
(
orderModel
.
PreferPrice
/
orderModel
.
GuestNum
/
classModel
.
ClassHours
,
2
);
//预计退款金额
var
backMoney
=(
classModel
.
ClassHours
-
FinishHours
)
*
classHourPrice
;
var
obj
=
new
{
orderModel
.
PreferPrice
,
orderModel
.
GuestNum
,
classModel
.
ClassHours
,
FinishHours
,
classHourPrice
,
backMoney
=
Math
.
Round
(
backMoney
,
2
)
};
return
obj
;
}
/// <summary>
...
...
@@ -106,7 +138,7 @@ namespace Edu.Module.Course
/// <param name="message">返回提示信息</param>
/// <param name="BackMoney"></param>
/// <returns></returns>
public
virtual
bool
SetBackBillAduitModule
(
int
BackId
,
int
AuditStatus
,
string
Description
,
UserInfo
user
,
out
string
message
,
int
SpecialNode
=
0
,
decimal
BackMoney
=
0
)
public
virtual
bool
SetBackBillAduitModule
(
int
BackId
,
int
AuditStatus
,
string
Description
,
UserInfo
user
,
out
string
message
,
int
SpecialNode
=
0
,
decimal
BackMoney
=
0
,
string
RecipientIds
=
""
)
{
message
=
""
;
bool
flag
=
false
;
...
...
@@ -117,6 +149,12 @@ namespace Edu.Module.Course
message
=
"单据不存在,请核实!"
;
return
flag
;
}
//抄送人
string
newRecipientIds
=
""
;
if
(!
string
.
IsNullOrEmpty
(
RecipientIds
))
{
newRecipientIds
=
((!
string
.
IsNullOrEmpty
(
backModel
.
RecipientIds
)
?
backModel
.
RecipientIds
:
""
)
+
","
+
RecipientIds
).
TrimStart
(
','
).
TrimEnd
(
','
);
}
//获取审核记录
var
aurList
=
student_BackRecordRepository
.
GetStudentBackRecordListRepository
(
new
RB_Student_BackRecord_ViewModel
()
...
...
@@ -184,19 +222,11 @@ namespace Edu.Module.Course
}
#
region
更新订单旅客表未驳回状态
Dictionary
<
string
,
object
>
guestFileds
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Order_Guest_ViewModel
.
GuestState
),
4
}
};
flag
=
order_GuestRepository
.
Update
(
guestFileds
,
new
WhereHelper
(
nameof
(
RB_Order_Guest_ViewModel
.
Id
),
backModel
.
StudentId
));
flag
=
UpdateOrderGuestStatusModule
(
4
,
backModel
.
StudentId
);
#
endregion
#
region
更新退课单据为驳回状态
Dictionary
<
string
,
object
>
backFileds
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Student_BackClass_ViewModel
.
AuditStatus
),
(
int
)
BackClassAuditStatusEnum
.
Rejected
}
};
flag
=
student_BackClassRepository
.
Update
(
backFileds
,
new
WhereHelper
(
nameof
(
RB_Student_BackClass_ViewModel
.
BackId
),
backModel
.
BackId
));
flag
=
UpdateStuBackBillStatusModule
(
BackClassAuditStatusEnum
.
Rejected
,
newRecipientIds
,
backModel
.
BackId
,
SpecialNode
:
SpecialNode
,
BackMoney
:
BackMoney
);
#
endregion
}
//审核通过
...
...
@@ -252,17 +282,11 @@ namespace Edu.Module.Course
#
region
更新审核关联表状态
flag
=
UpdateStuRelevanceModule
(
model
.
Id
,
model
.
Stauts
,
model
.
AuditedId
);
#
endregion
//更新主表状态
Dictionary
<
string
,
object
>
backFileds
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Student_BackClass_ViewModel
.
AuditStatus
),
(
int
)
BackClassAuditStatusEnum
.
Pass
}
};
if
(
SpecialNode
==
1
)
{
backFileds
.
Add
(
nameof
(
RB_Student_BackClass_ViewModel
.
BackMoney
),
BackMoney
);
}
flag
=
student_BackClassRepository
.
Update
(
backFileds
,
new
WhereHelper
(
nameof
(
RB_Student_BackClass_ViewModel
.
BackId
),
backModel
.
BackId
));
flag
=
UpdateStuBackBillStatusModule
(
BackClassAuditStatusEnum
.
Pass
,
newRecipientIds
,
backModel
.
BackId
,
SpecialNode
:
SpecialNode
,
BackMoney
:
BackMoney
);
#
region
更新订单旅客表未通过状态
flag
=
UpdateOrderGuestStatusModule
(
2
,
backModel
.
StudentId
);
#
endregion
}
else
{
...
...
@@ -316,16 +340,11 @@ namespace Edu.Module.Course
flag
=
UpdateStuRecordModule
(
WFRrocessStatus
.
OtherHaveAudit
,
Description
,
user
.
Id
,
item
.
Id
);
}
}
Dictionary
<
string
,
object
>
backFileds
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Student_BackClass_ViewModel
.
AuditStatus
),
(
int
)
BackClassAuditStatusEnum
.
Pass
}
};
if
(
SpecialNode
==
1
)
{
backFileds
.
Add
(
nameof
(
RB_Student_BackClass_ViewModel
.
BackMoney
),
BackMoney
);
}
flag
=
student_BackClassRepository
.
Update
(
backFileds
,
new
WhereHelper
(
nameof
(
RB_Student_BackClass_ViewModel
.
BackId
),
backModel
.
BackId
));
//更新主表状态
flag
=
UpdateStuBackBillStatusModule
(
BackClassAuditStatusEnum
.
Pass
,
newRecipientIds
,
backModel
.
BackId
,
SpecialNode
:
SpecialNode
,
BackMoney
:
BackMoney
);
#
region
更新订单旅客表未通过状态
flag
=
UpdateOrderGuestStatusModule
(
2
,
backModel
.
StudentId
);
#
endregion
}
else
{
...
...
@@ -358,17 +377,12 @@ namespace Edu.Module.Course
#
region
更新审核关联表状态
flag
=
UpdateStuRelevanceModule
(
model
.
Id
,
model
.
Stauts
,
model
.
AuditedId
);
#
endregion
Dictionary
<
string
,
object
>
backFileds
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Student_BackClass_ViewModel
.
AuditStatus
),
(
int
)
BackClassAuditStatusEnum
.
Pass
}
};
if
(
SpecialNode
==
1
)
{
backFileds
.
Add
(
nameof
(
RB_Student_BackClass_ViewModel
.
BackMoney
),
BackMoney
);
}
flag
=
student_BackClassRepository
.
Update
(
backFileds
,
new
WhereHelper
(
nameof
(
RB_Student_BackClass_ViewModel
.
BackId
),
backModel
.
BackId
));
//更新主表状态
flag
=
UpdateStuBackBillStatusModule
(
BackClassAuditStatusEnum
.
Pass
,
newRecipientIds
,
backModel
.
BackId
,
SpecialNode
:
SpecialNode
,
BackMoney
:
BackMoney
);
#
region
更新订单旅客表未通过状态
flag
=
UpdateOrderGuestStatusModule
(
2
,
backModel
.
StudentId
);
#
endregion
}
//更新抄送人状态
//var CopyToPeopleList = copyToPeopleRepository.GetCopyToPeopleList(WorkFlowId, TemplateType);
//foreach (var item in CopyToPeopleList)
...
...
@@ -377,7 +391,6 @@ namespace Edu.Module.Course
//}
//CopyAccountList = CopyToPeopleList.Select(x => new EmAccoutIdModel { EmAccount = x.EmLoginMobile, EmployeeId = x.EmployeeId ?? 0 }).Distinct().ToList();
//copyToPeopleRepository.UpdateBatch(CopyToPeopleList, trans);
}
//同时创建下一步审核 复制审核人到审核关联表 创建审核记录表
else
...
...
@@ -537,6 +550,48 @@ namespace Edu.Module.Course
return
flag
;
}
/// <summary>
/// 更新退课主表状态
/// </summary>
/// <param name="statusEnum">审核状态</param>
/// <param name="newRecipientIds">抄送人</param>
/// <param name="BackId">退课表主键编号</param>
/// <param name="SpecialNode">是否是特殊节点(1-是)</param>
/// <param name="BackMoney">实际退款金额</param>
/// <returns></returns>
private
bool
UpdateStuBackBillStatusModule
(
BackClassAuditStatusEnum
statusEnum
,
string
newRecipientIds
,
int
BackId
,
int
SpecialNode
=
0
,
decimal
BackMoney
=
0
)
{
Dictionary
<
string
,
object
>
backFileds
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Student_BackClass_ViewModel
.
AuditStatus
),
(
int
)
statusEnum
}
};
if
(!
string
.
IsNullOrEmpty
(
newRecipientIds
))
{
backFileds
.
Add
(
nameof
(
RB_Student_BackClass_ViewModel
.
RecipientIds
),
newRecipientIds
);
}
//特殊节点更新时间退课金额
if
(
SpecialNode
==
1
)
{
backFileds
.
Add
(
nameof
(
RB_Student_BackClass_ViewModel
.
RealityBackMoney
),
BackMoney
);
}
bool
flag
=
student_BackClassRepository
.
Update
(
backFileds
,
new
WhereHelper
(
nameof
(
RB_Student_BackClass_ViewModel
.
BackId
),
BackId
));
return
flag
;
}
/// <summary>
/// 更新学员退课状态
/// </summary>
/// <param name="GuestState"></param>
/// <param name="guestId"></param>
/// <returns></returns>
private
bool
UpdateOrderGuestStatusModule
(
int
GuestState
,
int
guestId
)
{
Dictionary
<
string
,
object
>
guestFileds
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Order_Guest_ViewModel
.
GuestState
),
GuestState
}
};
return
order_GuestRepository
.
Update
(
guestFileds
,
new
WhereHelper
(
nameof
(
RB_Order_Guest_ViewModel
.
Id
),
guestId
));
}
/// <summary>
/// 更新审核记录表信息
...
...
@@ -799,8 +854,8 @@ namespace Edu.Module.Course
{
CostTypeId
=
Config
.
ReadConfigKey
(
"StuBackCostTypeId"
),
Number
=
1
,
OriginalMoney
=
backModel
.
BackMoney
,
UnitPrice
=
backModel
.
BackMoney
,
OriginalMoney
=
backModel
.
Reality
BackMoney
,
UnitPrice
=
backModel
.
Reality
BackMoney
,
Remark
=
"学员【"
+
guestModel
.
GuestName
+
"】退课"
}
};
...
...
@@ -812,7 +867,7 @@ namespace Edu.Module.Course
ClientType
=
clientType
,
ClientID
=
clientId
,
CurrencyId
,
WBMoney
=
backModel
.
BackMoney
,
WBMoney
=
backModel
.
Reality
BackMoney
,
PayDate
=
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd"
),
TemplateId
=
Config
.
ReadConfigKey
(
"StuBackTemplete"
),
OrderSource
=
17
,
...
...
@@ -848,11 +903,13 @@ namespace Edu.Module.Course
Dictionary
<
string
,
object
>
keyValues
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Student_BackClass
.
FinanceId
),
frid
}
};
List
<
WhereHelper
>
wheres
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
(){
List
<
WhereHelper
>
wheres
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
()
{
FiledName
=
nameof
(
RB_Teaching_Perf_ViewModel
.
Id
),
FiledValue
=
backModel
.
BackId
,
OperatorEnum
=
OperatorEnum
.
Equal
FiledValue
=
backModel
.
BackId
,
OperatorEnum
=
OperatorEnum
.
Equal
}
};
bool
flag
=
student_BackClassRepository
.
Update
(
keyValues
,
wheres
);
...
...
Edu.Module.User/AttendanceModule.cs
View file @
5757fab6
...
...
@@ -19,15 +19,15 @@ namespace Edu.Module.User
/// </summary>
public
class
AttendanceModule
{
private
Rb_attendanceRepository
respository
=
new
Rb_attendanceRepository
();
private
Rb_attendance_wayRepository
AWrespository
=
new
Rb_attendance_wayRepository
();
private
Rb_workdaysetingRepository
WDrespository
=
new
Rb_workdaysetingRepository
();
private
Rb_technicaldatesRepository
TDrespository
=
new
Rb_technicaldatesRepository
();
private
Rb_Workflow_AskforleaveRepository
AskforleaveRepository
=
new
Rb_Workflow_AskforleaveRepository
();
private
Rb_technicaldatesRepository
technicaldatesRepository
=
new
Rb_technicaldatesRepository
();
private
Rb_workdaysetingRepository
workdaysetingRepository
=
new
Rb_workdaysetingRepository
();
private
Rb_attendance_recordRepository
RecordRepository
=
new
Rb_attendance_recordRepository
();
private
Rb_dictvalueRepository
dictvalueRepository
=
new
Rb_dictvalueRepository
();
private
readonly
Rb_attendanceRepository
respository
=
new
Rb_attendanceRepository
();
private
readonly
Rb_attendance_wayRepository
AWrespository
=
new
Rb_attendance_wayRepository
();
private
readonly
Rb_workdaysetingRepository
WDrespository
=
new
Rb_workdaysetingRepository
();
private
readonly
Rb_technicaldatesRepository
TDrespository
=
new
Rb_technicaldatesRepository
();
private
readonly
Rb_Workflow_AskforleaveRepository
AskforleaveRepository
=
new
Rb_Workflow_AskforleaveRepository
();
private
readonly
Rb_technicaldatesRepository
technicaldatesRepository
=
new
Rb_technicaldatesRepository
();
private
readonly
Rb_workdaysetingRepository
workdaysetingRepository
=
new
Rb_workdaysetingRepository
();
private
readonly
Rb_attendance_recordRepository
RecordRepository
=
new
Rb_attendance_recordRepository
();
private
readonly
Rb_dictvalueRepository
dictvalueRepository
=
new
Rb_dictvalueRepository
();
/// <summary>
/// 部门
...
...
Edu.Module.User/AttendanceRecodModule.cs
View file @
5757fab6
...
...
@@ -21,11 +21,11 @@ namespace Edu.Module.User
/// </summary>
public
class
AttendanceRecodModule
{
private
Rb_attendanceRepository
respository
=
new
Rb_attendanceRepository
();
private
Rb_attendance_wayRepository
AWrespository
=
new
Rb_attendance_wayRepository
();
private
Rb_workdaysetingRepository
WDrespository
=
new
Rb_workdaysetingRepository
();
private
Rb_technicaldatesRepository
TDrespository
=
new
Rb_technicaldatesRepository
();
private
Rb_attendance_recordRepository
attendRecordRespository
=
new
Rb_attendance_recordRepository
();
private
readonly
Rb_attendanceRepository
respository
=
new
Rb_attendanceRepository
();
private
readonly
Rb_attendance_wayRepository
AWrespository
=
new
Rb_attendance_wayRepository
();
private
readonly
Rb_workdaysetingRepository
WDrespository
=
new
Rb_workdaysetingRepository
();
private
readonly
Rb_technicaldatesRepository
TDrespository
=
new
Rb_technicaldatesRepository
();
private
readonly
Rb_attendance_recordRepository
attendRecordRespository
=
new
Rb_attendance_recordRepository
();
/// <summary>
...
...
@@ -119,7 +119,7 @@ namespace Edu.Module.User
result
[
"onStatus"
]
=
(
int
)
recode
.
BeOnStatus
;
result
[
"onPunshCardTime"
]
=
recode
.
BeOnDutyTime
==
null
?
""
:
recode
.
BeOnDutyTime
.
Value
.
ToString
(
"HH:mm"
);
result
[
"onPunshCardAddress"
]
=
recode
.
BeOnVerifyAddress
;
result
[
"isLackCard"
]
=
recode
.
BeOnStatus
==
AttendanceEnum
.
QK
?
true
:
false
;
result
[
"isLackCard"
]
=
recode
.
BeOnStatus
==
AttendanceEnum
.
QK
;
result
[
"offStatus"
]
=
(
int
)
recode
.
OffStatus
;
result
[
"offPunshCardTime"
]
=
recode
.
OffDutyTime
?.
ToString
(
"HH:mm"
);
result
[
"offPunshCardAddress"
]
=
recode
.
OffVerifyAddress
;
...
...
Edu.Module.User/DepartmentModule.cs
View file @
5757fab6
...
...
@@ -146,7 +146,7 @@ namespace Edu.Module.User
/// </summary>
/// <param name="query"></param>
/// <param name="isQueryEmployee">是否查询员工</param>
/// <param name="isQueryPost">是否岗位</param>
/// <param name="isQueryPost">是否
查询
岗位</param>
/// <returns></returns>
public
List
<
DepartmentTree_ViewModel
>
GetDepartmentTreeModule
(
RB_Department_ViewModel
query
,
bool
isQueryEmployee
=
false
,
bool
isQueryPost
=
false
)
{
...
...
@@ -173,7 +173,7 @@ namespace Edu.Module.User
}
if
(
isQueryPost
)
{
postList
=
postRepository
.
GetPostListRepository
(
new
RB_Post_ViewModel
()
postList
=
postRepository
.
GetPostList
Ext
Repository
(
new
RB_Post_ViewModel
()
{
Group_Id
=
query
.
Group_Id
,
});
...
...
@@ -229,22 +229,22 @@ namespace Edu.Module.User
#
region
添加岗位
if
(
isQueryPost
)
{
//var tempPostList = postList?.Where(qitem => qitem.RB_
Dept_Id == fItem.DeptId)?.ToList();
//
if (tempPostList != null && tempPostList.Count > 0)
//
{
//
foreach (var pItem in tempPostList)
//
{
//
tModel.ChildList.Add(new DepartmentTree_ViewModel()
//
{
//
DeptId = pItem.PostId,
//
DeptName = pItem.PostName,
//
ParentId = 0,
//
ChildList = new List<DepartmentTree_ViewModel>(),
//
School_Id = fItem.School_Id,
//
DataType = 3,
//
});
//
}
//
}
var
tempPostList
=
postList
?.
Where
(
qitem
=>
qitem
.
Dept_Id
==
fItem
.
DeptId
)?.
ToList
();
if
(
tempPostList
!=
null
&&
tempPostList
.
Count
>
0
)
{
foreach
(
var
pItem
in
tempPostList
)
{
tModel
.
ChildList
.
Add
(
new
DepartmentTree_ViewModel
()
{
DeptId
=
pItem
.
PostId
,
DeptName
=
pItem
.
PostName
,
ParentId
=
0
,
ChildList
=
new
List
<
DepartmentTree_ViewModel
>(),
School_Id
=
fItem
.
School_Id
,
DataType
=
3
,
});
}
}
}
#
endregion
...
...
@@ -308,25 +308,26 @@ namespace Edu.Module.User
#
region
添加岗位
if
(
postList
!=
null
&&
postList
.
Count
>
0
)
{
//var tempPostList = postList?.Where(qitem => qitem.RB_
Dept_Id == item.DeptId)?.ToList();
//
if (tempPostList != null && tempPostList.Count > 0)
//
{
//
foreach (var pItem in tempPostList)
//
{
//
model.ChildList.Add(new DepartmentTree_ViewModel()
//
{
//
DeptId = pItem.PostId,
//
DeptName = pItem.PostName,
//
ParentId = 0,
//
ChildList = new List<DepartmentTree_ViewModel>(),
//
School_Id = item.School_Id,
//
DataType = 3,
//
});
//
}
//
}
var
tempPostList
=
postList
?.
Where
(
qitem
=>
qitem
.
Dept_Id
==
item
.
DeptId
)?.
ToList
();
if
(
tempPostList
!=
null
&&
tempPostList
.
Count
>
0
)
{
foreach
(
var
pItem
in
tempPostList
)
{
model
.
ChildList
.
Add
(
new
DepartmentTree_ViewModel
()
{
DeptId
=
pItem
.
PostId
,
DeptName
=
pItem
.
PostName
,
ParentId
=
0
,
ChildList
=
new
List
<
DepartmentTree_ViewModel
>(),
School_Id
=
item
.
School_Id
,
DataType
=
3
,
});
}
}
}
#
endregion
//添加下级部门
var
childList
=
GetDeptTreeList
(
item
.
DeptId
,
sourceList
,
empList
:
empList
,
postList
:
postList
);
if
(
childList
!=
null
&&
childList
.
Count
>
0
)
{
...
...
Edu.Module.User/WorkFlowManagementModule.cs
View file @
5757fab6
...
...
@@ -21,16 +21,16 @@ namespace Edu.Module.User
/// </summary>
public
class
WorkFlowManagementModule
{
private
Rb_Workflow_TemplateRepository
respository
=
new
Rb_Workflow_TemplateRepository
();
private
Rb_Workflow_AuditRepository
respositoryAudit
=
new
Rb_Workflow_AuditRepository
();
private
Rb_Workflow_AuditUserRepository
respositoryUser
=
new
Rb_Workflow_AuditUserRepository
();
private
Rb_Workflow_ConditionRepository
respositoryCondition
=
new
Rb_Workflow_ConditionRepository
();
private
Rb_Workflow_AskforleaveRepository
respositoryAskforleave
=
new
Rb_Workflow_AskforleaveRepository
();
private
Rb_Workflow_EvectionRepository
respositoryEvection
=
new
Rb_Workflow_EvectionRepository
();
private
Rb_Workflow_GoOutRepository
respositoryGoout
=
new
Rb_Workflow_GoOutRepository
();
private
Rb_Workflow_ReissuecardRepository
respositoryReissuecar
=
new
Rb_Workflow_ReissuecardRepository
();
private
Rb_Workflow_VisualrangeRepository
visualrangeRepository
=
new
Rb_Workflow_VisualrangeRepository
();
private
RB_AccountRepository
accountRepository
=
new
RB_AccountRepository
();
private
readonly
Rb_Workflow_TemplateRepository
respository
=
new
Rb_Workflow_TemplateRepository
();
private
readonly
Rb_Workflow_AuditRepository
respositoryAudit
=
new
Rb_Workflow_AuditRepository
();
private
readonly
Rb_Workflow_AuditUserRepository
respositoryUser
=
new
Rb_Workflow_AuditUserRepository
();
private
readonly
Rb_Workflow_ConditionRepository
respositoryCondition
=
new
Rb_Workflow_ConditionRepository
();
private
readonly
Rb_Workflow_AskforleaveRepository
respositoryAskforleave
=
new
Rb_Workflow_AskforleaveRepository
();
private
readonly
Rb_Workflow_EvectionRepository
respositoryEvection
=
new
Rb_Workflow_EvectionRepository
();
private
readonly
Rb_Workflow_GoOutRepository
respositoryGoout
=
new
Rb_Workflow_GoOutRepository
();
private
readonly
Rb_Workflow_ReissuecardRepository
respositoryReissuecar
=
new
Rb_Workflow_ReissuecardRepository
();
private
readonly
Rb_Workflow_VisualrangeRepository
visualrangeRepository
=
new
Rb_Workflow_VisualrangeRepository
();
private
readonly
RB_AccountRepository
accountRepository
=
new
RB_AccountRepository
();
/// <summary>
...
...
@@ -169,7 +169,7 @@ namespace Edu.Module.User
}
if
(
askType
!=
""
)
{
description
=
description
+
askType
.
Substring
(
0
,
askType
.
Length
-
1
);
description
+=
askType
.
Substring
(
0
,
askType
.
Length
-
1
);
}
description
+=
" 并且 "
;
}
...
...
Edu.Module.User/WorkFlowModule.cs
View file @
5757fab6
...
...
@@ -21,15 +21,12 @@ namespace Edu.Module.User
/// </summary>
public
class
WorkFlowModule
{
private
Rb_attendanceRepository
respository
=
new
Rb_attendanceRepository
();
private
Rb_attendance_wayRepository
AWrespository
=
new
Rb_attendance_wayRepository
();
private
Rb_workdaysetingRepository
WDrespository
=
new
Rb_workdaysetingRepository
();
private
Rb_technicaldatesRepository
TDrespository
=
new
Rb_technicaldatesRepository
();
private
Rb_Workflow_AskforleaveRepository
askforleaveRepository
=
new
Rb_Workflow_AskforleaveRepository
();
private
Rb_technicaldatesRepository
technicaldatesRepository
=
new
Rb_technicaldatesRepository
();
private
Rb_attendance_recordRepository
RecordRepository
=
new
Rb_attendance_recordRepository
();
private
Rb_dictvalueRepository
rb_DictvalueRepository
=
new
Rb_dictvalueRepository
();
private
RB_Attendance_LeaveTimeRepository
attendance_LeaveTimeRepository
=
new
RB_Attendance_LeaveTimeRepository
();
private
readonly
Rb_workdaysetingRepository
WDrespository
=
new
Rb_workdaysetingRepository
();
private
readonly
Rb_Workflow_AskforleaveRepository
askforleaveRepository
=
new
Rb_Workflow_AskforleaveRepository
();
private
readonly
Rb_technicaldatesRepository
technicaldatesRepository
=
new
Rb_technicaldatesRepository
();
private
readonly
Rb_attendance_recordRepository
RecordRepository
=
new
Rb_attendance_recordRepository
();
private
readonly
Rb_dictvalueRepository
rb_DictvalueRepository
=
new
Rb_dictvalueRepository
();
private
readonly
RB_Attendance_LeaveTimeRepository
attendance_LeaveTimeRepository
=
new
RB_Attendance_LeaveTimeRepository
();
/// <summary>
/// 部门
...
...
@@ -41,28 +38,20 @@ namespace Edu.Module.User
private
readonly
RB_AccountRepository
accountRepository
=
new
RB_AccountRepository
();
private
Rb_Workflow_TemplateRepository
workFlowTemplateRepository
=
new
Rb_Workflow_TemplateRepository
();
private
Rb_Workflow_ConditionRepository
conditionRepository
=
new
Rb_Workflow_ConditionRepository
();
private
Rb_Workflow_AuditRepository
wfAuditRepository
=
new
Rb_Workflow_AuditRepository
();
private
Rb_Workflow_AuditRelevanceRepository
auditRelevanceRepository
=
new
Rb_Workflow_AuditRelevanceRepository
();
private
Rb_Workflow_AuditUserRepository
auditUserRepository
=
new
Rb_Workflow_AuditUserRepository
();
private
Rb_Workflow_AuditUserRelevanceRepository
auditUserRelevanceRepository
=
new
Rb_Workflow_AuditUserRelevanceRepository
();
private
Rb_Workflow_AuditrecordRepository
auditrecordRepository
=
new
Rb_Workflow_AuditrecordRepository
();
private
Rb_Workflow_EvectionRepository
wfEvectionRepository
=
new
Rb_Workflow_EvectionRepository
();
private
Rb_Workflow_TravelRepository
wfTravelRepository
=
new
Rb_Workflow_TravelRepository
();
private
Rb_Workflow_ReissuecardRepository
wfReissuecardRepository
=
new
Rb_Workflow_ReissuecardRepository
();
private
Rb_Workflow_GoOutRepository
wfGoOutRepository
=
new
Rb_Workflow_GoOutRepository
();
private
Rb_Workflow_CopyToPeopleRepository
copyToPeopleRepository
=
new
Rb_Workflow_CopyToPeopleRepository
();
private
Rb_Workflow_SignInRepository
SignInModule
=
new
Rb_Workflow_SignInRepository
();
//财务
//private Repository.Finance.Rb_Workflow_TemplateRepository Finance_TemplateRepository = new Repository.Finance.Rb_Workflow_TemplateRepository();
//公司管理
private
RB_SchoolRepository
Rb_BranchRepository
=
new
RB_SchoolRepository
();
private
readonly
Rb_Workflow_TemplateRepository
workFlowTemplateRepository
=
new
Rb_Workflow_TemplateRepository
();
private
readonly
Rb_Workflow_ConditionRepository
conditionRepository
=
new
Rb_Workflow_ConditionRepository
();
private
readonly
Rb_Workflow_AuditRepository
wfAuditRepository
=
new
Rb_Workflow_AuditRepository
();
private
readonly
Rb_Workflow_AuditRelevanceRepository
auditRelevanceRepository
=
new
Rb_Workflow_AuditRelevanceRepository
();
private
readonly
Rb_Workflow_AuditUserRepository
auditUserRepository
=
new
Rb_Workflow_AuditUserRepository
();
private
readonly
Rb_Workflow_AuditUserRelevanceRepository
auditUserRelevanceRepository
=
new
Rb_Workflow_AuditUserRelevanceRepository
();
private
readonly
Rb_Workflow_AuditrecordRepository
auditrecordRepository
=
new
Rb_Workflow_AuditrecordRepository
();
private
readonly
Rb_Workflow_EvectionRepository
wfEvectionRepository
=
new
Rb_Workflow_EvectionRepository
();
private
readonly
Rb_Workflow_TravelRepository
wfTravelRepository
=
new
Rb_Workflow_TravelRepository
();
private
readonly
Rb_Workflow_ReissuecardRepository
wfReissuecardRepository
=
new
Rb_Workflow_ReissuecardRepository
();
private
readonly
Rb_Workflow_GoOutRepository
wfGoOutRepository
=
new
Rb_Workflow_GoOutRepository
();
private
readonly
Rb_Workflow_CopyToPeopleRepository
copyToPeopleRepository
=
new
Rb_Workflow_CopyToPeopleRepository
();
private
readonly
Rb_Workflow_SignInRepository
SignInModule
=
new
Rb_Workflow_SignInRepository
();
#
region
OA
...
...
@@ -267,7 +256,7 @@ namespace Edu.Module.User
}
if
(
template
.
TemplateType
!=
WFTTemplateTypeEnum
.
Evection
)
{
dayOrHour
=
dayOrHour
-
TotalLunch
;
dayOrHour
-=
TotalLunch
;
}
return
Math
.
Round
(
dayOrHour
,
2
);
}
...
...
@@ -1001,9 +990,8 @@ namespace Edu.Module.User
reissuecard
.
UpdateTime
=
DateTime
.
Now
;
reissuecard
.
IsCancel
=
WFAuditCancelStatus
.
Normal
;
//图片处理
List
<
string
>
imgList
=
new
List
<
string
>();
List
<
string
>
oldImgList
=
new
List
<
string
>();
ImageOperation
(
reissuecard
.
Images
,
out
imgList
);
ImageOperation
(
reissuecard
.
Images
,
out
List
<
string
>
imgList
);
reissuecard
.
Image
=
JsonConvert
.
SerializeObject
(
imgList
);
Rb_Workflow_Condition_Extend
condition
=
GetCondition
(
reissuecard
.
TemplateId
.
Value
,
0
,
AskforleaveTypeEnum
.
AffairLeave
);
if
(
condition
==
null
)
...
...
@@ -2805,7 +2793,7 @@ namespace Edu.Module.User
var
lthmodel
=
LTHList
.
Where
(
x
=>
x
.
WorkFlowId
==
askmodel
.
Id
).
FirstOrDefault
();
if
(
lthmodel
!=
null
)
{
LTmodel
.
Duration
=
LTmodel
.
Duration
-
lthmodel
.
Duration
;
LTmodel
.
Duration
-=
lthmodel
.
Duration
;
LTHList
.
Remove
(
lthmodel
);
LTmodel
.
History
=
JsonConvert
.
SerializeObject
(
LTHList
);
attendance_LeaveTimeRepository
.
Update
(
LTmodel
);
...
...
@@ -2826,7 +2814,7 @@ namespace Edu.Module.User
var
lthmodel
=
LTHList
.
Where
(
x
=>
x
.
WorkFlowId
==
askmodel
.
Id
).
FirstOrDefault
();
if
(
lthmodel
!=
null
)
{
LTmodel
.
Duration
=
LTmodel
.
Duration
-
lthmodel
.
Duration
;
LTmodel
.
Duration
-=
lthmodel
.
Duration
;
LTHList
.
Remove
(
lthmodel
);
LTmodel
.
History
=
JsonConvert
.
SerializeObject
(
LTHList
);
attendance_LeaveTimeRepository
.
Update
(
LTmodel
);
...
...
@@ -2839,7 +2827,7 @@ namespace Edu.Module.User
var
lthmodel
=
LTHList
.
Where
(
x
=>
x
.
WorkFlowId
==
askmodel
.
Id
).
FirstOrDefault
();
if
(
lthmodel
!=
null
)
{
LTmodel
.
Duration
=
LTmodel
.
Duration
-
lthmodel
.
Duration
;
LTmodel
.
Duration
-=
lthmodel
.
Duration
;
LTHList
.
Remove
(
lthmodel
);
LTmodel
.
History
=
JsonConvert
.
SerializeObject
(
LTHList
);
attendance_LeaveTimeRepository
.
Update
(
LTmodel
);
...
...
@@ -2856,7 +2844,7 @@ namespace Edu.Module.User
var
lthmodel
=
LTHList
.
Where
(
x
=>
x
.
WorkFlowId
==
askmodel
.
Id
).
FirstOrDefault
();
if
(
lthmodel
!=
null
)
{
LTmodel
.
Duration
=
LTmodel
.
Duration
-
lthmodel
.
Duration
;
LTmodel
.
Duration
-=
lthmodel
.
Duration
;
LTHList
.
Remove
(
lthmodel
);
LTmodel
.
History
=
JsonConvert
.
SerializeObject
(
LTHList
);
attendance_LeaveTimeRepository
.
Update
(
LTmodel
);
...
...
@@ -2869,7 +2857,7 @@ namespace Edu.Module.User
}
if
(
askmodel
.
AskforleaveType
==
AskforleaveTypeEnum
.
AnnualLeave
&&
emodel
!=
null
)
{
emodel
.
AnnualLeaveDay
=
emodel
.
AnnualLeaveDay
+
AnnualNum
;
emodel
.
AnnualLeaveDay
+=
AnnualNum
;
Dictionary
<
string
,
object
>
keyValues
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Account
.
AnnualLeaveDay
),
emodel
.
AnnualLeaveDay
}
};
...
...
@@ -3002,7 +2990,7 @@ namespace Edu.Module.User
}
else
{
LTmodel
.
Duration
=
LTmodel
.
Duration
+
askmodel
.
Duration
;
LTmodel
.
Duration
+=
askmodel
.
Duration
;
List
<
LeaveTimeHistory
>
LTHList
=
JsonConvert
.
DeserializeObject
<
List
<
LeaveTimeHistory
>>(
LTmodel
.
History
);
LeaveTimeHistory
lth
=
new
LeaveTimeHistory
()
{
...
...
@@ -3058,7 +3046,7 @@ namespace Edu.Module.User
}
if
(
askmodel
.
AskforleaveType
==
AskforleaveTypeEnum
.
AnnualLeave
&&
emodel
!=
null
)
{
emodel
.
AnnualLeaveDay
=
emodel
.
AnnualLeaveDay
-
AnnualNum
;
emodel
.
AnnualLeaveDay
-=
AnnualNum
;
Dictionary
<
string
,
object
>
keyValues
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Account
.
AnnualLeaveDay
),
emodel
.
AnnualLeaveDay
}
};
...
...
@@ -3648,7 +3636,7 @@ namespace Edu.Module.User
}
else
{
LTmodel
.
Duration
=
LTmodel
.
Duration
+
DNum1
;
LTmodel
.
Duration
+=
DNum1
;
List
<
LeaveTimeHistory
>
LTHList
=
JsonConvert
.
DeserializeObject
<
List
<
LeaveTimeHistory
>>(
LTmodel
.
History
);
LeaveTimeHistory
lth
=
new
LeaveTimeHistory
()
{
...
...
@@ -4558,14 +4546,14 @@ namespace Edu.Module.User
auditrecord
.
Title
=
string
.
IsNullOrWhiteSpace
(
askforleave
.
EmName
)
?
""
:
$"
{
askforleave
.
EmName
}
的"
+
auditrecord
.
TemplateType
.
ToName
().
Split
(
'|'
)[
0
];
if
(
askforleave
.
IsCancel
==
WFAuditCancelStatus
.
Cancel
)
{
auditrecord
.
Title
=
auditrecord
.
Title
+
"(撤回)"
;
auditrecord
.
Title
+=
"(撤回)"
;
}
auditrecord
.
UserPhoto
=
askforleave
.
EmPhoto
;
List
<
string
>
content
=
new
List
<
string
>
{
$"请假类型:
{
askforleave
.
AskforleaveType
.
ToName
()}
"
,
$"开始时间:
{
askforleave
.
StartTime
.
Value
.
ToString
(
"yyyy-MM-dd HH:mm"
)
}
"
,
$"结束时间:
{
askforleave
.
EndTime
.
Value
.
ToString
(
"yyyy-MM-dd HH:mm"
)
}
"
,
$"开始时间:
{
askforleave
.
StartTime
.
Value
:
yyyy
-
MM
-
dd
HH
:
mm
}
"
,
$"结束时间:
{
askforleave
.
EndTime
.
Value
:
yyyy
-
MM
-
dd
HH
:
mm
}
"
,
// $"请假时长:{askforleave.Duration}小时",
$"请假事由:
{
askforleave
.
Description
}
"
};
...
...
@@ -4585,7 +4573,7 @@ namespace Edu.Module.User
auditrecord
.
Title
=
string
.
IsNullOrWhiteSpace
(
evection
.
EmName
)
?
""
:
$"
{
evection
.
EmName
}
的"
+
auditrecord
.
TemplateType
.
ToName
().
Split
(
'|'
)[
0
];
if
(
evection
.
IsCancel
==
WFAuditCancelStatus
.
Cancel
)
{
auditrecord
.
Title
=
auditrecord
.
Title
+
"(撤回)"
;
auditrecord
.
Title
+=
"(撤回)"
;
}
auditrecord
.
UserPhoto
=
evection
.
EmPhoto
;
List
<
Rb_Workflow_Travel
>
travelList
=
wfTravelRepository
.
GetTravelList
(
evection
.
Id
);
...
...
@@ -4618,13 +4606,13 @@ namespace Edu.Module.User
auditrecord
.
Title
=
string
.
IsNullOrWhiteSpace
(
goOut
.
EmName
)
?
""
:
$"
{
goOut
.
EmName
}
的"
+
auditrecord
.
TemplateType
.
ToName
().
Split
(
'|'
)[
0
];
if
(
goOut
.
IsCancel
==
WFAuditCancelStatus
.
Cancel
)
{
auditrecord
.
Title
=
auditrecord
.
Title
+
"(撤回)"
;
auditrecord
.
Title
+=
"(撤回)"
;
}
auditrecord
.
UserPhoto
=
goOut
.
EmPhoto
;
List
<
string
>
content
=
new
List
<
string
>
{
$"开始时间:
{
goOut
.
StartTime
.
Value
.
ToString
(
"yyyy-MM-dd HH:mm"
)
}
"
,
$"结束时间:
{
goOut
.
EndTime
.
Value
.
ToString
(
"yyyy-MM-dd HH:mm"
)
}
"
$"开始时间:
{
goOut
.
StartTime
.
Value
:
yyyy
-
MM
-
dd
HH
:
mm
}
"
,
$"结束时间:
{
goOut
.
EndTime
.
Value
:
yyyy
-
MM
-
dd
HH
:
mm
}
"
//$"外出时长:{goOut.Duration}小时",
//$"外出事由:{goOut.Description}"
};
...
...
@@ -4645,7 +4633,7 @@ namespace Edu.Module.User
auditrecord
.
Title
=
string
.
IsNullOrWhiteSpace
(
reissuecard
.
EmName
)
?
""
:
$"
{
reissuecard
.
EmName
}
的"
+
auditrecord
.
TemplateType
.
ToName
().
Split
(
'|'
)[
0
];
if
(
reissuecard
.
IsCancel
==
WFAuditCancelStatus
.
Cancel
)
{
auditrecord
.
Title
=
auditrecord
.
Title
+
"(撤回)"
;
auditrecord
.
Title
+=
"(撤回)"
;
}
auditrecord
.
UserPhoto
=
reissuecard
.
EmPhoto
;
List
<
string
>
content
=
new
List
<
string
>
...
...
@@ -5199,25 +5187,25 @@ namespace Edu.Module.User
/// <returns></returns>
public
bool
SetSignIn
(
Rb_Workflow_SignIn_Extend
dmodel
)
{
List
<
string
>
imgList
=
new
List
<
string
>();
ImageOperation
(
dmodel
.
Images
,
out
imgList
);
ImageOperation
(
dmodel
.
Images
,
out
List
<
string
>
imgList
);
dmodel
.
Image
=
JsonConvert
.
SerializeObject
(
imgList
);
if
(
dmodel
.
Id
>
0
)
{
//修改
{
//修改
IDictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>
{
{
nameof
(
Rb_Workflow_SignIn_Extend
.
Image
),
dmodel
.
Image
},
{
nameof
(
Rb_Workflow_SignIn_Extend
.
Remarks
),
dmodel
.
Remarks
}
};
{
{
nameof
(
Rb_Workflow_SignIn_Extend
.
Image
),
dmodel
.
Image
},
{
nameof
(
Rb_Workflow_SignIn_Extend
.
Remarks
),
dmodel
.
Remarks
}
};
IList
<
WhereHelper
>
whereHelpers
=
new
List
<
WhereHelper
>
{
new
WhereHelper
()
{
FiledName
=
nameof
(
Rb_Workflow_SignIn_Extend
.
Id
),
FiledValue
=
dmodel
.
Id
,
OperatorEnum
=
OperatorEnum
.
Equal
}
};
{
new
WhereHelper
()
{
FiledName
=
nameof
(
Rb_Workflow_SignIn_Extend
.
Id
),
FiledValue
=
dmodel
.
Id
,
OperatorEnum
=
OperatorEnum
.
Equal
}
};
return
SignInModule
.
Update
(
fileds
,
whereHelpers
);
}
else
...
...
Edu.Repository/Course/RB_Class_CheckRepository.cs
View file @
5757fab6
...
...
@@ -8,7 +8,7 @@ using VT.FW.DB.Dapper;
namespace
Edu.Repository.Course
{
public
class
RB_Class_CheckRepository
:
BaseRepository
<
RB_Class_Check
>
public
class
RB_Class_CheckRepository
:
BaseRepository
<
RB_Class_Check
>
{
/// <summary>
/// 获取教室列表
...
...
@@ -46,7 +46,7 @@ namespace Edu.Repository.Course
builder
.
AppendFormat
(
" AND DATE_FORMAT(A.{0},'%Y-%m-%d')<=DATE_FORMAT('{1}','%Y-%m-%d') "
,
nameof
(
RB_Class_Check_ViewModel
.
CreateTime
),
query
.
EndDate
);
}
}
return
Get
<
RB_Class_Check_ViewModel
>(
builder
.
ToString
()).
ToList
();
}
...
...
@@ -97,7 +97,7 @@ namespace Edu.Repository.Course
/// </summary>
/// <param name="classId"></param>
/// <returns></returns>
public
int
GetClassToalPeopleNum
(
int
classId
,
int
groupId
)
public
int
GetClassToalPeopleNum
(
int
classId
,
int
groupId
)
{
string
sql
=
$@"SELECT count(*) AS Num FROM(SELECT OrderGuestId FROM rb_class_check WHERE `Status`=0 AND Group_Id=
{
groupId
}
AND ClassId =
{
classId
}
GROUP BY OrderGuestId)t"
;
var
obj
=
ExecuteScalar
(
sql
);
...
...
@@ -105,7 +105,8 @@ namespace Edu.Repository.Course
{
return
Convert
.
ToInt32
(
obj
);
}
else
{
else
{
return
0
;
}
}
...
...
@@ -147,7 +148,36 @@ FROM
WHERE A.CheckStatus=0 AND A.OrderGuestId IN({0})
) AS B
GROUP BY B.OrderGuestId
"
,
guestIds
);
"
,
guestIds
);
return
Get
<
GuestFinishMinute_ViewModel
>(
builder
.
ToString
()).
ToList
();
}
/// <summary>
/// 班级签到完成学习分钟数
/// </summary>
/// <param name="classIds">班级编号</param>
/// <returns></returns>
public
List
<
GuestFinishMinute_ViewModel
>
GetClassFinishMinutesRepository
(
string
classIds
)
{
string
where
=
""
;
if
(!
string
.
IsNullOrEmpty
(
classIds
))
{
where
+=
string
.
Format
(
" AND A.ClassId IN({0}) "
,
classIds
);
}
StringBuilder
builder
=
new
StringBuilder
();
builder
.
AppendFormat
(
@"
SELECT A.ClassId,SUM(A.FinishMinutes) AS FinishMinutes FROM
(
SELECT A.ClassId,A.ClassDate,B.ClassPlanId
,TIMESTAMPDIFF(MINUTE,(DATE_FORMAT(CONCAT('2021-01-01 ',C.StartTime,':00'),'%Y-%m-%d %H:%i')),(DATE_FORMAT(CONCAT('2021-01-01 ',C.EndTime,':00'), '%Y-%m-%d %H:%i'))) AS FinishMinutes
FROM rb_class_check AS A INNER JOIN rb_class_plan AS B ON A.ClassId=B.ClassId AND A.ClassDate=B.ClassDate AND B.`Status`=0
INNER JOIN rb_class_time AS C ON B.ClassPlanId=C.ClassPlanId
WHERE 1=1 {0}
GROUP BY A.ClassId,A.ClassDate,B.ClassPlanId
) AS A
WHERE 1=1
GROUP BY A.ClassId
"
,
where
);
return
Get
<
GuestFinishMinute_ViewModel
>(
builder
.
ToString
()).
ToList
();
}
}
...
...
Edu.Repository/Log/RB_Class_LogRepository.cs
View file @
5757fab6
...
...
@@ -44,6 +44,7 @@ WHERE 1=1
builder
.
AppendFormat
(
" AND {0}={1} "
,
nameof
(
RB_Class_Log_ViewModel
.
ClassId
),
query
.
ClassId
);
}
}
builder
.
Append
(
" ORDER BY CLogId DESC "
);
return
GetPage
<
RB_Class_Log_ViewModel
>(
pageIndex
,
pageSize
,
out
rowsCount
,
builder
.
ToString
()).
ToList
();
}
...
...
@@ -69,7 +70,7 @@ WHERE 1=1
CreateBy
=
model
.
CreateBy
,
CreateTime
=
DateTime
.
Now
,
};
return
base
.
Insert
(
model
)
>
0
;
return
base
.
Insert
(
new
model
)
>
0
;
}
}
}
\ No newline at end of file
Edu.Repository/User/RB_PostRepository.cs
View file @
5757fab6
...
...
@@ -100,6 +100,48 @@ WHERE 1=1
}
}
/// <summary>
/// 获取部门岗位管理列表
/// </summary>
/// <param name="query"></param>
/// <returns></returns>
public
List
<
RB_Post_ViewModel
>
GetPostListExtRepository
(
RB_Post_ViewModel
query
)
{
DynamicParameters
parameters
=
new
DynamicParameters
();
StringBuilder
builder
=
new
StringBuilder
();
builder
.
AppendFormat
(
@"
SELECT A.*,B.Dept_Id
FROM rb_post AS A INNER JOIN rb_department_post AS B ON A.PostId=B.PostId
WHERE 1=1
"
);
builder
.
Append
(
$" AND A.
{
nameof
(
RB_Post_ViewModel
.
Status
)}
=
{(
int
)
DateStateEnum
.
Normal
}
"
);
if
(
query
!=
null
)
{
if
(
query
.
Group_Id
>
0
)
{
builder
.
Append
(
$" AND A.
{
nameof
(
RB_Post_ViewModel
.
Group_Id
)}
=
{
query
.
Group_Id
}
"
);
}
if
(
query
.
PostId
>
0
)
{
builder
.
Append
(
$" AND A.
{
nameof
(
RB_Post_ViewModel
.
PostId
)}
=
{
query
.
PostId
}
"
);
}
if
(!
string
.
IsNullOrEmpty
(
query
.
QPostIds
))
{
builder
.
Append
(
$" AND A.
{
nameof
(
RB_Post_ViewModel
.
PostId
)}
IN(
{
query
.
QPostIds
}
) "
);
}
if
(!
string
.
IsNullOrEmpty
(
query
.
PostName
))
{
builder
.
Append
(
$" AND A.
{
nameof
(
RB_Post_ViewModel
.
PostName
)}
LIKE @PostName "
);
parameters
.
Add
(
"PostName"
,
"%"
+
query
.
PostName
.
Trim
()
+
"%"
);
}
return
Get
<
RB_Post_ViewModel
>(
builder
.
ToString
(),
parameters
).
ToList
();
}
else
{
return
new
List
<
RB_Post_ViewModel
>();
}
}
/// <summary>
/// 根据部门编号获取岗位列表
/// </summary>
...
...
Edu.ThirdCore/Message/SMSService.cs
View file @
5757fab6
...
...
@@ -12,12 +12,18 @@ namespace Edu.ThirdCore.Message
/// </summary>
public
class
SMSService
{
/// <summary>
/// 发送证码
/// </summary>
/// <param name="phoneNumber">电话号码</param>
/// <param name="code">验证码</param>
/// <param name="templateCode"></param>
/// <param name="SignName"></param>
/// <param name="Domain"></param>
/// <param name="AccessKeyId"></param>
/// <param name="AccessKeySecret"></param>
/// <param name="RegionId"></param>
/// <param name="OutId"></param>
public
static
void
SendCode
(
string
phoneNumber
,
string
code
,
string
templateCode
,
string
SignName
,
string
Domain
,
string
AccessKeyId
,
string
AccessKeySecret
,
string
RegionId
,
string
OutId
)
{
JObject
obj
=
new
JObject
...
...
@@ -59,7 +65,6 @@ namespace Edu.ThirdCore.Message
var
TemplateParam
=
new
{
content
};
obj
[
"OutId"
]
=
OutId
;
obj
[
"templateParam"
]
=
JsonConvert
.
SerializeObject
(
TemplateParam
);
//LogHelper.WriteInfo("发送短信信息");
QueueHelper
.
EnqueueTask
(
JsonConvert
.
SerializeObject
(
obj
));
}
...
...
Edu.WebApi/Controllers/Course/ClassController.cs
View file @
5757fab6
...
...
@@ -69,6 +69,7 @@ namespace Edu.WebApi.Controllers.Course
item
.
CompleteProgress
,
ClassStatusStr
=
item
.
ClassStatus
.
ToName
(),
item
.
NewPlanDateTime
,
item
.
ClassStatus
,
});
}
pageModel
.
Count
=
rowsCount
;
...
...
@@ -121,10 +122,10 @@ namespace Edu.WebApi.Controllers.Course
CommissionValue
=
base
.
ParmJObj
.
GetDecimal
(
"CommissionValue"
),
ClassHours
=
base
.
ParmJObj
.
GetInt
(
"ClassHours"
),
ClassStyle
=
(
ClassStyleEnum
)
base
.
ParmJObj
.
GetInt
(
"ClassStyle"
),
ClassStatus
=
(
ClassStatusEnum
)
base
.
ParmJObj
.
GetInt
(
"ClassStatus"
)
,
ClassStatus
=
ClassStatusEnum
.
NonOpenClass
,
InnerRemark
=
base
.
ParmJObj
.
GetStringValue
(
"InnerRemark"
),
OutRemark
=
base
.
ParmJObj
.
GetStringValue
(
"OutRemark"
),
CompleteProgress
=
base
.
ParmJObj
.
GetInt
(
"CompleteProgress"
)
,
CompleteProgress
=
0
,
School_Id
=
base
.
ParmJObj
.
GetInt
(
"School_Id"
),
ClassType
=
base
.
ParmJObj
.
GetInt
(
"ClassType"
),
};
...
...
@@ -232,7 +233,6 @@ namespace Edu.WebApi.Controllers.Course
{
extModel
.
DefaultTimeJson
=
""
;
}
bool
flag
=
classModule
.
SetClassModule
(
extModel
);
if
(
flag
)
{
...
...
@@ -241,6 +241,25 @@ namespace Edu.WebApi.Controllers.Course
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
}
/// <summary>
/// 修改班级状态
/// </summary>
/// <returns></returns>
public
ApiResult
SetClassStatus
()
{
var
extModel
=
new
RB_Class_ViewModel
()
{
ClassId
=
base
.
ParmJObj
.
GetInt
(
"ClassId"
),
ClassStatus
=
(
ClassStatusEnum
)
base
.
ParmJObj
.
GetInt
(
"ClassStatus"
),
};
if
(
extModel
.
ClassId
<=
0
)
{
return
ApiResult
.
ParamIsNull
(
message
:
"为获取到班级编号,请刷新页面重试!"
);
}
bool
flag
=
classModule
.
SetClassStatusModule
(
extModel
.
ClassStatus
,
extModel
.
ClassId
);
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
}
/// <summary>
/// 获取班级实体
/// </summary>
...
...
@@ -250,7 +269,44 @@ namespace Edu.WebApi.Controllers.Course
{
var
ClassId
=
base
.
ParmJObj
.
GetInt
(
"ClassId"
,
0
);
var
extModel
=
classModule
.
GetClassModule
(
ClassId
);
return
ApiResult
.
Success
(
data
:
extModel
);
var
obj
=
new
{
ClassId
=
extModel
?.
ClassId
??
0
,
ClassName
=
extModel
?.
ClassName
??
""
,
Assist_Id
=
extModel
?.
Assist_Id
??
0
,
ClassHours
=
extModel
?.
ClassHours
??
0
,
ClassPersion
=
extModel
?.
ClassPersion
??
0
,
ClassPlanList
=
extModel
?.
ClassPlanList
??
new
List
<
RB_Class_Plan_ViewModel
>(),
ClassRoomId
=
extModel
?.
ClassRoomId
??
0
,
ClassStatus
=
extModel
?.
ClassStatus
??
ClassStatusEnum
.
NonOpenClass
,
ClassStyle
=
extModel
?.
ClassStyle
??
ClassStyleEnum
.
Week
,
ClassTimeList
=
extModel
?.
ClassTimeList
??
new
List
<
RB_Class_Time_ViewModel
>(),
ClassType
=
extModel
?.
ClassType
??
1
,
CommissionType
=
extModel
?.
CommissionType
??
1
,
CommissionValue
=
extModel
?.
CommissionValue
??
0
,
CouseId
=
extModel
?.
CouseId
??
0
,
DateJson
=
extModel
?.
DateJson
??
""
,
DefaultTimeJson
=
extModel
?.
DefaultTimeJson
??
""
,
DefaultPlanTimeList
=
extModel
?.
DefaultPlanTimeList
??
new
List
<
RB_Class_Time_ViewModel
>(),
DefaultTimeList
=
extModel
?.
DefaultTimeList
??
new
List
<
RB_Class_Time_ViewModel
>(),
EndClassDate
=
Common
.
ConvertHelper
.
FormatDate
(
extModel
?.
EndClassDate
),
EndOrderTime
=
Common
.
ConvertHelper
.
FormatDate
(
extModel
?.
EndOrderTime
),
EndTime
=
Common
.
ConvertHelper
.
FormatDate
(
extModel
?.
EndTime
),
InnerRemark
=
extModel
?.
InnerRemark
??
""
,
IsOpenCommission
=
extModel
?.
IsOpenCommission
??
0
,
IsStepPrice
=
extModel
?.
IsStepPrice
??
0
,
NewPlanDateTime
=
extModel
?.
NewPlanDateTime
??
""
,
OpenTime
=
Common
.
ConvertHelper
.
FormatDate
(
extModel
?.
OpenTime
),
OrderStudentCount
=
extModel
?.
OrderStudentCount
??
0
,
OriginalPrice
=
extModel
?.
OriginalPrice
??
0
,
OutRemark
=
extModel
?.
OutRemark
??
""
,
SellPrice
=
extModel
?.
SellPrice
??
0
,
Teacher_Id
=
extModel
?.
Teacher_Id
??
0
,
School_Id
=
extModel
?.
School_Id
??
0
,
ClassStepPriceList
=
extModel
?.
ClassStepPriceList
??
new
List
<
RB_Class_StepPrice_ViewModel
>(),
WeekDayList
=
extModel
?.
WeekDayList
??
new
List
<
string
>
(),
};
return
ApiResult
.
Success
(
data
:
obj
);
}
/// <summary>
...
...
@@ -560,7 +616,10 @@ namespace Edu.WebApi.Controllers.Course
list
.
ForEach
(
x
=>
x
.
CreateBy
=
base
.
UserInfo
.
Id
);
list
.
ForEach
(
x
=>
x
.
Status
=
0
);
bool
result
=
classModule
.
AddClassCheckModule
(
list
);
if
(
result
)
{
classModule
.
SetClassProcessModule
(
list
.
FirstOrDefault
().
ClassId
);
}
return
result
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
(
"签到失败"
);
}
...
...
Edu.WebApi/Controllers/Course/OrderController.cs
View file @
5757fab6
...
...
@@ -346,15 +346,14 @@ namespace Edu.WebApi.Controllers.Course
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetClassOrderForDetail
()
{
var
userInfo
=
base
.
UserInfo
;
public
ApiResult
GetClassOrderForDetail
()
{
JObject
parms
=
JObject
.
Parse
(
RequestParm
.
Msg
.
ToString
());
int
OrderId
=
parms
.
GetInt
(
"OrderId"
,
0
);
if
(
OrderId
<=
0
)
{
return
ApiResult
.
ParamIsNull
();
}
var
model
=
orderModule
.
GetClassOrderInfo_V2
(
OrderId
);
if
(
model
==
null
)
{
...
...
Edu.WebApi/Controllers/Course/StuController.cs
View file @
5757fab6
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Threading.Tasks
;
using
System.Collections.Generic
;
using
Edu.Cache.User
;
using
Edu.Common.API
;
using
Edu.Common.Enum.Course
;
...
...
@@ -10,7 +7,6 @@ using Edu.Model.ViewModel.Course;
using
Edu.Module.Course
;
using
Edu.WebApi.Filter
;
using
Microsoft.AspNetCore.Cors
;
using
Microsoft.AspNetCore.Http
;
using
Microsoft.AspNetCore.Mvc
;
using
Newtonsoft.Json.Linq
;
...
...
@@ -87,7 +83,8 @@ namespace Edu.WebApi.Controllers.Course
item
.
ApplyReason
,
item
.
OrderId
,
AuditStatusName
=
item
.
AuditStatus
.
ToName
(),
item
.
SpecialNode
item
.
SpecialNode
,
item
.
RealityBackMoney
,
});
}
pageModel
.
Count
=
rowsCount
;
...
...
@@ -112,10 +109,26 @@ namespace Edu.WebApi.Controllers.Course
decimal
BackMoney
=
base
.
ParmJObj
.
GetDecimal
(
"BackMoney"
);
//是否是特殊节点
var
SpecialNode
=
base
.
ParmJObj
.
GetInt
(
"SpecialNode"
);
var
flag
=
studentBillModule
.
SetBackBillAduitModule
(
BackId
,
AuditStatus
,
Description
,
base
.
UserInfo
,
out
string
message
,
SpecialNode
:
SpecialNode
,
BackMoney
:
BackMoney
);
//抄送人
string
RecipientIds
=
base
.
ParmJObj
.
GetStringValue
(
"RecipientIds"
);
var
flag
=
studentBillModule
.
SetBackBillAduitModule
(
BackId
,
AuditStatus
,
Description
,
base
.
UserInfo
,
out
string
message
,
SpecialNode
:
SpecialNode
,
BackMoney
:
BackMoney
,
RecipientIds
:
RecipientIds
);
return
flag
?
ApiResult
.
Success
(
message
:
message
)
:
ApiResult
.
Failed
(
message
:
message
);
}
/// <summary>
/// 获取学员预计退课金额
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetBackBillMoney
()
{
//退课单据号
var
BackId
=
base
.
ParmJObj
.
GetInt
(
"BackId"
);
var
data
=
studentBillModule
.
GetBackBillMoneyModule
(
BackId
);
return
ApiResult
.
Success
(
data
:
data
);
}
/// <summary>
/// 获取单据详情
/// </summary>
...
...
Edu.WebApi/Controllers/Finance/FinanceController.cs
View file @
5757fab6
...
...
@@ -317,7 +317,7 @@ namespace Edu.WebApi.Controllers.Finance
ExcelDataSource
thirdRow
=
new
ExcelDataSource
(
30
)
{
ExcelRows
=
new
List
<
ExcelColumn
>()
{
new
ExcelColumn
(
value
:
$"开班时间:
{
classInfo
.
OpenTime
.
ToString
(
"yyyy-MM-dd"
)
}
"
,
colspan
:
2
){
new
ExcelColumn
(
value
:
$"开班时间:
{
classInfo
.
OpenTime
:
yyyy
-
MM
-
dd
}
"
,
colspan
:
2
){
HAlignmentEnum
=
HAlignmentEnum
.
LEFT
,
},
new
ExcelColumn
(
value
:
$"待收:¥
{(
IncomeReceive
-
IncomeActual
)}
"
,
colspan
:
2
)
...
...
Edu.WebApi/Controllers/Public/PublicController.cs
View file @
5757fab6
...
...
@@ -299,7 +299,7 @@ namespace Edu.WebApi.Controllers.Public
var
query
=
new
RB_File_Store
{
Group_Id
=
base
.
UserInfo
.
Group_Id
,
School_Id
=
base
.
UserInfo
.
School_Id
//
School_Id = base.UserInfo.School_Id
};
var
list
=
publicModule
.
GetFileStoreList
(
query
);
return
ApiResult
.
Success
(
"获取成功"
,
list
);
...
...
Edu.WebApi/Controllers/User/UserCenterController.cs
View file @
5757fab6
...
...
@@ -840,6 +840,16 @@ namespace Edu.WebApi.Controllers.User
case
AttendanceEnum
.
CD
:
TimeStr
=
"上班迟到"
+
EmTime
.
BeLateTime
+
"分钟<br/>"
;
break
;
case
AttendanceEnum
.
ZC
:
break
;
case
AttendanceEnum
.
WQ
:
break
;
case
AttendanceEnum
.
CC
:
break
;
case
AttendanceEnum
.
QJ
:
break
;
case
AttendanceEnum
.
BK
:
break
;
default
:
TimeStr
=
""
;
break
;
}
}
...
...
@@ -904,6 +914,16 @@ namespace Edu.WebApi.Controllers.User
case
AttendanceEnum
.
CD
:
TimeStr
+=
"下班迟到"
+
EmTime
.
BeLateTime
+
"分钟"
;
break
;
case
AttendanceEnum
.
ZC
:
break
;
case
AttendanceEnum
.
WQ
:
break
;
case
AttendanceEnum
.
CC
:
break
;
case
AttendanceEnum
.
QJ
:
break
;
case
AttendanceEnum
.
BK
:
break
;
default
:
TimeStr
+=
""
;
break
;
}
}
...
...
@@ -1616,6 +1636,16 @@ namespace Edu.WebApi.Controllers.User
case
AttendanceEnum
.
CD
:
TimeStr
=
"上班迟到"
+
EmTime
.
BeLateTime
+
"分钟\r\n"
;
break
;
case
AttendanceEnum
.
ZC
:
break
;
case
AttendanceEnum
.
WQ
:
break
;
case
AttendanceEnum
.
CC
:
break
;
case
AttendanceEnum
.
QJ
:
break
;
case
AttendanceEnum
.
BK
:
break
;
default
:
TimeStr
=
""
;
break
;
}
}
...
...
@@ -1680,6 +1710,16 @@ namespace Edu.WebApi.Controllers.User
case
AttendanceEnum
.
CD
:
TimeStr
+=
"下班迟到"
+
EmTime
.
BeLateTime
+
"分钟"
;
break
;
case
AttendanceEnum
.
ZC
:
break
;
case
AttendanceEnum
.
WQ
:
break
;
case
AttendanceEnum
.
CC
:
break
;
case
AttendanceEnum
.
QJ
:
break
;
case
AttendanceEnum
.
BK
:
break
;
default
:
TimeStr
+=
""
;
break
;
}
}
...
...
@@ -1955,12 +1995,10 @@ namespace Edu.WebApi.Controllers.User
return
ApiResult
.
ParamIsNull
(
"手机标识码为空"
);
}
UserInfo
userInfo
=
UserReidsCache
.
GetUserLoginInfo
(
RequestParm
.
Uid
);
string
date
=
JsonHelper
.
GetStringValue
(
parm
,
"date"
);
wifiMac
=
GetMdifyWifiMac
(
wifiMac
);
LogHelper
.
WriteInfo
(
$"打卡信息:
{
JsonConvert
.
SerializeObject
(
RequestParm
)}
-->更新后的mac:
{
wifiMac
}
"
);
int
PunchCardType
;
bool
isNotVerifyVifi
=
JudgeNotVerifyVifi
(
version
,
userInfo
.
Id
);
string
result
=
attendRecodeModule
.
PunchCard
(
userInfo
.
Id
,
userInfo
.
DeptId
,
latAndLong
,
wifiMac
,
oldWifiMac
,
phoneId
,
address
,
PhoneName
,
out
PunchCardType
,
isNotVerifyVifi
);
string
result
=
attendRecodeModule
.
PunchCard
(
userInfo
.
Id
,
userInfo
.
DeptId
,
latAndLong
,
wifiMac
,
oldWifiMac
,
phoneId
,
address
,
PhoneName
,
out
int
PunchCardType
,
isNotVerifyVifi
);
var
resultData
=
new
{
punchCardType
=
PunchCardType
};
if
(
result
.
Equals
(
"ok"
))
{
...
...
Edu.WebApi/Controllers/User/WorkFlowController.cs
View file @
5757fab6
...
...
@@ -1296,7 +1296,7 @@ namespace Edu.WebApi.Controllers.User
/// <returns></returns>
public
string
GetImagePath
(
string
path
)
{
path
=
path
??
"[]"
;
path
??=
"[]"
;
path
=
path
==
""
?
"[]"
:
path
;
string
[]
pathstr
=
JsonConvert
.
DeserializeObject
<
string
[
]>
(
path
);
List
<
string
>
pathList
=
new
List
<
string
>();
...
...
@@ -1314,7 +1314,7 @@ namespace Edu.WebApi.Controllers.User
/// <returns></returns>
public
string
GetStatusColor
(
WFRrocessStatus
?
status
)
{
string
color
=
""
;
string
color
;
switch
(
status
)
{
case
WFRrocessStatus
.
NotAudit
:
color
=
"#257BF1"
;
break
;
...
...
@@ -1404,12 +1404,11 @@ namespace Edu.WebApi.Controllers.User
/// <returns></returns>
public
ApiResult
GetWfTmplateType
()
{
int
empId
=
Convert
.
ToInt32
(
RequestParm
.
Uid
);
List
<
Rb_Workflow_Template_Extend
>
wfTemplateList
=
workFlowModule
.
GetTemplateByEmpId
(
empId
);
var
dicTemplate
=
EnumHelper
.
EnumToList
(
typeof
(
WFTTemplateTypeEnum
));
List
<
Dictionary
<
string
,
int
>>
TemplateList
=
new
List
<
Dictionary
<
string
,
int
>>();
Dictionary
<
string
,
int
>
dicTemplateData
=
new
Dictionary
<
string
,
int
>();
TemplateList
.
Add
(
new
Dictionary
<
string
,
int
>
{
{
"全部"
,
0
}
});
List
<
Dictionary
<
string
,
int
>>
TemplateList
=
new
List
<
Dictionary
<
string
,
int
>>
{
new
Dictionary
<
string
,
int
>
{
{
"全部"
,
0
}
}
};
foreach
(
var
item
in
dicTemplate
)
{
string
[]
tempTypeStr
=
item
.
Name
.
Split
(
'|'
);
...
...
@@ -1426,8 +1425,6 @@ namespace Edu.WebApi.Controllers.User
/// <returns></returns>
public
ApiResult
GetMyInitiateAuditStatus
()
{
int
empId
=
Convert
.
ToInt32
(
RequestParm
.
Uid
);
List
<
Rb_Workflow_Template_Extend
>
wfTemplateList
=
workFlowModule
.
GetTemplateByEmpId
(
empId
);
var
dicAuditStatus
=
EnumHelper
.
EnumToList
(
typeof
(
AppAuditStatusEnum
));
List
<
Dictionary
<
string
,
int
>>
auditStatusList
=
new
List
<
Dictionary
<
string
,
int
>>();
foreach
(
var
item
in
dicAuditStatus
)
...
...
Edu.WebApi/Controllers/User/WorkFlowManagementController.cs
View file @
5757fab6
...
...
@@ -621,7 +621,6 @@ namespace Edu.WebApi.Controllers.User
/// <returns></returns>
public
virtual
ApiResult
SetTempleteEmployee
()
{
UserInfo
userInfo
=
UserReidsCache
.
GetUserLoginInfo
(
RequestParm
.
Uid
);
JObject
parm
=
JObject
.
Parse
(
RequestParm
.
Msg
.
ToString
());
int
TemplateId
=
parm
.
GetInt
(
"TemplateId"
);
string
EmployeeId
=
parm
.
GetStringValue
(
"EmployeeIdArr"
);
...
...
Edu.WebApi/Edu.WebApi.csproj
View file @
5757fab6
...
...
@@ -14,6 +14,9 @@
<EmbeddedResource Remove="Properties\PublishProfiles\**" />
<None Remove="Properties\PublishProfiles\**" />
</ItemGroup>
<ItemGroup>
<None Include="..\.editorconfig" Link=".editorconfig" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="JWT" Version="5.3.1" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="3.0.0" />
...
...
education.sln
View file @
5757fab6
...
...
@@ -45,7 +45,12 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Edu.Module.Finance", "Edu.M
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "SystemSerivce", "SystemSerivce", "{5B0BC66C-B15F-4174-8966-0968C61F816F}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Edu.EducationCore", "Edu.EducationCore\Edu.EducationCore.csproj", "{FF7B1BD4-0F06-4D22-91EB-9140E65A87AE}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Edu.EducationCore", "Edu.EducationCore\Edu.EducationCore.csproj", "{FF7B1BD4-0F06-4D22-91EB-9140E65A87AE}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{2A862DEF-9334-4D08-BAFE-55AE80228E2E}"
ProjectSection(SolutionItems) = preProject
.editorconfig = .editorconfig
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
...
...
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