|
@@ -198,6 +198,7 @@ public class DataController {
|
|
|
public R batchVerify(@RequestParam("ids[]") Long[] ids) {
|
|
|
log.info("批量审核通过 ids:" + ids.toString());
|
|
|
List<String> failedDataNames = new ArrayList<>();
|
|
|
+ List<GyDataImportDTO> dataImportDTOList = new ArrayList<>();
|
|
|
for (Long id : ids) {
|
|
|
log.info("审核通过 id:" + id);
|
|
|
GyDataImportDTO data = new GyDataImportDTO();
|
|
@@ -209,14 +210,20 @@ public class DataController {
|
|
|
// 0:待审核 1:删除 2:已上报 3:通过审核 4:驳回 5:联合审批 6:终审
|
|
|
data.setId(id);
|
|
|
data.setDataStatus("3");
|
|
|
- gyDataService.updateStatus(data);
|
|
|
+ dataImportDTOList.add(data);
|
|
|
} else {
|
|
|
- failedDataNames.add(data.getDataName());
|
|
|
+ failedDataNames.add(data.getDataName());
|
|
|
+ }
|
|
|
}
|
|
|
- }
|
|
|
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();
|
|
|
}
|
|
|
|
|
@@ -252,6 +259,8 @@ public class DataController {
|
|
|
@RequiresPermissions("datas:data:rebut")
|
|
|
public R batchRebut(@RequestParam("ids[]") Long[] ids) {
|
|
|
log.info("审核通过 备案主键 ids:" + ids);
|
|
|
+ List<String> failedDataNames = new ArrayList<>();
|
|
|
+ List<GyDataImportDTO> dataImportDTOList = new ArrayList<>();
|
|
|
for (Long id : ids) {
|
|
|
log.info("审核通过 id:" + id);
|
|
|
GyDataImportDTO data = new GyDataImportDTO();
|
|
@@ -263,7 +272,18 @@ public class DataController {
|
|
|
// 0:待审核 1:删除 2:已上报 3:通过审核 4:驳回 5:联合审批 6:终审
|
|
|
data.setId(id);
|
|
|
data.setDataStatus("4");
|
|
|
- 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();
|