|
@@ -273,13 +273,18 @@ public class AskGoodsServiceImpl implements AskGoodsService {
|
|
|
}
|
|
|
//查询要货单父级信息
|
|
|
AskGoods askGoods3 = askGoodsMapper.getAskDetailedF(askGoodsId);
|
|
|
- ReturRemoval returRemoval1 = new ReturRemoval()
|
|
|
- .setDocumentId(askGoods3.getAskGoodsId())
|
|
|
- .setRemovalCode(removalCode)
|
|
|
- .setSourceType(askGoods3.getSourceType())
|
|
|
- .setMoveType(askGoods3.getMoveType());
|
|
|
- askGoodsMapper.addReturnGsRemovalF(returRemoval1);//新增返回gs数据父表信息
|
|
|
- map.put("data", askGoods3.getAskGoodsId());
|
|
|
+ if(askGoods3 != null){
|
|
|
+ ReturRemoval returRemoval1 = new ReturRemoval()
|
|
|
+ .setDocumentId(askGoods3.getAskGoodsId())
|
|
|
+ .setRemovalCode(removalCode)
|
|
|
+ .setSourceType(askGoods3.getSourceType())
|
|
|
+ .setMoveType(askGoods3.getMoveType());
|
|
|
+ askGoodsMapper.addReturnGsRemovalF(returRemoval1);//新增返回gs数据父表信息
|
|
|
+ map.put("data", askGoods3.getAskGoodsId());
|
|
|
+ } else {
|
|
|
+ map.put("data", "0");
|
|
|
+ }
|
|
|
+
|
|
|
map.put("msg", "200");
|
|
|
}catch (Exception e){
|
|
|
e.printStackTrace();
|
|
@@ -306,7 +311,7 @@ public class AskGoodsServiceImpl implements AskGoodsService {
|
|
|
for(String warehouseWhere : askGoodsMapper.getWarehouseWhere(removalCode)){
|
|
|
List<Map<String, Object>> mapList = askGoodsMapper.plugOutRemoval(removalCode);
|
|
|
if(mapList.size() >0 ) {
|
|
|
- JSONObject strJson = new JSONObject();//4
|
|
|
+ JSONObject strJson = new JSONObject();
|
|
|
//父表
|
|
|
strJson.put("GIReqBillID", mapList.get(0).get("askGoodsId").toString());//要货单id
|
|
|
strJson.put("WMSID", mapList.get(0).get("id").toString());//出库单id
|
|
@@ -347,7 +352,7 @@ public class AskGoodsServiceImpl implements AskGoodsService {
|
|
|
// 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){
|
|
@@ -1580,7 +1585,10 @@ public class AskGoodsServiceImpl implements AskGoodsService {
|
|
|
List<Map<String, Object>> list1 = queryListMapper.getTestTwo();
|
|
|
for(Map<String, Object> map : list1){
|
|
|
Map<String, Object> map1 = OutOfLibrary("1111", "计划出库", map.get("ask_goods_id").toString());
|
|
|
- plugOutRemoval(map1.get("data").toString(), "王孝苗");
|
|
|
+ System.out.println(map1.get("data"));
|
|
|
+// if(map1.get("data") != null){
|
|
|
+ plugOutRemoval(map1.get("data").toString(), "王孝苗");
|
|
|
+// }
|
|
|
}
|
|
|
}
|
|
|
|