提交修改

This commit is contained in:
quyixiao 2020-12-15 16:50:38 +08:00
parent 72f9918bab
commit b25a590462

View File

@ -968,7 +968,6 @@ public class ResultRecordServiceImpl extends ServiceImpl<ResultRecordMapper, Res
flowRecordService.updateFlowRecordById(r); flowRecordService.updateFlowRecordById(r);
} }
resultRecordService.updateResultRecordById(resultRecord); resultRecordService.updateResultRecordById(resultRecord);
if(flag) { //如果录入己经走了设置新的数据结果录入己走 if(flag) { //如果录入己经走了设置新的数据结果录入己走
List<FlowRecord> newflowRecords = flowRecordService.selectFlowRecordByRecordId(f.getRecordId()); List<FlowRecord> newflowRecords = flowRecordService.selectFlowRecordByRecordId(f.getRecordId());
for(int i = 0 ;i < newflowRecords.size() ; i ++){ for(int i = 0 ;i < newflowRecords.size() ; i ++){
@ -985,12 +984,12 @@ public class ResultRecordServiceImpl extends ServiceImpl<ResultRecordMapper, Res
private R resetAll(ApprovalDto approvalDto) { private R resetAll(ApprovalDto approvalDto) {
FlowRecord flowRecord = flowRecordService.selectFlowRecordById(approvalDto.getFlowRecordId()); FlowRecord flowRecord = flowRecordService.selectFlowRecordById(approvalDto.getFlowRecordId());
Long flowRecordId = approvalDto.getResultRecordId(); Long resultRecordId = approvalDto.getResultRecordId();
if(flowRecord != null ){ if(flowRecord != null ){
flowRecordId = flowRecord.getRecordId(); resultRecordId = flowRecord.getRecordId();
} }
List<FlowRecord> flowRecords = flowRecordService.selectFlowRecordByRecordId(flowRecordId); List<FlowRecord> flowRecords = flowRecordService.selectFlowRecordByRecordId(resultRecordId);
List<Long> flowRecordIds =new ArrayList<>(); List<Long> flowRecordIds =new ArrayList<>();
boolean flag = false ; boolean flag = false ;
for(FlowRecord f: flowRecords){ for(FlowRecord f: flowRecords){
@ -1000,9 +999,9 @@ public class ResultRecordServiceImpl extends ServiceImpl<ResultRecordMapper, Res
flag = true; flag = true;
} }
} }
flowRecordService.deleteFlowRecordByRecordId(flowRecordId); flowRecordService.deleteFlowRecordByRecordId(resultRecordId);
initFlowRecord(flowRecordId); initFlowRecord(resultRecordId);
List<FlowRecord> newflowRecords = flowRecordService.selectFlowRecordByRecordId(flowRecordId); List<FlowRecord> newflowRecords = flowRecordService.selectFlowRecordByRecordId(resultRecordId);
for(int i = 0 ;i < newflowRecords.size() ; i ++){ for(int i = 0 ;i < newflowRecords.size() ; i ++){
flowRecordService.updateFlowRecordIdById(newflowRecords.get(i).getId(),flowRecordIds.get(i)); flowRecordService.updateFlowRecordIdById(newflowRecords.get(i).getId(),flowRecordIds.get(i));
if(flag ){ //如果录入己经走了设置新的数据结果录入己走 if(flag ){ //如果录入己经走了设置新的数据结果录入己走
@ -1015,12 +1014,12 @@ public class ResultRecordServiceImpl extends ServiceImpl<ResultRecordMapper, Res
} }
//更新flowProcess为0 //更新flowProcess为0
ResultRecord resultRecord = resultRecordService.selectResultRecordById(flowRecord.getRecordId()); ResultRecord resultRecord = resultRecordService.selectResultRecordById(resultRecordId);
resultRecord.setFlowProcess(0); resultRecord.setFlowProcess(0);
resultRecordService.updateResultRecordById(resultRecord); resultRecordService.updateResultRecordById(resultRecord);
resultRecordService.resetData(flowRecordId,approvalDto.getClearFlag()); resultRecordService.resetData(resultRecordId,approvalDto.getClearFlag());
return R.ok(); return R.ok();
} }