|
|
@@ -417,72 +417,64 @@ public class AskGoodsServiceImpl implements AskGoodsService {
|
|
|
askGoodsMapper.addAccess(names,returnGsRemoval,accessType);
|
|
|
System.out.println("封装好的:"+returnData);
|
|
|
// 回传地址
|
|
|
- String url = "https://erp4.teld.cn:8443/cwbase/sg/V1/ERP/TELD/TELD_WMS/TELD_API_WMS_StockManage/CreateProductiveOutStock";
|
|
|
-// String url = "http://42.159.85.29:52480/cwbase/sg/V1/ERP/TELD/DEVTEST/API_WMS_PurInStock/CreateProductiveOutStock";
|
|
|
- HttpClientUtil httpClientUtil1 = new HttpClientUtil();
|
|
|
- Map<String, Object> result = httpClientUtil1.doPost(url, returnData);
|
|
|
- System.out.println("返回信息" + result);
|
|
|
- //如果失败存入错误信息
|
|
|
- Error error = new Error();
|
|
|
- if(Integer.parseInt(result.get("msg").toString()) != 200){
|
|
|
- //如果失败存入报错信息跟数据
|
|
|
- error.setErrorInfo(result.get("data").toString());
|
|
|
- error.setUrl(url);
|
|
|
- error.setDataVal(returnData.toJSONString()).setType("出库回传");
|
|
|
- //修改流水传输状态
|
|
|
- for(Map<String, Object> maps : askGoodsMapper.plugOutRemoval(removalCode)){
|
|
|
- askGoodsMapper.updateRemoval(maps.get("removalCode").toString(), null);
|
|
|
- }
|
|
|
-// errorMapper.addError(error);
|
|
|
- errorMapper.addGsError(error);
|
|
|
- }else {
|
|
|
- JSONObject jsonObject = (JSONObject) JSONObject.parse(result.get("data").toString());
|
|
|
- JSONObject jsonObject1 = (JSONObject) JSONObject.parse(jsonObject.get("result").toString());
|
|
|
- if ( jsonObject1.get("State").toString().equals("0") ) {
|
|
|
- //如果失败存入报错信息跟数据
|
|
|
- error.setErrorInfo(jsonObject1.get("Msg").toString());
|
|
|
- error.setUrl(url);
|
|
|
- error.setDataVal(returnData.toJSONString()).setType("出库回传");
|
|
|
-// errorMapper.addError(error);
|
|
|
- errorMapper.addGsError(error);
|
|
|
- //修改流水传输状态
|
|
|
- for (Map<String, Object> maps : askGoodsMapper.plugOutRemoval(removalCode)) {
|
|
|
- askGoodsMapper.updateRemoval(maps.get("removalCode").toString(), null);
|
|
|
- }
|
|
|
- }
|
|
|
-// }else {
|
|
|
-// List<JSONObject> data1 = (List<JSONObject>) JSONObject.parse(jsonObject1.get("data").toString());
|
|
|
-// for (JSONObject map1 : data1) {
|
|
|
-// if (map1.get("State").toString().equals("0")){
|
|
|
-// for(JSONObject jsonObject2 : retunList){
|
|
|
-// if(jsonObject2.get("WMSCode").toString().equals(map1.get("WMSCode")) && jsonObject2.get("WareHouse").toString().equals(map1.get("WareHouse"))){
|
|
|
-//
|
|
|
-// //如果失败存入报错信息跟数据
|
|
|
-// List<JSONObject> retunList2 = new LinkedList<>();
|
|
|
-// retunList2.add(jsonObject2);
|
|
|
-//
|
|
|
-// JSONObject ReqOutStocks1 = new JSONObject();
|
|
|
-// ReqOutStocks1.put("ReqOutStocks", retunList2);
|
|
|
-//
|
|
|
-// JSONObject ReqOutStocks2 = new JSONObject();
|
|
|
-// ReqOutStocks2.put("strJson",ReqOutStocks1.toJSONString());
|
|
|
-//
|
|
|
-// //如果失败存入报错信息跟数据
|
|
|
-// error.setErrorInfo(map1.get("FailReason").toString());
|
|
|
-// error.setUrl(url);
|
|
|
-// error.setDataVal(ReqOutStocks2.toJSONString()).setType("出库回传");
|
|
|
-// errorMapper.addError(error);
|
|
|
-// List<JSONObject> list1 = (List<JSONObject>) jsonObject2.get("BillItems");
|
|
|
-// for(JSONObject jsonObject3 : list1){
|
|
|
-// MaterialClass material = warehousingMapper.getMaterial(new Notice().setMaterialId(jsonObject3.get("Material").toString()));
|
|
|
-// askGoodsMapper.updateRemoval(jsonObject2.get("WMSCode").toString(), material.getWllbCode());
|
|
|
-// }
|
|
|
-// }
|
|
|
-// }
|
|
|
-// }
|
|
|
-// }
|
|
|
+// String url = "https://erp4.teld.cn:8443/cwbase/sg/V1/ERP/TELD/TELD_WMS/TELD_API_WMS_StockManage/CreateProductiveOutStock";
|
|
|
+//// String url = "http://42.159.85.29:52480/cwbase/sg/V1/ERP/TELD/DEVTEST/API_WMS_PurInStock/CreateProductiveOutStock";
|
|
|
+// HttpClientUtil httpClientUtil1 = new HttpClientUtil();
|
|
|
+// Map<String, Object> result = httpClientUtil1.doPost(url, returnData);
|
|
|
+// System.out.println("返回信息" + result);
|
|
|
+// //如果失败存入错误信息
|
|
|
+// Error error = new Error();
|
|
|
+// if(Integer.parseInt(result.get("msg").toString()) != 200){
|
|
|
+// //如果失败存入报错信息跟数据
|
|
|
+// error.setErrorInfo(result.get("data").toString());
|
|
|
+// error.setUrl(url);
|
|
|
+// error.setDataVal(returnData.toJSONString()).setType("出库回传");
|
|
|
+//// errorMapper.addError(error);
|
|
|
+// errorMapper.addGsError(error);
|
|
|
+// }else {
|
|
|
+// JSONObject jsonObject = (JSONObject) JSONObject.parse(result.get("data").toString());
|
|
|
+// JSONObject jsonObject1 = (JSONObject) JSONObject.parse(jsonObject.get("result").toString());
|
|
|
+// if ( jsonObject1.get("State").toString().equals("0") ) {
|
|
|
+// //如果失败存入报错信息跟数据
|
|
|
+// error.setErrorInfo(jsonObject1.get("Msg").toString());
|
|
|
+// error.setUrl(url);
|
|
|
+// error.setDataVal(returnData.toJSONString()).setType("出库回传");
|
|
|
+//// errorMapper.addError(error);
|
|
|
+// errorMapper.addGsError(error);
|
|
|
// }
|
|
|
- }
|
|
|
+//// }else {
|
|
|
+//// List<JSONObject> data1 = (List<JSONObject>) JSONObject.parse(jsonObject1.get("data").toString());
|
|
|
+//// for (JSONObject map1 : data1) {
|
|
|
+//// if (map1.get("State").toString().equals("0")){
|
|
|
+//// for(JSONObject jsonObject2 : retunList){
|
|
|
+//// if(jsonObject2.get("WMSCode").toString().equals(map1.get("WMSCode")) && jsonObject2.get("WareHouse").toString().equals(map1.get("WareHouse"))){
|
|
|
+////
|
|
|
+//// //如果失败存入报错信息跟数据
|
|
|
+//// List<JSONObject> retunList2 = new LinkedList<>();
|
|
|
+//// retunList2.add(jsonObject2);
|
|
|
+////
|
|
|
+//// JSONObject ReqOutStocks1 = new JSONObject();
|
|
|
+//// ReqOutStocks1.put("ReqOutStocks", retunList2);
|
|
|
+////
|
|
|
+//// JSONObject ReqOutStocks2 = new JSONObject();
|
|
|
+//// ReqOutStocks2.put("strJson",ReqOutStocks1.toJSONString());
|
|
|
+////
|
|
|
+//// //如果失败存入报错信息跟数据
|
|
|
+//// error.setErrorInfo(map1.get("FailReason").toString());
|
|
|
+//// error.setUrl(url);
|
|
|
+//// error.setDataVal(ReqOutStocks2.toJSONString()).setType("出库回传");
|
|
|
+//// errorMapper.addError(error);
|
|
|
+//// List<JSONObject> list1 = (List<JSONObject>) jsonObject2.get("BillItems");
|
|
|
+//// for(JSONObject jsonObject3 : list1){
|
|
|
+//// MaterialClass material = warehousingMapper.getMaterial(new Notice().setMaterialId(jsonObject3.get("Material").toString()));
|
|
|
+//// askGoodsMapper.updateRemoval(jsonObject2.get("WMSCode").toString(), material.getWllbCode());
|
|
|
+//// }
|
|
|
+//// }
|
|
|
+//// }
|
|
|
+//// }
|
|
|
+//// }
|
|
|
+//// }
|
|
|
+// }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -902,7 +894,6 @@ public class AskGoodsServiceImpl implements AskGoodsService {
|
|
|
error.setDataVal(returnData.toJSONString()).setType("销售出库");
|
|
|
// errorMapper.addError(error);
|
|
|
errorMapper.addGsError(error);
|
|
|
- queryListMapper.updateType(removalCode, 1, null);
|
|
|
} else {
|
|
|
JSONObject jsonObject = (JSONObject) JSONObject.parse(result.get("data").toString());
|
|
|
JSONObject jsonObject1 = (JSONObject) JSONObject.parse(jsonObject.get("result").toString());
|
|
|
@@ -913,7 +904,6 @@ public class AskGoodsServiceImpl implements AskGoodsService {
|
|
|
error.setDataVal(returnData.toJSONString()).setType("销售出库");
|
|
|
// errorMapper.addError(error);
|
|
|
errorMapper.addGsError(error);
|
|
|
- queryListMapper.updateType(removalCode, 1, null);
|
|
|
}
|
|
|
// }else {
|
|
|
// List<JSONObject> data1 = (List<JSONObject>) JSONObject.parse(jsonObject1.get("data").toString());
|
|
|
@@ -1133,7 +1123,7 @@ public class AskGoodsServiceImpl implements AskGoodsService {
|
|
|
}
|
|
|
//删除父子表信息
|
|
|
//根据code
|
|
|
- askGoodsMapper.delReturnWarehouseTransfer(removalCode);
|
|
|
+ askGoodsMapper.delReturnWarehouseTransfer(warehouseTransferTd);
|
|
|
//根据id
|
|
|
askGoodsMapper.delReturnWarehouseTransferZ(warehouseTransferTd);
|
|
|
} catch (Exception e) {
|
|
|
@@ -1228,10 +1218,6 @@ public class AskGoodsServiceImpl implements AskGoodsService {
|
|
|
error.setDataVal(returnData.toJSONString()).setType("生产收货");
|
|
|
// errorMapper.addError(error);
|
|
|
errorMapper.addGsError(error);
|
|
|
- //修改流水传输状态
|
|
|
- for(Map<String, Object> map1 : askGoodsMapper.plugOutRemoval(removalCode)){
|
|
|
- askGoodsMapper.updateRemoval(map1.get("removalCode").toString(), null);
|
|
|
- }
|
|
|
} else {
|
|
|
JSONObject jsonObject = (JSONObject) JSONObject.parse(result.get("data").toString());
|
|
|
JSONObject jsonObject1 = (JSONObject) JSONObject.parse(jsonObject.get("result").toString());
|