From 223b671c7bb89da9dd9ed579dc1be78d3f904008 Mon Sep 17 00:00:00 2001
From: yiwenpeng <ywp303@163.com>
Date: Fri, 5 Jan 2024 13:03:08 +0800
Subject: [PATCH] feat: 入库组盘托盘小写自动转大写

---
 src/main/java/com/huaheng/pc/receipt/receiptContainerHeader/service/ReceiptContainerHeaderServiceImpl.java |  1 +
 src/main/java/com/huaheng/pc/receipt/receiptHeader/controller/ReceiptHeaderController.java                 |  3 +++
 src/main/java/com/huaheng/pc/receipt/receiptHeader/domain/ReceiptHeader.java                               |  4 ++++
 src/main/java/com/huaheng/pc/shipment/shipmentHeader/controller/ShipmentHeaderController.java              |  2 ++
 src/main/java/com/huaheng/pc/shipment/shipmentHeader/domain/ShipmentHeader.java                            |  4 ++++
 src/main/resources/templates/inventory/inventoryTransaction/displace.html                                  |  6 ++++++
 src/main/resources/templates/receipt/receiptHeader/receiptHeader.html                                      |  5 ++++-
 src/main/resources/templates/receipt/receiptHeaderHistory/receiptHeaderHistory.html                        |  2 +-
 src/main/resources/templates/shipment/shipmentHeader/shipmentHeader.html                                   | 26 ++++++++++++++++++++++----
 src/main/resources/templates/shipment/shipmentHeaderHistory/shipmentHeaderHistory.html                     | 52 ++++++++++++++++++++++++++++++----------------------
 10 files changed, 77 insertions(+), 28 deletions(-)

