Commit d56daaab96407c27f1e1cc6e867be6da47d023d0

Authored by 易文鹏
1 parent 7fa113b1

feat:固定分配035仓库,改为动态分配仓库编码

src/main/java/com/huaheng/api/mes/controller/MesReceiptController.java
@@ -667,7 +667,7 @@ public class MesReceiptController extends BaseController { @@ -667,7 +667,7 @@ public class MesReceiptController extends BaseController {
667 Rd_In_S.put("cInvCode", receiptDetail.getMaterialCode()); 667 Rd_In_S.put("cInvCode", receiptDetail.getMaterialCode());
668 Rd_In_S.put("Iquantity", receiptDetail.getTaskQty()); 668 Rd_In_S.put("Iquantity", receiptDetail.getTaskQty());
669 Rd_In_S.put("iFQuantity", receiptDetail.getQty()); 669 Rd_In_S.put("iFQuantity", receiptDetail.getQty());
670 - Rd_In_S.put("cwhcode", "035"); 670 + //Rd_In_S.put("cwhcode", "");
671 Rd_In_S.put("MOCode", receiptDetail.getNoticeNo()); 671 Rd_In_S.put("MOCode", receiptDetail.getNoticeNo());
672 Rd_In_S.put("ISUrgent", receiptDetail.getIsUrgent()); 672 Rd_In_S.put("ISUrgent", receiptDetail.getIsUrgent());
673 Rd_In_S.put("receiptBarcode", receiptDetail.getReceiptBarcode()); 673 Rd_In_S.put("receiptBarcode", receiptDetail.getReceiptBarcode());
@@ -878,7 +878,7 @@ public class MesReceiptController extends BaseController { @@ -878,7 +878,7 @@ public class MesReceiptController extends BaseController {
878 Rd_Out_S.put("Iquantity", shipmentDetail.getTaskQty()); 878 Rd_Out_S.put("Iquantity", shipmentDetail.getTaskQty());
879 // MOM传入的入库数量 879 // MOM传入的入库数量
880 Rd_Out_S.put("iFQuantity", shipmentDetail.getQty()); 880 Rd_Out_S.put("iFQuantity", shipmentDetail.getQty());
881 - Rd_Out_S.put("cwhcode", "035"); 881 + //Rd_Out_S.put("cwhcode", "035");
882 List<TaskDetail> taskDetails = taskDetailService.list(new LambdaQueryWrapper<TaskDetail>() 882 List<TaskDetail> taskDetails = taskDetailService.list(new LambdaQueryWrapper<TaskDetail>()
883 .eq(TaskDetail::getInternalTaskType, 200) 883 .eq(TaskDetail::getInternalTaskType, 200)
884 .eq(TaskDetail::getBillDetailId, shipmentDetail.getId())); 884 .eq(TaskDetail::getBillDetailId, shipmentDetail.getId()));
@@ -952,9 +952,9 @@ public class MesReceiptController extends BaseController { @@ -952,9 +952,9 @@ public class MesReceiptController extends BaseController {
952 } else { 952 } else {
953 Rd_Out_M.put("UserNo", user.getLoginName()); 953 Rd_Out_M.put("UserNo", user.getLoginName());
954 } 954 }
955 - Rd_Out_M.put("warehouse", "035"); 955 + Rd_Out_M.put("warehouse", shipmentHeader.getWarehouse());//仓库编码
956 Rd_Out_M.put("cDepCode", "01030101");//部门编码 956 Rd_Out_M.put("cDepCode", "01030101");//部门编码
957 - Rd_Out_M.put("cWhCode", shipmentHeader.getWarehouse());//仓库编码 957 + //Rd_Out_M.put("cWhCode", shipmentHeader.getWarehouse());//仓库编码
958 return Rd_Out_M; 958 return Rd_Out_M;
959 } 959 }
960 960
src/main/java/com/huaheng/api/mes/service/MesServiceImpl.java
@@ -199,7 +199,7 @@ public class MesServiceImpl implements IMesService { @@ -199,7 +199,7 @@ public class MesServiceImpl implements IMesService {
199 .eq(ShipmentHeader::getCode, header.getReferCode()) 199 .eq(ShipmentHeader::getCode, header.getReferCode())
200 .eq(ShipmentHeader::getShipmentType, header.getRefeCodeType())); 200 .eq(ShipmentHeader::getShipmentType, header.getRefeCodeType()));
201 if (!list.isEmpty()) { 201 if (!list.isEmpty()) {
202 - return AjaxResult.error("添加出库单: 上游单号referCode重复[ " + header.getReferCode() + " ],请勿重复添加。"); 202 + return AjaxResult.error("添加出库单: 上游单号重复[ " + header.getReferCode() + " ],请勿重复添加。");
203 } 203 }
204 AjaxResult ajaxResult = new AjaxResult(); 204 AjaxResult ajaxResult = new AjaxResult();
205 //校验参数 205 //校验参数
src/main/java/com/huaheng/api/wcs/service/warecellAllocation/WarecellAllocationServiceImpl.java
@@ -149,7 +149,7 @@ public class WarecellAllocationServiceImpl implements WarecellAllocationService @@ -149,7 +149,7 @@ public class WarecellAllocationServiceImpl implements WarecellAllocationService
149 if (height == null) { 149 if (height == null) {
150 return AjaxResult.error("分配库位时,高度为空"); 150 return AjaxResult.error("分配库位时,高度为空");
151 } 151 }
152 - if (roadWays == null) { 152 + if (roadWays == null || roadWays.isEmpty()) {
153 return AjaxResult.error("分配库位时,没有获取到可用巷道"); 153 return AjaxResult.error("分配库位时,没有获取到可用巷道");
154 } 154 }
155 Zone zone = zoneService.getOne(new LambdaQueryWrapper<Zone>().eq(Zone::getArea, area)); 155 Zone zone = zoneService.getOne(new LambdaQueryWrapper<Zone>().eq(Zone::getArea, area));
@@ -256,7 +256,7 @@ public class WarecellAllocationServiceImpl implements WarecellAllocationService @@ -256,7 +256,7 @@ public class WarecellAllocationServiceImpl implements WarecellAllocationService
256 if (StringUtils.isEmpty(locationCode)) { 256 if (StringUtils.isEmpty(locationCode)) {
257 return AjaxResult.error("没有库位可分配"); 257 return AjaxResult.error("没有库位可分配");
258 } else if (locationCode.length() > 15) { 258 } else if (locationCode.length() > 15) {
259 - return AjaxResult.error(locationCode, "巷道:" + roadWays); 259 + return AjaxResult.error(locationCode);
260 } 260 }
261 261
262 int updateCount = locationService.updateStatusNew(locationCode, warehouseCode, QuantityConstant.STATUS_LOCATION_LOCK, QuantityConstant.STATUS_LOCATION_EMPTY); 262 int updateCount = locationService.updateStatusNew(locationCode, warehouseCode, QuantityConstant.STATUS_LOCATION_LOCK, QuantityConstant.STATUS_LOCATION_EMPTY);
src/main/java/com/huaheng/pc/inventory/inventoryHeader/service/InventoryHeaderServiceImpl.java
@@ -23,6 +23,7 @@ import com.huaheng.pc.config.location.domain.Location; @@ -23,6 +23,7 @@ import com.huaheng.pc.config.location.domain.Location;
23 import com.huaheng.pc.config.location.service.LocationService; 23 import com.huaheng.pc.config.location.service.LocationService;
24 import com.huaheng.pc.config.material.domain.Material; 24 import com.huaheng.pc.config.material.domain.Material;
25 import com.huaheng.pc.config.material.service.MaterialService; 25 import com.huaheng.pc.config.material.service.MaterialService;
  26 +import com.huaheng.pc.config.warehouse.domain.Warehouse;
26 import com.huaheng.pc.inventory.inventoryDetail.domain.InventoryDetail; 27 import com.huaheng.pc.inventory.inventoryDetail.domain.InventoryDetail;
27 import com.huaheng.pc.inventory.inventoryDetail.service.InventoryDetailService; 28 import com.huaheng.pc.inventory.inventoryDetail.service.InventoryDetailService;
28 import com.huaheng.pc.inventory.inventoryHeader.domain.InventoryHeader; 29 import com.huaheng.pc.inventory.inventoryHeader.domain.InventoryHeader;
@@ -590,6 +591,8 @@ public class InventoryHeaderServiceImpl extends ServiceImpl&lt;InventoryHeaderMappe @@ -590,6 +591,8 @@ public class InventoryHeaderServiceImpl extends ServiceImpl&lt;InventoryHeaderMappe
590 @Transactional 591 @Transactional
591 public AjaxResult createShipmentHeaderAndDetail(List<InventoryDetail> inventoryDetailList) { 592 public AjaxResult createShipmentHeaderAndDetail(List<InventoryDetail> inventoryDetailList) {
592 ArrayList<Detail> detailList = new ArrayList<>(); 593 ArrayList<Detail> detailList = new ArrayList<>();
  594 + String warehouse = "";
  595 + String warehouseName = "";
593 596
594 for (InventoryDetail inventoryDetail : inventoryDetailList) { 597 for (InventoryDetail inventoryDetail : inventoryDetailList) {
595 Detail detail = new Detail(); 598 Detail detail = new Detail();
@@ -598,12 +601,14 @@ public class InventoryHeaderServiceImpl extends ServiceImpl&lt;InventoryHeaderMappe @@ -598,12 +601,14 @@ public class InventoryHeaderServiceImpl extends ServiceImpl&lt;InventoryHeaderMappe
598 detail.setMaterialCode(inventoryDetail.getMaterialCode()); 601 detail.setMaterialCode(inventoryDetail.getMaterialCode());
599 detail.setQty(inventoryDetail.getQty()); 602 detail.setQty(inventoryDetail.getQty());
600 //detail.setNoticeNo(inventoryDetail.getNoticeCode()); 603 //detail.setNoticeNo(inventoryDetail.getNoticeCode());
  604 + warehouse = inventoryDetail.getWarehouse();
  605 + warehouseName = inventoryDetail.getWarehouseName();
601 detailList.add(detail); 606 detailList.add(detail);
602 } 607 }
603 Header header = new Header(); 608 Header header = new Header();
604 header.setRefeCodeType("HBCK"); 609 header.setRefeCodeType("HBCK");
605 - header.setWarehouse("035");  
606 - header.setWarehouseName("机加立库"); 610 + header.setWarehouse(warehouse);
  611 + header.setWarehouseName(warehouseName);
607 String receiptCode = shipmentHeaderService.createCode(header.getRefeCodeType()); 612 String receiptCode = shipmentHeaderService.createCode(header.getRefeCodeType());
608 header.setReferCode(receiptCode); 613 header.setReferCode(receiptCode);
609 BigDecimal totalQty = new BigDecimal(0); 614 BigDecimal totalQty = new BigDecimal(0);
src/main/java/com/huaheng/pc/monitor/job/task/RyTask.java
@@ -212,7 +212,7 @@ public class RyTask extends BaseController { @@ -212,7 +212,7 @@ public class RyTask extends BaseController {
212 //299:其他出库 212 //299:其他出库
213 if (("MOM".equals(shipmentHeader.getCreatedBy()) || "merge".equals(shipmentHeader.getShipmentType()) || "299".equals(shipmentHeader.getShipmentType()))) { 213 if (("MOM".equals(shipmentHeader.getCreatedBy()) || "merge".equals(shipmentHeader.getShipmentType()) || "299".equals(shipmentHeader.getShipmentType()))) {
214 try { 214 try {
215 - shipmentHeader.setWarehouse("035"); 215 + //shipmentHeader.setWarehouse("035");
216 mesReceiptController.postE_Rd_Out(shipmentHeader); 216 mesReceiptController.postE_Rd_Out(shipmentHeader);
217 } catch (Exception e) { 217 } catch (Exception e) {
218 e.printStackTrace(); 218 e.printStackTrace();
src/main/java/com/huaheng/pc/shipment/shipmentHeader/controller/ShipmentHeaderController.java
@@ -567,7 +567,7 @@ public class ShipmentHeaderController extends BaseController { @@ -567,7 +567,7 @@ public class ShipmentHeaderController extends BaseController {
567 } 567 }
568 if (("MOM".equals(shipmentHeader.getCreatedBy()) || "merge".equals(shipmentHeader.getShipmentType()) || "299".equals(shipmentHeader.getShipmentType()))) { 568 if (("MOM".equals(shipmentHeader.getCreatedBy()) || "merge".equals(shipmentHeader.getShipmentType()) || "299".equals(shipmentHeader.getShipmentType()))) {
569 try { 569 try {
570 - shipmentHeader.setWarehouse("035"); 570 + //shipmentHeader.setWarehouse("035");
571 if (mesReceiptController.postE_Rd_Out(shipmentHeader)) { 571 if (mesReceiptController.postE_Rd_Out(shipmentHeader)) {
572 return AjaxResult.success("回传成功"); 572 return AjaxResult.success("回传成功");
573 } 573 }
src/main/resources/application-druid.properties
@@ -9,7 +9,7 @@ spring.datasource.driverClassName=com.mysql.cj.jdbc.Driver @@ -9,7 +9,7 @@ spring.datasource.driverClassName=com.mysql.cj.jdbc.Driver
9 #spring.datasource.druid.master.username=root 9 #spring.datasource.druid.master.username=root
10 #spring.datasource.druid.master.password=qq123456 10 #spring.datasource.druid.master.password=qq123456
11 #local 11 #local
12 -spring.datasource.druid.master.url=jdbc:mysql://localhost:3306/wms_shandonghaiwang?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=GMT%2b8 12 +spring.datasource.druid.master.url=jdbc:mysql://localhost:3306/wms_shandonghaiwang2?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=GMT%2b8
13 spring.datasource.druid.master.username=root 13 spring.datasource.druid.master.username=root
14 spring.datasource.druid.master.password=123456 14 spring.datasource.druid.master.password=123456
15 # test 15 # test
src/main/resources/application.yml
@@ -109,7 +109,7 @@ spring: @@ -109,7 +109,7 @@ spring:
109 # redis 配置 109 # redis 配置
110 redis: 110 redis:
111 # 地址 111 # 地址
112 - host: localhost 112 + host: 192.168.100.134
113 # 端口,默认为6379 113 # 端口,默认为6379
114 port: 6379 114 port: 6379
115 # 密码 115 # 密码
src/main/resources/templates/shipment/shipmentHeader/shipmentHeader.html
@@ -560,24 +560,44 @@ @@ -560,24 +560,44 @@
560 field: 'workshop', 560 field: 'workshop',
561 title: '生产车间', 561 title: '生产车间',
562 }, 562 },
  563 +
563 { 564 {
564 - field: 'shipmentNote',  
565 - title: '备注', 565 + field: 'noticeNo',
  566 + title: '通知单号',
566 }, 567 },
567 { 568 {
568 - field: 'transferWarehouseName',  
569 - title: '调入仓库名称', 569 + field: 'superiorName',
  570 + title: '母件名称',
570 }, 571 },
571 { 572 {
572 - field: 'noticeNo',  
573 - title: '通知单号', 573 + field: 'superiorCode',
  574 + title: '母件编码',
  575 + formatter: function (value, row, index) {
  576 + var actions = [];
  577 + if (value == undefined || value == '')
  578 + value = " "
  579 + else
  580 + actions.push('<pre style="max-height:50px; white-space: pre-wrap; width:500px">' + value + '</pre>')
  581 + return actions.join(" ")
  582 + }
574 }, 583 },
575 -  
576 { 584 {
577 - field: 'projectCode',  
578 - title: '项目号',  
579 - visible: false 585 + field: 'recordCode',
  586 + title: '合并前单号',
  587 + formatter: function (value, row, index) {
  588 + var actions = [];
  589 + if (value == undefined || value == '')
  590 + value = " "
  591 + else
  592 + actions.push('<pre style="max-height:50px; white-space: pre-wrap; width:500px">' + value + '</pre>')
  593 + return actions.join(" ")
  594 + }
580 }, 595 },
  596 + // {
  597 + // field: 'projectCode',
  598 + // title: '项目号',
  599 + // visible: false
  600 + // },
581 { 601 {
582 field: 'customerCode', 602 field: 'customerCode',
583 title: '客户', 603 title: '客户',
@@ -600,10 +620,6 @@ @@ -600,10 +620,6 @@
600 visible: false 620 visible: false
601 }, 621 },
602 { 622 {
603 - field: 'processType',  
604 - title: '调整单号',  
605 - },  
606 - {  
607 field: 'created', 623 field: 'created',
608 title: '创建时间', 624 title: '创建时间',
609 }, 625 },
@@ -625,34 +641,7 @@ @@ -625,34 +641,7 @@
625 title: '操作人', 641 title: '操作人',
626 visible: true 642 visible: true
627 }, 643 },
628 - {  
629 - field: 'superiorName',  
630 - title: '母件名称',  
631 - },  
632 - {  
633 - field: 'superiorCode',  
634 - title: '母件编码',  
635 - formatter: function (value, row, index) {  
636 - var actions = [];  
637 - if (value == undefined || value == '')  
638 - value = " "  
639 - else  
640 - actions.push('<pre style="max-height:50px; white-space: pre-wrap; width:500px">' + value + '</pre>')  
641 - return actions.join(" ")  
642 - }  
643 - },  
644 - {  
645 - field: 'recordCode',  
646 - title: '合并前单号',  
647 - formatter: function (value, row, index) {  
648 - var actions = [];  
649 - if (value == undefined || value == '')  
650 - value = " "  
651 - else  
652 - actions.push('<pre style="max-height:50px; white-space: pre-wrap; width:500px">' + value + '</pre>')  
653 - return actions.join(" ")  
654 - }  
655 - }, 644 +
656 { 645 {
657 field: 'materialColor', 646 field: 'materialColor',
658 title: '颜色信息', 647 title: '颜色信息',
@@ -678,6 +667,18 @@ @@ -678,6 +667,18 @@
678 } 667 }
679 }, 668 },
680 { 669 {
  670 + field: 'processType',
  671 + title: '调整单号',
  672 + },
  673 + {
  674 + field: 'shipmentNote',
  675 + title: '备注',
  676 + },
  677 + {
  678 + field: 'transferWarehouseName',
  679 + title: '调入仓库名称',
  680 + },
  681 + {
681 field: 'pushSuccessStatus', 682 field: 'pushSuccessStatus',
682 title: '回传状态', 683 title: '回传状态',
683 visible: true, 684 visible: true,