|
@@ -4190,10 +4190,15 @@ public class TWarehouseBillsServiceImpl implements ITWarehouseBillsService {
|
|
|
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
|
|
|
return AjaxResult.error("库存不足");
|
|
|
}
|
|
|
- if (tWhgenleg.getfGrossweightblc().compareTo(warehousebillsfees.getfQty())< 0){
|
|
|
+ if (billsType.equals("RKRevoke") && tWhgenleg.getfVolumnd().compareTo(warehousebillsfees.getfQty())< 0){
|
|
|
TFees tFees = tFeesMapper.selectTFeesById(warehousebillsfees.getfFeeid());
|
|
|
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
|
|
|
- return AjaxResult.error("库存不足,当前"+tFees.getfName()+"库存为:"+ tWhgenleg.getfGrossweightblc());
|
|
|
+ return AjaxResult.error("库存不足,当前"+tFees.getfName()+"可撤销库存为:"+ tWhgenleg.getfVolumnd());
|
|
|
+ }
|
|
|
+ if (billsType.equals("CKRevoke") && tWhgenleg.getfNetweightc().compareTo(warehousebillsfees.getfQty())< 0){
|
|
|
+ TFees tFees = tFeesMapper.selectTFeesById(warehousebillsfees.getfFeeid());
|
|
|
+ TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
|
|
|
+ return AjaxResult.error("库存不足,当前"+tFees.getfName()+"可撤销库存为:"+ tWhgenleg.getfNetweightc());
|
|
|
}
|
|
|
int updateTWhgenlegData = this.anPinUpdateTWhgenlegData(warehousebillsfees, tWhgenleg.getfId(), billsType);
|
|
|
if (updateTWhgenlegData < 1){
|