diff --git a/src/main/java/com/huaheng/pc/receipt/receiptContainerHeader/service/ReceiptContainerHeaderServiceImpl.java b/src/main/java/com/huaheng/pc/receipt/receiptContainerHeader/service/ReceiptContainerHeaderServiceImpl.java
index 4e22cb6..7209962 100644
--- a/src/main/java/com/huaheng/pc/receipt/receiptContainerHeader/service/ReceiptContainerHeaderServiceImpl.java
+++ b/src/main/java/com/huaheng/pc/receipt/receiptContainerHeader/service/ReceiptContainerHeaderServiceImpl.java
@@ -107,6 +107,7 @@ public class ReceiptContainerHeaderServiceImpl extends ServiceImpl<ReceiptContai
     public AjaxResult saveContainer(String receiptCode, String containerCode, Integer receiptDetailId,
                                     String locationCode, BigDecimal qty, String locatingRule) {
 
+        containerCode = containerCode.substring(0, 1).toUpperCase() + containerCode.substring(1);
         ReceiptHeader receiptHeader = receiptHeaderService.getReceiptHeaderByCode(receiptCode);
         ReceiptDetail detail = receiptDetailService.getById(receiptDetailId);
         if (detail.getIsMustFlatWarehouseMaterial()) {
diff --git a/src/main/java/com/huaheng/pc/receipt/receiptHeader/controller/ReceiptHeaderController.java b/src/main/java/com/huaheng/pc/receipt/receiptHeader/controller/ReceiptHeaderController.java
index 8166f53..06690dc 100644
--- a/src/main/java/com/huaheng/pc/receipt/receiptHeader/controller/ReceiptHeaderController.java
+++ b/src/main/java/com/huaheng/pc/receipt/receiptHeader/controller/ReceiptHeaderController.java
@@ -22,6 +22,7 @@ import com.huaheng.pc.receipt.receiptDetailHistory.service.ReceiptDetailHistoryS
 import com.huaheng.pc.receipt.receiptHeader.domain.ReceiptHeader;
 import com.huaheng.pc.receipt.receiptHeader.service.ReceiptHeaderService;
 import com.huaheng.pc.receipt.receiptHeaderHistory.service.ReceiptHeaderHistoryService;
+import com.huaheng.pc.shipment.shipmentHeader.domain.ShipmentHeader;
 import com.huaheng.pc.task.taskHeader.domain.TaskHeader;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
@@ -121,6 +122,8 @@ public class ReceiptHeaderController extends BaseController {
                 .lt(StringUtils.isNotEmpty(completeTimeEnd), ReceiptHeader::getCompleteTime, completeTimeEnd)
                 //物料搜索
                 .inSql(StringUtils.isNotEmpty(receiptHeader.getMaterialName()), ReceiptHeader::getId, "SELECT receiptId FROM receipt_detail WHERE materialName LIKE '%" + receiptHeader.getMaterialName() + "%'")
+                .inSql(StringUtils.isNotEmpty(receiptHeader.getMaterialCode()), ReceiptHeader::getId, "SELECT receiptId FROM receipt_detail WHERE materialCode LIKE '%" + receiptHeader.getMaterialCode() + "%'")
+
                 .orderByAsc(ReceiptHeader::getLastStatus)
                 .orderByDesc(ReceiptHeader::getCreated);
 
diff --git a/src/main/java/com/huaheng/pc/receipt/receiptHeader/domain/ReceiptHeader.java b/src/main/java/com/huaheng/pc/receipt/receiptHeader/domain/ReceiptHeader.java
index 7758b14..a3203b3 100644
--- a/src/main/java/com/huaheng/pc/receipt/receiptHeader/domain/ReceiptHeader.java
+++ b/src/main/java/com/huaheng/pc/receipt/receiptHeader/domain/ReceiptHeader.java
@@ -403,6 +403,10 @@ public class ReceiptHeader implements Serializable {
     @ApiModelProperty(value = "物料名称")
     private String materialName;
 
+    @TableField(exist = false)
+    @ApiModelProperty(value = "物料编码")
+    private String materialCode;
+
 
     /**
      * 是否快速入库
diff --git a/src/main/java/com/huaheng/pc/shipment/shipmentHeader/controller/ShipmentHeaderController.java b/src/main/java/com/huaheng/pc/shipment/shipmentHeader/controller/ShipmentHeaderController.java
index 7a6bc32..7576d6e 100644
--- a/src/main/java/com/huaheng/pc/shipment/shipmentHeader/controller/ShipmentHeaderController.java
+++ b/src/main/java/com/huaheng/pc/shipment/shipmentHeader/controller/ShipmentHeaderController.java
@@ -228,6 +228,8 @@ public class ShipmentHeaderController extends BaseController {
                 .eq(ShipmentHeader::getDeleted, 0)
                 //物料搜索
                 .inSql(StringUtils.isNotEmpty(shipmentHeader.getMaterialName()), ShipmentHeader::getId, "SELECT shipmentId FROM shipment_detail WHERE materialName LIKE '%" + shipmentHeader.getMaterialName() + "%'")
+                .inSql(StringUtils.isNotEmpty(shipmentHeader.getMaterialCode()), ShipmentHeader::getId, "SELECT shipmentId FROM shipment_detail WHERE materialCode LIKE '%" + shipmentHeader.getMaterialCode() + "%'")
+
                 .orderByAsc(ShipmentHeader::getLastStatus)
                 .orderByAsc(ShipmentHeader::getRequestedStartDate)
                 .orderByAsc(ShipmentHeader::getCreated);
diff --git a/src/main/java/com/huaheng/pc/shipment/shipmentHeader/domain/ShipmentHeader.java b/src/main/java/com/huaheng/pc/shipment/shipmentHeader/domain/ShipmentHeader.java
index b2fe11c..db64bb0 100644
--- a/src/main/java/com/huaheng/pc/shipment/shipmentHeader/domain/ShipmentHeader.java
+++ b/src/main/java/com/huaheng/pc/shipment/shipmentHeader/domain/ShipmentHeader.java
@@ -531,4 +531,8 @@ public class ShipmentHeader implements Serializable {
     @TableField(exist = false)
     @ApiModelProperty(value = "物料名称")
     private String materialName;
+
+    @TableField(exist = false)
+    @ApiModelProperty(value = "物料编码")
+    private String materialCode;
 }
diff --git a/src/main/resources/templates/inventory/inventoryTransaction/displace.html b/src/main/resources/templates/inventory/inventoryTransaction/displace.html
index 0aadced..aab899b 100644
--- a/src/main/resources/templates/inventory/inventoryTransaction/displace.html
+++ b/src/main/resources/templates/inventory/inventoryTransaction/displace.html
@@ -31,6 +31,12 @@
             <input type="button" class="btn-success btn" onclick="selectInventoryDetail()" value="选取置换的库存"/>
             <button type="button" style="margin-right: 10px" class="btn btn-primary" onclick="getInventoryDetail()">查看物料详情</button>
         </div>
+    <div class="form-group">
+        <label class="col-sm-3 control-label">置换的数量:</label>
+        <div class="col-sm-2">
+            <input id="qty" name="qty" class="form-control"  type="text">
+        </div>
+    </div>
 
         <div class="form-group">
             <label class="col-sm-3 control-label">出库口:</label>
diff --git a/src/main/resources/templates/receipt/receiptHeader/receiptHeader.html b/src/main/resources/templates/receipt/receiptHeader/receiptHeader.html
index bf80259..40100c8 100644
--- a/src/main/resources/templates/receipt/receiptHeader/receiptHeader.html
+++ b/src/main/resources/templates/receipt/receiptHeader/receiptHeader.html
@@ -95,6 +95,9 @@
                                         物料名称:<input type="text" name="materialName"/>
                                     </li>
                                     <li>
+                                        物料编码:<input type="text" name="materialCode"/>
+                                    </li>
+                                    <li>
                                         MOM回传状态:<select id="pushSuccessStatus" name="pushSuccessStatus">
                                         <option value="">所有</option>
                                         <option value="0">未回传</option>
@@ -574,7 +577,7 @@
                         if (value == undefined || value == '')
                             value = " "
                         else
-                            actions.push('<pre style="max-height:50px; white-space: pre-wrap; width:500px">' + value + '</pre>')
+                            actions.push('<pre style="max-height:50px; white-space: pre-wrap; width:250px">' + value + '</pre>')
                         return actions.join(" ")
                     }
                 },
diff --git a/src/main/resources/templates/receipt/receiptHeaderHistory/receiptHeaderHistory.html b/src/main/resources/templates/receipt/receiptHeaderHistory/receiptHeaderHistory.html
index a35c1c0..3b023cb 100644
--- a/src/main/resources/templates/receipt/receiptHeaderHistory/receiptHeaderHistory.html
+++ b/src/main/resources/templates/receipt/receiptHeaderHistory/receiptHeaderHistory.html
@@ -479,7 +479,7 @@
                         if (value == undefined || value == '')
                             value = " "
                         else
-                            actions.push('<pre style="max-height:50px; white-space: pre-wrap; width:500px">' + value + '</pre>')
+                            actions.push('<pre style="max-height:50px; white-space: pre-wrap; width:250px">' + value + '</pre>')
                         return actions.join(" ")
                     }
                 },
diff --git a/src/main/resources/templates/shipment/shipmentHeader/shipmentHeader.html b/src/main/resources/templates/shipment/shipmentHeader/shipmentHeader.html
index e65357c..d45b065 100644
--- a/src/main/resources/templates/shipment/shipmentHeader/shipmentHeader.html
+++ b/src/main/resources/templates/shipment/shipmentHeader/shipmentHeader.html
@@ -122,6 +122,9 @@
                                         物料名称:<input type="text" name="materialName"/>
                                     </li>
                                     <li>
+                                        物料编码:<input type="text" name="materialCode"/>
+                                    </li>
+                                    <li>
                                         备注:<input type="text" name="shipmentNote"/>
                                     </li>
                                     <li>
@@ -573,14 +576,29 @@
                     field: 'workshop',
                     title: '生产车间',
                 },
-
                 {
                     field: 'noticeNo',
                     title: '通知单号',
+                    formatter: function (value, row, index) {
+                        var actions = [];
+                        if (value == undefined || value == '')
+                            value = " "
+                        else
+                            actions.push('<pre style="max-height:50px; white-space: pre-wrap; width:250px">' + value + '</pre>')
+                        return actions.join(" ")
+                    }
                 },
                 {
                     field: 'superiorName',
                     title: '母件名称',
+                    formatter: function (value, row, index) {
+                        var actions = [];
+                        if (value == undefined || value == '')
+                            value = " "
+                        else
+                            actions.push('<pre style="max-height:50px; white-space: pre-wrap; width:250px">' + value + '</pre>')
+                        return actions.join(" ")
+                    }
                 },
                 {
                     field: 'superiorCode',
@@ -590,7 +608,7 @@
                         if (value == undefined || value == '')
                             value = " "
                         else
-                            actions.push('<pre style="max-height:50px; white-space: pre-wrap; width:500px">' + value + '</pre>')
+                            actions.push('<pre style="max-height:50px; white-space: pre-wrap; width:250px">' + value + '</pre>')
                         return actions.join(" ")
                     }
                 },
@@ -602,7 +620,7 @@
                         if (value == undefined || value == '')
                             value = " "
                         else
-                            actions.push('<pre style="max-height:50px; white-space: pre-wrap; width:500px">' + value + '</pre>')
+                            actions.push('<pre style="max-height:50px; white-space: pre-wrap; width:250px">' + value + '</pre>')
                         return actions.join(" ")
                     }
                 },
@@ -658,7 +676,7 @@
                         if (value == undefined || value == '')
                             value = " "
                         else
-                            actions.push('<pre style="max-height:50px; white-space: pre-wrap; width:500px">' + value + '</pre>')
+                            actions.push('<pre style="max-height:50px; white-space: pre-wrap; width:250px">' + value + '</pre>')
                         return actions.join(" ")
                     }
                 },
diff --git a/src/main/resources/templates/shipment/shipmentHeaderHistory/shipmentHeaderHistory.html b/src/main/resources/templates/shipment/shipmentHeaderHistory/shipmentHeaderHistory.html
index a70d432..730b9df 100644
--- a/src/main/resources/templates/shipment/shipmentHeaderHistory/shipmentHeaderHistory.html
+++ b/src/main/resources/templates/shipment/shipmentHeaderHistory/shipmentHeaderHistory.html
@@ -507,14 +507,38 @@
                 {
                     field: 'noticeNo',
                     title: '通知单号',
-                },
-                {
-                    field: 'superiorCode',
-                    title: '母件编码',
+                    formatter: function (value, row, index) {
+                        var actions = [];
+                        if (value == undefined || value == '')
+                            value = " "
+                        else
+                            actions.push('<pre style="max-height:50px; white-space: pre-wrap; width:250px">' + value + '</pre>')
+                        return actions.join(" ")
+                    }
                 },
                 {
                     field: 'superiorName',
                     title: '母件名称',
+                    formatter: function (value, row, index) {
+                        var actions = [];
+                        if (value == undefined || value == '')
+                            value = " "
+                        else
+                            actions.push('<pre style="max-height:50px; white-space: pre-wrap; width:250px">' + value + '</pre>')
+                        return actions.join(" ")
+                    }
+                },
+                {
+                    field: 'superiorCode',
+                    title: '母件编码',
+                    formatter: function (value, row, index) {
+                        var actions = [];
+                        if (value == undefined || value == '')
+                            value = " "
+                        else
+                            actions.push('<pre style="max-height:50px; white-space: pre-wrap; width:250px">' + value + '</pre>')
+                        return actions.join(" ")
+                    }
                 },
 
                 {
@@ -581,22 +605,6 @@
                     visible: true
                 },
                 {
-                    field: 'superiorName',
-                    title: '母件名称',
-                },
-                {
-                    field: 'superiorCode',
-                    title: '母件编码',
-                    formatter: function (value, row, index) {
-                        var actions = [];
-                        if (value == undefined || value == '')
-                            value = " "
-                        else
-                            actions.push('<pre style="max-height:50px; white-space: pre-wrap; width:500px">' + value + '</pre>')
-                        return actions.join(" ")
-                    }
-                },
-                {
                     field: 'recordCode',
                     title: '合并前单号',
                     formatter: function (value, row, index) {
@@ -604,7 +612,7 @@
                         if (value == undefined || value == '')
                             value = " "
                         else
-                            actions.push('<pre style="max-height:50px; white-space: pre-wrap; width:500px">' + value + '</pre>')
+                            actions.push('<pre style="max-height:50px; white-space: pre-wrap; width:250px">' + value + '</pre>')
                         return actions.join(" ")
                     }
                 },
@@ -616,7 +624,7 @@
                         if (value == undefined || value == '')
                             value = " "
                         else
-                            actions.push('<pre style="max-height:50px; white-space: pre-wrap; width:500px">' + value + '</pre>')
+                            actions.push('<pre style="max-height:50px; white-space: pre-wrap; width:250px">' + value + '</pre>')
                         return actions.join(" ")
                     }
                 },
--
libgit2 0.22.2