zouyu
2026-05-21 c935e18fab3604e493de29b164ea4019244bb182
对外Mes查询外购订单零件批次属性接口开发
已修改4个文件
35 ■■■■■ 文件已修改
inspect-server/src/main/java/com/ruoyi/inspect/controller/IfsPartPropsRecordController.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspect-server/src/main/java/com/ruoyi/inspect/mapper/IfsPartPropsRecordMapper.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspect-server/src/main/java/com/ruoyi/inspect/service/IfsPartPropsRecordService.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspect-server/src/main/java/com/ruoyi/inspect/service/impl/IfsPartPropsRecordServiceImpl.java 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspect-server/src/main/java/com/ruoyi/inspect/controller/IfsPartPropsRecordController.java
@@ -1,5 +1,7 @@
package com.ruoyi.inspect.controller;
import com.ruoyi.basic.dto.IfsInventoryQuantityDto;
import com.ruoyi.common.annotation.Anonymous;
import com.ruoyi.common.core.domain.Result;
import com.ruoyi.inspect.dto.IfsPartPropsRecordDTO;
import com.ruoyi.inspect.service.IfsPartPropsRecordService;
@@ -31,4 +33,11 @@
        return Result.success(ifsPartPropsRecordService.getOneByIfsId(ifsId));
    }
    @Anonymous
    @ApiOperation(value = "查询ifs订单的零件属性记录")
    @GetMapping("/getIfsPartProps")
    public Result getIfsPartProps(IfsInventoryQuantityDto ifsPartPropsRecordDTO){
        return Result.success(ifsPartPropsRecordService.getIfsPartProps(ifsPartPropsRecordDTO));
    }
}
inspect-server/src/main/java/com/ruoyi/inspect/mapper/IfsPartPropsRecordMapper.java
@@ -19,7 +19,6 @@
    Long selectCountByPartNoAndLotBatchNo(@Param("partNo") String partNo, @Param("lotBatchNo") String lotBatchNo);
    IfsPartPropsRecordDTO selectOneByContract(@Param("dto") IfsInventoryQuantityDto ifsInventoryQuantityDto);
}
inspect-server/src/main/java/com/ruoyi/inspect/service/IfsPartPropsRecordService.java
@@ -17,4 +17,6 @@
    IfsPartPropsRecord getOneByIfsId(Long ifsId);
    IfsPartPropsRecordDTO getOneByContract(IfsInventoryQuantityDto ifsInventoryQuantityDto);
    IfsPartPropsRecordDTO getIfsPartProps(IfsInventoryQuantityDto ifsPartPropsRecordDTO);
}
inspect-server/src/main/java/com/ruoyi/inspect/service/impl/IfsPartPropsRecordServiceImpl.java
@@ -151,6 +151,29 @@
    public IfsPartPropsRecordDTO getOneByContract(IfsInventoryQuantityDto ifsInventoryQuantityDto) {
        return baseMapper.selectOneByContract(ifsInventoryQuantityDto);
    }
    @Override
    public IfsPartPropsRecordDTO getIfsPartProps(IfsInventoryQuantityDto ifsPartPropsRecordDTO) {
        validateParams(ifsPartPropsRecordDTO);
        ifsPartPropsRecordDTO.setOrderType(OrderType.WG.getValue());
        return baseMapper.selectOneByContract(ifsPartPropsRecordDTO);
    }
    void validateParams(IfsInventoryQuantityDto ifsPartPropsRecordDTO){
        if(Objects.isNull(ifsPartPropsRecordDTO)){
            throw new RuntimeException("传入参数不能为空");
        }
        if(StringUtils.isBlank(ifsPartPropsRecordDTO.getContract())){
            throw new RuntimeException("工厂域不能为空");
        }
        if(StringUtils.isBlank(ifsPartPropsRecordDTO.getUpdateBatchNo())){
            throw new RuntimeException("批次号不能为空");
        }
        if(StringUtils.isBlank(ifsPartPropsRecordDTO.getPartNo())){
            throw new RuntimeException("零件号不能为空");
        }
    }
}