From 15c8f00ab3a1e3d2d96b56bae0ec11efedd60231 Mon Sep 17 00:00:00 2001
From: 18516761980 <4761516tqsxp>
Date: 星期三, 29 九月 2021 11:14:15 +0800
Subject: [PATCH] #

---
 src/main/resources/mapper/OutStockMapper.xml |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/src/main/resources/mapper/OutStockMapper.xml b/src/main/resources/mapper/OutStockMapper.xml
index 183ac69..c4b6c79 100644
--- a/src/main/resources/mapper/OutStockMapper.xml
+++ b/src/main/resources/mapper/OutStockMapper.xml
@@ -61,7 +61,7 @@
         b.FAdd,b.Fflag_finish, a.Fname, a.Fmodel
         from OutStockBillEntry a left join OutStockBill b on a.FInterID = b.FInterID
         where 1=1
-        and b.Fflag_finish != 1
+        and b.Fflag_finish != 1 and a.FQty > a.FAmount
         <if test="FSourceBillNo!=null and FSourceBillNo!='' ">
             and a.FSourceBillNo = #{FSourceBillNo}
         </if>
@@ -77,6 +77,13 @@
         from OutStockBillEntry a
         left join OutStockBill b on a.FInterID = b.FInterID
         where 1=1
+        and b.Fflag_finish != 1 and a.FQty > a.FAmount
+        <if test="FSourceBillNo!=null and FSourceBillNo!='' ">
+            and a.FSourceBillNo = #{FSourceBillNo}
+        </if>
+        <if test="FBillNo != null and FBillNo != ''">
+            and b.FBillNo = #{FBillNo}
+        </if>
     </select>
 
     <select id="queryMatnrWithBillNo" resultMap="OutStockResultMap">

--
Gitblit v1.9.1