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
094cf17d
Commit
094cf17d
authored
Dec 18, 2020
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
c70e9a38
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
636 additions
and
40 deletions
+636
-40
RB_Student_BackClass.cs
Edu.Model/Entity/Course/RB_Student_BackClass.cs
+5
-0
RB_Student_BackRecord.cs
Edu.Model/Entity/Course/RB_Student_BackRecord.cs
+3
-2
RB_Student_BackRelevance.cs
Edu.Model/Entity/Course/RB_Student_BackRelevance.cs
+5
-4
RB_Flow_AduitInfo.cs
Edu.Model/Entity/Flow/RB_Flow_AduitInfo.cs
+5
-4
OrderModule2.cs
Edu.Module.Course/OrderModule2.cs
+23
-16
StudentBillModule.cs
Edu.Module.Course/StudentBillModule.cs
+562
-4
RB_Student_BackClassRepository.cs
Edu.Repository/Course/RB_Student_BackClassRepository.cs
+0
-2
RB_Student_BackRecordRepository.cs
Edu.Repository/Course/RB_Student_BackRecordRepository.cs
+9
-2
RB_Student_BackRelevanceRepository.cs
Edu.Repository/Course/RB_Student_BackRelevanceRepository.cs
+13
-1
StuController.cs
Edu.WebApi/Controllers/Course/StuController.cs
+11
-5
No files found.
Edu.Model/Entity/Course/RB_Student_BackClass.cs
View file @
094cf17d
...
...
@@ -92,5 +92,10 @@ namespace Edu.Model.Entity.Course
/// 申请备注
/// </summary>
public
string
ApplyReason
{
get
;
set
;
}
/// <summary>
/// 流程编号
/// </summary>
public
int
FlowId
{
get
;
set
;
}
}
}
Edu.Model/Entity/Course/RB_Student_BackRecord.cs
View file @
094cf17d
using
System
;
using
Edu.Common.Enum.User
;
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
using
VT.FW.DB
;
...
...
@@ -31,7 +32,7 @@ namespace Edu.Model.Entity.Course
/// <summary>
/// 1未审核 2审核通过 3 不通过 4 驳回 5他人已审核
/// </summary>
public
int
AuditStatus
{
get
;
set
;
}
public
WFRrocessStatus
AuditStatus
{
get
;
set
;
}
/// <summary>
/// 描述
...
...
Edu.Model/Entity/Course/RB_Student_BackRelevance.cs
View file @
094cf17d
using
System
;
using
Edu.Common.Enum.User
;
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
using
VT.FW.DB
;
...
...
@@ -25,12 +26,12 @@ namespace Edu.Model.Entity.Course
/// <summary>
/// 审核人类型 1主管(指定一级) 2 指定成员 3角色
/// </summary>
public
int
AuditType
{
get
;
set
;
}
public
WFTAuditTypeEnum
AuditType
{
get
;
set
;
}
/// <summary>
/// 1依次审批(本环节内审批人依次审批) 2 会签(须所有审批人同意)3或签(一名审批人同意或拒绝即可)
/// </summary>
public
int
AuditWay
{
get
;
set
;
}
public
WFTAuditWayEnum
AuditWay
{
get
;
set
;
}
/// <summary>
/// 存发起人或者角色 发起人1 表示直属主管 2表示再上一级 依次类推
...
...
@@ -60,7 +61,7 @@ namespace Edu.Model.Entity.Course
/// <summary>
/// 1未审核 2审核通过 3 不通过 4 驳回
/// </summary>
public
int
Stauts
{
get
;
set
;
}
public
WFRrocessStatus
Stauts
{
get
;
set
;
}
/// <summary>
/// 待审核人 1,2,3 以逗号分隔
...
...
Edu.Model/Entity/Flow/RB_Flow_AduitInfo.cs
View file @
094cf17d
using
System
;
using
Edu.Common.Enum.User
;
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
using
VT.FW.DB
;
...
...
@@ -33,9 +34,9 @@ namespace Edu.Model.Entity.Flow
public
string
AduitName
{
get
;
set
;
}
/// <summary>
/// 审核类型
(1-指定人员,2-指定角色)
/// 审核类型
/// </summary>
public
int
AuditType
{
get
;
set
;
}
public
WFTAuditTypeEnum
AuditType
{
get
;
set
;
}
/// <summary>
/// 审核人员编号(AuditType为1时使用)
...
...
@@ -55,6 +56,6 @@ namespace Edu.Model.Entity.Flow
/// <summary>
/// 1依次审批(本环节内审批人依次审批) 2 会签(须所有审批人同意)3 或签(一名审批人同意或拒绝即可)
/// </summary>
public
int
AuditWay
{
get
;
set
;
}
public
WFTAuditWayEnum
AuditWay
{
get
;
set
;
}
}
}
Edu.Module.Course/OrderModule2.cs
View file @
094cf17d
...
...
@@ -132,12 +132,15 @@ namespace Edu.Module.Course
TeacherId
=
teacherId
,
OrderId
=
OrderId
,
ApplyReason
=
reason
,
FlowId
=
Common
.
Config
.
BackClassFlowId
,
};
var
newBackId
=
student_BackClassRepository
.
Insert
(
backClassModel
);
backClassModel
.
BackId
=
newBackId
;
flag
=
newBackId
>
0
;
int
index
=
0
;
foreach
(
var
item
in
flowModel
.
FlowNodeList
)
{
if
(
item
.
FlowAduitList
!=
null
&&
item
.
FlowAduitList
.
Count
>
0
)
{
string
AuditDescription
=
""
;
//审核人名称
...
...
@@ -194,24 +197,26 @@ namespace Edu.Module.Course
AuditDescription
=
AuditDescription
,
AuditedId
=
""
,
AuditWay
=
item
.
FlowAduitList
[
0
].
AuditWay
,
AuditType
=
0
,
AuditType
=
item
.
FlowAduitList
[
0
].
AuditType
,
OriginalAuditId
=
0
,
RoleOrInitiator
=
0
,
ToAuditId
=
AuditedId
.
TrimEnd
(
','
),
Sort
=
item
.
SortNum
,
SpecialNode
=
item
.
FlowAduitList
[
0
].
IsSpecNode
,
Stauts
=
1
,
Stauts
=
Common
.
Enum
.
User
.
WFRrocessStatus
.
NotAudit
,
WorkFlowId
=
Common
.
Config
.
BackClassFlowId
,
};
var
backLevanceId
=
student_BackRelevanceRepository
.
Insert
(
backLevance
);
backLevance
.
Id
=
backLevanceId
;
flag
=
backLevanceId
>
0
;
if
(
index
==
0
)
{
foreach
(
var
subItem
in
item
.
FlowAduitList
)
{
var
recordModel
=
new
RB_Student_BackRecord_ViewModel
()
{
ConditionId
=
backClassModel
.
BackId
,
AuditStatus
=
1
,
ConditionId
=
backClassModel
.
BackId
,
AuditStatus
=
Common
.
Enum
.
User
.
WFRrocessStatus
.
NotAudit
,
AuditId
=
subItem
.
UserId
,
AuditEmId
=
subItem
.
UserId
,
CreateBy
=
userinfo
.
Id
,
...
...
@@ -225,6 +230,8 @@ namespace Edu.Module.Course
}
}
}
index
++;
}
if
(
flag
)
{
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
...
...
Edu.Module.Course/StudentBillModule.cs
View file @
094cf17d
using
Edu.Common.Enum.Course
;
using
Edu.Common.Enum.User
;
using
Edu.Common.Plugin
;
using
Edu.Model.CacheModel
;
using
Edu.Model.ViewModel.Course
;
using
Edu.Repository.Course
;
using
Edu.Repository.Flow
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
VT.FW.DB
;
namespace
Edu.Module.Course
{
...
...
@@ -28,6 +34,11 @@ namespace Edu.Module.Course
/// </summary>
private
readonly
RB_Student_BackRecordRepository
student_BackRecordRepository
=
new
RB_Student_BackRecordRepository
();
/// <summary>
/// 旅客表仓储层对象
/// </summary>
private
readonly
RB_Order_GuestRepository
order_GuestRepository
=
new
RB_Order_GuestRepository
();
/// <summary>
/// 流程仓储层对象
/// </summary>
...
...
@@ -54,9 +65,556 @@ namespace Edu.Module.Course
return
list
;
}
public
void
GetStudent
()
/// <summary>
/// 退课单据审核
/// </summary>
/// <param name="BackId">退课单据号</param>
/// <param name="AuditStatus">审核状态(1-待审核,2-审核通过,3-驳回)</param>
/// <param name="Description">审核备注</param>
/// <param name="user">登录用户信息</param>
/// <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
,
decimal
BackMoney
=
0
)
{
message
=
""
;
bool
flag
=
false
;
//获取单据实体类
var
backModel
=
student_BackClassRepository
.
GetEntity
(
BackId
);
if
(
backModel
==
null
)
{
message
=
"单据不存在,请核实!"
;
return
flag
;
}
//获取审核记录
var
aurList
=
student_BackRecordRepository
.
GetStudentBackRecordListRepository
(
new
RB_Student_BackRecord_ViewModel
()
{
ConditionId
=
backModel
.
BackId
,
});
//审核关联列表
var
arList
=
student_BackRelevanceRepository
.
GetStudentBackRelevanceListRepository
(
new
RB_Student_BackRelevance_ViewModel
()
{
ConditionId
=
backModel
.
BackId
});
#
region
更新审核记录表
Dictionary
<
string
,
object
>
recordFileds
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Student_BackRecord_ViewModel
.
AuditStatus
),
AuditStatus
},
{
nameof
(
RB_Student_BackRecord_ViewModel
.
Description
),
Description
},
{
nameof
(
RB_Student_BackRecord_ViewModel
.
UpdateBy
),
user
.
Id
},
{
nameof
(
RB_Student_BackRecord_ViewModel
.
UpdateTime
),
DateTime
.
Now
},
};
#
endregion
//驳回处理
if
(
AuditStatus
==
3
)
{
#
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
));
#
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
));
#
endregion
}
//审核通过
else
{
//找出当前审核
int
Notcount
=
arList
.
Where
(
x
=>
x
.
Stauts
==
WFRrocessStatus
.
AuditNotThrough
).
Count
();
if
(
Notcount
>
0
)
{
message
=
"该退课申请单已被拒绝"
;
return
false
;
}
var
ToAuditFlow
=
arList
.
Where
(
x
=>
x
.
Stauts
==
WFRrocessStatus
.
NotAudit
).
OrderBy
(
x
=>
x
.
Sort
).
ToList
();
if
(
ToAuditFlow
.
Count
<=
0
)
{
message
=
"该申请单审核已经完结"
;
return
false
;
}
//审核关联表字段
var
relevanceFileds
=
new
Dictionary
<
string
,
object
>();
///目前审核为最后一步
if
(
ToAuditFlow
.
Count
==
1
)
{
var
model
=
ToAuditFlow
[
0
];
var
RecordList
=
aurList
.
Where
(
x
=>
x
.
AuditId
==
model
.
Id
).
ToList
();
if
(
model
.
AuditWay
==
WFTAuditWayEnum
.
Countersign
)
{
//会签 所有人必须审核完该流程才算完成
var
amodel
=
RecordList
.
Where
(
x
=>
x
.
AuditStatus
==
WFRrocessStatus
.
NotAudit
&&
x
.
AuditEmId
==
user
.
Id
).
FirstOrDefault
();
if
(
amodel
==
null
)
{
message
=
"尚未匹配到审核相关信息,请联系管理员!"
;
return
false
;
}
#
region
更新审核记录表状态
flag
=
student_BackRecordRepository
.
Update
(
recordFileds
,
new
WhereHelper
(
nameof
(
RB_Student_BackRecord_ViewModel
.
Id
),
amodel
.
Id
));
#
endregion
int
AuditCount
=
RecordList
.
Where
(
x
=>
x
.
AuditStatus
==
WFRrocessStatus
.
NotAudit
&&
x
.
AuditEmId
!=
user
.
Id
).
Count
();
if
(
AuditCount
<=
0
)
//表示最后一个人就是子集审核 申请单 通过
{
//同时 修改 审核记录状态 审核流程
model
.
Stauts
=
WFRrocessStatus
.
AuditThrough
;
if
(!
string
.
IsNullOrWhiteSpace
(
model
.
AuditedId
))
{
model
.
AuditedId
+=
","
+
user
.
Id
;
}
else
{
model
.
AuditedId
=
user
.
Id
.
ToString
();
}
#
region
更新审核关联表状态
relevanceFileds
=
new
Dictionary
<
string
,
object
>();
relevanceFileds
.
Add
(
nameof
(
RB_Student_BackRelevance_ViewModel
.
Stauts
),
model
.
Stauts
);
relevanceFileds
.
Add
(
nameof
(
RB_Student_BackRelevance_ViewModel
.
AuditedId
),
model
.
AuditedId
);
flag
=
student_BackRelevanceRepository
.
Update
(
relevanceFileds
,
new
WhereHelper
(
nameof
(
RB_Student_BackRelevance_ViewModel
.
Id
),
model
.
Id
));
#
endregion
//更新主表状态
Dictionary
<
string
,
object
>
backFileds
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Student_BackClass_ViewModel
.
AuditStatus
),
(
int
)
BackClassAuditStatusEnum
.
Pass
}
};
flag
=
student_BackClassRepository
.
Update
(
backFileds
,
new
WhereHelper
(
nameof
(
RB_Student_BackClass_ViewModel
.
BackId
),
backModel
.
BackId
));
}
else
{
//同时 修改 审核记录状态 审核流程
model
.
Stauts
=
WFRrocessStatus
.
AuditThrough
;
if
(!
string
.
IsNullOrWhiteSpace
(
model
.
AuditedId
))
{
model
.
AuditedId
+=
","
+
user
.
Id
;
}
else
{
model
.
AuditedId
=
user
.
Id
.
ToString
();
}
#
region
更新审核关联表状态
relevanceFileds
=
new
Dictionary
<
string
,
object
>();
relevanceFileds
.
Add
(
nameof
(
RB_Student_BackRelevance_ViewModel
.
AuditedId
),
model
.
AuditedId
);
flag
=
student_BackRelevanceRepository
.
Update
(
relevanceFileds
,
new
WhereHelper
(
nameof
(
RB_Student_BackRelevance_ViewModel
.
Id
),
model
.
Id
));
#
endregion
}
}
else
if
(
model
.
AuditWay
==
WFTAuditWayEnum
.
OrSign
)
{
var
amodel
=
RecordList
.
Where
(
x
=>
x
.
AuditStatus
==
WFRrocessStatus
.
NotAudit
&&
x
.
AuditEmId
==
user
.
Id
).
FirstOrDefault
();
if
(
amodel
==
null
)
{
message
=
"尚未匹配到审核相关信息,请联系管理员!"
;
return
false
;
}
//同时 修改 审核记录状态 审核流程
model
.
Stauts
=
WFRrocessStatus
.
AuditThrough
;
if
(!
string
.
IsNullOrWhiteSpace
(
model
.
AuditedId
))
{
model
.
AuditedId
+=
","
+
user
.
Id
;
}
else
{
model
.
AuditedId
=
user
.
Id
.
ToString
();
}
#
region
更新审核记录表状态
flag
=
student_BackRecordRepository
.
Update
(
recordFileds
,
new
WhereHelper
(
nameof
(
RB_Student_BackRecord_ViewModel
.
Id
),
amodel
.
Id
));
#
endregion
#
region
更新审核关联表状态
relevanceFileds
=
new
Dictionary
<
string
,
object
>();
relevanceFileds
.
Add
(
nameof
(
RB_Student_BackRelevance_ViewModel
.
Stauts
),
model
.
Stauts
);
relevanceFileds
.
Add
(
nameof
(
RB_Student_BackRelevance_ViewModel
.
AuditedId
),
model
.
AuditedId
);
flag
=
student_BackRelevanceRepository
.
Update
(
relevanceFileds
,
new
WhereHelper
(
nameof
(
RB_Student_BackRelevance_ViewModel
.
Id
),
model
.
Id
));
#
endregion
var
list
=
RecordList
.
Where
(
x
=>
x
.
AuditStatus
==
WFRrocessStatus
.
NotAudit
&&
x
.
AuditEmId
!=
user
.
Id
).
ToList
();
int
AuditCount
=
list
.
Count
();
if
(
AuditCount
>
0
)
//表示最后一个人就是子集审核 申请单 通过
{
foreach
(
var
item
in
list
)
{
recordFileds
=
new
Dictionary
<
string
,
object
>
{
{
nameof
(
RB_Student_BackRecord_ViewModel
.
AuditStatus
),
WFRrocessStatus
.
OtherHaveAudit
},
{
nameof
(
RB_Student_BackRecord_ViewModel
.
Description
),
Description
},
{
nameof
(
RB_Student_BackRecord_ViewModel
.
UpdateBy
),
user
.
Id
},
{
nameof
(
RB_Student_BackRecord_ViewModel
.
UpdateTime
),
DateTime
.
Now
}
};
flag
=
student_BackRecordRepository
.
Update
(
recordFileds
,
new
WhereHelper
(
nameof
(
RB_Student_BackRecord_ViewModel
.
Id
),
item
.
Id
));
}
}
Dictionary
<
string
,
object
>
backFileds
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Student_BackClass_ViewModel
.
AuditStatus
),
(
int
)
BackClassAuditStatusEnum
.
Pass
}
};
flag
=
student_BackClassRepository
.
Update
(
backFileds
,
new
WhereHelper
(
nameof
(
RB_Student_BackClass_ViewModel
.
BackId
),
backModel
.
BackId
));
}
else
{
var
amodel
=
RecordList
.
Where
(
x
=>
x
.
AuditStatus
==
WFRrocessStatus
.
NotAudit
&&
x
.
AuditEmId
==
user
.
Id
).
FirstOrDefault
();
if
(
amodel
==
null
)
{
message
=
"尚未匹配到审核相关信息,请联系管理员!"
;
return
false
;
}
var
list
=
RecordList
.
Where
(
x
=>
x
.
AuditStatus
==
WFRrocessStatus
.
NotAudit
&&
x
.
AuditEmId
!=
user
.
Id
).
ToList
();
int
AuditCount
=
list
.
Count
();
if
(
AuditCount
>
0
)
{
message
=
"流程配置出错啦!非会签,或签 都只能有一个审核人!"
;
return
false
;
}
//同时 修改 审核记录状态 审核流程
model
.
Stauts
=
WFRrocessStatus
.
AuditThrough
;
if
(!
string
.
IsNullOrWhiteSpace
(
model
.
AuditedId
))
{
model
.
AuditedId
+=
","
+
user
.
Id
;
}
else
{
model
.
AuditedId
=
user
.
Id
.
ToString
();
}
#
region
更新审核记录表状态
recordFileds
=
new
Dictionary
<
string
,
object
>
{
{
nameof
(
RB_Student_BackRecord_ViewModel
.
AuditStatus
),
WFRrocessStatus
.
AuditThrough
},
{
nameof
(
RB_Student_BackRecord_ViewModel
.
Description
),
Description
}
,
{
nameof
(
RB_Student_BackRecord_ViewModel
.
UpdateBy
),
user
.
Id
}
,
{
nameof
(
RB_Student_BackRecord_ViewModel
.
UpdateTime
),
DateTime
.
Now
}
};
flag
=
student_BackRecordRepository
.
Update
(
recordFileds
,
new
WhereHelper
(
nameof
(
RB_Student_BackRecord_ViewModel
.
Id
),
amodel
.
Id
));
#
endregion
#
region
更新审核关联表状态
relevanceFileds
=
new
Dictionary
<
string
,
object
>
{
{
nameof
(
RB_Student_BackRelevance_ViewModel
.
Stauts
),
model
.
Stauts
},
{
nameof
(
RB_Student_BackRelevance_ViewModel
.
AuditedId
),
model
.
AuditedId
},
};
flag
=
student_BackRelevanceRepository
.
Update
(
relevanceFileds
,
new
WhereHelper
(
nameof
(
RB_Student_BackRelevance_ViewModel
.
Id
),
model
.
Id
));
#
endregion
Dictionary
<
string
,
object
>
backFileds
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Student_BackClass_ViewModel
.
AuditStatus
),
(
int
)
BackClassAuditStatusEnum
.
Pass
}
};
flag
=
student_BackClassRepository
.
Update
(
backFileds
,
new
WhereHelper
(
nameof
(
RB_Student_BackClass_ViewModel
.
BackId
),
backModel
.
BackId
));
}
//更新抄送人状态
//var CopyToPeopleList = copyToPeopleRepository.GetCopyToPeopleList(WorkFlowId, TemplateType);
//foreach (var item in CopyToPeopleList)
//{
// item.Stauts = WFRrocessStatus.AuditThrough;
//}
//CopyAccountList = CopyToPeopleList.Select(x => new EmAccoutIdModel { EmAccount = x.EmLoginMobile, EmployeeId = x.EmployeeId ?? 0 }).Distinct().ToList();
//copyToPeopleRepository.UpdateBatch(CopyToPeopleList, trans);
}
//同时创建下一步审核 复制审核人到审核关联表 创建审核记录表
else
{
var
model
=
ToAuditFlow
[
0
];
var
RecordList
=
aurList
.
Where
(
x
=>
x
.
AuditId
==
model
.
Id
).
ToList
();
if
(
model
.
AuditWay
==
WFTAuditWayEnum
.
Countersign
)
{
//会签 所有人必须审核完该流程才算完成
var
amodel
=
RecordList
.
Where
(
x
=>
x
.
AuditStatus
==
WFRrocessStatus
.
NotAudit
&&
x
.
AuditEmId
==
user
.
Id
).
FirstOrDefault
();
if
(
amodel
==
null
)
{
message
=
"尚未匹配到审核相关信息,请联系管理员!"
;
return
false
;
}
//审核记录状态
#
region
更新审核记录表状态
recordFileds
=
new
Dictionary
<
string
,
object
>
{
{
nameof
(
RB_Student_BackRecord_ViewModel
.
AuditStatus
),
WFRrocessStatus
.
AuditThrough
},
{
nameof
(
RB_Student_BackRecord_ViewModel
.
Description
),
Description
}
,
{
nameof
(
RB_Student_BackRecord_ViewModel
.
UpdateBy
),
user
.
Id
},
{
nameof
(
RB_Student_BackRecord_ViewModel
.
UpdateTime
),
DateTime
.
Now
}
};
flag
=
student_BackRecordRepository
.
Update
(
recordFileds
,
new
WhereHelper
(
nameof
(
RB_Student_BackRecord_ViewModel
.
Id
),
amodel
.
Id
));
#
endregion
int
AuditCount
=
RecordList
.
Where
(
x
=>
x
.
AuditStatus
==
WFRrocessStatus
.
NotAudit
&&
x
.
AuditEmId
!=
user
.
Id
).
Count
();
if
(
AuditCount
<=
0
)
//表示最后一个人就是子集审核 申请单 通过
{
//同时 修改 审核流程
model
.
Stauts
=
WFRrocessStatus
.
AuditThrough
;
if
(!
string
.
IsNullOrWhiteSpace
(
model
.
AuditedId
))
{
model
.
AuditedId
+=
","
+
user
.
Id
;
}
else
{
model
.
AuditedId
=
user
.
Id
.
ToString
();
}
#
region
更新审核关联表状态
relevanceFileds
=
new
Dictionary
<
string
,
object
>
{
{
nameof
(
RB_Student_BackRelevance_ViewModel
.
Stauts
),
model
.
Stauts
},
{
nameof
(
RB_Student_BackRelevance_ViewModel
.
AuditedId
),
model
.
AuditedId
},
};
flag
=
student_BackRelevanceRepository
.
Update
(
relevanceFileds
,
new
WhereHelper
(
nameof
(
RB_Student_BackRelevance_ViewModel
.
Id
),
model
.
Id
));
#
endregion
//赋值下一步到审核记录中 并更新这一步的待审核人
var
modelNext
=
ToAuditFlow
[
1
];
flag
=
InsertAuditRelevanceNext
(
backModel
.
CreateBy
,
backModel
.
BackId
,
backModel
.
FlowId
,
modelNext
);
if
(
flag
==
false
)
{
message
=
"审核流程不完整无法审核,请联系相关负责人!"
;
return
false
;
}
}
else
{
//同时 修改 审核流程
if
(!
string
.
IsNullOrWhiteSpace
(
model
.
AuditedId
))
{
model
.
AuditedId
+=
","
+
user
.
Id
;
}
else
{
model
.
AuditedId
=
user
.
Id
.
ToString
();
}
#
region
更新审核关联表状态
relevanceFileds
=
new
Dictionary
<
string
,
object
>
{
{
nameof
(
RB_Student_BackRelevance_ViewModel
.
AuditedId
),
model
.
AuditedId
},
};
flag
=
student_BackRelevanceRepository
.
Update
(
relevanceFileds
,
new
WhereHelper
(
nameof
(
RB_Student_BackRelevance_ViewModel
.
Id
),
model
.
Id
));
#
endregion
}
}
else
if
(
model
.
AuditWay
==
WFTAuditWayEnum
.
OrSign
)
{
var
amodel
=
RecordList
.
Where
(
x
=>
x
.
AuditStatus
==
WFRrocessStatus
.
NotAudit
&&
x
.
AuditEmId
==
user
.
Id
).
FirstOrDefault
();
if
(
amodel
==
null
)
{
message
=
"尚未匹配到审核相关信息,请联系管理员!"
;
return
false
;
}
//同时 修改 审核记录状态 审核流程
model
.
Stauts
=
WFRrocessStatus
.
AuditThrough
;
if
(!
string
.
IsNullOrWhiteSpace
(
model
.
AuditedId
))
{
model
.
AuditedId
+=
","
+
user
.
Id
;
}
else
{
model
.
AuditedId
=
user
.
Id
.
ToString
();
}
#
region
更新审核记录表状态
recordFileds
=
new
Dictionary
<
string
,
object
>
{
{
nameof
(
RB_Student_BackRecord_ViewModel
.
AuditStatus
),
WFRrocessStatus
.
AuditThrough
},
{
nameof
(
RB_Student_BackRecord_ViewModel
.
Description
),
Description
},
{
nameof
(
RB_Student_BackRecord_ViewModel
.
UpdateBy
),
user
.
Id
},
{
nameof
(
RB_Student_BackRecord_ViewModel
.
UpdateTime
),
DateTime
.
Now
}
};
flag
=
student_BackRecordRepository
.
Update
(
recordFileds
,
new
WhereHelper
(
nameof
(
RB_Student_BackRecord_ViewModel
.
Id
),
amodel
.
Id
));
#
endregion
#
region
更新审核关联表状态
relevanceFileds
=
new
Dictionary
<
string
,
object
>
{
{
nameof
(
RB_Student_BackRelevance_ViewModel
.
Stauts
),
model
.
Stauts
},
{
nameof
(
RB_Student_BackRelevance_ViewModel
.
AuditedId
),
model
.
AuditedId
},
};
flag
=
student_BackRelevanceRepository
.
Update
(
relevanceFileds
,
new
WhereHelper
(
nameof
(
RB_Student_BackRelevance_ViewModel
.
Id
),
model
.
Id
));
#
endregion
var
list
=
RecordList
.
Where
(
x
=>
x
.
AuditStatus
==
WFRrocessStatus
.
NotAudit
&&
x
.
AuditEmId
!=
empId
).
ToList
();
int
AuditCount
=
list
.
Count
();
if
(
AuditCount
>
0
)
//表示最后一个人就是子集审核 申请单 通过
{
foreach
(
var
item
in
list
)
{
recordFileds
=
new
Dictionary
<
string
,
object
>
{
{
nameof
(
RB_Student_BackRecord_ViewModel
.
AuditStatus
),
WFRrocessStatus
.
OtherHaveAudit
},
{
nameof
(
RB_Student_BackRecord_ViewModel
.
Description
),
Description
},
{
nameof
(
RB_Student_BackRecord_ViewModel
.
UpdateBy
),
user
.
Id
},
{
nameof
(
RB_Student_BackRecord_ViewModel
.
UpdateTime
),
DateTime
.
Now
}
};
flag
=
student_BackRecordRepository
.
Update
(
recordFileds
,
new
WhereHelper
(
nameof
(
RB_Student_BackRecord_ViewModel
.
Id
),
item
.
Id
));
}
}
//赋值下一步到审核记录中 并更新这一步的待审核人
var
modelNext
=
ToAuditFlow
[
1
];
flag
=
InsertAuditRelevanceNext
(
backModel
.
CreateBy
,
backModel
.
BackId
,
backModel
.
FlowId
,
modelNext
);
if
(
flag
==
false
)
{
message
=
"审核流程不完整无法审核,请联系相关负责人!"
;
return
false
;
}
}
else
{
var
amodel
=
RecordList
.
Where
(
x
=>
x
.
AuditStatus
==
WFRrocessStatus
.
NotAudit
&&
x
.
AuditEmId
==
user
.
Id
).
FirstOrDefault
();
if
(
amodel
==
null
)
{
message
=
"尚未匹配到审核相关信息,请联系管理员!"
;
return
false
;
}
var
list
=
RecordList
.
Where
(
x
=>
x
.
AuditStatus
==
WFRrocessStatus
.
NotAudit
&&
x
.
AuditEmId
!=
user
.
Id
).
ToList
();
int
AuditCount
=
list
.
Count
();
if
(
AuditCount
>
0
)
{
message
=
"流程配置出错啦!非会签、或签 都只能有一个审核人!"
;
return
false
;
}
//同时 修改 审核记录状态 审核流程
model
.
Stauts
=
WFRrocessStatus
.
AuditThrough
;
if
(!
string
.
IsNullOrWhiteSpace
(
model
.
AuditedId
))
{
model
.
AuditedId
+=
","
+
user
.
Id
;
}
else
{
model
.
AuditedId
=
user
.
Id
.
ToString
();
}
#
region
更新审核记录表状态
recordFileds
=
new
Dictionary
<
string
,
object
>
{
{
nameof
(
RB_Student_BackRecord_ViewModel
.
AuditStatus
),
WFRrocessStatus
.
AuditThrough
},
{
nameof
(
RB_Student_BackRecord_ViewModel
.
Description
),
Description
}
,
{
nameof
(
RB_Student_BackRecord_ViewModel
.
UpdateBy
),
user
.
Id
}
,
{
nameof
(
RB_Student_BackRecord_ViewModel
.
UpdateTime
),
DateTime
.
Now
}
};
flag
=
student_BackRecordRepository
.
Update
(
recordFileds
,
new
WhereHelper
(
nameof
(
RB_Student_BackRecord_ViewModel
.
Id
),
amodel
.
Id
));
#
endregion
#
region
更新审核关联表状态
relevanceFileds
=
new
Dictionary
<
string
,
object
>
{
{
nameof
(
RB_Student_BackRelevance_ViewModel
.
Stauts
),
model
.
Stauts
},
{
nameof
(
RB_Student_BackRelevance_ViewModel
.
AuditedId
),
model
.
AuditedId
},
};
flag
=
student_BackRelevanceRepository
.
Update
(
relevanceFileds
,
new
WhereHelper
(
nameof
(
RB_Student_BackRelevance_ViewModel
.
Id
),
model
.
Id
));
#
endregion
//赋值下一步到审核记录中 并更新这一步的待审核人
var
modelNext
=
ToAuditFlow
[
1
];
flag
=
InsertAuditRelevanceNext
(
backModel
.
CreateBy
,
backModel
.
BackId
,
backModel
.
FlowId
,
modelNext
);
if
(
flag
==
false
)
{
message
=
"审核流程不完整无法审核,请联系相关负责人!"
;
return
false
;
}
}
}
}
return
flag
;
}
/// <summary>
/// 添加拷贝审核节点
/// </summary>
/// <param name="empId">员工id</param>
/// <param name="wfId"></param>
/// <param name="flowId">工作流id</param>
/// <param name="modelNext">审核关联</param>
private
bool
InsertAuditRelevanceNext
(
int
empId
,
int
sourceId
,
int
flowId
,
RB_Student_BackRelevance_ViewModel
modelNext
)
{
if
(
empId
<=
0
)
{
return
false
;
}
RB_Student_BackRelevance_ViewModel
auditRelevance
=
modelNext
.
RefMapperTo
<
RB_Student_BackRelevance_ViewModel
>();
//部门负责人审核
if
(
auditRelevance
.
AuditType
==
WFTAuditTypeEnum
.
Director
)
{
return
false
;
}
else
if
(
auditRelevance
.
AuditType
==
WFTAuditTypeEnum
.
Role
)
//角色审核
{
//switch(auditRelevance.p)
//var empModel = accountRepository.GetEmployeeInfo(empId);
//var empList = accountRepository.GetEmployeeListRepository(new Employee_ViewModel() { Post_Id = auditRelevance.RoleOrInitiator ?? 0, Group_Id = empModel.Group_Id });
//if (empList.Count > 0)
//{
// List<int> empIds = empList.Select(t => t.Id).ToList();
// AuditAccountList = empList.Select(t => new EmAccoutIdModel() { EmAccount = t.Account, EmployeeId = t.Id }).Distinct().ToList();
// InsertBatcheAuditRecord(empIds, wfId, wFTTemplateTypeEnum, trans, auditRelevance);
//}
//else
//{
// return false;
//}
}
else
if
(
auditRelevance
.
AuditType
==
WFTAuditTypeEnum
.
SpecifiedMember
)
//指定人审核
{
//List<Rb_Workflow_Audituser_Extend> audituserList = auditUserRepository.GetConditionAuditUser(auditRelevance.OriginalAuditId.Value);
//if (audituserList.Count > 0)
//{
// AuditAccountList = audituserList.Select(x => new EmAccoutIdModel() { EmAccount = x.EmLoginMobile, EmployeeId = x.EmployeeId ?? 0 }).Distinct().ToList();
// List<int> empIds = audituserList.Select(t => t.EmployeeId.Value).ToList();
// InsertBatcheAuditRecord(empIds, wfId, wFTTemplateTypeEnum, trans, auditRelevance);
//}
//else
//{
// return false;
//}
}
return
true
;
}
/// <summary>
/// 批量添加审核人
/// </summary>
/// <param name="empIds">审核人id集合</param>
/// <param name="wfId">工作流id</param>
/// <param name="wFTTemplateTypeEnum">工作流模板</param>
/// <param name="trans">事务</param>
/// <param name="auditRelevance">审核节点</param>
private
void
InsertBatcheAuditRecord
(
List
<
int
>
empIds
,
int
wfId
,
RB_Student_BackRelevance_ViewModel
auditRelevance
)
{
List
<
RB_Student_BackRecord_ViewModel
>
auditrecordList
=
new
List
<
RB_Student_BackRecord_ViewModel
>();
foreach
(
var
item
in
empIds
)
{
RB_Student_BackRecord_ViewModel
auditrecord
=
new
RB_Student_BackRecord_ViewModel
{
AuditEmId
=
item
,
AuditId
=
auditRelevance
.
Id
,
AuditStatus
=
WFRrocessStatus
.
NotAudit
,
CreateBy
=
item
,
CreateTime
=
DateTime
.
Now
,
UpdateBy
=
item
,
UpdateTime
=
DateTime
.
Now
,
ConditionId
=
wfId
,
Description
=
""
,
};
auditrecordList
.
Add
(
auditrecord
);
}
student_BackRecordRepository
.
InsertBatch
(
auditrecordList
);
auditRelevance
.
ToAuditId
=
string
.
Join
(
","
,
empIds
);
student_BackRelevanceRepository
.
Update
(
auditRelevance
);
}
}
}
Edu.Repository/Course/RB_Student_BackClassRepository.cs
View file @
094cf17d
...
...
@@ -62,7 +62,6 @@ WHERE 1=1 ");
}
if
(
query
.
Conditon
!=
null
&&
query
.
Conditon
>
0
)
{
switch
(
query
.
Conditon
)
{
//待我审批
...
...
@@ -82,7 +81,6 @@ WHERE 1=1 ");
builder
.
AppendFormat
(
" AND FIND_IN_SET({0},A.RecipientIds) "
,
query
.
CreateBy
);
break
;
}
}
}
builder
.
AppendFormat
(
" ORDER BY A.CreateTime DESC "
);
...
...
Edu.Repository/Course/RB_Student_BackRecordRepository.cs
View file @
094cf17d
...
...
@@ -27,7 +27,14 @@ WHERE 1=1
"
);
if
(
query
!=
null
)
{
if
(
query
.
ConditionId
>
0
)
{
builder
.
AppendFormat
(
" AND {0}={1} "
,
nameof
(
RB_Student_BackRecord_ViewModel
.
ConditionId
),
query
.
ConditionId
);
}
if
(
query
.
AuditStatus
>
0
)
{
builder
.
AppendFormat
(
" AND {0}={1} "
,
nameof
(
RB_Student_BackRecord_ViewModel
.
AuditStatus
),
query
.
AuditStatus
);
}
}
return
Get
<
RB_Student_BackRecord_ViewModel
>(
builder
.
ToString
()).
ToList
();
}
...
...
Edu.Repository/Course/RB_Student_BackRelevanceRepository.cs
View file @
094cf17d
...
...
@@ -20,7 +20,19 @@ namespace Edu.Repository.Course
public
List
<
RB_Student_BackRelevance_ViewModel
>
GetStudentBackRelevanceListRepository
(
RB_Student_BackRelevance_ViewModel
query
)
{
StringBuilder
builder
=
new
StringBuilder
();
builder
.
AppendFormat
(
@"
SELECT *
FROM RB_Student_BackRelevance
WHERE 1=1
"
);
if
(
query
!=
null
)
{
if
(
query
.
ConditionId
>
0
)
{
builder
.
AppendFormat
(
" AND {0}={1} "
,
nameof
(
RB_Student_BackRelevance_ViewModel
.
ConditionId
),
query
.
ConditionId
);
}
}
builder
.
AppendFormat
(
" ORDER BY Sort ASC "
);
return
Get
<
RB_Student_BackRelevance_ViewModel
>(
builder
.
ToString
()).
ToList
();
}
}
...
...
Edu.WebApi/Controllers/Course/StuController.cs
View file @
094cf17d
...
...
@@ -27,7 +27,7 @@ namespace Edu.WebApi.Controllers.Course
/// <summary>
/// 学员单据处理类对象
/// </summary>
private
readonly
StudentBillModule
studentBillModule
=
new
StudentBillModule
();
private
readonly
StudentBillModule
studentBillModule
=
AOP
.
AOPHelper
.
CreateAOPObject
<
StudentBillModule
>
();
/// <summary>
/// 获取学员退课单据分页列表
...
...
@@ -97,12 +97,18 @@ namespace Edu.WebApi.Controllers.Course
/// 获取退款单据审核信息
/// </summary>
/// <returns></returns>
public
ApiResult
G
etBackBillAduit
()
public
ApiResult
S
etBackBillAduit
()
{
//退课单据号
var
BackId
=
base
.
ParmJObj
.
GetInt
(
"BackId"
);
var
data
=
new
{
};
return
ApiResult
.
Success
(
data
:
data
);
//审核状态
var
AuditStatus
=
base
.
ParmJObj
.
GetInt
(
"AuditStatus"
);
//审核备注
string
Description
=
base
.
ParmJObj
.
GetStringValue
(
"Description"
);
//退课金额
decimal
BackMoney
=
base
.
ParmJObj
.
GetDecimal
(
"BackMoney"
);
var
flag
=
studentBillModule
.
SetBackBillAduitModule
(
BackId
,
AuditStatus
,
Description
,
base
.
UserInfo
,
out
string
message
,
BackMoney
:
BackMoney
);
return
flag
?
ApiResult
.
Success
(
message
:
message
)
:
ApiResult
.
Failed
(
message
:
message
);
}
}
}
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