|
@@ -17,34 +17,51 @@ public class QmCancelTest {
|
|
|
public static void readTxtFile(String args)
|
|
|
throws IOException, JAXBException
|
|
|
{
|
|
|
- QmCancel qmCancel = new QmCancel();
|
|
|
- qmCancel.setOrderCode("JYS2107267211");
|
|
|
- qmCancel.setOrderType("JYCK");
|
|
|
+ List<String> cancelOrders =
|
|
|
+ FileUtil.readLines("/Users/dzl/IdeaProjects/qm/data/1.txt", "utf8");
|
|
|
|
|
|
- JAXBContext jc = JAXBContext.newInstance(QmCancel.class);
|
|
|
- Marshaller ms = jc.createMarshaller();
|
|
|
- StringWriter writer = new StringWriter();
|
|
|
- ms.marshal(qmCancel, writer);
|
|
|
- String xml = writer.toString();
|
|
|
|
|
|
- String appKey = "21226717";
|
|
|
+// for (String cancelOrder : cancelOrders)
|
|
|
+ {
|
|
|
+// String.format("%s 今年%d 岁","我", "24");
|
|
|
|
|
|
- String qmCustomerId = "PK";
|
|
|
+// String sql = "INSERT INTO CWMS.WMS_SN_INVENTORY (ID, CREATED_BY, CREATION_METHOD, CREATION_TIME, DELETE_FLAG, UPDATE_METHOD, UPDATE_TIME, UPDATED_BY, ACCOUNT_ID, BOX_NO, BRAND_ID, BUSINESS_LOCK_FLAG, CUSTOMER_CODE, CUSTOMER_ID, CUSTOMER_NAME, CUSTOMER_REFFERENCE_ID, ITEM_CODE, ITEM_GROUP_CODE, ITEM_GROUP_ID, ITEM_GROUP_NAME, ITEM_ID, ITEM_NAME, ITEM_SUPPLIER_CODE, ITEM_SUPPLIER_ID, ITEM_SUPPLIER_NAME, LATEST_DEPOTCHECK_TIME, LATEST_WAREHOUSING_NUMBER, LATEST_WAREHOUSING_TIME, LOCATION_CONTAINER_ID, LOCATION_ID, LOCATION_NAME, NORMAL_FLAG, PACKING_LIST_ID, PALLET_NO, RELATIONED_CUSTOMER_ALIAS, RELATIONED_CUSTOMER_CODE, RELATIONED_CUSTOMER_ID, RELATIONED_CUSTOMER_NAME, REMARK, SHELVES_TASK_DETAIL_ID, SN_NO, STATUS, UNITS, WAREHOUSE_ID, WAREHOUSE_NAME, ZONE_ID, ZONE_NAME) " +
|
|
|
+// " VALUES ( sys_guid(), '徐俊', 'edi', TO_DATE('2021-05-28 09:59:15', 'YYYY-MM-DD HH24:MI:SS'), 0, 'edi', TO_DATE('2021-05-28 09:59:15', 'YYYY-MM-DD HH24:MI:SS'), '徐俊', '1911250000001', null, null, 0, 'SHEDEI', '2010100000001', '沱牌舍得', 'ZJDB2103040164-1579601', '03.04.04.01.004.42.500.06.00', '酒类', '8aaa15ec7511d9db01751a8cc6400284', '酒类', 'ST2010200000097', '舍之道42%vol 500ml×6', null, null, null, null, 6, null, null, null, null, '正常品', null, null, null, 'SHEDEI', '2010100000001', '沱牌舍得', null, 'SJ2105280000013',"+ "'" + cancelOrder + "'" + ", null, '13446', '8aaa3dfe750cb409017510a41a700211', '南京溧水仓', null, null); " ;
|
|
|
|
|
|
- String secretKey = "5cac8b2203e0e65cffb6e1c465d55a4f";
|
|
|
+// "VALUES (sys_guid()," + id + ", '2019-7-04 10:44:07', 425, 'CN'," + arrStr[0]+ ", '700', '', '700', '44552', '30', NULL, '2019-07-04', '10:44:00', 1, '', '', 'ABSSS', '', '', '700A010A9999', '201907041112', '', '', NULL, NULL, NULL, NULL, '', '', '', '', NULL, '', '', '', '', '', '', '', '', '', 2, '2019-07-04 10:44:08', 0, NULL, 99, NULL, '', '', '', '', '');";
|
|
|
+// String sql = String.format("\n" +
|
|
|
+// "",cancelOrder);
|
|
|
|
|
|
- Map<String, String> requestParamter =
|
|
|
+ QmCancel qmCancel = new QmCancel();
|
|
|
+ qmCancel.setOrderCode("lzw-202107071359240001");
|
|
|
+ qmCancel.setOrderType("JYCK");
|
|
|
+
|
|
|
+ JAXBContext jc = JAXBContext.newInstance(QmCancel.class);
|
|
|
+ Marshaller ms = jc.createMarshaller();
|
|
|
+ StringWriter writer = new StringWriter();
|
|
|
+ ms.marshal(qmCancel, writer);
|
|
|
+ String xml = writer.toString();
|
|
|
+
|
|
|
+ String appKey = "21226717";
|
|
|
+
|
|
|
+ String qmCustomerId = "PK";
|
|
|
+
|
|
|
+ String secretKey = "5cac8b2203e0e65cffb6e1c465d55a4f";
|
|
|
+
|
|
|
+ Map<String, String> requestParamter =
|
|
|
WebUtils.getRequestParameter("order.cancel", appKey, qmCustomerId);
|
|
|
|
|
|
- String sign = QimenSignUtils.sign(requestParamter, xml, secretKey);
|
|
|
- requestParamter.put("sign", sign);
|
|
|
- String url = "http://172.172.172.211:8080/BH_CLIS/qimen" + "?" + QimenSignUtils.joinRequestParams(requestParamter);
|
|
|
- String result = WebUtils.doQmPost(url, xml);
|
|
|
+ String sign = QimenSignUtils.sign(requestParamter, xml, secretKey);
|
|
|
+ requestParamter.put("sign", sign);
|
|
|
+ String url = "http://172.172.172.81:8080/BH_CLIS/qimen" + "?" + QimenSignUtils.joinRequestParams(requestParamter);
|
|
|
+ String result = WebUtils.doQmPost(url, xml);
|
|
|
//
|
|
|
- System.out.println(result);
|
|
|
+ System.out.println(result);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ Map<String,Object> map = new HashMap<>();
|
|
|
|
|
|
-// Map<String,Object> map = new HashMap<>();
|
|
|
-//
|
|
|
// try {
|
|
|
// String encoding="UTF-8";
|
|
|
// File file=new File(args);
|
|
@@ -88,11 +105,11 @@ public class QmCancelTest {
|
|
|
}
|
|
|
|
|
|
public static void main(String[] args)
|
|
|
- throws FileNotFoundException, MalformedURLException
|
|
|
+ throws IOException, JAXBException
|
|
|
{
|
|
|
String filePath = "/Users/miao/Documents/1.71.log";
|
|
|
// "res/";
|
|
|
-// readTxtFile(filePath);
|
|
|
+ readTxtFile(filePath);
|
|
|
}
|
|
|
|
|
|
|