|
@@ -251,13 +251,14 @@ public class WarehousingServiceImpl implements WarehousingService {
|
|
|
HttpClientUtil httpClientUtil1 = new HttpClientUtil();
|
|
|
Map<String, Object> result = httpClientUtil1.doPost("http://42.159.85.29:52480/cwbase/sg/V1/ERP/TELD/DEVTEST/API_WMS_PurInStock/CreateProductiveOutStock", returnData);
|
|
|
Error error = new Error();
|
|
|
-
|
|
|
+ int type = 0;
|
|
|
if (Integer.parseInt(result.get("msg").toString()) != 200) {
|
|
|
//如果失败存入报错信息跟数据
|
|
|
error.setErrorInfo(result.get("data").toString());
|
|
|
error.setUrl("http://42.159.85.29:52480/cwbase/sg/V1/ERP/TELD/DEVTEST/API_WMS_PurInStock/CreateProductiveOutStock");
|
|
|
error.setDataVal(returnData.toJSONString());
|
|
|
errorMapper.addError(error);
|
|
|
+ type = 1;
|
|
|
} else {
|
|
|
JSONObject jsonObject = JSONObject.parseObject(JSON.parseObject((String) result.get("data")).get("result").toString());
|
|
|
if (jsonObject.get("State").toString().equals("0")) {
|
|
@@ -266,6 +267,7 @@ public class WarehousingServiceImpl implements WarehousingService {
|
|
|
error.setUrl("http://42.159.85.29:52480/cwbase/sg/V1/ERP/TELD/DEVTEST/API_WMS_PurInStock/CreateProductiveOutStock");
|
|
|
error.setDataVal(returnData.toJSONString());
|
|
|
errorMapper.addError(error);
|
|
|
+ type = 1;
|
|
|
}
|
|
|
}
|
|
|
//删除父子表信息
|
|
@@ -275,6 +277,8 @@ public class WarehousingServiceImpl implements WarehousingService {
|
|
|
String accessType = "1";
|
|
|
String returnGsRemoval = returnData.toString();
|
|
|
askGoodsMapper.addAccess(names, returnGsRemoval, accessType);
|
|
|
+ //增加流水传输状态
|
|
|
+ warehousingMapper.updateWarehousingType(returnWarehousing.getStorageCode(), type);
|
|
|
}
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
@@ -436,9 +440,9 @@ public class WarehousingServiceImpl implements WarehousingService {
|
|
|
map.put("errMsg", "订单已出库");
|
|
|
return map;
|
|
|
}
|
|
|
- if (Double.doubleToLongBits(Double.parseDouble(askGoods.getNum())) < Double.doubleToLongBits(Double.parseDouble(notice.getWarehousingNum()))) {
|
|
|
+ if (Double.doubleToLongBits(Double.parseDouble(askGoods.getNum())) < Double.doubleToLongBits(Double.parseDouble(notice.getWarehousingNum()) + Double.parseDouble(askGoods.getOutNum()))) {
|
|
|
map.put("msg", "500");
|
|
|
- map.put("errMsg", "出库数量大于要货单数量");
|
|
|
+ map.put("errMsg", "出库数量大于剩余要货单数量");
|
|
|
return map;
|
|
|
}
|
|
|
if (inventory == null) {
|