From b0bc1105028f570156fa42fc116d1b0417222730 Mon Sep 17 00:00:00 2001
From: jyy <jyy>
Date: Thu, 22 Jul 2021 17:18:11 +0800
Subject: [PATCH] 1、部分导出功能

---
 zq-erp/src/main/resources/mybatis/mapper/hive/SysProjServicesDao.xml |   24 +++++++++++++++---------
 1 files changed, 15 insertions(+), 9 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 01462d3..e6ed5bb 100644
--- a/zq-erp/src/main/resources/mybatis/mapper/hive/SysProjServicesDao.xml
+++ b/zq-erp/src/main/resources/mybatis/mapper/hive/SysProjServicesDao.xml
@@ -140,7 +140,7 @@
 
 	<!--  根据id更新 部分更新   -->
 	<update id="updateOrderTime">
-		UPDATE sys_proj_services set CREATE_TIME=#{createTime} WHERE id=#{id} 
+		UPDATE sys_proj_services set consume_time=#{consumeTime} WHERE id=#{id}
 	</update>
 
 	<!-- 设置服务单为已通知 -->
@@ -246,20 +246,20 @@
 					CHANGE_ID = #{changeId},
 				</if>
 				<if test="oldShopId != null and oldShopId !='' ">
-					OLD_SHOP_ID = #{oldShopId}
+					OLD_SHOP_ID = #{oldShopId},
 				</if>
 				<if test="consumeTime != null  ">
-					consume_time = #{consumeTime}
+					consume_time = #{consumeTime},
 				</if>
 
 				<if test="reply != null  ">
-					reply = #{reply}
+					reply = #{reply},
 				</if>
 				<if test="comment != null  ">
-					comment = #{comment}
+					comment = #{comment},
 				</if>
 				<if test="overtimeNotice != null  ">
-					overtime_notice = #{overtimeNotice}
+					overtime_notice = #{overtimeNotice},
 				</if>
 		</set>
 		WHERE id=#{id} 
@@ -328,9 +328,7 @@
 			<if test="record.vipId != null and record.vipId !='' ">
 				and a.VIP_ID   = #{record.vipId}
 			</if>
-			<if test="record.isOverTime != null  and record.serviceNo !=''   ">
-				and a.IS_OVERTIME  > #{record.isOverTime}
-			</if>
+
 			<if test="record.serviceNo != null and record.serviceNo !='' ">
 				and a.SERVICE_NO  like CONCAT('%',#{record.serviceNo},'%')
 			</if>
@@ -549,6 +547,7 @@
 		left join sys_proj_use g on b.puse_id=g.ID
 		left join sys_shop_info h on a.SHOP_ID=h.ID
 		<where>
+			and a.company_id=#{record.companyId}
 			<if test="record.queryKey != null and record.queryKey != ''">
 				and (instr(a.SERVICE_NO, #{record.queryKey}) or instr(e.phone, #{record.queryKey}) or instr(e.vip_name, #{record.queryKey}) )
 			</if>
@@ -585,6 +584,7 @@
 		left join sys_users f on f.su_id=b.STAFF_ID
 		left join sys_proj_use g on b.puse_id=g.ID
 		<where>
+			and a.company_id=#{record.companyId}
 			<if test="record.queryKey != null and record.queryKey != ''">
 				and (instr(a.SERVICE_NO, #{record.queryKey}) or instr(e.phone, #{record.queryKey}) or instr(e.vip_name, #{record.queryKey}) )
 			</if>
@@ -698,4 +698,10 @@
 	</select>
 
 
+	<select id="selectProjServicesByOrderItemId" resultMap="SysProjServicesMap">
+		select a.* from sys_proj_services a
+		  inner join sys_beautician_state b on a.id=b.SERVICES_ID
+		  inner join sys_proj_use c on c.id=b.puse_id
+		where ORDER_ITEM_ID=#{itemId} and a.STATE!='预约取消'
+	</select>
 </mapper>

--
Gitblit v1.9.1