|
@@ -1211,18 +1211,7 @@ public R<String> batchDownloadFileToZip(String ids, HttpServletResponse response
|
|
|
// wrapper.set(InformationQuery::getAuditUserIdAndName, null);
|
|
|
|
|
|
this.informationQueryService.update(wrapper.in(InformationQuery::getId, Arrays.asList(task.getFormDataId().split(","))));
|
|
|
- List<InformationQuery> informationQueries = this.informationQueryService.getBaseMapper().selectBatchIds(Arrays.asList(task.getFormDataId().split(",")));
|
|
|
- if (informationQueries != null && !informationQueries.isEmpty()) {
|
|
|
- for (InformationQuery informationQuery : informationQueries) {
|
|
|
- informationQuery.setStatus(0);
|
|
|
- informationQuery.setId(SnowFlakeUtil.getId());
|
|
|
- informationQuery.setEVisaPdfUrl(null);
|
|
|
- informationQuery.setReportNumber(null);
|
|
|
- informationQuery.setAuditUserIdAndName(null);
|
|
|
- informationQuery.setTaskId(null);
|
|
|
- }
|
|
|
- this.informationQueryService.saveBatch(informationQueries);
|
|
|
- }
|
|
|
+ this.informationQueryService.createNewInformationQueriesByStatusForLock(Arrays.asList(task.getFormDataId().split(",")));
|
|
|
}
|
|
|
|
|
|
List<InformationQuery> queries = this.informationQueryService.getBaseMapper().selectBatchIds(Arrays.asList(task.getFormDataId().split(",")));
|
|
@@ -1252,6 +1241,9 @@ public R<String> batchDownloadFileToZip(String ids, HttpServletResponse response
|
|
|
}
|
|
|
|
|
|
for (InformationQuery query : queries) {
|
|
|
+ if (query.getStatus() != 3) {
|
|
|
+ this.informationQueryService.update(Wrappers.<InformationQuery>lambdaUpdate().in(InformationQuery::getId, query.getId()).set(InformationQuery::getStatus, 3));
|
|
|
+ }
|
|
|
if (StringUtils.isNotEmpty(query.getFileUserIdAndName())) {
|
|
|
String[] userArray = query.getFileUserIdAndName().split(",");
|
|
|
for (String str : userArray) {
|
|
@@ -1427,16 +1419,15 @@ public R<Object> batchTask(@RequestBody StartTaskVO startTaskVO) {
|
|
|
Map<String, InformationQuery> queryMap = new HashMap<>();
|
|
|
List<InformationQuery> queryTempList = new ArrayList<>();
|
|
|
Map<String, InformationQuery> queryTempMap = new HashMap<>();
|
|
|
- List<InformationQuery> saveQueryList = new ArrayList<>();
|
|
|
queryList.forEach(query -> {
|
|
|
if (query.getStatus() != 0) {
|
|
|
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));
|
|
|
+ .eq(InformationQuery::getContractId, query.getContractId()).in(InformationQuery::getStatus, 0,1, 2));
|
|
|
if (count == 0) {
|
|
|
if (query.getStatus() != null && query.getStatus() == 3) {
|
|
|
query.setId(SnowFlakeUtil.getId());
|
|
|
query.setStatus(0);
|
|
|
- saveQueryList.add(query);
|
|
|
+ this.informationQueryService.save(query);
|
|
|
}
|
|
|
} else {
|
|
|
return;
|
|
@@ -1453,9 +1444,6 @@ public R<Object> batchTask(@RequestBody StartTaskVO startTaskVO) {
|
|
|
queryTempList.add(query);
|
|
|
queryMap.put(query.getId().toString(), query);
|
|
|
});
|
|
|
- if (!saveQueryList.isEmpty()) {
|
|
|
- this.informationQueryService.saveOrUpdateBatch(saveQueryList);
|
|
|
- }
|
|
|
queryList = queryTempList;
|
|
|
if (queryList.isEmpty()) {
|
|
|
return R.fail( "已上报,无需重复上报");
|