宇同海外 国内订单取数
This commit is contained in:
parent
b4397ec7e3
commit
40c6ed3ae1
|
@ -154,6 +154,7 @@ public class GnSaleServiceImpl extends BaseService<BaseEntity, String> implement
|
|||
mainObject.put("mdmCode", "10005");
|
||||
mainObject.put("optionName", "数智中台");
|
||||
JSONObject gn_zdfy = new JSONObject();
|
||||
gn_zdfy.put("data_id", data.getString("summaryNo"));//
|
||||
gn_zdfy.put("plat_name", data.getString("platName"));//平台名称(示例:淘宝)
|
||||
gn_zdfy.put("shop_no", data.getString("shopNo"));//店铺编码(示例:Db001)
|
||||
gn_zdfy.put("shop_name", data.getString("shopName"));//店铺名称(示例:第一个店铺)
|
||||
|
@ -180,4 +181,61 @@ public class GnSaleServiceImpl extends BaseService<BaseEntity, String> implement
|
|||
}
|
||||
return data;
|
||||
}
|
||||
|
||||
|
||||
|
||||
private JSONObject bdGnReceipt(Object item) {
|
||||
JSONObject data = (JSONObject) item;
|
||||
//组装表头参数
|
||||
JSONArray orders = data.getJSONArray("orders");
|
||||
JSONObject jsonObjectUser = new JSONObject();
|
||||
JSONObject jsonStr = new JSONObject();
|
||||
jsonObjectUser.put("data_id", data.get("data_id"));
|
||||
jsonObjectUser.put("mdmCode", "10001");
|
||||
jsonStr.put("jsonStr", jsonObjectUser);
|
||||
//先查询编码和名称查询是否存在
|
||||
Object attribute = comparisonServiceimpl.queryEntityPage(jsonStr);
|
||||
JSONObject jsonObjectAttribute = (JSONObject) JSON.toJSON(attribute);
|
||||
JSONArray jsonArrayList = jsonObjectAttribute.getJSONObject("pageInfo").getJSONArray("list");
|
||||
if (jsonArrayList == null || jsonArrayList.size() == 0) {
|
||||
JSONObject mainObject = new JSONObject();
|
||||
mainObject.put("appName","数智中台");
|
||||
mainObject.put("appCode","800004");
|
||||
mainObject.put("mdmCode", "10005");
|
||||
mainObject.put("optionName", "数智中台");
|
||||
JSONObject gn_receipt = new JSONObject();
|
||||
gn_receipt.put("detail_id", data.getString("detailId"));//明细唯一id
|
||||
gn_receipt.put("shop_no", data.getString("shopNo"));//店铺编码
|
||||
gn_receipt.put("shop_name", data.getString("shopName"));//店铺名称
|
||||
gn_receipt.put("spec_no", data.getString("specNo"));//商品编码
|
||||
gn_receipt.put("warehouse_no", data.getString("warehouseNo"));//仓库编码
|
||||
gn_receipt.put("warehouse_name", data.getString("warehouseName"));//仓库名称
|
||||
gn_receipt.put("business_time", data.getString("businessTime"));//业务日期,退款完成时间
|
||||
gn_receipt.put("delivery_time", data.getString("deliveryTime"));//发货时间
|
||||
gn_receipt.put("summary_no", data.getString("summaryNo"));//汇总单号
|
||||
gn_receipt.put("plat_order_no", data.getString("platOrderNo"));//平台订单号
|
||||
gn_receipt.put("plat_sub_no", data.getString("platSubNo"));//平台子订单号
|
||||
gn_receipt.put("original_order_no", data.getString("originalOrderNo"));//平台订单号[未处理](对于手工订单/退单,慧经营会默认截取单号后缀,如7198371239874-1,截取之后的订单号为7198371239874,此列展示7198371239874-1)
|
||||
gn_receipt.put("sys_order_no", data.getString("sysOrderNo"));//系统订单号,拉取平台退单即为平台退单号,拉取系统退单则为系统退单号
|
||||
gn_receipt.put("refund_type", data.getString("refundType"));//退款类型(退款不退货、退货退款)
|
||||
gn_receipt.put("defect_type", data.getString("defectType"));//是否残次品(是/否)
|
||||
gn_receipt.put("salesman_name", data.getString("salesmanName"));//业务员名称
|
||||
gn_receipt.put("fenxiao_nick", data.getString("fenxiaoNick"));//分销商昵称
|
||||
gn_receipt.put("goods_no", data.getString("goodsNo"));//货品编码
|
||||
gn_receipt.put("goods_name", data.getString("goodsName"));//货品名称
|
||||
gn_receipt.put("goods_batch_no", data.getString("goodsBatchNo"));//货品批次号
|
||||
gn_receipt.put("gift_type", data.getString("giftType"));//赠品(是/否)
|
||||
gn_receipt.put("erp_order_type", data.getString("erpOrderType"));//订单类型(网店销售、线下零售、售后换货、批发业务、保修换新、保修完成、订单补发、供销补发、自定义类型1-6、自定义属性7-8等)
|
||||
gn_receipt.put("refundable_amount", data.getString("refundableAmount"));//应退款金额,退款订单退款金额
|
||||
gn_receipt.put("return_qty", data.getString("returnQty"));//退货入库数量,实际退货入库数量
|
||||
gn_receipt.put("cost_price", data.getString("costPrice"));//总成本
|
||||
gn_receipt.put("refund_qty", data.getString("refundQty"));//退款数量,申请退款数量
|
||||
|
||||
mainObject.put("gn_receipt",gn_receipt);
|
||||
jsonStr.put("jsonStr",mainObject);
|
||||
Object result = comparisonServiceimpl.saveEntity(jsonStr);
|
||||
logger.info("新增结果为:{}", JSON.toJSONString(result));
|
||||
}
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue