| | |
| | | import org.springframework.core.io.ClassPathResource; |
| | | import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Isolation; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | |
| | | |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @Transactional(rollbackFor = Exception.class,isolation = Isolation.READ_COMMITTED) |
| | | public void isRawMaterial(InsOrder insOrder,Boolean registerInsResults,Boolean hasExemption) { |
| | | IfsInventoryQuantity one = ifsInventoryQuantityMapper.selectOne(new LambdaQueryWrapper<IfsInventoryQuantity>() |
| | | .eq(IfsInventoryQuantity::getId, insOrder.getIfsInventoryId())); |
| | |
| | | if(Objects.isNull(vo.getInsOrderId())){ |
| | | rawMaterialOrderService.rawOrderRelease(vo.getId(), vo.getPartDesc()); |
| | | }else if(Objects.equals(vo.getInsOrderId(),insOrder.getId())){ |
| | | toLocation = insOrderService.moveRawMaterial(one); |
| | | toLocation = insOrderService.moveRawMaterial(vo); |
| | | }else if(Objects.nonNull(vo.getInsResult()) && 1 == vo.getInsResult()){ |
| | | toLocation = insOrderService.moveRawMaterial(one); |
| | | toLocation = insOrderService.moveRawMaterial(vo); |
| | | } |
| | | } |
| | | }else{ |
| | |
| | | .eq(IfsInventoryQuantity::getId, insOrder.getIfsInventoryId())); |
| | | } |
| | | |
| | | // threadPoolTaskExecutor.execute(() -> { |
| | | // // 企业微信通知 |
| | | // String message = ""; |
| | | // message += "检测结果提交通知"; |
| | | // message += "\n批次号: " + one.getUpdateBatchNo(); |
| | | // message += "\n零件号: " + one.getPartNo(); |
| | | // message += "\n零件描述: " + one.getPartDesc(); |
| | | // message += "\n供应商名称: " + one.getSupplierName(); |
| | | // message += "\n抵达数量: " + one.getQtyArrived().stripTrailingZeros().toPlainString() + one.getBuyUnitMeas(); |
| | | // // 发送企业inspectStatus信通知 |
| | | // if (inspectStatus == 1) { |
| | | // message += "\n检测结果: 合格"; |
| | | // } else { |
| | | // message += "\n检测结果: 不合格"; |
| | | // } |
| | | // WxCpUtils.informWebHook(wechatProperty.getExaminingUrl(), message); |
| | | // }); |
| | | threadPoolTaskExecutor.execute(() -> { |
| | | // 企业微信通知 |
| | | String message = ""; |
| | | message += "检测结果提交通知"; |
| | | message += "\n批次号: " + one.getUpdateBatchNo(); |
| | | message += "\n零件号: " + one.getPartNo(); |
| | | message += "\n零件描述: " + one.getPartDesc(); |
| | | message += "\n供应商名称: " + one.getSupplierName(); |
| | | message += "\n抵达数量: " + one.getQtyArrived().stripTrailingZeros().toPlainString() + one.getBuyUnitMeas(); |
| | | // 发送企业inspectStatus信通知 |
| | | if (inspectStatus == 1) { |
| | | message += "\n检测结果: 合格"; |
| | | } else { |
| | | message += "\n检测结果: 不合格"; |
| | | } |
| | | WxCpUtils.informWebHook(wechatProperty.getExaminingUrl(), message); |
| | | }); |
| | | |
| | | } |
| | | |