zouyu
2026-03-17 519879ccc3b1873a4a6a94757d842b7e422c0e2d
inspect-server/src/main/java/com/ruoyi/inspect/service/impl/RawMaterialOrderServiceImpl.java
@@ -175,7 +175,7 @@
     * @return
     */
    @Override
    public int inspectionReport(List<Long> ids,String orderType) {
    public int inspectionReport(List<Long> ids,String orderType,String materialProp) {
        Integer userId = SecurityUtils.getUserId().intValue();
        ifsInventoryQuantityMapper.update(null, Wrappers.<IfsInventoryQuantity>lambdaUpdate()
                .in(IfsInventoryQuantity::getId, ids)
@@ -183,6 +183,7 @@
                .set(IfsInventoryQuantity::getDeclareUserId, userId)
                .set(IfsInventoryQuantity::getIsInspect, 1)
                .set(IfsInventoryQuantity::getOrderType,orderType)
                .set(IfsInventoryQuantity::getMaterialProp,materialProp)
                .set(IfsInventoryQuantity::getDeclareDate, LocalDateTime.now())
        );
        threadPoolTaskExecutor.execute(() -> {
@@ -256,7 +257,7 @@
            throw new ErrorException("报检失败,非法的销售订单分类枚举");
        }
        //批次号字母转大写
        ifsInventoryQuantity.setUpdateBatchNo(ifsInventoryQuantity.getUpdateBatchNo().toUpperCase(Locale.ROOT));
        ifsInventoryQuantity.setUpdateBatchNo(ifsInventoryQuantity.getUpdateBatchNo().trim().toUpperCase(Locale.ROOT));
        ifsInventoryQuantityMapper.update(null, Wrappers.<IfsInventoryQuantity>lambdaUpdate()
                .eq(IfsInventoryQuantity::getId, ifsInventoryQuantity.getId())
                .set(IfsInventoryQuantity::getDeclareUser, userMapper.selectById(userId).getName())
@@ -265,6 +266,7 @@
                .set(IfsInventoryQuantity::getDeclareDate, LocalDateTime.now())
                .set(IfsInventoryQuantity::getUpdateBatchNo, ifsInventoryQuantity.getUpdateBatchNo())
                .set(IfsInventoryQuantity::getOrderType,ifsInventoryQuantity.getOrderType())
                .set(IfsInventoryQuantity::getMaterialProp,ifsInventoryQuantity.getMaterialProp())
        );
        threadPoolTaskExecutor.execute(() -> {
@@ -622,6 +624,9 @@
        ifsInventoryQuantity.setSupplierName(insOrder.getSupplierName());
        ifsInventoryQuantity.setUpdateBatchNo(insOrder.getUpdateBatchNo());
        ifsInventoryQuantity.setDeclareDate(insOrder.getDeclareDate());
        //铜材料下单默认值
        ifsInventoryQuantity.setOrderType(OrderType.RAW.getValue());
        ifsInventoryQuantity.setMaterialProp("01Cu");
        ifsInventoryQuantityMapper.insert(ifsInventoryQuantity);
@@ -972,7 +977,7 @@
        if(Objects.nonNull(splitOrderList) && !splitOrderList.isEmpty()){
            List<Long> ids = splitOrderList.stream().map(IfsInventoryQuantity::getId).collect(Collectors.toList());
            ids.add(ifsInventoryQuantity.getId());
            this.inspectionReport(ids,OrderType.RAW.getValue());
            this.inspectionReport(ids,OrderType.RAW.getValue(),orderSplitDTO.getMaterialProp());
        }
        //勾选同步到MES,保存订单拆分记录
        if(orderSplitDTO.getPushToMes()){