|
@@ -436,7 +436,7 @@ public class WarehousingServiceImpl implements WarehousingService {
|
|
|
map.put("errMsg", "订单已出库");
|
|
|
return map;
|
|
|
}
|
|
|
- if (Double.parseDouble(askGoods.getNum()) < Double.parseDouble(notice.getWarehousingNum())) {
|
|
|
+ if (Double.doubleToLongBits(Double.parseDouble(askGoods.getNum())) < Double.doubleToLongBits(Double.parseDouble(notice.getWarehousingNum()))) {
|
|
|
map.put("msg", "500");
|
|
|
map.put("errMsg", "出库数量大于要货单数量");
|
|
|
return map;
|
|
@@ -446,17 +446,23 @@ public class WarehousingServiceImpl implements WarehousingService {
|
|
|
map.put("errMsg", "没有查询到此半成品物料的库存");
|
|
|
return map;
|
|
|
}
|
|
|
- if (Double.parseDouble(notice.getWarehousingNum()) > Double.parseDouble(inventory.getAmount())) {
|
|
|
+ if (Double.doubleToLongBits(Double.parseDouble(notice.getWarehousingNum())) > Double.doubleToLongBits(Double.parseDouble(inventory.getAmount()))) {
|
|
|
map.put("msg", "500");
|
|
|
map.put("errMsg", "库存不足");
|
|
|
return map;
|
|
|
}
|
|
|
- if (Double.parseDouble(notice.getWarehousingNum()) == Double.parseDouble(inventory.getAmount())) {
|
|
|
+ if (Double.doubleToLongBits(Double.parseDouble(notice.getWarehousingNum())) == Double.doubleToLongBits(Double.parseDouble(inventory.getAmount()))) {
|
|
|
warehousingMapper.delInventoryNotice(notice);
|
|
|
} else {
|
|
|
warehousingMapper.updateInventoryNoticeNum(notice);
|
|
|
}
|
|
|
- warehousingMapper.updateAskGoodsHalf(askGoods.getId(), notice.getWarehousingNum());//修改要货单出库数量
|
|
|
+ //出库数量 + 已经出库的数量 如果相等 则改变单据状态
|
|
|
+ Double num = Double.parseDouble(notice.getWarehousingNum()) + Double.parseDouble(askGoods.getOutNum());
|
|
|
+ String type = null;
|
|
|
+ if(Double.doubleToLongBits(Double.parseDouble(askGoods.getNum())) == Double.doubleToLongBits(num)){
|
|
|
+ type = "1";
|
|
|
+ }
|
|
|
+ warehousingMapper.updateAskGoodsHalf(askGoods.getId(), notice.getWarehousingNum(), type);//修改要货单出库数量
|
|
|
//新增返回gs信息
|
|
|
String removalCode = codeGenerateCk();
|
|
|
//新增半成品出库流水
|