|
@@ -288,6 +288,8 @@ public class DataVerifyController {
|
|
public R nextVerify(@RequestParam("ids[]") Long[] ids, @PathVariable("deptId") Long deptId) {
|
|
public R nextVerify(@RequestParam("ids[]") Long[] ids, @PathVariable("deptId") Long deptId) {
|
|
log.info("联合审批通过 ids:" + ids.toString());
|
|
log.info("联合审批通过 ids:" + ids.toString());
|
|
log.info("联合审批通过 deptId:" + deptId);
|
|
log.info("联合审批通过 deptId:" + deptId);
|
|
|
|
+ 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();
|
|
@@ -300,7 +302,18 @@ public class DataVerifyController {
|
|
data.setDataStatus("2");
|
|
data.setDataStatus("2");
|
|
data.setSendVerify("3");
|
|
data.setSendVerify("3");
|
|
data.setNextVerifyDept(deptId);
|
|
data.setNextVerifyDept(deptId);
|
|
- 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();
|
|
@@ -319,6 +332,8 @@ public class DataVerifyController {
|
|
@RequiresPermissions("datas:dataVerify:expert")
|
|
@RequiresPermissions("datas:dataVerify:expert")
|
|
public R expert(@RequestParam("ids[]") Long[] ids) {
|
|
public R expert(@RequestParam("ids[]") Long[] ids) {
|
|
log.info("专家审核 备案主键 ids:" + ids);
|
|
log.info("专家审核 备案主键 ids:" + ids);
|
|
|
|
+ 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();
|
|
@@ -332,7 +347,18 @@ public class DataVerifyController {
|
|
data.setSendVerify("2");// 0 未送审 1 送审 2 专家审核
|
|
data.setSendVerify("2");// 0 未送审 1 送审 2 专家审核
|
|
// 0:待审核 1:删除 2:审核中 3:通过审核 4:驳回 5:联合审批 6:终审
|
|
// 0:待审核 1:删除 2:审核中 3:通过审核 4:驳回 5:联合审批 6:终审
|
|
// data.setDataStatus("6");
|
|
// data.setDataStatus("6");
|
|
- 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();
|