zouyu
2025-09-26 9004d51f5b6096827b5c66b444729cb554997ec4
inspect-server/src/main/java/com/ruoyi/inspect/service/impl/InsReportServiceImpl.java
@@ -49,6 +49,7 @@
import org.springframework.core.io.ClassPathResource;
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Isolation;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.multipart.MultipartFile;
@@ -796,7 +797,7 @@
    @Override
    @Transactional(rollbackFor = Exception.class)
    @Transactional(rollbackFor = Exception.class,isolation = Isolation.READ_COMMITTED)
    public void isRawMaterial(InsOrder insOrder,Boolean registerInsResults,Boolean hasExemption) {
        IfsInventoryQuantity one = ifsInventoryQuantityMapper.selectOne(new LambdaQueryWrapper<IfsInventoryQuantity>()
                .eq(IfsInventoryQuantity::getId, insOrder.getIfsInventoryId()));
@@ -822,9 +823,9 @@
                    if(Objects.isNull(vo.getInsOrderId())){
                        rawMaterialOrderService.rawOrderRelease(vo.getId(), vo.getPartDesc());
                    }else if(Objects.equals(vo.getInsOrderId(),insOrder.getId())){
                        toLocation = insOrderService.moveRawMaterial(one);
                        toLocation = insOrderService.moveRawMaterial(vo);
                    }else if(Objects.nonNull(vo.getInsResult()) && 1 == vo.getInsResult()){
                        toLocation = insOrderService.moveRawMaterial(one);
                        toLocation = insOrderService.moveRawMaterial(vo);
                    }
                }
            }else{
@@ -855,23 +856,23 @@
                        .eq(IfsInventoryQuantity::getId, insOrder.getIfsInventoryId()));
            }
//            threadPoolTaskExecutor.execute(() -> {
//                // 企业微信通知
//                String message = "";
//                message += "检测结果提交通知";
//                message += "\n批次号: " + one.getUpdateBatchNo();
//                message += "\n零件号: " + one.getPartNo();
//                message += "\n零件描述: " + one.getPartDesc();
//                message += "\n供应商名称: " + one.getSupplierName();
//                message += "\n抵达数量: " + one.getQtyArrived().stripTrailingZeros().toPlainString() + one.getBuyUnitMeas();
//                // 发送企业inspectStatus信通知
//                if (inspectStatus == 1) {
//                    message += "\n检测结果: 合格";
//                } else {
//                    message += "\n检测结果: 不合格";
//                }
//                WxCpUtils.informWebHook(wechatProperty.getExaminingUrl(), message);
//            });
            threadPoolTaskExecutor.execute(() -> {
                // 企业微信通知
                String message = "";
                message += "检测结果提交通知";
                message += "\n批次号: " + one.getUpdateBatchNo();
                message += "\n零件号: " + one.getPartNo();
                message += "\n零件描述: " + one.getPartDesc();
                message += "\n供应商名称: " + one.getSupplierName();
                message += "\n抵达数量: " + one.getQtyArrived().stripTrailingZeros().toPlainString() + one.getBuyUnitMeas();
                // 发送企业inspectStatus信通知
                if (inspectStatus == 1) {
                    message += "\n检测结果: 合格";
                } else {
                    message += "\n检测结果: 不合格";
                }
                WxCpUtils.informWebHook(wechatProperty.getExaminingUrl(), message);
            });
        }