|
@@ -149,6 +149,8 @@ public class DataExpertController {
|
|
@RequiresPermissions("datas:expertVerify:verify")
|
|
@RequiresPermissions("datas:expertVerify:verify")
|
|
public R batchVerify(@RequestParam("ids[]") Long[] ids) {
|
|
public R batchVerify(@RequestParam("ids[]") Long[] ids) {
|
|
log.info("批量审核通过 ids:" + ids.toString());
|
|
log.info("批量审核通过 ids:" + ids.toString());
|
|
|
|
+ List<String> failedDataNames = new ArrayList<>();
|
|
|
|
+ List<GyDataImportDTO> dataImportDTOList = new ArrayList<>();
|
|
for (Long id : ids) {
|
|
for (Long id : ids) {
|
|
log.info("审核通过 id:" + id);
|
|
log.info("审核通过 id:" + id);
|
|
GyDataImportDTO data = new GyDataImportDTO();
|
|
GyDataImportDTO data = new GyDataImportDTO();
|
|
@@ -159,7 +161,18 @@ public class DataExpertController {
|
|
// 0:正常 1:删除 2:已上报 3:通过审核 4:驳回 5:联合审批 6:终审
|
|
// 0:正常 1:删除 2:已上报 3:通过审核 4:驳回 5:联合审批 6:终审
|
|
data.setId(id);
|
|
data.setId(id);
|
|
data.setDataStatus("3");
|
|
data.setDataStatus("3");
|
|
- gyDataService.updateStatus(data);
|
|
|
|
|
|
+ dataImportDTOList.add(data);
|
|
|
|
+ } else {
|
|
|
|
+ failedDataNames.add(data.getDataName());
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if (failedDataNames.size() > 0) {
|
|
|
|
+ return R.error(String.join(",", failedDataNames) + ",审核失败");
|
|
|
|
+ } else {
|
|
|
|
+ if(dataImportDTOList.size() > 0){
|
|
|
|
+ for(GyDataImportDTO importDTO : dataImportDTOList){
|
|
|
|
+ gyDataService.updateStatus(importDTO);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
return R.ok();
|
|
return R.ok();
|
|
@@ -198,6 +211,7 @@ public class DataExpertController {
|
|
public R batchRebut(@RequestParam("ids[]") Long[] ids) {
|
|
public R batchRebut(@RequestParam("ids[]") Long[] ids) {
|
|
log.info("审核通过 备案主键 ids:" + ids);
|
|
log.info("审核通过 备案主键 ids:" + ids);
|
|
List<String> failedDataNames = new ArrayList<>();
|
|
List<String> failedDataNames = new ArrayList<>();
|
|
|
|
+ List<GyDataImportDTO> dataImportDTOList = new ArrayList<>();
|
|
for (Long id : ids) {
|
|
for (Long id : ids) {
|
|
log.info("审核通过 id:" + id);
|
|
log.info("审核通过 id:" + id);
|
|
GyDataImportDTO data = new GyDataImportDTO();
|
|
GyDataImportDTO data = new GyDataImportDTO();
|
|
@@ -208,13 +222,20 @@ public class DataExpertController {
|
|
// 0:正常 1:删除 2:已上报 3:通过审核 4:驳回 5:联合审批 6:终审
|
|
// 0:正常 1:删除 2:已上报 3:通过审核 4:驳回 5:联合审批 6:终审
|
|
data.setId(id);
|
|
data.setId(id);
|
|
data.setDataStatus("4");
|
|
data.setDataStatus("4");
|
|
- gyDataService.updateStatus(data);
|
|
|
|
|
|
+ dataImportDTOList.add(data);
|
|
} else {
|
|
} else {
|
|
failedDataNames.add(data.getDataName());
|
|
failedDataNames.add(data.getDataName());
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+
|
|
if (failedDataNames.size() > 0) {
|
|
if (failedDataNames.size() > 0) {
|
|
- return R.error(String.join(",", failedDataNames) + ",专家审核失败");
|
|
|
|
|
|
+ return R.error(String.join(",", failedDataNames) + ",驳回失败");
|
|
|
|
+ } else {
|
|
|
|
+ if(dataImportDTOList.size() > 0){
|
|
|
|
+ for(GyDataImportDTO importDTO : dataImportDTOList){
|
|
|
|
+ gyDataService.updateStatus(importDTO);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}
|
|
}
|
|
return R.ok();
|
|
return R.ok();
|
|
}
|
|
}
|