| | |
| | | // 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", null); |
| | | jsonObject.put("billno", "CGSL-251125-000001"); |
| | | 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 width = jsonObjectNew.get("width") != null ? new BigDecimal(jsonObjectNew.get("eap7_decimalfield8").toString()).doubleValue() : 0.0; |
| | | 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; |
| | | // ---- 排序逻辑 ---- |
| | | List<Double> dims = Arrays.asList(height, width, length); |
| | | dims.sort(Double::compareTo); // 升序排列:最小、中间、最大 |
| | | Double min = dims.get(0)*10; |
| | | Double mid = dims.get(1)*10; |
| | | Double max = dims.get(2)*10; |
| | | // 生成商品档案 |
| | | Mat mat = matService.selectByMatnr(matnr); |
| | | if (mat == null) { |
| | |
| | | mat.setTagId(tag.getId()); |
| | | mat.setWeight(grossweight);//净重 |
| | | mat.setUnits(netweight);//毛重 |
| | | mat.setManLength(max); |
| | | mat.setHeight(min); |
| | | mat.setWidth(mid); |
| | | mat.setManLength(length*10); |
| | | mat.setHeight(height*10); |
| | | mat.setWidth(width*10); |
| | | mat.setCreateTime(sdf1.parse(createTime)); |
| | | mat.setUpdateTime(modifyTime); |
| | | mat.setStatus(1); |
| | |
| | | callApiLogSaveOrder(order, kingDeeUtilType, "创建入库单成功!单号:" + billNo, true); |
| | | } |
| | | } |
| | | String suppCode = jsonObjectNew2.getString("supplier_number"); //供应商 |
| | | |
| | | JSONArray billEntryArray = jsonObjectNew2.getJSONArray("billentry"); |
| | | for (int k = 0; k < billEntryArray.size(); k++) { |
| | | JSONObject entry = billEntryArray.getJSONObject(k); |
| | |
| | | String s2 = entry.getString("eap7_textfield5"); //条码UPC |
| | | String memo = entry.getString("eap7_textfield6"); //备注(英文描述) |
| | | String s1 = entry.getString("eap7_textfield7"); //客户PO |
| | | String suppCode = entry.getString("supplier_number"); //供应商 |
| | | if(anfme == 0){ |
| | | callApiLogSaveOrder(order,kingDeeUtilType, "单据数量异常"+matnr, false); |
| | | continue; |