提交修改

This commit is contained in:
quyixiao 2020-08-31 09:33:35 +08:00
parent a444640a23
commit 5093665e4a
2 changed files with 11 additions and 9 deletions

View File

@ -328,7 +328,6 @@ public class ResultRecordController extends AbstractController {
flowRecordService.updateFlowRecordById(flowRecord);
}
}
// 可能会被删除
FlowRecord lastFlowRecord = flowRecordService.selectLastFlowRecordByRecordId(req.getRecordResultId());
lastFlowRecord.setGmtCreate(new Date());

View File

@ -261,26 +261,29 @@ public class ResultDetailServiceImpl extends ServiceImpl<ResultDetailMapper, Res
SimpleDateFormat myFmt2 = new SimpleDateFormat("MM-dd HH:mm");
FlowRecord lastFlowRecord = null;
if (CollectionUtils.isNotEmpty(flowRecordList)) {
int status = 0;
int index = 0;
String lastStatusStr = "";
for (FlowRecord flowRecord : flowRecordList) {
String name = roleNameMap.get(flowRecord.getDepartmentLevel());
String time = myFmt2.format(flowRecord.getGmtCreate());
String statusStr = "通过";
if (flowRecord.getStatus().equals(0)) {
if (status == 1) {
statusStr = "驳回";
}
lastFlowRecord = flowRecord;
status = 0;
} else if (flowRecord.getStatus().equals(1)) {
status = 1;
if (index + 1 <= flowRecordList.size() - 1) {
FlowRecord flowRecord1 = flowRecordList.get(index + 1);
if (flowRecord1.getStatus().equals(0)) {
statusStr = "驳回";
}
}
}
statusStr = index == 0 ? "提交" : statusStr;
if (index == flowRecordList.size() - 1) {
stepList.add(new Step(name, time, 1, "审批中" ));
stepList.add(new Step(name, time, 1, "驳回".equals(lastStatusStr) ? "确认" : "审批中"));
} else {
stepList.add(new Step(name, time, 1, index == 0 ? "提交" : statusStr));
stepList.add(new Step(name, time, 1, "驳回".equals(lastStatusStr) ? "确认" : statusStr));
}
lastStatusStr = statusStr;
index++;
}
}