| | |
| | | |
| | | private InsUnqualifiedHandlerMapper insUnqualifiedHandlerMapper; |
| | | |
| | | private final NumberGenerator<IfsSplitOrderRecord> splitOrderRecordNumberGenerator; |
| | | |
| | | @Override |
| | | public Result selectStandardTreeListByPartNo(String partNo) { |
| | |
| | | for (FactoryDto factoryDto : factoryDtos) { |
| | | for (LaboratoryDto laboratoryDto : factoryDto.getChildren()) { |
| | | for (SampleTypeDto sampleTypeDto : laboratoryDto.getChildren()) { |
| | | if (sampleTypeDto.getChildren().size() == 0) { |
| | | if (sampleTypeDto.getChildren().isEmpty()) { |
| | | sampleTypeDto.setChildren(standardTreeMapper.getStandardTree3(sampleTypeDto.getValue())); |
| | | } |
| | | // 判断绑定的是否是当前零件号 |
| | |
| | | * @return |
| | | */ |
| | | @Override |
| | | public int inspectionReport(List<Long> ids,String orderType) { |
| | | public int inspectionReport(List<Long> ids,String orderType,String materialProp) { |
| | | Integer userId = SecurityUtils.getUserId().intValue(); |
| | | ifsInventoryQuantityMapper.update(null, Wrappers.<IfsInventoryQuantity>lambdaUpdate() |
| | | .in(IfsInventoryQuantity::getId, ids) |
| | |
| | | .set(IfsInventoryQuantity::getDeclareUserId, userId) |
| | | .set(IfsInventoryQuantity::getIsInspect, 1) |
| | | .set(IfsInventoryQuantity::getOrderType,orderType) |
| | | .set(IfsInventoryQuantity::getMaterialProp,materialProp) |
| | | .set(IfsInventoryQuantity::getDeclareDate, LocalDateTime.now()) |
| | | ); |
| | | threadPoolTaskExecutor.execute(() -> { |
| | |
| | | .set(IfsInventoryQuantity::getDeclareDate, LocalDateTime.now()) |
| | | .set(IfsInventoryQuantity::getUpdateBatchNo, ifsInventoryQuantity.getUpdateBatchNo()) |
| | | .set(IfsInventoryQuantity::getOrderType,ifsInventoryQuantity.getOrderType()) |
| | | .set(IfsInventoryQuantity::getMaterialProp,ifsInventoryQuantity.getMaterialProp()) |
| | | ); |
| | | |
| | | threadPoolTaskExecutor.execute(() -> { |
| | |
| | | if(Objects.nonNull(splitOrderList) && !splitOrderList.isEmpty()){ |
| | | List<Long> ids = splitOrderList.stream().map(IfsInventoryQuantity::getId).collect(Collectors.toList()); |
| | | ids.add(ifsInventoryQuantity.getId()); |
| | | this.inspectionReport(ids,OrderType.RAW.getValue()); |
| | | this.inspectionReport(ids,OrderType.RAW.getValue(),orderSplitDTO.getMaterialProp()); |
| | | } |
| | | //勾选同步到MES,保存订单拆分记录 |
| | | if(orderSplitDTO.getPushToMes()){ |
| | | List<IfsSplitOrderRecord> collect = orderSplitDTO.getSplitDetailList().stream().map(m -> { |
| | | orderSplitDTO.getSplitDetailList().forEach(m -> { |
| | | IfsSplitOrderRecord record = new IfsSplitOrderRecord(); |
| | | BeanUtil.copyProperties(m, record); |
| | | record.setSystemNo(splitOrderRecordNumberGenerator.generateNumberWithPrefix(IfsSplitOrderRecord.DIGIT, IfsSplitOrderRecord.PREFIX, IfsSplitOrderRecord::getSystemNo)); |
| | | record.setOrderNo(ifsInventoryQuantity.getOrderNo()); |
| | | record.setLineNo(ifsInventoryQuantity.getLineNo()); |
| | | record.setReleaseNo(ifsInventoryQuantity.getReleaseNo()); |
| | | record.setReceiptNo(ifsInventoryQuantity.getReceiptNo()); |
| | | return record; |
| | | }).collect(Collectors.toList()); |
| | | return ifsSplitOrderRecordService.saveBatch(collect); |
| | | ifsSplitOrderRecordService.save(record); |
| | | }); |
| | | return true; |
| | | } |
| | | return false; |
| | | } |