| | |
| | | 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"); |
| | |
| | | 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); |
| | |
| | | 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");//总体积 |
| | |
| | | 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; |
| | |
| | | "档案箱数量异常:" + matnr, false); |
| | | continue; |
| | | } |
| | | Double erpAnfme = anfme*mat.getSafeQty(); |
| | | Double anfmeBox = qty/mat.getSafeQty(); |
| | | // ========= 明细去重 ========= |
| | | List<OrderDetl> orderDetls = |
| | | orderDetlService.selectByOrderId(order.getId()); |
| | |
| | | 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); |
| | |
| | | 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); |
| | |
| | | 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"); |
| | |
| | | mat.setManLength(length1); |
| | | mat.setHeight(height1); |
| | | mat.setWidth(width1); |
| | | mat.setMemo(memo); |
| | | mat.setCreateTime(sdf1.parse(createTime)); |
| | | mat.setUpdateTime(modifyTime); |
| | | mat.setStatus(1); |
| | |
| | | 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); |