diff --git a/pqs-process/process-api/src/main/java/com/njcn/process/pojo/po/SupvProblem.java b/pqs-process/process-api/src/main/java/com/njcn/process/pojo/po/SupvProblem.java index 7b620b491..ca512269e 100644 --- a/pqs-process/process-api/src/main/java/com/njcn/process/pojo/po/SupvProblem.java +++ b/pqs-process/process-api/src/main/java/com/njcn/process/pojo/po/SupvProblem.java @@ -127,8 +127,14 @@ public class SupvProblem extends BaseEntity { private String remark; @TableField(exist = false) + @ApiModelProperty(name = "attachmentName",value = "盖章报告") private String attachmentName; + @TableField(exist = false) + @ApiModelProperty(name = "attachmentNameTwo",value = "佐证材料") + private String attachmentNameTwo; + + } diff --git a/pqs-process/process-boot/src/main/java/com/njcn/process/controller/SupvFileController.java b/pqs-process/process-boot/src/main/java/com/njcn/process/controller/SupvFileController.java index 51eee5cdf..78c4fdbe9 100644 --- a/pqs-process/process-boot/src/main/java/com/njcn/process/controller/SupvFileController.java +++ b/pqs-process/process-boot/src/main/java/com/njcn/process/controller/SupvFileController.java @@ -48,9 +48,9 @@ public class SupvFileController extends BaseController { @PostMapping("detail") @OperateInfo(info = LogEnum.BUSINESS_COMMON,operateType = OperateType.DOWNLOAD) @ApiOperation("监督计划问题附件下载") - public HttpResult detail(HttpServletResponse response, @RequestParam("busId") String busId, @RequestParam("type") Integer type){ + public HttpResult detail(HttpServletResponse response, @RequestParam("busId") String busId, @RequestParam("type") Integer type,@RequestParam("attachmentType") String attachmentType){ String methodDescribe = getMethodDescribe("detail"); - iSupvFileService.detail(response,busId,type); + iSupvFileService.detail(response,busId,type,attachmentType); return null; } } diff --git a/pqs-process/process-boot/src/main/java/com/njcn/process/service/ISupvFileService.java b/pqs-process/process-boot/src/main/java/com/njcn/process/service/ISupvFileService.java index c7bbbdce7..a644eac53 100644 --- a/pqs-process/process-boot/src/main/java/com/njcn/process/service/ISupvFileService.java +++ b/pqs-process/process-boot/src/main/java/com/njcn/process/service/ISupvFileService.java @@ -25,6 +25,6 @@ public interface ISupvFileService extends IService { boolean planUpload(MultipartFile file,String planId, Integer type,String attachmentType); - String detail(HttpServletResponse response,String busId,Integer type); + String detail(HttpServletResponse response,String busId,Integer type,String attachmentType); } diff --git a/pqs-process/process-boot/src/main/java/com/njcn/process/service/impl/SupvFileServiceImpl.java b/pqs-process/process-boot/src/main/java/com/njcn/process/service/impl/SupvFileServiceImpl.java index e62e3850c..38832b296 100644 --- a/pqs-process/process-boot/src/main/java/com/njcn/process/service/impl/SupvFileServiceImpl.java +++ b/pqs-process/process-boot/src/main/java/com/njcn/process/service/impl/SupvFileServiceImpl.java @@ -37,7 +37,7 @@ public class SupvFileServiceImpl extends ServiceImpl i @Override public boolean planUpload(MultipartFile file, String planId, Integer type,String attachmentType) { - SupvFile supvFile = this.getOne(new LambdaQueryWrapper().eq(SupvFile::getBusiId,planId).eq(SupvFile::getType,type)); + SupvFile supvFile = this.getOne(new LambdaQueryWrapper().eq(SupvFile::getBusiId,planId).eq(SupvFile::getType,type).eq(SupvFile::getAttachmentType,attachmentType)); String url = fileStorageUtil.uploadMultipart(file, OssPath.SURVEY_RESULT); SupvFile supvFilePO = new SupvFile(); supvFilePO.setAttachmentName(file.getOriginalFilename()); @@ -57,8 +57,8 @@ public class SupvFileServiceImpl extends ServiceImpl i } @Override - public String detail(HttpServletResponse response,String busId, Integer type) { - SupvFile supvFile = this.getOne(new LambdaQueryWrapper().eq(SupvFile::getBusiId,busId).eq(SupvFile::getType,type)); + public String detail(HttpServletResponse response,String busId, Integer type,String attachmentType) { + SupvFile supvFile = this.getOne(new LambdaQueryWrapper().eq(SupvFile::getBusiId,busId).eq(SupvFile::getType,type).eq(SupvFile::getAttachmentType,attachmentType)); if(Objects.nonNull(supvFile)){ fileStorageUtil.downloadStream(response,supvFile.getFileUrl()); return null; diff --git a/pqs-process/process-boot/src/main/java/com/njcn/process/service/impl/SupvProblemServiceImpl.java b/pqs-process/process-boot/src/main/java/com/njcn/process/service/impl/SupvProblemServiceImpl.java index dae033133..7bb8bdc02 100644 --- a/pqs-process/process-boot/src/main/java/com/njcn/process/service/impl/SupvProblemServiceImpl.java +++ b/pqs-process/process-boot/src/main/java/com/njcn/process/service/impl/SupvProblemServiceImpl.java @@ -110,9 +110,16 @@ public class SupvProblemServiceImpl extends ServiceImpl().eq(SupvFile::getBusiId, item.getProblemId()).eq(SupvFile::getType, 1)); - if (Objects.nonNull(supvFile)) { - item.setAttachmentName(supvFile.getAttachmentName()); + List supvFileList = supvFileMapper.selectList(new LambdaQueryWrapper().eq(SupvFile::getBusiId, item.getProblemId()).eq(SupvFile::getType, 1)); + if (CollUtil.isNotEmpty(supvFileList)) { + for(SupvFile supvFile:supvFileList){ + if(supvFile.getAttachmentType().equals("01")){ + item.setAttachmentName(supvFile.getAttachmentName()); + }else { + item.setAttachmentNameTwo(supvFile.getAttachmentName()); + } + + } } }