|
@@ -17,7 +17,9 @@ import com.jeeplus.test.cw.projectRecords.domain.CwProjectRecords;
|
|
|
import com.jeeplus.test.cw.projectRecords.service.dto.CwProjectRecordsDTO;
|
|
|
import com.jeeplus.test.cw.projectRecords.service.mapstruct.CwProjectRecordsWrapper;
|
|
|
import com.jeeplus.test.cw.projectReport.domain.*;
|
|
|
+import com.jeeplus.test.cw.projectReport.mapper.CwProjectInfoMapper;
|
|
|
import com.jeeplus.test.cw.projectReport.mapper.CwProjectReportCancelMapper;
|
|
|
+import com.jeeplus.test.cw.projectReport.mapper.CwProjectReportMapper;
|
|
|
import com.jeeplus.test.cw.projectReport.service.dto.CwProjectReportDTO;
|
|
|
import com.jeeplus.test.cw.projectReport.service.dto.ProjectReportWorkAttachmentDTO;
|
|
|
import com.jeeplus.test.cw.projectReport.service.mapstruct.CwProjectReportFileWrapper;
|
|
@@ -51,6 +53,12 @@ public class ReportCancellApplyService extends ServiceImpl<ReportCancellApplyMap
|
|
|
@Resource
|
|
|
private CwProjectReportCancelMapper cancelMapper;
|
|
|
|
|
|
+ @Resource
|
|
|
+ private CwProjectInfoMapper infoMapper;
|
|
|
+
|
|
|
+ @Resource
|
|
|
+ private CwProjectReportMapper reportMapper;
|
|
|
+
|
|
|
/**
|
|
|
* 差选项目列表信息
|
|
|
* @param page
|
|
@@ -134,6 +142,17 @@ public class ReportCancellApplyService extends ServiceImpl<ReportCancellApplyMap
|
|
|
cancel.setReportNo(reportData.getReportNo());
|
|
|
cancelMapper.insert(cancel);
|
|
|
applyMapper.updateById(report);
|
|
|
+ //修改报告管理的del_flag
|
|
|
+ CwProjectInfoData newLine = infoMapper.getById(report.getReportNewLineId());
|
|
|
+ //根据newLine的reportid找到报告表
|
|
|
+ CwProjectReport projectReport = reportMapper.selectById(newLine.getReportId());
|
|
|
+ if (report.getStatus().equals("2")){
|
|
|
+ projectReport.setDelFlag(1);
|
|
|
+ reportMapper.updateDelFlag(projectReport.getDelFlag(),projectReport.getId());
|
|
|
+ }else if (report.getStatus().equals("1") || report.getStatus().equals("4") || report.getStatus().equals("3")){
|
|
|
+ projectReport.setDelFlag(0);
|
|
|
+ reportMapper.updateDelFlag(projectReport.getDelFlag(),projectReport.getId());
|
|
|
+ }
|
|
|
|
|
|
return report.getId();
|
|
|
}
|
|
@@ -161,6 +180,20 @@ public class ReportCancellApplyService extends ServiceImpl<ReportCancellApplyMap
|
|
|
cancel.setReportNo(reportData.getReportNo());
|
|
|
cancelMapper.insert(cancel);
|
|
|
this.applyMapper.insert(report);
|
|
|
+ applyMapper.updateById(report);
|
|
|
+
|
|
|
+ //修改报告管理的del_flag
|
|
|
+ CwProjectInfoData newLine = infoMapper.getById(report.getReportNewLineId());
|
|
|
+ //根据newLine的reportid找到报告表
|
|
|
+ CwProjectReport projectReport = reportMapper.selectById(newLine.getReportId());
|
|
|
+ if (report.getStatus().equals("2")){
|
|
|
+ projectReport.setDelFlag(1);
|
|
|
+ reportMapper.updateDelFlag(projectReport.getDelFlag(),projectReport.getId());
|
|
|
+ }else if (report.getStatus().equals("1") || report.getStatus().equals("4") || report.getStatus().equals("3")){
|
|
|
+ projectReport.setDelFlag(0);
|
|
|
+ reportMapper.updateDelFlag(projectReport.getDelFlag(),projectReport.getId());
|
|
|
+ }
|
|
|
+
|
|
|
return report.getId();
|
|
|
}
|
|
|
|