|
@@ -1427,9 +1427,20 @@ public R<Object> batchTask(@RequestBody StartTaskVO startTaskVO) {
|
|
Map<String, InformationQuery> queryMap = new HashMap<>();
|
|
Map<String, InformationQuery> queryMap = new HashMap<>();
|
|
List<InformationQuery> queryTempList = new ArrayList<>();
|
|
List<InformationQuery> queryTempList = new ArrayList<>();
|
|
Map<String, InformationQuery> queryTempMap = new HashMap<>();
|
|
Map<String, InformationQuery> queryTempMap = new HashMap<>();
|
|
|
|
+ List<InformationQuery> saveQueryList = new ArrayList<>();
|
|
queryList.forEach(query -> {
|
|
queryList.forEach(query -> {
|
|
if (query.getStatus() != 0) {
|
|
if (query.getStatus() != 0) {
|
|
- return;
|
|
|
|
|
|
+ long count = this.informationQueryService.count(Wrappers.<InformationQuery>lambdaQuery().eq(InformationQuery::getWbsId, query.getWbsId()).eq(InformationQuery::getClassify, query.getClassify())
|
|
|
|
+ .eq(InformationQuery::getContractId, query.getContractId()).in(InformationQuery::getStatus, 1, 2));
|
|
|
|
+ if (count == 0) {
|
|
|
|
+ if (query.getStatus() != null && query.getStatus() == 3) {
|
|
|
|
+ query.setId(SnowFlakeUtil.getId());
|
|
|
|
+ query.setStatus(0);
|
|
|
|
+ saveQueryList.add(query);
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
if (query.getType() == 3) {
|
|
if (query.getType() == 3) {
|
|
startTaskVO.setTrialSelfInspectionRecordId(3L);
|
|
startTaskVO.setTrialSelfInspectionRecordId(3L);
|
|
@@ -1442,6 +1453,9 @@ public R<Object> batchTask(@RequestBody StartTaskVO startTaskVO) {
|
|
queryTempList.add(query);
|
|
queryTempList.add(query);
|
|
queryMap.put(query.getId().toString(), query);
|
|
queryMap.put(query.getId().toString(), query);
|
|
});
|
|
});
|
|
|
|
+ if (!saveQueryList.isEmpty()) {
|
|
|
|
+ this.informationQueryService.saveOrUpdateBatch(saveQueryList);
|
|
|
|
+ }
|
|
queryList = queryTempList;
|
|
queryList = queryTempList;
|
|
if (queryList.isEmpty()) {
|
|
if (queryList.isEmpty()) {
|
|
return R.fail( "已上报,无需重复上报");
|
|
return R.fail( "已上报,无需重复上报");
|