| | |
| | | } |
| | | // 生成编号 |
| | | String no = numberGenerator.generateNumberWithPrefix(3, |
| | | "JCZX/ZB-" + code + LimsDateUtil.resetDate(LocalDateTime.now()), |
| | | "JCZX/NS-" + code + LimsDateUtil.resetDate(LocalDateTime.now()), |
| | | InsOrder::getEntrustCode); |
| | | // 判断是否是季度检验, 是季度检验取消原材料季度检验下单 |
| | | if (InsOrderTypeConstants.QUARTERLY_TEST.equals(order.getOrderType())) { |
| | |
| | | ifsInventoryQuantity.setIsSource(1); |
| | | ifsInventoryQuantity.setState(0); |
| | | |
| | | IfsInventoryQuantity one = ifsInventoryQuantityMapper.selectOne(new LambdaQueryWrapper<IfsInventoryQuantity>() |
| | | Long count = ifsInventoryQuantityMapper.selectCount(new LambdaQueryWrapper<IfsInventoryQuantity>() |
| | | .eq(IfsInventoryQuantity::getOrderNo, ifsInventoryQuantity.getOrderNo()) |
| | | .eq(IfsInventoryQuantity::getLineNo, ifsInventoryQuantity.getLineNo()) |
| | | .eq(IfsInventoryQuantity::getReleaseNo, ifsInventoryQuantity.getReleaseNo()) |
| | |
| | | .eq(IfsInventoryQuantity::getWaivDevRejNo, ifsInventoryQuantity.getWaivDevRejNo()) |
| | | .eq(IfsInventoryQuantity::getActivitySeq, ifsInventoryQuantity.getActivitySeq()) |
| | | ); |
| | | if(Objects.isNull(one)) { |
| | | |
| | | if(count == 0) { |
| | | ifsInventoryQuantity.setIsFirst(0); |
| | | // 查询产业链检测数据 |
| | | String industryChainAttrFields = IndustryChainUtils.getIndustryChainAttrFields(ifsInventoryQuantity.getOrderNo(), |
| | |
| | | product.setCreateUser(null); |
| | | product.setUpdateTime(null); |
| | | product.setUpdateUser(null); |
| | | product.setSection(null); |
| | | product.setInsSampleId(omitOrderProductDto.getInsSampleId()); |
| | | if (StringUtils.isBlank(product.getCableTag())) { |
| | | product.setCableTag(null); |
| | |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 修改样品型号 |
| | | * @param insSample |
| | | */ |
| | | @Override |
| | | public void updateSampleModel(InsSample insSample) { |
| | | // 判断当前订单是否生成了报告, 生成了报告不能修改单号 |
| | | Long count = insReportMapper.selectCount(Wrappers.<InsReport>lambdaQuery() |
| | | .eq(InsReport::getInsOrderId, insSample.getInsOrderId())); |
| | | if (count > 0 ) { |
| | | throw new ErrorException("当前订单已经生成了报告不能修改编号"); |
| | | } |
| | | |
| | | insSampleService.update(Wrappers.<InsSample>lambdaUpdate() |
| | | .eq(InsSample::getId, insSample.getId()) |
| | | .set(InsSample::getModel, insSample.getModel())); |
| | | } |
| | | |
| | | } |
| | | |
| | | |