技术监督代码bug修改
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -48,9 +48,9 @@ public class SupvFileController extends BaseController {
|
||||
@PostMapping("detail")
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON,operateType = OperateType.DOWNLOAD)
|
||||
@ApiOperation("监督计划问题附件下载")
|
||||
public HttpResult<Object> detail(HttpServletResponse response, @RequestParam("busId") String busId, @RequestParam("type") Integer type){
|
||||
public HttpResult<Object> 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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,6 +25,6 @@ public interface ISupvFileService extends IService<SupvFile> {
|
||||
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);
|
||||
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ public class SupvFileServiceImpl extends ServiceImpl<SupvFileMapper, SupvFile> i
|
||||
|
||||
@Override
|
||||
public boolean planUpload(MultipartFile file, String planId, Integer type,String attachmentType) {
|
||||
SupvFile supvFile = this.getOne(new LambdaQueryWrapper<SupvFile>().eq(SupvFile::getBusiId,planId).eq(SupvFile::getType,type));
|
||||
SupvFile supvFile = this.getOne(new LambdaQueryWrapper<SupvFile>().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<SupvFileMapper, SupvFile> i
|
||||
}
|
||||
|
||||
@Override
|
||||
public String detail(HttpServletResponse response,String busId, Integer type) {
|
||||
SupvFile supvFile = this.getOne(new LambdaQueryWrapper<SupvFile>().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<SupvFile>().eq(SupvFile::getBusiId,busId).eq(SupvFile::getType,type).eq(SupvFile::getAttachmentType,attachmentType));
|
||||
if(Objects.nonNull(supvFile)){
|
||||
fileStorageUtil.downloadStream(response,supvFile.getFileUrl());
|
||||
return null;
|
||||
|
||||
@@ -110,9 +110,16 @@ public class SupvProblemServiceImpl extends ServiceImpl<SupvProblemMapper, SupvP
|
||||
item.setDutyOrgName(mapCode.get(item.getDutyOrgId()).getName());
|
||||
}
|
||||
|
||||
SupvFile supvFile = supvFileMapper.selectOne(new LambdaQueryWrapper<SupvFile>().eq(SupvFile::getBusiId, item.getProblemId()).eq(SupvFile::getType, 1));
|
||||
if (Objects.nonNull(supvFile)) {
|
||||
item.setAttachmentName(supvFile.getAttachmentName());
|
||||
List<SupvFile> supvFileList = supvFileMapper.selectList(new LambdaQueryWrapper<SupvFile>().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());
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user