| | |
| | | |
| | | @Override |
| | | public void saveOrderBatchInfo(ProductionOrdeInfoParam productionOrdeInfoParam) { |
| | | List<BomInfo> productCode = bomInfoService.list(new QueryWrapper<BomInfo>().eq("product_code", productionOrdeInfoParam.getMaterialCode())); |
| | | List<BomInfo> productCode = bomInfoService.list(new QueryWrapper<BomInfo>() |
| | | .eq("product_code", productionOrdeInfoParam.getMaterialCode()) |
| | | .isNotNull("location_code") |
| | | ); |
| | | List<ProductionOrderBatchInfo> workOrderNo = orderBatchInfoService.list(new QueryWrapper<ProductionOrderBatchInfo>().eq("work_order_no", productionOrdeInfoParam.getWorkOrderNo())); |
| | | if(workOrderNo.size()==0){ |
| | | for (BomInfo bomInfo : productCode) { |
| | |
| | | param.setLocationCode(bomInfo.getLocationCode()); |
| | | param.setLoadingCode(bomInfo.getLoadingCode()); |
| | | param.setMaterialCode(bomInfo.getMaterialCode()); |
| | | param.setState("否"); |
| | | param.setStatus("否"); |
| | | param.setQuantity(0); |
| | | param.setResidueQuantity(0); |
| | | param.setUnit(bomInfo.getLineCode()); |
| | | param.setCreateTime(new Date()); |
| | | orderBatchInfoService.save(param); |
| | | } |