|
@@ -323,26 +323,402 @@
|
|
|
update_time = #{updateTime,jdbcType=TIMESTAMP}
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
</update>
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-<!-- <select id="selectByQuery" resultType="cn.com.ty.lift.ud.chat.mapper.entity.LiftCaseEntity" > -->
|
|
|
-<!-- SELECT t.*,users.`name` as name,users.avatar_url as avatarUrl,brand.`name` as brandName from lift_case as t -->
|
|
|
-<!-- LEFT JOIN user_info as users ON t.create_user_id = users.user_id -->
|
|
|
-<!-- LEFT JOIN lift_brand as brand ON brand.id = t.brand_id -->
|
|
|
-<!-- <where> -->
|
|
|
-<!-- ${ew.sqlSegment} -->
|
|
|
-<!-- </where> -->
|
|
|
-<!-- limit #{page.pageIndex},#{page.pageSize} -->
|
|
|
-<!-- </select> -->
|
|
|
-<!-- <select id="countByQuery" resultType="java.lang.Integer"> -->
|
|
|
-<!-- SELECT count(0)from lift_case as t -->
|
|
|
-<!-- LEFT JOIN user_info as users on t.create_user_id = users.user_id -->
|
|
|
-<!-- <where> -->
|
|
|
-<!-- ${ew.sqlSegment} -->
|
|
|
-<!-- </where> -->
|
|
|
-<!-- </select> -->
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
+ <!-- 查询用户全部诊单 -->
|
|
|
+ <select id="queryUserAll" resultType="cn.com.ty.lift.ud.chat.mapper.entity.LiftCaseEntity">
|
|
|
+ SELECT customer.`name` as customerName ,t.*,brand.`name` as brandName,
|
|
|
+ que.examine_flag examineFlag,que.not_examine_reason notExamineReason
|
|
|
+ from lift_case as t
|
|
|
+ LEFT JOIN user_info AS ui ON t.create_user_id = ui.user_id
|
|
|
+ LEFT JOIN user_info AS ci ON t.charger_id = ci.user_id
|
|
|
+ LEFT JOIN user_info as customer ON t.customer_service_id = customer.user_id
|
|
|
+ LEFT JOIN lift_brand as brand ON brand.id = t.brand_id
|
|
|
+ left join question_bank que on que.lift_case_id = t.id
|
|
|
+ where 1=1 and t.create_user_id=#{query.createUserId}
|
|
|
+ ORDER BY t.create_time DESC
|
|
|
+ limit #{query.pageIndex},#{query.pageSize}
|
|
|
+ </select>
|
|
|
+ <select id="queryUserAllCount" resultType="java.lang.Integer">
|
|
|
+ SELECT count(0)
|
|
|
+ from lift_case as t
|
|
|
+ LEFT JOIN user_info AS ui ON t.create_user_id = ui.user_id
|
|
|
+ LEFT JOIN user_info AS ci ON t.charger_id = ci.user_id
|
|
|
+ LEFT JOIN user_info as customer ON t.customer_service_id = customer.user_id
|
|
|
+ LEFT JOIN lift_brand as brand ON brand.id = t.brand_id
|
|
|
+ left join question_bank que on que.lift_case_id = t.id
|
|
|
+ where 1=1 and t.create_user_id=#{query.createUserId}
|
|
|
+ </select>
|
|
|
+
|
|
|
+
|
|
|
+ <!-- 查询专家全部诊单 -->
|
|
|
+ <select id="queryChargeAll" resultType="cn.com.ty.lift.ud.chat.mapper.entity.LiftCaseEntity">
|
|
|
+ SELECT customer.`name` as customerName ,t.*,brand.`name` as brandName,
|
|
|
+ que.examine_flag examineFlag,que.not_examine_reason notExamineReason
|
|
|
+ from lift_case as t
|
|
|
+ LEFT JOIN user_info AS ui ON t.create_user_id = ui.user_id
|
|
|
+ LEFT JOIN user_info AS ci ON t.charger_id = ci.user_id
|
|
|
+ LEFT JOIN user_info as customer ON t.customer_service_id = customer.user_id
|
|
|
+ LEFT JOIN lift_brand as brand ON brand.id = t.brand_id
|
|
|
+ left join question_bank que on que.lift_case_id = t.id
|
|
|
+ where 1=1 and t.charger_id=#{query.chargerId}
|
|
|
+ ORDER BY t.create_time DESC
|
|
|
+ limit #{query.pageIndex},#{query.pageSize}
|
|
|
+ </select>
|
|
|
+ <select id="queryChargeAllCount" resultType="java.lang.Integer">
|
|
|
+ SELECT count(0)
|
|
|
+ from lift_case as t
|
|
|
+ LEFT JOIN user_info AS ui ON t.create_user_id = ui.user_id
|
|
|
+ LEFT JOIN user_info AS ci ON t.charger_id = ci.user_id
|
|
|
+ LEFT JOIN user_info as customer ON t.customer_service_id = customer.user_id
|
|
|
+ LEFT JOIN lift_brand as brand ON brand.id = t.brand_id
|
|
|
+ left join question_bank que on que.lift_case_id = t.id
|
|
|
+ where 1=1 and t.charger_id=#{query.chargerId}
|
|
|
+ </select>
|
|
|
+
|
|
|
+
|
|
|
+ <!-- 查询用户代付款诊单 -->
|
|
|
+ <select id="queryToPay" resultType="cn.com.ty.lift.ud.chat.mapper.entity.LiftCaseEntity">
|
|
|
+ select * from (
|
|
|
+ SELECT customer.`name` as customerName ,t.*,brand.`name` as brandName,
|
|
|
+ que.examine_flag examineFlag,que.not_examine_reason notExamineReason
|
|
|
+ from lift_case as t
|
|
|
+ LEFT JOIN user_info AS ui ON t.create_user_id = ui.user_id
|
|
|
+ LEFT JOIN user_info AS ci ON t.charger_id = ci.user_id
|
|
|
+ LEFT JOIN user_info as customer ON t.customer_service_id = customer.user_id
|
|
|
+ LEFT JOIN lift_brand as brand ON brand.id = t.brand_id
|
|
|
+ left join question_bank que on que.lift_case_id = t.id
|
|
|
+ where 1=1 and t.create_user_id=#{query.createUserId} and t.data_table = 1 and t.statuz = 0
|
|
|
+ union
|
|
|
+ SELECT customer.`name` as customerName ,t.*,brand.`name` as brandName,
|
|
|
+ que.examine_flag examineFlag,que.not_examine_reason notExamineReason
|
|
|
+ from lift_case as t
|
|
|
+ LEFT JOIN user_info AS ui ON t.create_user_id = ui.user_id
|
|
|
+ LEFT JOIN user_info AS ci ON t.charger_id = ci.user_id
|
|
|
+ LEFT JOIN user_info as customer ON t.customer_service_id = customer.user_id
|
|
|
+ LEFT JOIN lift_brand as brand ON brand.id = t.brand_id
|
|
|
+ left join question_bank que on que.lift_case_id = t.id
|
|
|
+ where 1=1 and t.create_user_id=#{query.createUserId} and t.data_table = 2 and t.statuz = 2
|
|
|
+ )temp
|
|
|
+ ORDER BY temp.create_time DESC
|
|
|
+ limit #{query.pageIndex},#{query.pageSize}
|
|
|
+ </select>
|
|
|
+ <select id="queryToPayCount" resultType="java.lang.Integer">
|
|
|
+ select count(0) from (
|
|
|
+ SELECT customer.`name` as customerName ,t.*,brand.`name` as brandName,
|
|
|
+ que.examine_flag examineFlag,que.not_examine_reason notExamineReason
|
|
|
+ from lift_case as t
|
|
|
+ LEFT JOIN user_info AS ui ON t.create_user_id = ui.user_id
|
|
|
+ LEFT JOIN user_info AS ci ON t.charger_id = ci.user_id
|
|
|
+ LEFT JOIN user_info as customer ON t.customer_service_id = customer.user_id
|
|
|
+ LEFT JOIN lift_brand as brand ON brand.id = t.brand_id
|
|
|
+ left join question_bank que on que.lift_case_id = t.id
|
|
|
+ where 1=1 and t.create_user_id=#{query.createUserId} and t.data_table = 1 and t.statuz = 0
|
|
|
+ union
|
|
|
+ SELECT customer.`name` as customerName ,t.*,brand.`name` as brandName,
|
|
|
+ que.examine_flag examineFlag,que.not_examine_reason notExamineReason
|
|
|
+ from lift_case as t
|
|
|
+ LEFT JOIN user_info AS ui ON t.create_user_id = ui.user_id
|
|
|
+ LEFT JOIN user_info AS ci ON t.charger_id = ci.user_id
|
|
|
+ LEFT JOIN user_info as customer ON t.customer_service_id = customer.user_id
|
|
|
+ LEFT JOIN lift_brand as brand ON brand.id = t.brand_id
|
|
|
+ left join question_bank que on que.lift_case_id = t.id
|
|
|
+ where 1=1 and t.create_user_id=#{query.createUserId} and t.data_table = 2 and t.statuz = 2
|
|
|
+ )temp
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <!-- 查询用户待确认诊单 -->
|
|
|
+ <select id="queryUserToSure" resultType="cn.com.ty.lift.ud.chat.mapper.entity.LiftCaseEntity">
|
|
|
+ select * from (
|
|
|
+ SELECT customer.`name` as customerName ,t.*,brand.`name` as brandName,
|
|
|
+ que.examine_flag examineFlag,que.not_examine_reason notExamineReason
|
|
|
+ from lift_case as t
|
|
|
+ LEFT JOIN user_info AS ui ON t.create_user_id = ui.user_id
|
|
|
+ LEFT JOIN user_info AS ci ON t.charger_id = ci.user_id
|
|
|
+ LEFT JOIN user_info as customer ON t.customer_service_id = customer.user_id
|
|
|
+ LEFT JOIN lift_brand as brand ON brand.id = t.brand_id
|
|
|
+ left join question_bank que on que.lift_case_id = t.id
|
|
|
+ where 1=1 and t.create_user_id=#{query.createUserId} and t.data_table = 1 and FIND_IN_SET(t.statuz,'3,4')
|
|
|
+ union
|
|
|
+ SELECT customer.`name` as customerName ,t.*,brand.`name` as brandName,
|
|
|
+ que.examine_flag examineFlag,que.not_examine_reason notExamineReason
|
|
|
+ from lift_case as t
|
|
|
+ LEFT JOIN user_info AS ui ON t.create_user_id = ui.user_id
|
|
|
+ LEFT JOIN user_info AS ci ON t.charger_id = ci.user_id
|
|
|
+ LEFT JOIN user_info as customer ON t.customer_service_id = customer.user_id
|
|
|
+ LEFT JOIN lift_brand as brand ON brand.id = t.brand_id
|
|
|
+ left join question_bank que on que.lift_case_id = t.id
|
|
|
+ where 1=1 and t.create_user_id=#{query.createUserId} and t.data_table = 2 and FIND_IN_SET(t.statuz,'3,4')
|
|
|
+ )temp
|
|
|
+ ORDER BY temp.create_time DESC
|
|
|
+ limit #{query.pageIndex},#{query.pageSize}
|
|
|
+ </select>
|
|
|
+ <select id="queryUserToSureCount" resultType="java.lang.Integer">
|
|
|
+ select count(0) from (
|
|
|
+ SELECT customer.`name` as customerName ,t.*,brand.`name` as brandName,
|
|
|
+ que.examine_flag examineFlag,que.not_examine_reason notExamineReason
|
|
|
+ from lift_case as t
|
|
|
+ LEFT JOIN user_info AS ui ON t.create_user_id = ui.user_id
|
|
|
+ LEFT JOIN user_info AS ci ON t.charger_id = ci.user_id
|
|
|
+ LEFT JOIN user_info as customer ON t.customer_service_id = customer.user_id
|
|
|
+ LEFT JOIN lift_brand as brand ON brand.id = t.brand_id
|
|
|
+ left join question_bank que on que.lift_case_id = t.id
|
|
|
+ where 1=1 and t.create_user_id=#{query.createUserId} and t.data_table = 1 and FIND_IN_SET(t.statuz,'3,4')
|
|
|
+ union
|
|
|
+ SELECT customer.`name` as customerName ,t.*,brand.`name` as brandName,
|
|
|
+ que.examine_flag examineFlag,que.not_examine_reason notExamineReason
|
|
|
+ from lift_case as t
|
|
|
+ LEFT JOIN user_info AS ui ON t.create_user_id = ui.user_id
|
|
|
+ LEFT JOIN user_info AS ci ON t.charger_id = ci.user_id
|
|
|
+ LEFT JOIN user_info as customer ON t.customer_service_id = customer.user_id
|
|
|
+ LEFT JOIN lift_brand as brand ON brand.id = t.brand_id
|
|
|
+ left join question_bank que on que.lift_case_id = t.id
|
|
|
+ where 1=1 and t.create_user_id=#{query.createUserId} and t.data_table = 2 and FIND_IN_SET(t.statuz,'3,4')
|
|
|
+ )temp
|
|
|
+ </select>
|
|
|
+ <!-- 查询用户待评价诊单 -->
|
|
|
+ <select id="queryToEva" resultType="cn.com.ty.lift.ud.chat.mapper.entity.LiftCaseEntity">
|
|
|
+ select * from (
|
|
|
+ SELECT customer.`name` as customerName ,t.*,brand.`name` as brandName,
|
|
|
+ que.examine_flag examineFlag,que.not_examine_reason notExamineReason
|
|
|
+ from lift_case as t
|
|
|
+ LEFT JOIN user_info AS ui ON t.create_user_id = ui.user_id
|
|
|
+ LEFT JOIN user_info AS ci ON t.charger_id = ci.user_id
|
|
|
+ LEFT JOIN user_info as customer ON t.customer_service_id = customer.user_id
|
|
|
+ LEFT JOIN lift_brand as brand ON brand.id = t.brand_id
|
|
|
+ left join question_bank que on que.lift_case_id = t.id
|
|
|
+ where 1=1 and t.create_user_id=#{query.createUserId} and t.data_table = 1 and FIND_IN_SET(t.statuz,'5')
|
|
|
+ union
|
|
|
+ SELECT customer.`name` as customerName ,t.*,brand.`name` as brandName,
|
|
|
+ que.examine_flag examineFlag,que.not_examine_reason notExamineReason
|
|
|
+ from lift_case as t
|
|
|
+ LEFT JOIN user_info AS ui ON t.create_user_id = ui.user_id
|
|
|
+ LEFT JOIN user_info AS ci ON t.charger_id = ci.user_id
|
|
|
+ LEFT JOIN user_info as customer ON t.customer_service_id = customer.user_id
|
|
|
+ LEFT JOIN lift_brand as brand ON brand.id = t.brand_id
|
|
|
+ left join question_bank que on que.lift_case_id = t.id
|
|
|
+ where 1=1 and t.create_user_id=#{query.createUserId} and t.data_table = 2 and FIND_IN_SET(t.statuz,'5')
|
|
|
+ )temp
|
|
|
+ ORDER BY temp.create_time DESC
|
|
|
+ limit #{query.pageIndex},#{query.pageSize}
|
|
|
+ </select>
|
|
|
+ <select id="queryToEvaCount" resultType="java.lang.Integer">
|
|
|
+ select count(0) from (
|
|
|
+ SELECT customer.`name` as customerName ,t.*,brand.`name` as brandName,
|
|
|
+ que.examine_flag examineFlag,que.not_examine_reason notExamineReason
|
|
|
+ from lift_case as t
|
|
|
+ LEFT JOIN user_info AS ui ON t.create_user_id = ui.user_id
|
|
|
+ LEFT JOIN user_info AS ci ON t.charger_id = ci.user_id
|
|
|
+ LEFT JOIN user_info as customer ON t.customer_service_id = customer.user_id
|
|
|
+ LEFT JOIN lift_brand as brand ON brand.id = t.brand_id
|
|
|
+ left join question_bank que on que.lift_case_id = t.id
|
|
|
+ where 1=1 and t.create_user_id=#{query.createUserId} and t.data_table = 1 and FIND_IN_SET(t.statuz,'5')
|
|
|
+ union
|
|
|
+ SELECT customer.`name` as customerName ,t.*,brand.`name` as brandName,
|
|
|
+ que.examine_flag examineFlag,que.not_examine_reason notExamineReason
|
|
|
+ from lift_case as t
|
|
|
+ LEFT JOIN user_info AS ui ON t.create_user_id = ui.user_id
|
|
|
+ LEFT JOIN user_info AS ci ON t.charger_id = ci.user_id
|
|
|
+ LEFT JOIN user_info as customer ON t.customer_service_id = customer.user_id
|
|
|
+ LEFT JOIN lift_brand as brand ON brand.id = t.brand_id
|
|
|
+ left join question_bank que on que.lift_case_id = t.id
|
|
|
+ where 1=1 and t.create_user_id=#{query.createUserId} and t.data_table = 2 and FIND_IN_SET(t.statuz,'5')
|
|
|
+ )temp
|
|
|
+ </select>
|
|
|
+ <!-- 查询专家待报价 -->
|
|
|
+ <select id="queryToOffer" resultType="cn.com.ty.lift.ud.chat.mapper.entity.LiftCaseEntity">
|
|
|
+ SELECT customer.`name` as customerName ,t.*,brand.`name` as brandName,
|
|
|
+ que.examine_flag examineFlag,que.not_examine_reason notExamineReason
|
|
|
+ from lift_case as t
|
|
|
+ LEFT JOIN user_info AS ui ON t.create_user_id = ui.user_id
|
|
|
+ LEFT JOIN user_info AS ci ON t.charger_id = ci.user_id
|
|
|
+ LEFT JOIN user_info as customer ON t.customer_service_id = customer.user_id
|
|
|
+ LEFT JOIN lift_brand as brand ON brand.id = t.brand_id
|
|
|
+ left join question_bank que on que.lift_case_id = t.id
|
|
|
+ where 1=1 and t.charger_id=#{query.chargerId} and t.data_table = 2 and FIND_IN_SET(t.statuz,'1')
|
|
|
+ ORDER BY t.create_time DESC
|
|
|
+ limit #{query.pageIndex},#{query.pageSize}
|
|
|
+ </select>
|
|
|
+ <select id="queryToOfferCount" resultType="java.lang.Integer">
|
|
|
+ SELECT count(0)
|
|
|
+ from lift_case as t
|
|
|
+ LEFT JOIN user_info AS ui ON t.create_user_id = ui.user_id
|
|
|
+ LEFT JOIN user_info AS ci ON t.charger_id = ci.user_id
|
|
|
+ LEFT JOIN user_info as customer ON t.customer_service_id = customer.user_id
|
|
|
+ LEFT JOIN lift_brand as brand ON brand.id = t.brand_id
|
|
|
+ left join question_bank que on que.lift_case_id = t.id
|
|
|
+ where 1=1 and t.charger_id=#{query.chargerId} and t.data_table = 2 and FIND_IN_SET(t.statuz,'1')
|
|
|
+ </select>
|
|
|
+ <!-- 查询专家待打卡 -->
|
|
|
+ <select id="queryToClock" resultType="cn.com.ty.lift.ud.chat.mapper.entity.LiftCaseEntity">
|
|
|
+ SELECT customer.`name` as customerName ,t.*,brand.`name` as brandName,
|
|
|
+ que.examine_flag examineFlag,que.not_examine_reason notExamineReason
|
|
|
+ from lift_case as t
|
|
|
+ LEFT JOIN user_info AS ui ON t.create_user_id = ui.user_id
|
|
|
+ LEFT JOIN user_info AS ci ON t.charger_id = ci.user_id
|
|
|
+ LEFT JOIN user_info as customer ON t.customer_service_id = customer.user_id
|
|
|
+ LEFT JOIN lift_brand as brand ON brand.id = t.brand_id
|
|
|
+ left join question_bank que on que.lift_case_id = t.id
|
|
|
+ where 1=1 and t.charger_id=#{query.chargerId} and t.data_table = 2 and FIND_IN_SET(t.statuz,'3') and t.arrived_Flag=0
|
|
|
+ ORDER BY t.create_time DESC
|
|
|
+ limit #{query.pageIndex},#{query.pageSize}
|
|
|
+ </select>
|
|
|
+ <select id="queryToClockCount" resultType="java.lang.Integer">
|
|
|
+ SELECT count(0)
|
|
|
+ from lift_case as t
|
|
|
+ LEFT JOIN user_info AS ui ON t.create_user_id = ui.user_id
|
|
|
+ LEFT JOIN user_info AS ci ON t.charger_id = ci.user_id
|
|
|
+ LEFT JOIN user_info as customer ON t.customer_service_id = customer.user_id
|
|
|
+ LEFT JOIN lift_brand as brand ON brand.id = t.brand_id
|
|
|
+ left join question_bank que on que.lift_case_id = t.id
|
|
|
+ where 1=1 and t.charger_id=#{query.chargerId} and t.data_table = 2 and FIND_IN_SET(t.statuz,'3') and t.arrived_Flag=0
|
|
|
+ </select>
|
|
|
+ <!-- 查询专家待确认诊单 -->
|
|
|
+ <select id="queryChargeToSure" resultType="cn.com.ty.lift.ud.chat.mapper.entity.LiftCaseEntity">
|
|
|
+ select * from (
|
|
|
+ SELECT customer.`name` as customerName ,t.*,brand.`name` as brandName,
|
|
|
+ que.examine_flag examineFlag,que.not_examine_reason notExamineReason
|
|
|
+ from lift_case as t
|
|
|
+ LEFT JOIN user_info AS ui ON t.create_user_id = ui.user_id
|
|
|
+ LEFT JOIN user_info AS ci ON t.charger_id = ci.user_id
|
|
|
+ LEFT JOIN user_info as customer ON t.customer_service_id = customer.user_id
|
|
|
+ LEFT JOIN lift_brand as brand ON brand.id = t.brand_id
|
|
|
+ left join question_bank que on que.lift_case_id = t.id
|
|
|
+ where 1=1 and t.create_user_id=#{query.createUserId} and t.data_table = 1 and FIND_IN_SET(t.statuz,'2,3')
|
|
|
+ union
|
|
|
+ SELECT customer.`name` as customerName ,t.*,brand.`name` as brandName,
|
|
|
+ que.examine_flag examineFlag,que.not_examine_reason notExamineReason
|
|
|
+ from lift_case as t
|
|
|
+ LEFT JOIN user_info AS ui ON t.create_user_id = ui.user_id
|
|
|
+ LEFT JOIN user_info AS ci ON t.charger_id = ci.user_id
|
|
|
+ LEFT JOIN user_info as customer ON t.customer_service_id = customer.user_id
|
|
|
+ LEFT JOIN lift_brand as brand ON brand.id = t.brand_id
|
|
|
+ left join question_bank que on que.lift_case_id = t.id
|
|
|
+ where 1=1 and t.charger_id=#{query.chargerId} and t.data_table = 2 and FIND_IN_SET(t.statuz,'3') and t.arrived_Flag=1
|
|
|
+ )temp
|
|
|
+ ORDER BY temp.create_time DESC
|
|
|
+ limit #{query.pageIndex},#{query.pageSize}
|
|
|
+ </select>
|
|
|
+ <select id="queryChargeToSureCount" resultType="java.lang.Integer">
|
|
|
+ SELECT count(0) from (
|
|
|
+ from lift_case as t
|
|
|
+ LEFT JOIN user_info AS ui ON t.create_user_id = ui.user_id
|
|
|
+ LEFT JOIN user_info AS ci ON t.charger_id = ci.user_id
|
|
|
+ LEFT JOIN user_info as customer ON t.customer_service_id = customer.user_id
|
|
|
+ LEFT JOIN lift_brand as brand ON brand.id = t.brand_id
|
|
|
+ left join question_bank que on que.lift_case_id = t.id
|
|
|
+ where 1=1 and t.create_user_id=#{query.createUserId} and t.data_table = 1 and FIND_IN_SET(t.statuz,'2,3')
|
|
|
+ union
|
|
|
+ SELECT customer.`name` as customerName ,t.*,brand.`name` as brandName,
|
|
|
+ que.examine_flag examineFlag,que.not_examine_reason notExamineReason
|
|
|
+ from lift_case as t
|
|
|
+ LEFT JOIN user_info AS ui ON t.create_user_id = ui.user_id
|
|
|
+ LEFT JOIN user_info AS ci ON t.charger_id = ci.user_id
|
|
|
+ LEFT JOIN user_info as customer ON t.customer_service_id = customer.user_id
|
|
|
+ LEFT JOIN lift_brand as brand ON brand.id = t.brand_id
|
|
|
+ left join question_bank que on que.lift_case_id = t.id
|
|
|
+ where 1=1 and t.charger_id=#{query.chargerId} and t.data_table = 2 and FIND_IN_SET(t.statuz,'3') and t.arrived_Flag=1
|
|
|
+ )temp
|
|
|
+ </select>
|
|
|
+ <!-- 查询专家待归档 -->
|
|
|
+ <select id="queryToClock" resultType="cn.com.ty.lift.ud.chat.mapper.entity.LiftCaseEntity">
|
|
|
+ SELECT customer.`name` as customerName ,t.*,brand.`name` as brandName,
|
|
|
+ que.examine_flag examineFlag,que.not_examine_reason notExamineReason
|
|
|
+ from lift_case as t
|
|
|
+ LEFT JOIN user_info AS ui ON t.create_user_id = ui.user_id
|
|
|
+ LEFT JOIN user_info AS ci ON t.charger_id = ci.user_id
|
|
|
+ LEFT JOIN user_info as customer ON t.customer_service_id = customer.user_id
|
|
|
+ LEFT JOIN lift_brand as brand ON brand.id = t.brand_id
|
|
|
+ left join question_bank que on que.lift_case_id = t.id
|
|
|
+ where 1=1 and t.charger_id=#{query.chargerId} and t.data_table = 2 and FIND_IN_SET(t.statuz,'4')
|
|
|
+ ORDER BY t.create_time DESC
|
|
|
+ limit #{query.pageIndex},#{query.pageSize}
|
|
|
+ </select>
|
|
|
+ <select id="queryToClockCount" resultType="java.lang.Integer">
|
|
|
+ SELECT count(0)
|
|
|
+ from lift_case as t
|
|
|
+ LEFT JOIN user_info AS ui ON t.create_user_id = ui.user_id
|
|
|
+ LEFT JOIN user_info AS ci ON t.charger_id = ci.user_id
|
|
|
+ LEFT JOIN user_info as customer ON t.customer_service_id = customer.user_id
|
|
|
+ LEFT JOIN lift_brand as brand ON brand.id = t.brand_id
|
|
|
+ left join question_bank que on que.lift_case_id = t.id
|
|
|
+ where 1=1 and t.charger_id=#{query.chargerId} and t.data_table = 2 and FIND_IN_SET(t.statuz,'4')
|
|
|
+ </select>
|
|
|
+ <!-- 查询专家工作台 -->
|
|
|
+ <select id="queryWorkbench" resultType="cn.com.ty.lift.ud.chat.mapper.entity.LiftCaseEntity">
|
|
|
+ select * from (
|
|
|
+ SELECT customer.`name` as customerName ,t.*,brand.`name` as brandName,
|
|
|
+ que.examine_flag examineFlag,que.not_examine_reason notExamineReason
|
|
|
+ from lift_case as t
|
|
|
+ LEFT JOIN user_info AS ui ON t.create_user_id = ui.user_id
|
|
|
+ LEFT JOIN user_info AS ci ON t.charger_id = ci.user_id
|
|
|
+ LEFT JOIN user_info as customer ON t.customer_service_id = customer.user_id
|
|
|
+ LEFT JOIN lift_brand as brand ON brand.id = t.brand_id
|
|
|
+ left join question_bank que on que.lift_case_id = t.id
|
|
|
+ where 1=1 and t.create_user_id=#{query.createUserId} and t.data_table = 1 and FIND_IN_SET(t.statuz,'1')
|
|
|
+ union
|
|
|
+ SELECT customer.`name` as customerName ,t.*,brand.`name` as brandName,
|
|
|
+ que.examine_flag examineFlag,que.not_examine_reason notExamineReason
|
|
|
+ from lift_case as t
|
|
|
+ LEFT JOIN user_info AS ui ON t.create_user_id = ui.user_id
|
|
|
+ LEFT JOIN user_info AS ci ON t.charger_id = ci.user_id
|
|
|
+ LEFT JOIN user_info as customer ON t.customer_service_id = customer.user_id
|
|
|
+ LEFT JOIN lift_brand as brand ON brand.id = t.brand_id
|
|
|
+ left join question_bank que on que.lift_case_id = t.id
|
|
|
+ where 1=1 and t.charger_id=#{query.chargerId} and t.data_table = 2 and FIND_IN_SET(t.statuz,'0')
|
|
|
+ )temp
|
|
|
+ ORDER BY temp.create_time DESC
|
|
|
+ limit #{query.pageIndex},#{query.pageSize}
|
|
|
+ </select>
|
|
|
+ <select id="queryWorkbenchCount" resultType="java.lang.Integer">
|
|
|
+ SELECT count(0) from (
|
|
|
+ SELECT customer.`name` as customerName ,t.*,brand.`name` as brandName,
|
|
|
+ que.examine_flag examineFlag,que.not_examine_reason notExamineReason
|
|
|
+ from lift_case as t
|
|
|
+ LEFT JOIN user_info AS ui ON t.create_user_id = ui.user_id
|
|
|
+ LEFT JOIN user_info AS ci ON t.charger_id = ci.user_id
|
|
|
+ LEFT JOIN user_info as customer ON t.customer_service_id = customer.user_id
|
|
|
+ LEFT JOIN lift_brand as brand ON brand.id = t.brand_id
|
|
|
+ left join question_bank que on que.lift_case_id = t.id
|
|
|
+ where 1=1 and t.create_user_id=#{query.createUserId} and t.data_table = 1 and FIND_IN_SET(t.statuz,'1')
|
|
|
+ union
|
|
|
+ SELECT customer.`name` as customerName ,t.*,brand.`name` as brandName,
|
|
|
+ que.examine_flag examineFlag,que.not_examine_reason notExamineReason
|
|
|
+ from lift_case as t
|
|
|
+ LEFT JOIN user_info AS ui ON t.create_user_id = ui.user_id
|
|
|
+ LEFT JOIN user_info AS ci ON t.charger_id = ci.user_id
|
|
|
+ LEFT JOIN user_info as customer ON t.customer_service_id = customer.user_id
|
|
|
+ LEFT JOIN lift_brand as brand ON brand.id = t.brand_id
|
|
|
+ left join question_bank que on que.lift_case_id = t.id
|
|
|
+ where 1=1 and t.charger_id=#{query.chargerId} and t.data_table = 2 and FIND_IN_SET(t.statuz,'0')
|
|
|
+ )temp
|
|
|
+ </select>
|
|
|
+ <!-- 后台监控中心 -->
|
|
|
+ <select id="queryMonitoringCenter" resultType="cn.com.ty.lift.ud.chat.mapper.entity.LiftCaseEntity">
|
|
|
+ SELECT customer.`name` as customerName ,t.*,brand.`name` as brandName,
|
|
|
+ que.examine_flag examineFlag,que.not_examine_reason notExamineReason
|
|
|
+ from lift_case as t
|
|
|
+ LEFT JOIN user_info AS ui ON t.create_user_id = ui.user_id
|
|
|
+ LEFT JOIN user_info AS ci ON t.charger_id = ci.user_id
|
|
|
+ LEFT JOIN user_info as customer ON t.customer_service_id = customer.user_id
|
|
|
+ LEFT JOIN lift_brand as brand ON brand.id = t.brand_id
|
|
|
+ left join question_bank que on que.lift_case_id = t.id
|
|
|
+ ORDER BY t.update_time DESC
|
|
|
+ limit #{query.pageIndex},#{query.pageSize}
|
|
|
+ </select>
|
|
|
+ <select id="queryMonitoringCenterCount" resultType="java.lang.Integer">
|
|
|
+ SELECT count(0)
|
|
|
+ from lift_case as t
|
|
|
+ LEFT JOIN user_info AS ui ON t.create_user_id = ui.user_id
|
|
|
+ LEFT JOIN user_info AS ci ON t.charger_id = ci.user_id
|
|
|
+ LEFT JOIN user_info as customer ON t.customer_service_id = customer.user_id
|
|
|
+ LEFT JOIN lift_brand as brand ON brand.id = t.brand_id
|
|
|
+ left join question_bank que on que.lift_case_id = t.id
|
|
|
+ </select>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
<select id="selectByQuery" resultType="cn.com.ty.lift.ud.chat.mapper.entity.LiftCaseEntity">
|
|
|
SELECT customer.`name` as customerName ,t.*,brand.`name` as brandName,
|
|
|
que.examine_flag examineFlag,que.not_examine_reason notExamineReason
|
|
@@ -354,15 +730,19 @@
|
|
|
left join question_bank que on que.lift_case_id = t.id
|
|
|
where 1=1
|
|
|
<if test="page.statuz1 != null and page.statuz2 != null">
|
|
|
- and ((t.data_table=1 and t.statuz=#{page.statuz1}) or (t.data_table=2 and t.statuz=#{page.statuz2}))
|
|
|
+ <!-- and ((t.data_table=1 and t.statuz=#{page.statuz1}) or (t.data_table=2 and t.statuz=#{page.statuz2})) -->
|
|
|
+ and ((t.data_table=1 and FIND_IN_SET(t.statuz,#{page.statuz1})) or (t.data_table=2 and FIND_IN_SET(t.statuz,#{page.statuz2})))
|
|
|
</if>
|
|
|
<if test="page.statuz1 != null and page.statuz2 == null">
|
|
|
- and(t.data_table=1 and t.statuz=#{page.statuz1})
|
|
|
+ <!-- and(t.data_table=1 and t.statuz=#{page.statuz1}) -->
|
|
|
+ and(t.data_table=1 and FIND_IN_SET(t.statuz,#{page.statuz1}))
|
|
|
</if>
|
|
|
<if test="page.statuz2 != null and page.statuz1 == null">
|
|
|
- and (t.data_table=2 and t.statuz=#{page.statuz2})
|
|
|
+ <!-- and (t.data_table=2 and t.statuz=#{page.statuz2}) -->
|
|
|
+ and (t.data_table=2 and FIND_IN_SET(t.statuz,#{page.statuz2}))
|
|
|
</if>
|
|
|
- <if test="page.arrivedFlag != null" >
|
|
|
+ <!-- <if test="page.arrivedFlag != null and page.statuz2 == 3" > -->
|
|
|
+ <if test="page.arrivedFlag != null and page.dataTable == 2" >
|
|
|
and t.arrived_Flag=#{page.arrivedFlag}
|
|
|
</if>
|
|
|
<if test="page.haveSessionId == true" >
|
|
@@ -401,17 +781,21 @@
|
|
|
LEFT JOIN user_info AS ci ON t.charger_id = ci.user_id
|
|
|
LEFT JOIN user_info as customer ON t.customer_service_id = customer.user_id
|
|
|
LEFT JOIN lift_brand as brand ON brand.id = t.brand_id
|
|
|
- where 1=1
|
|
|
- <if test="page.statuz1 != null and page.statuz2 != null">
|
|
|
- and ((t.data_table=1 and t.statuz=#{page.statuz1}) or (t.data_table=2 and t.statuz=#{page.statuz2}))
|
|
|
+ where 1=1
|
|
|
+ <if test="page.statuz1 != null and page.statuz2 != null">
|
|
|
+ <!-- and ((t.data_table=1 and t.statuz=#{page.statuz1}) or (t.data_table=2 and t.statuz=#{page.statuz2})) -->
|
|
|
+ and ((t.data_table=1 and FIND_IN_SET(t.statuz,#{page.statuz1})) or (t.data_table=2 and FIND_IN_SET(t.statuz,#{page.statuz2})))
|
|
|
</if>
|
|
|
<if test="page.statuz1 != null and page.statuz2 == null">
|
|
|
- and(t.data_table=1 and t.statuz=#{page.statuz1})
|
|
|
+ <!-- and(t.data_table=1 and t.statuz=#{page.statuz1}) -->
|
|
|
+ and(t.data_table=1 and FIND_IN_SET(t.statuz,#{page.statuz1}))
|
|
|
</if>
|
|
|
<if test="page.statuz2 != null and page.statuz1 == null">
|
|
|
- and (t.data_table=2 and t.statuz=#{page.statuz2})
|
|
|
+ <!-- and (t.data_table=2 and t.statuz=#{page.statuz2}) -->
|
|
|
+ and (t.data_table=2 and FIND_IN_SET(t.statuz,#{page.statuz2}))
|
|
|
</if>
|
|
|
- <if test="page.arrivedFlag != null" >
|
|
|
+ <!-- <if test="page.arrivedFlag != null and page.statuz2 == 3" > -->
|
|
|
+ <if test="page.arrivedFlag != null and page.dataTable == 2" >
|
|
|
and t.arrived_Flag=#{page.arrivedFlag}
|
|
|
</if>
|
|
|
<if test="page.acceptStatus != null" >
|