技术监督代码bug修改
This commit is contained in:
@@ -127,8 +127,14 @@ public class SupvProblem extends BaseEntity {
|
|||||||
private String remark;
|
private String remark;
|
||||||
|
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
|
@ApiModelProperty(name = "attachmentName",value = "盖章报告")
|
||||||
private String attachmentName;
|
private String attachmentName;
|
||||||
|
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
@ApiModelProperty(name = "attachmentNameTwo",value = "佐证材料")
|
||||||
|
private String attachmentNameTwo;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -48,9 +48,9 @@ public class SupvFileController extends BaseController {
|
|||||||
@PostMapping("detail")
|
@PostMapping("detail")
|
||||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON,operateType = OperateType.DOWNLOAD)
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON,operateType = OperateType.DOWNLOAD)
|
||||||
@ApiOperation("监督计划问题附件下载")
|
@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");
|
String methodDescribe = getMethodDescribe("detail");
|
||||||
iSupvFileService.detail(response,busId,type);
|
iSupvFileService.detail(response,busId,type,attachmentType);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,6 +25,6 @@ public interface ISupvFileService extends IService<SupvFile> {
|
|||||||
boolean planUpload(MultipartFile file,String planId, Integer type,String attachmentType);
|
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
|
@Override
|
||||||
public boolean planUpload(MultipartFile file, String planId, Integer type,String attachmentType) {
|
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);
|
String url = fileStorageUtil.uploadMultipart(file, OssPath.SURVEY_RESULT);
|
||||||
SupvFile supvFilePO = new SupvFile();
|
SupvFile supvFilePO = new SupvFile();
|
||||||
supvFilePO.setAttachmentName(file.getOriginalFilename());
|
supvFilePO.setAttachmentName(file.getOriginalFilename());
|
||||||
@@ -57,8 +57,8 @@ public class SupvFileServiceImpl extends ServiceImpl<SupvFileMapper, SupvFile> i
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String detail(HttpServletResponse response,String busId, Integer 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));
|
SupvFile supvFile = this.getOne(new LambdaQueryWrapper<SupvFile>().eq(SupvFile::getBusiId,busId).eq(SupvFile::getType,type).eq(SupvFile::getAttachmentType,attachmentType));
|
||||||
if(Objects.nonNull(supvFile)){
|
if(Objects.nonNull(supvFile)){
|
||||||
fileStorageUtil.downloadStream(response,supvFile.getFileUrl());
|
fileStorageUtil.downloadStream(response,supvFile.getFileUrl());
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
@@ -110,9 +110,16 @@ public class SupvProblemServiceImpl extends ServiceImpl<SupvProblemMapper, SupvP
|
|||||||
item.setDutyOrgName(mapCode.get(item.getDutyOrgId()).getName());
|
item.setDutyOrgName(mapCode.get(item.getDutyOrgId()).getName());
|
||||||
}
|
}
|
||||||
|
|
||||||
SupvFile supvFile = supvFileMapper.selectOne(new LambdaQueryWrapper<SupvFile>().eq(SupvFile::getBusiId, item.getProblemId()).eq(SupvFile::getType, 1));
|
List<SupvFile> supvFileList = supvFileMapper.selectList(new LambdaQueryWrapper<SupvFile>().eq(SupvFile::getBusiId, item.getProblemId()).eq(SupvFile::getType, 1));
|
||||||
if (Objects.nonNull(supvFile)) {
|
if (CollUtil.isNotEmpty(supvFileList)) {
|
||||||
item.setAttachmentName(supvFile.getAttachmentName());
|
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