|
@@ -853,10 +853,10 @@ public class AskGoodsServiceImpl implements AskGoodsService {
|
|
|
AskGoods askGoods1 = askGoodsMapper.getWareInfo(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));
|