|
@@ -2,8 +2,11 @@ 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.AddJudgmentDTO;
|
|
|
import cn.cslg.pas.common.dto.invalidDTO.UpdateAdminProceedDTO;
|
|
|
+import cn.cslg.pas.common.dto.invalidDTO.UpdateJudgmentDTO;
|
|
|
import cn.cslg.pas.common.vo.invalidVO.AdminProceedVO;
|
|
|
+import cn.cslg.pas.common.vo.invalidVO.JudgementVO;
|
|
|
import cn.cslg.pas.common.vo.invalidVO.OralTrailVO;
|
|
|
import cn.cslg.pas.domain.business.AdminProceed;
|
|
|
import cn.cslg.pas.domain.business.AssoReportAffairFile;
|
|
@@ -34,6 +37,11 @@ public class AdminProceedService extends ServiceImpl<AdminProceedMapper, AdminPr
|
|
|
@Autowired
|
|
|
private AssoReportAffairFileService assoReportAffairFileService;
|
|
|
|
|
|
+ /**
|
|
|
+ * 上传行政诉讼判决书
|
|
|
+ * @param addDto
|
|
|
+ * @return
|
|
|
+ */
|
|
|
public Integer add(AddAdminProceedDTO addDto){
|
|
|
if (addDto == null) {
|
|
|
throw new XiaoShiException("入参为空");
|
|
@@ -76,6 +84,11 @@ public class AdminProceedService extends ServiceImpl<AdminProceedMapper, AdminPr
|
|
|
return reportAffairId;
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 查询
|
|
|
+ * @param reportAffairId
|
|
|
+ * @return
|
|
|
+ */
|
|
|
public AdminProceedVO getAdminProceed(Integer reportAffairId) {
|
|
|
LambdaQueryWrapper<AdminProceed> queryWrapper = new LambdaQueryWrapper<>();
|
|
|
queryWrapper.eq(AdminProceed::getReportAffairId, reportAffairId);
|
|
@@ -91,7 +104,7 @@ public class AdminProceedService extends ServiceImpl<AdminProceedMapper, AdminPr
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 更新行政记录
|
|
|
+ * 更新行政诉讼书
|
|
|
* @param updateDTO
|
|
|
* @return
|
|
|
*/
|
|
@@ -125,11 +138,40 @@ public class AdminProceedService extends ServiceImpl<AdminProceedMapper, AdminPr
|
|
|
reportAffair.updateById();
|
|
|
//3. 更新报告事务与文件关联
|
|
|
List<String> fileGuids = updateDTO.getFileGuids();
|
|
|
- if (fileGuids != null && !fileGuids.isEmpty()) {
|
|
|
- LambdaQueryWrapper<AssoReportAffairFile> queryWrapper = new LambdaQueryWrapper<>();
|
|
|
- queryWrapper.eq(AssoReportAffairFile::getReportAffairId, reportAffairId);
|
|
|
- assoReportAffairFileService.remove(queryWrapper);
|
|
|
+ assoReportAffairFileService.updateAffairFile(reportAffairId, fileGuids);
|
|
|
+ return reportAffairId;
|
|
|
+ }
|
|
|
|
|
|
+ /**
|
|
|
+ * 上传行政诉讼判决书
|
|
|
+ * @param addJudgmentDTO
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public Integer addJudgment(AddJudgmentDTO addJudgmentDTO){
|
|
|
+ if (addJudgmentDTO == null) {
|
|
|
+ throw new XiaoShiException("入参为空");
|
|
|
+ }
|
|
|
+ Integer projectId = addJudgmentDTO.getProjectId();
|
|
|
+ if (projectId == null) {
|
|
|
+ throw new XiaoShiException("报告id为空");
|
|
|
+ }
|
|
|
+ //1. 首先上传报告事务,拿到报告事务id
|
|
|
+ ReportAffairDTO reportAffairDTO = new ReportAffairDTO();
|
|
|
+ reportAffairDTO.setProjectId(projectId);
|
|
|
+ //行政诉讼判决书 5
|
|
|
+ reportAffairDTO.setAffairType(5);
|
|
|
+ //发生时间是口审时间
|
|
|
+ reportAffairDTO.setOccurredTime(addJudgmentDTO.getJudgmentTime());
|
|
|
+ //备注
|
|
|
+ reportAffairDTO.setDescription(addJudgmentDTO.getDescription());
|
|
|
+ Integer reportAffairId = reportAffairService.addReportAffair(reportAffairDTO);
|
|
|
+
|
|
|
+ if (reportAffairId == null) {
|
|
|
+ throw new XiaoShiException("上传报告事务失败");
|
|
|
+ }
|
|
|
+ //3. 添加报告事务与文件关联
|
|
|
+ List<String> fileGuids = addJudgmentDTO.getFileGuids();
|
|
|
+ if (fileGuids != null && !fileGuids.isEmpty()) {
|
|
|
List<AssoReportAffairFile> assoReportAffairFiles = new ArrayList<>();
|
|
|
fileGuids.forEach(item -> {
|
|
|
AssoReportAffairFile assoReportAffairFile = new AssoReportAffairFile();
|
|
@@ -142,4 +184,51 @@ public class AdminProceedService extends ServiceImpl<AdminProceedMapper, AdminPr
|
|
|
return reportAffairId;
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 更新行政诉讼判决书
|
|
|
+ * @param updateJudgmentDTO
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public Integer updateJudgment(UpdateJudgmentDTO updateJudgmentDTO){
|
|
|
+ if (updateJudgmentDTO == null) {
|
|
|
+ throw new XiaoShiException("入参为空");
|
|
|
+ }
|
|
|
+ Integer projectId = updateJudgmentDTO.getProjectId();
|
|
|
+ Integer reportAffairId = updateJudgmentDTO.getJudgmentId();
|
|
|
+ if (reportAffairId == null) {
|
|
|
+ throw new XiaoShiException("id为空");
|
|
|
+ }
|
|
|
+ if (projectId == null) {
|
|
|
+ throw new XiaoShiException("报告id为空");
|
|
|
+ }
|
|
|
+ //2. 拿到报告事务id,获取报告事务
|
|
|
+ ReportAffair reportAffair = reportAffairService.getById(reportAffairId);
|
|
|
+ reportAffair.setProjectId(projectId);
|
|
|
+ //发生时间是无效请求日
|
|
|
+ reportAffair.setOccurredTime(updateJudgmentDTO.getJudgmentTime());
|
|
|
+ //备注
|
|
|
+ reportAffair.setDescription(updateJudgmentDTO.getDescription());
|
|
|
+ reportAffair.updateById();
|
|
|
+ //3. 更新报告事务与文件关联
|
|
|
+ List<String> fileGuids = updateJudgmentDTO.getFileGuids();
|
|
|
+ assoReportAffairFileService.updateAffairFile(reportAffairId, fileGuids);
|
|
|
+ return reportAffairId;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 查询行政诉讼判决书
|
|
|
+ * @param reportAffairId
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public JudgementVO getJudgment(Integer reportAffairId) {
|
|
|
+ ReportAffair reportAffair = reportAffairService.getById(reportAffairId);
|
|
|
+ JudgementVO judgementVO = new JudgementVO();
|
|
|
+ if (reportAffair != null) {
|
|
|
+ BeanUtils.copyProperties(reportAffair, judgementVO);
|
|
|
+ judgementVO.setJudgmentId(reportAffair.getId());
|
|
|
+ judgementVO.setJudgmentTime(reportAffair.getOccurredTime());
|
|
|
+ }
|
|
|
+ return judgementVO;
|
|
|
+ }
|
|
|
+
|
|
|
}
|