浏览代码

20230214 16:54

wangzhuo 2 年之前
父节点
当前提交
a8ccdb07e3
共有 1 个文件被更改,包括 4 次插入2 次删除
  1. 4 2
      ruoyi-warehouse/src/main/resources/mapper/basicData/TWarehouseMapper.xml

+ 4 - 2
ruoyi-warehouse/src/main/resources/mapper/basicData/TWarehouseMapper.xml

@@ -729,8 +729,10 @@
         LEFT JOIN t_goods TG ON TG.f_id = TW.f_goodsid
         LEFT JOIN t_warehouse TWH ON TW.f_warehouseid = TWH.f_id
         LEFT JOIN t_corps TC ON TC.f_id = TW.f_corpid
+        LEFT JOIN t_warehousebills TWB ON TWB.f_mblno = TW.f_mblno
         <where>
             TW.del_flag = '0'
+            AND (TWB.f_ifpledge != 0 or TWB.f_ifpledge IS NULL)
             <if test="ownerName != null and ownerName != ''">
                 and TC.f_name = #{ownerName}
             </if>
@@ -751,7 +753,7 @@
     <update id="receiptRegister">
         update t_warehousebills TW
         LEFT JOIN t_corps TC ON TC.f_id = TW.f_corpid
-        SET TW.f_ifpledge = 'T'
+        SET TW.f_ifpledge = '0'
         <where>
             TW.del_flag = '0'
             <if test="ownerName != null and ownerName != ''">
@@ -769,7 +771,7 @@
     <update id="receiptCancel">
         update t_warehousebills TW
         LEFT JOIN t_corps TC ON TC.f_id = TW.f_corpid
-        SET TW.f_ifpledge = 'F'
+        SET TW.f_ifpledge = '1'
         <where>
             TW.del_flag = '0'
             <if test="ownerName != null and ownerName != ''">