申报自检结果
This commit is contained in:
parent
307c44154f
commit
9813a09447
|
|
@ -94,6 +94,9 @@ public class AdminConfigController {
|
|||
.eq(AdminModelSort::getType, 1)
|
||||
.eq(AdminModelSort::getUserId, UserUtil.getUserId())
|
||||
.list();
|
||||
AdminModelSort sort = new AdminModelSort();
|
||||
sort.setModel("compliance");
|
||||
list.add(sort);
|
||||
return Result.ok(list.stream().map(AdminModelSort::getModel).collect(Collectors.toList()));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -57,8 +57,16 @@ public class AdminRoleController {
|
|||
@ApiOperation("角色权限")
|
||||
public Result<JSONObject> auth() {
|
||||
JSONObject object = adminRoleService.auth(UserUtil.getUserId());
|
||||
AdminModelSort one = adminModelSortService.lambdaQuery().select(AdminModelSort::getModel).eq(AdminModelSort::getType, 1).eq(AdminModelSort::getUserId, UserUtil.getUserId()).orderByAsc(AdminModelSort::getSort).last(" limit 1").one();
|
||||
AdminModelSort one = adminModelSortService.lambdaQuery()
|
||||
.select(AdminModelSort::getModel)
|
||||
.eq(AdminModelSort::getType, 1)
|
||||
.eq(AdminModelSort::getUserId, UserUtil.getUserId())
|
||||
.orderByAsc(AdminModelSort::getSort)
|
||||
.last(" limit 1").one();
|
||||
AdminModelSort sort = new AdminModelSort();
|
||||
sort.setModel("compliance");
|
||||
object.put("firstModel", one != null ? one.getModel() : "");
|
||||
object.put("compliance", sort.getModel());
|
||||
return R.ok(object);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "https://www.72crm.com/mybatis-3.5.3-mapper.dtd">
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.kakarote.bi.mapper.BiCustomerMapper">
|
||||
<select id="totalCustomerStats" resultType="com.alibaba.fastjson.JSONObject">
|
||||
select t.type,count(t.customer_id) as customerNum,count(t.dealCustomer) as dealCustomerNum
|
||||
|
|
@ -10,9 +10,9 @@
|
|||
from wk_crm_customer as a
|
||||
where DATE_FORMAT(a.create_time, #{sqlDateFormat}) between #{beginTime} and #{finalTime}
|
||||
and a.owner_user_id in
|
||||
<for collection="userIds" item="item">
|
||||
<foreach collection="userIds" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</for>
|
||||
</foreach>
|
||||
and a.status != 3
|
||||
) as t
|
||||
group by t.type
|
||||
|
|
@ -46,9 +46,9 @@
|
|||
from wk_crm_activity a
|
||||
left join wk_crm_customer c on a.activity_type_id = c.customer_id
|
||||
where if(a.activity_type = 2,c.status != 3,1=1) and DATE_FORMAT(a.create_time,'${sqlDateFormat}') = ${x} and a.type = 1 and a.create_user_id in
|
||||
<for collection="userIds" item="item">
|
||||
<foreach collection="userIds" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</for>
|
||||
</foreach>
|
||||
),0) as recordCount,
|
||||
(SELECT count(v.customer_id) from (SELECT a.activity_type_id as customer_id
|
||||
FROM wk_crm_activity a
|
||||
|
|
@ -57,9 +57,9 @@
|
|||
AND a.type = 1
|
||||
AND DATE_FORMAT(a.create_time, '${sqlDateFormat}') = ${x}
|
||||
AND a.create_user_id in
|
||||
<for collection="userIds" item="item">
|
||||
<foreach collection="userIds" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</for>
|
||||
</foreach>
|
||||
union
|
||||
SELECT a.customer_id
|
||||
FROM wk_crm_leads a
|
||||
|
|
@ -69,9 +69,9 @@
|
|||
left join wk_crm_customer c on b.activity_type_id = c.customer_id
|
||||
WHERE c.status != 3 and DATE_FORMAT(b.create_time, '${sqlDateFormat}') = ${x}
|
||||
AND b.create_user_id in
|
||||
<for collection="userIds" item="item">
|
||||
<foreach collection="userIds" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</for>
|
||||
</foreach>
|
||||
union
|
||||
SELECT a.customer_id
|
||||
FROM wk_crm_contacts a
|
||||
|
|
@ -81,9 +81,9 @@
|
|||
left join wk_crm_customer c on b.activity_type_id = c.customer_id
|
||||
WHERE c.status != 3 and DATE_FORMAT(b.create_time, '${sqlDateFormat}') = ${x}
|
||||
AND b.create_user_id in
|
||||
<for collection="userIds" item="item">
|
||||
<foreach collection="userIds" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</for>
|
||||
</foreach>
|
||||
union
|
||||
SELECT a.customer_id
|
||||
FROM wk_crm_business a
|
||||
|
|
@ -91,9 +91,9 @@
|
|||
AND activity_type = 5
|
||||
AND type = 1
|
||||
AND b.create_user_id in
|
||||
<for collection="userIds" item="item">
|
||||
<foreach collection="userIds" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</for>
|
||||
</foreach>
|
||||
left join wk_crm_customer c on b.activity_type_id = c.customer_id
|
||||
WHERE c.status != 3 and DATE_FORMAT(b.create_time, '${sqlDateFormat}') = ${x}
|
||||
) as v) AS customerCount
|
||||
|
|
@ -143,9 +143,9 @@
|
|||
) as v
|
||||
left JOIN wk_admin_user cau on cau.user_id = v.create_user_id
|
||||
WHERE cau.user_id in
|
||||
<for collection="userIds" item="item">
|
||||
<foreach collection="userIds" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</for>
|
||||
</foreach>
|
||||
GROUP BY cau.user_id
|
||||
</select>
|
||||
|
||||
|
|
@ -156,17 +156,17 @@
|
|||
where c.status != 3 and a.type = 1
|
||||
and DATE_FORMAT(a.create_time,#{sqlDateFormat}) between #{beginTime} and #{finalTime}
|
||||
and a.create_user_id in
|
||||
<for collection="userIds" item="item">
|
||||
<foreach collection="userIds" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</for>
|
||||
</foreach>
|
||||
),0),2) as proportion
|
||||
from wk_crm_activity a
|
||||
left join wk_crm_customer c on a.activity_type_id = c.customer_id
|
||||
where c.status != 3 and a.type = 1 and DATE_FORMAT(a.create_time,#{sqlDateFormat}) between #{beginTime} and #{finalTime}
|
||||
and a.create_user_id in
|
||||
<for collection="userIds" item="item">
|
||||
<foreach collection="userIds" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</for>
|
||||
</foreach>
|
||||
group by a.category
|
||||
</select>
|
||||
|
||||
|
|
@ -178,9 +178,9 @@
|
|||
FROM
|
||||
wk_crm_customer
|
||||
WHERE owner_user_id IN
|
||||
<for collection="userIds" item="item">
|
||||
<foreach collection="userIds" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</for>
|
||||
</foreach>
|
||||
and status != 3
|
||||
</select>
|
||||
|
||||
|
|
@ -199,9 +199,9 @@
|
|||
left join wk_admin_user as d on a.owner_user_id = d.user_id
|
||||
where DATE_FORMAT(a.create_time,#{sqlDateFormat}) = #{time} and b.check_status != 7
|
||||
and a.deal_status = 1 and a.owner_user_id in
|
||||
<for collection="userIds" item="item">
|
||||
<foreach collection="userIds" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</for>
|
||||
</foreach>
|
||||
and a.status != 3
|
||||
</select>
|
||||
|
||||
|
|
@ -215,17 +215,17 @@
|
|||
where c.status != 3
|
||||
and DATE_FORMAT(a.create_time,'${sqlDateFormat}') = ${x}
|
||||
and a.type = 9 and a.post_owner_user_id in
|
||||
<for collection="userIds" item="item">
|
||||
<foreach collection="userIds" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</for>) as receiveNum
|
||||
</foreach>) as receiveNum
|
||||
from wk_crm_owner_record a
|
||||
left join wk_crm_customer c on a.type_id = c.customer_id
|
||||
where c.status != 3
|
||||
and DATE_FORMAT(a.create_time,'${sqlDateFormat}') = ${x}
|
||||
and a.type = 9 and a.pre_owner_user_id in
|
||||
<for collection="userIds" item="item">
|
||||
<foreach collection="userIds" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</for>
|
||||
</foreach>
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
|
|
@ -243,9 +243,9 @@
|
|||
and a.type = 9 and a.post_owner_user_id = a.user_id) as receiveNum
|
||||
from wk_admin_user as a left join wk_admin_dept as b on a.dept_id = b.dept_id
|
||||
where user_id in
|
||||
<for collection="userIds" item="item">
|
||||
<foreach collection="userIds" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</for>
|
||||
</foreach>
|
||||
</select>
|
||||
<select id="querySatisfactionOptionList" resultType="com.alibaba.fastjson.JSONObject">
|
||||
select t.field_id, t.options from wk_crm_field t where t.label = 17 and t.field_name = 'satisficing'
|
||||
|
|
@ -263,9 +263,9 @@
|
|||
AND (DATE_FORMAT(create_time,#{sqlDateFormat}) between #{beginTime} and #{finalTime})
|
||||
AND deal_status = 1
|
||||
AND owner_user_id IN
|
||||
<for collection="userIds" item="item">
|
||||
<foreach collection="userIds" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</for>
|
||||
</foreach>
|
||||
) t
|
||||
GROUP BY t.type
|
||||
</select>
|
||||
|
|
@ -289,9 +289,9 @@
|
|||
from wk_crm_customer
|
||||
where DATE_FORMAT(create_time,'${entity.sqlDateFormat}') between #{entity.beginTime} and #{entity.finalTime}
|
||||
and deal_status = 1 and owner_user_id in
|
||||
<for collection="entity.userIds" item="item">
|
||||
<foreach collection="entity.userIds" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</for>
|
||||
</foreach>
|
||||
and address like '%${x}%'
|
||||
</foreach>
|
||||
</select>
|
||||
|
|
@ -305,9 +305,9 @@
|
|||
left join wk_crm_contract_product as c on b.contract_id = c.contract_id
|
||||
where DATE_FORMAT(a.create_time,'${entity.sqlDateFormat}') between #{entity.beginTime} and #{entity.finalTime}
|
||||
and a.deal_status = 1 and a.owner_user_id in
|
||||
<for collection="entity.userIds" item="item">
|
||||
<foreach collection="entity.userIds" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</for>
|
||||
</foreach>
|
||||
and c.product_id = ${x.id}
|
||||
</foreach>
|
||||
</select>
|
||||
|
|
@ -341,9 +341,9 @@
|
|||
left join wk_crm_return_visit_data as e on a.batch_id = e.batch_id and e.field_id = #{fieldId}
|
||||
where d.status != 3 and DATE_FORMAT(b.order_date,'${sqlDateFormat}') between #{beginTime} and #{finalTime}
|
||||
and d.product_id = #{x.id} and a.owner_user_id in
|
||||
<for collection="userIds" item="item">
|
||||
<foreach collection="userIds" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</for>
|
||||
</foreach>
|
||||
) as z
|
||||
</foreach>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "https://www.72crm.com/mybatis-3.5.3-mapper.dtd">
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.kakarote.bi.mapper.BiEmployeeMapper">
|
||||
<select id="contractNum" resultType="com.alibaba.fastjson.JSONObject">
|
||||
<foreach collection="timeList" item="x" separator="union all" index="i">
|
||||
|
|
@ -17,20 +17,20 @@
|
|||
</otherwise>
|
||||
</choose>
|
||||
and check_status in (1,10) and owner_user_id in
|
||||
<for collection="userIds" item="item">
|
||||
<foreach collection="userIds" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</for>) as lastMonth,
|
||||
</foreach>) as lastMonth,
|
||||
(select count(contract_id)
|
||||
from wk_crm_contract
|
||||
where DATE_FORMAt(order_date,'%Y%m') = ${x-100} and check_status = 1 and owner_user_id in
|
||||
<for collection="userIds" item="item">
|
||||
<foreach collection="userIds" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</for>) as lastYear
|
||||
</foreach>) as lastYear
|
||||
from wk_crm_contract
|
||||
where DATE_FORMAT(order_date,'%Y%m') = ${x} and check_status in (1,10) and owner_user_id in
|
||||
<for collection="userIds" item="item">
|
||||
<foreach collection="userIds" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</for>
|
||||
</foreach>
|
||||
</foreach>
|
||||
</select>
|
||||
<select id="contractMoney" resultType="com.alibaba.fastjson.JSONObject">
|
||||
|
|
@ -49,20 +49,20 @@
|
|||
</otherwise>
|
||||
</choose>
|
||||
and check_status in (1,10) and owner_user_id in
|
||||
<for collection="userIds" item="item">
|
||||
<foreach collection="userIds" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</for>) as lastMonth,
|
||||
</foreach>) as lastMonth,
|
||||
(select IFNULL(SUM(money),0)
|
||||
from wk_crm_contract
|
||||
where DATE_FORMAt(order_date,'%Y%m') = ${x-100} and check_status in (1,10) and owner_user_id in
|
||||
<for collection="userIds" item="item">
|
||||
<foreach collection="userIds" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</for>) as lastYear
|
||||
</foreach>) as lastYear
|
||||
from wk_crm_contract
|
||||
where DATE_FORMAT(order_date,'%Y%m') = ${x} and check_status in (1,10) and owner_user_id in
|
||||
<for collection="userIds" item="item">
|
||||
<foreach collection="userIds" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</for>
|
||||
</foreach>
|
||||
</foreach>
|
||||
</select>
|
||||
<select id="receivables" resultType="com.alibaba.fastjson.JSONObject">
|
||||
|
|
@ -81,20 +81,20 @@
|
|||
</otherwise>
|
||||
</choose>
|
||||
and check_status in (1,10) and owner_user_id in
|
||||
<for collection="userIds" item="item">
|
||||
<foreach collection="userIds" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</for>) as lastMonth,
|
||||
</foreach>) as lastMonth,
|
||||
(select IFNULL(SUM(money),0)
|
||||
from wk_crm_receivables
|
||||
where DATE_FORMAt(return_time,'%Y%m') = ${x-100} and check_status in (1,10) and owner_user_id in
|
||||
<for collection="userIds" item="item">
|
||||
<foreach collection="userIds" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</for>) as lastYear
|
||||
</foreach>) as lastYear
|
||||
from wk_crm_receivables
|
||||
where DATE_FORMAT(return_time,'%Y%m') = ${x} and check_status in (1,10) and owner_user_id in
|
||||
<for collection="userIds" item="item">
|
||||
<foreach collection="userIds" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</for>
|
||||
</foreach>
|
||||
</foreach>
|
||||
</select>
|
||||
<select id="totalContractTable" resultType="com.alibaba.fastjson.JSONObject">
|
||||
|
|
@ -110,9 +110,9 @@
|
|||
from wk_crm_contract as a
|
||||
where DATE_FORMAT(a.order_date,#{sqlDateFormat} between #{beginTime} and #{finalTime})
|
||||
and a.check_status = 1 and a.owner_user_id in
|
||||
<for collection="userIds" item="item">
|
||||
<foreach collection="userIds" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</for>
|
||||
</foreach>
|
||||
) as x GROUP BY x.type
|
||||
</select>
|
||||
<select id="totalContract" resultType="com.alibaba.fastjson.JSONObject">
|
||||
|
|
@ -127,9 +127,9 @@
|
|||
where DATE_FORMAT(a.order_date,#{sqlDateFormat}) between #{beginTime} and #{finalTime} and a.check_status = 1
|
||||
<if test="userIds.size()>0">
|
||||
and a.owner_user_id in
|
||||
<for collection="userIds" item="item">
|
||||
<foreach collection="userIds" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</for>
|
||||
</foreach>
|
||||
</if>
|
||||
) as x
|
||||
</select>
|
||||
|
|
@ -139,16 +139,16 @@
|
|||
(
|
||||
SELECT IFNULL(sum(b.invoice_money),0) FROM wk_crm_invoice as b WHERE b.check_status in (1,10) and b.real_invoice_date BETWEEN #{startTime} and #{endTime}
|
||||
and b.owner_user_id in
|
||||
<for collection="userIds" item="item">
|
||||
<foreach collection="userIds" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</for>
|
||||
</foreach>
|
||||
) as invoiceMoney,
|
||||
(
|
||||
SELECT IFNULL(sum(c.money),0) FROM wk_crm_receivables as c WHERE c.check_status in (1,10) and c.return_time BETWEEN #{startTime} and #{endTime}
|
||||
and c.owner_user_id in
|
||||
<for collection="userIds" item="item">
|
||||
<foreach collection="userIds" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</for>
|
||||
</foreach>
|
||||
) as receivablesMoney
|
||||
</select>
|
||||
<select id="invoiceStatsTable" resultType="com.alibaba.fastjson.JSONObject">
|
||||
|
|
@ -163,9 +163,9 @@
|
|||
LEFT JOIN wk_crm_receivables as b on a.contract_id = b.contract_id and b.check_status in (1,10)
|
||||
WHERE a.check_status in (1,10) and a.real_invoice_date BETWEEN #{startTime} and #{endTime}
|
||||
and a.owner_user_id in
|
||||
<for collection="userIds" item="item">
|
||||
<foreach collection="userIds" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</for>
|
||||
</foreach>
|
||||
) as invoice,(
|
||||
SELECT
|
||||
ifnull(sum(a.money),0) as receivablesMoney,
|
||||
|
|
@ -175,9 +175,9 @@
|
|||
LEFT JOIN wk_crm_invoice as b on a.contract_id = b.contract_id
|
||||
WHERE a.check_status in (1,10) and a.return_time BETWEEN #{startTime} and #{endTime}
|
||||
and a.owner_user_id in
|
||||
<for collection="userIds" item="item">
|
||||
<foreach collection="userIds" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</for>
|
||||
</foreach>
|
||||
) as receivables
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "https://www.72crm.com/mybatis-3.5.3-mapper.dtd">
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.kakarote.bi.mapper.BiFunnelMapper">
|
||||
<select id="sellFunnel" resultType="com.alibaba.fastjson.JSONObject">
|
||||
SELECT COUNT(1) as count,
|
||||
|
|
@ -10,9 +10,9 @@
|
|||
LEFT JOIN wk_crm_business_status as ccbs ON ccbs.status_id = ccb.status_id and ccb.status = 1
|
||||
where ccbs.type_id = #{typeId} and ccb.is_end = 0
|
||||
and ccb.owner_user_id in
|
||||
<for collection="userIds" item="item">
|
||||
<foreach collection="userIds" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</for>
|
||||
</foreach>
|
||||
and DATE_FORMAT(create_time,#{sqlDateFormat}) between #{beginTime} and #{finalTime}
|
||||
GROUP BY ccbs.`name`,ccbs.order_num,ccb.type_id order by ccbs.order_num
|
||||
</select>
|
||||
|
|
@ -38,9 +38,9 @@
|
|||
status = 1
|
||||
AND (DATE_FORMAT(create_time,#{sqlDateFormat}) between #{beginTime} and #{finalTime})
|
||||
AND owner_user_id IN
|
||||
<for collection="userIds" item="item">
|
||||
<foreach collection="userIds" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</for>
|
||||
</foreach>
|
||||
) t
|
||||
GROUP BY t.type
|
||||
) a
|
||||
|
|
@ -58,9 +58,9 @@
|
|||
status = 1
|
||||
AND (DATE_FORMAT(create_time,#{sqlDateFormat}) between #{beginTime} and #{finalTime})
|
||||
AND owner_user_id IN
|
||||
<for collection="userIds" item="item">
|
||||
<foreach collection="userIds" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</for>
|
||||
</foreach>
|
||||
) t
|
||||
GROUP BY t.type
|
||||
) b ON a.type = b.type
|
||||
|
|
@ -86,9 +86,9 @@
|
|||
WHERE
|
||||
(DATE_FORMAT(create_time,#{sqlDateFormat}) between #{beginTime} and #{finalTime})
|
||||
AND owner_user_id IN
|
||||
<for collection="userIds" item="item">
|
||||
<foreach collection="userIds" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</for>
|
||||
</foreach>
|
||||
AND STATUS = 1
|
||||
) t
|
||||
GROUP BY t.type
|
||||
|
|
@ -107,9 +107,9 @@
|
|||
(DATE_FORMAT(create_time,#{sqlDateFormat}) between #{beginTime} and #{finalTime})
|
||||
AND is_end = 1
|
||||
AND owner_user_id IN
|
||||
<for collection="userIds" item="item">
|
||||
<foreach collection="userIds" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</for>
|
||||
</foreach>
|
||||
AND STATUS = 1
|
||||
) t
|
||||
GROUP BY t.type
|
||||
|
|
@ -128,9 +128,9 @@
|
|||
(DATE_FORMAT(create_time,#{sqlDateFormat}) between #{beginTime} and #{finalTime})
|
||||
AND is_end = 1
|
||||
AND owner_user_id IN
|
||||
<for collection="userIds" item="item">
|
||||
<foreach collection="userIds" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</for>
|
||||
</foreach>
|
||||
AND STATUS = 1
|
||||
) t
|
||||
GROUP BY t.type
|
||||
|
|
@ -153,9 +153,9 @@
|
|||
left join wk_crm_business_status e on e.status_id = a.status_id
|
||||
left join wk_crm_business_type f on f.type_id = a.type_id
|
||||
where a.owner_user_id in
|
||||
<for collection="userIds" item="item">
|
||||
<foreach collection="userIds" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</for>
|
||||
</foreach>
|
||||
and date_format(a.create_time,#{sqlDateFormat}) = #{time} and a.status = 1
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "https://www.72crm.com/mybatis-3.5.3-mapper.dtd">
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.kakarote.bi.mapper.BiMapper">
|
||||
<select id="queryProductSell" resultType="com.kakarote.bi.entity.VO.ProductStatisticsVO">
|
||||
SELECT
|
||||
|
|
@ -16,9 +16,9 @@
|
|||
LEFT JOIN wk_crm_product_category as d on c.category_id=d.category_id
|
||||
WHERE DATE_FORMAT(a.order_date,#{sqlDateFormat}) between #{beginTime} and #{finalTime}
|
||||
and a.owner_user_id in
|
||||
<for collection="userIds" item="item">
|
||||
<foreach collection="userIds" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</for>
|
||||
</foreach>
|
||||
GROUP BY b.product_id
|
||||
limit ${page},${limit}
|
||||
</select>
|
||||
|
|
@ -34,9 +34,9 @@
|
|||
JOIN wk_crm_contract_product AS b ON a.contract_id = b.contract_id
|
||||
WHERE DATE_FORMAT(a.order_date,#{sqlDateFormat}) between #{beginTime} and #{finalTime}
|
||||
and a.owner_user_id in
|
||||
<for collection="userIds" item="item">
|
||||
<foreach collection="userIds" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</for>
|
||||
</foreach>
|
||||
GROUP BY b.product_id
|
||||
) as a
|
||||
</select>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "https://www.72crm.com/mybatis-3.5.3-mapper.dtd">
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.kakarote.bi.mapper.BiRankMapper">
|
||||
<select id="addressAnalyse" resultType="com.alibaba.fastjson.JSONObject">
|
||||
<foreach collection="address" item="x" separator="union all">
|
||||
|
|
@ -8,9 +8,9 @@
|
|||
sum(deal_status) as dealCustomer
|
||||
FROM wk_crm_customer as ccc
|
||||
where left(ccc.address,INSTR(ccc.address, ',') - 1) like concat('%','${x}','%') and ccc.owner_user_id in
|
||||
<for collection="userIds" item="item">
|
||||
<foreach collection="userIds" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</for>
|
||||
</foreach>
|
||||
and DATE_FORMAT(ccc.create_time,'${sqlDateFormat}') between #{beginTime} and #{finalTime}
|
||||
</foreach>
|
||||
</select>
|
||||
|
|
@ -23,9 +23,9 @@
|
|||
LEFT JOIN wk_crm_customer_data as b on a.batch_id=b.batch_id
|
||||
and b.`name`= (select field_name from wk_crm_field where label = 2 and field_name = 'industry')
|
||||
where a.status !=3 and a.owner_user_id in
|
||||
<for collection="userIds" item="item">
|
||||
<foreach collection="userIds" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</for>
|
||||
</foreach>
|
||||
<choose>
|
||||
<when test="type == 1">
|
||||
and to_days(NOW()) = TO_DAYS(a.create_time)
|
||||
|
|
@ -72,9 +72,9 @@
|
|||
LEFT JOIN wk_crm_customer_data as b on a.batch_id=b.batch_id
|
||||
and b.`name`= (select field_name from wk_crm_field where label = 2 and field_name = 'level')
|
||||
where a.status !=3 and a.owner_user_id in
|
||||
<for collection="userIds" item="item">
|
||||
<foreach collection="userIds" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</for>
|
||||
</foreach>
|
||||
<choose>
|
||||
<when test="type == 1">
|
||||
and to_days(NOW()) = TO_DAYS(a.create_time)
|
||||
|
|
@ -121,9 +121,9 @@
|
|||
LEFT JOIN wk_crm_customer_data as b on a.batch_id=b.batch_id
|
||||
and b.`name`= (select field_name from wk_crm_field where label = 2 and field_name = 'source')
|
||||
where a.status !=3 and a.owner_user_id in
|
||||
<for collection="userIds" item="item">
|
||||
<foreach collection="userIds" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</for>
|
||||
</foreach>
|
||||
<choose>
|
||||
<when test="type == 1">
|
||||
and to_days(NOW()) = TO_DAYS(a.create_time)
|
||||
|
|
@ -171,9 +171,9 @@
|
|||
WHERE
|
||||
d.check_status = 1
|
||||
and d.owner_user_id in
|
||||
<for collection="userIds" item="item">
|
||||
<foreach collection="userIds" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</for>
|
||||
</foreach>
|
||||
<choose>
|
||||
<when test="type == 1">
|
||||
and to_days(NOW()) = TO_DAYS(d.order_date)
|
||||
|
|
@ -219,9 +219,9 @@
|
|||
left join wk_admin_dept as cad on cad.dept_id = cau.dept_id
|
||||
WHERE check_status in (1,10)
|
||||
and cct.owner_user_id in
|
||||
<for collection="userIds" item="item">
|
||||
<foreach collection="userIds" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</for>
|
||||
</foreach>
|
||||
and DATE_FORMAT(order_date,'${sqlDateFormat}') between #{beginTime} and #{finalTime}
|
||||
GROUP BY cct.owner_user_id
|
||||
ORDER BY money DESC
|
||||
|
|
@ -234,9 +234,9 @@
|
|||
left join wk_admin_dept as cad on cad.dept_id = cau.dept_id
|
||||
WHERE check_status in (1,10)
|
||||
and cct.owner_user_id in
|
||||
<for collection="userIds" item="item">
|
||||
<foreach collection="userIds" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</for>
|
||||
</foreach>
|
||||
and DATE_FORMAT(return_time,'${sqlDateFormat}') between #{beginTime} and #{finalTime}
|
||||
GROUP BY cct.owner_user_id
|
||||
ORDER BY money DESC
|
||||
|
|
@ -249,9 +249,9 @@
|
|||
left join wk_admin_dept as cad on cad.dept_id = cau.dept_id
|
||||
WHERE check_status != 7
|
||||
and cct.owner_user_id in
|
||||
<for collection="userIds" item="item">
|
||||
<foreach collection="userIds" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</for>
|
||||
</foreach>
|
||||
and DATE_FORMAT(order_date,'${sqlDateFormat}') between #{beginTime} and #{finalTime}
|
||||
GROUP BY cct.owner_user_id
|
||||
ORDER BY count DESC
|
||||
|
|
@ -265,9 +265,9 @@
|
|||
left join wk_admin_dept as cad on cad.dept_id = cau.dept_id
|
||||
WHERE check_status = 1
|
||||
and cct.owner_user_id in
|
||||
<for collection="userIds" item="item">
|
||||
<foreach collection="userIds" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</for>
|
||||
</foreach>
|
||||
and DATE_FORMAT(order_date,'${sqlDateFormat}') between #{beginTime} and #{finalTime}
|
||||
GROUP BY cct.owner_user_id
|
||||
ORDER BY count DESC
|
||||
|
|
@ -281,9 +281,9 @@
|
|||
left join wk_admin_dept as cad on cad.dept_id = cau.dept_id
|
||||
WHERE cct.status != 3 and
|
||||
cct.owner_user_id in
|
||||
<for collection="userIds" item="item">
|
||||
<foreach collection="userIds" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</for>
|
||||
</foreach>
|
||||
and DATE_FORMAT(cct.create_time,'${sqlDateFormat}') between #{beginTime} and #{finalTime}
|
||||
GROUP BY cct.owner_user_id
|
||||
ORDER BY count DESC
|
||||
|
|
@ -295,9 +295,9 @@
|
|||
LEFT JOIN wk_admin_user as cau on cau.user_id = cct.create_user_id
|
||||
left join wk_admin_dept as cad on cad.dept_id = cau.dept_id
|
||||
WHERE cct.create_user_id in
|
||||
<for collection="userIds" item="item">
|
||||
<foreach collection="userIds" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</for>
|
||||
</foreach>
|
||||
and DATE_FORMAT(cct.create_time,'${sqlDateFormat}') between #{beginTime} and #{finalTime}
|
||||
GROUP BY cct.create_user_id
|
||||
ORDER BY count DESC
|
||||
|
|
@ -346,9 +346,9 @@
|
|||
left JOIN wk_admin_user cau on cau.user_id = v.create_user_id
|
||||
inner JOIN wk_admin_dept cad ON cad.dept_id = cau.dept_id
|
||||
WHERE cau.user_id in
|
||||
<for collection="userIds" item="item">
|
||||
<foreach collection="userIds" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</for>
|
||||
</foreach>
|
||||
GROUP BY cau.user_id
|
||||
order by count desc
|
||||
</select>
|
||||
|
|
@ -362,9 +362,9 @@
|
|||
WHERE if(ccr.activity_type = 2,c.status != 3,1=1)
|
||||
and ccr.type = 1 and
|
||||
ccr.create_user_id in
|
||||
<for collection="userIds" item="item">
|
||||
<foreach collection="userIds" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</for>
|
||||
</foreach>
|
||||
and DATE_FORMAT(ccr.create_time,'${sqlDateFormat}') between #{beginTime} and #{finalTime}
|
||||
GROUP BY ccr.create_user_id
|
||||
ORDER BY count DESC
|
||||
|
|
@ -379,9 +379,9 @@
|
|||
left join wk_admin_dept as cad on cad.dept_id = cau.dept_id
|
||||
WHERE a.type = 3 and
|
||||
coe.create_user_id in
|
||||
<for collection="userIds" item="item">
|
||||
<foreach collection="userIds" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</for>
|
||||
</foreach>
|
||||
and coe.examine_status = 1
|
||||
and DATE_FORMAT(coet.start_time,'${sqlDateFormat}') between #{beginTime} and #{finalTime}
|
||||
GROUP BY coe.create_user_id
|
||||
|
|
@ -393,18 +393,18 @@
|
|||
FROM
|
||||
(select sum(money) as money, owner_user_id from wk_crm_contract where check_status in ('1','10')
|
||||
and owner_user_id in
|
||||
<for collection="data.userIds" item="item">
|
||||
<foreach collection="data.userIds" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</for>
|
||||
</foreach>
|
||||
and DATE_FORMAT(order_date,'${data.sqlDateFormat}') between #{data.beginTime} and #{data.finalTime} group by owner_user_id) as cct
|
||||
LEFT JOIN wk_admin_user as cau on cau.user_id = cct.owner_user_id
|
||||
left join wk_admin_dept as cad on cad.dept_id = cau.dept_id
|
||||
left join ( select sum(x.achievement) as achievement,x.user_id from (
|
||||
<foreach collection="monthMap" item="x" separator="union all" >
|
||||
select ${x.month} as achievement,obj_id as user_id from wk_crm_achievement where obj_id in
|
||||
<for collection="data.userIds" item="item">
|
||||
<foreach collection="data.userIds" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</for>
|
||||
</foreach>
|
||||
and year = #{x.year} and type = 3 and status = 1
|
||||
</foreach>
|
||||
) as x group by user_id) as y ON y.user_id = cct.owner_user_id
|
||||
|
|
@ -419,18 +419,18 @@
|
|||
FROM
|
||||
(select sum(money) as money, owner_user_id from wk_crm_receivables where check_status in ('1','10')
|
||||
and owner_user_id in
|
||||
<for collection="data.userIds" item="item">
|
||||
<foreach collection="data.userIds" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</for>
|
||||
</foreach>
|
||||
and DATE_FORMAT(return_time,'${data.sqlDateFormat}') between #{data.beginTime} and #{data.finalTime} group by owner_user_id) as cct
|
||||
LEFT JOIN wk_admin_user as cau on cau.user_id = cct.owner_user_id
|
||||
left join wk_admin_dept as cad on cad.dept_id = cau.dept_id
|
||||
left join ( select sum(x.achievement) as achievement,x.user_id from (
|
||||
<foreach collection="monthMap" item="x" separator="union all" >
|
||||
select ${x.month} as achievement,obj_id as user_id from wk_crm_achievement where obj_id in
|
||||
<for collection="data.userIds" item="item">
|
||||
<foreach collection="data.userIds" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</for>
|
||||
</foreach>
|
||||
and year = #{x.year} and type = 3 and status = 2
|
||||
</foreach>
|
||||
) as x group by user_id) as y ON y.user_id = cct.owner_user_id
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "https://www.72crm.com/mybatis-3.5.3-mapper.dtd">
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.kakarote.bi.mapper.BiWorkMapper">
|
||||
<select id="logStatistics" resultType="com.alibaba.fastjson.JSONObject">
|
||||
SELECT b.realname,b.username,b.img,b.user_id,
|
||||
|
|
@ -25,13 +25,13 @@
|
|||
LEFT JOIN wk_oa_examine AS b ON a.user_id = b.create_user_id
|
||||
and (DATE_FORMAT(b.create_time,#{sqlDateFormat}) between #{beginTime} and #{finalTime})
|
||||
where a.user_id in
|
||||
<for collection="userIds" item="item">
|
||||
<foreach collection="userIds" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</for>
|
||||
</foreach>
|
||||
and b.category_id in
|
||||
<for collection="categorys" item="item">
|
||||
<foreach collection="categorys" item="item" open="(" separator="," close=")">
|
||||
#{item.examineId}
|
||||
</for>
|
||||
</foreach>
|
||||
and b.examine_status = 1
|
||||
GROUP BY a.user_id
|
||||
</select>
|
||||
|
|
|
|||
|
|
@ -20,6 +20,8 @@ public class PageEntity {
|
|||
@ApiModelProperty(value = "是否分页,0:不分页 1 分页", allowableValues = "0,1")
|
||||
private Integer pageType = 1;
|
||||
|
||||
private Integer offset = 0;
|
||||
|
||||
public <T> BasePage<T> parse() {
|
||||
BasePage<T> page = new BasePage<>(getPage(), getLimit());
|
||||
if (Objects.equals(0, pageType)) {
|
||||
|
|
|
|||
|
|
@ -30,6 +30,29 @@ public class EsDataEncryptUtil {
|
|||
return encryptionService;
|
||||
}
|
||||
|
||||
/**
|
||||
* 收集不需要加密的查询字段
|
||||
* @param field
|
||||
* @return
|
||||
*/
|
||||
public static Boolean notRequireEncryptionFields(String field){
|
||||
|
||||
// 初始化一个Set,包含所有不需要加密的字段
|
||||
final Set<String> NOT_ENCRYPTION_FIELDS = new HashSet<>(Arrays.asList(
|
||||
"customerId",
|
||||
"followup",
|
||||
"ownerUserId",
|
||||
"isReceive",
|
||||
"status",
|
||||
"planNum",
|
||||
"checkStatus",
|
||||
"_id"
|
||||
));
|
||||
|
||||
// 检查传入的字段是否不在上述集合中
|
||||
return !NOT_ENCRYPTION_FIELDS.contains(field);
|
||||
}
|
||||
|
||||
/**
|
||||
* 加密Map中的所有String类型字段,但跳过日期类型字段
|
||||
*/
|
||||
|
|
@ -42,8 +65,8 @@ public class EsDataEncryptUtil {
|
|||
for (Map.Entry<String, Object> entry : map.entrySet()) {
|
||||
String key = entry.getKey();
|
||||
Object value = entry.getValue();
|
||||
// 检查是否为日期类型字段,如果是则不加密
|
||||
if (isDateField(key) && value instanceof String) {
|
||||
// 日期字段和planNum加密
|
||||
if ((isDateField(key) && value instanceof String) || !notRequireEncryptionFields(key)) {
|
||||
encryptedMap.put(key, value);
|
||||
} else {
|
||||
encryptedMap.put(key, encryptValue(value));
|
||||
|
|
|
|||
|
|
@ -254,7 +254,9 @@ public class ElasticUtil {
|
|||
Map<String, Object> map = new HashMap<>();
|
||||
if (value instanceof String) {
|
||||
String strValue = (String) value;
|
||||
if (!strValue.isEmpty() && !strValue.startsWith(Const.ENCRYPTED_PREFIX)) {
|
||||
if (!strValue.isEmpty()
|
||||
&& !strValue.startsWith(Const.ENCRYPTED_PREFIX)
|
||||
&& EsDataEncryptUtil.notRequireEncryptionFields(fieldName)) {
|
||||
map.put(fieldName, Const.ENCRYPTED_PREFIX + ApplicationContextHolder.getBean(EncryptionService.class).deterministicEncryptAes(strValue));
|
||||
} else {
|
||||
map.put(fieldName, value);
|
||||
|
|
@ -306,15 +308,17 @@ public class ElasticUtil {
|
|||
|
||||
// 对需要加密的字段值进行加密处理
|
||||
List<String> encryptedValues = new ArrayList<>();
|
||||
for (String value : search.getValues()) {
|
||||
if (!value.isEmpty() && !value.startsWith(Const.ENCRYPTED_PREFIX)) {
|
||||
// 添加加密前缀并进行AES加密
|
||||
encryptedValues.add(Const.ENCRYPTED_PREFIX + ApplicationContextHolder.getBean(EncryptionService.class).deterministicEncryptAes(value));
|
||||
} else {
|
||||
encryptedValues.add(value);
|
||||
if (EsDataEncryptUtil.notRequireEncryptionFields(search.getName())){
|
||||
for (String value : search.getValues()) {
|
||||
if (!value.isEmpty() && !value.startsWith(Const.ENCRYPTED_PREFIX)) {
|
||||
// 添加加密前缀并进行AES加密
|
||||
encryptedValues.add(Const.ENCRYPTED_PREFIX + ApplicationContextHolder.getBean(EncryptionService.class).deterministicEncryptAes(value));
|
||||
} else {
|
||||
encryptedValues.add(value);
|
||||
}
|
||||
}
|
||||
search.setValues(encryptedValues);
|
||||
}
|
||||
search.setValues(encryptedValues);
|
||||
switch (search.getSearchEnum()) {
|
||||
case IS:
|
||||
queryBuilder.filter(QueryBuilders.termsQuery(search.getName(), search.getValues()));
|
||||
|
|
|
|||
|
|
@ -269,5 +269,11 @@ public class CrmCustomerPoolController {
|
|||
JSONObject object = crmCustomerPoolService.queryAuthByPoolId(poolId);
|
||||
return Result.ok(object);
|
||||
}
|
||||
|
||||
@PostMapping("/uploadExcelForZdfddwmd")
|
||||
@ApiOperation("根据导入的Excel,返回重点辅导单位名单公海")
|
||||
public void uploadExcelForZdfddwmd(@RequestParam("file") MultipartFile file) throws IOException {
|
||||
crmCustomerPoolService.uploadExcelForZdfddwmd(file);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ public class CrmGsdjxxController {
|
|||
private ICrmGsdjxxService iCrmGsdjxxService;
|
||||
|
||||
@PostMapping("/queryByMonthAndXzqhDm")
|
||||
@ApiOperation("根据月份和行政区划代码查询工商登记信息")
|
||||
@ApiOperation("根据月份和行政区划代码同步工商登记信息")
|
||||
public Result<List<CrmQueryGsdjxxVO>> queryByMonthAndXzqhDm(@RequestBody CrmQueryGsdjxxDTO crmQueryGsdjxxDTO) throws Exception {
|
||||
List<CrmQueryGsdjxxVO> crmQueryGsdjxxVOList = iCrmGsdjxxService.queryByMonthAndXzqhDm(crmQueryGsdjxxDTO);
|
||||
return R.ok(crmQueryGsdjxxVOList);
|
||||
|
|
@ -40,6 +40,7 @@ public class CrmGsdjxxController {
|
|||
@PostMapping("/queryGsdjxxByDate")
|
||||
@ApiOperation("根据日期查询(默认是当天)")
|
||||
public Result<BasePage<Map<String, Object>>> queryGsdjxxByDate(@RequestBody CrmQueryGsdjxxDTO crmQueryGsdjxxDTO) {
|
||||
crmQueryGsdjxxDTO.setPage(1);
|
||||
BasePage<Map<String, Object>> basePage = iCrmGsdjxxService.queryGsdjxxByDate(crmQueryGsdjxxDTO);
|
||||
return R.ok(basePage);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,93 @@
|
|||
package com.kakarote.crm.controller;
|
||||
|
||||
|
||||
import com.kakarote.core.common.R;
|
||||
import com.kakarote.core.common.Result;
|
||||
import com.kakarote.core.entity.BasePage;
|
||||
import com.kakarote.crm.entity.DTO.ZjzbSwjgDTO;
|
||||
import com.kakarote.crm.entity.PO.CrmSbzjjg;
|
||||
import com.kakarote.crm.entity.VO.*;
|
||||
import com.kakarote.crm.service.ICrmSbzjjgService;
|
||||
import com.kakarote.crm.service.IZjzbSwjgVoService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/crmSbzjjg")
|
||||
@Api(tags = "申报智能自检数据查询模块")
|
||||
public class CrmSbzjjgController {
|
||||
|
||||
@Autowired
|
||||
private ICrmSbzjjgService crmSbzjjgService;
|
||||
|
||||
|
||||
@PostMapping("/accountQuery")
|
||||
@ApiOperation("户次查询")
|
||||
public Result<CrmAccountQueryResponseVO> accountQuery(@RequestBody CrmAccountQueryRequestVO crmAccountQueryRequestVO) {
|
||||
CrmAccountQueryResponseVO crmAccountQueryResponseVO = crmSbzjjgService.accountQuery(crmAccountQueryRequestVO);
|
||||
return R.ok(crmAccountQueryResponseVO);
|
||||
}
|
||||
|
||||
@PostMapping("/accountQueryDetail")
|
||||
@ApiOperation("户次查询明细")
|
||||
public Result<BasePage<CrmSbzjjg>> accountQueryDetail(@RequestBody CrmAccountQueryRequestVO crmAccountQueryRequestVO) {
|
||||
BasePage<CrmSbzjjg> basepage = crmSbzjjgService.accountQueryDetail(crmAccountQueryRequestVO);
|
||||
return R.ok(basepage);
|
||||
}
|
||||
|
||||
@PostMapping("/rankByEnterpriseRisk")
|
||||
@ApiOperation("企业风险排名")
|
||||
public Result<BasePage<Map<String,Object>>> rankByEnterpriseRisk(@RequestBody CrmRankByEnterpriseRiskRequestVO crmRankByEnterpriseRiskRequestVO) {
|
||||
BasePage<Map<String,Object>> basepage = crmSbzjjgService.rankByEnterpriseRisk(crmRankByEnterpriseRiskRequestVO);
|
||||
return R.ok(basepage);
|
||||
}
|
||||
|
||||
@PostMapping("/rankByEnterpriseRiskDetail")
|
||||
@ApiOperation("企业风险排名明细")
|
||||
public Result<BasePage<Map<String,Object>>> rankByEnterpriseRiskDetail(@RequestBody CrmRankByEnterpriseRiskRequestVO crmRankByEnterpriseRiskRequestVO) {
|
||||
BasePage<Map<String,Object>> basepage = crmSbzjjgService.rankByEnterpriseRiskDetail(crmRankByEnterpriseRiskRequestVO);
|
||||
return R.ok(basepage);
|
||||
}
|
||||
|
||||
@PostMapping("/rankByPointerType")
|
||||
@ApiOperation("指标类别排名")
|
||||
public Result<BasePage<Map<String,Object>>> rankByPointerType(@RequestBody CrmRankByPointerTypeRequestVO crmRankByPointerTypeRequestVO) {
|
||||
BasePage<Map<String,Object>> basepage = crmSbzjjgService.rankByPointerType(crmRankByPointerTypeRequestVO);
|
||||
return R.ok(basepage);
|
||||
}
|
||||
|
||||
@PostMapping("/rankByPointerTypeDetail")
|
||||
@ApiOperation("指标类别排名明细")
|
||||
public Result<BasePage<Map<String,Object>>> rankByPointerTypeDetail(@RequestBody CrmRankByPointerTypeRequestVO crmRankByPointerTypeRequestVO) {
|
||||
BasePage<Map<String,Object>> basepage = crmSbzjjgService.rankByPointerTypeDetail(crmRankByPointerTypeRequestVO);
|
||||
return R.ok(basepage);
|
||||
}
|
||||
|
||||
@PostMapping("/importExcelForSbzjjg")
|
||||
@ApiOperation("根据Excel导入申报自检结果信息")
|
||||
public Result<Map<String, Object>> importExcelForSbzjjg(@RequestParam("file") MultipartFile file) throws IOException {
|
||||
Map<String, Object> importResult = crmSbzjjgService.importExcelForSbzjjg(file);
|
||||
return R.ok(importResult);
|
||||
}
|
||||
|
||||
@PostMapping("/exportExcelForSbzjjg")
|
||||
@ApiOperation("导出成Excel")
|
||||
public void importExcelForSbzjjg(@RequestBody CrmAccountQueryRequestVO crmAccountQueryRequestVO, HttpServletResponse response){
|
||||
crmSbzjjgService.exportExcelForSbzjjg(crmAccountQueryRequestVO, response);
|
||||
}
|
||||
|
||||
@PostMapping("/fuzzyQueryByKeyWord")
|
||||
@ApiOperation("模糊查询税收管理员")
|
||||
public Result<List<String>> fuzzyQueryByKeyWord(@RequestParam("keyword") String keyword){
|
||||
return R.ok(crmSbzjjgService.fuzzyQueryByKeyWord(keyword));
|
||||
}
|
||||
}
|
||||
|
|
@ -41,9 +41,9 @@ public class XzqhController
|
|||
*/
|
||||
@GetMapping("/all")
|
||||
@ParamAspect
|
||||
public Result<List<Xzqh>> all(Xzqh xzqh)
|
||||
public Result<List<String>> all(Xzqh xzqh)
|
||||
{
|
||||
List<Xzqh> list = xzqhService.selectXzqhList(xzqh);
|
||||
List<String> list = xzqhService.getXzqhCjListByCode("360103");
|
||||
return R.ok(list);
|
||||
}
|
||||
|
||||
|
|
@ -74,9 +74,9 @@ public class XzqhController
|
|||
* 获取行政区划详细信息
|
||||
*/
|
||||
@GetMapping(value = "/{id}")
|
||||
public Result<Xzqh> getInfo(@PathVariable("id") String id)
|
||||
public Result<List<String>> getInfo(@PathVariable("id") String id)
|
||||
{
|
||||
return R.ok(xzqhService.selectXzqhById(id));
|
||||
return R.ok(xzqhService.getXzqhCjListByCode(id));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ import java.util.Objects;
|
|||
* @CreateTime: 2025/12/10
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/zjzbdmVo")
|
||||
@RequestMapping("/crmZjzbdmVo")
|
||||
@Api(tags = "自检指标代码")
|
||||
@Slf4j
|
||||
public class ZjzbdmVoController {
|
||||
|
|
@ -59,6 +59,14 @@ public class ZjzbdmVoController {
|
|||
return R.ok(zjzbdmVoIPage);
|
||||
}
|
||||
|
||||
@GetMapping("/list")
|
||||
@ApiOperation("查询全部")
|
||||
public Result<List<ZjzbdmVo>> getZjzbdmVoList(){
|
||||
List<ZjzbdmVo> list = zjzbdmVoService.lambdaQuery()
|
||||
.select(ZjzbdmVo::getZbDm, ZjzbdmVo::getZbmc)
|
||||
.list();
|
||||
return R.ok(list);
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("/insert")
|
||||
|
|
|
|||
|
|
@ -24,6 +24,9 @@ public class CrmQueryGsdjxxDTO implements Serializable {
|
|||
// 地址
|
||||
private String xzqhMc;
|
||||
|
||||
// 页码
|
||||
private Integer page;
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "{" +
|
||||
|
|
|
|||
|
|
@ -37,6 +37,31 @@ public class CrmQyfxmx implements Serializable {
|
|||
|
||||
/**
|
||||
* 风险指标代码
|
||||
* SBH02(疑似三无企业风险)
|
||||
* SBQ01 (行业认定疑点监控)
|
||||
* SBQ02(有增值税无所得税)
|
||||
* SBQ03(有增值税无附加税)
|
||||
* SBQ04(特定行业消费税及附加未认定)
|
||||
* SBQ05(广告娱乐服务类征收主体是否认定文化事业建设费税费种)
|
||||
* SBQ06(税费种认定是否漏项指标)
|
||||
* SBQ07(对经营地址进行分析,对不含“乡”、“镇”、“号”、“数字”的企业进行取数)
|
||||
* SBQ09(企业未认定残疾人就业保障金提醒)
|
||||
* SBQ10(企业未认定工会经费)
|
||||
* SBQ11(用人单位缴费工资基数不一致)
|
||||
* SBQ12(新登记企业参保监控)
|
||||
* SBQ13 (个体工商户不属于残保金缴费人)
|
||||
* SBQ14 (工会经费认定级次错误)
|
||||
* SBQ15 (文化事业建设费认定期限错误)
|
||||
* SBQ16 (采矿业企业未认定水土保持补偿费)
|
||||
* SBZ04 (重点群体违规享受优惠指标)
|
||||
* SBZ06(工业、商贸企业取得服务费发票异常)
|
||||
* SBZ07 (蔬菜、鲜活肉蛋禽等发票流通环节用于进项抵扣)
|
||||
* SBZ08 (消费服务发票异常抵扣疑点筛查。用于消费的餐饮服务、居民日常服务、娱乐服务类专用发票违规勾选抵扣。)
|
||||
* SBZ14 (印花税与财务报表申报不一致疑点筛查)
|
||||
* SBZ21 (当月未申报明细监控)
|
||||
* SBZ22 (当月未缴费明细监控)
|
||||
* SBZ23 (30天内未申报缴费工资职工明细监控)
|
||||
* 宜春风险
|
||||
*/
|
||||
@TableField(typeHandler = SensitiveDataConverter.class, jdbcType = JdbcType.VARCHAR)
|
||||
private String fxzbDm;
|
||||
|
|
|
|||
|
|
@ -37,7 +37,6 @@ public class CrmQyjbxx implements Serializable {
|
|||
/**
|
||||
* 企业登记序号
|
||||
*/
|
||||
@TableField(typeHandler = SensitiveDataConverter.class, jdbcType = JdbcType.VARCHAR)
|
||||
private String djxh;
|
||||
|
||||
/**
|
||||
|
|
@ -135,7 +134,7 @@ public class CrmQyjbxx implements Serializable {
|
|||
private String zgswskfjDm;
|
||||
|
||||
/**
|
||||
* shxydm
|
||||
* 社会信用代码
|
||||
*/
|
||||
@TableField(typeHandler = SensitiveDataConverter.class, jdbcType = JdbcType.VARCHAR)
|
||||
private String shxydm;
|
||||
|
|
|
|||
|
|
@ -0,0 +1,190 @@
|
|||
package com.kakarote.crm.entity.PO;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.kakarote.core.entity.PageEntity;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
@TableName("wk_crm_sbzjjg")
|
||||
@ApiModel(value="CrmSbzjjg对象", description="申报自检结果")
|
||||
public class CrmSbzjjg implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(value = "info_id", type = IdType.AUTO)
|
||||
/**
|
||||
* 申报自检结果ID primary key
|
||||
*/
|
||||
private Integer infoId;
|
||||
|
||||
/**
|
||||
* 指标id
|
||||
*/
|
||||
private Integer zbId;
|
||||
|
||||
/**
|
||||
* 纳税人名称
|
||||
*/
|
||||
private String nsrmc;
|
||||
|
||||
/**
|
||||
* 统一社会信用代码(纳税人识别号)
|
||||
*/
|
||||
private String nsrsbh;
|
||||
|
||||
/**
|
||||
* 登记注册类型
|
||||
*/
|
||||
private String djzclxmc;
|
||||
|
||||
/**
|
||||
* 登记注册类型代码
|
||||
*/
|
||||
private String djzclxDm;
|
||||
|
||||
/**
|
||||
* 课征主体登记类型
|
||||
*/
|
||||
private String kzztdjlxmc;
|
||||
|
||||
/**
|
||||
* 课征主体登记类型代码
|
||||
*/
|
||||
private String kzztdjlxDm;
|
||||
|
||||
/**
|
||||
* 行业
|
||||
*/
|
||||
private String hymc;
|
||||
|
||||
/**
|
||||
* 行业代码
|
||||
*/
|
||||
private String hyDm;
|
||||
|
||||
/**
|
||||
* 主管税务机关
|
||||
*/
|
||||
private String zgswjgmc;
|
||||
|
||||
/**
|
||||
* 主管税务机关代码
|
||||
*/
|
||||
private String zgswjgDm;
|
||||
|
||||
/**
|
||||
* 主管税务所(分局)
|
||||
*/
|
||||
private String zgswjgkfjmc;
|
||||
|
||||
/**
|
||||
* 主管税务所(分局)代码
|
||||
*/
|
||||
private String zgswjgkfjDm;
|
||||
|
||||
/**
|
||||
* 征收项目
|
||||
*/
|
||||
private String zsxmmc;
|
||||
|
||||
/**
|
||||
* 征收项目代码
|
||||
*/
|
||||
private String zsxmDm;
|
||||
|
||||
/**
|
||||
* 应征凭证类型
|
||||
*/
|
||||
private String yzpzzl;
|
||||
|
||||
/**
|
||||
* 应征凭证类型代码
|
||||
*/
|
||||
private String yzpzzlDm;
|
||||
|
||||
/**
|
||||
* 自检指标名称
|
||||
*/
|
||||
private String zjzbmc;
|
||||
|
||||
/**
|
||||
* 税收管理员
|
||||
*/
|
||||
private String ssgly;
|
||||
|
||||
/**
|
||||
* 税款所属期起
|
||||
*/
|
||||
private String skssqq;
|
||||
|
||||
/**
|
||||
* 税款所属期止
|
||||
*/
|
||||
private String skssqz;
|
||||
|
||||
/**
|
||||
* 首次申报日期
|
||||
*/
|
||||
private String scsbrq;
|
||||
|
||||
/**
|
||||
* 最新申报日期
|
||||
*/
|
||||
private String zxsbrq;
|
||||
|
||||
/**
|
||||
* 自检结果提示信息
|
||||
*/
|
||||
private String zjjgts;
|
||||
|
||||
/**
|
||||
* 历史提示信息
|
||||
*/
|
||||
private String lstsxx;
|
||||
|
||||
/**
|
||||
* 自检日期
|
||||
*/
|
||||
private String zjrq;
|
||||
|
||||
/**
|
||||
* 自检出问题时申报应补(退)税额
|
||||
*/
|
||||
private Double ybtse1;
|
||||
|
||||
/**
|
||||
* 问题已解决后的申报应补(退)税额
|
||||
*/
|
||||
private Double ybtse2;
|
||||
|
||||
/**
|
||||
* 补正税款金额
|
||||
*/
|
||||
private Double bzskje;
|
||||
|
||||
/**
|
||||
* 自检问题处理状态
|
||||
*/
|
||||
private String zjztmc;
|
||||
|
||||
/**
|
||||
* 自检问题处理状态代码
|
||||
*/
|
||||
private String zjztDm;
|
||||
|
||||
/**
|
||||
* 创建事件
|
||||
*/
|
||||
private Date createTime;
|
||||
}
|
||||
|
|
@ -23,29 +23,26 @@ public class CrmSwjg implements Serializable {
|
|||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(value = "swjg_id", type = IdType.AUTO)
|
||||
/**
|
||||
* 税务机关Id primary key
|
||||
*/
|
||||
private Integer swjgId;
|
||||
|
||||
/**
|
||||
* 税务机关名称
|
||||
*/
|
||||
@TableField(typeHandler = SensitiveDataConverter.class, jdbcType = JdbcType.VARCHAR)
|
||||
private String swjgmc;
|
||||
|
||||
/**
|
||||
* 税务机关代码
|
||||
* 税务机关代码 primary key
|
||||
*/
|
||||
private String swjgDm;
|
||||
|
||||
/**
|
||||
* 税务机关名称
|
||||
*/
|
||||
private String swjgmc;
|
||||
|
||||
/**
|
||||
* 税务机关简称
|
||||
*/
|
||||
@TableField(typeHandler = SensitiveDataConverter.class, jdbcType = JdbcType.VARCHAR)
|
||||
private String swjgjc;
|
||||
|
||||
/**
|
||||
* 税务机关标志
|
||||
*/
|
||||
private String swjgbz;
|
||||
|
||||
/**
|
||||
* 上级税务机关代码
|
||||
*/
|
||||
|
|
@ -54,60 +51,45 @@ public class CrmSwjg implements Serializable {
|
|||
/**
|
||||
* 机构级次代码
|
||||
*/
|
||||
@TableField(typeHandler = SensitiveDataConverter.class, jdbcType = JdbcType.VARCHAR)
|
||||
private String jgjcDm;
|
||||
|
||||
/**
|
||||
* 行政区划数字代码
|
||||
*/
|
||||
@TableField(typeHandler = SensitiveDataConverter.class, jdbcType = JdbcType.VARCHAR)
|
||||
private String xzqhszDm;
|
||||
|
||||
/**
|
||||
* 选用标志
|
||||
*/
|
||||
@TableField(typeHandler = SensitiveDataConverter.class, jdbcType = JdbcType.VARCHAR)
|
||||
private String xybz;
|
||||
|
||||
/**
|
||||
* 有效标志
|
||||
*/
|
||||
@TableField(typeHandler = SensitiveDataConverter.class, jdbcType = JdbcType.VARCHAR)
|
||||
private String yxbz;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private String gdslxDm;
|
||||
|
||||
/**
|
||||
* 办税服务厅标志
|
||||
*/
|
||||
@TableField(typeHandler = SensitiveDataConverter.class, jdbcType = JdbcType.VARCHAR)
|
||||
private String bsfwtbz;
|
||||
|
||||
/**
|
||||
* 客户标志
|
||||
* 管户标志
|
||||
*/
|
||||
@TableField(typeHandler = SensitiveDataConverter.class, jdbcType = JdbcType.VARCHAR)
|
||||
private String ghbz;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*
|
||||
*/
|
||||
@TableField(typeHandler = SensitiveDataConverter.class, jdbcType = JdbcType.VARCHAR)
|
||||
private Date createTime;
|
||||
private String xsxh;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
* 管户税务机关名称
|
||||
*/
|
||||
@TableField(typeHandler = SensitiveDataConverter.class, jdbcType = JdbcType.VARCHAR)
|
||||
private String createBy;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@TableField(typeHandler = SensitiveDataConverter.class, jdbcType = JdbcType.VARCHAR)
|
||||
private Date updateTime;
|
||||
|
||||
/**
|
||||
* 更新人
|
||||
*/
|
||||
@TableField(typeHandler = SensitiveDataConverter.class, jdbcType = JdbcType.VARCHAR)
|
||||
private String updateBy;
|
||||
private String ghswjgmc;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,52 @@
|
|||
package com.kakarote.crm.entity.VO;
|
||||
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.kakarote.core.entity.PageEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class CrmAccountQueryRequestVO extends PageEntity implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
// 主管税务机关代码(必填)
|
||||
private String zgswjg;
|
||||
|
||||
// 主管税务所(分局)代码
|
||||
private String zgsws;
|
||||
|
||||
// 征收项目
|
||||
private String zsxm;
|
||||
|
||||
// 应征凭证类型
|
||||
private String yzpzlx;
|
||||
|
||||
// 自检指标
|
||||
private String zjzbmc;
|
||||
|
||||
// 税收管理员
|
||||
private String ssgly;
|
||||
|
||||
// 申报日期起
|
||||
private String sbrqq;
|
||||
|
||||
// 申报日期止
|
||||
private String sbrqz;
|
||||
|
||||
// 自检日期起
|
||||
private String zjrqq;
|
||||
|
||||
// 自检日期止
|
||||
private String zjrqz;
|
||||
|
||||
// 类型(用于查询明细)
|
||||
private String detailType;
|
||||
}
|
||||
|
|
@ -0,0 +1,68 @@
|
|||
package com.kakarote.crm.entity.VO;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@Data
|
||||
public class CrmAccountQueryResponseVO implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 税务机关:1.主管税务局,2.主管税务所
|
||||
*/
|
||||
private String swjg;
|
||||
|
||||
/**
|
||||
* 税务机关代码
|
||||
*/
|
||||
private String swjgDm;
|
||||
|
||||
/**
|
||||
* 上级税务机关代码
|
||||
*/
|
||||
private String sjSwjgDm;
|
||||
|
||||
/**
|
||||
* 申报自检户次
|
||||
*/
|
||||
private Integer sbzjhc;
|
||||
|
||||
/**
|
||||
* 无需处理户次
|
||||
*/
|
||||
private Integer wxclhc;
|
||||
|
||||
/**
|
||||
* 检测通过户次
|
||||
*/
|
||||
private Integer jctghc;
|
||||
|
||||
/**
|
||||
* 未更正户次
|
||||
*/
|
||||
private Integer wgzhc;
|
||||
|
||||
/**
|
||||
* 已更正(问题未解决)户次
|
||||
*/
|
||||
private Integer ybtse1;
|
||||
|
||||
/**
|
||||
* 已更正(问题已解决)户次
|
||||
*/
|
||||
private Integer ybtse2;
|
||||
|
||||
/**
|
||||
* 补正税款金额
|
||||
*/
|
||||
private Double bzskje;
|
||||
|
||||
/**
|
||||
* 税务所的统计结果
|
||||
*/
|
||||
List<CrmAccountQueryResponseVO> children;
|
||||
}
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
package com.kakarote.crm.entity.VO;
|
||||
|
||||
|
||||
import com.kakarote.core.entity.PageEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class CrmRankByEnterpriseRiskRequestVO extends PageEntity implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
// 主管税务机关
|
||||
private String zgswjg;
|
||||
|
||||
// 自检日期起
|
||||
private String zjrqq;
|
||||
|
||||
// 自检日期止
|
||||
private String zjrqz;
|
||||
|
||||
// 网格员
|
||||
private String wgy;
|
||||
|
||||
// 同时预警风险指标(查询前fxzbNnum个企业)
|
||||
private Integer yjzb = 100;
|
||||
|
||||
// 单位名称(纳税人名称),查询明细的查询条件
|
||||
private String dwmc;
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
package com.kakarote.crm.entity.VO;
|
||||
|
||||
import com.kakarote.core.entity.PageEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class CrmRankByPointerTypeRequestVO extends PageEntity implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
// 指标大类代码
|
||||
private String zbdl;
|
||||
|
||||
// 指标小类代码
|
||||
private String zbxl;
|
||||
|
||||
// 自检日期起
|
||||
private String zjrqq;
|
||||
|
||||
// 自检日期止
|
||||
private String zjrqz;
|
||||
|
||||
// 网格员
|
||||
private String wgy;
|
||||
|
||||
// 同时预警风险指标(查询前X个企业)
|
||||
private Integer yjzb = 100;
|
||||
|
||||
// 自检指标,查询企业明细需要的条件
|
||||
private String zjzb;
|
||||
}
|
||||
|
|
@ -17,7 +17,7 @@ import java.io.Serializable;
|
|||
*/
|
||||
@Setter
|
||||
@Getter
|
||||
@TableName("tax_swjg")
|
||||
@TableName("wk_crm_swjg")
|
||||
public class ZjzbSwjgVo implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,44 @@
|
|||
package com.kakarote.crm.mapper;
|
||||
|
||||
import com.kakarote.core.servlet.BaseMapper;
|
||||
import com.kakarote.crm.entity.PO.CrmSbzjjg;
|
||||
import com.kakarote.crm.entity.VO.*;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
@Mapper
|
||||
public interface CrmSbzjjgMapper extends BaseMapper<CrmSbzjjg> {
|
||||
|
||||
CrmAccountQueryResponseVO accountQuery(@Param("vo") CrmAccountQueryRequestVO crmAccountQueryRequestVO);
|
||||
|
||||
List<CrmSbzjjg> accountQueryDetail(@Param("vo") CrmAccountQueryRequestVO crmAccountQueryRequestVO,
|
||||
@Param("offset") Integer offset,
|
||||
@Param("limit") Integer limit);
|
||||
|
||||
List<Map<String,Object>> rankByEnterpriseRisk(@Param("vo") CrmRankByEnterpriseRiskRequestVO crmRankByEnterpriseRiskRequestVO,
|
||||
@Param("offset") Integer offset,
|
||||
@Param("limit") Integer limit);
|
||||
|
||||
List<String> rankByEnterpriseRiskDetail(@Param("vo") CrmRankByEnterpriseRiskRequestVO crmRankByEnterpriseRiskRequestVO,
|
||||
@Param("offset") Integer offset,
|
||||
@Param("limit") Integer limit);
|
||||
|
||||
List<Map<String,Object>> rankByPointerType(@Param("vo") CrmRankByPointerTypeRequestVO crmRankByPointerTypeRequestVO,
|
||||
@Param("offset") Integer offset,
|
||||
@Param("limit") Integer limit);
|
||||
|
||||
List<String> rankByPointerTypeDetail(@Param("vo") CrmRankByPointerTypeRequestVO crmRankByPointerTypeRequestVO,
|
||||
@Param("offset") Integer offset,
|
||||
@Param("limit") Integer limit
|
||||
);
|
||||
|
||||
int batchInsert(@Param("batchEntities") List<CrmSbzjjg> batchEntities);
|
||||
|
||||
List<String> fuzzyQueryByKeyWord(@Param("keyword") String keyword);
|
||||
|
||||
List<Map<String, Object>> batchCheckExists(@Param("batchEntities") List<CrmSbzjjg> batchEntities);
|
||||
}
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "https://www.72crm.com/mybatis-3.5.3-mapper.dtd">
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.kakarote.crm.mapper.CallRecordMapper">
|
||||
<select id="queryRecord" resultType="com.kakarote.crm.entity.PO.CallRecord">
|
||||
select * from wk_call_record where number = #{number}
|
||||
|
|
@ -28,9 +28,9 @@
|
|||
cr.owner_user_id = hu.user_id
|
||||
)
|
||||
WHERE owner_user_id in
|
||||
<for collection="userIds" item="item">
|
||||
<foreach collection="userIds" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</for>
|
||||
</foreach>
|
||||
and (DATE_FORMAT(cr.create_time,#{sqlDateFormat}) between #{beginTime} and #{finalTime})
|
||||
<if test = "talkTime != null and talkTime != ''">
|
||||
and talk_time ${talkTimeCondition} #{talkTime}
|
||||
|
|
@ -113,9 +113,9 @@
|
|||
FROM
|
||||
`wk_call_record`
|
||||
WHERE owner_user_id in
|
||||
<for collection="userIds" item="item">
|
||||
<foreach collection="userIds" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</for>
|
||||
</foreach>
|
||||
and DATE_FORMAT(create_time,#{sqlDateFormat}) between #{beginTime} and #{finalTime}
|
||||
GROUP BY owner_user_id
|
||||
</select>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "https://www.72crm.com/mybatis-3.5.3-mapper.dtd">
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.kakarote.crm.mapper.CrmActionRecordMapper">
|
||||
<select id="queryRecordList" resultType="com.kakarote.crm.entity.VO.CrmActionRecordVO">
|
||||
select a.*,b.realname,b.img
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "https://www.72crm.com/mybatis-3.5.3-mapper.dtd">
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.kakarote.crm.mapper.CrmActivityMapper">
|
||||
<sql id="baseQuery">
|
||||
<choose>
|
||||
|
|
@ -340,9 +340,9 @@
|
|||
end) as 'crmTypeName'
|
||||
from wk_crm_activity as a
|
||||
where a.create_user_id in
|
||||
<for collection="data.userIds" item="item">
|
||||
<foreach collection="data.userIds" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</for>
|
||||
</foreach>
|
||||
and a.status = 1
|
||||
<choose>
|
||||
<when test="data.queryType == 1">
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "https://www.72crm.com/mybatis-3.5.3-mapper.dtd">
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.kakarote.crm.mapper.CrmActivityRelationMapper">
|
||||
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "https://www.72crm.com/mybatis-3.5.3-mapper.dtd">
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.kakarote.crm.mapper.CrmAuthMapper">
|
||||
<select id="queryAuthNum" resultType="java.lang.Integer">
|
||||
select count(*) from ${tableName} where ${conditions}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "https://www.72crm.com/mybatis-3.5.3-mapper.dtd">
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.kakarote.crm.mapper.CrmBackLogDealMapper">
|
||||
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "https://www.72crm.com/mybatis-3.5.3-mapper.dtd">
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.kakarote.crm.mapper.CrmBackLogMapper">
|
||||
<select id="todayCustomerNum" resultType="java.lang.Integer">
|
||||
select count(*) from wk_crm_customer
|
||||
|
|
@ -47,9 +47,9 @@
|
|||
where (to_days(now()) - to_days(if(a.last_time > a.receive_time,a.last_time,a.receive_time)))
|
||||
between (#{limitDay} - #{remindDay}) and #{limitDay}
|
||||
and a.status = 1 and a.owner_user_id in
|
||||
<for collection="ids" index="i" item="id" open="(" separator="," close=")">
|
||||
<foreach collection="ids" index="i" item="id" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</for>
|
||||
</foreach>
|
||||
<if test="dealHandle == 0">
|
||||
and a.deal_status = 0
|
||||
</if>
|
||||
|
|
@ -70,9 +70,9 @@
|
|||
where (to_days(now()) - to_days(a.receive_time)) between (#{limitDay} - #{remindDay}) and #{limitDay}
|
||||
and a.status = 1 and b.business_id is null
|
||||
and a.owner_user_id in
|
||||
<for collection="ids" index="i" item="id" open="(" separator="," close=")">
|
||||
<foreach collection="ids" index="i" item="id" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</for>
|
||||
</foreach>
|
||||
<if test="dealHandle == 0">
|
||||
and a.deal_status = 0
|
||||
</if>
|
||||
|
|
@ -90,9 +90,9 @@
|
|||
where (to_days(now()) - to_days(a.receive_time)) between (#{limitDay} - #{remindDay}) and #{limitDay}
|
||||
and a.status = 1 and a.deal_status = 0
|
||||
and a.owner_user_id in
|
||||
<for collection="ids" index="i" item="id" open="(" separator="," close=")">
|
||||
<foreach collection="ids" index="i" item="id" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</for>
|
||||
</foreach>
|
||||
<if test="customerLevelSetting == 2">
|
||||
and c.value = #{level}
|
||||
</if>
|
||||
|
|
@ -151,9 +151,9 @@
|
|||
</choose>
|
||||
and c.owner_user_id = #{userId}
|
||||
and a.receivables_plan_id not in
|
||||
<for collection="ids" item="item">
|
||||
<foreach collection="ids" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</for>
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
<select id="remindReceivablesOvertimeNum" resultType="java.lang.Integer">
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "https://www.72crm.com/mybatis-3.5.3-mapper.dtd">
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.kakarote.crm.mapper.CrmBusinessChangeMapper">
|
||||
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "https://www.72crm.com/mybatis-3.5.3-mapper.dtd">
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.kakarote.crm.mapper.CrmBusinessDataMapper">
|
||||
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "https://www.72crm.com/mybatis-3.5.3-mapper.dtd">
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.kakarote.crm.mapper.CrmBusinessMapper">
|
||||
<select id="queryById" resultType="com.kakarote.crm.common.CrmModel">
|
||||
select a.*,b.customer_id,b.customer_name,c.name as type_name,d.name as status_name,
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "https://www.72crm.com/mybatis-3.5.3-mapper.dtd">
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.kakarote.crm.mapper.CrmBusinessProductMapper">
|
||||
<select id="queryList" resultType="com.kakarote.crm.entity.PO.CrmBusinessProduct">
|
||||
select b.product_id,c.name as name,d.name as category_name,b.unit,b.price,b.sales_price,b.num,b.discount,b.subtotal
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "https://www.72crm.com/mybatis-3.5.3-mapper.dtd">
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.kakarote.crm.mapper.CrmBusinessStatusMapper">
|
||||
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "https://www.72crm.com/mybatis-3.5.3-mapper.dtd">
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.kakarote.crm.mapper.CrmBusinessTypeMapper">
|
||||
|
||||
<select id="queryBusinessStatusOptions" resultType="com.kakarote.crm.entity.PO.CrmBusinessType">
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "https://www.72crm.com/mybatis-3.5.3-mapper.dtd">
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.kakarote.crm.mapper.CrmBusinessUserStarMapper">
|
||||
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "https://www.72crm.com/mybatis-3.5.3-mapper.dtd">
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.kakarote.crm.mapper.CrmContactsBusinessMapper">
|
||||
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "https://www.72crm.com/mybatis-3.5.3-mapper.dtd">
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.kakarote.crm.mapper.CrmContactsDataMapper">
|
||||
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "https://www.72crm.com/mybatis-3.5.3-mapper.dtd">
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.kakarote.crm.mapper.CrmContactsMapper">
|
||||
<select id="queryById" resultType="com.kakarote.crm.common.CrmModel">
|
||||
select a.*,b.customer_id,b.customer_name,
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "https://www.72crm.com/mybatis-3.5.3-mapper.dtd">
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.kakarote.crm.mapper.CrmContactsUserStarMapper">
|
||||
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "https://www.72crm.com/mybatis-3.5.3-mapper.dtd">
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.kakarote.crm.mapper.CrmContractDataMapper">
|
||||
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "https://www.72crm.com/mybatis-3.5.3-mapper.dtd">
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.kakarote.crm.mapper.CrmContractMapper">
|
||||
<select id="queryById" resultType="com.kakarote.crm.common.CrmModel">
|
||||
select crt.*,ccc.customer_id,ccc.customer_name,ccb.business_name,a.name as contacts_name,
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "https://www.72crm.com/mybatis-3.5.3-mapper.dtd">
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.kakarote.crm.mapper.CrmContractProductMapper">
|
||||
<select id="queryByContractId" resultType="com.kakarote.crm.entity.PO.CrmContractProduct">
|
||||
SELECT sccp.*,
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "https://www.72crm.com/mybatis-3.5.3-mapper.dtd">
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.kakarote.crm.mapper.CrmCustomerDataMapper">
|
||||
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "https://www.72crm.com/mybatis-3.5.3-mapper.dtd">
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.kakarote.crm.mapper.CrmCustomerMapper">
|
||||
<select id="queryById" resultType="com.kakarote.crm.common.CrmModel">
|
||||
select a.*,(if(a.owner_user_id is null,1,0)) as is_pool,
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "https://www.72crm.com/mybatis-3.5.3-mapper.dtd">
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.kakarote.crm.mapper.CrmCustomerPoolFieldSettingMapper">
|
||||
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "https://www.72crm.com/mybatis-3.5.3-mapper.dtd">
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.kakarote.crm.mapper.CrmCustomerPoolFieldSortMapper">
|
||||
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "https://www.72crm.com/mybatis-3.5.3-mapper.dtd">
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.kakarote.crm.mapper.CrmCustomerPoolFieldStyleMapper">
|
||||
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "https://www.72crm.com/mybatis-3.5.3-mapper.dtd">
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.kakarote.crm.mapper.CrmCustomerPoolMapper">
|
||||
|
||||
<select id="queryPoolIdByUserId" resultType="java.lang.Integer">
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "https://www.72crm.com/mybatis-3.5.3-mapper.dtd">
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.kakarote.crm.mapper.CrmCustomerPoolRelationMapper">
|
||||
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "https://www.72crm.com/mybatis-3.5.3-mapper.dtd">
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.kakarote.crm.mapper.CrmCustomerPoolRuleMapper">
|
||||
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "https://www.72crm.com/mybatis-3.5.3-mapper.dtd">
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.kakarote.crm.mapper.CrmCustomerSettingMapper">
|
||||
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "https://www.72crm.com/mybatis-3.5.3-mapper.dtd">
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.kakarote.crm.mapper.CrmCustomerSettingUserMapper">
|
||||
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "https://www.72crm.com/mybatis-3.5.3-mapper.dtd">
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.kakarote.crm.mapper.CrmCustomerUserStarMapper">
|
||||
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "https://www.72crm.com/mybatis-3.5.3-mapper.dtd">
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.kakarote.crm.mapper.CrmExamineLogMapper">
|
||||
<select id="queryUserByRecordId" resultType="com.alibaba.fastjson.JSONObject">
|
||||
select sael.examine_time as examineTime ,
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "https://www.72crm.com/mybatis-3.5.3-mapper.dtd">
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.kakarote.crm.mapper.CrmExamineMapper">
|
||||
|
||||
<select id="queryExaminePage" resultType="com.kakarote.crm.entity.VO.CrmQueryAllExamineVO">
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "https://www.72crm.com/mybatis-3.5.3-mapper.dtd">
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.kakarote.crm.mapper.CrmExamineRecordMapper">
|
||||
<select id="queryExamineRecordById" resultType="com.alibaba.fastjson.JSONObject">
|
||||
SELECT saer.* ,sau.img,sau.realname from wk_crm_examine_record as saer
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "https://www.72crm.com/mybatis-3.5.3-mapper.dtd">
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.kakarote.crm.mapper.CrmExamineStepMapper">
|
||||
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "https://www.72crm.com/mybatis-3.5.3-mapper.dtd">
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.kakarote.crm.mapper.CrmFieldConfigMapper">
|
||||
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "https://www.72crm.com/mybatis-3.5.3-mapper.dtd">
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.kakarote.crm.mapper.CrmFieldMapper">
|
||||
<select id="verifyFixedField" resultType="java.lang.Integer">
|
||||
SELECT COUNT(*) FROM wk_crm_${tableName} WHERE ${fieldName}=#{value}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "https://www.72crm.com/mybatis-3.5.3-mapper.dtd">
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.kakarote.crm.mapper.CrmFieldSortMapper">
|
||||
<select id="queryListHead" resultType="com.kakarote.crm.entity.VO.CrmFieldSortVO">
|
||||
SELECT
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "https://www.72crm.com/mybatis-3.5.3-mapper.dtd">
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.kakarote.crm.mapper.CrmInstrumentMapper">
|
||||
|
||||
<select id="sellFunnel" resultType="com.alibaba.fastjson.JSONObject">
|
||||
|
|
@ -24,9 +24,9 @@
|
|||
and ccb.is_end = 0
|
||||
</if>
|
||||
and ccb.owner_user_id in
|
||||
<for collection="userIds" item="item">
|
||||
<foreach collection="userIds" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</for>
|
||||
</foreach>
|
||||
and DATE_FORMAT(create_time,#{sqlDateFormat}) between #{beginTime} and #{finalTime}
|
||||
GROUP BY ccbs.`name`,ccbs.order_num,ccb.type_id order by ccbs.order_num
|
||||
</select>
|
||||
|
|
@ -43,9 +43,9 @@
|
|||
and ccb.status_id = #{statusId}
|
||||
and ccb.is_end = 0
|
||||
and ccb.owner_user_id in
|
||||
<for collection="userIds" item="item">
|
||||
<foreach collection="userIds" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</for>
|
||||
</foreach>
|
||||
and DATE_FORMAT(create_time,#{sqlDateFormat}) between #{beginTime} and #{finalTime}
|
||||
</select>
|
||||
|
||||
|
|
@ -63,9 +63,9 @@
|
|||
</otherwise>
|
||||
</choose>
|
||||
AND owner_user_id in
|
||||
<for collection="map.businessUserIds" index="i" item="id" open="(" separator="," close=")">
|
||||
<foreach collection="map.businessUserIds" index="i" item="id" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</for>
|
||||
</foreach>
|
||||
) as businessCount,
|
||||
COUNT(*) as contractCount,
|
||||
IFNULL(SUM(a.money),0) as contractMoney,
|
||||
|
|
@ -79,9 +79,9 @@
|
|||
</otherwise>
|
||||
</choose>
|
||||
AND owner_user_id in
|
||||
<for collection="map.contactsUserIds" index="i" item="id" open="(" separator="," close=")">
|
||||
<foreach collection="map.contactsUserIds" index="i" item="id" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</for>) as contactsCount,
|
||||
</foreach>) as contactsCount,
|
||||
(SELECT COUNT(*) FROM wk_crm_customer as c WHERE status != 3 and
|
||||
DATE_FORMAT(c.create_time,#{time.sqlDateFormat})
|
||||
<choose>
|
||||
|
|
@ -93,9 +93,9 @@
|
|||
</otherwise>
|
||||
</choose>
|
||||
AND owner_user_id in
|
||||
<for collection="map.customerUserIds" index="i" item="id" open="(" separator="," close=")">
|
||||
<foreach collection="map.customerUserIds" index="i" item="id" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</for>) as customerCount,
|
||||
</foreach>) as customerCount,
|
||||
(SELECT IFNULL(SUM(money),0) FROM wk_crm_receivables as c WHERE check_status in ('1','10') and
|
||||
DATE_FORMAT(c.return_time,#{time.sqlDateFormat})
|
||||
<choose>
|
||||
|
|
@ -107,9 +107,9 @@
|
|||
</otherwise>
|
||||
</choose>
|
||||
AND owner_user_id in
|
||||
<for collection="map.receivablesUserIds" index="i" item="id" open="(" separator="," close=")">
|
||||
<foreach collection="map.receivablesUserIds" index="i" item="id" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</for>) as receivablesMoney,
|
||||
</foreach>) as receivablesMoney,
|
||||
(SELECT COUNT(*) FROM wk_crm_activity as c WHERE c.status = 1 and type in (1,4) and
|
||||
DATE_FORMAT(c.create_time,#{time.sqlDateFormat})
|
||||
<choose>
|
||||
|
|
@ -121,9 +121,9 @@
|
|||
</otherwise>
|
||||
</choose>
|
||||
AND create_user_id in
|
||||
<for collection="map.recordUserIds" index="i" item="id" open="(" separator="," close=")">
|
||||
<foreach collection="map.recordUserIds" index="i" item="id" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</for>
|
||||
</foreach>
|
||||
) as recordCount,
|
||||
(SELECT IFNULL(SUM(c.money),0) FROM wk_crm_business as c WHERE c.status =1 and
|
||||
DATE_FORMAT(c.create_time,#{time.sqlDateFormat})
|
||||
|
|
@ -136,9 +136,9 @@
|
|||
</otherwise>
|
||||
</choose>
|
||||
AND owner_user_id in
|
||||
<for collection="map.businessUserIds" index="i" item="id" open="(" separator="," close=")">
|
||||
<foreach collection="map.businessUserIds" index="i" item="id" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</for>) as businessMoney
|
||||
</foreach>) as businessMoney
|
||||
from wk_crm_contract as a
|
||||
WHERE a.check_status in ('1','10') and
|
||||
DATE_FORMAT(a.order_date,#{time.sqlDateFormat})
|
||||
|
|
@ -151,9 +151,9 @@
|
|||
</otherwise>
|
||||
</choose>
|
||||
AND owner_user_id in
|
||||
<for collection="map.contractUserIds" index="i" item="id" open="(" separator="," close=")">
|
||||
<foreach collection="map.contractUserIds" index="i" item="id" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</for> and check_status != 7
|
||||
</foreach> and check_status != 7
|
||||
</select>
|
||||
|
||||
<select id="forgottenCustomerCount" resultType="java.lang.Integer">
|
||||
|
|
@ -161,17 +161,17 @@
|
|||
from `wk_crm_customer` where
|
||||
deal_status = 0 and status != 3 and (to_days(now()) - ifnull(to_days(last_time),to_days(create_time))) > #{day}
|
||||
AND owner_user_id in
|
||||
<for collection="userIds" index="i" item="id" open="(" separator="," close=")">
|
||||
<foreach collection="userIds" index="i" item="id" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</for>
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
<select id="unContactCustomerCount" resultType="java.lang.Integer">
|
||||
select count(*) from wk_crm_customer a
|
||||
where status != 3 and to_days(last_time) < to_days(next_time) and to_days(next_time) < to_days(now()) AND owner_user_id in
|
||||
<for collection="userIds" index="i" item="id" open="(" separator="," close=")">
|
||||
<foreach collection="userIds" index="i" item="id" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</for>
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
<select id="salesTrend" resultType="java.util.HashMap">
|
||||
|
|
@ -182,15 +182,15 @@
|
|||
<choose>
|
||||
<when test="data.deptIds!=null and data.deptIds.size>0">
|
||||
type=2 and obj_id in
|
||||
<for collection="data.deptIds" index="i" item="id" open="(" separator="," close=")">
|
||||
<foreach collection="data.deptIds" index="i" item="id" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</for>
|
||||
</foreach>
|
||||
</when>
|
||||
<otherwise>
|
||||
type=3 and obj_id in
|
||||
<for collection="data.userIds" index="i" item="id" open="(" separator="," close=")">
|
||||
<foreach collection="data.userIds" index="i" item="id" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</for>
|
||||
</foreach>
|
||||
</otherwise>
|
||||
</choose>
|
||||
) as achievement,
|
||||
|
|
@ -220,9 +220,9 @@
|
|||
</otherwise>
|
||||
</choose>,#{time.sqlDateFormat}) =#{time.beginTime}
|
||||
AND owner_user_id in
|
||||
<for collection="data.userIds" index="i" item="id" open="(" separator="," close=")">
|
||||
<foreach collection="data.userIds" index="i" item="id" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</for>
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
<select id="dataInfoCustomer" resultType="java.util.HashMap">
|
||||
|
|
@ -240,9 +240,9 @@
|
|||
</otherwise>
|
||||
</choose>
|
||||
AND owner_user_id in
|
||||
<for collection="ids" index="i" item="id" open="(" separator="," close=")">
|
||||
<foreach collection="ids" index="i" item="id" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</for>
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
<select id="dataInfoCustomerPoolNum" resultType="java.lang.Integer">
|
||||
|
|
@ -269,9 +269,9 @@
|
|||
</otherwise>
|
||||
</choose>
|
||||
in
|
||||
<for collection="ids" index="i" item="id" open="(" separator="," close=")">
|
||||
<foreach collection="ids" index="i" item="id" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</for>
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
<select id="dataInfoBusiness" resultType="java.util.HashMap">
|
||||
|
|
@ -291,9 +291,9 @@
|
|||
</otherwise>
|
||||
</choose>
|
||||
AND owner_user_id in
|
||||
<for collection="ids" index="i" item="id" open="(" separator="," close=")">
|
||||
<foreach collection="ids" index="i" item="id" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</for>
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
<select id="dataInfoEndContractNum" resultType="java.util.HashMap">
|
||||
|
|
@ -302,9 +302,9 @@
|
|||
COUNT(CASE WHEN a.end_time < #{startTime} THEN 1 ELSE null END) as endContract
|
||||
from wk_crm_contract as a
|
||||
where a.owner_user_id in
|
||||
<for collection="ids" index="i" item="id" open="(" separator="," close=")">
|
||||
<foreach collection="ids" index="i" item="id" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</for>
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
<select id="dataInfoContract" resultType="java.util.HashMap">
|
||||
|
|
@ -322,9 +322,9 @@
|
|||
</otherwise>
|
||||
</choose>
|
||||
AND owner_user_id in
|
||||
<for collection="ids" index="i" item="id" open="(" separator="," close=")">
|
||||
<foreach collection="ids" index="i" item="id" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</for>
|
||||
</foreach>
|
||||
</select>
|
||||
<select id="dataInfoReceivablesPlan" resultType="java.util.Map">
|
||||
select IFNULL(SUM(a.unreceived_money),0) as planMoney
|
||||
|
|
@ -342,9 +342,9 @@
|
|||
</otherwise>
|
||||
</choose>
|
||||
AND a.owner_user_id in
|
||||
<for collection="ids" index="i" item="id" open="(" separator="," close=")">
|
||||
<foreach collection="ids" index="i" item="id" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</for>
|
||||
</foreach>
|
||||
</select>
|
||||
<select id="dataInfoReceivables" resultType="java.util.HashMap">
|
||||
SELECT IFNULL(SUM(CASE WHEN check_status='1' or a.check_status = 10 THEN money ELSE 0 END),0) as receivablesMoney
|
||||
|
|
@ -359,9 +359,9 @@
|
|||
</otherwise>
|
||||
</choose>
|
||||
AND owner_user_id in
|
||||
<for collection="ids" index="i" item="id" open="(" separator="," close=")">
|
||||
<foreach collection="ids" index="i" item="id" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</for>
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
<select id="dataInfoActivity" resultType="java.util.HashMap">
|
||||
|
|
@ -377,9 +377,9 @@
|
|||
</otherwise>
|
||||
</choose>
|
||||
AND owner_user_id in
|
||||
<for collection="ids" index="i" item="id" open="(" separator="," close=")">
|
||||
<foreach collection="ids" index="i" item="id" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</for>
|
||||
</foreach>
|
||||
) THEN 1 ELSE NULL END ) as activityRealNum
|
||||
FROM (
|
||||
SELECT
|
||||
|
|
@ -400,9 +400,9 @@
|
|||
</otherwise>
|
||||
</choose>
|
||||
AND b.create_user_id in
|
||||
<for collection="ids" index="i" item="id" open="(" separator="," close=")">
|
||||
<foreach collection="ids" index="i" item="id" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</for>
|
||||
</foreach>
|
||||
and c.status != 3
|
||||
GROUP BY b.activity_type_id
|
||||
) as b
|
||||
|
|
@ -419,15 +419,15 @@
|
|||
<choose>
|
||||
<when test="deptIds.size()>0">
|
||||
type=2 and obj_id in
|
||||
<for collection="deptIds" item="id" open="(" separator="," close=")">
|
||||
<foreach collection="deptIds" item="id" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</for>
|
||||
</foreach>
|
||||
</when>
|
||||
<otherwise>
|
||||
type=3 and obj_id in
|
||||
<for collection="userIds" item="id" open="(" separator="," close=")">
|
||||
<foreach collection="userIds" item="id" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</for>
|
||||
</foreach>
|
||||
</otherwise>
|
||||
</choose>) as achievementMoneys,
|
||||
</if>
|
||||
|
|
@ -459,16 +459,16 @@
|
|||
</otherwise>
|
||||
</choose>
|
||||
and owner_user_id in
|
||||
<for collection="userIds" item="id" open="(" separator="," close=")">
|
||||
<foreach collection="userIds" item="id" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</for>
|
||||
</foreach>
|
||||
</select>
|
||||
<select id="queryRecordCount" resultType="com.alibaba.fastjson.JSONObject">
|
||||
SELECT activity_type as crmType,COUNT(activity_type) as count FROM wk_crm_activity
|
||||
WHERE type in (1,4) and create_user_id in
|
||||
<for collection="data.recordUserIds" index="i" item="id" open="(" separator="," close=")">
|
||||
<foreach collection="data.recordUserIds" index="i" item="id" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</for>
|
||||
</foreach>
|
||||
and status = 1
|
||||
<choose>
|
||||
<when test="data.type == 1">
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "https://www.72crm.com/mybatis-3.5.3-mapper.dtd">
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.kakarote.crm.mapper.CrmInstrumentSortMapper">
|
||||
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "https://www.72crm.com/mybatis-3.5.3-mapper.dtd">
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.kakarote.crm.mapper.CrmInvoiceInfoMapper">
|
||||
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "https://www.72crm.com/mybatis-3.5.3-mapper.dtd">
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.kakarote.crm.mapper.CrmInvoiceMapper">
|
||||
<select id="queryById" resultType="com.kakarote.crm.entity.PO.CrmInvoice">
|
||||
select a.*,b.customer_name,c.num as contract_num,c.money as contract_money,d.realname as
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "https://www.72crm.com/mybatis-3.5.3-mapper.dtd">
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.kakarote.crm.mapper.CrmLeadsDataMapper">
|
||||
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "https://www.72crm.com/mybatis-3.5.3-mapper.dtd">
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.kakarote.crm.mapper.CrmLeadsMapper">
|
||||
<select id="queryById" resultType="com.kakarote.crm.common.CrmModel">
|
||||
select a.*,a.leads_name as name,
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "https://www.72crm.com/mybatis-3.5.3-mapper.dtd">
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.kakarote.crm.mapper.CrmMarketingFieldMapper">
|
||||
<delete id="deleteByChooseId">
|
||||
DELETE FROM wk_crm_marketing_field WHERE field_id not in
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "https://www.72crm.com/mybatis-3.5.3-mapper.dtd">
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.kakarote.crm.mapper.CrmMarketingFormMapper">
|
||||
|
||||
</mapper>
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "https://www.72crm.com/mybatis-3.5.3-mapper.dtd">
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.kakarote.crm.mapper.CrmNumberSettingMapper">
|
||||
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "https://www.72crm.com/mybatis-3.5.3-mapper.dtd">
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.kakarote.crm.mapper.CrmProductCategoryMapper">
|
||||
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "https://www.72crm.com/mybatis-3.5.3-mapper.dtd">
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.kakarote.crm.mapper.CrmProductDataMapper">
|
||||
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "https://www.72crm.com/mybatis-3.5.3-mapper.dtd">
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.kakarote.crm.mapper.CrmProductDetailImgMapper">
|
||||
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "https://www.72crm.com/mybatis-3.5.3-mapper.dtd">
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.kakarote.crm.mapper.CrmProductMapper">
|
||||
<select id="queryById" resultType="com.kakarote.crm.common.CrmModel">
|
||||
select ccp.*, sc.name as category_name
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "https://www.72crm.com/mybatis-3.5.3-mapper.dtd">
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.kakarote.crm.mapper.CrmProductUserMapper">
|
||||
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "https://www.72crm.com/mybatis-3.5.3-mapper.dtd">
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.kakarote.crm.mapper.CrmReceivablesDataMapper">
|
||||
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "https://www.72crm.com/mybatis-3.5.3-mapper.dtd">
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.kakarote.crm.mapper.CrmReceivablesMapper">
|
||||
<select id="queryById" resultType="com.kakarote.crm.common.CrmModel">
|
||||
SELECT
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "https://www.72crm.com/mybatis-3.5.3-mapper.dtd">
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.kakarote.crm.mapper.CrmReceivablesPlanMapper">
|
||||
<select id="queryById" resultType="com.kakarote.crm.common.CrmModel">
|
||||
SELECT
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "https://www.72crm.com/mybatis-3.5.3-mapper.dtd">
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.kakarote.crm.mapper.CrmReturnVisitDataMapper">
|
||||
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "https://www.72crm.com/mybatis-3.5.3-mapper.dtd">
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.kakarote.crm.mapper.CrmReturnVisitMapper">
|
||||
<select id="queryById" resultType="com.kakarote.crm.common.CrmModel">
|
||||
SELECT
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "https://www.72crm.com/mybatis-3.5.3-mapper.dtd">
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.kakarote.crm.mapper.CrmRoleFieldMapper">
|
||||
|
||||
<select id="queryRoleFieldList" resultType="com.kakarote.crm.entity.PO.CrmRoleField">
|
||||
|
|
|
|||
|
|
@ -0,0 +1,287 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.kakarote.crm.mapper.CrmSbzjjgMapper">
|
||||
<resultMap id="BaseResultMap" type="com.kakarote.crm.entity.PO.CrmSbzjjg">
|
||||
<result column="info_id" jdbcType="INTEGER" property="infoId" />
|
||||
<result column="zb_id" jdbcType="INTEGER" property="zbId" />
|
||||
<result column="nsrmc" jdbcType="VARCHAR" property="nsrmc" />
|
||||
<result column="nsrsbh" jdbcType="VARCHAR" property="nsrsbh" />
|
||||
<result column="djzclxmc" jdbcType="VARCHAR" property="djzclxmc" />
|
||||
<result column="djzclx_dm" jdbcType="VARCHAR" property="djzclxDm" />
|
||||
<result column="kzztdjlxmc" jdbcType="VARCHAR" property="kzztdjlxmc" />
|
||||
<result column="kzztdjlx_dm" jdbcType="VARCHAR" property="kzztdjlxDm" />
|
||||
<result column="hymc" jdbcType="VARCHAR" property="hymc" />
|
||||
<result column="hy_dm" jdbcType="VARCHAR" property="hyDm" />
|
||||
<result column="zgswjgmc" jdbcType="VARCHAR" property="zgswjgmc" />
|
||||
<result column="zgswjg_dm" jdbcType="VARCHAR" property="zgswjgDm" />
|
||||
<result column="zgswjgkfjmc" jdbcType="VARCHAR" property="zgswjgkfjmc" />
|
||||
<result column="zgswjgkfj_dm" jdbcType="VARCHAR" property="zgswjgkfjDm" />
|
||||
<result column="zsxmmc" jdbcType="VARCHAR" property="zsxmmc" />
|
||||
<result column="zsxm_dm" jdbcType="VARCHAR" property="zsxmDm" />
|
||||
<result column="yzpzzl" jdbcType="VARCHAR" property="yzpzzl" />
|
||||
<result column="yzpzzl_dm" jdbcType="VARCHAR" property="yzpzzlDm" />
|
||||
<result column="ssgly" jdbcType="VARCHAR" property="ssgly" />
|
||||
<result column="zjzbmc" jdbcType="VARCHAR" property="zjzbmc" />
|
||||
<result column="skssqq" jdbcType="VARCHAR" property="skssqq" />
|
||||
<result column="skssqz" jdbcType="VARCHAR" property="skssqz" />
|
||||
<result column="scsbrq" jdbcType="VARCHAR" property="scsbrq" />
|
||||
<result column="zxsbrq" jdbcType="VARCHAR" property="zxsbrq" />
|
||||
<result column="zjjgts" jdbcType="VARCHAR" property="zjjgts" />
|
||||
<result column="lstsxx" jdbcType="VARCHAR" property="lstsxx" />
|
||||
<result column="zjrq" jdbcType="VARCHAR" property="zjrq" />
|
||||
<result column="ybtse1" jdbcType="DOUBLE" property="ybtse1" />
|
||||
<result column="ybtse2" jdbcType="DOUBLE" property="ybtse2" />
|
||||
<result column="bzskje" jdbcType="DOUBLE" property="bzskje" />
|
||||
<result column="zjztmc" jdbcType="VARCHAR" property="zjztmc" />
|
||||
<result column="zjztmc_dm" jdbcType="VARCHAR" property="zjztmcDm" />
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
</resultMap>
|
||||
|
||||
<select id="accountQuery" resultType="com.kakarote.crm.entity.VO.CrmAccountQueryResponseVO">
|
||||
SELECT
|
||||
COUNT(*) AS sbzjhc,
|
||||
COUNT(CASE WHEN zjztmc IN ('无需处理') THEN 1 END) AS wxclhc,
|
||||
COUNT(CASE WHEN zjztmc IN ('检查通过') THEN 1 END) AS jctghc,
|
||||
COUNT(CASE WHEN zjztmc IN ('未更正') THEN 1 END) AS wgzhc,
|
||||
COUNT(CASE WHEN zjztmc IN ('已更正,问题未解决') THEN 1 END) AS ybtse1,
|
||||
COUNT(CASE WHEN zjztmc IN ('已更正,问题已解决') THEN 1 END) AS ybtse2,
|
||||
SUM(COALESCE(bzskje, 0)) AS bzskje
|
||||
FROM wk_crm_sbzjjg
|
||||
WHERE 1=1
|
||||
<if test="vo.zsxm != null and vo.zsxm != ''">
|
||||
AND zsxm_dm = #{vo.zsxm}
|
||||
</if>
|
||||
<if test="vo.yzpzlx != null and vo.yzpzlx != ''">
|
||||
AND yzpzzl_dm = #{vo.yzpzlx}
|
||||
</if>
|
||||
<if test="vo.zjzbmc != null and vo.zjzbmc != ''">
|
||||
AND zjzbmc = #{vo.zjzbmc}
|
||||
</if>
|
||||
<if test="vo.ssgly != null and vo.ssgly != ''">
|
||||
AND ssgly = #{vo.ssgly}
|
||||
</if>
|
||||
<if test="vo.sbrqq != null and vo.sbrqq != '' and vo.sbrqz != null and vo.sbrqz != ''">
|
||||
AND zxsbrq BETWEEN #{vo.sbrqq} AND #{vo.sbrqz}
|
||||
</if>
|
||||
<if test="vo.zjrqq != null and vo.zjrqq != '' and vo.zjrqz != null and vo.zjrqz != ''">
|
||||
AND zjrq BETWEEN #{vo.zjrqq} AND #{vo.zjrqz}
|
||||
</if>
|
||||
<if test="vo.zgswjg != null and vo.zgswjg != ''">
|
||||
AND zgswjg_dm = #{vo.zgswjg}
|
||||
</if>
|
||||
<if test="vo.zgsws != null and vo.zgsws != ''">
|
||||
AND zgswjgkfj_dm = #{vo.zgsws}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="accountQueryDetail" resultType="com.kakarote.crm.entity.PO.CrmSbzjjg">
|
||||
SELECT * FROM wk_crm_sbzjjg
|
||||
WHERE 1=1
|
||||
<if test="vo.zsxm != null and vo.zsxm != ''">
|
||||
AND zsxm_dm = #{vo.zsxm}
|
||||
</if>
|
||||
<if test="vo.yzpzlx != null and vo.yzpzlx != ''">
|
||||
AND yzpzzl_dm = #{vo.yzpzlx}
|
||||
</if>
|
||||
<if test="vo.zjzbmc != null and vo.zjzbmc != ''">
|
||||
AND zjzbmc = #{vo.zjzbmc}
|
||||
</if>
|
||||
<if test="vo.ssgly != null and vo.ssgly != ''">
|
||||
AND ssgly = #{vo.ssgly}
|
||||
</if>
|
||||
<if test="vo.sbrqq != null and vo.sbrqq != '' and vo.sbrqz != null and vo.sbrqz != ''">
|
||||
AND zxsbrq BETWEEN #{vo.sbrqq} AND #{vo.sbrqz}
|
||||
</if>
|
||||
<if test="vo.zjrqq != null and vo.zjrqq != '' and vo.zjrqz != null and vo.zjrqz != ''">
|
||||
AND zjrq BETWEEN #{vo.zjrqq} AND #{vo.zjrqz}
|
||||
</if>
|
||||
<if test="vo.zgswjg != null and vo.zgswjg != ''">
|
||||
AND zgswjg_dm = #{vo.zgswjg}
|
||||
</if>
|
||||
<if test="vo.zgsws != null and vo.zgsws != ''">
|
||||
AND zgswjgkfj_dm = #{vo.zgsws}
|
||||
</if>
|
||||
<choose>
|
||||
<when test="vo.detailType == 'jctghc'">
|
||||
AND zjztmc = '检查通过'
|
||||
</when>
|
||||
<when test="vo.detailType == 'wxclhc'">
|
||||
AND zjztmc = '无需处理'
|
||||
</when>
|
||||
<when test="vo.detailType == 'wgzhc'">
|
||||
AND zjztmc = '未更正'
|
||||
</when>
|
||||
<when test="vo.detailType == 'ybtse1'">
|
||||
AND zjztmc = '已更正,问题未解决'
|
||||
</when>
|
||||
<when test="vo.detailType == 'ybtse2'">
|
||||
AND zjztmc = '已更正,问题已解决'
|
||||
</when>
|
||||
<when test="vo.detailType == 'bzskje'">
|
||||
AND bzskje IS NOT NULL
|
||||
</when>
|
||||
</choose>
|
||||
<if test="offset != null and offset >= 0 and limit != 0 and limit != null">
|
||||
LIMIT #{offset}, #{limit}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="rankByEnterpriseRisk" resultType="java.util.HashMap">
|
||||
SELECT * from (
|
||||
SELECT nsrmc as dwmc,zgswjgmc as zgswjg,COUNT(DISTINCT zjzbmc) AS fxzbNum FROM wk_crm_sbzjjg
|
||||
WHERE zgswjg_dm = #{vo.zgswjg} AND zjztmc != '检查通过'
|
||||
<if test="vo.wgy != null and vo.wgy != ''">
|
||||
AND ssgly = #{vo.wgy}
|
||||
</if>
|
||||
<if test="vo.zjrqq != null and vo.zjrqq != ''">
|
||||
AND zjrq >= #{vo.zjrqq}
|
||||
</if>
|
||||
<if test="vo.zjrqz != null and vo.zjrqz != ''">
|
||||
AND zjrq <= #{vo.zjrqz}
|
||||
</if>
|
||||
GROUP BY nsrmc, zgswjgmc
|
||||
ORDER BY fxzbNum DESC
|
||||
LIMIT #{vo.yjzb}
|
||||
) as temp
|
||||
ORDER BY fxzbNum DESC
|
||||
<if test="offset != null and offset >= 0 and limit != 0 and limit != null">
|
||||
LIMIT #{offset}, #{limit}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="rankByEnterpriseRiskDetail" resultType="String">
|
||||
SELECT DISTINCT zjzbmc FROM wk_crm_sbzjjg
|
||||
WHERE zgswjg_dm = #{vo.zgswjg} AND zjztmc != '检查通过' AND nsrmc = #{vo.dwmc}
|
||||
<if test="vo.wgy != null and vo.wgy != ''">
|
||||
AND ssgly = #{vo.wgy}
|
||||
</if>
|
||||
<if test="vo.zjrqq != null and vo.zjrqq != ''">
|
||||
AND zjrq >= #{vo.zjrqq}
|
||||
</if>
|
||||
<if test="vo.zjrqz != null and vo.zjrqz != ''">
|
||||
AND zjrq <= #{vo.zjrqz}
|
||||
</if>
|
||||
<if test="offset != null and offset >= 0 and limit != 0 and limit != null">
|
||||
LIMIT #{offset}, #{limit}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="rankByPointerType" resultType="java.util.HashMap">
|
||||
SELECT * FROM (
|
||||
SELECT
|
||||
a.zbdlmc AS zbdl,
|
||||
a.zbdl_dm as zbdlDm,
|
||||
a.zbxlmc AS zbxl,
|
||||
b.zjzbmc AS zjzb,
|
||||
a.zb_dm as zbdm,
|
||||
COUNT(DISTINCT b.nsrmc) AS qyNum
|
||||
FROM wk_crm_zjzbdm a
|
||||
INNER JOIN wk_crm_sbzjjg b ON a.zb_id = b.zb_id
|
||||
where b.zjztmc != '检查通过'
|
||||
<if test="vo.zbdl != null and vo.zbdl != ''">
|
||||
AND a.zbdl_dm = #{vo.zbdl}
|
||||
</if>
|
||||
<if test="vo.zbxl != null and vo.zbxl != ''">
|
||||
AND a.zbxl_dm = #{vo.zbxl}
|
||||
</if>
|
||||
<if test="vo.wgy != null and vo.wgy != ''">
|
||||
AND ssgly = #{vo.wgy}
|
||||
</if>
|
||||
<if test="vo.zjrqq != null and vo.zjrqq != ''">
|
||||
AND zjrq >= #{vo.zjrqq}
|
||||
</if>
|
||||
<if test="vo.zjrqz != null and vo.zjrqz != ''">
|
||||
AND zjrq <= #{vo.zjrqz}
|
||||
</if>
|
||||
GROUP BY a.zbdlmc,a.zbxlmc,b.zjzbmc
|
||||
ORDER BY qyNum DESC
|
||||
LIMIT #{vo.yjzb}
|
||||
) as temp
|
||||
ORDER BY qyNum DESC
|
||||
<if test="offset != null and offset >= 0 and limit != 0 and limit != null">
|
||||
LIMIT #{offset}, #{limit}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="rankByPointerTypeDetail" resultType="String">
|
||||
SELECT DISTINCT b.nsrmc FROM wk_crm_zjzbdm a
|
||||
INNER JOIN wk_crm_sbzjjg b ON a.zb_id = b.zb_id
|
||||
WHERE a.zb_dm = #{vo.zjzb}
|
||||
AND b.zjztmc != '检查通过'
|
||||
<if test="vo.wgy != null and vo.wgy != ''">
|
||||
AND ssgly = #{vo.wgy}
|
||||
</if>
|
||||
<if test="vo.zjrqq != null and vo.zjrqq != ''">
|
||||
AND zjrq >= #{vo.zjrqq}
|
||||
</if>
|
||||
<if test="vo.zjrqz != null and vo.zjrqz != ''">
|
||||
AND zjrq <= #{vo.zjrqz}
|
||||
</if>
|
||||
<if test="offset != null and offset >= 0 and limit != 0 and limit != null">
|
||||
LIMIT #{offset}, #{limit}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<insert id="batchInsert">
|
||||
INSERT INTO wk_crm_sbzjjg
|
||||
(nsrmc, nsrsbh, djzclxmc, kzztdjlxmc, hymc, zgswjgmc,
|
||||
zgswjgkfjmc, zsxmmc, yzpzzl, zjzbmc, ssgly, skssqq,
|
||||
skssqz, scsbrq, zxsbrq, zjjgts, lstsxx, zjrq, ybtse1,
|
||||
ybtse2, bzskje, zjztmc, zb_id, djzclx_dm, hy_dm,
|
||||
zgswjg_dm, zgswjgkfj_dm, zsxm_dm, yzpzzl_dm, zjzt_dm,kzztdjlx_dm)
|
||||
VALUES
|
||||
<foreach collection="batchEntities" item="item" separator=",">
|
||||
(
|
||||
#{item.nsrmc},
|
||||
#{item.nsrsbh},
|
||||
#{item.djzclxmc},
|
||||
#{item.kzztdjlxmc},
|
||||
#{item.hymc},
|
||||
#{item.zgswjgmc},
|
||||
#{item.zgswjgkfjmc},
|
||||
#{item.zsxmmc},
|
||||
#{item.yzpzzl},
|
||||
#{item.zjzbmc},
|
||||
#{item.ssgly},
|
||||
#{item.skssqq},
|
||||
#{item.skssqz},
|
||||
#{item.scsbrq},
|
||||
#{item.zxsbrq},
|
||||
#{item.zjjgts},
|
||||
#{item.lstsxx},
|
||||
#{item.zjrq},
|
||||
#{item.ybtse1},
|
||||
#{item.ybtse2},
|
||||
#{item.bzskje},
|
||||
#{item.zjztmc},
|
||||
#{item.zbId},
|
||||
#{item.djzclxDm},
|
||||
#{item.hyDm},
|
||||
#{item.zgswjgDm},
|
||||
#{item.zgswjgkfjDm},
|
||||
#{item.zsxmDm},
|
||||
#{item.yzpzzlDm},
|
||||
#{item.zjztDm},
|
||||
#{item.kzztdjlxDm}
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
<select id="fuzzyQueryByKeyWord" resultType="String">
|
||||
SELECT DISTINCT ssgly
|
||||
FROM wk_crm_sbzjjg
|
||||
WHERE ssgly LIKE CONCAT(#{keyword}, '%')
|
||||
ORDER BY ssgly
|
||||
LIMIT 10
|
||||
</select>
|
||||
|
||||
<select id="batchCheckExists" resultType="java.util.Map">
|
||||
SELECT * FROM wk_crm_sbzjjg
|
||||
WHERE
|
||||
(nsrsbh, skssqq, skssqz, zjzbmc, zjrq, zjztmc, scsbrq ,zxsbrq) IN
|
||||
<foreach collection="batchEntities" item="item" separator=",">
|
||||
(#{item.nsrsbh},#{item.skssqq},#{item.skssqz},#{item.zjzbmc},#{item.zjrq},#{item.zjztmc},#{item.scsbrq},#{item.zxsbrq})
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "https://www.72crm.com/mybatis-3.5.3-mapper.dtd">
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.kakarote.crm.mapper.CrmSceneDefaultMapper">
|
||||
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "https://www.72crm.com/mybatis-3.5.3-mapper.dtd">
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.kakarote.crm.mapper.CrmSceneMapper">
|
||||
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -2,20 +2,19 @@
|
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.kakarote.crm.mapper.CrmSwjgMapper">
|
||||
<resultMap id="BaseResultMap" type="com.kakarote.crm.entity.PO.CrmSwjg">
|
||||
<result column="swjg_id" jdbcType="INTEGER" property="swjgId" />
|
||||
<result column="swjgmc" jdbcType="VARCHAR" property="swjgmc" />
|
||||
<result column="swjg_dm" jdbcType="VARCHAR" property="swjgDm" />
|
||||
<result column="swjgmc" jdbcType="VARCHAR" property="swjgmc" />
|
||||
<result column="swjgjc" jdbcType="VARCHAR" property="swjgjc" />
|
||||
<result column="swjgbz" jdbcType="VARCHAR" property="swjgbz" />
|
||||
<result column="sjswjg_dm" jdbcType="VARCHAR" property="sjswjgDm" />
|
||||
<result column="jgjc_dm" jdbcType="VARCHAR" property="jgjcDm" />
|
||||
<result column="xzqhsz_dm" jdbcType="VARCHAR" property="xzqhszDm" />
|
||||
<result column="xybz" jdbcType="VARCHAR" property="xybz" />
|
||||
<result column="yxbz" jdbcType="VARCHAR" property="yxbz" />
|
||||
<result column="gdslx_dm" jdbcType="VARCHAR" property="gdslxDm" />
|
||||
<result column="bsfwtbz" jdbcType="VARCHAR" property="bsfwtbz" />
|
||||
<result column="ghbz" jdbcType="VARCHAR" property="ghbz" />
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
<result column="creat_by" jdbcType="VARCHAR" property="createBy" />
|
||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||
<result column="update_by" jdbcType="VARCHAR" property="updateBy" />
|
||||
<result column="xsxh" jdbcType="VARCHAR" property="xsxh" />
|
||||
<result column="ghswjgmc" jdbcType="VARCHAR" property="ghswjgmc" />
|
||||
</resultMap>
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -42,6 +42,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
swjg_dm,
|
||||
xzqhlx_dm,
|
||||
xzqh_dm,
|
||||
xzqh_cj,
|
||||
yxj
|
||||
from xzqh
|
||||
</sql>
|
||||
|
|
|
|||
|
|
@ -9,7 +9,9 @@ import com.kakarote.crm.entity.PO.CrmCustomerPool;
|
|||
import com.kakarote.crm.entity.PO.CrmCustomerPoolFieldSort;
|
||||
import com.kakarote.crm.entity.VO.CrmCustomerPoolVO;
|
||||
import com.kakarote.crm.entity.VO.CrmModelFiledVO;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
|
|
@ -134,4 +136,6 @@ public interface ICrmCustomerPoolService extends BaseService<CrmCustomerPool> {
|
|||
|
||||
public List<Integer> queryPoolIdByUserId();
|
||||
|
||||
void uploadExcelForZdfddwmd(MultipartFile file) throws IOException;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,6 +11,11 @@ public interface ICrmDjzclxService extends BaseService<CrmDjzclx> {
|
|||
*/
|
||||
CrmDjzclx queryByDjzclxDm(String djzclxDm);
|
||||
|
||||
/**
|
||||
* 通过登记注册类型名称获得对应的代码
|
||||
*/
|
||||
String queryCodeByName(String name);
|
||||
|
||||
/**
|
||||
* 更新
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -12,4 +12,10 @@ public interface ICrmHyDmService extends BaseService<CrmHyDm> {
|
|||
* @return CrmHyDm
|
||||
*/
|
||||
CrmHyDm queryByHyDm(String hyDm);
|
||||
|
||||
|
||||
/**
|
||||
* 根据行业名称查询代码
|
||||
*/
|
||||
String queryCodeByName(String name);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,61 @@
|
|||
package com.kakarote.crm.service;
|
||||
|
||||
import com.kakarote.core.entity.BasePage;
|
||||
import com.kakarote.core.servlet.BaseService;
|
||||
import com.kakarote.crm.entity.PO.CrmSbzjjg;
|
||||
import com.kakarote.crm.entity.VO.*;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
public interface ICrmSbzjjgService extends BaseService<CrmSbzjjg> {
|
||||
|
||||
/**
|
||||
* 户次查询
|
||||
*/
|
||||
CrmAccountQueryResponseVO accountQuery(CrmAccountQueryRequestVO crmAccountQueryRequestVO);
|
||||
|
||||
/**
|
||||
* 户次查询明细
|
||||
*/
|
||||
BasePage<CrmSbzjjg> accountQueryDetail(CrmAccountQueryRequestVO crmAccountQueryRequestVO);
|
||||
|
||||
|
||||
/**
|
||||
* 企业风险排名
|
||||
*/
|
||||
BasePage<Map<String,Object>> rankByEnterpriseRisk(CrmRankByEnterpriseRiskRequestVO crmRankByEnterpriseRiskRequestVO);
|
||||
|
||||
/**
|
||||
* 企业风险排名明细
|
||||
*/
|
||||
BasePage<Map<String,Object>> rankByEnterpriseRiskDetail(CrmRankByEnterpriseRiskRequestVO crmRankByEnterpriseRiskRequestVO);
|
||||
|
||||
/**
|
||||
* 指标统计排名
|
||||
*/
|
||||
BasePage<Map<String,Object>> rankByPointerType(CrmRankByPointerTypeRequestVO crmRankByPointerTypeRequestVO);
|
||||
|
||||
/**
|
||||
* 指标统计排名明细
|
||||
*/
|
||||
BasePage<Map<String,Object>> rankByPointerTypeDetail(CrmRankByPointerTypeRequestVO crmRankByPointerTypeRequestVO);
|
||||
|
||||
|
||||
/**
|
||||
* 根据Excel导入申报自检结果信息
|
||||
*/
|
||||
Map<String, Object> importExcelForSbzjjg(MultipartFile file);
|
||||
|
||||
/**
|
||||
* 导出数据为Excel
|
||||
*/
|
||||
void exportExcelForSbzjjg(CrmAccountQueryRequestVO crmAccountQueryRequestVO, HttpServletResponse response);
|
||||
|
||||
List<String> fuzzyQueryByKeyWord(String keyword);
|
||||
|
||||
}
|
||||
|
|
@ -25,4 +25,10 @@ public interface ICrmSwjgDmService extends BaseService<CrmSwjgDm> {
|
|||
*/
|
||||
int insertSwjgDm(CrmSwjgDm swjgDm);
|
||||
|
||||
|
||||
/**
|
||||
* 通过税务机关名称查询代码
|
||||
*/
|
||||
String queryCodeByName(String name);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,4 +9,9 @@ import com.kakarote.crm.entity.VO.ZjzbDzbzdszlVo;
|
|||
* @CreateTime: 2025/12/11
|
||||
*/
|
||||
public interface IZjzbDzbzdszlVoService extends BaseService<ZjzbDzbzdszlVo> {
|
||||
|
||||
/**
|
||||
* 根据应征凭证种类名称获取代码
|
||||
*/
|
||||
String queryCodeByName(String name);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@ package com.kakarote.crm.service;
|
|||
|
||||
import com.kakarote.core.servlet.BaseService;
|
||||
import com.kakarote.crm.entity.VO.ZjzbZsxmVo;
|
||||
import com.kakarote.crm.mapper.ZjzbZsxmVoMapper;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
/**
|
||||
* @description: 自检指标征收项目
|
||||
|
|
@ -9,4 +11,11 @@ import com.kakarote.crm.entity.VO.ZjzbZsxmVo;
|
|||
* @CreateTime: 2025/12/11
|
||||
*/
|
||||
public interface IZjzbZsxmVoService extends BaseService<ZjzbZsxmVo> {
|
||||
|
||||
/**
|
||||
* 通过征收项目名称获取相关代码
|
||||
* @param name
|
||||
* @return
|
||||
*/
|
||||
String queryCodeByName(String name);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,4 +24,9 @@ public interface IZjzbdmVoService extends BaseService<ZjzbdmVo> {
|
|||
|
||||
Result insert(ZjzbdmVo entity);
|
||||
|
||||
/**
|
||||
* 通过指标名称获取指标id
|
||||
*/
|
||||
Integer queryZbIdByName(String name);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@ import com.kakarote.crm.entity.BO.CrmSearchBO;
|
|||
import com.kakarote.crm.entity.PO.*;
|
||||
import com.kakarote.crm.mapper.CrmBackLogMapper;
|
||||
import com.kakarote.crm.service.*;
|
||||
import com.kakarote.crm.util.JsonUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.elasticsearch.script.Script;
|
||||
import org.elasticsearch.script.ScriptType;
|
||||
|
|
@ -98,12 +99,15 @@ public class CrmBackLogServiceImpl implements ICrmBackLogService {
|
|||
Long userId = UserUtil.getUserId();
|
||||
JSONObject kv = redis.get(CrmCacheKey.CRM_BACKLOG_NUM_CACHE_KEY + userId.toString());
|
||||
if (kv != null) {
|
||||
// 缓存命中则直接返回
|
||||
return kv;
|
||||
} else {
|
||||
// 无缓存则初始化空对象
|
||||
kv = new JSONObject();
|
||||
}
|
||||
log.info("kv:{}",kv);
|
||||
log.info("userId:{}",userId);
|
||||
/* 定义系统中存在的权限模块(即“系统能做什么”),而非用户实际拥有的权限。*/
|
||||
List<String> authList = UserUtil.getUser().getAuthoritiesUrlList();
|
||||
log.info("authList:{}",authList);
|
||||
authList.add("crm:customer:index");
|
||||
|
|
@ -114,6 +118,7 @@ public class CrmBackLogServiceImpl implements ICrmBackLogService {
|
|||
authList.add("crm:invoice:index");
|
||||
Map<String, Object> paras = new HashMap<>();
|
||||
paras.put("userId", userId);
|
||||
// 统计今日线索数、今日客户数、今日商机数、待跟进客户数:
|
||||
if (authList.contains("crm:customer:index")) {
|
||||
log.info("customer:index");
|
||||
Integer todayLeads = mapper.todayLeadsNum(paras);
|
||||
|
|
@ -159,10 +164,12 @@ public class CrmBackLogServiceImpl implements ICrmBackLogService {
|
|||
kv.put("putInPoolRemind", customerIdSet.size());
|
||||
}
|
||||
}
|
||||
// 统计线索跟进与否的数量
|
||||
if (authList.contains("crm:leads:index")) {
|
||||
Integer followLeads = mapper.followLeadsNum(paras);
|
||||
kv.put("followLeads", followLeads);
|
||||
}
|
||||
// 统计到期合同数、待审核合同数、回访提醒数:
|
||||
if (authList.contains("crm:contract:index")) {
|
||||
AdminConfig adminConfig = adminService.queryFirstConfigByName("expiringContractDays").getData();
|
||||
if (1 == adminConfig.getStatus()) {
|
||||
|
|
@ -196,7 +203,7 @@ public class CrmBackLogServiceImpl implements ICrmBackLogService {
|
|||
kv.put("returnVisitRemind", returnVisitRemind);
|
||||
}
|
||||
}
|
||||
|
||||
// 处理回款计划提醒及待审核回款单。
|
||||
if (authList.contains("crm:receivables:index")) {
|
||||
Integer remindReceivablesPlan = mapper.remindReceivablesPlanNum(paras);
|
||||
List<Integer> ids = examineService.queryCrmExamineIdList(2, 1).getData();
|
||||
|
|
@ -219,7 +226,7 @@ public class CrmBackLogServiceImpl implements ICrmBackLogService {
|
|||
kv.put("checkReceivables", checkReceivables);
|
||||
kv.put("remindReceivablesPlan", remindReceivablesPlan);
|
||||
}
|
||||
|
||||
// 统计待审核发票数量。
|
||||
if (authList.contains("crm:invoice:index")) {
|
||||
List<Integer> ids = examineService.queryCrmExamineIdList(3, 1).getData();
|
||||
Integer checkInvoice = null;
|
||||
|
|
@ -568,6 +575,10 @@ public class CrmBackLogServiceImpl implements ICrmBackLogService {
|
|||
if (type == 1) {
|
||||
ids.addAll(backLogDealService.queryTypeId(7, 8, userId));
|
||||
}
|
||||
// 如果ids为空,可以设置为一个不可能存在的值,避免SQL语法错误
|
||||
if (ids.isEmpty()) {
|
||||
ids.add("-1L");
|
||||
}
|
||||
BasePage<CrmReceivablesPlan> basePage = mapper.remindReceivables(crmBackLogBO.parse(), type, ids, userId);
|
||||
basePage.getList().forEach(record -> {
|
||||
record.setCustomerName(crmCustomerService.getCustomerName(record.getCustomerId()));
|
||||
|
|
@ -590,18 +601,23 @@ public class CrmBackLogServiceImpl implements ICrmBackLogService {
|
|||
CrmEnum crmEnum = CrmEnum.CONTRACT;
|
||||
ICrmContractService crmContractService = ApplicationContextHolder.getBean(ICrmContractService.class);
|
||||
if (type == 1) {
|
||||
// 即将到期合同:结束时间在 [今天, 今天+预警天数] 范围内
|
||||
crmBackLogBO.getData().add(new CrmSearchBO.Search("endTime", "date", CrmSearchBO.FieldSearchEnum.EGT, Collections.singletonList(DateUtil.formatDate(new Date()))));
|
||||
crmBackLogBO.getData().add(new CrmSearchBO.Search("endTime", "date", CrmSearchBO.FieldSearchEnum.ELT, Collections.singletonList(DateUtil.formatDate(new Date(System.currentTimeMillis() + Integer.valueOf(adminConfig.getValue()) * 86400000L)))));
|
||||
} else if (type == 2) {
|
||||
// 已过期合同:结束时间早于今天
|
||||
crmBackLogBO.getData().add(new CrmSearchBO.Search("endTime", "date", CrmSearchBO.FieldSearchEnum.LT, Collections.singletonList(DateUtil.formatDate(new Date()))));
|
||||
} else {
|
||||
throw new CrmException(SystemCodeEnum.SYSTEM_NO_VALID);
|
||||
}
|
||||
crmBackLogBO.getData().add(new CrmSearchBO.Search("ownerUserId", "text", CrmSearchBO.FieldSearchEnum.IS, Collections.singletonList(UserUtil.getUserId().toString())));
|
||||
crmBackLogBO.getData().add(new CrmSearchBO.Search("checkStatus", "text", CrmSearchBO.FieldSearchEnum.IS, Collections.singletonList("1")));
|
||||
// 必须条件:负责人为当前用户 + 合同审核状态为“通过”(checkStatus=1)
|
||||
crmBackLogBO.getData().add(new CrmSearchBO.Search("ownerUserId", "keyword", CrmSearchBO.FieldSearchEnum.IS, Collections.singletonList(UserUtil.getUserId().toString())));
|
||||
crmBackLogBO.getData().add(new CrmSearchBO.Search("checkStatus", "keyword", CrmSearchBO.FieldSearchEnum.IS, Collections.singletonList("1")));
|
||||
if (type == 1) {
|
||||
// 过滤已处理的待办事项
|
||||
List<String> dealIdList = backLogDealService.queryTypeId(8, crmEnum.getType(), UserUtil.getUserId());
|
||||
crmBackLogBO.getData().add(new CrmSearchBO.Search("_id", "text", CrmSearchBO.FieldSearchEnum.IS_NOT, dealIdList));
|
||||
log.info("Excluded IDs: {}", dealIdList);
|
||||
}
|
||||
CrmSearchBO searchBO = new CrmSearchBO();
|
||||
searchBO.setLabel(crmEnum.getType());
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue