Commit 1353246430a6332ee27d1aa8ac38b96aea7044df
1 parent
5dc2a223
fix: 新增工序号字段
Showing
29 changed files
with
346 additions
and
60 deletions
src/main/java/com/huaheng/api/mes/controller/MesController.java
... | ... | @@ -351,7 +351,7 @@ public class MesController extends BaseController { |
351 | 351 | String fromPort = mesReceipt.getFromPort(); |
352 | 352 | String vehicleCode = mesReceipt.getVehicleCode(); |
353 | 353 | String vehicleTypeCode = mesReceipt.getVehicleTypeCode(); |
354 | - List<MaterialData> materialDataList = mesReceipt.getMaterialDataList(); | |
354 | + List<ReceiptMaterialData> materialDataList = mesReceipt.getReceiptMaterialDataList(); | |
355 | 355 | |
356 | 356 | if (StringUtils.isEmpty(taskNo)) { |
357 | 357 | return AjaxResult.error("taskNo 为空"); |
... | ... | @@ -378,7 +378,7 @@ public class MesController extends BaseController { |
378 | 378 | return AjaxResult.error("materialDataList 为空"); |
379 | 379 | } |
380 | 380 | HashMap<String, String> quTest = new HashMap<>(); |
381 | - for (MaterialData data : mesReceipt.getMaterialDataList()) { | |
381 | + for (ReceiptMaterialData data : mesReceipt.getReceiptMaterialDataList()) { | |
382 | 382 | if (data.getLocationNoX() == null || data.getLocationNoY() == null) { |
383 | 383 | return AjaxResult.error("物料信息坐标为空"); |
384 | 384 | } |
... | ... | @@ -419,9 +419,9 @@ public class MesController extends BaseController { |
419 | 419 | String fromPort = mesReceipt.getFromPort(); |
420 | 420 | String vehicleCode = mesReceipt.getVehicleCode(); |
421 | 421 | String vehicleTypeCode = mesReceipt.getVehicleTypeCode(); |
422 | - List<MaterialData> materialData = mesReceipt.getMaterialDataList(); | |
422 | + List<ReceiptMaterialData> materialData = mesReceipt.getReceiptMaterialDataList(); | |
423 | 423 | HashMap<String, String> quTest = new HashMap<>(); |
424 | - for (MaterialData data : mesReceipt.getMaterialDataList()) { | |
424 | + for (ReceiptMaterialData data : mesReceipt.getReceiptMaterialDataList()) { | |
425 | 425 | if (data.getLocationNoX() == null || data.getLocationNoY() == null) { |
426 | 426 | return AjaxResult.error("物料信息坐标为空"); |
427 | 427 | } |
... | ... | @@ -483,11 +483,11 @@ public class MesController extends BaseController { |
483 | 483 | String batchNumber = mesReceipt.getBatchNumber(); |
484 | 484 | String vehicleCode = mesReceipt.getVehicleCode(); |
485 | 485 | String vehicleTypeCode = mesReceipt.getVehicleTypeCode(); |
486 | - List<MaterialData> materialData = mesReceipt.getMaterialDataList(); | |
486 | + List<ReceiptMaterialData> materialData = mesReceipt.getReceiptMaterialDataList(); | |
487 | 487 | HashMap<String, String> quTest = new HashMap<>(); |
488 | 488 | // 通用盛具不做校验 |
489 | 489 | if (!QuantityConstant.VEHICLE_TYPE_COMMON.equals(vehicleTypeCode)) { |
490 | - for (MaterialData data : mesReceipt.getMaterialDataList()) { | |
490 | + for (ReceiptMaterialData data : mesReceipt.getReceiptMaterialDataList()) { | |
491 | 491 | if (data.getLocationNoX() == null || data.getLocationNoY() == null) { |
492 | 492 | return AjaxResult.error("物料信息坐标为空"); |
493 | 493 | } |
... | ... |
src/main/java/com/huaheng/api/mes/domain/MesOrderMaterial.java
src/main/java/com/huaheng/api/mes/domain/MesReceipt.java
1 | 1 | package com.huaheng.api.mes.domain; |
2 | 2 | |
3 | 3 | |
4 | +import com.alibaba.fastjson.annotation.JSONField; | |
4 | 5 | import lombok.Data; |
5 | 6 | |
6 | 7 | import java.util.List; |
... | ... | @@ -37,16 +38,6 @@ public class MesReceipt { |
37 | 38 | private String batchNumber; |
38 | 39 | |
39 | 40 | /** |
40 | - * 日工单号 | |
41 | - */ | |
42 | - private String chidReferCode; | |
43 | - | |
44 | - /** | |
45 | - * 领料单号 | |
46 | - */ | |
47 | - private String shipmentReferCode; | |
48 | - | |
49 | - /** | |
50 | 41 | * 托盘类型编码 |
51 | 42 | */ |
52 | 43 | private String containerTypeCode; |
... | ... | @@ -74,5 +65,6 @@ public class MesReceipt { |
74 | 65 | /** |
75 | 66 | * 入库物料信息 |
76 | 67 | */ |
77 | - private List<MaterialData> materialDataList; | |
68 | + @JSONField(name = "materialDataList") | |
69 | + private List<ReceiptMaterialData> receiptMaterialDataList; | |
78 | 70 | } |
... | ... |
src/main/java/com/huaheng/api/mes/domain/ReceiptMaterialData.java
0 → 100644
1 | +package com.huaheng.api.mes.domain; | |
2 | + | |
3 | +import lombok.Data; | |
4 | + | |
5 | +import java.math.BigDecimal; | |
6 | + | |
7 | +/** | |
8 | + * @author 游杰 | |
9 | + */ | |
10 | +@Data | |
11 | +public class ReceiptMaterialData { | |
12 | + | |
13 | + /** | |
14 | + * x坐标 | |
15 | + */ | |
16 | + private Integer locationNoX = -1; | |
17 | + | |
18 | + /** | |
19 | + * y坐标 | |
20 | + */ | |
21 | + private Integer locationNoY = -1; | |
22 | + | |
23 | + /** | |
24 | + * 物料编码 | |
25 | + */ | |
26 | + private String materialCode; | |
27 | + | |
28 | + /** | |
29 | + * 追溯码 | |
30 | + */ | |
31 | + private String tracingNo; | |
32 | + | |
33 | + /** | |
34 | + * 数量 | |
35 | + */ | |
36 | + private BigDecimal qty; | |
37 | + | |
38 | + /** | |
39 | + * 供应商编码 | |
40 | + */ | |
41 | + private String supplierCode; | |
42 | + | |
43 | + /** | |
44 | + * 供应商追溯码 | |
45 | + */ | |
46 | + private String supplierTracingNo; | |
47 | + | |
48 | + /** | |
49 | + * 质量状态 true代表合格品,false代表不合格品 | |
50 | + */ | |
51 | + private Boolean qualityStatus; | |
52 | + /** | |
53 | + * 工序号 | |
54 | + */ | |
55 | + private String flowCode; | |
56 | + | |
57 | + /** | |
58 | + * 是否首件/批,true:是,false:否 | |
59 | + */ | |
60 | + private Boolean firstFlag; | |
61 | +} | |
... | ... |
src/main/java/com/huaheng/api/mes/domain/ShipmentMaterialData.java
src/main/java/com/huaheng/api/mes/service/MesServiceImpl.java
... | ... | @@ -195,7 +195,6 @@ public class MesServiceImpl implements MesService { |
195 | 195 | receiptDetail.setIsMaterial(mesOrderMaterial.getIsMaterial()); |
196 | 196 | receiptDetail.setSupplierCode(mesOrderMaterial.getSupplierCode()); |
197 | 197 | receiptDetail.setSupplierTracingNo(mesOrderMaterial.getSupplierTracingNo()); |
198 | - receiptDetail.setFirstFlag(mesOrderMaterial.getFirstFlag()); | |
199 | 198 | receiptDetail.setCreatedBy(QuantityConstant.PLATFORM_MES); |
200 | 199 | receiptDetail.setLastUpdatedBy(QuantityConstant.PLATFORM_MES); |
201 | 200 | receiptDetailList.add(receiptDetail); |
... | ... | @@ -522,7 +521,7 @@ public class MesServiceImpl implements MesService { |
522 | 521 | } |
523 | 522 | List<String> materialCodeList = workOrderDetailList.stream().map(WorkOrderDetail::getMaterialCode).collect(Collectors.toList()); |
524 | 523 | List<MesOrderMaterial> mesOrderMaterialList = new ArrayList<>(); |
525 | - for (MaterialData data : mesReceipt.getMaterialDataList()) { | |
524 | + for (ReceiptMaterialData data : mesReceipt.getReceiptMaterialDataList()) { | |
526 | 525 | Material material = materialService.getMaterialByCode(data.getMaterialCode(), QuantityConstant.DEFAULT_WAREHOUSE); |
527 | 526 | if (material == null) { |
528 | 527 | throw new ServiceException(StringUtils.format("组盘失败,根据物料编码:{} 没有找到对应物料信息", data.getMaterialCode())); |
... | ... | @@ -599,9 +598,9 @@ public class MesServiceImpl implements MesService { |
599 | 598 | mesOrderMaterialList.add(mesOrderMaterial); |
600 | 599 | } |
601 | 600 | // 校验同一个xy坐标的物料 数量只能为1 |
602 | - List<MaterialData> materialDataList = mesReceipt.getMaterialDataList(); | |
601 | + List<ReceiptMaterialData> materialDataList = mesReceipt.getReceiptMaterialDataList(); | |
603 | 602 | if (!QuantityConstant.VEHICLE_TYPE_COMMON.equals(mesReceipt.getVehicleTypeCode())) { |
604 | - MaterialData qtyNotZeroMaterial = materialDataList.stream() | |
603 | + ReceiptMaterialData qtyNotZeroMaterial = materialDataList.stream() | |
605 | 604 | .filter(x -> x.getQty().compareTo(BigDecimal.ONE) != 0) |
606 | 605 | .findAny() |
607 | 606 | .orElse(null); |
... | ... | @@ -610,9 +609,9 @@ public class MesServiceImpl implements MesService { |
610 | 609 | qtyNotZeroMaterial.getLocationNoX(), |
611 | 610 | qtyNotZeroMaterial.getLocationNoY())); |
612 | 611 | } |
613 | - Map<String, List<MaterialData>> materialGroupByXyMap = materialDataList.stream() | |
612 | + Map<String, List<ReceiptMaterialData>> materialGroupByXyMap = materialDataList.stream() | |
614 | 613 | .collect(Collectors.groupingBy(material -> material.getLocationNoX().toString().concat(",").concat(material.getLocationNoY().toString()))); |
615 | - for (Map.Entry<String, List<MaterialData>> entry : materialGroupByXyMap.entrySet()) { | |
614 | + for (Map.Entry<String, List<ReceiptMaterialData>> entry : materialGroupByXyMap.entrySet()) { | |
616 | 615 | if (entry.getValue().size() > 1) { |
617 | 616 | throw new ServiceException(StringUtils.format("组盘失败,物料坐标 {} 重复,请检查坐标", entry.getKey())); |
618 | 617 | } |
... | ... | @@ -621,7 +620,7 @@ public class MesServiceImpl implements MesService { |
621 | 620 | MesOrder mesOrder = new MesOrder(); |
622 | 621 | mesOrder.setOrderCode(orderCode); |
623 | 622 | mesOrder.setTaskNo(mesReceipt.getTaskNo()); |
624 | - mesOrder.setReceiptReferCode(mesReceipt.getShipmentReferCode()); | |
623 | + //mesOrder.setReceiptReferCode(mesReceipt.getShipmentReferCode()); | |
625 | 624 | mesOrder.setMaterialDataList(mesOrderMaterialList); |
626 | 625 | mesOrder.setReceiptType(mesReceipt.getReceiptType()); |
627 | 626 | mesService.receiptOrder(mesOrder); |
... | ... | @@ -640,7 +639,7 @@ public class MesServiceImpl implements MesService { |
640 | 639 | receiptContainerHeader.setVehicleTypeCode(vehicle.getVehicleType()); |
641 | 640 | receiptContainerHeader.setVehicleCode(vehicle.getCode()); |
642 | 641 | // 将领料单号保存到出库配盘头,再保存到任务头,再保存到库存头 锁定库存 |
643 | - receiptContainerHeader.setShipmentReferCode(mesReceipt.getShipmentReferCode()); | |
642 | + //receiptContainerHeader.setShipmentReferCode(mesReceipt.getShipmentReferCode()); | |
644 | 643 | if (!receiptContainerHeaderService.save(receiptContainerHeader)) { |
645 | 644 | throw new ServiceException("组盘失败,入库组盘头表保存失败"); |
646 | 645 | } |
... | ... | @@ -661,7 +660,7 @@ public class MesServiceImpl implements MesService { |
661 | 660 | } |
662 | 661 | List<ReceiptContainerDetail> detailList = new ArrayList<>(); |
663 | 662 | //入库组盘详情 |
664 | - for (MaterialData data : materialDataList) { | |
663 | + for (ReceiptMaterialData data : materialDataList) { | |
665 | 664 | Material material = materialService.getByCode(data.getMaterialCode()); |
666 | 665 | ReceiptContainerDetail receiptContainerDetail = new ReceiptContainerDetail(); |
667 | 666 | receiptContainerDetail.setReceiptContainerId(receiptContainerHeader.getId()); |
... | ... | @@ -718,9 +717,9 @@ public class MesServiceImpl implements MesService { |
718 | 717 | public AjaxResult receipt(MesReceipt mesReceipt) { |
719 | 718 | // ********** 如果是人工装配传爆管料点退回 ********** |
720 | 719 | if (QuantityConstant.STATION_ST0000.equals(mesReceipt.getFromPort())) { |
721 | - mesReceipt.getMaterialDataList().forEach(materialData -> { | |
720 | + mesReceipt.getReceiptMaterialDataList().forEach(materialData -> { | |
722 | 721 | AjaxResult ajaxResult = inventoryHeaderService.virtualReceipt(QuantityConstant.RECEIPT_TYPE_BACK, materialData.getMaterialCode(), |
723 | - materialData.getQty(), mesReceipt.getOrderCode(), mesReceipt.getShipmentReferCode()); | |
722 | + materialData.getQty(), mesReceipt.getOrderCode()); | |
724 | 723 | if (Boolean.TRUE.equals(ajaxResult.hasErr())) { |
725 | 724 | throw new ServiceException("余料退虚拟库失败"); |
726 | 725 | } |
... | ... | @@ -761,7 +760,7 @@ public class MesServiceImpl implements MesService { |
761 | 760 | mesReceipt.getVehicleCode(), containerByVehicleCode.getCode())); |
762 | 761 | } |
763 | 762 | List<MesOrderMaterial> mesOrderMaterialList = new ArrayList<>(); |
764 | - for (MaterialData data : mesReceipt.getMaterialDataList()) { | |
763 | + for (ReceiptMaterialData data : mesReceipt.getReceiptMaterialDataList()) { | |
765 | 764 | MesOrderMaterial mesOrderMaterial = new MesOrderMaterial(); |
766 | 765 | Material material = materialService.getMaterialByCode(data.getMaterialCode(), QuantityConstant.DEFAULT_WAREHOUSE); |
767 | 766 | if (material == null) { |
... | ... | @@ -816,12 +815,13 @@ public class MesServiceImpl implements MesService { |
816 | 815 | mesOrderMaterial.setSupplierCode(data.getSupplierCode()); |
817 | 816 | mesOrderMaterial.setSupplierTracingNo(data.getSupplierTracingNo()); |
818 | 817 | mesOrderMaterial.setFirstFlag(data.getFirstFlag()); |
818 | + mesOrderMaterial.setFlowCode(data.getFlowCode()); | |
819 | 819 | mesOrderMaterialList.add(mesOrderMaterial); |
820 | 820 | } |
821 | 821 | // 校验同一个xy坐标的物料 数量只能为1 |
822 | - List<MaterialData> materialDataList = mesReceipt.getMaterialDataList(); | |
822 | + List<ReceiptMaterialData> materialDataList = mesReceipt.getReceiptMaterialDataList(); | |
823 | 823 | if (!QuantityConstant.VEHICLE_TYPE_COMMON.equals(mesReceipt.getVehicleTypeCode())) { |
824 | - MaterialData qtyNotZeroMaterial = materialDataList.stream() | |
824 | + ReceiptMaterialData qtyNotZeroMaterial = materialDataList.stream() | |
825 | 825 | .filter(x -> x.getQty().compareTo(BigDecimal.ONE) != 0) |
826 | 826 | .findAny() |
827 | 827 | .orElse(null); |
... | ... | @@ -830,9 +830,9 @@ public class MesServiceImpl implements MesService { |
830 | 830 | qtyNotZeroMaterial.getLocationNoX(), |
831 | 831 | qtyNotZeroMaterial.getLocationNoY())); |
832 | 832 | } |
833 | - Map<String, List<MaterialData>> materialGroupByXyMap = materialDataList.stream() | |
833 | + Map<String, List<ReceiptMaterialData>> materialGroupByXyMap = materialDataList.stream() | |
834 | 834 | .collect(Collectors.groupingBy(material -> material.getLocationNoX().toString().concat(",").concat(material.getLocationNoY().toString()))); |
835 | - for (Map.Entry<String, List<MaterialData>> entry : materialGroupByXyMap.entrySet()) { | |
835 | + for (Map.Entry<String, List<ReceiptMaterialData>> entry : materialGroupByXyMap.entrySet()) { | |
836 | 836 | if (entry.getValue().size() > 1) { |
837 | 837 | throw new ServiceException(StringUtils.format("入库失败,物料坐标:{} 重复,请检查坐标", entry.getKey())); |
838 | 838 | } |
... | ... | @@ -841,12 +841,12 @@ public class MesServiceImpl implements MesService { |
841 | 841 | MesOrder mesOrder = new MesOrder(); |
842 | 842 | mesOrder.setTaskNo(mesReceipt.getTaskNo()); |
843 | 843 | mesOrder.setOrderCode(mesReceipt.getOrderCode()); |
844 | - mesOrder.setShipmentReferCode(mesReceipt.getShipmentReferCode()); | |
844 | + //mesOrder.setShipmentReferCode(mesReceipt.getShipmentReferCode()); | |
845 | 845 | mesOrder.setMaterialDataList(mesOrderMaterialList); |
846 | 846 | mesOrder.setReceiptType(mesReceipt.getReceiptType()); |
847 | - //原材料、半成品入库 没有入库单,需手动生成入库单 | |
847 | + // 手动生成入库单 | |
848 | 848 | mesService.receiptOrder(mesOrder); |
849 | - // 新建保存组盘头表记录 | |
849 | + // 保存组盘头表 | |
850 | 850 | // 根据载具编码查询组盘表头记录 |
851 | 851 | LambdaQueryWrapper<ReceiptContainerHeader> lambda = Wrappers.lambdaQuery(); |
852 | 852 | lambda.eq(ReceiptContainerHeader::getContainerCode, mesReceipt.getContainerCode()) |
... | ... | @@ -910,7 +910,7 @@ public class MesServiceImpl implements MesService { |
910 | 910 | receiptDetailService.updateReceiptHeaderLastStatus(receiptDetail.getReceiptId()); |
911 | 911 | } |
912 | 912 | List<ReceiptContainerDetail> detailList = new ArrayList<>(); |
913 | - for (MaterialData data : materialDataList) { | |
913 | + for (ReceiptMaterialData data : materialDataList) { | |
914 | 914 | Material material = materialService.getMaterialByCode(data.getMaterialCode(), QuantityConstant.DEFAULT_WAREHOUSE); |
915 | 915 | ReceiptContainerDetail receiptContainerDetail = new ReceiptContainerDetail(); |
916 | 916 | receiptContainerDetail.setReceiptContainerId(receiptContainerHeader.getId()); |
... | ... | @@ -925,8 +925,9 @@ public class MesServiceImpl implements MesService { |
925 | 925 | receiptContainerDetail.setReceiptType(receiptHeader.getReceiptType()); |
926 | 926 | receiptContainerDetail.setSupplierCode(receiptDetail.getSupplierCode()); |
927 | 927 | receiptContainerDetail.setSupplierTracingNo(receiptDetail.getSupplierTracingNo()); |
928 | - receiptContainerDetail.setFirstFlag(receiptDetail.getFirstFlag()); | |
928 | + receiptContainerDetail.setFirstFlag(data.getFirstFlag()); | |
929 | 929 | receiptContainerDetail.setBatch(receiptDetail.getBatch()); |
930 | + receiptContainerDetail.setFlowCode(data.getFlowCode()); | |
930 | 931 | receiptContainerDetail.setLocationNoX(data.getLocationNoX()); |
931 | 932 | receiptContainerDetail.setLocationNoY(data.getLocationNoY()); |
932 | 933 | //receiptContainerDetail.setIsMaterial(data.getIsMaterial()); |
... | ... |
src/main/java/com/huaheng/pc/inventory/inventoryDetail/controller/InventoryDetailController.java
... | ... | @@ -91,6 +91,7 @@ public class InventoryDetailController extends BaseController { |
91 | 91 | .like(StringUtils.isNotEmpty(inventoryDetail.getSupplierCode()), InventoryDetail::getSupplierCode, inventoryDetail.getSupplierCode()) |
92 | 92 | .like(StringUtils.isNotEmpty(inventoryDetail.getMaterialCode()), InventoryDetail::getMaterialCode, inventoryDetail.getMaterialCode()) |
93 | 93 | .like(StringUtils.isNotEmpty(inventoryDetail.getMaterialName()), InventoryDetail::getMaterialName, inventoryDetail.getMaterialName()) |
94 | + .eq(StringUtils.isNotEmpty(inventoryDetail.getFlowCode()), InventoryDetail::getFlowCode, inventoryDetail.getFlowCode()) | |
94 | 95 | .like(StringUtils.isNotEmpty(inventoryDetail.getMaterialSpec()), InventoryDetail::getMaterialSpec, inventoryDetail.getMaterialSpec()) |
95 | 96 | .like(StringUtils.isNotEmpty(inventoryDetail.getMaterialCategory()), InventoryDetail::getMaterialCategory, inventoryDetail.getMaterialCategory()) |
96 | 97 | .eq(StringUtils.isNotEmpty(inventoryDetail.getInventorySts()), InventoryDetail::getInventorySts, inventoryDetail.getInventorySts()) |
... | ... | @@ -335,6 +336,7 @@ public class InventoryDetailController extends BaseController { |
335 | 336 | .like(StringUtils.isNotEmpty(inventoryDetail.getSupplierCode()), InventoryDetail::getSupplierCode, inventoryDetail.getSupplierCode()) |
336 | 337 | .like(StringUtils.isNotEmpty(inventoryDetail.getMaterialCode()), InventoryDetail::getMaterialCode, inventoryDetail.getMaterialCode()) |
337 | 338 | .like(StringUtils.isNotEmpty(inventoryDetail.getMaterialName()), InventoryDetail::getMaterialName, inventoryDetail.getMaterialName()) |
339 | + .eq(StringUtils.isNotEmpty(inventoryDetail.getFlowCode()), InventoryDetail::getFlowCode, inventoryDetail.getFlowCode()) | |
338 | 340 | .like(StringUtils.isNotEmpty(inventoryDetail.getMaterialSpec()), InventoryDetail::getMaterialSpec, inventoryDetail.getMaterialSpec()) |
339 | 341 | .like(StringUtils.isNotEmpty(inventoryDetail.getMaterialCategory()), InventoryDetail::getMaterialCategory, inventoryDetail.getMaterialCategory()) |
340 | 342 | .eq(StringUtils.isNotNull(inventoryDetail.getSolidifyTime()), InventoryDetail::getSolidifyTime, inventoryDetail.getSolidifyTime()) |
... | ... |
src/main/java/com/huaheng/pc/inventory/inventoryDetail/domain/InventoryDetail.java
... | ... | @@ -148,6 +148,13 @@ public class InventoryDetail implements Serializable { |
148 | 148 | private String supplierTracingNo; |
149 | 149 | |
150 | 150 | /** |
151 | + * 工序号 | |
152 | + */ | |
153 | + @TableField(value = "flowCode") | |
154 | + @ApiModelProperty(value = "工序号") | |
155 | + private String flowCode; | |
156 | + | |
157 | + /** | |
151 | 158 | * 是否首件/批,true:是,false:否 |
152 | 159 | */ |
153 | 160 | @TableField(value = "firstFlag") |
... | ... |
src/main/java/com/huaheng/pc/inventory/inventoryHeader/service/InventoryHeaderService.java
... | ... | @@ -183,4 +183,14 @@ public interface InventoryHeaderService extends IService<InventoryHeader> { |
183 | 183 | * @return 库存 |
184 | 184 | */ |
185 | 185 | InventoryHeader getByLocationCode(String locationCode); |
186 | + | |
187 | + /** | |
188 | + * 虚拟出库 | |
189 | + * | |
190 | + * @param materialCode 物料编码 | |
191 | + * @param qty 出库数量 | |
192 | + * @param orderCode 工单号 | |
193 | + * @return 出库结果 | |
194 | + */ | |
195 | + AjaxResult virtualReceipt(String receiptTypeBack, String materialCode, BigDecimal qty, String orderCode); | |
186 | 196 | } |
187 | 197 | \ No newline at end of file |
... | ... |
src/main/java/com/huaheng/pc/inventory/inventoryHeader/service/InventoryHeaderServiceImpl.java
... | ... | @@ -1557,4 +1557,127 @@ public class InventoryHeaderServiceImpl extends ServiceImpl<InventoryHeaderMappe |
1557 | 1557 | queryWrapper.eq(InventoryHeader::getLocationCode, locationCode); |
1558 | 1558 | return super.getOne(queryWrapper); |
1559 | 1559 | } |
1560 | + | |
1561 | + @Override | |
1562 | + public AjaxResult virtualReceipt(String receiptType, String materialCode, BigDecimal qty, String orderCode) { | |
1563 | + if (StringUtils.isEmpty(materialCode)) { | |
1564 | + throw new ServiceException("虚拟入库失败,物料编码为空"); | |
1565 | + } | |
1566 | + if (StringUtils.isEmpty(orderCode)) { | |
1567 | + throw new ServiceException("虚拟入库失败,工单号为空"); | |
1568 | + } | |
1569 | + if (StringUtils.isNull(qty)) { | |
1570 | + throw new ServiceException("虚拟入库失败,入库数量为空"); | |
1571 | + } | |
1572 | + if (qty.compareTo(BigDecimal.ZERO) <= 0) { | |
1573 | + throw new ServiceException("虚拟入库失败,入库数量小于或等于0"); | |
1574 | + } | |
1575 | + Material material = materialService.getByCode(materialCode); | |
1576 | + if (material == null) { | |
1577 | + throw new ServiceException(StringUtils.format("虚拟入库失败,根据物料编码:{} 未找到物料", materialCode)); | |
1578 | + } | |
1579 | + // 1、生成虚拟库入库单 | |
1580 | + String code = receiptHeaderService.createCode(receiptType); | |
1581 | + ReceiptHeader receiptHeader = new ReceiptHeader(); | |
1582 | + receiptHeader.setCode(code); | |
1583 | + receiptHeader.setWarehouseCode(QuantityConstant.DEFAULT_WAREHOUSE); | |
1584 | + receiptHeader.setCompanyCode(QuantityConstant.DEFAULT_COMPANY_CODE); | |
1585 | + receiptHeader.setFirstStatus(QuantityConstant.RECEIPT_HEADER_POSTING); | |
1586 | + receiptHeader.setLastStatus(QuantityConstant.RECEIPT_HEADER_POSTING); | |
1587 | + receiptHeader.setOrderCode(orderCode); | |
1588 | + receiptHeader.setReceiptType(receiptType); | |
1589 | + receiptHeader.setTotalLines(qty.intValue()); | |
1590 | + receiptHeader.setTotalQty(qty); | |
1591 | + //receiptHeader.setShipmentReferCode(shipmentReferCode); | |
1592 | + boolean success = receiptHeaderService.save(receiptHeader); | |
1593 | + if (!success) { | |
1594 | + throw new ServiceException("创建半成品入库单失败,保存入库单头表失败"); | |
1595 | + } | |
1596 | + if (StringUtils.isNull(material)) { | |
1597 | + throw new ServiceException("创建出库单明细失败,物料信息为空"); | |
1598 | + } | |
1599 | + for (int i = 0; i < qty.intValue(); i++) { | |
1600 | + ReceiptDetail receiptDetail = new ReceiptDetail(); | |
1601 | + receiptDetail.setReceiptId(receiptHeader.getId()); | |
1602 | + receiptDetail.setReceiptCode(receiptHeader.getCode()); | |
1603 | + receiptDetail.setWarehouseCode(receiptHeader.getWarehouseCode()); | |
1604 | + receiptDetail.setCompanyCode(receiptHeader.getCompanyCode()); | |
1605 | + receiptDetail.setMaterialCode(material.getCode()); | |
1606 | + receiptDetail.setMaterialName(material.getName()); | |
1607 | + receiptDetail.setMaterialUnit(material.getUnit()); | |
1608 | + receiptDetail.setAuxiliaryUnit(material.getAuxiliaryUnit()); | |
1609 | + receiptDetail.setMaterialSpec(material.getSpec()); | |
1610 | + receiptDetail.setWeight(material.getWeight()); | |
1611 | + receiptDetail.setHigh(material.getHigh()); | |
1612 | + receiptDetail.setSolidifyTime(material.getSolidifyTime()); | |
1613 | + receiptDetail.setInventorySts(QuantityConstant.INVENTORY_STATUS_OK); | |
1614 | + receiptDetail.setQty(BigDecimal.ONE); | |
1615 | + receiptDetail.setTaskQty(BigDecimal.ONE); | |
1616 | + receiptDetail.setIsMaterial(QuantityConstant.IS_MATERIAL); | |
1617 | + receiptDetail.setOrderCode(receiptHeader.getOrderCode()); | |
1618 | + success = receiptDetailService.save(receiptDetail); | |
1619 | + if (!success) { | |
1620 | + throw new ServiceException("创建半成品入库单失败,保存入库单明细失败"); | |
1621 | + } | |
1622 | + // 2、生成虚拟库存 | |
1623 | + String timestamp = String.valueOf(System.currentTimeMillis()).concat(String.valueOf(i)); | |
1624 | + InventoryHeader inventoryHeader = new InventoryHeader(); | |
1625 | + inventoryHeader.setWarehouseCode(QuantityConstant.DEFAULT_WAREHOUSE); | |
1626 | + inventoryHeader.setCompanyCode(QuantityConstant.DEFAULT_COMPANY_CODE); | |
1627 | + inventoryHeader.setZoneCode(QuantityConstant.ZONE_TYPE_VIRTUAL); | |
1628 | + inventoryHeader.setLocationCode(QuantityConstant.LOCATION_TYPE_VIRTUAL.concat(timestamp)); | |
1629 | + inventoryHeader.setContainerCode(QuantityConstant.CONTAINER_TYPE_VIRTUAL.concat(timestamp)); | |
1630 | + inventoryHeader.setVehicleCode(QuantityConstant.VEHICLE_TYPE_VIRTUAL.concat(timestamp)); | |
1631 | + inventoryHeader.setOrderCode(orderCode); | |
1632 | + // inventoryHeader.setShipmentReferCode(shipmentReferCode); | |
1633 | + // 一个库存头一条明细,一条明细数量为1 | |
1634 | + inventoryHeader.setTotalLines(1); | |
1635 | + inventoryHeader.setTotalQty(BigDecimal.ONE); | |
1636 | + success = inventoryHeaderService.save(inventoryHeader); | |
1637 | + if (!success) { | |
1638 | + throw new ServiceException("虚拟入库失败,保存库存头表失败"); | |
1639 | + } | |
1640 | + InventoryDetail inventoryDetail = new InventoryDetail(); | |
1641 | + inventoryDetail.setReceiptDetailId(receiptDetail.getId()); | |
1642 | + inventoryDetail.setReceiptCode(receiptHeader.getCode()); | |
1643 | + inventoryDetail.setInventoryHeaderId(inventoryHeader.getId()); | |
1644 | + inventoryDetail.setWarehouseCode(inventoryHeader.getWarehouseCode()); | |
1645 | + inventoryDetail.setZoneCode(inventoryHeader.getZoneCode()); | |
1646 | + inventoryDetail.setCompanyCode(inventoryHeader.getCompanyCode()); | |
1647 | + inventoryDetail.setLocationCode(inventoryHeader.getLocationCode()); | |
1648 | + inventoryDetail.setContainerCode(inventoryHeader.getContainerCode()); | |
1649 | + inventoryDetail.setVehicleCode(inventoryHeader.getVehicleCode()); | |
1650 | + inventoryDetail.setQty(BigDecimal.ONE); | |
1651 | + inventoryDetail.setTaskQty(BigDecimal.ZERO); | |
1652 | + inventoryDetail.setMaterialCode(material.getCode()); | |
1653 | + inventoryDetail.setMaterialName(material.getName()); | |
1654 | + inventoryDetail.setMaterialSpec(material.getSpec()); | |
1655 | + inventoryDetail.setMaterialUnit(material.getUnit()); | |
1656 | + inventoryDetail.setAuxiliaryUnit(material.getAuxiliaryUnit()); | |
1657 | + inventoryDetail.setWeight(material.getWeight()); | |
1658 | + inventoryDetail.setHigh(material.getHigh()); | |
1659 | + inventoryDetail.setSolidifyTime(material.getSolidifyTime()); | |
1660 | + inventoryDetail.setInventorySts(QuantityConstant.INVENTORY_STATUS_OK); | |
1661 | + inventoryDetail.setOrderCode(inventoryHeader.getOrderCode()); | |
1662 | + // inventoryDetail.setShipmentReferCode(inventoryHeader.getShipmentReferCode()); | |
1663 | + inventoryDetail.setSampleStatus(QuantityConstant.SAMPLE_STATUS_NO); | |
1664 | + inventoryDetail.setSampleType(QuantityConstant.SAMPLE_TYPE_SELF); | |
1665 | + success = inventoryDetailService.save(inventoryDetail); | |
1666 | + if (!success) { | |
1667 | + throw new ServiceException("虚拟入库失败,保存库存明细表失败"); | |
1668 | + } | |
1669 | + // 3、生成交易记录 | |
1670 | + InventoryTransaction inventoryTransaction = new InventoryTransaction(); | |
1671 | + BeanUtils.copyBeanProp(inventoryTransaction, inventoryDetail); | |
1672 | + inventoryTransaction.setTransactionType(QuantityConstant.INVENTORY_TRANSACTION_RECEIPT); | |
1673 | + inventoryTransaction.setBillCode(receiptHeader.getCode()); | |
1674 | + inventoryTransaction.setBillDetailId(receiptDetail.getId()); | |
1675 | + inventoryTransaction.setTaskQty(BigDecimal.ONE); | |
1676 | + success = inventoryTransactionService.save(inventoryTransaction); | |
1677 | + if (!success) { | |
1678 | + throw new ServiceException("虚拟入库失败,保存交易记录失败"); | |
1679 | + } | |
1680 | + } | |
1681 | + return AjaxResult.success("虚拟入库成功"); | |
1682 | + } | |
1560 | 1683 | } |
1561 | 1684 | \ No newline at end of file |
... | ... |
src/main/java/com/huaheng/pc/inventory/inventoryTransaction/controller/InventoryTransactionController.java
... | ... | @@ -74,6 +74,7 @@ public class InventoryTransactionController extends BaseController { |
74 | 74 | .like(StringUtils.isNotEmpty(inventoryTransaction.getSupplierCode()), InventoryTransaction::getSupplierCode, inventoryTransaction.getSupplierCode()) |
75 | 75 | .like(StringUtils.isNotEmpty(inventoryTransaction.getMaterialCode()), InventoryTransaction::getMaterialCode, inventoryTransaction.getMaterialCode()) |
76 | 76 | .like(StringUtils.isNotEmpty(inventoryTransaction.getMaterialName()), InventoryTransaction::getMaterialName, inventoryTransaction.getMaterialName()) |
77 | + .eq(StringUtils.isNotEmpty(inventoryTransaction.getFlowCode()), InventoryTransaction::getFlowCode, inventoryTransaction.getFlowCode()) | |
77 | 78 | .like(StringUtils.isNotEmpty(inventoryTransaction.getMaterialSpec()), InventoryTransaction::getMaterialSpec, inventoryTransaction.getMaterialSpec()) |
78 | 79 | .like(StringUtils.isNotEmpty(inventoryTransaction.getMaterialUnit()), InventoryTransaction::getMaterialUnit, inventoryTransaction.getMaterialUnit()) |
79 | 80 | .eq(StringUtils.isNotEmpty(inventoryTransaction.getInventorySts()), InventoryTransaction::getInventorySts, inventoryTransaction.getInventorySts()) |
... | ... |
src/main/java/com/huaheng/pc/inventory/inventoryTransaction/domain/InventoryTransaction.java
... | ... | @@ -306,9 +306,9 @@ public class InventoryTransaction implements Serializable { |
306 | 306 | /** |
307 | 307 | * 领料单号 |
308 | 308 | */ |
309 | - @TableField(value = "shipmentReferCode") | |
309 | + /*@TableField(value = "shipmentReferCode") | |
310 | 310 | @ApiModelProperty(value = "领料单号") |
311 | - private String shipmentReferCode; | |
311 | + private String shipmentReferCode;*/ | |
312 | 312 | |
313 | 313 | /** |
314 | 314 | * 单据明细编码 |
... | ... | @@ -332,6 +332,13 @@ public class InventoryTransaction implements Serializable { |
332 | 332 | private String supplierTracingNo; |
333 | 333 | |
334 | 334 | /** |
335 | + * 工序号 | |
336 | + */ | |
337 | + @TableField(value = "flowCode") | |
338 | + @ApiModelProperty(value = "工序号") | |
339 | + private String flowCode; | |
340 | + | |
341 | + /** | |
335 | 342 | * 是否首件/批,true:是,false:否 |
336 | 343 | */ |
337 | 344 | @TableField(value = "firstFlag") |
... | ... |
src/main/java/com/huaheng/pc/receipt/receiptContainerDetail/domain/ReceiptContainerDetail.java
... | ... | @@ -413,6 +413,13 @@ public class ReceiptContainerDetail implements Serializable { |
413 | 413 | private Double solidifyTime; |
414 | 414 | |
415 | 415 | /** |
416 | + * 工序号 | |
417 | + */ | |
418 | + @TableField(value = "flowCode") | |
419 | + @ApiModelProperty(value = "工序号") | |
420 | + private String flowCode; | |
421 | + | |
422 | + /** | |
416 | 423 | * 是否首件/批,true:是,false:否 |
417 | 424 | */ |
418 | 425 | @TableField(value = "firstFlag") |
... | ... |
src/main/java/com/huaheng/pc/receipt/receiptDetail/domain/ReceiptDetail.java
... | ... | @@ -121,9 +121,9 @@ public class ReceiptDetail implements Serializable { |
121 | 121 | /** |
122 | 122 | * 是否首件/批,true:是,false:否 |
123 | 123 | */ |
124 | - @TableField(value = "firstFlag") | |
124 | + /*@TableField(value = "firstFlag") | |
125 | 125 | @ApiModelProperty(value = "是否首件/批") |
126 | - private Boolean firstFlag; | |
126 | + private Boolean firstFlag;*/ | |
127 | 127 | |
128 | 128 | /** |
129 | 129 | * 批次 |
... | ... |
src/main/java/com/huaheng/pc/shipment/shipmentContainerDetail/domain/ShipmentContainerDetail.java
... | ... | @@ -142,6 +142,13 @@ public class ShipmentContainerDetail implements Serializable { |
142 | 142 | private String supplierTracingNo; |
143 | 143 | |
144 | 144 | /** |
145 | + * 工序号 | |
146 | + */ | |
147 | + @TableField(value = "flowCode") | |
148 | + @ApiModelProperty(value = "工序号") | |
149 | + private String flowCode; | |
150 | + | |
151 | + /** | |
145 | 152 | * 是否首件/批,true:是,false:否 |
146 | 153 | */ |
147 | 154 | @TableField(value = "firstFlag") |
... | ... |
src/main/java/com/huaheng/pc/shipment/shipmentContainerHeader/service/ShipmentContainerHeaderServiceImpl.java
... | ... | @@ -334,7 +334,6 @@ public class ShipmentContainerHeaderServiceImpl extends ServiceImpl<ShipmentCont |
334 | 334 | shipmentContainerDetail.setShipmentDetailId(shipmentDetail.getId()); |
335 | 335 | shipmentContainerDetail.setQty(inventoryDetail.getQty()); |
336 | 336 | shipmentContainerDetail.setStatus(QuantityConstant.SHIPMENT_CONTAINER_BUILD); |
337 | - shipmentContainerDetail.setCreatedBy(QuantityConstant.PLATFORM_MES); | |
338 | 337 | shipmentContainerDetailList.add(shipmentContainerDetail); |
339 | 338 | } |
340 | 339 | |
... | ... | @@ -732,11 +731,16 @@ public class ShipmentContainerHeaderServiceImpl extends ServiceImpl<ShipmentCont |
732 | 731 | if (Objects.isNull(material)) { |
733 | 732 | throw new ServiceException(StringUtils.format("叫料失败,物料:{} 不存在", materialCode)); |
734 | 733 | } |
734 | + String flowCode = shipmentMaterialData.getFlowCode(); | |
735 | + if (Objects.isNull(flowCode)) { | |
736 | + throw new ServiceException("叫料失败,工序号为空"); | |
737 | + } | |
735 | 738 | // 2、查询库存 |
736 | 739 | LambdaQueryWrapper<InventoryDetail> inventoryDetailQueryWrapper = Wrappers.lambdaQuery(); |
737 | 740 | inventoryDetailQueryWrapper |
738 | 741 | .eq(InventoryDetail::getMaterialCode, materialCode) |
739 | 742 | .eq(InventoryDetail::getOrderCode, orderCode) |
743 | + .eq(InventoryDetail::getFirstFlag, flowCode) | |
740 | 744 | .apply("qty >= taskQty AND TIMESTAMPDIFF(HOUR, created, now()) >= solidifyTime") |
741 | 745 | .orderByAsc(InventoryDetail::getCreated); |
742 | 746 | // 如果目标料点是传爆管工位、则只查询传爆管立库库存 |
... | ... | @@ -745,7 +749,8 @@ public class ShipmentContainerHeaderServiceImpl extends ServiceImpl<ShipmentCont |
745 | 749 | } |
746 | 750 | List<InventoryDetail> inventoryDetailList = inventoryDetailService.list(inventoryDetailQueryWrapper); |
747 | 751 | if (inventoryDetailList.isEmpty()) { |
748 | - throw new ServiceException(StringUtils.format("叫料失败,工单:{} 下的物料:{} 库存不足", orderCode, materialCode)); | |
752 | + throw new ServiceException(StringUtils.format("叫料失败,工单:{} 下的物料:{} 工序:{} 库存不足", | |
753 | + orderCode, materialCode, flowCode)); | |
749 | 754 | } |
750 | 755 | // 每次只出一盘料,不管数量 |
751 | 756 | InventoryDetail inventoryDetail = inventoryDetailList.stream() |
... | ... |
src/main/java/com/huaheng/pc/task/taskDetail/domain/TaskDetail.java
... | ... | @@ -166,6 +166,13 @@ public class TaskDetail implements Serializable { |
166 | 166 | private String supplierTracingNo; |
167 | 167 | |
168 | 168 | /** |
169 | + * 工序号 | |
170 | + */ | |
171 | + @TableField(value = "flowCode") | |
172 | + @ApiModelProperty(value = "工序号") | |
173 | + private String flowCode; | |
174 | + | |
175 | + /** | |
169 | 176 | * 是否首件/批,true:是,false:否 |
170 | 177 | */ |
171 | 178 | @TableField(value = "firstFlag") |
... | ... | @@ -474,9 +481,9 @@ public class TaskDetail implements Serializable { |
474 | 481 | /** |
475 | 482 | * 是否原材料 true:是,false:否 |
476 | 483 | */ |
477 | - @TableField(value = "isMaterial") | |
484 | + /*@TableField(value = "isMaterial") | |
478 | 485 | @ApiModelProperty(value = "是否原材料") |
479 | - private Boolean isMaterial; | |
486 | + private Boolean isMaterial;*/ | |
480 | 487 | |
481 | 488 | /** |
482 | 489 | * 高度 |
... | ... |
src/main/java/com/huaheng/pc/task/taskHeader/service/CycleCountTaskServiceImpl.java
... | ... | @@ -132,7 +132,7 @@ public class CycleCountTaskServiceImpl implements CycleCountTaskService { |
132 | 132 | taskDetail.setTracingNo(cycleCountDetailChild.getTracingNo()); |
133 | 133 | taskDetail.setLocationNoX(cycleCountDetailChild.getLocationNoX()); |
134 | 134 | taskDetail.setLocationNoY(cycleCountDetailChild.getLocationNoY()); |
135 | - taskDetail.setIsMaterial(QuantityConstant.INVENTORY_STATUS_OK.equals(cycleCountDetailChild.getInventorySts())); | |
135 | + //taskDetail.setIsMaterial(QuantityConstant.INVENTORY_STATUS_OK.equals(cycleCountDetailChild.getInventorySts())); | |
136 | 136 | taskDetail.setQty(cycleCountDetailChild.getSystemQty()); |
137 | 137 | taskDetail.setCompanyCode(cycleCountDetail.getCompanyCode()); |
138 | 138 | if (!taskDetailService.save(taskDetail)) { |
... | ... |
src/main/java/com/huaheng/pc/task/taskHeader/service/ReceiptTaskServiceImpl.java
... | ... | @@ -217,13 +217,14 @@ public class ReceiptTaskServiceImpl implements ReceiptTaskService { |
217 | 217 | taskDetail.setInventorySts(item.getInventorySts()); |
218 | 218 | taskDetail.setLocationNoX(item.getLocationNoX()); |
219 | 219 | taskDetail.setLocationNoY(item.getLocationNoY()); |
220 | - taskDetail.setIsMaterial(item.getIsMaterial()); | |
220 | + //taskDetail.setIsMaterial(item.getIsMaterial()); | |
221 | 221 | taskDetail.setWeight(item.getWeight()); |
222 | 222 | taskDetail.setTracingNo(item.getTracingNo()); |
223 | 223 | taskDetail.setBatch(item.getBatch()); |
224 | 224 | taskDetail.setSupplierCode(item.getSupplierCode()); |
225 | 225 | taskDetail.setSupplierTracingNo(item.getSupplierTracingNo()); |
226 | 226 | taskDetail.setFirstFlag(item.getFirstFlag()); |
227 | + taskDetail.setFlowCode(item.getFlowCode()); | |
227 | 228 | taskDetail.setBillCode(item.getReceiptCode()); |
228 | 229 | taskDetail.setBillDetailId(item.getReceiptDetailId()); |
229 | 230 | taskDetail.setQty(item.getQty()); |
... | ... | @@ -561,10 +562,11 @@ public class ReceiptTaskServiceImpl implements ReceiptTaskService { |
561 | 562 | inventoryDetail.setBatch(taskDetail.getBatch()); |
562 | 563 | inventoryDetail.setSupplierCode(taskDetail.getSupplierCode()); |
563 | 564 | inventoryDetail.setSupplierTracingNo(taskDetail.getSupplierTracingNo()); |
565 | + inventoryDetail.setFlowCode(taskDetail.getFlowCode()); | |
564 | 566 | inventoryDetail.setFirstFlag(taskDetail.getFirstFlag()); |
565 | 567 | inventoryDetail.setInventorySts(taskDetail.getInventorySts()); |
566 | 568 | inventoryDetail.setQty(receiptQty); |
567 | - inventoryDetail.setIsMaterial(taskDetail.getIsMaterial()); | |
569 | + //inventoryDetail.setIsMaterial(taskDetail.getIsMaterial()); | |
568 | 570 | inventoryDetail.setTaskQty(BigDecimal.ZERO); |
569 | 571 | inventoryDetail.setReferCode(receiptDetail.getReferCode()); |
570 | 572 | inventoryDetail.setReferDetailId(receiptDetail.getReferLineNum()); |
... | ... | @@ -602,12 +604,13 @@ public class ReceiptTaskServiceImpl implements ReceiptTaskService { |
602 | 604 | inventoryTransaction.setWeight(material.getWeight()); |
603 | 605 | inventoryTransaction.setHigh(material.getHigh()); |
604 | 606 | inventoryTransaction.setSolidifyTime(material.getSolidifyTime()); |
605 | - inventoryTransaction.setIsMaterial(taskDetail.getIsMaterial()); | |
607 | + //inventoryTransaction.setIsMaterial(taskDetail.getIsMaterial()); | |
606 | 608 | inventoryTransaction.setBillCode(taskDetail.getBillCode()); |
607 | 609 | inventoryTransaction.setBillDetailId(taskDetail.getBillDetailId()); |
608 | 610 | inventoryTransaction.setTracingNo(receiptDetail.getTracingNo()); |
609 | 611 | inventoryTransaction.setSupplierCode(receiptDetail.getSupplierCode()); |
610 | 612 | inventoryTransaction.setSupplierTracingNo(receiptDetail.getSupplierTracingNo()); |
613 | + inventoryTransaction.setFlowCode(taskDetail.getFlowCode()); | |
611 | 614 | inventoryTransaction.setFirstFlag(taskDetail.getFirstFlag()); |
612 | 615 | inventoryTransaction.setLocationNoX(receiptDetail.getLocationNoX()); |
613 | 616 | inventoryTransaction.setLocationNoY(receiptDetail.getLocationNoY()); |
... | ... | @@ -768,7 +771,7 @@ public class ReceiptTaskServiceImpl implements ReceiptTaskService { |
768 | 771 | taskDetail.setInventorySts(receiptContainerDetail.getInventorySts()); |
769 | 772 | taskDetail.setLocationNoX(receiptContainerDetail.getLocationNoX()); |
770 | 773 | taskDetail.setLocationNoY(receiptContainerDetail.getLocationNoY()); |
771 | - taskDetail.setIsMaterial(receiptContainerDetail.getIsMaterial()); | |
774 | + //taskDetail.setIsMaterial(receiptContainerDetail.getIsMaterial()); | |
772 | 775 | taskDetail.setWeight(receiptContainerDetail.getWeight()); |
773 | 776 | taskDetail.setTracingNo(receiptContainerDetail.getTracingNo()); |
774 | 777 | taskDetail.setBatch(receiptContainerDetail.getBatch()); |
... | ... |
src/main/java/com/huaheng/pc/task/taskHeader/service/ShipmentTaskService.java
... | ... | @@ -238,7 +238,8 @@ public class ShipmentTaskService { |
238 | 238 | taskDetail.setLocationNoY(shipmentContainerDetail.getLocationNoY()); |
239 | 239 | taskDetail.setOrderCode(shipmentContainerDetail.getOrderCode()); |
240 | 240 | taskDetail.setTracingNo(shipmentContainerDetail.getTracingNo()); |
241 | - taskDetail.setIsMaterial(shipmentContainerDetail.getIsMaterial()); | |
241 | + //taskDetail.setIsMaterial(shipmentContainerDetail.getIsMaterial()); | |
242 | + taskDetail.setFlowCode(shipmentContainerDetail.getFlowCode()); | |
242 | 243 | taskDetail.setFirstFlag(shipmentContainerDetail.getFirstFlag()); |
243 | 244 | taskDetail.setCreatedBy(shipmentContainerDetail.getCreatedBy()); |
244 | 245 | taskDetail.setLastUpdatedBy(shipmentContainerDetail.getLastUpdatedBy()); |
... | ... | @@ -395,7 +396,9 @@ public class ShipmentTaskService { |
395 | 396 | inventoryTransaction.setOrderCode(inventoryDetail.getOrderCode()); |
396 | 397 | inventoryTransaction.setOrderNumber(inventoryDetail.getOrderNumber()); |
397 | 398 | inventoryTransaction.setBatchNumber(inventoryDetail.getBatchNumber()); |
398 | - inventoryTransaction.setShipmentReferCode(inventoryDetail.getShipmentReferCode()); | |
399 | + inventoryTransaction.setFirstFlag(inventoryDetail.getFirstFlag()); | |
400 | + inventoryTransaction.setFlowCode(inventoryDetail.getFlowCode()); | |
401 | + //inventoryTransaction.setShipmentReferCode(inventoryDetail.getShipmentReferCode()); | |
399 | 402 | ShipmentDetail shipmentDetail = shipmentDetailService.getById(taskDetail.getBillDetailId()); |
400 | 403 | if (shipmentDetail != null) { |
401 | 404 | inventoryTransaction.setBillDetailId(shipmentDetail.getId()); |
... | ... |
src/main/java/com/huaheng/pc/task/taskHeader/service/TaskHeaderServiceImpl.java
... | ... | @@ -824,7 +824,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
824 | 824 | QuantityConstant.INVENTORY_STATUS_OK : QuantityConstant.INVENTORY_STATUS_NG); |
825 | 825 | taskDetail.setSupplierCode(materialData.getSupplierCode()); |
826 | 826 | taskDetail.setSupplierTracingNo(materialData.getSupplierTracingNo()); |
827 | - taskDetail.setIsMaterial(false); | |
827 | + //taskDetail.setIsMaterial(false); | |
828 | 828 | taskDetail.setOrderCode(taskHeader.getOrderCode()); |
829 | 829 | Material material = materialService.getByCode(materialData.getMaterialCode()); |
830 | 830 | taskDetail.setMaterialCode(material.getCode()); |
... | ... | @@ -994,7 +994,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
994 | 994 | inventoryTransaction.setContainerCode(""); |
995 | 995 | inventoryTransaction.setLocationCode(""); |
996 | 996 | inventoryTransaction.setTaskQty(taskDetail.getQty()); |
997 | - inventoryTransaction.setShipmentReferCode(shipmentHeader.getReferCode()); | |
997 | + //inventoryTransaction.setShipmentReferCode(shipmentHeader.getReferCode()); | |
998 | 998 | inventoryTransaction.setReferCode(shipmentHeader.getReferCode()); |
999 | 999 | inventoryTransaction.setOrderCode(shipmentHeader.getOrderCode()); |
1000 | 1000 | inventoryTransactionList.add(inventoryTransaction); |
... | ... |
src/main/resources/templates/inventory/cycleCountDetail/registration.html
src/main/resources/templates/inventory/inventoryDetail/inventoryDetail.html
... | ... | @@ -34,6 +34,10 @@ |
34 | 34 | <input name="materialName" placeholder="请输入物料名称" type="text"/> |
35 | 35 | </li> |
36 | 36 | <li> |
37 | + <label>工序号:</label> | |
38 | + <input id="flowCode" name="flowCode" placeholder="请输入工序号" type="text"/> | |
39 | + </li> | |
40 | + <li> | |
37 | 41 | <label>物料单位:</label> |
38 | 42 | <input name="materialUnit" placeholder="请输入物料单位" type="text"/> |
39 | 43 | </li> |
... | ... | @@ -203,6 +207,10 @@ |
203 | 207 | title: '物料名称' |
204 | 208 | }, |
205 | 209 | { |
210 | + field: 'flowCode', | |
211 | + title: '工序号' | |
212 | + }, | |
213 | + { | |
206 | 214 | field: 'materialSpec', |
207 | 215 | title: '物料规格' |
208 | 216 | }, |
... | ... |
src/main/resources/templates/inventory/inventoryDetail/inventoryDetailCbgSolid.html
src/main/resources/templates/inventory/inventoryDetail/inventoryList.html
... | ... | @@ -26,6 +26,10 @@ |
26 | 26 | <input id="materialCode" name="materialCode" placeholder="请输入物料编码" type="text"/> |
27 | 27 | </li> |
28 | 28 | <li> |
29 | + <label>工序号:</label> | |
30 | + <input id="flowCode" name="flowCode" placeholder="请输入工序号" type="text"/> | |
31 | + </li> | |
32 | + <li> | |
29 | 33 | <label>物料名称:</label> |
30 | 34 | <input id="materialName" name="materialName" placeholder="请输入物料名称" type="text"/> |
31 | 35 | </li> |
... | ... | @@ -167,6 +171,10 @@ |
167 | 171 | align: 'center' |
168 | 172 | }, |
169 | 173 | { |
174 | + field: 'flowCode', | |
175 | + title: '工序号' | |
176 | + }, | |
177 | + { | |
170 | 178 | field: 'materialSpec', |
171 | 179 | title: '物料规格', |
172 | 180 | align: 'center' |
... | ... | @@ -274,11 +282,6 @@ |
274 | 282 | title: '所属生产批号', |
275 | 283 | align: 'center' |
276 | 284 | }, |
277 | - /*{ | |
278 | - field: 'shipmentReferCode', | |
279 | - title: '锁定领料单号', | |
280 | - align: 'center' | |
281 | - },*/ | |
282 | 285 | { |
283 | 286 | field: 'created', |
284 | 287 | title: '入库日期', |
... | ... | @@ -330,6 +333,7 @@ |
330 | 333 | let vehicleCode = $("#vehicleCode").val(); |
331 | 334 | let materialCode = $("#materialCode").val(); |
332 | 335 | let materialName = $("#materialName").val(); |
336 | + let flowCode = $("#flowCode").val(); | |
333 | 337 | let materialUnit = $("#materialUnit").val(); |
334 | 338 | let materialSpec = $("#materialSpec").val(); |
335 | 339 | let materialCategory = $("#materialCategory").val(); |
... | ... | @@ -346,6 +350,7 @@ |
346 | 350 | $.common.isEmpty(vehicleCode) && |
347 | 351 | $.common.isEmpty(materialCode) && |
348 | 352 | $.common.isEmpty(materialName) && |
353 | + $.common.isEmpty(flowCode) && | |
349 | 354 | $.common.isEmpty(materialUnit) && |
350 | 355 | $.common.isEmpty(materialSpec) && |
351 | 356 | $.common.isEmpty(materialCategory) && |
... | ... |
src/main/resources/templates/inventory/inventoryTransaction/inventoryTransaction.html
... | ... | @@ -47,6 +47,10 @@ |
47 | 47 | <input name="materialName" placeholder="请输入物料名称" type="text"/> |
48 | 48 | </li> |
49 | 49 | <li> |
50 | + <label>工序号:</label> | |
51 | + <input id="flowCode" name="flowCode" placeholder="请输入工序号" type="text"/> | |
52 | + </li> | |
53 | + <li> | |
50 | 54 | <label>物料规格:</label> |
51 | 55 | <input name="materialSpec" placeholder="请输入物料规格" type="text"/> |
52 | 56 | </li> |
... | ... | @@ -199,6 +203,10 @@ |
199 | 203 | title: '物料名称' |
200 | 204 | }, |
201 | 205 | { |
206 | + field: 'flowCode', | |
207 | + title: '工序号' | |
208 | + }, | |
209 | + { | |
202 | 210 | field: 'materialSpec', |
203 | 211 | title: '物料规格' |
204 | 212 | }, |
... | ... |
src/main/resources/templates/receipt/receiptContainerHeader/receiptContainerHeader.html
src/main/resources/templates/shipment/shipmentContainerHeader/shipmentContainerHeader.html