提交候tgit
This commit is contained in:
parent
e708e2e5fc
commit
6fb5648523
@ -307,7 +307,7 @@ public class TestController {
|
||||
}
|
||||
|
||||
|
||||
// 重置:http://localhost:8080/lz_management/test/approval?resultRecordId=3682&status=9&menuName=cccc&flowRecordId=33919&resetFlag=0
|
||||
// 重置:http://localhost:8080/lz_management/test/approval?resultRecordId=3702&status=9&menuName=cccc&flowRecordId=33987&resetFlag=0
|
||||
@RequestMapping("/test/approval")
|
||||
public R approval(ApprovalDto approvalDto) {
|
||||
try {
|
||||
|
||||
@ -942,16 +942,19 @@ public class ResultRecordServiceImpl extends ServiceImpl<ResultRecordMapper, Res
|
||||
private R resetNode(ApprovalDto approvalDto) {
|
||||
FlowRecord f = flowRecordService.selectFlowRecordById(approvalDto.getFlowRecordId());
|
||||
List<FlowRecord> flowRecords = flowRecordService.selectFlowRecordByRecordIdGeFlowIndex(f.getRecordId(),f.getFlowIndex());
|
||||
boolean flag = false ;
|
||||
for(FlowRecord flowRecord:flowRecords){
|
||||
// 如果结果录入己经走了
|
||||
if (new Integer(2).equals(flowRecord.getFlowProcess()) && (flowRecord.getStatus() == 1 || flowRecord.getStatus() == 4) ) {
|
||||
flowRecord.setStatus(4); //表示流程己经被重置
|
||||
flag = true;
|
||||
}else{
|
||||
flowRecord.setStatus(0); //表示流程己经被重置
|
||||
}
|
||||
flowRecordService.updateFlowRecordById(flowRecord);
|
||||
}
|
||||
FlowRecord preFlowRecord = flowRecordService.selectPreFlowRecordByRecordIdMinIdStatusList(f.getRecordId(), f.getFlowIndex() - 1, Arrays.asList(1, 2));
|
||||
|
||||
FlowRecord preFlowRecord = flowRecordService.selectPreFlowRecordByRecordIdMinIdStatusList(f.getRecordId(), f.getFlowIndex(), Arrays.asList(1, 2,4));
|
||||
List<FlowRecord> runing = new ArrayList<>();
|
||||
if (preFlowRecord != null) {
|
||||
runing = flowRecordService.selectFlowRecordByRecordIdFlowIndex(f.getRecordId(), preFlowRecord.getFlowIndex());
|
||||
@ -962,6 +965,17 @@ public class ResultRecordServiceImpl extends ServiceImpl<ResultRecordMapper, Res
|
||||
r.setStatus(2);
|
||||
flowRecordService.updateFlowRecordById(r);
|
||||
}
|
||||
|
||||
if(flag) { //如果录入己经走了,设置新的数据,结果录入己走
|
||||
List<FlowRecord> newflowRecords = flowRecordService.selectFlowRecordByRecordId(f.getRecordId());
|
||||
for(int i = 0 ;i < newflowRecords.size() ; i ++){
|
||||
FlowRecord newFlowRecord = newflowRecords.get(i) ;
|
||||
if (new Integer(2).equals(newFlowRecord.getFlowProcess()) ) {
|
||||
newFlowRecord.setStatus(4);
|
||||
flowRecordService.updateFlowRecordById(newFlowRecord);
|
||||
}
|
||||
}
|
||||
}
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
@ -1444,6 +1458,9 @@ public class ResultRecordServiceImpl extends ServiceImpl<ResultRecordMapper, Res
|
||||
int flowIndex = 0;
|
||||
List<ResetDataResp> resetDataResps = new ArrayList<>();
|
||||
for (FlowRecord flowRecord : flowRecords) {
|
||||
if(new Integer(2).equals(flowRecord.getFlowProcess())){ //过虑掉flowProcess
|
||||
continue;
|
||||
}
|
||||
if (flowRecord.getFlowIndex().equals(flowIndex - 1)) { //表示有重复数据
|
||||
ResetDataResp resetDataResp = resetDataResps.get(flowIndex - 1);
|
||||
resetDataResp.getStaffNames().add(flowRecord.getApprovalStaffName());
|
||||
|
||||
@ -338,7 +338,7 @@
|
||||
|
||||
<select id="selectPreFlowRecordByRecordIdMinIdStatusList" resultType="com.lz.modules.flow.entity.FlowRecord">
|
||||
select * from lz_flow_record where is_delete = 0 and flow_index <![CDATA[<=]]> #{flowIndex}
|
||||
and record_id = #{recordId}
|
||||
and record_id = #{recordId} and flow_process !=2
|
||||
and status in
|
||||
<foreach item="item" collection="statusList" open="(" separator="," close=")">
|
||||
#{item}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user