|
@@ -1812,12 +1812,13 @@ public class TWarehouseBillsServiceImpl implements ITWarehouseBillsService {
|
|
|
}
|
|
|
if ("CK".equals(billsType)){
|
|
|
TWhgenleg tWhgenleg = this.anPinQueryTWhgenleg(warehouseBills, warehousebillsfees);
|
|
|
+ TFees tFees = tFeesMapper.selectTFeesById(warehousebillsfees.getfFeeid());
|
|
|
if (tWhgenleg == null){
|
|
|
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
|
|
|
- return AjaxResult.error("出库数量大于库存数,库存不足");
|
|
|
+ return AjaxResult.error(tFees.getfName()+"出库数量大于库存数,库存不足,现有库存数为0");
|
|
|
}else if (tWhgenleg.getfId() != null && tWhgenleg.getfGrossweightblc().compareTo(warehousebillsfees.getfQty())< 0){
|
|
|
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
|
|
|
- return AjaxResult.error("出库数量大于库存数,库存不足");
|
|
|
+ return AjaxResult.error(tFees.getfName()+"出库数量大于库存数,现有库存数量为"+tWhgenleg.getfGrossweightblc()+",库存不足");
|
|
|
}
|
|
|
this.anPinUpdateTWhgenlegData(warehousebillsfees,tWhgenleg.getfId(),billsType);
|
|
|
}
|
|
@@ -1889,12 +1890,13 @@ public class TWarehouseBillsServiceImpl implements ITWarehouseBillsService {
|
|
|
}
|
|
|
if ("CK".equals(billsType)){
|
|
|
TWhgenleg tWhgenleg = this.anPinQueryTWhgenleg(warehouseBills, warehousebillsfees);
|
|
|
+ TFees tFees = tFeesMapper.selectTFeesById(warehousebillsfees.getfFeeid());
|
|
|
if (tWhgenleg == null){
|
|
|
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
|
|
|
- return AjaxResult.error("出库数量大于库存数,库存不足");
|
|
|
+ return AjaxResult.error(tFees.getfName()+"出库数量大于库存数,库存不足,现有库存数为0");
|
|
|
}else if (tWhgenleg.getfId() != null && tWhgenleg.getfGrossweightblc().compareTo(warehousebillsfees.getfQty())< 0){
|
|
|
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
|
|
|
- return AjaxResult.error("出库数量大于库存数,库存不足");
|
|
|
+ return AjaxResult.error(tFees.getfName()+"出库数量大于库存数,现有库存数量为"+tWhgenleg.getfGrossweightblc()+",库存不足");
|
|
|
}
|
|
|
this.anPinUpdateTWhgenlegData(warehousebillsfees,tWhgenleg.getfId(),billsType);
|
|
|
}
|