From c423224dbe37ea69c1a36c696f85490343e68c4c Mon Sep 17 00:00:00 2001
From: 姜友瑶 <935090232@qq.com>
Date: Tue, 09 Aug 2022 09:11:51 +0800
Subject: [PATCH] Merge branch 'developer'

---
 zq-erp/src/main/resources/mybatis/mapper/hive/SysProjServicesDao.xml |   50 +++++++++++++++++++++++++++++++++++++++++++++++---
 1 files changed, 47 insertions(+), 3 deletions(-)

diff --git a/zq-erp/src/main/resources/mybatis/mapper/hive/SysProjServicesDao.xml b/zq-erp/src/main/resources/mybatis/mapper/hive/SysProjServicesDao.xml
index 558112d..30b5c74 100644
--- a/zq-erp/src/main/resources/mybatis/mapper/hive/SysProjServicesDao.xml
+++ b/zq-erp/src/main/resources/mybatis/mapper/hive/SysProjServicesDao.xml
@@ -41,7 +41,8 @@
 			<result property="comment" column="comment"/>
 			<result property="reply" column="reply"/>
 			<result property="overtimeNotice" column="overtime_notice"/>
-
+			<result property="cashierId" column="cashier_id"/>
+			<result property="cashierName" column="cashierName"/>
 
 			
 			<result property="beautiName" column="beautiName"/>
@@ -50,6 +51,7 @@
 			<result property="createStaffName" column="createStaffName"/>
 			<result property="bedName" column="bedName"/>
 			<result property="vipName" column="VIP_Name"/>
+
 
 			<association property="vipInfo"  resultMap="com.matrix.system.hive.dao.SysVipInfoDao.SysVipInfoMapSimple" ></association>
 
@@ -95,7 +97,8 @@
 			company_id,
 			comment,
 			reply,
-			overtime_notice
+			overtime_notice,
+			cashier_id
 		)
 	VALUES (
 			#{id},
@@ -133,7 +136,8 @@
 			#{companyId},
 			#{comment},
 			#{reply},
-			#{overtimeNotice}
+			#{overtimeNotice},
+			#{cashierId}
 	)
 		
 	</insert>
@@ -265,6 +269,9 @@
 				<if test="overtimeNotice != null  ">
 					overtime_notice = #{overtimeNotice},
 				</if>
+				<if test="cashierId != null  ">
+					cashier_id = #{cashierId},
+				</if>
 		</set>
 		WHERE id=#{id} 
 	</update>
@@ -294,6 +301,7 @@
 		(select  su_name from  sys_users f where  a.CREATE_STAFF_ID=f.su_id ) as  createStaffName,
 		(select  su_name from  sys_users j where  a.BEAUTICIAN_ID=j.su_id ) as  beautiName,
 		(select  su_name from  sys_users k where  a.devision_id=k.su_id ) as plsName,
+		(select  su_name from  sys_users l where  a.cashier_id=l.su_id ) as cashierName,
 		(select  shop_name from  sys_shop_info h where  a.SHOP_ID=h.ID ) as shopName,
 		(select  bed_name from  sys_bed_info i where  a.BED_ID=i.ID ) as bedName
 		FROM sys_proj_services a
@@ -325,6 +333,9 @@
 			</if>
 			<if test="record.state != null and record.state !='' ">
 				and a.STATE  = #{record.state}
+			</if>
+			<if test="record.cashierId != null and record.cashierId !='' ">
+				and a.cashier_id = #{record.cashierId}
 			</if>
 			<if test="record.shopId != null and record.shopId !='' ">
 				AND a.SHOP_ID = #{record.shopId}
@@ -387,6 +398,9 @@
 				and a.STATE  = #{record.state}
 			</if>
 
+			<if test="record.cashierId != null and record.cashierId !='' ">
+				and a.cashier_id = #{record.cashierId}
+			</if>
 			<if test="(record.companyId!=null and record.companyId!='') ">
 				and a.company_id = #{record.companyId}
 			</if>
@@ -423,6 +437,7 @@
 		(select  su_name from  sys_users f where  a.CREATE_STAFF_ID=f.su_id ) as  createStaffName,
 		(select  su_name from  sys_users j where  a.BEAUTICIAN_ID=j.su_id ) as  beautiName,
 		(select  su_name from  sys_users k where  a.devision_id=k.su_id ) as plsName,
+		(select  su_name from  sys_users l where  a.cashier_id=l.su_id ) as cashierName,
 		(select  shop_name from  sys_shop_info h where  a.SHOP_ID=h.ID ) as shopName,
 		(select  bed_name from  sys_bed_info i where  a.BED_ID=i.ID ) as bedName
 		FROM sys_proj_services a
@@ -430,6 +445,30 @@
 		left join sys_beautician_state c on a.id=c.SERVICES_ID
 		where  a.ID=#{id}
 	</select>
+
+	<!-- 根据id查询-->
+	<select id="selectByIds" resultMap="SysProjServicesMap">
+		select	distinct
+			a.*,
+			b.PHONE ,
+			b.VIP_Name ,
+			b.VIP_NO,
+			(select  su_name from  sys_users f where  a.CREATE_STAFF_ID=f.su_id ) as  createStaffName,
+			(select  su_name from  sys_users j where  a.BEAUTICIAN_ID=j.su_id ) as  beautiName,
+			(select  su_name from  sys_users k where  a.devision_id=k.su_id ) as plsName,
+			(select  su_name from  sys_users l where  a.cashier_id=l.su_id ) as cashierName,
+			(select  shop_name from  sys_shop_info h where  a.SHOP_ID=h.ID ) as shopName,
+			(select  bed_name from  sys_bed_info i where  a.BED_ID=i.ID ) as bedName
+		FROM sys_proj_services a
+				 LEFT JOIN sys_vip_info b on b.ID=a.VIP_ID
+				 left join sys_beautician_state c on a.id=c.SERVICES_ID
+		where  a.ID in
+		<foreach collection="list" index="index" item="item" open="("
+				 separator="," close=")">
+			#{item}
+		</foreach>
+	</select>
+
 
 	<select id="selectNeedNoticeService" resultMap="SysProjServicesMap">
 	select
@@ -455,6 +494,7 @@
 		(select  su_name from  sys_users f where  a.CREATE_STAFF_ID=f.su_id ) as  createStaffName,
 		(select  su_name from  sys_users j where  a.BEAUTICIAN_ID=j.su_id ) as  beautiName,
 		(select  su_name from  sys_users k where  a.devision_id=k.su_id ) as plsName,
+		(select  su_name from  sys_users l where  a.cashier_id=l.su_id ) as cashierName,
 		(select  shop_name from  sys_shop_info h where  a.SHOP_ID=h.ID ) as shopName,
 		(select  bed_name from  sys_bed_info i where  a.BED_ID=i.ID ) as bedName
 		FROM sys_proj_services a
@@ -482,6 +522,9 @@
 			</if>
 			<if test="record.state != null and record.state !='' ">
 				and a.STATE  = #{record.state}
+			</if>
+			<if test="record.cashierId != null and record.cashierId !='' ">
+				and a.cashier_id = #{record.cashierId}
 			</if>
 			<if test="record.shopId != null and record.shopId !='' ">
 				AND a.SHOP_ID = #{record.shopId}
@@ -647,6 +690,7 @@
 		left join sys_shop_info h on a.SHOP_ID=h.ID
 		left join shopping_goods m on g.proj_id=m.id
 		<where>
+
 			<if test="queryKey != null and queryKey != ''">
 				and instr(a.SERVICE_NO, #{queryKey})
 			</if>

--
Gitblit v1.9.1