| | |
| | | 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; |
| | |
| | | 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<>(); |
| | |
| | | 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()); |
| | | |
| | | // 查询判断是否有不判定项目,和全都是判定项 |
| | |
| | | |
| | | 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>() {{ |
| | |
| | | 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); |