|
@@ -59,7 +59,7 @@
|
|
|
from clue c
|
|
|
left join sys_dict sd on c.customer_level_id = sd.id
|
|
|
where
|
|
|
- c.company_id = #{companyId} and is_delete = #{isDelete} and c.is_bo = 0
|
|
|
+ c.company_id = #{companyId} and is_delete = #{isDelete}
|
|
|
<if test="inchargerId != null and inchargerId != '' ">
|
|
|
and c.incharger_id =#{inchargerId}
|
|
|
</if>
|
|
@@ -104,7 +104,7 @@
|
|
|
<select id="list1" resultType="com.management.platform.entity.Clue">
|
|
|
select c.id,
|
|
|
c.company_id,
|
|
|
- (select company_name from company where company_id = c.id) companyName,
|
|
|
+ (select company.company_name from company where c.company_id = company.id) companyName,
|
|
|
c.clue_name,
|
|
|
c.clue_source_id,
|
|
|
c.phone,
|
|
@@ -130,7 +130,7 @@
|
|
|
from clue c
|
|
|
left join sys_dict sd on c.customer_level_id = sd.id
|
|
|
where
|
|
|
- c.company_id = #{clue.companyId} and c.is_delete = #{clue.isDelete} and c.is_bo = 0
|
|
|
+ c.company_id = #{clue.companyId} and c.is_delete = #{clue.isDelete}
|
|
|
and (c.incharger_id in
|
|
|
(SELECT id from `user` WHERE department_id = (SELECT department_id from `user` WHERe id = #{userId}))
|
|
|
or c.incharger_id is null)
|
|
@@ -160,13 +160,13 @@
|
|
|
</if>
|
|
|
ORDER BY
|
|
|
<choose>
|
|
|
- <when test="isDesc == null">
|
|
|
+ <when test="clue.isDesc == null">
|
|
|
c.id DESC
|
|
|
</when>
|
|
|
- <when test="isDesc == 0">
|
|
|
+ <when test="clue.isDesc == 0">
|
|
|
sd.seq ASC, c.id DESC
|
|
|
</when>
|
|
|
- <when test="isDesc == 1">
|
|
|
+ <when test="clue.isDesc == 1">
|
|
|
sd.seq DESC, c.id DESC
|
|
|
</when>
|
|
|
<otherwise>
|
|
@@ -178,7 +178,7 @@
|
|
|
<select id="list2" resultType="com.management.platform.entity.Clue">
|
|
|
select c.id,
|
|
|
c.company_id,
|
|
|
- (select company_name from company where c.company_id = c.id) companyName,
|
|
|
+ (select company_name from company where c.company_id = company.id) companyName,
|
|
|
c.clue_name,
|
|
|
c.clue_source_id,
|
|
|
c.phone,
|
|
@@ -204,7 +204,7 @@
|
|
|
from clue c
|
|
|
left join sys_dict sd on c.customer_level_id = sd.id
|
|
|
where
|
|
|
- c.company_id = #{clue.companyId} and c.is_delete = #{clue.isDelete} and c.is_bo = 0
|
|
|
+ c.company_id = #{clue.companyId} and c.is_delete = #{clue.isDelete}
|
|
|
and (c.incharger_id = #{userId} or c.incharger_id is null)
|
|
|
<if test="clue.inchargerId != null and clue.inchargerId != '' ">
|
|
|
and c.incharger_id =#{clue.inchargerId}
|
|
@@ -251,7 +251,7 @@
|
|
|
select count(*)
|
|
|
from clue c
|
|
|
where
|
|
|
- company_id = #{companyId} and is_delete = #{isDelete} and is_bo = 0
|
|
|
+ company_id = #{companyId} and is_delete = #{isDelete}
|
|
|
<if test="inchargerId != null and inchargerId != '' ">
|
|
|
and incharger_id = #{inchargerId}
|
|
|
</if>
|
|
@@ -282,7 +282,7 @@
|
|
|
COUNT(c.id)
|
|
|
from clue c
|
|
|
where
|
|
|
- c.company_id = #{clue.companyId} and c.is_delete = #{clue.isDelete} and c.is_bo = 0
|
|
|
+ c.company_id = #{clue.companyId} and c.is_delete = #{clue.isDelete}
|
|
|
and c.incharger_id in
|
|
|
(SELECT id from `user` WHERE department_id = (SELECT department_id from `user` WHERe id = #{userId}))
|
|
|
and c.incharger_id is null
|
|
@@ -316,7 +316,7 @@
|
|
|
count(c.id)
|
|
|
from clue c
|
|
|
where
|
|
|
- c.company_id = #{clue.companyId} and c.is_delete = #{clue.isDelete} and c.is_bo = 0
|
|
|
+ c.company_id = #{clue.companyId} and c.is_delete = #{clue.isDelete}
|
|
|
and (c.incharger_id = #{userId} or c.incharger_id is null)
|
|
|
<if test="clue.inchargerId != null and clue.inchargerId != '' ">
|
|
|
and c.incharger_id =#{clue.inchargerId}
|
|
@@ -369,8 +369,8 @@
|
|
|
where company_id =#{companyId}
|
|
|
</select>
|
|
|
<select id="getAlllist1" resultType="com.management.platform.entity.Clue">
|
|
|
- select id,
|
|
|
- clue_name
|
|
|
+ select c.id,
|
|
|
+ c.clue_name
|
|
|
from clue c
|
|
|
left join sys_dict sd on c.customer_level_id = sd.id
|
|
|
where
|
|
@@ -408,7 +408,7 @@
|
|
|
c.plate5,
|
|
|
c.create_time,
|
|
|
c.create_id,c.need_pin,c.pin_time,
|
|
|
- (select company_name from company where c.company_id = id) companyName,
|
|
|
+ (select company.company_name from company where c.company_id = company.id) companyName,
|
|
|
(select name from `user` where id = c.incharger_id) inchargerName,
|
|
|
(select name from `user` where id = c.create_id) createName,
|
|
|
(select name from sys_dict where c.clue_source_id = id and code = 'ClueSources') clueSourceValue,
|
|
@@ -417,7 +417,7 @@
|
|
|
from clue c
|
|
|
left join sys_dict sd on c.customer_level_id = sd.id
|
|
|
where
|
|
|
- c.company_id = #{companyId} and is_delete = #{isDelete} and c.is_bo = 0
|
|
|
+ c.company_id = #{companyId} and is_delete = #{isDelete}
|
|
|
<if test="inchargerId != null and inchargerId != '' ">
|
|
|
and c.incharger_id =#{inchargerId}
|
|
|
</if>
|
|
@@ -462,7 +462,7 @@
|
|
|
<select id="list1ByPin" resultType="com.management.platform.entity.Clue">
|
|
|
select c.id,
|
|
|
c.company_id,
|
|
|
- (select company_name from company where company_id = c.id) companyName,
|
|
|
+ (select company.company_name from company where c.company_id = company.id) companyName,
|
|
|
c.clue_name,
|
|
|
c.clue_source_id,
|
|
|
c.phone,
|
|
@@ -488,9 +488,9 @@
|
|
|
from clue c
|
|
|
left join sys_dict sd on c.customer_level_id = sd.id
|
|
|
where
|
|
|
- c.company_id = #{clue.companyId} and c.is_delete = #{clue.isDelete} and c.is_bo = 0
|
|
|
+ c.company_id = #{clue.companyId} and c.is_delete = #{clue.isDelete}
|
|
|
and (c.incharger_id in
|
|
|
- (SELECT id from `user` WHERE department_id = (SELECT department_id from `user` WHERe id = #{userId}))
|
|
|
+ (SELECT id from `user` WHERE department_id = (SELECT department_id from `user` where id = #{userId}))
|
|
|
or c.incharger_id is null)
|
|
|
<if test="clue.inchargerId != null and clue.inchargerId != '' ">
|
|
|
and c.incharger_id =#{clue.inchargerId}
|
|
@@ -536,7 +536,7 @@
|
|
|
<select id="list2ByPin" resultType="com.management.platform.entity.Clue">
|
|
|
select c.id,
|
|
|
c.company_id,
|
|
|
- (select company_name from company where c.company_id = c.id) companyName,
|
|
|
+ (select company.company_name from company where c.company_id = company.id) companyName,
|
|
|
c.clue_name,
|
|
|
c.clue_source_id,
|
|
|
c.phone,
|
|
@@ -562,7 +562,7 @@
|
|
|
from clue c
|
|
|
left join sys_dict sd on c.customer_level_id = sd.id
|
|
|
where
|
|
|
- c.company_id = #{clue.companyId} and c.is_delete = #{clue.isDelete} and c.is_bo = 0
|
|
|
+ c.company_id = #{clue.companyId} and c.is_delete = #{clue.isDelete}
|
|
|
and (c.incharger_id = #{userId} or c.incharger_id is null)
|
|
|
<if test="clue.inchargerId != null and clue.inchargerId != '' ">
|
|
|
and c.incharger_id =#{clue.inchargerId}
|