zhuo
2025-02-25 2c6f87e7a430f52f709c4686dbecc767ca377e2c
inspect-server/src/main/java/com/ruoyi/inspect/service/impl/InsOrderPlanServiceImpl.java
@@ -30,6 +30,7 @@
import com.ruoyi.basic.pojo.IfsInventoryQuantity;
import com.ruoyi.basic.pojo.StandardTemplate;
import com.ruoyi.basic.service.StandardTemplateService;
import com.ruoyi.common.constant.DictDataConstants;
import com.ruoyi.common.constant.InsOrderTypeConstants;
import com.ruoyi.common.core.domain.entity.Custom;
import com.ruoyi.common.core.domain.entity.InformationNotification;
@@ -1514,9 +1515,9 @@
            standardMethod2.append("、").append(s);
        }
        standardMethod2.replace(0, 1, "");
        // todo: 查询字典检测类型
//        List<SysDictData> sysDictData = iSysDictTypeService.selectDictDataByName("");
        String orderType = null;
        // 样品类型
        String orderType = iSysDictTypeService.selectLabelByDict(DictDataConstants.CHECK_TYPE, insOrder.getOrderType());
        List<RowRenderData> rows = new ArrayList<>();
        List<TextRenderData> text = new ArrayList<>();
@@ -2275,18 +2276,23 @@
        String modelStr = CollUtil.join(models, "\n");
        String finalModelStr = modelStr;
        // todo: 查询字典
        //        List<SysDictData> sysDictData = iSysDictTypeService.selectDictDataByName("");
        // 检测类型
        String orderType = null;
        String formType = null;
        orderType = iSysDictTypeService.selectLabelByDict(DictDataConstants.CHECK_TYPE, insOrder.getOrderType());
        // 判断第一个字典是否为空
        if (StringUtils.isBlank(orderType)) {
            orderType = iSysDictTypeService.selectLabelByDict(DictDataConstants.CHECK_TYPE1, insOrder.getOrderType());
        }
        // 来样方式
        String formType = iSysDictTypeService.selectLabelByDict(DictDataConstants.FORM_TYPE, insOrder.getFormType());
        // 样品状态
        String sampleStatus = null;
        String sampleStatus = iSysDictTypeService.selectLabelByDict(DictDataConstants.SAMPLE_STATUS_LIST, insOrder.getSampleStatus());;
        ConfigureBuilder builder = Configure.builder();
        builder.useSpringEL(true);
        List<Map<String, String>> finalDeviceList = deviceList;
        Integer userId = insSampleUserMapper.selectOne(Wrappers.<InsSampleUser>lambdaQuery().eq(InsSampleUser::getInsSampleId, orderId).last("limit 1")).getUserId();
        Custom custom = customMapper.selectById(insOrder.getCompanyId());
        // 查询判断是否有不判定项目,和全都是判定项
@@ -2379,6 +2385,7 @@
        String finalResultCh = resultCh;
        String finalResultEn = resultEn;
        String finalOrderType = orderType;
        InputStream inputStream = this.getClass().getResourceAsStream("/static/report-template.docx");
        XWPFTemplate template = XWPFTemplate.compile(inputStream, builder.build()).render(
                new HashMap<String, Object>() {{
@@ -2403,7 +2410,7 @@
                    put("images", images);
                    put("examineUrl", null);
                    put("ratifyUrl", null);
                    put("orderType", orderType);
                    put("orderType", finalOrderType);
                    put("getTime", finalSendTime.format(DateTimeFormatter.ofPattern("yyyy年MM月dd日")));
                    put("getTimeEn", monthNames[finalSendTime.getMonthValue() - 1] + " " + finalSendTime.format(DateTimeFormatter.ofPattern("dd, yyyy")));
                    put("seal1", null);