From f7ea5773570beb5ad8c6efb5c1cf743294ee079b Mon Sep 17 00:00:00 2001
From: wzy <wzy19931122ai@163.com>
Date: Sun, 24 Jan 2021 14:16:04 +0800
Subject: [PATCH] modify

---
 zq-erp/src/main/resources/mybatis/mapper/hive/SysStoreInfoDao.xml |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 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 1af5845..7c421b5 100644
--- a/zq-erp/src/main/resources/mybatis/mapper/hive/SysStoreInfoDao.xml
+++ b/zq-erp/src/main/resources/mybatis/mapper/hive/SysStoreInfoDao.xml
@@ -388,6 +388,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 +405,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 +482,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}
@@ -657,6 +665,7 @@
 FROM
 	(
 	SELECT
+		b.id id,
 		b.create_time as createTime,
 		e.CODE,
 		e.NAME,
@@ -708,6 +717,7 @@
 
 	UNION ALL
 	SELECT
+		t2_b.id id,
 		t2_b.create_time,
 		t2_e.CODE,
 		t2_e.NAME,
@@ -811,6 +821,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
@@ -846,6 +859,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