zouyu
6 天以前 992deae2bf67803b5158673aec993bd60ad5c2d1
inspect-server/src/main/java/com/ruoyi/inspect/service/impl/InsOrderPlanServiceImpl.java
@@ -11,6 +11,7 @@
import com.alibaba.fastjson.JSONObject;
import com.aspose.words.License;
import com.aspose.words.SaveFormat;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
@@ -168,9 +169,7 @@
    public IPage<InsOrderPlanVO> selectInsOrderPlanList(Page page, InsOrderPlanDTO insOrderPlanDTO) {
        // todo: 仅看自己或者实验室
        //获取当前人所属实验室id
        String laboratory = null;
        String userName = null;
        Integer userId = null;
        if (ObjectUtil.isNotEmpty(insOrderPlanDTO.getUserId())) {
@@ -919,24 +918,23 @@
        InsSample insSample = insSampleMapper.selectOne(Wrappers.<InsSample>lambdaQuery()
                .eq(InsSample::getInsOrderId, orderId)
                .last("limit 1"));
//        threadPoolTaskExecutor.execute(() -> {
//            String message = "";
//            message += "耐丝系统检验任务复核通知";
//            message += "\n提交人: " + userName;
//            message += "\n委托编号: " + order.getEntrustCode();
//            message += "\n样品名称: " + insSample.getModel();
//            message += "\n规格型号: " + order.getPartDetail();
//            if (ifsInventoryQuantity != null) {
//                message += "\n批次号: " + ifsInventoryQuantity.getUpdateBatchNo();
//            }
//            //发送企业微信消息通知  提交复核
//            try {
//                WxCpUtils.inform(sendUserAccount, message, null);
//            } catch (Exception e) {
//                throw new RuntimeException(e);
//            }
//        });
        threadPoolTaskExecutor.execute(() -> {
            String message = "";
            message += "耐丝系统检验任务复核通知";
            message += "\n提交人: " + userName;
            message += "\n委托编号: " + order.getEntrustCode();
            message += "\n样品名称: " + insSample.getModel();
            message += "\n规格型号: " + order.getPartDetail();
            if (ifsInventoryQuantity != null) {
                message += "\n批次号: " + ifsInventoryQuantity.getUpdateBatchNo();
            }
            //发送企业微信消息通知  提交复核
            try {
                WxCpUtils.inform(sendUserAccount, message, null);
            } catch (Exception e) {
                throw new RuntimeException(e);
            }
        });
        // 14.ifs移库(原材料需要进行移库操作) --> 最后执行,因为失败无法回滚
        if (ifsInventoryQuantity != null) {
            // 登记检验结果
@@ -950,8 +948,6 @@
                // 添加分析数据
                addAnalysis(productList, ifsInventoryQuantity, order, sendUserAccount);
            });
        } else {
            // 修改成品状态
            // 判断是否有不合格
@@ -966,7 +962,6 @@
                        .set(InsOrder::getInsResult, 0));
            }
        }
        return 1;
    }