zhangyuewww 3 rokov pred
rodič
commit
4fa639de35

+ 8 - 4
winsea-haixin-plugin-yiliangyiyun/src/main/resources/mapper/WarehouseInOutInfoMapper.xml

@@ -10,7 +10,6 @@
         left join warehouse_base_info wbi on wbi.warehouse_name = w.warehouse_name
         WHERE
         w.delete_flag = '0'
-        and wbi.person_phone = ${phone}
         <if test="searchType != null and searchType != ''">
             <if test="searchType == 2">
                 AND w.in_out_flag = '1'
@@ -19,11 +18,14 @@
                 AND w.in_out_flag = '2'
             </if>
         </if>
-        <if test="pcFlag != null and pcFlag != ''">
+        <if test="pcFlag != null and pcFlag != ''and pcFlag == '1'">
             AND w.base_id = #{baseId}
             and w.position_id = #{positionId}
             and w.status_flag = '3'
         </if>
+        <if test="pcFlag != null and pcFlag != ''and pcFlag == '0'">
+            and wbi.person_phone = ${phone}
+        </if>
         <if test="statusFlag != null and statusFlag != ''">
             AND w.status_flag = #{statusFlag}
         </if>
@@ -68,7 +70,6 @@
         left join warehouse_base_info wbi on wbi.warehouse_name = w.warehouse_name
         WHERE
         w.delete_flag = '0'
-        and wbi.person_phone = ${phone}
         <if test="searchType != null and searchType != ''">
             <if test="searchType == 2">
                 AND w.in_out_flag = '1'
@@ -77,11 +78,14 @@
                 AND w.in_out_flag = '2'
             </if>
         </if>
-        <if test="pcFlag != null and pcFlag != ''">
+        <if test="pcFlag != null and pcFlag != ''and pcFlag == '1'">
             AND w.base_id = #{baseId}
             and w.position_id = #{positionId}
             and w.status_flag = '3'
         </if>
+        <if test="pcFlag != null and pcFlag != ''and pcFlag == '0'">
+            and wbi.person_phone = ${phone}
+        </if>
         <if test="statusFlag != null and statusFlag != ''">
             AND w.status_flag = #{statusFlag}
         </if>