|
|
|
|
@ -174,17 +174,19 @@ public class NegativeQueryService {
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
if (CollectionUtil.isNotEmpty(param.getThreeLevelCode())){ |
|
|
|
|
queryWrapper.exists( |
|
|
|
|
"SELECT 1 FROM negative_problem_relation npr " + |
|
|
|
|
"WHERE npr.negativeId = negative.id AND npr.threeLevelCode IN (" + |
|
|
|
|
String.join(",", param.getThreeLevelCode()) + ")" |
|
|
|
|
String codes = param.getThreeLevelCode().stream() |
|
|
|
|
.map(code -> "'" + code + "'") |
|
|
|
|
.collect(Collectors.joining(",")); |
|
|
|
|
queryWrapper.inSql( Negative::getId, |
|
|
|
|
"SELECT DISTINCT negativeId FROM negative_problem_relation WHERE threeLevelCode IN (" + codes + ")" |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
if (CollectionUtil.isNotEmpty(param.getHandleResultCode())){ |
|
|
|
|
queryWrapper.exists( |
|
|
|
|
"SELECT 1 FROM negative_blame nb " + |
|
|
|
|
"WHERE nb.negativeId = negative.id AND nb.handleResultCode IN (" + |
|
|
|
|
String.join(",", param.getHandleResultCode()) + ")" |
|
|
|
|
String codes = param.getHandleResultCode().stream() |
|
|
|
|
.map(code -> "'" + code + "'") |
|
|
|
|
.collect(Collectors.joining(",")); |
|
|
|
|
queryWrapper.inSql( Negative::getId, |
|
|
|
|
"SELECT DISTINCT negativeId FROM negative_blame WHERE handleResultCode IN (" + codes + ")" |
|
|
|
|
); |
|
|
|
|
queryWrapper.in(Negative::getProcessingStatus,List.of("completed", "approval")); |
|
|
|
|
} |
|
|
|
|
@ -198,9 +200,9 @@ public class NegativeQueryService {
|
|
|
|
|
List<NegativeQueryVo> list = page.getRecords().stream().map(item -> { |
|
|
|
|
NegativeQueryVo vo = new NegativeQueryVo(); |
|
|
|
|
BeanUtils.copyProperties(item, vo); |
|
|
|
|
if (Objects.nonNull(item.getFirstDistributeTime()) && !ProcessingStatusEnum.completed.name().equals(item.getProcessingStatus())) { |
|
|
|
|
vo.setRemainingDuration(TimeUtil.getRemainingDuration(item.getFirstDistributeTime(), item.getMaxSignDuration(), item.getMaxHandleDuration(), item.getExtensionDays(), item.getFlowKey())); |
|
|
|
|
} |
|
|
|
|
// if (Objects.nonNull(item.getFirstDistributeTime()) && !ProcessingStatusEnum.completed.name().equals(item.getProcessingStatus())) {
|
|
|
|
|
// vo.setRemainingDuration(TimeUtil.getRemainingDuration(item.getFirstDistributeTime(), item.getMaxSignDuration(), item.getMaxHandleDuration(), item.getExtensionDays(), item.getFlowKey()));
|
|
|
|
|
// }
|
|
|
|
|
return vo; |
|
|
|
|
}).toList(); |
|
|
|
|
System.out.printf("耗时:%sms", System.currentTimeMillis() - l); |
|
|
|
|
|