|
@@ -203,10 +203,10 @@ public class AskGoodsServiceImpl implements AskGoodsService {
|
|
|
AskGoods askGoods1 = askGoodsMapper.getAsknInfo(askGoods); //要货单数量
|
|
|
int alreadyNum = askGoodsMapper.getAskInfoNumVitrual(askGoods);//已扫描总数
|
|
|
int inventoryAlready = askGoodsMapper.getInventoryAlready(askGoods);//库存已扫描数量
|
|
|
- int inventorySurplus = (Integer.parseInt(inventory.getAmount()) - Integer.parseInt(inventory.getAmountLock())) - inventoryAlready; //库存剩余数量
|
|
|
+ Double inventorySurplus = (Double.parseDouble(inventory.getAmount()) - Double.parseDouble(inventory.getAmountLock())) - inventoryAlready; //库存剩余数量
|
|
|
Double surplusNum = Double.parseDouble(askGoods1.getNum()) - Double.parseDouble(askGoods1.getOutNum()) - alreadyNum; //剩余要扫描数量
|
|
|
|
|
|
- if(surplusNum >= inventorySurplus){
|
|
|
+ if(Double.doubleToLongBits(surplusNum) >= Double.doubleToLongBits(inventorySurplus)){
|
|
|
askGoods.setNum(String.valueOf(inventorySurplus));
|
|
|
} else {
|
|
|
askGoods.setNum(String.valueOf(surplusNum));
|
|
@@ -351,7 +351,6 @@ public class AskGoodsServiceImpl implements AskGoodsService {
|
|
|
askGoodsMapper.updateRemoval(map.get("removalCode").toString());
|
|
|
}
|
|
|
errorMapper.addError(error);
|
|
|
- type = 1;
|
|
|
}else {
|
|
|
JSONObject jsonObject = (JSONObject) JSONObject.parse(result.get("data").toString());
|
|
|
JSONObject jsonObject1 = (JSONObject) JSONObject.parse(jsonObject.get("result").toString());
|
|
@@ -365,7 +364,6 @@ public class AskGoodsServiceImpl implements AskGoodsService {
|
|
|
for(Map<String, Object> map : askGoodsMapper.plugOutRemoval(removalCode)){
|
|
|
askGoodsMapper.updateRemoval(map.get("removalCode").toString());
|
|
|
}
|
|
|
- type = 1;
|
|
|
}else {
|
|
|
List<JSONObject> data1 = (List<JSONObject>) JSONObject.parse(jsonObject1.get("data").toString());
|
|
|
for (JSONObject map : data1) {
|
|
@@ -771,6 +769,7 @@ public class AskGoodsServiceImpl implements AskGoodsService {
|
|
|
error.setUrl("http://42.159.85.29:52480/cwbase/sg/V1/ERP/TELD/DEVTEST/API_WMS_PurInStock/CreateBOLOutStock");
|
|
|
error.setDataVal(returnData.toJSONString()).setType("销售出库");
|
|
|
errorMapper.addError(error);
|
|
|
+ queryListMapper.updateType(removalCode, 1);
|
|
|
}else {
|
|
|
JSONObject jsonObject = (JSONObject) JSONObject.parse(result.get("data").toString());
|
|
|
JSONObject jsonObject1 = (JSONObject) JSONObject.parse(jsonObject.get("result").toString());
|
|
@@ -780,6 +779,7 @@ public class AskGoodsServiceImpl implements AskGoodsService {
|
|
|
error.setUrl("http://42.159.85.29:52480/cwbase/sg/V1/ERP/TELD/DEVTEST/API_WMS_PurInStock/CreateBOLOutStock");
|
|
|
error.setDataVal(returnData.toJSONString()).setType("销售出库");
|
|
|
errorMapper.addError(error);
|
|
|
+ queryListMapper.updateType(removalCode, 1);
|
|
|
}else {
|
|
|
List<JSONObject> data1 = (List<JSONObject>) JSONObject.parse(jsonObject1.get("data").toString());
|
|
|
for (JSONObject map : data1) {
|
|
@@ -1180,7 +1180,7 @@ public class AskGoodsServiceImpl implements AskGoodsService {
|
|
|
* @return
|
|
|
*/
|
|
|
public String codeGenerateCk(){
|
|
|
- StringBuilder stringBuilder = new StringBuilder("CK");
|
|
|
+ StringBuilder stringBuilder = new StringBuilder("YHCK");
|
|
|
Date date = new Date();
|
|
|
SimpleDateFormat sdf = new SimpleDateFormat("yyMMdd");
|
|
|
stringBuilder.append(sdf.format(date));
|