Prechádzať zdrojové kódy

安品撤销出入库,查询调拨修改

lazhaoqian 3 rokov pred
rodič
commit
f71dde0406

+ 7 - 2
ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/service/impl/TWarehouseBillsServiceImpl.java

@@ -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){

+ 2 - 2
ruoyi-warehouse/src/main/resources/mapper/warehouseBusiness/TWarehousebillsfeesMapper.xml

@@ -1987,7 +1987,7 @@
             and tw.f_billtype = 'DB'
             <if test="fBillstatus != null  and fBillstatus == 1">and tw.f_billstatus = 6</if>
             <if test="fBillstatus != null  and fBillstatus == 2">and tw.f_billstatus != 6</if>
-            <if test="fCorpid != null ">and ti.f_corpid = #{fCorpid}</if>
+            <if test="fCorpid != null ">and tw.f_corpid = #{fCorpid}</if>
             <if test="fGoodsid != null ">and ti.f_goodsid = #{fGoodsid}</if>
             <if test="fFeeid != null ">and tw.f_feeid = #{fFeeid}</if>
             <if test="fFeeType != null ">and tf.f_feetype = #{fFeeType}</if>
@@ -2058,7 +2058,7 @@
             and tw.f_billtype = 'DB'
             <if test="fBillstatus != null  and fBillstatus == 1">and tw.f_billstatus = 6</if>
             <if test="fBillstatus != null  and fBillstatus == 2">and tw.f_billstatus != 6</if>
-            <if test="fCorpid != null ">and ti.f_corpid = #{fCorpid}</if>
+            <if test="fCorpid != null ">and tw.f_corpid = #{fCorpid}</if>
             <if test="fGoodsid != null ">and ti.f_goodsid = #{fGoodsid}</if>
             <if test="fFeeid != null ">and tw.f_feeid = #{fFeeid}</if>
             <if test="fFeeType != null ">and tf.f_feetype = #{fFeeType}</if>