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 667 Rd_In_S.put("cInvCode", receiptDetail.getMaterialCode());
668 668 Rd_In_S.put("Iquantity", receiptDetail.getTaskQty());
669 669 Rd_In_S.put("iFQuantity", receiptDetail.getQty());
670   - Rd_In_S.put("cwhcode", "035");
  670 + //Rd_In_S.put("cwhcode", "");
671 671 Rd_In_S.put("MOCode", receiptDetail.getNoticeNo());
672 672 Rd_In_S.put("ISUrgent", receiptDetail.getIsUrgent());
673 673 Rd_In_S.put("receiptBarcode", receiptDetail.getReceiptBarcode());
... ... @@ -878,7 +878,7 @@ public class MesReceiptController extends BaseController {
878 878 Rd_Out_S.put("Iquantity", shipmentDetail.getTaskQty());
879 879 // MOM传入的入库数量
880 880 Rd_Out_S.put("iFQuantity", shipmentDetail.getQty());
881   - Rd_Out_S.put("cwhcode", "035");
  881 + //Rd_Out_S.put("cwhcode", "035");
882 882 List<TaskDetail> taskDetails = taskDetailService.list(new LambdaQueryWrapper<TaskDetail>()
883 883 .eq(TaskDetail::getInternalTaskType, 200)
884 884 .eq(TaskDetail::getBillDetailId, shipmentDetail.getId()));
... ... @@ -952,9 +952,9 @@ public class MesReceiptController extends BaseController {
952 952 } else {
953 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 956 Rd_Out_M.put("cDepCode", "01030101");//部门编码
957   - Rd_Out_M.put("cWhCode", shipmentHeader.getWarehouse());//仓库编码
  957 + //Rd_Out_M.put("cWhCode", shipmentHeader.getWarehouse());//仓库编码
958 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 199 .eq(ShipmentHeader::getCode, header.getReferCode())
200 200 .eq(ShipmentHeader::getShipmentType, header.getRefeCodeType()));
201 201 if (!list.isEmpty()) {
202   - return AjaxResult.error("添加出库单: 上游单号referCode重复[ " + header.getReferCode() + " ],请勿重复添加。");
  202 + return AjaxResult.error("添加出库单: 上游单号重复[ " + header.getReferCode() + " ],请勿重复添加。");
203 203 }
204 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 149 if (height == null) {
150 150 return AjaxResult.error("分配库位时,高度为空");
151 151 }
152   - if (roadWays == null) {
  152 + if (roadWays == null || roadWays.isEmpty()) {
153 153 return AjaxResult.error("分配库位时,没有获取到可用巷道");
154 154 }
155 155 Zone zone = zoneService.getOne(new LambdaQueryWrapper<Zone>().eq(Zone::getArea, area));
... ... @@ -256,7 +256,7 @@ public class WarecellAllocationServiceImpl implements WarecellAllocationService
256 256 if (StringUtils.isEmpty(locationCode)) {
257 257 return AjaxResult.error("没有库位可分配");
258 258 } else if (locationCode.length() > 15) {
259   - return AjaxResult.error(locationCode, "巷道:" + roadWays);
  259 + return AjaxResult.error(locationCode);
260 260 }
261 261  
262 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 23 import com.huaheng.pc.config.location.service.LocationService;
24 24 import com.huaheng.pc.config.material.domain.Material;
25 25 import com.huaheng.pc.config.material.service.MaterialService;
  26 +import com.huaheng.pc.config.warehouse.domain.Warehouse;
26 27 import com.huaheng.pc.inventory.inventoryDetail.domain.InventoryDetail;
27 28 import com.huaheng.pc.inventory.inventoryDetail.service.InventoryDetailService;
28 29 import com.huaheng.pc.inventory.inventoryHeader.domain.InventoryHeader;
... ... @@ -590,6 +591,8 @@ public class InventoryHeaderServiceImpl extends ServiceImpl&lt;InventoryHeaderMappe
590 591 @Transactional
591 592 public AjaxResult createShipmentHeaderAndDetail(List<InventoryDetail> inventoryDetailList) {
592 593 ArrayList<Detail> detailList = new ArrayList<>();
  594 + String warehouse = "";
  595 + String warehouseName = "";
593 596  
594 597 for (InventoryDetail inventoryDetail : inventoryDetailList) {
595 598 Detail detail = new Detail();
... ... @@ -598,12 +601,14 @@ public class InventoryHeaderServiceImpl extends ServiceImpl&lt;InventoryHeaderMappe
598 601 detail.setMaterialCode(inventoryDetail.getMaterialCode());
599 602 detail.setQty(inventoryDetail.getQty());
600 603 //detail.setNoticeNo(inventoryDetail.getNoticeCode());
  604 + warehouse = inventoryDetail.getWarehouse();
  605 + warehouseName = inventoryDetail.getWarehouseName();
601 606 detailList.add(detail);
602 607 }
603 608 Header header = new Header();
604 609 header.setRefeCodeType("HBCK");
605   - header.setWarehouse("035");
606   - header.setWarehouseName("机加立库");
  610 + header.setWarehouse(warehouse);
  611 + header.setWarehouseName(warehouseName);
607 612 String receiptCode = shipmentHeaderService.createCode(header.getRefeCodeType());
608 613 header.setReferCode(receiptCode);
609 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 212 //299:其他出库
213 213 if (("MOM".equals(shipmentHeader.getCreatedBy()) || "merge".equals(shipmentHeader.getShipmentType()) || "299".equals(shipmentHeader.getShipmentType()))) {
214 214 try {
215   - shipmentHeader.setWarehouse("035");
  215 + //shipmentHeader.setWarehouse("035");
216 216 mesReceiptController.postE_Rd_Out(shipmentHeader);
217 217 } catch (Exception e) {
218 218 e.printStackTrace();
... ...
src/main/java/com/huaheng/pc/shipment/shipmentHeader/controller/ShipmentHeaderController.java
... ... @@ -567,7 +567,7 @@ public class ShipmentHeaderController extends BaseController {
567 567 }
568 568 if (("MOM".equals(shipmentHeader.getCreatedBy()) || "merge".equals(shipmentHeader.getShipmentType()) || "299".equals(shipmentHeader.getShipmentType()))) {
569 569 try {
570   - shipmentHeader.setWarehouse("035");
  570 + //shipmentHeader.setWarehouse("035");
571 571 if (mesReceiptController.postE_Rd_Out(shipmentHeader)) {
572 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 9 #spring.datasource.druid.master.username=root
10 10 #spring.datasource.druid.master.password=qq123456
11 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 13 spring.datasource.druid.master.username=root
14 14 spring.datasource.druid.master.password=123456
15 15 # test
... ...
src/main/resources/application.yml
... ... @@ -109,7 +109,7 @@ spring:
109 109 # redis 配置
110 110 redis:
111 111 # 地址
112   - host: localhost
  112 + host: 192.168.100.134
113 113 # 端口,默认为6379
114 114 port: 6379
115 115 # 密码
... ...
src/main/resources/templates/shipment/shipmentHeader/shipmentHeader.html
... ... @@ -560,24 +560,44 @@
560 560 field: 'workshop',
561 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 602 field: 'customerCode',
583 603 title: '客户',
... ... @@ -600,10 +620,6 @@
600 620 visible: false
601 621 },
602 622 {
603   - field: 'processType',
604   - title: '调整单号',
605   - },
606   - {
607 623 field: 'created',
608 624 title: '创建时间',
609 625 },
... ... @@ -625,34 +641,7 @@
625 641 title: '操作人',
626 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 646 field: 'materialColor',
658 647 title: '颜色信息',
... ... @@ -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 682 field: 'pushSuccessStatus',
682 683 title: '回传状态',
683 684 visible: true,
... ...