From 45ee9e1e3d0ca010be3aeb620d3d7c40031ba736 Mon Sep 17 00:00:00 2001
From: lty <876263681@qq.com>
Date: 星期三, 26 十一月 2025 09:16:06 +0800
Subject: [PATCH] #

---
 src/main/java/com/zy/asrs/task/kingdee/handler/InboundOrderHandler.java |   29 ++++++++++++++++++-----------
 1 files changed, 18 insertions(+), 11 deletions(-)

diff --git a/src/main/java/com/zy/asrs/task/kingdee/handler/InboundOrderHandler.java b/src/main/java/com/zy/asrs/task/kingdee/handler/InboundOrderHandler.java
index c424ecf..c150520 100644
--- a/src/main/java/com/zy/asrs/task/kingdee/handler/InboundOrderHandler.java
+++ b/src/main/java/com/zy/asrs/task/kingdee/handler/InboundOrderHandler.java
@@ -132,8 +132,8 @@
                     jsonObject.put("start_biztime",  "2025-01-01 00:00:00");//涓氬姟璧峰鏃ユ湡
 
                     jsonObject.put("end_biztime", sdf1.format(now));//涓氬姟缁撴潫鏃ユ湡
-                    jsonObject.put("billno", Arrays.asList("CGSL-251023-000027","CGSL-250811-000028"));
-                    jsonObject.put("billstatus", Arrays.asList("C"));//鏁版嵁鐘舵�� [A:鏆傚瓨, B:宸叉彁浜�, C:宸插鏍竇
+                    jsonObject.put("billno", Arrays.asList("CGSL-251125-000003"));
+                    jsonObject.put("billstatus", Arrays.asList("A","B","C"));//鏁版嵁鐘舵�� [A:鏆傚瓨, B:宸叉彁浜�, C:宸插鏍竇
                     jsonObject.put("start_auditdate", null);//id
                     jsonObject.put("end_auditdate", null);
                     jsonObject.put("org_number", null);
@@ -198,11 +198,17 @@
                             String matnr = jsonObjectNew.get("number").toString();
                             String name = jsonObjectNew.get("name").toString();
                             String createTime = jsonObjectNew.get("createtime").toString();
-                            Double grossweight = jsonObjectNew.get("grossweight") != null ? new BigDecimal(jsonObjectNew.get("grossweight").toString()).doubleValue() : 0.0;
-                            Double height = jsonObjectNew.get("height") != null ? new BigDecimal(jsonObjectNew.get("height").toString()).doubleValue() : 0.0;
-                            Double width = jsonObjectNew.get("width") != null ? new BigDecimal(jsonObjectNew.get("width").toString()).doubleValue() : 0.0;
-                            Double length = jsonObjectNew.get("length") != null ? new BigDecimal(jsonObjectNew.get("length").toString()).doubleValue() : 0.0;
-                            Double netweight = jsonObjectNew.get("netweight") != null ? new BigDecimal(jsonObjectNew.get("grossweight").toString()).doubleValue() : 0.0;
+                            Double grossweight = jsonObjectNew.get("grossweight") != null ? new BigDecimal(jsonObjectNew.get("eap7_decimalfield6").toString()).doubleValue() : 0.0;
+                            Double height = jsonObjectNew.get("height") != null ? new BigDecimal(jsonObjectNew.get("eap7_decimalfield9").toString()).doubleValue() : 0.0;
+                            Double width = jsonObjectNew.get("width") != null ? new BigDecimal(jsonObjectNew.get("eap7_decimalfield8").toString()).doubleValue() : 0.0;
+                            Double length = jsonObjectNew.get("length") != null ? new BigDecimal(jsonObjectNew.get("eap7_decimalfield7").toString()).doubleValue() : 0.0;
+                            Double netweight = jsonObjectNew.get("netweight") != null ? new BigDecimal(jsonObjectNew.get("eap7_decimalfield").toString()).doubleValue() : 0.0;
+                            // ---- 鎺掑簭閫昏緫 ----
+                            List<Double> dims = Arrays.asList(height, width, length);
+                            dims.sort(Double::compareTo); // 鍗囧簭鎺掑垪锛氭渶灏忋�佷腑闂淬�佹渶澶�
+                            Double min = dims.get(0);
+                            Double mid = dims.get(1);
+                            Double max = dims.get(2);
                             // 鐢熸垚鍟嗗搧妗f
                             Mat mat = matService.selectByMatnr(matnr);
                             if (mat == null) {
@@ -212,9 +218,9 @@
                                 mat.setTagId(tag.getId());
                                 mat.setWeight(grossweight);//鍑�閲�
                                 mat.setUnits(netweight);//姣涢噸
-                                mat.setManLength(length);
-                                mat.setHeight(height);
-                                mat.setWidth(width);
+                                mat.setManLength(max);
+                                mat.setHeight(min);
+                                mat.setWidth(mid);
                                 mat.setCreateTime(sdf1.parse(createTime));
                                 mat.setUpdateTime(modifyTime);
                                 mat.setStatus(1);
@@ -417,7 +423,8 @@
                                                 now,    // 娣诲姞鏃堕棿
                                                 9527L,    // 淇敼浜哄憳
                                                 now,    // 淇敼鏃堕棿
-                                                null    // 澶囨敞
+                                                null,    // 澶囨敞
+                                                kingDeeUtilType.pakIn !=1?2:1
                                         );
                                         if( orderService.insert(order)){
                                             callApiLogSaveOrder(order, kingDeeUtilType, "鍒涘缓鍏ュ簱鍗曟垚鍔燂紒鍗曞彿锛�" + billNo, true);

--
Gitblit v1.9.1