14acbcdb
姜超
feature(*): 考评导入修改
|
1
2
3
4
5
6
|
<?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="cn.fw.morax.dao.eval.EvalShopPoolDao">
<!-- 通用查询映射结果 -->
<resultMap id="BaseResultMap" type="cn.fw.morax.domain.db.eval.EvalShopPool">
|
2ac0c565
姜超
feature(*): 修改个人考评
|
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
<result column="id" property="id"/>
<result column="eval_group_rank_id" property="evalGroupRankId"/>
<result column="eval_group_rank_stage_id" property="evalGroupRankStageId"/>
<result column="egc" property="egc"/>
<result column="eval_group_id" property="evalGroupId"/>
<result column="shop_id" property="shopId"/>
<result column="shop_name" property="shopName"/>
<result column="reward" property="reward"/>
<result column="status" property="status"/>
<result column="score" property="score"/>
<result column="score_ratio" property="scoreRatio"/>
<result column="rank" property="rank"/>
<result column="data_date" property="dataDate"/>
<result column="monthly" property="monthly"/>
<result column="group_id" property="groupId"/>
<result column="yn" property="yn"/>
<result column="create_time" property="createTime"/>
<result column="update_time" property="updateTime"/>
|
14acbcdb
姜超
feature(*): 考评导入修改
|
25
26
|
</resultMap>
|
c1b3c16f
姜超
feature(*): 门店考评池查询
|
27
|
<sql id="all_columns">
|
2ac0c565
姜超
feature(*): 修改个人考评
|
28
29
30
31
|
id,eval_group_rank_id,eval_group_rank_stage_id
,egc,eval_group_id,shop_id,shop_name,reward
,status,score,score_ratio,rank,data_date
,monthly,group_id,yn,create_time,update_time
|
c1b3c16f
姜超
feature(*): 门店考评池查询
|
32
33
|
</sql>
|
ffdae9fa
姜超
feature(*): 上报数据修改
|
34
35
|
<select id="getLastPool" resultType="cn.fw.morax.domain.db.eval.EvalShopPool">
SELECT
|
c1b3c16f
姜超
feature(*): 门店考评池查询
|
36
|
<include refid="all_columns"/>
|
ffdae9fa
姜超
feature(*): 上报数据修改
|
37
38
39
|
FROM
eval_shop_pool t1,
(
|
f90ec7e4
姜超
feature(*): 新增台阶类型
|
40
|
SELECT CONVERT( SUBSTRING_INDEX( group_concat( id ORDER BY `create_time` DESC ), ',', 1 ), SIGNED ) pk
|
ffdae9fa
姜超
feature(*): 上报数据修改
|
41
42
43
44
|
FROM
eval_shop_pool
WHERE
DATE_FORMAT( create_time, '%Y-%m' ) >= #{monthly}
|
f90ec7e4
姜超
feature(*): 新增台阶类型
|
45
|
AND group_id = #{groupId}
|
ffdae9fa
姜超
feature(*): 上报数据修改
|
46
47
48
49
50
51
52
53
|
AND yn = 1
GROUP BY
shop_id
) t2
WHERE
t1.id = t2.pk
</select>
|
c1b3c16f
姜超
feature(*): 门店考评池查询
|
54
55
|
<select id="queryPagePool" resultType="cn.fw.morax.domain.vo.eval.EvalShopPoolVO">
SELECT
|
2ac0c565
姜超
feature(*): 修改个人考评
|
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
|
id
,eval_group_rank_id
,eval_group_rank_stage_id
,egc
,eval_group_id
,shop_id
,shop_name
,reward
,status
,score
,score_ratio
,rank
,data_date
,monthly
,group_id
,yn
,create_time
,update_time
|
347b9a76
姜超
feature(*): 考评审批
|
74
75
76
|
from eval_shop_pool
where yn = 1
and group_id = #{condition.groupId}
|
c1b3c16f
姜超
feature(*): 门店考评池查询
|
77
|
<if test="condition.monthly !=null">
|
347b9a76
姜超
feature(*): 考评审批
|
78
|
and monthly = #{condition.monthly}
|
c1b3c16f
姜超
feature(*): 门店考评池查询
|
79
80
|
</if>
<if test="condition.managerShopIds !=null and condition.managerShopIds.size() > 0">
|
347b9a76
姜超
feature(*): 考评审批
|
81
|
and shop_id in
|
c1b3c16f
姜超
feature(*): 门店考评池查询
|
82
83
84
85
86
87
88
89
90
91
92
93
94
95
|
<foreach collection="condition.managerShopIds" item="id" index="index" open="(" close=")" separator=",">
#{id}
</foreach>
</if>
<if test="condition.orderString != null and condition.orderString !='' ">
${condition.orderString}
</if>
limit #{startIndex},#{pageSize};
</select>
<select id="queryPagePoolTotal" resultType="java.lang.Long">
SELECT
IFNULL(count(1),0)
|
488ba9c3
姜超
feature(*): 新增台阶类型
|
96
|
from eval_shop_pool
|
c1b3c16f
姜超
feature(*): 门店考评池查询
|
97
98
99
100
101
102
103
104
105
106
107
108
|
where yn = 1
and group_id = #{condition.groupId}
<if test="condition.monthly !=null">
and monthly = #{condition.monthly}
</if>
<if test="condition.managerShopIds !=null and condition.managerShopIds.size() > 0">
and shop_id in
<foreach collection="condition.managerShopIds" item="id" index="index" open="(" close=")" separator=",">
#{id}
</foreach>
</if>
</select>
|
14acbcdb
姜超
feature(*): 考评导入修改
|
109
110
|
</mapper>
|