From 7207e75881349b2a4c8abbb67b27c4a07381f4c3 Mon Sep 17 00:00:00 2001
From: java110 <928255095@qq.com>
Date: 星期二, 14 七月 2020 19:09:54 +0800
Subject: [PATCH] 优化采购申请功能

---
 java110-db/src/main/resources/mapper/store/PurchaseApplyServiceDaoImplMapper.xml |   14 ++++++++++++--
 1 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/java110-db/src/main/resources/mapper/store/PurchaseApplyServiceDaoImplMapper.xml b/java110-db/src/main/resources/mapper/store/PurchaseApplyServiceDaoImplMapper.xml
index 9fe82cd..2b62071 100644
--- a/java110-db/src/main/resources/mapper/store/PurchaseApplyServiceDaoImplMapper.xml
+++ b/java110-db/src/main/resources/mapper/store/PurchaseApplyServiceDaoImplMapper.xml
@@ -191,7 +191,8 @@
             t.end_user_name,
             t.end_user_tel,
             t.end_user_name endUserName,
-            t.end_user_tel endUserTel
+            t.end_user_tel endUserTel,
+            t.description
         from purchase_apply t
         inner join t_dict d on t.state = d.status_cd and d.table_name = 'purchase_apply' and d.table_columns = 'state'
         where 1 =1
@@ -203,6 +204,14 @@
         </if>
         <if test="applyOrderId !=null and applyOrderId != ''">
             and t.apply_order_id= #{applyOrderId}
+        </if>
+
+        <if test="applyOrderIds !=null ">
+            and t.apply_order_id in
+            <foreach open="(" close=")"
+                     separator="," collection="applyOrderIds" item="item">
+                #{item}
+            </foreach>
         </if>
         <if test="userName !=null and userName != ''">
             and t.user_name like concat('%',#{userName},'%')
@@ -292,8 +301,9 @@
             r.res_name resName,r.res_code resCode,
             r.price,r.stock
         from
-            purchase_apply_detail p inner join resource_store r on p.res_id = r.res_id
+            purchase_apply_detail p inner join resource_store r on p.res_id = r.res_id and r.status_cd = '0'
         where 1=1
+        and p.status_cd = '0'
         <if test="applyOrderIds !=null">
             and p.apply_order_id in
             <foreach collection="applyOrderIds" item="item" open="(" close=")" separator=",">

--
Gitblit v1.8.0