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
5971a274
Commit
5971a274
authored
Dec 16, 2020
by
吴春
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.oytour.com/Kui2/education
parents
6fb273b3
61697cef
Hide whitespace changes
Inline
Side-by-side
Showing
34 changed files
with
1308 additions
and
20 deletions
+1308
-20
RB_Class.cs
Edu.Model/Entity/Course/RB_Class.cs
+5
-0
RB_Student_BackClass.cs
Edu.Model/Entity/Course/RB_Student_BackClass.cs
+85
-0
RB_Student_BackRecord.cs
Edu.Model/Entity/Course/RB_Student_BackRecord.cs
+66
-0
RB_Student_BackRelevance.cs
Edu.Model/Entity/Course/RB_Student_BackRelevance.cs
+80
-0
RB_Flow.cs
Edu.Model/Entity/Flow/RB_Flow.cs
+56
-0
RB_Flow_AduitInfo.cs
Edu.Model/Entity/Flow/RB_Flow_AduitInfo.cs
+52
-0
RB_Flow_Node.cs
Edu.Model/Entity/Flow/RB_Flow_Node.cs
+32
-0
RB_Flow_Log.cs
Edu.Model/Entity/Log/RB_Flow_Log.cs
+50
-0
RB_Student_BackClass_ViewModel.cs
Edu.Model/ViewModel/Course/RB_Student_BackClass_ViewModel.cs
+15
-0
RB_Student_BackRecord_ViewModel.cs
...Model/ViewModel/Course/RB_Student_BackRecord_ViewModel.cs
+15
-0
RB_Student_BackRelevance_ViewModel.cs
...el/ViewModel/Course/RB_Student_BackRelevance_ViewModel.cs
+14
-0
RB_Flow_AduitInfo_ViewModel.cs
Edu.Model/ViewModel/Flow/RB_Flow_AduitInfo_ViewModel.cs
+23
-0
RB_Flow_Node_ViewModel.cs
Edu.Model/ViewModel/Flow/RB_Flow_Node_ViewModel.cs
+23
-0
RB_Flow_ViewModel.cs
Edu.Model/ViewModel/Flow/RB_Flow_ViewModel.cs
+18
-0
RB_Flow_Log_ViewModel.cs
Edu.Model/ViewModel/Log/RB_Flow_Log_ViewModel.cs
+18
-0
RB_Teacher_ViewModel.cs
Edu.Model/ViewModel/User/RB_Teacher_ViewModel.cs
+5
-0
ClassModule.cs
Edu.Module.Course/ClassModule.cs
+10
-0
OrderModule.cs
Edu.Module.Course/OrderModule.cs
+15
-0
TeachingRewardsModule.cs
Edu.Module.Course/TeachingRewardsModule.cs
+28
-17
FlowLogModule.cs
Edu.Module.Log/FlowLogModule.cs
+53
-0
BasicFlowModule.cs
Edu.Module.System/BasicFlowModule.cs
+200
-0
RB_ClassRepository.cs
Edu.Repository/Course/RB_ClassRepository.cs
+20
-1
RB_Student_BackClassRepository.cs
Edu.Repository/Course/RB_Student_BackClassRepository.cs
+38
-0
RB_Student_BackRecordRepository.cs
Edu.Repository/Course/RB_Student_BackRecordRepository.cs
+27
-0
RB_Student_BackRelevanceRepository.cs
Edu.Repository/Course/RB_Student_BackRelevanceRepository.cs
+27
-0
RB_FlowRepository.cs
Edu.Repository/Flow/RB_FlowRepository.cs
+43
-0
RB_Flow_AduitInfoRepository.cs
Edu.Repository/Flow/RB_Flow_AduitInfoRepository.cs
+50
-0
RB_Flow_NodeRepository.cs
Edu.Repository/Flow/RB_Flow_NodeRepository.cs
+44
-0
RB_Flow_LogRepository.cs
Edu.Repository/Log/RB_Flow_LogRepository.cs
+93
-0
RB_TeacherRepository.cs
Edu.Repository/User/RB_TeacherRepository.cs
+23
-0
ClassController.cs
Edu.WebApi/Controllers/Course/ClassController.cs
+12
-0
OrderController.cs
Edu.WebApi/Controllers/Course/OrderController.cs
+47
-0
TeachingRewardsController.cs
Edu.WebApi/Controllers/Course/TeachingRewardsController.cs
+19
-0
appsettings.json
Edu.WebApi/appsettings.json
+2
-2
No files found.
Edu.Model/Entity/Course/RB_Class.cs
View file @
5971a274
...
...
@@ -166,5 +166,10 @@ namespace Edu.Model.Entity.Course
/// 默认选中的日期、周
/// </summary>
public
string
DateJson
{
get
;
set
;
}
/// <summary>
/// 结课日期
/// </summary>
public
DateTime
EndClassDate
{
get
;
set
;
}
}
}
Edu.Model/Entity/Course/RB_Student_BackClass.cs
0 → 100644
View file @
5971a274
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
using
VT.FW.DB
;
namespace
Edu.Model.Entity.Course
{
/// <summary>
/// 学员退课单据实体类
/// </summary>
[
Serializable
]
[
DB
(
ConnectionName
=
"DefaultConnection"
)]
public
class
RB_Student_BackClass
{
/// <summary>
/// 退课编号(主键)
/// </summary>
public
int
BackId
{
get
;
set
;
}
/// <summary>
/// BackNum
/// </summary>
public
string
BackNum
{
get
;
set
;
}
/// <summary>
/// 旅客编号
/// </summary>
public
int
GuestId
{
get
;
set
;
}
/// <summary>
/// 学生编号
/// </summary>
public
int
StudentId
{
get
;
set
;
}
/// <summary>
/// 校区编号
/// </summary>
public
int
SchoolId
{
get
;
set
;
}
/// <summary>
/// 班级编号
/// </summary>
public
int
ClassId
{
get
;
set
;
}
/// <summary>
/// 教师编号
/// </summary>
public
int
TeacherId
{
get
;
set
;
}
/// <summary>
/// 已上课时
/// </summary>
public
int
FinishHours
{
get
;
set
;
}
/// <summary>
/// 退款金额
/// </summary>
public
decimal
BackMoney
{
get
;
set
;
}
/// <summary>
/// 申请时间
/// </summary>
public
DateTime
CreateTime
{
get
;
set
;
}
/// <summary>
/// 申请人
/// </summary>
public
int
CreateBy
{
get
;
set
;
}
/// <summary>
/// 集团编号
/// </summary>
public
int
Group_Id
{
get
;
set
;
}
/// <summary>
/// 审核状态
/// </summary>
public
int
AuditStatus
{
get
;
set
;
}
/// <summary>
/// 抄送人(多个逗号分隔)
/// </summary>
public
string
RecipientIds
{
get
;
set
;
}
}
}
Edu.Model/Entity/Course/RB_Student_BackRecord.cs
0 → 100644
View file @
5971a274
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
using
VT.FW.DB
;
namespace
Edu.Model.Entity.Course
{
/// <summary>
/// 学员退课单据审核记录表
/// </summary>
[
Serializable
]
[
DB
(
ConnectionName
=
"DefaultConnection"
)]
public
class
RB_Student_BackRecord
{
/// <summary>
/// 审核记录表主键编号
/// </summary>
public
int
Id
{
get
;
set
;
}
/// <summary>
/// 工作流id
/// </summary>
public
int
FlowId
{
get
;
set
;
}
/// <summary>
/// 审核id
/// </summary>
public
int
AuditId
{
get
;
set
;
}
/// <summary>
/// 1未审核 2审核通过 3 不通过 4 驳回 5他人已审核
/// </summary>
public
int
AuditStatus
{
get
;
set
;
}
/// <summary>
/// 描述
/// </summary>
public
string
Description
{
get
;
set
;
}
/// <summary>
/// 创建人
/// </summary>
public
int
CreateBy
{
get
;
set
;
}
/// <summary>
/// 创建时间
/// </summary>
public
DateTime
CreateTime
{
get
;
set
;
}
/// <summary>
/// 修改人
/// </summary>
public
int
UpdateBy
{
get
;
set
;
}
/// <summary>
/// 修改时间
/// </summary>
public
DateTime
UpdateTime
{
get
;
set
;
}
/// <summary>
/// 审批人
/// </summary>
public
int
AuditEmId
{
get
;
set
;
}
}
}
Edu.Model/Entity/Course/RB_Student_BackRelevance.cs
0 → 100644
View file @
5971a274
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
using
VT.FW.DB
;
namespace
Edu.Model.Entity.Course
{
/// <summary>
/// 退款单据审核人员信息实体类
/// </summary>
[
Serializable
]
[
DB
(
ConnectionName
=
"DefaultConnection"
)]
public
class
RB_Student_BackRelevance
{
/// <summary>
/// 主键编号
/// </summary>
public
int
Id
{
get
;
set
;
}
/// <summary>
/// 审批条件id
/// </summary>
public
int
ConditionId
{
get
;
set
;
}
/// <summary>
/// 审核人类型 1主管(指定一级) 2 指定成员 3角色
/// </summary>
public
int
AuditType
{
get
;
set
;
}
/// <summary>
/// 1依次审批(本环节内审批人依次审批) 2 会签(须所有审批人同意)3或签(一名审批人同意或拒绝即可)
/// </summary>
public
int
AuditWay
{
get
;
set
;
}
/// <summary>
/// 存发起人或者角色 发起人1 表示直属主管 2表示再上一级 依次类推
/// </summary>
public
int
RoleOrInitiator
{
get
;
set
;
}
/// <summary>
/// 步骤(排序)
/// </summary>
public
int
Sort
{
get
;
set
;
}
/// <summary>
/// 审核备注
/// </summary>
public
string
AuditDescription
{
get
;
set
;
}
/// <summary>
/// 工作流id
/// </summary>
public
int
WorkFlowId
{
get
;
set
;
}
/// <summary>
/// 原审核id
/// </summary>
public
int
OriginalAuditId
{
get
;
set
;
}
/// <summary>
/// 1未审核 2审核通过 3 不通过 4 驳回
/// </summary>
public
int
Stauts
{
get
;
set
;
}
/// <summary>
/// 待审核人 1,2,3 以逗号分隔
/// </summary>
public
string
ToAuditId
{
get
;
set
;
}
/// <summary>
/// 已审核人 1,2,3 以逗号分割
/// </summary>
public
string
AuditedId
{
get
;
set
;
}
/// <summary>
/// 是否是特殊节点
/// </summary>
public
int
SpecialNode
{
get
;
set
;
}
}
}
\ No newline at end of file
Edu.Model/Entity/Flow/RB_Flow.cs
0 → 100644
View file @
5971a274
using
Edu.Common.Enum
;
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
using
VT.FW.DB
;
namespace
Edu.Model.Entity.Flow
{
/// <summary>
/// 流程设置表【退课相关】
/// </summary>
[
Serializable
]
[
DB
(
ConnectionName
=
"DefaultConnection"
)]
public
class
RB_Flow
{
/// <summary>
/// 流程编号
/// </summary>
public
int
FlowId
{
get
;
set
;
}
/// <summary>
/// 流程名称
/// </summary>
public
string
FlowName
{
get
;
set
;
}
/// <summary>
/// 集团编号
/// </summary>
public
int
Group_Id
{
get
;
set
;
}
/// <summary>
/// 删除状态(1-删除)
/// </summary>
public
DateStateEnum
Status
{
get
;
set
;
}
/// <summary>
/// 创建人
/// </summary>
public
int
CreateBy
{
get
;
set
;
}
/// <summary>
/// 创建时间
/// </summary>
public
DateTime
CreateTime
{
get
;
set
;
}
/// <summary>
/// 更新人
/// </summary>
public
int
UpdateBy
{
get
;
set
;
}
/// <summary>
/// 更新时间
/// </summary>
public
DateTime
UpdateTime
{
get
;
set
;
}
}
}
Edu.Model/Entity/Flow/RB_Flow_AduitInfo.cs
0 → 100644
View file @
5971a274
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
Edu.Model.Entity.Flow
{
/// <summary>
/// 流程节点审核信息实体
/// </summary>
public
class
RB_Flow_AduitInfo
{
/// <summary>
/// 主键编号
/// </summary>
public
int
CheckId
{
get
;
set
;
}
/// <summary>
/// 流程节点编号
/// </summary>
public
int
NodeId
{
get
;
set
;
}
/// <summary>
/// 流程编号
/// </summary>
public
int
FlowId
{
get
;
set
;
}
/// <summary>
/// 审核类型(1-指定人员,2-指定角色)
/// </summary>
public
int
AuditType
{
get
;
set
;
}
/// <summary>
/// 审核人员编号(AuditType为1时使用)
/// </summary>
public
int
UserId
{
get
;
set
;
}
/// <summary>
/// 是否为特殊节点
/// </summary>
public
int
IsSpecNode
{
get
;
set
;
}
/// <summary>
/// 1-班级教师,2-关联销售,3-分区校长 AuditType为2时使用
/// </summary>
public
int
PostType
{
get
;
set
;
}
/// <summary>
/// 1依次审批(本环节内审批人依次审批) 2 会签(须所有审批人同意)3 或签(一名审批人同意或拒绝即可)
/// </summary>
public
int
AuditWay
{
get
;
set
;
}
}
}
Edu.Model/Entity/Flow/RB_Flow_Node.cs
0 → 100644
View file @
5971a274
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
Edu.Model.Entity.Flow
{
/// <summary>
/// 流程节点实体类
/// </summary>
public
class
RB_Flow_Node
{
/// <summary>
/// 节点编号(主键)
/// </summary>
public
int
NodeId
{
get
;
set
;
}
/// <summary>
/// 节点名称
/// </summary>
public
string
NodeName
{
get
;
set
;
}
/// <summary>
/// 流程编号
/// </summary>
public
int
FlowId
{
get
;
set
;
}
/// <summary>
/// 排序
/// </summary>
public
int
SortNum
{
get
;
set
;
}
}
}
Edu.Model/Entity/Log/RB_Flow_Log.cs
0 → 100644
View file @
5971a274
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
using
VT.FW.DB
;
namespace
Edu.Model.Entity.Log
{
/// <summary>
/// 流程修改日志实体类
/// </summary>
[
Serializable
]
[
DB
(
ConnectionName
=
"DefaultConnection"
)]
public
class
RB_Flow_Log
{
/// <summary>
/// 流程日志表
/// </summary>
public
int
LogId
{
get
;
set
;
}
/// <summary>
/// 流程编号
/// </summary>
public
int
FlowId
{
get
;
set
;
}
/// <summary>
/// 日志内容
/// </summary>
public
string
LogContent
{
get
;
set
;
}
/// <summary>
/// 集团编号
/// </summary>
public
int
Group_Id
{
get
;
set
;
}
/// <summary>
/// 删除状态(1-删除)
/// </summary>
public
int
Status
{
get
;
set
;
}
/// <summary>
/// 创建人
/// </summary>
public
int
CreateBy
{
get
;
set
;
}
/// <summary>
/// 创建时间
/// </summary>
public
DateTime
CreateTime
{
get
;
set
;
}
}
}
Edu.Model/ViewModel/Course/RB_Student_BackClass_ViewModel.cs
0 → 100644
View file @
5971a274
using
Edu.Model.Entity.Course
;
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
Edu.Model.ViewModel.Course
{
/// <summary>
/// 学员退课单据视图实体类
/// </summary>
public
class
RB_Student_BackClass_ViewModel
:
RB_Student_BackClass
{
}
}
Edu.Model/ViewModel/Course/RB_Student_BackRecord_ViewModel.cs
0 → 100644
View file @
5971a274
using
Edu.Model.Entity.Course
;
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
Edu.Model.ViewModel.Course
{
/// <summary>
/// 学员退课单据审核记录表视图实体类
/// </summary>
public
class
RB_Student_BackRecord_ViewModel
:
RB_Student_BackRecord
{
}
}
\ No newline at end of file
Edu.Model/ViewModel/Course/RB_Student_BackRelevance_ViewModel.cs
0 → 100644
View file @
5971a274
using
Edu.Model.Entity.Course
;
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
Edu.Model.ViewModel.Course
{
/// <summary>
/// 退款单据审核人员信息视图实体类
/// </summary>
public
class
RB_Student_BackRelevance_ViewModel
:
RB_Student_BackRelevance
{
}
}
Edu.Model/ViewModel/Flow/RB_Flow_AduitInfo_ViewModel.cs
0 → 100644
View file @
5971a274
using
Edu.Model.Entity.Flow
;
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
Edu.Model.ViewModel.Flow
{
/// <summary>
/// 流程节点审核信息视图实体类
/// </summary>
public
class
RB_Flow_AduitInfo_ViewModel
:
RB_Flow_AduitInfo
{
/// <summary>
/// 流程节点编号【查询使用】
/// </summary>
public
string
QNodeIds
{
get
;
set
;
}
/// <summary>
/// 流程编号【查询使用】
/// </summary>
public
string
QFlowIds
{
get
;
set
;
}
}
}
Edu.Model/ViewModel/Flow/RB_Flow_Node_ViewModel.cs
0 → 100644
View file @
5971a274
using
Edu.Model.Entity.Flow
;
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
Edu.Model.ViewModel.Flow
{
/// <summary>
/// 流程节点视图实体类
/// </summary>
public
class
RB_Flow_Node_ViewModel
:
RB_Flow_Node
{
/// <summary>
/// 节点审核人信息列表
/// </summary>
public
List
<
RB_Flow_AduitInfo_ViewModel
>
FlowAduitList
{
get
;
set
;
}
/// <summary>
/// 流程编号【逗哥逗号分隔】
/// </summary>
public
string
QFlowIds
{
get
;
set
;
}
}
}
Edu.Model/ViewModel/Flow/RB_Flow_ViewModel.cs
0 → 100644
View file @
5971a274
using
Edu.Model.Entity.Flow
;
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
Edu.Model.ViewModel.Flow
{
/// <summary>
/// 流程设置表视图实体类【退课相关】
/// </summary>
public
class
RB_Flow_ViewModel
:
RB_Flow
{
/// <summary>
/// 流程节点列表
/// </summary>
public
List
<
RB_Flow_Node_ViewModel
>
FlowNodeList
{
get
;
set
;
}
}
}
Edu.Model/ViewModel/Log/RB_Flow_Log_ViewModel.cs
0 → 100644
View file @
5971a274
using
Edu.Model.Entity.Log
;
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
Edu.Model.ViewModel.Log
{
/// <summary>
/// 流程修改日志视图实体类
/// </summary>
public
class
RB_Flow_Log_ViewModel
:
RB_Flow_Log
{
/// <summary>
/// 流程编号【查询使用】
/// </summary>
public
string
QFlowIds
{
get
;
set
;
}
}
}
Edu.Model/ViewModel/User/RB_Teacher_ViewModel.cs
View file @
5971a274
...
...
@@ -78,5 +78,10 @@ namespace Edu.Model.ViewModel.User
/// 教师编号
/// </summary>
public
string
QTIds
{
get
;
set
;
}
/// <summary>
/// 对应账号id
/// </summary>
public
int
AccountId
{
get
;
set
;
}
}
}
\ No newline at end of file
Edu.Module.Course/ClassModule.cs
View file @
5971a274
...
...
@@ -347,6 +347,16 @@ namespace Edu.Module.Course
return
flag
;
}
/// <summary>
/// 更新班级结课日期
/// </summary>
/// <param name="classId"></param>
/// <returns></returns>
public
bool
UpdateClassEndDateModule
(
int
classId
)
{
return
classRepository
.
UpdateClassEndDateRepository
(
classId
);
}
/// <summary>
/// 生成班级上课计划表
/// </summary>
...
...
Edu.Module.Course/OrderModule.cs
View file @
5971a274
...
...
@@ -363,6 +363,21 @@ namespace Edu.Module.Course
return
orderRepository
.
GetEntity
<
RB_Order_ViewModel
>(
orderId
);
}
/// <summary>
/// 获取订单详情
/// </summary>
/// <param name="orderId"></param>
/// <returns></returns>
public
RB_Order_ViewModel
GetClassOrderInfo_V2
(
int
orderId
)
{
var
model
=
orderRepository
.
GetEntity
<
RB_Order_ViewModel
>(
orderId
);
if
(
model
!=
null
)
{
model
.
ClassName
=
classRepository
.
GetEntity
(
model
.
ClassId
)?.
ClassName
??
""
;
}
return
model
;
}
/// <summary>
/// 获取订单阶梯价格
/// </summary>
...
...
Edu.Module.Course/TeachingRewardsModule.cs
View file @
5971a274
...
...
@@ -455,7 +455,7 @@ namespace Edu.Module.Course
List
<
RB_Class_Time_ViewModel
>
timeList
=
new
List
<
RB_Class_Time_ViewModel
>();
List
<
RB_Class_Type_ViewModel
>
typeList
=
new
List
<
RB_Class_Type_ViewModel
>();
List
<
RB_Class_Check_ViewModel
>
checkList
=
new
List
<
RB_Class_Check_ViewModel
>();
//
List<RB_Teacher_ViewModel> teacherList = new List<RB_Teacher_ViewModel>();
List
<
RB_Teacher_ViewModel
>
teacherList
=
new
List
<
RB_Teacher_ViewModel
>();
if
(
plist
.
Any
())
{
string
pids
=
string
.
Join
(
","
,
plist
.
Select
(
x
=>
x
.
ClassPlanId
));
timeList
=
class_TimeRepository
.
GetClassTimeListRepository
(
new
RB_Class_Time_ViewModel
()
{
Group_Id
=
userInfo
.
Group_Id
,
QClassPlanIds
=
pids
});
...
...
@@ -466,12 +466,13 @@ namespace Edu.Module.Course
string
classIds
=
string
.
Join
(
","
,
plist
.
Select
(
x
=>
x
.
ClassId
).
Distinct
());
checkList
=
class_CheckRepository
.
GetClassCheckStatistics
(
new
RB_Class_Check_ViewModel
()
{
Group_Id
=
userInfo
.
Group_Id
,
Q_ClassIds
=
classIds
,
StartDate
=
StartTime
,
EndDate
=
EndTime
});
//查询教师列表
//
string teacherIds = string.Join(",", plist.Select(x => x.TeacherId).Distinct());
//
teacherList = teacherRepository.GetTeacherListRepository(new RB_Teacher_ViewModel() { QTIds = teacherIds });
string
teacherIds
=
string
.
Join
(
","
,
plist
.
Select
(
x
=>
x
.
TeacherId
).
Distinct
());
teacherList
=
teacherRepository
.
GetTeacherListRepository
(
new
RB_Teacher_ViewModel
()
{
QTIds
=
teacherIds
});
}
var
trans
=
teaching_BonusDetailRepository
.
DbTransaction
;
try
{
decimal
TotalMoney
=
0
;
foreach
(
var
item
in
plist
)
{
//查询课时
...
...
@@ -481,13 +482,13 @@ namespace Edu.Module.Course
foreach
(
var
qitem
in
ctimelist
)
{
var
ts
=
Convert
.
ToDateTime
(
nowTime
+
" "
+
qitem
.
EndTime
)
-
Convert
.
ToDateTime
(
nowTime
+
" "
+
qitem
.
StartTime
);
minute
+=
ts
.
Minutes
;
minute
+=
(
int
)
ts
.
Total
Minutes
;
}
int
ksNum
=
minute
/
configModel
.
BasicMinutes
;
// 未达到一课时时间 算不算一课时
//查询课单价
var
typeModel
=
typeList
.
Where
(
x
=>
x
.
CTypeId
==
item
.
ClassType
).
FirstOrDefault
();
//
var teacherModel = teacherList.Where(x => x.TId == item.TeacherId).FirstOrDefault();
decimal
unitPrice
=
configModel
.
BasicHourFee
+
(
typeModel
?.
AddHourFee
??
0
);
var
teacherModel
=
teacherList
.
Where
(
x
=>
x
.
TId
==
item
.
TeacherId
).
FirstOrDefault
();
decimal
unitPrice
=
configModel
.
BasicHourFee
+
(
typeModel
?.
AddHourFee
??
0
)
+
(
teacherModel
?.
BaseHourFee
??
0
)
;
//签到人数
var
checkModel
=
checkList
.
Where
(
x
=>
x
.
ClassId
==
item
.
ClassId
&&
x
.
ClassDate
==
item
.
ClassDate
).
FirstOrDefault
();
...
...
@@ -511,11 +512,13 @@ namespace Edu.Module.Course
UpdateBy
=
dmodel
.
UpdateBy
,
UpdateTime
=
DateTime
.
Now
},
trans
);
TotalMoney
+=
ksNum
*
unitPrice
;
}
#
region
更新状态为待确认
Dictionary
<
string
,
object
>
keyValues
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Teaching_Bonus_ViewModel
.
State
),
BonusStateEnum
.
Wait
}
{
nameof
(
RB_Teaching_Bonus_ViewModel
.
State
),
BonusStateEnum
.
Wait
},
{
nameof
(
RB_Teaching_Bonus_ViewModel
.
Money
),
TotalMoney
}
};
List
<
WhereHelper
>
wheres
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
(){
...
...
@@ -566,13 +569,15 @@ namespace Edu.Module.Course
string
msg
=
""
;
//查询出所有需要发提成的人
List
<
int
>
EmpList
=
list
.
Select
(
x
=>
x
.
TeacherId
).
Distinct
().
ToList
();
//根据教师ids 查询 账号ids
var
teachList
=
teacherRepository
.
GetTeacherList
(
string
.
Join
(
","
,
EmpList
));
//查询所有的账户信息 不存在的需要提示
var
banklist
=
clientBankAccountRepository
.
GetList
(
new
RB_ClientBankAccount_Extend
()
{
RB_Group_Id
=
userInfo
.
Group_Id
,
Type
=
Common
.
Enum
.
Finance
.
ClientTypeEnum
.
Employee
,
ObjIdStr
=
string
.
Join
(
","
,
EmpList
)
});
foreach
(
var
item
in
Emp
List
)
var
banklist
=
clientBankAccountRepository
.
GetList
(
new
RB_ClientBankAccount_Extend
()
{
RB_Group_Id
=
userInfo
.
Group_Id
,
Type
=
Common
.
Enum
.
Finance
.
ClientTypeEnum
.
Employee
,
ObjIdStr
=
string
.
Join
(
","
,
teachList
.
Select
(
x
=>
x
.
AccountId
)
)
});
foreach
(
var
item
in
teach
List
)
{
if
(!
banklist
.
Where
(
x
=>
x
.
ObjID
==
item
).
Any
())
if
(!
banklist
.
Where
(
x
=>
x
.
ObjID
==
item
.
AccountId
).
Any
())
{
msg
+=
(
UserReidsCache
.
GetUserLoginInfo
(
item
)?.
AccountName
??
""
)
+
"未查询到员工银行账户信息;"
;
msg
+=
(
UserReidsCache
.
GetUserLoginInfo
(
item
.
AccountId
)?.
AccountName
??
""
)
+
"未查询到员工银行账户信息;"
;
}
}
if
(
msg
!=
""
)
...
...
@@ -584,10 +589,10 @@ namespace Edu.Module.Course
foreach
(
var
item
in
EmpList
)
{
var
tlist
=
list
.
Where
(
x
=>
x
.
TeacherId
==
item
).
ToList
();
var
teacherModel
=
teach
erRepository
.
GetEntity
(
item
);
var
teacherModel
=
teach
List
.
Where
(
x
=>
x
.
TId
==
item
).
FirstOrDefault
(
);
#
region
新增财务单据
//银行账户
var
clientModel
=
banklist
.
Where
(
x
=>
x
.
ObjID
==
item
).
FirstOrDefault
();
var
clientModel
=
banklist
.
Where
(
x
=>
x
.
ObjID
==
teacherModel
.
AccountId
).
FirstOrDefault
();
var
detailList
=
new
List
<
object
>
{
};
decimal
TotalMoney
=
0
;
foreach
(
var
qitem
in
tlist
)
...
...
@@ -606,21 +611,27 @@ namespace Edu.Module.Course
string
Remark
=
tmodel
.
Month
+
"月,"
+
teacherModel
.
TeacherName
+
"教师奖励"
;
var
financeObj
=
new
{
CreateBy
=
userInfo
.
Id
,
IsPublic
,
ClientType
=
(
int
)
Common
.
Enum
.
Finance
.
ClientTypeEnum
.
Employee
,
ClientID
=
clientModel
.
ID
,
CurrencyId
,
WBMoney
=
TotalMoney
,
PayDate
=
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd"
),
RB_Branch_Id
=
teacherModel
.
School_Id
,
TemplateId
=
Config
.
ReadConfigKey
(
"TeachingBonusTemplete"
),
OrderSource
=
17
,
OtherType
=
26
,
ReFinanceId
=
bonusId
,
Remark
,
detailList
,
RB_Depart_Id
=
teacherModel
.
Dept_Id
CreateBy
=
userInfo
.
Id
,
RB_Branch_Id
=
teacherModel
.
School_Id
,
RB_Depart_Id
=
teacherModel
.
Dept_Id
,
RB_Group_Id
=
userInfo
.
Group_Id
,
RB_CreateByName
=
userInfo
.
AccountName
,
RB_DepartName
=
teacherModel
.
DeptName
,
RB_BranchName
=
teacherModel
.
SName
,
RB_GroupName
=
userInfo
.
GroupName
,
FinanceType
=
2
};
string
sign
=
EncryptionHelper
.
AesEncrypt
(
JsonHelper
.
Serialize
(
financeObj
),
Config
.
ReadConfigKey
(
"FinanceKey"
));
var
resultInfo
=
new
...
...
@@ -652,7 +663,7 @@ namespace Edu.Module.Course
};
List
<
WhereHelper
>
wheres
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
(){
FiledName
=
nameof
(
RB_Teaching_Bonus_ViewModel
),
FiledName
=
nameof
(
RB_Teaching_Bonus_ViewModel
.
Id
),
FiledValue
=
bonusId
,
OperatorEnum
=
OperatorEnum
.
Equal
}
...
...
Edu.Module.Log/FlowLogModule.cs
0 → 100644
View file @
5971a274
using
Edu.Model.Entity.Log
;
using
Edu.Model.ViewModel.Log
;
using
Edu.Repository.Log
;
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
Edu.Module.Log
{
/// <summary>
/// 流程修改日志处理类
/// </summary>
public
class
FlowLogModule
{
/// <summary>
/// 流程修改日志仓储层对象
/// </summary>
private
readonly
RB_Flow_LogRepository
flow_LogRepository
=
new
RB_Flow_LogRepository
();
/// <summary>
/// 获取流程修改日志列表
/// </summary>
/// <param name="query"></param>
/// <returns></returns>
public
List
<
RB_Flow_Log_ViewModel
>
GetFlowLogListModule
(
RB_Flow_Log_ViewModel
query
)
{
return
flow_LogRepository
.
GetFlowLogListRepository
(
query
);
}
/// <summary>
/// 获取流程修改日志分页列表
/// </summary>
/// <param name="pageIndex"></param>
/// <param name="pageSize"></param>
/// <param name="rowsCount"></param>
/// <param name="query"></param>
/// <returns></returns>
public
List
<
RB_Flow_Log_ViewModel
>
GetFlowLogPageListModule
(
int
pageIndex
,
int
pageSize
,
out
long
rowsCount
,
RB_Flow_Log_ViewModel
query
)
{
return
flow_LogRepository
.
GetFlowLogPageListRepository
(
pageIndex
,
pageSize
,
out
rowsCount
,
query
);
}
/// <summary>
/// 新增流程修改日志
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
public
bool
AddFlowLog
(
RB_Flow_Log
model
)
{
return
flow_LogRepository
.
AddFlowLogRepository
(
model
);
}
}
}
Edu.Module.System/BasicFlowModule.cs
0 → 100644
View file @
5971a274
using
Edu.Model.ViewModel.Flow
;
using
Edu.Repository.Flow
;
using
Edu.Repository.Log
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
VT.FW.DB
;
namespace
Edu.Module.System
{
/// <summary>
/// 基础相关流程设置
/// </summary>
public
class
BasicFlowModule
{
/// <summary>
/// 流程仓储层对象
/// </summary>
private
readonly
RB_FlowRepository
flowRepository
=
new
RB_FlowRepository
();
/// <summary>
/// 流程节点仓储层对象
/// </summary>
private
readonly
RB_Flow_NodeRepository
flow_NodeRepository
=
new
RB_Flow_NodeRepository
();
/// <summary>
/// 流程节点审核人
/// </summary>
private
readonly
RB_Flow_AduitInfoRepository
flow_AduitInfoRepository
=
new
RB_Flow_AduitInfoRepository
();
/// <summary>
/// 流程修改日志仓储层对象
/// </summary>
private
readonly
RB_Flow_LogRepository
flow_LogRepository
=
new
RB_Flow_LogRepository
();
/// <summary>
/// 获取流程设置分页列表
/// </summary>
/// <param name="pageIndex"></param>
/// <param name="pageSize"></param>
/// <param name="rowsCount"></param>
/// <param name="query"></param>
/// <returns></returns>
public
List
<
RB_Flow_ViewModel
>
GetFlowPageListModule
(
int
pageIndex
,
int
pageSize
,
out
long
rowsCount
,
RB_Flow_ViewModel
query
)
{
var
list
=
flowRepository
.
GetFlowPageListRepository
(
pageIndex
,
pageSize
,
out
rowsCount
,
query
);
return
list
;
}
/// <summary>
/// 获取流程信息
/// </summary>
/// <param name="Id"></param>
/// <returns></returns>
public
RB_Flow_ViewModel
GetFlowModule
(
object
Id
)
{
var
extModel
=
flowRepository
.
GetEntity
<
RB_Flow_ViewModel
>(
Id
);
if
(
extModel
!=
null
)
{
if
(
extModel
.
FlowId
>
0
)
{
var
auditList
=
flow_AduitInfoRepository
.
GetFlowAduitInfoListRepository
(
new
RB_Flow_AduitInfo_ViewModel
()
{
FlowId
=
extModel
.
FlowId
});
extModel
.
FlowNodeList
=
flow_NodeRepository
.
GetFlowNodeListRepository
(
new
RB_Flow_Node_ViewModel
()
{
FlowId
=
extModel
.
FlowId
});
if
(
extModel
.
FlowNodeList
!=
null
&&
extModel
.
FlowNodeList
.
Count
>
0
)
{
foreach
(
var
item
in
extModel
.
FlowNodeList
)
{
item
.
FlowAduitList
=
auditList
?.
Where
(
qitem
=>
qitem
.
NodeId
==
item
.
NodeId
)?.
ToList
();
}
}
}
}
return
extModel
;
}
/// <summary>
/// 新增修改流程
/// </summary>
/// <param name="extModel"></param>
/// <returns></returns>
public
virtual
bool
SetFlowModule
(
RB_Flow_ViewModel
extModel
)
{
bool
flag
=
false
;
string
logContent
=
""
;
RB_Flow_ViewModel
oldModel
=
null
;
if
(
extModel
.
FlowId
>
0
)
{
oldModel
=
GetFlowModule
(
extModel
.
FlowId
);
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Flow_ViewModel
.
FlowName
),
extModel
.
FlowName
},
{
nameof
(
RB_Flow_ViewModel
.
UpdateBy
),
extModel
.
UpdateBy
},
{
nameof
(
RB_Flow_ViewModel
.
UpdateTime
),
extModel
.
UpdateTime
},
};
if
(
oldModel
.
FlowName
!=
extModel
.
FlowName
)
{
logContent
+=
string
.
Format
(
",流程名称由【{0}】修改为【{1}】"
,
oldModel
.
FlowName
,
extModel
.
FlowName
);
}
flag
=
flowRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Flow_ViewModel
.
FlowId
),
extModel
.
FlowId
));
}
else
{
logContent
=
string
.
Format
(
"新增【{0}】流程"
,
extModel
.
FlowName
);
var
newId
=
flowRepository
.
Insert
(
extModel
);
extModel
.
FlowId
=
newId
;
flag
=
newId
>
0
;
}
var
oldauditList
=
flow_AduitInfoRepository
.
GetFlowAduitInfoListRepository
(
new
RB_Flow_AduitInfo_ViewModel
()
{
FlowId
=
extModel
.
FlowId
});
var
oldflowNodeList
=
flow_NodeRepository
.
GetFlowNodeListRepository
(
new
RB_Flow_Node_ViewModel
()
{
FlowId
=
extModel
.
FlowId
});
//以前没有流程节点(直接新增)
if
(
oldflowNodeList
==
null
)
{
int
SortNum
=
1
;
foreach
(
var
item
in
extModel
.
FlowNodeList
)
{
item
.
FlowId
=
extModel
.
FlowId
;
item
.
SortNum
=
SortNum
;
var
newNodeId
=
flow_NodeRepository
.
Insert
(
item
);
item
.
NodeId
=
newNodeId
;
flag
=
newNodeId
>
0
;
if
(
item
.
FlowAduitList
!=
null
&&
item
.
FlowAduitList
.
Count
>
0
)
{
foreach
(
var
subItem
in
item
.
FlowAduitList
)
{
subItem
.
NodeId
=
item
.
NodeId
;
subItem
.
FlowId
=
extModel
.
FlowId
;
flag
=
flow_AduitInfoRepository
.
Insert
(
subItem
)>
0
;
}
}
SortNum
++;
}
}
else
{
//现在没有节点信息[删除以前的节点和审核人]
if
(
extModel
.
FlowNodeList
==
null
||
(
extModel
.
FlowNodeList
!=
null
&&
extModel
.
FlowNodeList
.
Count
==
0
))
{
flow_NodeRepository
.
DeleteOne
(
new
WhereHelper
(
nameof
(
RB_Flow_Node_ViewModel
.
FlowId
),
extModel
.
FlowId
));
flow_AduitInfoRepository
.
DeleteOne
(
new
WhereHelper
(
nameof
(
RB_Flow_AduitInfo_ViewModel
.
FlowId
),
extModel
.
FlowId
));
}
else
{
var
deleteList
=
oldflowNodeList
.
Where
(
qitem
=>
!
extModel
.
FlowNodeList
.
Any
(
oldItem
=>
qitem
.
NodeId
==
oldItem
.
NodeId
)).
ToList
();
foreach
(
var
dItem
in
deleteList
)
{
if
(
dItem
.
NodeId
>
0
)
{
flow_NodeRepository
.
Delete
(
dItem
.
NodeId
);
flow_AduitInfoRepository
.
DeleteOne
(
new
WhereHelper
(
nameof
(
RB_Flow_AduitInfo_ViewModel
.
NodeId
),
dItem
.
NodeId
));
logContent
+=
string
.
Format
(
",删除【{0}】节点"
,
dItem
.
NodeName
);
}
}
int
SortNum
=
1
;
foreach
(
var
nItem
in
extModel
.
FlowNodeList
)
{
nItem
.
FlowId
=
extModel
.
FlowId
;
nItem
.
SortNum
=
SortNum
;
if
(
nItem
.
NodeId
==
0
)
{
var
newNodeId
=
flow_NodeRepository
.
Insert
(
nItem
);
nItem
.
NodeId
=
newNodeId
;
flag
=
newNodeId
>
0
;
}
else
{
flag
=
flow_NodeRepository
.
Update
(
nItem
);
}
var
auditDeleteList
=
oldauditList
.
Where
(
qitem
=>
qitem
.
NodeId
==
nItem
.
NodeId
);
if
(
nItem
.
FlowAduitList
!=
null
&&
nItem
.
FlowAduitList
.
Count
>
0
)
{
flow_AduitInfoRepository
.
DeleteOne
(
new
WhereHelper
(
nameof
(
RB_Flow_AduitInfo_ViewModel
.
NodeId
),
nItem
.
NodeId
));
foreach
(
var
subItem
in
nItem
.
FlowAduitList
)
{
subItem
.
NodeId
=
nItem
.
NodeId
;
subItem
.
FlowId
=
extModel
.
FlowId
;
flag
=
flow_AduitInfoRepository
.
Insert
(
subItem
)>
0
;
}
}
}
}
}
//添加日志
if
(!
string
.
IsNullOrEmpty
(
logContent
))
{
flow_LogRepository
.
AddFlowLogRepository
(
new
Model
.
Entity
.
Log
.
RB_Flow_Log
()
{
CreateBy
=
extModel
.
CreateBy
,
Group_Id
=
extModel
.
Group_Id
,
FlowId
=
extModel
.
FlowId
,
LogContent
=
logContent
});
}
return
flag
;
}
}
}
\ No newline at end of file
Edu.Repository/Course/RB_ClassRepository.cs
View file @
5971a274
...
...
@@ -176,7 +176,26 @@ WHERE 1=1
return
GetPage
<
RB_Class_ViewModel
>(
pageIndex
,
pageSize
,
out
rowsCount
,
builder
.
ToString
(),
parameters
).
ToList
();
}
/// <summary>
/// 更新班级结课日期
/// </summary>
/// <param name="classId"></param>
/// <returns></returns>
public
bool
UpdateClassEndDateRepository
(
int
classId
)
{
StringBuilder
builder
=
new
StringBuilder
();
builder
.
AppendFormat
(
@"
UPDATE rb_class AS A
INNER JOIN(
SELECT MAX(ClassDate) AS ClassDate,ClassId
FROM rb_class_plan WHERE Status=0
GROUP BY ClassId
) AS B ON A.ClassId=B.ClassId
SET A.EndClassDate=B.ClassDate
WHERE A.ClassId={0}
"
,
classId
);
return
base
.
Execute
(
builder
.
ToString
())
>
0
;
}
/// <summary>
/// 获取日语培训分页列表
...
...
Edu.Repository/Course/RB_Student_BackClassRepository.cs
0 → 100644
View file @
5971a274
using
Edu.Model.Entity.Course
;
using
Edu.Model.ViewModel.Course
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
namespace
Edu.Repository.Course
{
/// <summary>
/// 学员退课单据仓储层
/// </summary>
public
class
RB_Student_BackClassRepository
:
BaseRepository
<
RB_Student_BackClass
>
{
/// <summary>
/// 获取学员退课单据分页列表
/// </summary>
/// <param name="pageIndex"></param>
/// <param name="pageSize"></param>
/// <param name="rowsCount"></param>
/// <param name="query"></param>
/// <returns></returns>
public
List
<
RB_Student_BackClass_ViewModel
>
GetStudentBackClassPageListRepository
(
int
pageIndex
,
int
pageSize
,
out
long
rowsCount
,
RB_Student_BackClass_ViewModel
query
)
{
StringBuilder
builder
=
new
StringBuilder
();
builder
.
AppendFormat
(
@"
SELECT *
FROM RB_Student_BackClass
WHERE 1=1
"
);
if
(
query
!=
null
)
{
}
return
GetPage
<
RB_Student_BackClass_ViewModel
>(
pageIndex
,
pageSize
,
out
rowsCount
,
builder
.
ToString
()).
ToList
();
}
}
}
\ No newline at end of file
Edu.Repository/Course/RB_Student_BackRecordRepository.cs
0 → 100644
View file @
5971a274
using
Edu.Model.Entity.Course
;
using
Edu.Model.ViewModel.Course
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
namespace
Edu.Repository.Course
{
/// <summary>
/// 学员退课单据审核记录仓储层
/// </summary>
public
class
RB_Student_BackRecordRepository
:
BaseRepository
<
RB_Student_BackRecord
>
{
/// <summary>
/// 获取学员退课单据审核记录列表
/// </summary>
/// <param name="query"></param>
/// <returns></returns>
public
List
<
RB_Student_BackRecord_ViewModel
>
GetStudentBackRecordListRepository
(
RB_Student_BackRecord_ViewModel
query
)
{
StringBuilder
builder
=
new
StringBuilder
();
return
Get
<
RB_Student_BackRecord_ViewModel
>(
builder
.
ToString
()).
ToList
();
}
}
}
Edu.Repository/Course/RB_Student_BackRelevanceRepository.cs
0 → 100644
View file @
5971a274
using
Edu.Model.Entity.Course
;
using
Edu.Model.ViewModel.Course
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
namespace
Edu.Repository.Course
{
/// <summary>
/// 退款单据审核人员信息仓储层
/// </summary>
public
class
RB_Student_BackRelevanceRepository
:
BaseRepository
<
RB_Student_BackRelevance
>
{
/// <summary>
/// 获取学生退课审核列表
/// </summary>
/// <param name="query"></param>
/// <returns></returns>
public
List
<
RB_Student_BackRelevance_ViewModel
>
GetStudentBackRelevanceListRepository
(
RB_Student_BackRelevance_ViewModel
query
)
{
StringBuilder
builder
=
new
StringBuilder
();
return
Get
<
RB_Student_BackRelevance_ViewModel
>(
builder
.
ToString
()).
ToList
();
}
}
}
\ No newline at end of file
Edu.Repository/Flow/RB_FlowRepository.cs
0 → 100644
View file @
5971a274
using
Edu.Common.Enum
;
using
Edu.Model.Entity.Flow
;
using
Edu.Model.ViewModel.Flow
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
namespace
Edu.Repository.Flow
{
/// <summary>
/// 流程设置仓储层【退课相关】
/// </summary>
public
class
RB_FlowRepository
:
BaseRepository
<
RB_Flow
>
{
/// <summary>
/// 获取流程设置分页列表
/// </summary>
/// <param name="pageIndex"></param>
/// <param name="pageSize"></param>
/// <param name="rowsCount"></param>
/// <param name="query"></param>
/// <returns></returns>
public
List
<
RB_Flow_ViewModel
>
GetFlowPageListRepository
(
int
pageIndex
,
int
pageSize
,
out
long
rowsCount
,
RB_Flow_ViewModel
query
)
{
StringBuilder
builder
=
new
StringBuilder
();
builder
.
AppendFormat
(
@"
SELECT *
FROM RB_Flow
WHERE 1=1
"
);
builder
.
AppendFormat
(
" AND {0}={1} "
,
nameof
(
RB_Flow_ViewModel
.
Status
),
(
int
)
DateStateEnum
.
Normal
);
if
(
query
!=
null
)
{
if
(
query
.
Group_Id
>
0
)
{
builder
.
AppendFormat
(
" AND {0}={1} "
,
nameof
(
RB_Flow_ViewModel
.
Group_Id
),
query
.
Group_Id
);
}
}
return
GetPage
<
RB_Flow_ViewModel
>(
pageIndex
,
pageSize
,
out
rowsCount
,
builder
.
ToString
()).
ToList
();
}
}
}
Edu.Repository/Flow/RB_Flow_AduitInfoRepository.cs
0 → 100644
View file @
5971a274
using
Edu.Model.Entity.Flow
;
using
Edu.Model.ViewModel.Flow
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
namespace
Edu.Repository.Flow
{
/// <summary>
/// 流程节点审核信息仓储层
/// </summary>
public
class
RB_Flow_AduitInfoRepository
:
BaseRepository
<
RB_Flow_AduitInfo
>
{
/// <summary>
/// 获取流程节点审核信息列表
/// </summary>
/// <param name="query"></param>
/// <returns></returns>
public
List
<
RB_Flow_AduitInfo_ViewModel
>
GetFlowAduitInfoListRepository
(
RB_Flow_AduitInfo_ViewModel
query
)
{
StringBuilder
builder
=
new
StringBuilder
();
builder
.
AppendFormat
(
@"
SELECT *
FROM RB_Flow_AduitInfo
WHERE 1=1
"
);
if
(
query
!=
null
)
{
if
(
query
.
NodeId
>
0
)
{
builder
.
AppendFormat
(
" AND {0}={1} "
,
nameof
(
RB_Flow_AduitInfo_ViewModel
.
NodeId
),
query
.
NodeId
);
}
if
(!
string
.
IsNullOrEmpty
(
query
.
QNodeIds
))
{
builder
.
AppendFormat
(
" AND {0} IN({1}) "
,
nameof
(
RB_Flow_AduitInfo_ViewModel
.
NodeId
),
query
.
QNodeIds
);
}
if
(
query
.
FlowId
>
0
)
{
builder
.
AppendFormat
(
" AND {0}={1} "
,
nameof
(
RB_Flow_AduitInfo_ViewModel
.
FlowId
),
query
.
FlowId
);
}
if
(!
string
.
IsNullOrEmpty
(
query
.
QFlowIds
))
{
builder
.
AppendFormat
(
" AND {0} IN({1}) "
,
nameof
(
RB_Flow_AduitInfo_ViewModel
.
FlowId
),
query
.
QFlowIds
);
}
}
return
Get
<
RB_Flow_AduitInfo_ViewModel
>(
builder
.
ToString
()).
ToList
();
}
}
}
Edu.Repository/Flow/RB_Flow_NodeRepository.cs
0 → 100644
View file @
5971a274
using
Edu.Common.Enum
;
using
Edu.Model.Entity.Flow
;
using
Edu.Model.ViewModel.Flow
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
namespace
Edu.Repository.Flow
{
/// <summary>
/// 流程节点信息仓储层
/// </summary>
public
class
RB_Flow_NodeRepository
:
BaseRepository
<
RB_Flow_Node
>
{
/// <summary>
/// 获取流程节点信息列表
/// </summary>
/// <param name="query"></param>
/// <returns></returns>
public
List
<
RB_Flow_Node_ViewModel
>
GetFlowNodeListRepository
(
RB_Flow_Node_ViewModel
query
)
{
StringBuilder
builder
=
new
StringBuilder
();
builder
.
AppendFormat
(
@"
SELECT *
FROM RB_Flow_Node
WHERE 1=1
"
);
if
(
query
!=
null
)
{
if
(
query
.
FlowId
>
0
)
{
builder
.
AppendFormat
(
" AND {0}={1} "
,
nameof
(
RB_Flow_Node_ViewModel
.
FlowId
),
query
.
FlowId
);
}
if
(!
string
.
IsNullOrEmpty
(
query
.
QFlowIds
))
{
builder
.
AppendFormat
(
" AND {0} IN({1}) "
,
nameof
(
RB_Flow_Node_ViewModel
.
FlowId
),
query
.
QFlowIds
);
}
}
builder
.
AppendFormat
(
" ORDER BY {0} ASC "
,
nameof
(
RB_Flow_Node_ViewModel
.
SortNum
));
return
Get
<
RB_Flow_Node_ViewModel
>(
builder
.
ToString
()).
ToList
();
}
}
}
Edu.Repository/Log/RB_Flow_LogRepository.cs
0 → 100644
View file @
5971a274
using
Edu.Model.Entity.Log
;
using
Edu.Model.ViewModel.Log
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
namespace
Edu.Repository.Log
{
/// <summary>
/// 流程修改日志仓储层
/// </summary>
public
class
RB_Flow_LogRepository
:
BaseRepository
<
RB_Flow_Log
>
{
/// <summary>
/// 获取流程修改日志列表
/// </summary>
/// <param name="query"></param>
/// <returns></returns>
public
List
<
RB_Flow_Log_ViewModel
>
GetFlowLogListRepository
(
RB_Flow_Log_ViewModel
query
)
{
StringBuilder
builder
=
new
StringBuilder
();
builder
.
AppendFormat
(
@"
SELECT *
FROM RB_Flow_Log
WHERE 1=1
"
);
builder
.
AppendFormat
(
" AND {0}=0 "
,
nameof
(
RB_Flow_Log_ViewModel
.
Status
));
if
(
query
!=
null
)
{
if
(
query
.
FlowId
>
0
)
{
builder
.
AppendFormat
(
" AND {0}={1} "
,
nameof
(
RB_Flow_Log_ViewModel
.
FlowId
),
query
.
FlowId
);
}
if
(!
string
.
IsNullOrEmpty
(
query
.
QFlowIds
))
{
builder
.
AppendFormat
(
" AND {0} IN({1}) "
,
nameof
(
RB_Flow_Log_ViewModel
.
FlowId
),
query
.
QFlowIds
);
}
}
return
Get
<
RB_Flow_Log_ViewModel
>(
builder
.
ToString
()).
ToList
();
}
/// <summary>
/// 获取流程修改日志分页列表
/// </summary>
/// <param name="pageIndex"></param>
/// <param name="pageSize"></param>
/// <param name="rowsCount"></param>
/// <param name="query"></param>
/// <returns></returns>
public
List
<
RB_Flow_Log_ViewModel
>
GetFlowLogPageListRepository
(
int
pageIndex
,
int
pageSize
,
out
long
rowsCount
,
RB_Flow_Log_ViewModel
query
)
{
StringBuilder
builder
=
new
StringBuilder
();
builder
.
AppendFormat
(
@"
SELECT *
FROM RB_Flow_Log
WHERE 1=1
"
);
builder
.
AppendFormat
(
" AND {0}=0 "
,
nameof
(
RB_Flow_Log_ViewModel
.
Status
));
if
(
query
!=
null
)
{
if
(
query
.
FlowId
>
0
)
{
builder
.
AppendFormat
(
" AND {0}={1} "
,
nameof
(
RB_Flow_Log_ViewModel
.
FlowId
),
query
.
FlowId
);
}
if
(!
string
.
IsNullOrEmpty
(
query
.
QFlowIds
))
{
builder
.
AppendFormat
(
" AND {0} IN({1}) "
,
nameof
(
RB_Flow_Log_ViewModel
.
FlowId
),
query
.
QFlowIds
);
}
}
return
GetPage
<
RB_Flow_Log_ViewModel
>(
pageIndex
,
pageSize
,
out
rowsCount
,
builder
.
ToString
()).
ToList
();
}
/// <summary>
/// 细呢子流程日志
/// </summary>
/// <param name="oldModel"></param>
/// <returns></returns>
public
bool
AddFlowLogRepository
(
RB_Flow_Log
oldModel
)
{
var
model
=
new
RB_Flow_Log
()
{
CreateBy
=
oldModel
.
CreateBy
,
FlowId
=
oldModel
.
FlowId
,
Group_Id
=
oldModel
.
Group_Id
,
LogContent
=
oldModel
.
LogContent
.
TrimStart
(
','
).
TrimEnd
(
','
),
CreateTime
=
DateTime
.
Now
,
Status
=
0
,
};
return
base
.
Insert
(
model
)
>
0
;
}
}
}
Edu.Repository/User/RB_TeacherRepository.cs
View file @
5971a274
...
...
@@ -148,5 +148,28 @@ WHERE 1=1
}
return
GetPage
<
RB_Teacher_ViewModel
>(
pageIndex
,
pageSize
,
out
rowsCount
,
builder
.
ToString
(),
parameters
).
ToList
();
}
/// <summary>
/// 获取教师账户
/// </summary>
/// <param name="teacherIds"></param>
/// <returns></returns>
public
List
<
RB_Teacher_ViewModel
>
GetTeacherList
(
string
teacherIds
)
{
var
parameters
=
new
DynamicParameters
();
StringBuilder
builder
=
new
StringBuilder
();
builder
.
AppendFormat
(
@"
SELECT t.*,a.Id as AccountId,s.SName,d.DeptName
FROM rb_teacher AS t
LEFT JOIN rb_account as a ON (t.TId=a.AccountId AND a.AccountType=2)
LEFT JOIN rb_school AS s ON t.School_Id=s.SId
left join rb_department as d on t.Dept_Id = d.DeptId
WHERE 1=1
"
);
builder
.
AppendFormat
(
" AND t.{0}={1} "
,
nameof
(
RB_Teacher_ViewModel
.
Status
),
(
int
)
DateStateEnum
.
Normal
);
builder
.
AppendFormat
(
" AND t.{0}={1} "
,
nameof
(
RB_Teacher_ViewModel
.
AuditStatus
),
(
int
)
AccountStatusEnum
.
Pass
);
builder
.
AppendFormat
(
" AND t.{0} IN({1}) "
,
nameof
(
RB_Teacher_ViewModel
.
TId
),
teacherIds
);
return
Get
<
RB_Teacher_ViewModel
>(
builder
.
ToString
(),
parameters
).
ToList
();
}
}
}
\ No newline at end of file
Edu.WebApi/Controllers/Course/ClassController.cs
View file @
5971a274
...
...
@@ -234,6 +234,10 @@ namespace Edu.WebApi.Controllers.Course
}
bool
flag
=
classModule
.
SetClassModule
(
extModel
);
if
(
flag
)
{
classModule
.
UpdateClassEndDateModule
(
extModel
.
ClassId
);
}
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
}
...
...
@@ -288,6 +292,10 @@ namespace Edu.WebApi.Controllers.Course
{
var
ClassPlanId
=
base
.
ParmJObj
.
GetInt
(
"ClassPlanId"
);
var
flag
=
classModule
.
RemoveClassPlanModule
(
ClassPlanId
,
base
.
UserInfo
);
if
(
flag
)
{
classModule
.
UpdateClassEndDateModule
(
extModel
.
ClassId
);
}
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
}
...
...
@@ -344,6 +352,10 @@ namespace Edu.WebApi.Controllers.Course
}
}
var
flag
=
classModule
.
SetClassPlanModule
(
extModel
,
base
.
UserInfo
.
Id
);
if
(
flag
)
{
classModule
.
UpdateClassEndDateModule
(
extModel
.
ClassId
);
}
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
}
...
...
Edu.WebApi/Controllers/Course/OrderController.cs
View file @
5971a274
...
...
@@ -338,6 +338,53 @@ namespace Edu.WebApi.Controllers.Course
});
}
/// <summary>
/// 订单详情
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetClassOrderForDetail
()
{
var
userInfo
=
base
.
UserInfo
;
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
)
{
return
ApiResult
.
Failed
(
"订单不存在"
);
}
return
ApiResult
.
Success
(
""
,
new
{
model
.
OrderId
,
model
.
ClassId
,
model
.
TradeWay
,
model
.
Class_Price
,
model
.
Unit_Price
,
model
.
GuestNum
,
model
.
PreferPrice
,
model
.
Income
,
model
.
Refund
,
model
.
DiscountMoney
,
model
.
PlatformTax
,
DueInMoney
=
model
.
PreferPrice
-
(
model
.
Income
-
model
.
Refund
+
model
.
PlatformTax
+
model
.
DiscountMoney
),
model
.
OrderState
,
OrderStateName
=
model
.
OrderState
.
ToName
(),
model
.
EnterID
,
EnterName
=
UserReidsCache
.
GetUserLoginInfo
(
model
.
EnterID
)?.
AccountName
??
""
,
model
.
CommissionMoney
,
model
.
ExtraRewardMoney
,
model
.
ExtraDeductMoney
,
model
.
IsCommissionGive
,
CreateTime
=
model
.
CreateTime
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
),
CreateTime2
=
model
.
CreateTime
.
ToString
(
"yyyy年MM月dd日"
)
});
}
/// <summary>
/// 取消订单
/// </summary>
...
...
Edu.WebApi/Controllers/Course/TeachingRewardsController.cs
View file @
5971a274
...
...
@@ -434,6 +434,10 @@ namespace Edu.WebApi.Controllers.Course
{
return
ApiResult
.
ParamIsNull
(
"请选择月份"
);
}
//if (Convert.ToDateTime(dmodel.Month) >= Convert.ToDateTime(DateTime.Now.ToString("yyyy-MM")))
//{
// return ApiResult.ParamIsNull("只能选择之前月份");
//}
if
(
string
.
IsNullOrEmpty
(
dmodel
.
TeacherIds
))
{
return
ApiResult
.
ParamIsNull
(
"请选择老师"
);
...
...
@@ -484,6 +488,21 @@ namespace Edu.WebApi.Controllers.Course
return
ApiResult
.
Failed
(
msg
);
}
}
/// <summary>
/// 获取枚举列表
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetBonusStateEnumList
()
{
var
list
=
EnumHelper
.
EnumToList
(
typeof
(
BonusStateEnum
));
return
ApiResult
.
Success
(
""
,
list
.
Select
(
x
=>
new
{
x
.
Name
,
x
.
Id
}));
}
#
endregion
}
}
Edu.WebApi/appsettings.json
View file @
5971a274
...
...
@@ -23,8 +23,8 @@
"Mongo"
:
"mongodb://47.96.25.130:27017"
,
"MongoDBName"
:
"Edu"
,
"FinanceKey"
:
"FinanceMallInsertToERPViitto2020"
,
"PaymentFinanceApi"
:
"http://192.168.
2.16
:8083/api/Mall/InsertFinanceBatchForMallOut"
,
"TeachingBonusTemplete"
:
1
34
,
"PaymentFinanceApi"
:
"http://192.168.
1.13
:8083/api/Mall/InsertFinanceBatchForMallOut"
,
"TeachingBonusTemplete"
:
1
41
,
"BonusCostTypeId"
:
540
,
"RabbitMqConfig"
:
{
"HostName"
:
"47.96.25.130"
,
...
...
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