| | |
| | | <mapper namespace="com.yuanchu.mom.mapper.CertificationMapper"> |
| | | <select id="getCertificationDetail" resultType="com.yuanchu.mom.pojo.Certification"> |
| | | select b.* |
| | | from ( select a.`name`, a.`code`,a.organization,a.explanation,a.first_issuance_date,a.latest_issuance_date,c.expire_time FROM |
| | | (SELECT id,name,MIN(date_of_issuance) AS first_issuance_date, |
| | | MAX(date_of_issuance) AS latest_issuance_date, |
| | | c.`code`,c.organization,c.explanation |
| | | FROM |
| | | certification c |
| | | from ( select a.`name`, |
| | | a.`code`,a.organization,a.explanation,a.first_issuance_date,a.latest_issuance_date,c.expire_time FROM |
| | | (SELECT id,name,MIN(date_of_issuance) AS first_issuance_date, |
| | | MAX(date_of_issuance) AS latest_issuance_date, |
| | | c.`code`,c.organization,c.explanation |
| | | FROM |
| | | certification c |
| | | <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''"> |
| | | ${ew.customSqlSegment} |
| | | </if> |
| | | GROUP BY |
| | | name) a left join certification c on a.id=c.id |
| | | GROUP BY |
| | | name) a left join certification c on a.id=c.id |
| | | ) b |
| | | </select> |
| | | </mapper> |
| | |
| | | info.setJumpPath("b1-inspect-order-plan"); |
| | | informationNotificationService.addInformationNotification(info); |
| | | //todo 企业微信消息推送@zss |
| | | /* HashMap<String, Object> map = new HashMap<>(); |
| | | HashMap<String, Object> map = new HashMap<>(); |
| | | String account = userMapper.selectById(userId).getAccount(); |
| | | map.put("touser", account);//接收消息成员的账号'ZT-031292'这种类型(如果有多个用'|'分隔) |
| | | map.put("toparty", "");//接收部门id |
| | |
| | | map.put("safe", 0);//是否保密消息.0否 |
| | | map.put("enable_id_trans", 0);//是否开启id转译.0否 |
| | | map.put("enable_duplicate_check", 0);//是否开启重复消息检查.0否 |
| | | qywxApi.send(map);*/ |
| | | qywxApi.send(map); |
| | | // } |
| | | //复核人--检验单相关负责人 |
| | | InsSampleUser insSampleUser = new InsSampleUser(); |
| | |
| | | /*生成电路试验的站点报告并上传到附件中*/ |
| | | if (submitPlanDto.getLaboratory().equals("电路试验")) { |
| | | wordUtils.generateWord(submitPlanDto.getTerm(), orderState); |
| | | //todo 电路站点报告 正式库部署放开 |
| | | // try { |
| | | // wordUtils.generateWord(submitPlanDto.getTerm(), orderState); |
| | | // } catch (Exception e) { |
| | |
| | | insOrder.setEntrustCode(giveCode.giveCode2("WT-", "ins_order", "-", "yyMMdd")); |
| | | insOrder.setSendTime(LocalDateTime.now()); |
| | | /*todo 根据订单类型判断是否需要推送企业微信 @zss*/ |
| | | /*if (!order.getFormType().equals("其他成品")) { |
| | | if (!order.getFormType().equals("其他成品")) { |
| | | String account = userMapper.selectById(order.getIssueUser()).getAccount(); |
| | | HashMap<String, Object> map = new HashMap<>(); |
| | | map.put("touser", account);//接收消息成员的账号'ZT-031292'这种类型(如果有多个用'|'分隔) |
| | |
| | | map.put("enable_id_trans", 0);//是否开启id转译.0否 |
| | | map.put("enable_duplicate_check", 0);//是否开启重复消息检查.0否 |
| | | qywxApi.send(map); |
| | | }*/ |
| | | } |
| | | } |
| | | return insOrderMapper.updateById(insOrder); |
| | | } |
| | |
| | | private InsOrderMapper insOrderMapper; |
| | | |
| | | @Resource |
| | | private StandardMethodListMapper standardMethodListMapper; |
| | | |
| | | @Resource |
| | | private InsOrderStateMapper insOrderStateMapper; |
| | | |
| | | @Resource |
| | |
| | | os = new FileOutputStream(file); |
| | | //要转换的word文件 |
| | | com.aspose.words.Document doc = new com.aspose.words.Document(wordPath); |
| | | TableCollection tables = doc.getFirstSection().getBody().getTables(); |
| | | for (Table table : tables) { |
| | | RowCollection rows = table.getRows(); |
| | | table.setAllowAutoFit(false); |
| | | for (Row row : rows) { |
| | | CellCollection cells = row.getCells(); |
| | | for (Cell cell : cells) { |
| | | CellFormat cellFormat = cell.getCellFormat(); |
| | | cellFormat.setFitText(false); //设置自适应关闭 |
| | | cellFormat.setWrapText(true); // 设置自动换行 |
| | | } |
| | | } |
| | | } |
| | | doc.updateFields(); |
| | | doc.save(os, SaveFormat.PDF); |
| | | |
| | | //添加骑缝章 |
| | | stamperCheckMarkPDF(pdfPath.replace(".pdf", "-1.pdf"), pdfPath, imgUrl + "/" + sealUrl); |
| | | |
| | | |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | |
| | | } else { |
| | | table.getRow(row).getCell(i).getCTTc().addNewTcPr().addNewHMerge().setVal(STMerge.CONTINUE); |
| | | } |
| | | |
| | | } |
| | | } |
| | | |
| | |
| | | </select> |
| | | <select id="getUser" resultType="com.yuanchu.mom.pojo.User"> |
| | | select * from user where state = 1 |
| | | # where depart_lims_id=FIND_IN_SET(depart_lims_id, (select GROUP_CONCAT(id SEPARATOR ',') from department_lims where department_lims.name like '%实验室')) |
| | | </select> |
| | | <select id="selectDepartLims" resultType="java.lang.String"> |
| | | select name from department_lims |