| | |
| | | case "PUR_RECEIVEBIll": //已审核收料单查询 |
| | | jsonObject.put("start_biztime", latestUpdateTime);//业务起始日期 |
| | | jsonObject.put("end_biztime", sdf1.format(now));//业务结束日期 |
| | | jsonObject.put("billno", "CGSL-260106-000001"); |
| | | jsonObject.put("billno", null); |
| | | jsonObject.put("billstatus", Arrays.asList("C"));//数据状态 [A:暂存, B:已提交, C:已审核] |
| | | jsonObject.put("start_auditdate", latestUpdateTime); |
| | | jsonObject.put("end_auditdate", sdf1.format(now)); |
| | |
| | | if (mat.getUpdateTime().compareTo(modifyTime) != 0) { |
| | | // 更新字段 |
| | | if (!mat.getMaktx().equals(name)) mat.setMaktx(name); |
| | | if (!mat.getMemo().equals(memo)) mat.setMemo(memo); |
| | | if (mat.getMemo() == null || !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); |
| | |
| | | JSONObject jsonObjectNew2 = rows.getJSONObject(i); |
| | | Order order = orderService.selectByNo(billNo);//检索单据 |
| | | LocOwner locOwner = null; |
| | | if (ownerUuid != null) { |
| | | locOwner = locOwnerService.selectByUuid(ownerUuid); |
| | | if (locOwner == null) { |
| | | callApiLogSaveOwner(locOwner,kingDeeUtilType, "货主检索失败,请先添加对应货主编号:"+ownerUuid+"名称"+owner, false);continue; |
| | | } |
| | | } else{ |
| | | callApiLogSaveOwner(locOwner,kingDeeUtilType, "货主检索失败,未查询到货主编号!", false);continue; |
| | | } |
| | | // if (ownerUuid != null) { |
| | | // locOwner = locOwnerService.selectByUuid(ownerUuid); |
| | | // if (locOwner == null) { |
| | | // callApiLogSaveOwner(locOwner,kingDeeUtilType, "货主检索失败,请先添加对应货主编号:"+ownerUuid+"名称"+owner, false);continue; |
| | | // } |
| | | // } else{ |
| | | // callApiLogSaveOwner(locOwner,kingDeeUtilType, "货主检索失败,未查询到货主编号!", false);continue; |
| | | // } |
| | | if (Cools.isEmpty(order)) { |
| | | // 单据主档 |
| | | order = new Order( |
| | |
| | | String s1 = entry.getString("eap7_textfield7"); //客户PO |
| | | String detlId = entry.getString("id"); //明细id |
| | | Long seq = entry.getLong("seq"); //分录行号 |
| | | Double taxrate = entry.getDouble("taxrate"); |
| | | Double priceandtax = entry.getDouble("priceandtax"); |
| | | // String |
| | | if(anfme == 0){ |
| | | callApiLogSaveOrder(order,kingDeeUtilType, "单据数量异常"+matnr, false); |
| | |
| | | orderDetl.setUpdateBy(9527L); |
| | | orderDetl.setUpdateTime(new Date()); |
| | | orderDetl.setStatus(1); |
| | | orderDetl.setTaxrate(taxrate); |
| | | orderDetl.setPriceandtax(priceandtax); |
| | | orderDetl.setQty(0.0D); |
| | | orderDetlService.insert(orderDetl); |
| | | } |
| | |
| | | Double totalVolume = entry.getDouble("eap7_decimalfield2");//总体积 |
| | | String warehouse = entry.getString("warehouse_number");//仓库编码 |
| | | String pOrderNo = entry.getString("eap7_textfield3");//采购单号 |
| | | String s3 = entry.getString("eap7_textfield4");//客户sku(客户编号) |
| | | String s2 = entry.getString("eap7_textfield5"); //条码UPC |
| | | String memo = entry.getString("eap7_textfield6"); //备注(英文描述) |
| | | String s1 = entry.getString("eap7_textfield7"); //客户PO |
| | | String s3 = entry.getString("eap7_textfield5");//客户sku(客户编号) |
| | | String s2 = entry.getString("eap7_textfield6"); //条码UPC |
| | | String memo = entry.getString("eap7_textfield7"); //备注(英文描述) |
| | | String s1 = entry.getString("eap7_textfield4"); //客户PO |
| | | String detlId = entry.getString("id"); //明细id |
| | | Long seq = entry.getLong("seq"); //分录行号 |
| | | // String suppCode = entry.getString("supplier_number"); |
| | |
| | | } |
| | | for (int k = 0; k < billEntryArray.size(); k++) { |
| | | JSONObject entry = billEntryArray.getJSONObject(k); |
| | | String memo = null; |
| | | String matnr = entry.getString("material_number"); //物料编码,内部SKU |
| | | Double anfmeBox = 0.0;//箱数 |
| | | Double anfmeBox = entry.getDouble("eap7_integerfield");//箱数 |
| | | Double anfme = entry.getDouble("completqty");//个数 |
| | | Double totalNumItems = entry.getDouble("eap7_decimalfield1");//总件数 |
| | | Double totalVolume = entry.getDouble("eap7_decimalfield2");//总体积 |
| | | String warehouse = entry.getString("warehouse_number");//仓库编码 |
| | | if(kingDeeUtilType.formId.equals("OUI_RECEIVEBIll")){ |
| | | memo = entry.getString("eap7_textfield3"); //备注(英文描述) |
| | | }else{ |
| | | memo = entry.getString("eap7_textfield5"); |
| | | } |
| | | String pOrderNo = entry.getString("eap7_textfield");//采购单号 |
| | | String s3 = entry.getString("eap7_textfield4");//客户sku(客户编号) |
| | | String s3 = entry.getString("eap7_textfield2");//客户sku(客户编号) |
| | | String s2 = entry.getString("eap7_textfield1"); //条码UPC |
| | | String memo = entry.getString("eap7_textfield6"); //备注(英文描述) |
| | | String s1 = entry.getString("eap7_textfield7"); //客户PO |
| | | String s1 = entry.getString("eap7_textfield4"); //客户PO |
| | | String detlId = entry.getString("id"); //明细id |
| | | Long seq = entry.getLong("seq"); //分录行号 |
| | | Double taxrate = entry.getDouble("taxrate"); |
| | | Double priceandtax = entry.getDouble("priceandtax"); |
| | | String manubill = entry.getString("manufacturenun"); |
| | | String manubillid = entry.getString("orderfid_id"); |
| | | String manuentryid = null; |
| | |
| | | orderDetl.setUpdateBy(9527L); |
| | | orderDetl.setUpdateTime(new Date()); |
| | | orderDetl.setStatus(1); |
| | | orderDetl.setTaxrate(taxrate); |
| | | orderDetl.setPriceandtax(priceandtax); |
| | | orderDetl.setQty(0.0D); |
| | | |
| | | orderDetlService.insert(orderDetl); |