|
|
@@ -137,11 +137,11 @@ public class ProcessAuditServiceImpl extends ServiceImpl<ProcessAuditMapper, Pro
|
|
137
|
137
|
processAudit.setProcessId(UUID.randomUUID().toString());//唯一的流程标识
|
|
138
|
138
|
}else{ //其他步骤带审批的
|
|
139
|
139
|
//修改第一条数据
|
|
140
|
|
- /*QueryWrapper<ProcessAudit> ew = new QueryWrapper<>();
|
|
|
140
|
+ QueryWrapper<ProcessAudit> ew = new QueryWrapper<>();
|
|
141
|
141
|
ew.eq("process_id", processId).eq("result", 1);
|
|
142
|
142
|
ProcessAudit processAudit1 = new ProcessAudit();
|
|
143
|
143
|
processAudit1.setResult(0);
|
|
144
|
|
- processAuditMapper.update(processAudit1, ew);*/
|
|
|
144
|
+ processAuditMapper.update(processAudit1, ew);
|
|
145
|
145
|
//新增
|
|
146
|
146
|
processAudit.setResult(1);//第一条数据 保存并审批 1是0否
|
|
147
|
147
|
processAudit.setProcessId(processId);
|
|
|
@@ -656,22 +656,11 @@ public class ProcessAuditServiceImpl extends ServiceImpl<ProcessAuditMapper, Pro
|
|
656
|
656
|
ongoingStep = Integer.valueOf(list.get(0).getOngoingStep());
|
|
657
|
657
|
|
|
658
|
658
|
//如果是多流程 则把审批数据分开
|
|
659
|
|
- QueryWrapper<ProcessAudit> ew1 = new QueryWrapper<>();
|
|
660
|
|
- ew1.eq("process_id", processId);
|
|
661
|
|
- ew1.eq("result", 1);
|
|
662
|
|
- List<ProcessAudit> list1 = processAuditMapper.selectList(ew1);
|
|
663
|
|
- if(list1.size()>1){ //多流程
|
|
664
|
|
- QueryWrapper<ProcessAudit> ew2 = new QueryWrapper<>();
|
|
665
|
|
- ew2.eq("process_id", processId);
|
|
666
|
|
- ew2.eq("result", 1);
|
|
667
|
|
- ew2.eq("type", list1.get(1).getType());
|
|
668
|
|
- list2 = processAuditMapper.selectList(ew2);
|
|
669
|
|
- /*int index = 0;
|
|
670
|
|
- boolean flag = true;
|
|
|
659
|
+ if(list.get(0).getResult() == 0){ //如果是多流程 则把审批数据分开
|
|
|
660
|
+ int index = 0;
|
|
671
|
661
|
for (int i = 0; i < list.size(); i++) {
|
|
672
|
662
|
if(list.get(i).getResult() == 1){
|
|
673
|
663
|
index = i;
|
|
674
|
|
- flag = false;
|
|
675
|
664
|
break;
|
|
676
|
665
|
}
|
|
677
|
666
|
}
|
|
|
@@ -679,7 +668,7 @@ public class ProcessAuditServiceImpl extends ServiceImpl<ProcessAuditMapper, Pro
|
|
679
|
668
|
if( i >= index){
|
|
680
|
669
|
list2.add(list.get(i));
|
|
681
|
670
|
}
|
|
682
|
|
- }*/
|
|
|
671
|
+ }
|
|
683
|
672
|
if(list2.size()>0){
|
|
684
|
673
|
depot = list2.get(0).getDepotId();
|
|
685
|
674
|
ongoingStep = Integer.valueOf(list2.get(0).getOngoingStep());
|
|
|
@@ -831,10 +820,10 @@ public class ProcessAuditServiceImpl extends ServiceImpl<ProcessAuditMapper, Pro
|
|
831
|
820
|
org.json.JSONObject object = new org.json.JSONObject(pageParam.getCondition());
|
|
832
|
821
|
if (StringUtils.isNotBlank(object.optString("userId"))) {
|
|
833
|
822
|
ew.eq("apply_people", object.optString("userId"));
|
|
|
823
|
+ ew.eq("from_people", object.optString("userId"));
|
|
834
|
824
|
}
|
|
835
|
|
- ew.eq("result", 1);//整个流程的第一条数据
|
|
|
825
|
+ //ew.eq("result", 1);//整个流程的第一条数据
|
|
836
|
826
|
//只获取审批的数据
|
|
837
|
|
- ew.isNotNull("from_people");
|
|
838
|
827
|
ew.isNotNull("to_people");
|
|
839
|
828
|
ew.orderByDesc("id");
|
|
840
|
829
|
|