自动化立体仓库 - WMS系统
#
1
4 天以前 780461e27d87b769b6f9649a9a7fa532d880a2e9
src/main/java/com/zy/asrs/task/kingdee/handler/InboundOrderHandler.java
@@ -298,6 +298,7 @@
                            String matnr = jsonObjectNew.get("number").toString();
                            String name = jsonObjectNew.get("name").toString();
                            String createTime = jsonObjectNew.get("createtime").toString();
                            String memo = jsonObjectNew.get("eap7_textfield1").toString();
                            Double height = getDecimalFieldAsDouble(jsonObjectNew, "eap7_decimalfield9");
                            Double width = getDecimalFieldAsDouble(jsonObjectNew, "eap7_decimalfield8");
                            Double length = getDecimalFieldAsDouble(jsonObjectNew, "eap7_decimalfield7");
@@ -335,6 +336,7 @@
                                if (mat.getUpdateTime().compareTo(modifyTime) != 0) {
                                    // 更新字段
                                    if (!mat.getMaktx().equals(name)) mat.setMaktx(name);
                                    if (!mat.getMemo().equals(memo)) mat.setMemo(memo);
                                    if (mat.getWeight().compareTo(grossweight) != 0) mat.setWeight(grossweight);
                                    if (mat.getUnits().compareTo(netweight) != 0) mat.setUnits(netweight);
                                    if (mat.getSafeQty().compareTo(unit) != 0) mat.setSafeQty(unit);
@@ -724,6 +726,7 @@
                            for (int k = 0; k < billEntryArray.size(); k++) {
                                JSONObject entry = billEntryArray.getJSONObject(k);
                                String matnr = entry.getString("material_number"); //物料编码,内部SKU
                                Double qty = entry.getDouble("qty");
                                Double anfme = entry.getDouble("eap7_decimalfield");//箱数
                                Double totalNumItems = entry.getDouble("eap7_decimalfield1");//总件数
                                Double totalVolume = entry.getDouble("eap7_decimalfield2");//总体积
@@ -737,7 +740,7 @@
                                Long seq = entry.getLong("seq"); //分录行号
//                                String suppCode = entry.getString("supplier_number");
                                String suppCode = null;
                                if (anfme == null || anfme == 0) {
                                if (qty == null || qty == 0) {
                                    callApiLogSaveOrder(order, kingDeeUtilType,
                                            "单据数量异常:" + matnr, false);
                                    continue;
@@ -754,7 +757,7 @@
                                            "档案箱数量异常:" + matnr, false);
                                    continue;
                                }
                                Double erpAnfme = anfme*mat.getSafeQty();
                                Double anfmeBox = qty/mat.getSafeQty();
                                // ========= 明细去重 =========
                                List<OrderDetl> orderDetls =
                                        orderDetlService.selectByOrderId(order.getId());
@@ -773,8 +776,8 @@
                                orderDetl.sync(mat);
                                orderDetl.setThreeCode(detlId);
                                orderDetl.setLineNumber(seq);
                                orderDetl.setAnfme(anfme);
                                orderDetl.setErpAnfme(erpAnfme);
                                orderDetl.setAnfme(anfmeBox != anfme?anfme : anfmeBox);
                                orderDetl.setErpAnfme(qty);
                                orderDetl.setOrderId(order.getId());
                                orderDetl.setOrderNo(order.getOrderNo());
                                orderDetl.setSupp(supp);
@@ -1640,9 +1643,9 @@
                                orderDetl.setSupp(supp);
                                orderDetl.setSuppCode(suppCode);
                                orderDetl.setSku(matnr);
                                orderDetl.setStandby1(s1);
                                orderDetl.setStandby2(s2);
                                orderDetl.setStandby3(s3);
                                orderDetl.setStandby1(s1 != null? s1:"1");
                                orderDetl.setStandby2(s2 != null? s2:"1");
                                orderDetl.setStandby3(s3 != null? s3:"1");
                                orderDetl.setBoxType1(owner);
                                orderDetl.setBoxType2(ownerUuid);
                                orderDetl.setBoxType3(pOrderNo);
@@ -1772,6 +1775,7 @@
                            String matnr = jsonObjectNew.get("number").toString();
                            String name = jsonObjectNew.get("name").toString();
                            String createTime = jsonObjectNew.get("createtime").toString();
                            String memo = jsonObjectNew.get("eap7_textfield1").toString();
                            Double height = getDecimalFieldAsDouble(jsonObjectNew, "eap7_decimalfield9");
                            Double width = getDecimalFieldAsDouble(jsonObjectNew, "eap7_decimalfield8");
                            Double length = getDecimalFieldAsDouble(jsonObjectNew, "eap7_decimalfield7");
@@ -1794,6 +1798,7 @@
                                mat.setManLength(length1);
                                mat.setHeight(height1);
                                mat.setWidth(width1);
                                mat.setMemo(memo);
                                mat.setCreateTime(sdf1.parse(createTime));
                                mat.setUpdateTime(modifyTime);
                                mat.setStatus(1);
@@ -1809,6 +1814,7 @@
                                if (mat.getUpdateTime().compareTo(modifyTime) != 0) {
                                    // 更新字段
                                    if (!mat.getMaktx().equals(name)) mat.setMaktx(name);
                                    if (!mat.getMemo().equals(memo)) mat.setMemo(memo);
                                    if (mat.getWeight().compareTo(grossweight) != 0) mat.setWeight(grossweight);
                                    if (mat.getUnits().compareTo(netweight) != 0) mat.setUnits(netweight);
                                    if (mat.getSafeQty().compareTo(unit) != 0) mat.setSafeQty(unit);