宇同海外 国内订单取数

This commit is contained in:
yuqh 2025-08-25 11:35:37 +08:00
parent b4397ec7e3
commit 40c6ed3ae1
1 changed files with 58 additions and 0 deletions

View File

@ -154,6 +154,7 @@ public class GnSaleServiceImpl extends BaseService<BaseEntity, String> implement
mainObject.put("mdmCode", "10005"); mainObject.put("mdmCode", "10005");
mainObject.put("optionName", "数智中台"); mainObject.put("optionName", "数智中台");
JSONObject gn_zdfy = new JSONObject(); JSONObject gn_zdfy = new JSONObject();
gn_zdfy.put("data_id", data.getString("summaryNo"));//
gn_zdfy.put("plat_name", data.getString("platName"));//平台名称示例淘宝 gn_zdfy.put("plat_name", data.getString("platName"));//平台名称示例淘宝
gn_zdfy.put("shop_no", data.getString("shopNo"));//店铺编码示例Db001 gn_zdfy.put("shop_no", data.getString("shopNo"));//店铺编码示例Db001
gn_zdfy.put("shop_name", data.getString("shopName"));//店铺名称示例第一个店铺 gn_zdfy.put("shop_name", data.getString("shopName"));//店铺名称示例第一个店铺
@ -180,4 +181,61 @@ public class GnSaleServiceImpl extends BaseService<BaseEntity, String> implement
} }
return data; 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;
}
} }