|
@@ -116,6 +116,24 @@ public class WlnUtil {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
+ * 获取订单
|
|
|
+ */
|
|
|
+ public static List<JSONObject> getOrderListByWlnCodeList(String wlnCodeListStr) throws Exception {
|
|
|
+ TradesParam param = new TradesParam();
|
|
|
+ param.setBill_code(wlnCodeListStr);
|
|
|
+ param.setPage(1);
|
|
|
+ param.setLimit(200);
|
|
|
+ param.generateSign(MapUtil.createLinkString(MapUtil.beanToMap(param)));
|
|
|
+ String result = send(PREFIX + "erp/opentrade/list/trades", MapUtil.beanToMap(param));
|
|
|
+ JSONObject json = JSONObject.parseObject(result);
|
|
|
+ Integer code = json.getInteger("code");
|
|
|
+ if (code != 0) {
|
|
|
+ throw new ServiceException(result);
|
|
|
+ }
|
|
|
+ return json.getJSONArray("data").toJavaList(JSONObject.class);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
* 获取出库单
|
|
|
*/
|
|
|
public static List<JSONObject> getOutboundOrder(Integer page, Integer limit, Long startTime, Long endTime) throws IOException {
|
|
@@ -136,30 +154,6 @@ public class WlnUtil {
|
|
|
return json.getJSONArray("data").toJavaList(JSONObject.class);
|
|
|
}
|
|
|
|
|
|
-// public static void main(String[] args) throws Exception {
|
|
|
-// List<JSONObject> skuList = getSkuList(1, 200);
|
|
|
-// System.out.println();
|
|
|
-//
|
|
|
-// List<JSONObject> skuClassifyList = getSkuClassifyList();
|
|
|
-// System.out.println();
|
|
|
-//
|
|
|
-// long endTime = System.currentTimeMillis();
|
|
|
-// long startTime = endTime - 1000 * 60 * 60 * 24;
|
|
|
-// 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);
|
|
|
-// 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请求
|
|
|
*/
|
|
@@ -185,23 +179,28 @@ public class WlnUtil {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-
|
|
|
- /**
|
|
|
- * 获取订单
|
|
|
- */
|
|
|
- public static List<JSONObject> getOrderListByWlnCodeList(String wlnCodeListStr) throws Exception {
|
|
|
- TradesParam param = new TradesParam();
|
|
|
- param.setBill_code(wlnCodeListStr);
|
|
|
- param.setPage(1);
|
|
|
- param.setLimit(200);
|
|
|
- param.generateSign(MapUtil.createLinkString(MapUtil.beanToMap(param)));
|
|
|
- String result = send(PREFIX + "erp/opentrade/list/trades", MapUtil.beanToMap(param));
|
|
|
- JSONObject json = JSONObject.parseObject(result);
|
|
|
- Integer code = json.getInteger("code");
|
|
|
- if (code != 0) {
|
|
|
- throw new ServiceException(result);
|
|
|
- }
|
|
|
- return json.getJSONArray("data").toJavaList(JSONObject.class);
|
|
|
- }
|
|
|
+ //public static void main(String[] args) throws Exception {
|
|
|
+ // List<JSONObject> skuList = getSkuList(1, 200);
|
|
|
+ // System.out.println();
|
|
|
+ //
|
|
|
+ // List<JSONObject> skuClassifyList = getSkuClassifyList();
|
|
|
+ // System.out.println();
|
|
|
+ //
|
|
|
+ // long endTime = System.currentTimeMillis();
|
|
|
+ // long startTime = endTime - 1000 * 60 * 60 * 24;
|
|
|
+ // 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);
|
|
|
+ // 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();
|
|
|
+ //}
|
|
|
|
|
|
}
|