|
@@ -2169,30 +2169,31 @@ public class ProjectListService {
|
|
ProgramProjectListInfo listInfo = projectListMapper.getById(programCancellation.getProjectId());
|
|
ProgramProjectListInfo listInfo = projectListMapper.getById(programCancellation.getProjectId());
|
|
//查询报告号使用数量
|
|
//查询报告号使用数量
|
|
ProgramReportNo programReportNo1 = programReportNoMapper.selectByProgramId(programCancellation.getProjectId());
|
|
ProgramReportNo programReportNo1 = programReportNoMapper.selectByProgramId(programCancellation.getProjectId());
|
|
- List<ProgramReportNo> reportNoList=programReportNoMapper.selectByNo(programReportNo1.getReportNo());
|
|
|
|
- if (CollectionUtils.isNotEmpty(reportNoList)){
|
|
|
|
- //根据查询出的报告号数量判断当前报告号是否已经被使用过
|
|
|
|
- if (reportNoList.size()>1){
|
|
|
|
- String reportNo = "";
|
|
|
|
- reportNo = this.generateReportNo(listInfo);
|
|
|
|
- ProgramReportNo programReportNo = programReportNoMapper.selectByProgramId(listInfo.getId());
|
|
|
|
- ProgramReportNo programReport = new ProgramReportNo();
|
|
|
|
- programReport.setId(programReportNo.getId());
|
|
|
|
- programReport.setReportNo(reportNo);
|
|
|
|
- programReportNoMapper.updateById(programReport);
|
|
|
|
- //根据报告号去报告号作废表中查询数据,并进行逻辑删除
|
|
|
|
- ProgramReportCancellation byReportNo1 = reportCancellationMapper.getByReportNo(reportNo);
|
|
|
|
- if (ObjectUtil.isNotEmpty(byReportNo1)){
|
|
|
|
- reportCancellationMapper.deleteById(byReportNo1.getId());
|
|
|
|
- }
|
|
|
|
- }else {
|
|
|
|
- //根据报告号去报告号作废表中查询数据,并进行逻辑删除
|
|
|
|
- ProgramReportCancellation byReportNo1 = reportCancellationMapper.getByReportNo(programReportNo1.getReportNo());
|
|
|
|
- if (ObjectUtil.isNotEmpty(byReportNo1)){
|
|
|
|
- reportCancellationMapper.deleteById(byReportNo1.getId());
|
|
|
|
|
|
+ if (ObjectUtils.isNotEmpty(programReportNo1) && StringUtils.isNotBlank(programReportNo1.getReportNo())){
|
|
|
|
+ List<ProgramReportNo> reportNoList=programReportNoMapper.selectByNo(programReportNo1.getReportNo());
|
|
|
|
+ if (CollectionUtils.isNotEmpty(reportNoList)){
|
|
|
|
+ //根据查询出的报告号数量判断当前报告号是否已经被使用过
|
|
|
|
+ if (reportNoList.size()>1){
|
|
|
|
+ String reportNo = "";
|
|
|
|
+ reportNo = this.generateReportNo(listInfo);
|
|
|
|
+ ProgramReportNo programReportNo = programReportNoMapper.selectByProgramId(listInfo.getId());
|
|
|
|
+ ProgramReportNo programReport = new ProgramReportNo();
|
|
|
|
+ programReport.setId(programReportNo.getId());
|
|
|
|
+ programReport.setReportNo(reportNo);
|
|
|
|
+ programReportNoMapper.updateById(programReport);
|
|
|
|
+ //根据报告号去报告号作废表中查询数据,并进行逻辑删除
|
|
|
|
+ ProgramReportCancellation byReportNo1 = reportCancellationMapper.getByReportNo(reportNo);
|
|
|
|
+ if (ObjectUtil.isNotEmpty(byReportNo1)){
|
|
|
|
+ reportCancellationMapper.deleteById(byReportNo1.getId());
|
|
|
|
+ }
|
|
|
|
+ }else {
|
|
|
|
+ //根据报告号去报告号作废表中查询数据,并进行逻辑删除
|
|
|
|
+ ProgramReportCancellation byReportNo1 = reportCancellationMapper.getByReportNo(programReportNo1.getReportNo());
|
|
|
|
+ if (ObjectUtil.isNotEmpty(byReportNo1)){
|
|
|
|
+ reportCancellationMapper.deleteById(byReportNo1.getId());
|
|
|
|
+ }
|
|
}
|
|
}
|
|
- }
|
|
|
|
- //根据报告号去报告号作废表中是否有该报告号
|
|
|
|
|
|
+ //根据报告号去报告号作废表中是否有该报告号
|
|
// ProgramReportCancellation programReportCancellation=reportCancellationMapper.getByReportNo(listInfo.getReportNo());
|
|
// ProgramReportCancellation programReportCancellation=reportCancellationMapper.getByReportNo(listInfo.getReportNo());
|
|
// if (ObjectUtil.isNotEmpty(programReportCancellation)){
|
|
// if (ObjectUtil.isNotEmpty(programReportCancellation)){
|
|
// if (0==programReportCancellation.getDelFlag()){
|
|
// if (0==programReportCancellation.getDelFlag()){
|
|
@@ -2240,7 +2241,9 @@ public class ProjectListService {
|
|
// }
|
|
// }
|
|
// }
|
|
// }
|
|
// }
|
|
// }
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
|
|
return "操作成功";
|
|
return "操作成功";
|