|
@@ -2,7 +2,6 @@ package com.sd.wln.util;
|
|
|
|
|
|
import cn.hutool.core.io.IoUtil;
|
|
|
import cn.hutool.json.JSONUtil;
|
|
|
-import com.alibaba.fastjson2.JSON;
|
|
|
import com.alibaba.fastjson2.JSONObject;
|
|
|
import com.ruoyi.common.exception.ServiceException;
|
|
|
import com.ruoyi.common.utils.MapUtil;
|
|
@@ -21,7 +20,6 @@ import org.apache.http.util.EntityUtils;
|
|
|
|
|
|
import java.io.IOException;
|
|
|
import java.util.List;
|
|
|
-import java.util.stream.Collectors;
|
|
|
|
|
|
public class WlnUtil {
|
|
|
|
|
@@ -138,7 +136,7 @@ public class WlnUtil {
|
|
|
return json.getJSONArray("data").toJavaList(JSONObject.class);
|
|
|
}
|
|
|
|
|
|
- public static void main(String[] args) throws Exception {
|
|
|
+// public static void main(String[] args) throws Exception {
|
|
|
// List<JSONObject> skuList = getSkuList(1, 200);
|
|
|
// System.out.println();
|
|
|
//
|
|
@@ -150,20 +148,17 @@ public class WlnUtil {
|
|
|
// List<JSONObject> orderList = getOrderList(1, 50, startTime, endTime, "B012");
|
|
|
// System.out.println();
|
|
|
|
|
|
- String a = "[\"XD231026000939\",\"XD231026000908\",\"XD231026001177\",\"XD231026001036\",\"XD231026001184\",\"XD231026001229\",\"XD231026001432\",\"XD231026001431\",\"XD231026001310\",\"XD231026001572\",\"XD231026001441\",\"XD231026001205\",\"XD231026001215\",\"XD231026001602\",\"XD231026001419\",\"XD231026001632\",\"XD231026001662\",\"XD231026001459\",\"XD231026001414\",\"XD231026001235\",\"XD231026001268\",\"XD231026001298\",\"XD231026001481\",\"XD231026001265\",\"XD231026001376\",\"XD231026001683\",\"XD231026001559\",\"XD231026001589\",\"XD231026001325\",\"XD231026001511\",\"XD231026001497\",\"XD231026001507\",\"XD231026001506\",\"XD231026001365\",\"XD231026001742\",\"XD231026001574\",\"XD231026001551\",\"XD231026001620\",\"XD231026001614\",\"XD231026001762\",\"XD231026001455\",\"XD231026001680\",\"XD231026001684\",\"XD231026001641\",\"XD231026001704\",\"XD231026001724\",\"XD231026001667\",\"XD231026001606\",\"XD231026001852\",\"XD231026001872\",\"XD231026001710\",\"XD231026001677\",\"XD231026001681\",\"XD231026001892\",\"XD231026001749\",\"XD231026001701\",\"XD231026001721\",\"XD231026001750\",\"XD231026001666\",\"XD231026002062\"]";
|
|
|
- List<String> strings = JSON.parseArray(a, String.class);
|
|
|
-
|
|
|
- List<String> collect1 = strings.stream().distinct().collect(Collectors.toList());
|
|
|
- String collect = strings.stream().collect(Collectors.joining(","));
|
|
|
-
|
|
|
- JSONObject orderList = getOrderByWlnCode(collect);
|
|
|
- System.out.println(orderList.toString());
|
|
|
+// String a = "[\"XD231026000939\",\"XD231026000908\",\"XD231026001177\",\"XD231026001036\",\"XD231026001184\",\"XD231026001229\",\"XD231026001432\",\"XD231026001431\",\"XD231026001310\",\"XD231026001572\",\"XD231026001441\",\"XD231026001205\",\"XD231026001215\",\"XD231026001602\",\"XD231026001419\",\"XD231026001632\",\"XD231026001662\",\"XD231026001459\",\"XD231026001414\",\"XD231026001235\",\"XD231026001268\",\"XD231026001298\",\"XD231026001481\",\"XD231026001265\",\"XD231026001376\",\"XD231026001683\",\"XD231026001559\",\"XD231026001589\",\"XD231026001325\",\"XD231026001511\",\"XD231026001497\",\"XD231026001507\",\"XD231026001506\",\"XD231026001365\",\"XD231026001742\",\"XD231026001574\",\"XD231026001551\",\"XD231026001620\",\"XD231026001614\",\"XD231026001762\",\"XD231026001455\",\"XD231026001680\",\"XD231026001684\",\"XD231026001641\",\"XD231026001704\",\"XD231026001724\",\"XD231026001667\",\"XD231026001606\",\"XD231026001852\",\"XD231026001872\",\"XD231026001710\",\"XD231026001677\",\"XD231026001681\",\"XD231026001892\",\"XD231026001749\",\"XD231026001701\",\"XD231026001721\",\"XD231026001750\",\"XD231026001666\",\"XD231026002062\"]";
|
|
|
+// List<String> strings = JSON.parseArray(a, String.class);
|
|
|
+// String collect = String.join(",", strings);
|
|
|
+// List<JSONObject> orderList = getOrderListByWlnCodeList(collect);
|
|
|
+// System.out.println(orderList.toString());
|
|
|
|
|
|
// long endTime = System.currentTimeMillis();
|
|
|
// long startTime = endTime - 1000 * 60 * 60 * 24 * 7;
|
|
|
// List<JSONObject> outboundOrder = getOutboundOrder(0, 200, 1690367461000L, 1690367461000L);
|
|
|
// System.out.println();
|
|
|
- }
|
|
|
+// }
|
|
|
|
|
|
/**
|
|
|
* post请求
|
|
@@ -199,8 +194,6 @@ public class WlnUtil {
|
|
|
param.setBill_code(wlnCodeListStr);
|
|
|
param.setPage(1);
|
|
|
param.setLimit(200);
|
|
|
- param.setIs_split(true);
|
|
|
- param.setManualImport(false);
|
|
|
param.generateSign(MapUtil.createLinkString(MapUtil.beanToMap(param)));
|
|
|
String result = send(PREFIX + "erp/opentrade/list/trades", MapUtil.beanToMap(param));
|
|
|
JSONObject json = JSONObject.parseObject(result);
|