| | |
| | | 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; |
| | |
| | | public IPage<InsOrderPlanVO> selectInsOrderPlanList(Page page, InsOrderPlanDTO insOrderPlanDTO) { |
| | | // todo: 仅看自己或者实验室 |
| | | //获取当前人所属实验室id |
| | | |
| | | String laboratory = null; |
| | | |
| | | String userName = null; |
| | | Integer userId = null; |
| | | if (ObjectUtil.isNotEmpty(insOrderPlanDTO.getUserId())) { |
| | |
| | | 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) { |
| | | // 登记检验结果 |
| | |
| | | // 添加分析数据 |
| | | addAnalysis(productList, ifsInventoryQuantity, order, sendUserAccount); |
| | | }); |
| | | |
| | | |
| | | } else { |
| | | // 修改成品状态 |
| | | // 判断是否有不合格 |
| | |
| | | .set(InsOrder::getInsResult, 0)); |
| | | } |
| | | } |
| | | |
| | | return 1; |
| | | } |
| | | |
| | |
| | | |
| | | //设置样式 |
| | | TableStyle tableStyle = new TableStyle(); |
| | | for (int i = 1; i <= max; i++) { |
| | | // 根据减压那结果个数修改长度 |
| | | switch (i) { |
| | | case 1: |
| | | tableStyle.setColWidths(new int[]{650, 2900, 850, 2300, 2100, 1200}); |
| | | break; |
| | | case 2: |
| | | tableStyle.setColWidths(new int[]{650, 2700, 850, 2200, 1200, 1200, 1200}); |
| | | break; |
| | | case 3: |
| | | tableStyle.setColWidths(new int[]{650, 2700, 850, 1600, 1000, 1000, 1000, 1200}); |
| | | break; |
| | | case 4: |
| | | tableStyle.setColWidths(new int[]{650, 2400, 850, 1500, 850, 850, 850, 850, 1200}); |
| | | break; |
| | | case 5: |
| | | tableStyle.setColWidths(new int[]{650, 2200, 850, 1350, 750, 750, 750, 750, 750, 1200}); |
| | | break; |
| | | if(max<=5){ |
| | | for (int i = 1; i <= max; i++) { |
| | | // 根据检验结果个数修改长度 |
| | | switch (i) { |
| | | case 1: |
| | | tableStyle.setColWidths(new int[]{650, 2900, 850, 2300, 2100, 1200}); |
| | | break; |
| | | case 2: |
| | | tableStyle.setColWidths(new int[]{650, 2700, 850, 2200, 1200, 1200, 1200}); |
| | | break; |
| | | case 3: |
| | | tableStyle.setColWidths(new int[]{650, 2700, 850, 1600, 1000, 1000, 1000, 1200}); |
| | | break; |
| | | case 4: |
| | | tableStyle.setColWidths(new int[]{650, 2400, 850, 1500, 850, 850, 850, 850, 1200}); |
| | | break; |
| | | case 5: |
| | | tableStyle.setColWidths(new int[]{650, 2200, 850, 1350, 750, 750, 750, 750, 750, 1200}); |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | |
| | | tableStyle.setWidth("10000"); |
| | | tableStyle.setAlign(TableRowAlign.CENTER); |
| | | BorderStyle borderStyle = new BorderStyle(); |