wangzhuo 2 lat temu
rodzic
commit
14d7754a88

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

@@ -381,7 +381,7 @@
         LEFT JOIN t_goods TG ON TG.f_id = TWG.f_goodsid
         <where>
             TW.del_flag = '0'
-            AND TW.f_id = #{warehouseCode}
+            <if test="warehouseCode != null  and warehouseCode != ''"> and TW.f_id = #{warehouseCode}</if>
             <if test="ownerName != null  and ownerName != ''"> and TC.f_name like concat('%', #{ownerName}, '%')</if>
             <if test="goodsName != null  and goodsName != ''"> and TG.f_name like concat('%', #{goodsName}, '%')</if>
             <if test="specifications != null  and specifications != ''"> and TG.f_packagespecs like concat('%', #{specifications}, '%')</if>
@@ -433,10 +433,10 @@
         LEFT JOIN t_warehousebills TWB ON TWG.f_originalbillno = TWB.f_billno
         <where>
             TW.del_flag = '0'
-            and TWG.f_warehouseid = #{warehouseCode}
-            AND TW.del_flag = '0'
+            <if test="warehouseCode != null  and warehouseCode != ''"> TWG.f_warehouseid = #{warehouseCode}</if>
             <if test="ownerName != null  and ownerName != ''"> and TC.f_name like concat('%', #{ownerName}, '%')</if>
             <if test="ownerCode != null  and ownerCode != ''"> and TC.f_id = #{ownerCode}</if>
+            <if test="ownerSocialIdentifier != null  and ownerSocialIdentifier != ''"> and TC.uscc = #{ownerSocialIdentifier}</if>
             <if test="goodsName != null  and goodsName != ''"> and TG.f_name like concat('%', #{goodsName}, '%')</if>
             <if test="specifications != null  and specifications != ''"> and TG.f_packagespecs like concat('%', #{specifications}, '%')</if>
             <if test="materialQuality != null  and materialQuality != ''"> and TWG.f_marks like concat('%', #{materialQuality}, '%')</if>