|
|
@@ -104,7 +104,7 @@ public class ProcessAuditServiceImpl extends ServiceImpl<ProcessAuditMapper, Pro
|
|
104
|
104
|
JSONObject row = null;
|
|
105
|
105
|
for (int i = 0; i < jsonArray.size(); i++) {
|
|
106
|
106
|
row = jsonArray.getJSONObject(i);
|
|
107
|
|
- Integer subId = (Integer) row.get("id");//子流程id
|
|
|
107
|
+ Integer subId = (Integer) row.get("subId");//子流程id
|
|
108
|
108
|
Integer subData = Integer.parseInt(row.getString("subData"));//子流程数据
|
|
109
|
109
|
String operationTime = (String) row.get("operationTime");//子流程的操作时间
|
|
110
|
110
|
|
|
|
@@ -387,17 +387,17 @@ public class ProcessAuditServiceImpl extends ServiceImpl<ProcessAuditMapper, Pro
|
|
387
|
387
|
Integer subId = (Integer) row.get("subId");//子流程id
|
|
388
|
388
|
Integer subData = (Integer) row.get("subData");//子流程数据
|
|
389
|
389
|
String operationTime = (String) row.get("operationTime");//子流程的操作时间
|
|
390
|
|
- if(null != row.get("id")){
|
|
|
390
|
+ QueryWrapper<ProcessAudit> ew1 = new QueryWrapper<>();
|
|
|
391
|
+ ew1.eq("process_id", processId);
|
|
|
392
|
+ ew1.eq("type", type);
|
|
|
393
|
+ ew1.eq("sub_id", subId);
|
|
|
394
|
+ List<ProcessAudit> list = processAuditMapper.selectList(ew1);
|
|
|
395
|
+ if(list.size()>0){
|
|
391
|
396
|
//修改
|
|
392
|
|
- Integer id = (Integer) row.get("id");//子流程id
|
|
393
|
|
- //根据id去查询该条数据
|
|
394
|
|
- ProcessAudit processAudit = processAuditMapper.selectById(id);
|
|
395
|
|
- if(processAudit.getSubData().equals(subData) && processAudit.getOperationTime().equals(operationTime)){
|
|
396
|
|
- //不做操作
|
|
397
|
|
- }else{
|
|
398
|
|
- processAudit.setSubData(subData);
|
|
399
|
|
- processAudit.setOperationTime(operationTime);
|
|
400
|
|
- processAuditMapper.updateById(processAudit);
|
|
|
397
|
+ if(!list.get(0).getSubData().equals(subData) && !list.get(0).getOperationTime().equals(operationTime)){
|
|
|
398
|
+ list.get(0).setSubData(subData);
|
|
|
399
|
+ list.get(0).setOperationTime(operationTime);
|
|
|
400
|
+ processAuditMapper.updateById(list.get(0));
|
|
401
|
401
|
}
|
|
402
|
402
|
}else{
|
|
403
|
403
|
//新增
|