028bb253
姜超
feature(*): 考评组相关文件
|
1
2
|
<?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">
|
e2386ce2
姜超
feature(*): 考评计算得分修改
|
3
|
<mapper namespace="cn.fw.morax.dao.eval.EvalUserPoolDao">
|
028bb253
姜超
feature(*): 考评组相关文件
|
4
5
|
<!-- 通用查询映射结果 -->
|
e2386ce2
姜超
feature(*): 考评计算得分修改
|
6
|
<resultMap id="BaseResultMap" type="cn.fw.morax.domain.db.eval.EvalUserPool">
|
2ac0c565
姜超
feature(*): 修改个人考评
|
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
<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="user_id" property="userId"/>
<result column="user_name" property="userName"/>
<result column="post_id" property="postId"/>
<result column="post_name" property="postName"/>
<result column="shop_id" property="shopId"/>
<result column="shop_name" property="shopName"/>
<result column="fund_shop_id" property="fundShopId"/>
<result column="fund_shop_name" property="fundShopName"/>
<result column="reward" property="reward"/>
<result column="score" property="score"/>
<result column="score_ratio" property="scoreRatio"/>
<result column="rank" property="rank"/>
<result column="inclusion" property="inclusion"/>
<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"/>
|
028bb253
姜超
feature(*): 考评组相关文件
|
31
32
|
</resultMap>
|
2ac0c565
姜超
feature(*): 修改个人考评
|
33
34
35
36
37
38
39
40
|
<sql id="all_columns">
id,eval_group_rank_id,eval_group_rank_stage_id,egc,eval_group_id,user_id,user_name,post_id
,post_name,shop_id,shop_name,fund_shop_id,fund_shop_name
,reward,score,score_ratio,rank,inclusion,data_date
,monthly,group_id,yn,create_time,update_time
</sql>
|
ffdae9fa
姜超
feature(*): 上报数据修改
|
41
42
|
<select id="getLastPool" resultType="cn.fw.morax.domain.db.eval.EvalUserPool">
SELECT
|
2ac0c565
姜超
feature(*): 修改个人考评
|
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
|
t1.id
,t1.eval_group_rank_id
,t1.eval_group_rank_stage_id
,t1.egc
,t1.eval_group_id
,t1.user_id
,t1.user_name
,t1.post_id
,t1.post_name
,t1.shop_id
,t1.shop_name
,t1.fund_shop_id
,t1.fund_shop_name
,t1.reward
,t1.score
,t1.score_ratio
,t1.rank
,t1.inclusion
,t1.data_date
,t1.monthly
,t1.group_id
|
ffdae9fa
姜超
feature(*): 上报数据修改
|
64
65
66
67
68
69
70
71
72
|
FROM
eval_user_pool t1,
(
SELECT CONVERT
( SUBSTRING_INDEX( group_concat( id ORDER BY `create_time` DESC ), ',', 1 ), SIGNED ) pk
FROM
eval_user_pool
WHERE
DATE_FORMAT( create_time, '%Y-%m' ) >= #{monthly}
|
e1778851
姜超
feature(*): 计算考评调整
|
73
|
AND group_id = #{groupId}
|
ffdae9fa
姜超
feature(*): 上报数据修改
|
74
75
76
77
78
79
80
|
AND yn = 1
GROUP BY
user_id
) t2
WHERE
t1.id = t2.pk
</select>
|
028bb253
姜超
feature(*): 考评组相关文件
|
81
|
|
c1b3c16f
姜超
feature(*): 门店考评池查询
|
82
|
<select id="queryPagePool" resultType="cn.fw.morax.domain.vo.eval.EvalUserPoolVO">
|
eccb0d64
姜超
feature(*): 考评详情查询
|
83
|
SELECT
|
2ac0c565
姜超
feature(*): 修改个人考评
|
84
|
<include refid="all_columns"/>
|
c1b3c16f
姜超
feature(*): 门店考评池查询
|
85
86
87
88
89
90
91
92
93
|
from eval_user_pool
where yn = 1
and group_id = #{condition.groupId}
<if test="condition.userId !=null">
and user_id = #{condition.userId}
</if>
<if test="condition.userName !=null and condition.userName != ''">
and user_name like concat('%', #{condition.userName}, '%')
</if>
|
c1b3c16f
姜超
feature(*): 门店考评池查询
|
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
|
<if test="condition.monthly !=null">
and monthly = #{condition.monthly}
</if>
<if test="condition.postId !=null">
and post_id = #{condition.postId}
</if>
<if test="condition.postName !=null and condition.postName != ''">
and post_name like concat('%', #{condition.postName}, '%')
</if>
<if test="condition.shopId !=null">
and shop_id = #{condition.shopId}
</if>
<if test="condition.shopName !=null and condition.shopName != ''">
and shop_name like concat('%', #{condition.shopName}, '%')
</if>
<if test="condition.managerStaffIds !=null and condition.managerStaffIds.size() > 0">
and user_id in
<foreach collection="condition.managerStaffIds" item="id" index="index" open="(" close=")" separator=",">
#{id}
</foreach>
</if>
<if test="condition.orderString != null and condition.orderString !='' ">
${condition.orderString}
</if>
limit #{startIndex},#{pageSize};
|
eccb0d64
姜超
feature(*): 考评详情查询
|
119
120
|
</select>
|
f692be3a
姜超
feature(*): 查询修改
|
121
122
123
124
125
126
127
128
129
130
131
132
133
|
<select id="queryPagePoolTotal" resultType="java.lang.Long">
SELECT
IFNULL(count(1),0)
from eval_user_pool
where yn = 1
and group_id = #{groupId}
<if test="userId !=null">
and user_id = #{userId}
</if>
<if test="userName !=null and userName != ''">
and user_name like concat('%', #{userName}, '%')
</if>
|
f692be3a
姜超
feature(*): 查询修改
|
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
|
<if test="monthly !=null">
and monthly = #{monthly}
</if>
<if test="postId !=null">
and post_id = #{postId}
</if>
<if test="postName !=null and postName != ''">
and post_name like concat('%', #{postName}, '%')
</if>
<if test="shopId !=null">
and shop_id = #{shopId}
</if>
<if test="shopName !=null and shopName != ''">
and shop_name like concat('%', #{shopName}, '%')
</if>
|
b5babc65
姜超
feature(*): 参数修改
|
149
|
<if test="managerStaffIds !=null and managerStaffIds.size() > 0">
|
f692be3a
姜超
feature(*): 查询修改
|
150
|
and user_id in
|
b5babc65
姜超
feature(*): 参数修改
|
151
|
<foreach collection="managerStaffIds" item="id" index="index" open="(" close=")" separator=",">
|
f692be3a
姜超
feature(*): 查询修改
|
152
153
154
155
156
|
#{id}
</foreach>
</if>
</select>
|
028bb253
姜超
feature(*): 考评组相关文件
|
157
|
</mapper>
|