From bd80bef8c6ea2763993ff3ef065ee474b11222a4 Mon Sep 17 00:00:00 2001
From: 18516761980 <56479841@qq.com>
Date: 星期二, 02 八月 2022 09:17:49 +0800
Subject: [PATCH] #

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

diff --git a/src/main/resources/mapper/OutStockMapper.xml b/src/main/resources/mapper/OutStockMapper.xml
index c4b6c79..7603842 100644
--- a/src/main/resources/mapper/OutStockMapper.xml
+++ b/src/main/resources/mapper/OutStockMapper.xml
@@ -91,7 +91,7 @@
         a.FOrderInterID,a.FAuxQty,a.FCommitQty,a.FAuxPrice,a.FDate,a.FNote, a.Fnumber, a.FSourceBillNo, b.FBillNo,
         b.FAdd
         from OutStockBillEntry a left join OutStockBill b on a.FInterID = b.FInterID
-        where b.FBillNo = #{FBillNo}) t where 1 = 1
+        where b.FBillNo = #{FBillNo} and b.Fflag_finish != 1 and a.FQty > a.FAmount) t where 1 = 1
     </select>
 
     <select id="queryMatWithLoc" resultMap="BaseResultMap">
@@ -100,8 +100,8 @@
         and b.loc_sts = 'F'
         and a.matnr = #{matnr}
         order by
-        DATEPART(yyyy,a.modi_time),DATEPART(mm,a.modi_time),DATEPART(dd,a.modi_time)
-        desc,
+        DATEPART(yyyy,a.appe_time),DATEPART(mm,a.appe_time),DATEPART(dd,a.appe_time)
+        ASC,
         case
         when (left(a.loc_no, 2) = '01') then 0
         when (left(a.loc_no, 2) = '02') then 1

--
Gitblit v1.9.1