| | |
| | | docType = docTypeService.selectOrAdd(kingDeeUtilType.desc, kingDeeUtilType.pakIn.equals(1)); |
| | | } |
| | | String FDocumentStatus=null; |
| | | if (Arrays.asList("INR").contains(kingDeeUtilType.formId)) { |
| | | continue; |
| | | } |
| | | //条件和需要获得的结果拼接 |
| | | JSONObject jsonObject = new JSONObject(); |
| | | String path = null; |
| | |
| | | // 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", "CGSL-251125-000001"); |
| | | jsonObject.put("billno", null); |
| | | jsonObject.put("billstatus", Arrays.asList("C"));//数据状态 [A:暂存, B:已提交, C:已审核] |
| | | jsonObject.put("start_auditdate", "2025-11-25 00:00:00"); |
| | | jsonObject.put("end_auditdate", sdf1.format(now)); |
| | |
| | | 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; |
| | | // 生成商品档案 |
| | | Double height1 = height*10; |
| | | Double width1 = width*10; |
| | | Double length1 = length*10; |
| | | Mat mat = matService.selectByMatnr(matnr); |
| | | if (mat == null) { |
| | | mat = new Mat(); |
| | |
| | | mat.setTagId(tag.getId()); |
| | | mat.setWeight(grossweight);//净重 |
| | | mat.setUnits(netweight);//毛重 |
| | | mat.setManLength(length*10); |
| | | mat.setHeight(height*10); |
| | | mat.setWidth(width*10); |
| | | mat.setManLength(length1); |
| | | mat.setHeight(height1); |
| | | mat.setWidth(width1); |
| | | mat.setCreateTime(sdf1.parse(createTime)); |
| | | mat.setUpdateTime(modifyTime); |
| | | mat.setStatus(1); |
| | |
| | | String billNo = jsonObjectNew.get("billno").toString();//单据编号 |
| | | String owner = jsonObjectNew.get("org_name").toString();//货主名称 |
| | | String ownerUuid = jsonObjectNew.get("org_number").toString();//erp货主编号 |
| | | String orderId = jsonObjectNew.get("id").toString(); |
| | | JSONObject detailParam = new JSONObject(); |
| | | JSONObject dataObj = new JSONObject(); |
| | | dataObj.put("billno", billNo); |
| | |
| | | createTime.toString(), // 单据日期 |
| | | docType.getDocId(), // 单据类型 |
| | | null, // 项目编号 |
| | | null, //项目名称 客户PO号 暂时不知道字段是哪个 |
| | | orderId, //收料单id |
| | | null, // 调拨项目编号 |
| | | null, // 初始票据号 |
| | | null, // 票据号 |
| | |
| | | String s2 = entry.getString("eap7_textfield5"); //条码UPC |
| | | String memo = entry.getString("eap7_textfield6"); //备注(英文描述) |
| | | String s1 = entry.getString("eap7_textfield7"); //客户PO |
| | | String detlId = entry.getString("id"); //明细id |
| | | Long seq = entry.getLong("seq"); //分录行号 |
| | | // String |
| | | if(anfme == 0){ |
| | | callApiLogSaveOrder(order,kingDeeUtilType, "单据数量异常"+matnr, false); |
| | | continue; |
| | |
| | | if(locSupp != null){supp = locSupp.getOwner();} |
| | | OrderDetl orderDetl = new OrderDetl(); |
| | | orderDetl.sync(mat); |
| | | orderDetl.setThreeCode(detlId);//ERP明细id |
| | | orderDetl.setLineNumber(seq);//分录行号 |
| | | orderDetl.setAnfme(anfme);//总箱数 |
| | | orderDetl.setErpAnfme(anfme);//erp数据 |
| | | orderDetl.setOrderId(order.getId()); |
| | | orderDetl.setOrderNo(order.getOrderNo());//表头单据 |
| | | orderDetl.setSupp(supp);//供应商名称(货源) |