新购接口优化
This commit is contained in:
parent
3b62cf4c24
commit
b01b199ed5
|
|
@ -121,7 +121,7 @@ public class PurchaseCheckDetailsController extends BaseController {
|
|||
@GetMapping("/fileList")
|
||||
@SysLog(title = "新购验收任务明细报告查询", businessType = OperaType.QUERY, module = "物资新购->根据任务id查询物资报告附件")
|
||||
public AjaxResult getFileList(PurchaseCheckFileDto purchaseCheckFileDto) {
|
||||
return success(purchaseCheckDetailsService.selectPurchaseCheckFileListByTaskId(Long.valueOf(purchaseCheckFileDto.getTaskId()), purchaseCheckFileDto.getTypeId()));
|
||||
return success(purchaseCheckDetailsService.selectPurchaseCheckFileListByTaskType(purchaseCheckFileDto.getTaskType(), purchaseCheckFileDto.getTypeId()));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -31,6 +31,14 @@ public class PurchaseCheckFileDto {
|
|||
@NotBlank(message = "任务ID不能为空")
|
||||
private String taskId;
|
||||
|
||||
@ApiModelProperty(value = "任务类型")
|
||||
@NotBlank(message = "任务类型不能为空")
|
||||
private Long taskType;
|
||||
|
||||
@ApiModelProperty(value = "文件类型")
|
||||
@NotBlank(message = "文件类型不能为空")
|
||||
private String fileType;
|
||||
|
||||
@ApiModelProperty(value = "物资类型ID")
|
||||
@NotNull(message = "物资类型ID不能为空")
|
||||
private Long typeId;
|
||||
|
|
|
|||
|
|
@ -15,10 +15,10 @@ public interface PurchaseCheckFileMapper {
|
|||
|
||||
/**
|
||||
* 根据任务id查询新购验收任务详细报告列表--Join查询
|
||||
* @param taskId 任务id
|
||||
* @param taskType 任务id
|
||||
* @param typeId 规格id
|
||||
*/
|
||||
List<PurchaseCheckFileDto> selectPurchaseCheckFileListByTaskId(@Param("taskId") Long taskId, @Param("typeId") Long typeId);
|
||||
List<PurchaseCheckFileDto> selectPurchaseCheckFileListByTaskType(@Param("taskType") Long taskType, @Param("typeId") Long typeId);
|
||||
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ public interface IPurchaseCheckDetailsService {
|
|||
* 根据任务ID查询报告附件列表
|
||||
* @param taskId 任务id
|
||||
*/
|
||||
List<PurchaseCheckFileDto> selectPurchaseCheckFileListByTaskId(Long taskId, Long typeId);
|
||||
List<PurchaseCheckFileDto> selectPurchaseCheckFileListByTaskType(Long taskId, Long typeId);
|
||||
|
||||
/**
|
||||
* 新增报告附件
|
||||
|
|
|
|||
|
|
@ -54,12 +54,12 @@ public class PurchaseCheckDetailsServiceImpl implements IPurchaseCheckDetailsSer
|
|||
/**
|
||||
* 根据任务ID查询报告附件列表
|
||||
*
|
||||
* @param taskId 任务id
|
||||
* @param taskType 任务类型
|
||||
*/
|
||||
@Override
|
||||
public List<PurchaseCheckFileDto> selectPurchaseCheckFileListByTaskId(Long taskId, Long typeId) {
|
||||
public List<PurchaseCheckFileDto> selectPurchaseCheckFileListByTaskType(Long taskType, Long typeId) {
|
||||
try {
|
||||
return purchaseCheckFileMapper.selectPurchaseCheckFileListByTaskId(taskId, typeId);
|
||||
return purchaseCheckFileMapper.selectPurchaseCheckFileListByTaskType(taskType, typeId);
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException("SQL执行错误:" + e.getMessage());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</sql>
|
||||
|
||||
|
||||
<select id="selectPurchaseCheckFileListByTaskId" parameterType="Long" resultMap="PurchaseCheckFileResult">
|
||||
<select id="selectPurchaseCheckFileListByTaskType" parameterType="Long" resultMap="PurchaseCheckFileResult">
|
||||
<include refid="selectPurchaseCheckFileJoinVo"/>
|
||||
</select>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue