|
@@ -1,10 +1,7 @@
|
|
|
package cn.cslg.pas.service.business;
|
|
|
|
|
|
import cn.cslg.pas.common.dto.business.ReportAffairDTO;
|
|
|
-import cn.cslg.pas.common.dto.invalidDTO.AddAdminProceedDTO;
|
|
|
-import cn.cslg.pas.common.dto.invalidDTO.AddStateOpinionDTO;
|
|
|
-import cn.cslg.pas.common.dto.invalidDTO.QueryReportAffairDTO;
|
|
|
-import cn.cslg.pas.common.dto.invalidDTO.UpdateStateOpinionDTO;
|
|
|
+import cn.cslg.pas.common.dto.invalidDTO.*;
|
|
|
import cn.cslg.pas.common.model.cronModel.Personnel;
|
|
|
import cn.cslg.pas.common.model.cronModel.PersonnelVO;
|
|
|
import cn.cslg.pas.common.model.cronModel.SystemFile;
|
|
@@ -145,18 +142,22 @@ public class ReportAffairService extends ServiceImpl<ReportAffairMapper, ReportA
|
|
|
BeanUtils.copyProperties(item, reportAffairVO);
|
|
|
//根据事务类型选择不同的装载方式
|
|
|
Integer type = reportAffairVO.getAffairType();
|
|
|
- if (type == 0) {//0 口审记录
|
|
|
+ if (type.equals(0)) {//0 口审记录
|
|
|
this.loadOralTrail(reportAffairVO);
|
|
|
- } else if (type == 1) {//1 无效请求书
|
|
|
+ } else if (type.equals(1)) {//1 无效请求书
|
|
|
this.loadInvalidRequestFile(reportAffairVO);
|
|
|
- } else if (type == 2) {//2 陈述意见书
|
|
|
+ } else if (type.equals(2)) {//2 陈述意见书
|
|
|
this.loadStateOpinion(reportAffairVO);
|
|
|
- } else if (type == 3) {//3 无效决定书
|
|
|
+ } else if (type.equals(3)) {//3 无效决定书
|
|
|
this.loadInvalidDecisionFile(reportAffairVO);
|
|
|
- } else if (type == 4) {//4 行政诉讼书
|
|
|
+ } else if (type.equals(4)) {//4 行政诉讼书
|
|
|
this.loadAdminProceed(reportAffairVO);
|
|
|
- } else if (type == 5) {//5 行政诉讼判决书
|
|
|
+ } else if (type.equals(5)) {//5 行政诉讼判决书
|
|
|
this.loadJudgment(reportAffairVO);
|
|
|
+ } else if (type.equals(6)) {//6 权要修改记录
|
|
|
+ this.loadClaimHistory(reportAffairVO);
|
|
|
+ } else if (type.equals(7)) {//7 补充证据及理由
|
|
|
+ this.loadSupplyEvidence(reportAffairVO);
|
|
|
}
|
|
|
reportAffairVOS.add(reportAffairVO);
|
|
|
});
|
|
@@ -371,4 +372,181 @@ public class ReportAffairService extends ServiceImpl<ReportAffairMapper, ReportA
|
|
|
JudgementVO judgementVO = adminProceedService.getJudgment(reportAffairId);
|
|
|
reportAffairVO.setJudgementVO(judgementVO);
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 上传权要修改记录
|
|
|
+ * @param addClaimHistoryDTO
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public Integer addClaimHistory(AddClaimHistoryDTO addClaimHistoryDTO){
|
|
|
+ if (addClaimHistoryDTO == null) {
|
|
|
+ throw new XiaoShiException("入参为空");
|
|
|
+ }
|
|
|
+ Integer projectId = addClaimHistoryDTO.getProjectId();
|
|
|
+ if (projectId == null) {
|
|
|
+ throw new XiaoShiException("报告id为空");
|
|
|
+ }
|
|
|
+ //1. 首先上传报告事务,拿到报告事务id
|
|
|
+ ReportAffairDTO reportAffairDTO = new ReportAffairDTO();
|
|
|
+ reportAffairDTO.setProjectId(projectId);
|
|
|
+ //权要修改历史 6
|
|
|
+ reportAffairDTO.setAffairType(6);
|
|
|
+ //发生时间是无效请求日
|
|
|
+ reportAffairDTO.setOccurredTime(addClaimHistoryDTO.getClaimHistoryTime());
|
|
|
+ //备注
|
|
|
+ reportAffairDTO.setDescription(addClaimHistoryDTO.getDescription());
|
|
|
+ Integer reportAffairId = this.addReportAffair(reportAffairDTO);
|
|
|
+
|
|
|
+ if (reportAffairId == null) {
|
|
|
+ throw new XiaoShiException("上传报告事务失败");
|
|
|
+ }
|
|
|
+ //3. 添加报告事务与文件关联
|
|
|
+ List<String> fileGuids = addClaimHistoryDTO.getFileGuids();
|
|
|
+ if (fileGuids != null && !fileGuids.isEmpty()) {
|
|
|
+ List<AssoReportAffairFile> assoReportAffairFiles = new ArrayList<>();
|
|
|
+ fileGuids.forEach(item -> {
|
|
|
+ AssoReportAffairFile assoReportAffairFile = new AssoReportAffairFile();
|
|
|
+ assoReportAffairFile.setReportAffairId(reportAffairId);
|
|
|
+ assoReportAffairFile.setFileGuid(item);
|
|
|
+ assoReportAffairFiles.add(assoReportAffairFile);
|
|
|
+ });
|
|
|
+ assoReportAffairFileService.saveBatch(assoReportAffairFiles);
|
|
|
+ }
|
|
|
+ return reportAffairId;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 更新权要修改历史
|
|
|
+ * @param updateClaimHistoryDTO
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public Integer updateClaimHistory(UpdateClaimHistoryDTO updateClaimHistoryDTO){
|
|
|
+ if (updateClaimHistoryDTO == null) {
|
|
|
+ throw new XiaoShiException("入参为空");
|
|
|
+ }
|
|
|
+ Integer projectId = updateClaimHistoryDTO.getProjectId();
|
|
|
+ Integer reportAffairId = updateClaimHistoryDTO.getClaimHistoryId();
|
|
|
+ if (reportAffairId == null) {
|
|
|
+ throw new XiaoShiException("reportAffairId为空");
|
|
|
+ }
|
|
|
+ if (projectId == null) {
|
|
|
+ throw new XiaoShiException("报告id为空");
|
|
|
+ }
|
|
|
+ //2. 拿到报告事务id,获取报告事务
|
|
|
+ ReportAffair reportAffair = this.getById(reportAffairId);
|
|
|
+ reportAffair.setProjectId(projectId);
|
|
|
+ //发生时间是无效请求日
|
|
|
+ reportAffair.setOccurredTime(updateClaimHistoryDTO.getClaimHistoryTime());
|
|
|
+ //备注
|
|
|
+ reportAffair.setDescription(updateClaimHistoryDTO.getDescription());
|
|
|
+ reportAffair.updateById();
|
|
|
+ //3. 更新报告事务与文件关联
|
|
|
+ List<String> fileGuids = updateClaimHistoryDTO.getFileGuids();
|
|
|
+ assoReportAffairFileService.updateAffairFile(reportAffairId, fileGuids);
|
|
|
+ return reportAffairId;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 上传补充证据及理由
|
|
|
+ * @param addSupplyEvidenceDTO
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public Integer addSupplyEvidence(AddSupplyEvidenceDTO addSupplyEvidenceDTO){
|
|
|
+ if (addSupplyEvidenceDTO == null) {
|
|
|
+ throw new XiaoShiException("入参为空");
|
|
|
+ }
|
|
|
+ Integer projectId = addSupplyEvidenceDTO.getProjectId();
|
|
|
+ if (projectId == null) {
|
|
|
+ throw new XiaoShiException("报告id为空");
|
|
|
+ }
|
|
|
+ //1. 首先上传报告事务,拿到报告事务id
|
|
|
+ ReportAffairDTO reportAffairDTO = new ReportAffairDTO();
|
|
|
+ reportAffairDTO.setProjectId(projectId);
|
|
|
+ //补充证据及理由 6
|
|
|
+ reportAffairDTO.setAffairType(7);
|
|
|
+ //发生时间是无效请求日
|
|
|
+ reportAffairDTO.setOccurredTime(addSupplyEvidenceDTO.getSupplyEvidenceTime());
|
|
|
+ //备注
|
|
|
+ reportAffairDTO.setDescription(addSupplyEvidenceDTO.getDescription());
|
|
|
+ Integer reportAffairId = this.addReportAffair(reportAffairDTO);
|
|
|
+
|
|
|
+ if (reportAffairId == null) {
|
|
|
+ throw new XiaoShiException("上传报告事务失败");
|
|
|
+ }
|
|
|
+ //3. 添加报告事务与文件关联
|
|
|
+ List<String> fileGuids = addSupplyEvidenceDTO.getFileGuids();
|
|
|
+ if (fileGuids != null && !fileGuids.isEmpty()) {
|
|
|
+ List<AssoReportAffairFile> assoReportAffairFiles = new ArrayList<>();
|
|
|
+ fileGuids.forEach(item -> {
|
|
|
+ AssoReportAffairFile assoReportAffairFile = new AssoReportAffairFile();
|
|
|
+ assoReportAffairFile.setReportAffairId(reportAffairId);
|
|
|
+ assoReportAffairFile.setFileGuid(item);
|
|
|
+ assoReportAffairFiles.add(assoReportAffairFile);
|
|
|
+ });
|
|
|
+ assoReportAffairFileService.saveBatch(assoReportAffairFiles);
|
|
|
+ }
|
|
|
+ return reportAffairId;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 更新补充证据及理由
|
|
|
+ * @param updateSupplyEvidenceDTO
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public Integer updateSupplyEvidence(UpdateSupplyEvidenceDTO updateSupplyEvidenceDTO){
|
|
|
+ if (updateSupplyEvidenceDTO == null) {
|
|
|
+ throw new XiaoShiException("入参为空");
|
|
|
+ }
|
|
|
+ Integer projectId = updateSupplyEvidenceDTO.getProjectId();
|
|
|
+ Integer reportAffairId = updateSupplyEvidenceDTO.getSupplyEvidenceId();
|
|
|
+ if (reportAffairId == null) {
|
|
|
+ throw new XiaoShiException("reportAffairId为空");
|
|
|
+ }
|
|
|
+ if (projectId == null) {
|
|
|
+ throw new XiaoShiException("报告id为空");
|
|
|
+ }
|
|
|
+ //2. 拿到报告事务id,获取报告事务
|
|
|
+ ReportAffair reportAffair = this.getById(reportAffairId);
|
|
|
+ reportAffair.setProjectId(projectId);
|
|
|
+ //发生时间是无效请求日
|
|
|
+ reportAffair.setOccurredTime(updateSupplyEvidenceDTO.getSupplyEvidenceTime());
|
|
|
+ //备注
|
|
|
+ reportAffair.setDescription(updateSupplyEvidenceDTO.getDescription());
|
|
|
+ reportAffair.updateById();
|
|
|
+ //3. 更新报告事务与文件关联
|
|
|
+ List<String> fileGuids = updateSupplyEvidenceDTO.getFileGuids();
|
|
|
+ assoReportAffairFileService.updateAffairFile(reportAffairId, fileGuids);
|
|
|
+ return reportAffairId;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 装载权利要求修改记录
|
|
|
+ * @param reportAffairVO
|
|
|
+ */
|
|
|
+ public void loadClaimHistory(ReportAffairVO reportAffairVO) {
|
|
|
+ Integer reportAffairId = reportAffairVO.getId();
|
|
|
+ ClaimHistoryVO claimHistoryVO = new ClaimHistoryVO();
|
|
|
+ ReportAffair reportAffair = this.getById(reportAffairId);
|
|
|
+ claimHistoryVO.setClaimHistoryId(reportAffairId);
|
|
|
+ claimHistoryVO.setDescription(reportAffair.getDescription());
|
|
|
+ claimHistoryVO.setClaimHistoryTime(reportAffair.getOccurredTime());
|
|
|
+ claimHistoryVO.setProjectId(reportAffair.getProjectId());
|
|
|
+ reportAffairVO.setClaimHistoryVO(claimHistoryVO);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 装载补充证据及理由
|
|
|
+ * @param reportAffairVO
|
|
|
+ */
|
|
|
+ public void loadSupplyEvidence(ReportAffairVO reportAffairVO) {
|
|
|
+ Integer reportAffairId = reportAffairVO.getId();
|
|
|
+ SupplyEvidenceVO supplyEvidenceVO = new SupplyEvidenceVO();
|
|
|
+ ReportAffair reportAffair = this.getById(reportAffairId);
|
|
|
+ supplyEvidenceVO.setSupplyEvidenceId(reportAffairId);
|
|
|
+ supplyEvidenceVO.setDescription(reportAffair.getDescription());
|
|
|
+ supplyEvidenceVO.setSupplyEvidenceTime(reportAffair.getOccurredTime());
|
|
|
+ supplyEvidenceVO.setProjectId(reportAffair.getProjectId());
|
|
|
+ reportAffairVO.setSupplyEvidenceVO(supplyEvidenceVO);
|
|
|
+ }
|
|
|
+
|
|
|
}
|