|
|
@@ -172,18 +172,12 @@ public class ProcessAuditServiceImpl extends ServiceImpl<ProcessAuditMapper, Pro
|
|
172
|
172
|
}
|
|
173
|
173
|
|
|
174
|
174
|
ew.orderByDesc("id");
|
|
175
|
|
- /*if (pageIndex != MyConstant.ZERO && pageSize != MyConstant.ZERO) {
|
|
176
|
|
- PageHelper.startPage(pageIndex, pageSize);
|
|
177
|
|
- }*/
|
|
178
|
|
-
|
|
179
|
175
|
Page page = new Page();
|
|
180
|
176
|
if (pageIndex != MyConstant.ZERO && pageSize != MyConstant.ZERO) {
|
|
181
|
177
|
page = new Page(pageIndex, pageSize);
|
|
182
|
178
|
}
|
|
183
|
179
|
|
|
184
|
180
|
Page<ProcessAudit> pageInfo = processAuditMapper.selectPage(page, ew);
|
|
185
|
|
- //PageInfo<ProcessAudit> pageInfo = (PageInfo<ProcessAudit>) processAuditMapper.selectPage(page,ew);
|
|
186
|
|
- //PageInfo<ProcessAudit> pageInfo = new PageInfo<>(page);
|
|
187
|
181
|
return pageInfo;
|
|
188
|
182
|
}
|
|
189
|
183
|
|
|
|
@@ -241,9 +235,14 @@ public class ProcessAuditServiceImpl extends ServiceImpl<ProcessAuditMapper, Pro
|
|
241
|
235
|
|
|
242
|
236
|
org.json.JSONObject object = new org.json.JSONObject(pageParam.getCondition());
|
|
243
|
237
|
QueryWrapper<ProcessAudit> ew = new QueryWrapper<>();
|
|
244
|
|
- ew.eq("to_people", object.getInt("userId"));
|
|
245
|
|
- ew.eq("audit_state", 0);//已提交
|
|
246
|
|
- //List<ProcessAudit> list = processAuditMapper.selectList(ew);
|
|
|
238
|
+ if(StringUtils.isNotBlank(object.optString("userId"))){
|
|
|
239
|
+ ew.eq("to_people", object.getInt("userId"));
|
|
|
240
|
+ //ew.eq("audit_state", 0);//已提交
|
|
|
241
|
+ ew.and(x->x.eq("audit_state", 0).or().isNull("audit_state"));
|
|
|
242
|
+
|
|
|
243
|
+ //and(i -> i.eq(“name”, “李白”).ne(“status”, “活着”))—>and (name = ‘李白’ and status <> ‘活着’)
|
|
|
244
|
+
|
|
|
245
|
+ }
|
|
247
|
246
|
ew.orderByDesc("id");
|
|
248
|
247
|
|
|
249
|
248
|
Page page = new Page();
|
|
|
@@ -523,12 +522,13 @@ public class ProcessAuditServiceImpl extends ServiceImpl<ProcessAuditMapper, Pro
|
|
523
|
522
|
if(StringUtils.isNotBlank(object.optString("userId"))){
|
|
524
|
523
|
//如果是第一个审批人 则第一条数据中状态不为0(提交)
|
|
525
|
524
|
ew.eq("to_people",object.optString("userId"));
|
|
526
|
|
- ew.eq("result",1);//整个流程的第一条数据
|
|
527
|
|
- ew.ne("audit_state",0);
|
|
|
525
|
+ //ew.eq("result",1);//整个流程的第一条数据
|
|
|
526
|
+ //ew.ne("audit_state",0);
|
|
|
527
|
+
|
|
|
528
|
+ //第二个人审批 审批状态为2 3 (XX 第一条数据的状态是,2:审批不通过,3:审批完成进行中)
|
|
|
529
|
+
|
|
|
530
|
+ ew.and(x->x.eq("result",1).ne("audit_state", 0).or().ne("result",1).ge("audit_state", 2));
|
|
528
|
531
|
|
|
529
|
|
- //第二个人审批 则 第一条数据的状态是,2:审批不通过,3:审批完成进行中
|
|
530
|
|
- //ew.or("", consumer)
|
|
531
|
|
- //ew.ne("result", 1);//不是第一条数据
|
|
532
|
532
|
|
|
533
|
533
|
}
|
|
534
|
534
|
|