Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
8
8timerapiv200
Overview
Overview
Details
Activity
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
8timerv2
8timerapiv200
Commits
07b22e04
Commit
07b22e04
authored
Oct 26, 2022
by
翁国栋
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加审批人会影响到抄送人bug
parent
f442114b
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
36 additions
and
15 deletions
+36
-15
src/main/java/cn/timer/api/controller/spmk/AdminSpmkController.java
+0
-2
src/main/java/cn/timer/api/controller/spmk/SpmkController.java
+15
-6
src/main/java/cn/timer/api/dao/spmk/SpmkApproveExecuteRecordMapper.java
+2
-1
src/main/java/cn/timer/api/dto/spmk/SpmkApproveDetailDto.java
+2
-0
src/main/java/cn/timer/api/utils/router/RouterUtils.java
+6
-6
src/main/resources/mapping/spmk/SpmkApproveExecuteRecordMapper.xml
+11
-0
No files found.
src/main/java/cn/timer/api/controller/spmk/AdminSpmkController.java
View file @
07b22e04
...
@@ -77,8 +77,6 @@ public class AdminSpmkController {
...
@@ -77,8 +77,6 @@ public class AdminSpmkController {
@ApiOperationSupport
(
order
=
20
)
@ApiOperationSupport
(
order
=
20
)
@Log
(
title
=
"审批-审批流程"
,
businessType
=
BusinessType
.
UPDATE
)
@Log
(
title
=
"审批-审批流程"
,
businessType
=
BusinessType
.
UPDATE
)
public
Result
<
Object
>
approving
(
@CurrentUser
UserBean
userBean
,
@Validated
@RequestBody
AdminApprovingDto
approvingDto
)
throws
Exception
{
public
Result
<
Object
>
approving
(
@CurrentUser
UserBean
userBean
,
@Validated
@RequestBody
AdminApprovingDto
approvingDto
)
throws
Exception
{
/*判断是否有权限转派*/
/*判断是否有权限转派*/
//if(approvingDto.getSts()==4){
//if(approvingDto.getSts()==4){
QyzxEmpEntAsso
ent
=
QyzxEmpEntAsso
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
QyzxEmpEntAsso
>().
lambda
().
eq
(
QyzxEmpEntAsso:
:
getOrgCode
,
userBean
.
getOrgCode
()).
eq
(
QyzxEmpEntAsso:
:
getEmpNum
,
userBean
.
getEmpNum
()));
QyzxEmpEntAsso
ent
=
QyzxEmpEntAsso
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
QyzxEmpEntAsso
>().
lambda
().
eq
(
QyzxEmpEntAsso:
:
getOrgCode
,
userBean
.
getOrgCode
()).
eq
(
QyzxEmpEntAsso:
:
getEmpNum
,
userBean
.
getEmpNum
()));
...
...
src/main/java/cn/timer/api/controller/spmk/SpmkController.java
View file @
07b22e04
...
@@ -1220,27 +1220,35 @@ public class SpmkController {
...
@@ -1220,27 +1220,35 @@ public class SpmkController {
SpmkApproveDetailSummary
spmkApproveDetailSummary
=
SpmkApproveDetailSummary
.
builder
().
id
(
spmkApproveDetailDto
.
getId
()).
build
().
selectById
();
SpmkApproveDetailSummary
spmkApproveDetailSummary
=
SpmkApproveDetailSummary
.
builder
().
id
(
spmkApproveDetailDto
.
getId
()).
build
().
selectById
();
List
<
FlowChildren
>
listFlowChildren
=
spmkApproveDetailDto
.
getFlowChildren
();
List
<
FlowChildren
>
listFlowChildren
=
spmkApproveDetailDto
.
getFlowChildren
();
//只有添加审批人才会有值
//只有添加审批人才会有值
if
(
spmkApproveDetailDto
.
getIndex
()
!=
null
)
{
if
(
spmkApproveDetailDto
.
getIndex
()
!=
null
&&
spmkApproveDetailDto
.
getIndex
()
!=
null
)
{
//如果当前索引下的都要变更为0未执行
//如果当前索引下的都要变更为0未执行
int
currentIndex
=
spmkApproveDetailDto
.
getIndex
();
int
currentIndex
=
spmkApproveDetailDto
.
getIndex
();
for
(
int
i
=
currentIndex
+
1
;
i
<
listFlowChildren
.
size
();
i
++)
{
for
(
int
i
=
currentIndex
+
1
;
i
<
listFlowChildren
.
size
();
i
++)
{
if
(
i
==
currentIndex
+
1
)
{
if
(
i
==
currentIndex
+
1
)
{
if
(!
listFlowChildren
.
get
(
currentIndex
).
getExecute
().
equals
(
"1"
))
{
if
(!
listFlowChildren
.
get
(
currentIndex
).
getExecute
().
equals
(
"1"
))
{
//如果当前索引下的都要变更为0未执行
FlowChildren
flowChildren
=
listFlowChildren
.
get
(
spmkApproveDetailDto
.
getIndex
());
User
user
=
flowChildren
.
getRelation
().
get
(
0
).
getUsers
().
get
(
spmkApproveDetailDto
.
getUserIndex
());
SpmkApproveExecuteRecord
spmkApproveExecuteRecord
=
spmkApproveExecuteRecordMapper
.
selectExecuteRecordById
(
Integer
.
parseInt
(
user
.
getId
()),
spmkApproveDetailSummary
.
getApproveSummaryId
());
// //删除审批过的人记录
if
(
spmkApproveExecuteRecord
!=
null
)
{
spmkApproveExecuteRecordMapper
.
delExecutor
(
spmkApproveExecuteRecord
.
getId
(),
spmkApproveDetailSummary
.
getApproveSummaryId
());
}
listFlowChildren
.
get
(
i
).
setExecute
(
"1"
);
listFlowChildren
.
get
(
i
).
setExecute
(
"1"
);
listFlowChildren
.
get
(
i
).
getRelation
().
forEach
(
v
->
{
listFlowChildren
.
get
(
i
).
getRelation
().
forEach
(
v
->
{
v
.
getUsers
().
forEach
(
u
->
{
v
.
getUsers
().
forEach
(
u
->
{
u
.
setExecute
(
"1"
);
u
.
setExecute
(
"1"
);
//添加审批记录
//添加审批记录
SpmkApproveExecuteRecord
spmkApproveExecuteRecord
=
SpmkApproveExecuteRecord
SpmkApproveExecuteRecord
spmkApproveExecuteRecord
1
=
SpmkApproveExecuteRecord
.
builder
()
.
builder
()
.
approveSummaryId
(
spmkApproveDetailSummary
.
getApproveSummaryId
())
.
approveSummaryId
(
spmkApproveDetailSummary
.
getApproveSummaryId
())
.
name
(
SpmkEnumInterface
.
ParticipatorType
.
APPROVER
.
getName
())
.
name
(
SpmkEnumInterface
.
ParticipatorType
.
APPROVER
.
getName
())
.
type
(
SpmkEnumInterface
.
ParticipatorType
.
APPROVER
.
ordinal
())
.
type
(
SpmkEnumInterface
.
ParticipatorType
.
APPROVER
.
ordinal
())
.
sts
(
SpmkEnumInterface
.
ExecuteRecordSts
.
IN_EXECUTION
.
ordinal
())
.
sts
(
SpmkEnumInterface
.
ExecuteRecordSts
.
IN_EXECUTION
.
ordinal
())
.
build
();
.
build
();
spmkApproveExecuteRecord
.
insert
();
spmkApproveExecuteRecord
1
.
insert
();
SpmkExecutor
.
builder
()
SpmkExecutor
.
builder
()
.
approveExecuteRecordId
(
spmkApproveExecuteRecord
.
getId
())
.
approveExecuteRecordId
(
spmkApproveExecuteRecord
1
.
getId
())
.
empNum
(
Integer
.
parseInt
(
u
.
getId
()))
.
empNum
(
Integer
.
parseInt
(
u
.
getId
()))
.
operatorHeaderUrl
(
u
.
getHeadUrl
())
.
operatorHeaderUrl
(
u
.
getHeadUrl
())
.
executorName
(
u
.
getName
())
.
executorName
(
u
.
getName
())
...
@@ -1259,6 +1267,7 @@ public class SpmkController {
...
@@ -1259,6 +1267,7 @@ public class SpmkController {
});
});
}
}
SpmkApproveSummary
.
builder
().
sts
(
0
).
id
(
spmkApproveDetailSummary
.
getApproveSummaryId
()).
build
().
updateById
();
SpmkApproveSummary
.
builder
().
sts
(
0
).
id
(
spmkApproveDetailSummary
.
getApproveSummaryId
()).
build
().
updateById
();
}
}
// 更新 flowChildren
// 更新 flowChildren
...
...
src/main/java/cn/timer/api/dao/spmk/SpmkApproveExecuteRecordMapper.java
View file @
07b22e04
...
@@ -18,5 +18,6 @@ import cn.timer.api.bean.spmk.SpmkApproveExecuteRecord;
...
@@ -18,5 +18,6 @@ import cn.timer.api.bean.spmk.SpmkApproveExecuteRecord;
public
interface
SpmkApproveExecuteRecordMapper
extends
BaseMapper
<
SpmkApproveExecuteRecord
>
{
public
interface
SpmkApproveExecuteRecordMapper
extends
BaseMapper
<
SpmkApproveExecuteRecord
>
{
List
<
SpmkApproveExecuteRecord
>
selectListByAsId
(
@Param
(
"id"
)
Integer
id
);
List
<
SpmkApproveExecuteRecord
>
selectListByAsId
(
@Param
(
"id"
)
Integer
id
);
int
delExecutor
(
@Param
(
"id"
)
Integer
id
,
@Param
(
"approveSummaryId"
)
Integer
approveSummaryId
);
SpmkApproveExecuteRecord
selectExecuteRecordById
(
@Param
(
"userId"
)
Integer
userId
,
@Param
(
"approveSummaryId"
)
Integer
approveSummaryId
);
}
}
src/main/java/cn/timer/api/dto/spmk/SpmkApproveDetailDto.java
View file @
07b22e04
...
@@ -63,4 +63,6 @@ public class SpmkApproveDetailDto {
...
@@ -63,4 +63,6 @@ public class SpmkApproveDetailDto {
private
Integer
index
;
//插入审批人的索引
private
Integer
index
;
//插入审批人的索引
private
Integer
userIndex
;
//插入审批人的当前用户索引
}
}
src/main/java/cn/timer/api/utils/router/RouterUtils.java
View file @
07b22e04
...
@@ -983,7 +983,7 @@ public class RouterUtils {
...
@@ -983,7 +983,7 @@ public class RouterUtils {
//判断用户执行状态 0 未执行 1 执行中 2 已执行
//判断用户执行状态 0 未执行 1 执行中 2 已执行
//已执行
//已执行
if
(
EXECUTED
.
equals
(
listUser
.
get
(
i_user
).
getExecute
()))
{
if
(
EXECUTED
.
equals
(
listUser
.
get
(
i_user
).
getExecute
()))
{
return
;
//执行中
//执行中
}
else
if
(
EXECUTING
.
equals
(
listUser
.
get
(
i_user
).
getExecute
()))
{
}
else
if
(
EXECUTING
.
equals
(
listUser
.
get
(
i_user
).
getExecute
()))
{
//判断当前节点审批人id 等于 操作用户id 则更新执行人信息:审批意见、状态(0未执行 1执行中 2同意 3拒接 4转派)
//判断当前节点审批人id 等于 操作用户id 则更新执行人信息:审批意见、状态(0未执行 1执行中 2同意 3拒接 4转派)
...
@@ -998,11 +998,6 @@ public class RouterUtils {
...
@@ -998,11 +998,6 @@ public class RouterUtils {
.
sts
(
sts
)
.
sts
(
sts
)
.
signatureImg
(
signatureImg
)
.
signatureImg
(
signatureImg
)
.
build
().
updateById
();
.
build
().
updateById
();
// if(spmkExecutor.getId()==0){
// spmkExecutor.insert();
// }else{
// spmkExecutor.updateById();
// }
listUser
.
get
(
i_user
).
setExecute
(
EXECUTED
);
listUser
.
get
(
i_user
).
setExecute
(
EXECUTED
);
...
@@ -1256,6 +1251,11 @@ public class RouterUtils {
...
@@ -1256,6 +1251,11 @@ public class RouterUtils {
break
;
break
;
}
}
}
}
//重新新修改审批结果
}
else
if
(
EXECUTED
.
equals
(
listFlowChildren
.
get
(
i
).
getExecute
())){
SpmkExecutor
.
builder
().
id
(
executorId
).
sts
(
sts
).
opinion
(
opinion
).
build
().
updateById
();
SpmkApproveExecuteRecord
.
builder
().
id
(
executeRecordId
).
sts
(
sts
).
build
().
updateById
();
return
;
}
}
}
}
...
...
src/main/resources/mapping/spmk/SpmkApproveExecuteRecordMapper.xml
View file @
07b22e04
...
@@ -166,5 +166,16 @@
...
@@ -166,5 +166,16 @@
</select>
</select>
-->
-->
<select
id=
"selectExecuteRecordById"
resultType=
"cn.timer.api.bean.spmk.SpmkApproveExecuteRecord"
>
SELECT sr.id FROM spmk_approve_execute_record sr
LEFT JOIN spmk_executor se ON se.approve_execute_record_id=sr.id
WHERE sr.approve_summary_id = #{approveSummaryId} and se.emp_num = #{userId}
</select>
<delete
id=
"delExecutor"
>
DELETE FROM spmk_approve_execute_record
WHERE approve_summary_id = #{approveSummaryId} and id
<![CDATA[ > ]]>
#{id}
</delete>
</mapper>
</mapper>
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