自动化立体仓库 - WMS系统
#
1
5 天以前 780461e27d87b769b6f9649a9a7fa532d880a2e9
src/main/java/com/zy/asrs/task/kingdee/handler/InboundOrderHandler.java
@@ -166,10 +166,11 @@
                    path = imPurreceiveBillAddress;
                    break;
                case "OUI_RECEIVEBIll"://委外入库单
                    jsonObject.put("billstatus", Arrays.asList("A"));//数据状态 [A:暂存, B:已提交, C:已审核]
                    jsonObject.put("billstatus", Arrays.asList("C"));//数据状态 [A:暂存, B:已提交, C:已审核]
                    jsonObject.put("auditdate_start", latestUpdateTime);
                    jsonObject.put("auditdate_end", sdf1.format(now));
                    path = omOutsourcereceiptQuery;
                    break;
                case "SAL_OUTSTOCK"://销售出库单查询
                    path = imSaloutbill;
                    jsonObject.put("modify_starttime",  latestUpdateTime);//业务起始日期
@@ -297,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");
@@ -334,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);
@@ -723,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");//总体积
@@ -736,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;
@@ -753,7 +757,7 @@
                                            "档案箱数量异常:" + matnr, false);
                                    continue;
                                }
                                Double erpAnfme = anfme*mat.getSafeQty();
                                Double anfmeBox = qty/mat.getSafeQty();
                                // ========= 明细去重 =========
                                List<OrderDetl> orderDetls =
                                        orderDetlService.selectByOrderId(order.getId());
@@ -772,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);
@@ -1639,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);
@@ -1771,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");
@@ -1793,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);
@@ -1808,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);