From 99091a8cbb8e098575c75a7c640b568addbcc29d Mon Sep 17 00:00:00 2001
From: wzy <wzy19931122ai@163.com>
Date: Sun, 09 Oct 2022 21:41:13 +0800
Subject: [PATCH] Merge branch 'score_shop'

---
 zq-erp/src/main/resources/mybatis/mapper/hive/SysStoreInfoDao.xml |   23 +++++++++++++++++++++--
 1 files changed, 21 insertions(+), 2 deletions(-)

diff --git a/zq-erp/src/main/resources/mybatis/mapper/hive/SysStoreInfoDao.xml b/zq-erp/src/main/resources/mybatis/mapper/hive/SysStoreInfoDao.xml
index df354d5..f93a4cf 100644
--- a/zq-erp/src/main/resources/mybatis/mapper/hive/SysStoreInfoDao.xml
+++ b/zq-erp/src/main/resources/mybatis/mapper/hive/SysStoreInfoDao.xml
@@ -380,6 +380,7 @@
 		c.NAME as gs_NAME,
 		c.UNIT as gs_UNIT,
 		c.good_type as gs_good_type,
+		c.measure as gs_measure,
 		c.GOODS_SORT_ID as gs_GOODS_SORT_ID,
 		c.SUPPLIER_ID as gs_SUPPLIER_ID,
 		(select TYPE_NAME from sys_goods_type t where t.id=c.GOODS_SORT_ID) gs_goodsSortName,
@@ -388,6 +389,7 @@
 		c.volume as gs_volume,
 		c.price as gs_price,
 		c.wholesale as gs_wholesale,
+		c.img as gs_img,
 		a.shop_id,
 		a.company_id
 		from
@@ -404,6 +406,10 @@
 			</if>
 			<if test="record.batch != null and record.batch !='' ">
 				and batch = #{record.batch}
+			</if>
+
+			<if test="record.queryKey != null and record.queryKey !='' ">
+				and (instr(c.name,#{record.queryKey}) or instr(c.goods_no, #{record.queryKey}) or instr(c.zjm, #{record.queryKey}))
 			</if>
 			<if test="record.storeId != null and record.storeId !='' ">
 				and STORE_ID = #{record.storeId}
@@ -477,6 +483,9 @@
 			</if>
 			<if test="record.batch != null and record.batch !='' ">
 				and batch = #{record.batch}
+			</if>
+			<if test="record.queryKey != null and record.queryKey !='' ">
+				and (instr(c.name,#{record.queryKey}) or instr(c.goods_no, #{record.queryKey}) or instr(c.zjm, #{record.queryKey}))
 			</if>
 			<if test="record.storeId != null and record.storeId !='' ">
 				and STORE_ID = #{record.storeId}
@@ -670,7 +679,9 @@
 		b.remark,
 		b.TYPE AS orderType ,
 		c.su_name as userName,
-		d.SHOP_NAME as shopName
+		d.SHOP_NAME as shopName,
+		b.SERVICE_ID as serviceId,
+		b.ORDER_ID as orderId
 	FROM
 		sys_out_store_item a
 		LEFT JOIN sys_out_store b ON a.OUT_STORE_ID = b.id
@@ -722,7 +733,9 @@
 		t2_b.remark,
 		t2_b.instore_type,
 		t2_c.su_name,
-		t2_d.SHOP_NAME
+		t2_d.SHOP_NAME,
+		'' as serviceId,
+		'' as orderId
 	FROM
 		sys_instore_detail t2_a
 		LEFT JOIN sys_instore_info t2_b ON t2_a.INSTORE_ID = t2_b.id
@@ -813,6 +826,9 @@
 			<if test=" record.endTime!=null  ">
 				<![CDATA[ 	and #{record.endTime} >=b.create_time]]>
 			</if>
+			<if test="record.companyId != null and record.companyId !='' ">
+				and	b.company_id = #{record.companyId}
+			</if>
 		</where>
 		UNION ALL
 		SELECT
@@ -848,6 +864,9 @@
 			<if test=" record.endTime!=null   ">
 				<![CDATA[ 	and #{record.endTime} >= t2_b.create_time  ]]>
 			</if>
+			<if test="record.companyId != null and record.companyId !='' ">
+				and	t2_b.company_id = #{record.companyId}
+			</if>
 		</where>
 		) t
 

--
Gitblit v1.9.1