自动化立体仓库 - WMS系统
lty
8 小时以前 4bb523147bc6e9fef20142d1389c893f97321e02
src/main/java/com/zy/asrs/task/kingdee/handler/InboundOrderHandler.java
@@ -130,10 +130,9 @@
                case "PUR_RECEIVEBIll": //已审核收料单查询
//                    jsonObject.put("start_biztime", latestUpdateTime);//业务起始日期
                    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 +197,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 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);
                            // 生成商品档案
                            Mat mat = matService.selectByMatnr(matnr);
                            if (mat == null) {
@@ -210,10 +215,11 @@
                                mat.setMatnr(matnr);
                                mat.setMaktx(name);
                                mat.setTagId(tag.getId());
                                mat.setWeight(grossweight);
                                mat.setManLength(length);
                                mat.setHeight(height);
                                mat.setWidth(width);
                                mat.setWeight(grossweight);//净重
                                mat.setUnits(netweight);//毛重
                                mat.setManLength(max);
                                mat.setHeight(min);
                                mat.setWidth(mid);
                                mat.setCreateTime(sdf1.parse(createTime));
                                mat.setUpdateTime(modifyTime);
                                mat.setStatus(1);
@@ -416,7 +422,8 @@
                                                now,    // 添加时间
                                                9527L,    // 修改人员
                                                now,    // 修改时间
                                                null    // 备注
                                                null,    // 备注
                                                kingDeeUtilType.pakIn !=1?2:1
                                        );
                                        if( orderService.insert(order)){
                                            callApiLogSaveOrder(order, kingDeeUtilType, "创建入库单成功!单号:" + billNo, true);