From 3c58510ca9d6d5178b924ac3afade5e9c745cac6 Mon Sep 17 00:00:00 2001
From: Helius <wangdoubleone@gmail.com>
Date: Wed, 20 Jan 2021 16:26:04 +0800
Subject: [PATCH] modify
---
zq-erp/src/main/resources/mybatis/mapper/hive/SysProjServicesDao.xml | 133 +++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 129 insertions(+), 4 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 d2b2a8b..f5b7550 100644
--- a/zq-erp/src/main/resources/mybatis/mapper/hive/SysProjServicesDao.xml
+++ b/zq-erp/src/main/resources/mybatis/mapper/hive/SysProjServicesDao.xml
@@ -38,6 +38,8 @@
<result property="oldShopId" column="OLD_SHOP_ID"/>
<result property="consumeTime" column="consume_time"/>
<result property="companyId" column="company_id"/>
+ <result property="comment" column="comment"/>
+ <result property="reply" column="reply"/>
<result property="beautiName" column="beautiName"/>
@@ -87,7 +89,9 @@
CHANGE_ID,
OLD_SHOP_ID,
consume_time,
- company_id
+ company_id,
+ comment,
+ reply
)
VALUES (
#{id},
@@ -122,7 +126,9 @@
#{changeId},
#{oldShopId},
#{consumeTime},
- #{companyId}
+ #{companyId},
+ #{comment},
+ #{reply}
)
</insert>
@@ -228,8 +234,18 @@
<if test="consumeTime != null ">
consume_time = #{consumeTime}
</if>
+
+ <if test="reply != null ">
+ reply = #{reply}
+ </if>
+ <if test="comment != null ">
+ comment = #{comment}
+ </if>
</set>
WHERE id=#{id}
+ </update>
+ <update id="comment">
+
</update>
<!-- 批量删除 -->
@@ -464,9 +480,11 @@
<result property="time" column="time"/>
<result property="bed" column="bed" />
<result property="vipName" column="vipName" />
+ <result property="vipId" column="vipId" />
<result property="timeLength" column="timeLength" />
<result property="status" column="status" />
<result property="createStaffId" column="createStaffId" />
+ <result property="shopName" column="shop_short_name" />
<collection property="projs" ofType="com.matrix.system.app.vo.ServiceOrderListProjVo">
<result property="projName" column="projName" />
<result property="beautyName" column="beautyName" />
@@ -485,9 +503,11 @@
a.create_staff_id createStaffId,
d.BED_NAME bed,
e.VIP_NAME vipName,
+ e.id vipId,
b.staff_id staffId,
f.su_name beautyName,
- g.proj_name projName
+ g.proj_name projName,
+ h.shop_short_name
from sys_proj_services a
left join sys_beautician_state b on a.ID=b.SERVICES_ID
left join sys_bed_state c on a.ID = c.SERVICE_ID
@@ -495,19 +515,24 @@
left join sys_vip_info e on a.VIP_ID=e.ID
left join sys_users f on f.su_id=b.STAFF_ID
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>
<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>
+ <if test="record.vipId != null and record.vipId != ''">
+ and a.vip_id = #{record.vipId}
+ </if>
<if test="record.status != null and record.status != ''">
and a.state = #{record.status}
- </if>
+ </if>
<if test="record.shopId != null">
and a.shop_id=#{record.shopId}
</if>
<if test="record.userId!=null">
and (a.create_staff_id=#{record.userId} or b.staff_id=#{record.userId})
</if>
+
</where>
<if test="pageVo !=null"><!-- 判断pageVo对象是否为空 -->
order by a.yy_time desc
@@ -542,4 +567,104 @@
</if>
</where>
</select>
+
+
+
+
+ <resultMap id="ErpServiceOrderListVoMap" type="com.matrix.system.shopXcx.api.vo.ErpServiceOrderListVo">
+ <id column="id" property="id" />
+ <result column="serviceNo" property="serviceNo"/>
+ <result property="time" column="time"/>
+ <result property="bed" column="bed" />
+ <result property="timeLength" column="timeLength" />
+ <result property="status" column="status" />
+ <result property="shopName" column="shopName" />
+ <result property="shopAddr" column="shopAddr" />
+ <result property="comment" column="comment" />
+ <result property="reply" column="reply" />
+ <collection property="projs" ofType="com.matrix.system.shopXcx.api.vo.ErpServiceOrderListProjVo">
+ <result property="projName" column="projName" />
+ <result property="beautyName" column="beautyName" />
+ <result property="imgMobile" column="imgMobile" />
+ </collection>
+ </resultMap>
+ <select id="findWxServiceOrderList" resultMap="ErpServiceOrderListVoMap">
+ select
+ a.id id,
+ a.SERVICE_NO serviceNo,
+ a.YY_TIME time,
+ a.TOTAL_TIME timeLength,
+ a.state status,
+ d.BED_NAME bed,
+ f.su_name beautyName,
+ g.proj_name projName,
+ h.shop_short_name as shopName,
+ h.shop_addr as shopAddr,
+ m.img as imgMobile
+ from sys_proj_services a
+ left join sys_beautician_state b on a.ID=b.SERVICES_ID
+ left join sys_bed_state c on a.ID = c.SERVICE_ID
+ left join sys_bed_info d on c.BED_ID=d.ID
+ left join sys_vip_info e on a.VIP_ID=e.ID
+ left join sys_users f on f.su_id=b.STAFF_ID
+ left join sys_proj_use g on b.puse_id=g.ID
+ 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>
+ <if test="vipId != null and vipId != ''">
+ and a.vip_id = #{vipId}
+ </if>
+ <if test="vipStatus != null and vipStatus != '' and vipStatus!=0 ">
+ <if test="vipStatus == 1">
+ and a.state = '待确认'
+ </if>
+ <if test="vipStatus == 2">
+ and a.state in ( '预约成功待处理' ,'需配料','配料完成','服务中')
+ </if>
+ <if test="vipStatus == 3">
+ and ( a.state in ( '服务完成' ,'服务单结束') and a.comment is null)
+ </if>
+ <if test="vipStatus == 4">
+ and a.comment is not null
+ </if>
+ <if test="vipStatus == 5">
+ and a.state = '预约取消'
+ </if>
+ </if>
+ </where>
+ order by a.yy_time desc
+ limit #{offset}, #{limit}
+ </select>
+ <select id="findWxServiceOrderById" resultMap="ErpServiceOrderListVoMap">
+ select
+ a.id id,
+ a.SERVICE_NO serviceNo,
+ a.YY_TIME time,
+ a.TOTAL_TIME timeLength,
+ a.state status,
+ a.comment,
+ a.reply,
+ d.BED_NAME bed,
+ f.su_name beautyName,
+ g.proj_name projName,
+ h.shop_short_name as shopName,
+ h.shop_addr as shopAddr,
+ m.img as imgMobile
+ from sys_proj_services a
+ left join sys_beautician_state b on a.ID=b.SERVICES_ID
+ left join sys_bed_state c on a.ID = c.SERVICE_ID
+ left join sys_bed_info d on c.BED_ID=d.ID
+ left join sys_vip_info e on a.VIP_ID=e.ID
+ left join sys_users f on f.su_id=b.STAFF_ID
+ left join sys_proj_use g on b.puse_id=g.ID
+ left join sys_shop_info h on a.SHOP_ID=h.ID
+ left join shopping_goods m on g.proj_id=m.id
+ where a.id=#{id}
+ </select>
+
+
+
</mapper>
--
Gitblit v1.9.1