cgf
2025-08-23 9ec0a61f90ac2464eebc643bfe2d93ac9ba6e569
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
<?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="examineStaffValueV1ServiceDaoImpl">
 
 
    <!-- 保存考核评分信息 add by wuxw 2018-07-03 -->
    <insert id="saveExamineStaffValueInfo" parameterType="Map">
        insert into examine_staff_value(
        owner_name,esv_id,es_id,staff_name,owner_id,community_id,project_id,examine_value,staff_id,room_id,room_name,es_year
        ) values (
        #{ownerName},#{esvId},#{esId},#{staffName},#{ownerId},#{communityId},#{projectId},#{examineValue},#{staffId},#{roomId},#{roomName},#{esYear}
        )
    </insert>
 
 
    <!-- 查询考核评分信息 add by wuxw 2018-07-03 -->
    <select id="getExamineStaffValueInfo" parameterType="Map" resultType="Map">
        select t.owner_name,t.owner_name ownerName,t.esv_id,t.esv_id esvId,t.es_id,t.es_id
        esId,t.staff_name,t.staff_name staffName,t.status_cd,t.status_cd statusCd,t.owner_id,t.owner_id
        ownerId,t.community_id,t.community_id communityId,t.project_id,t.project_id
        projectId,t.examine_value,t.examine_value examineValue,t.staff_id,t.staff_id staffId,t.room_id,t.room_id
        roomId,t.room_name,t.room_name roomName,t.es_year esYear,t.create_time createTime,ep.`name` projectName,ep.post,ep.weight
        from examine_staff_value t
        left join examine_project ep on t.project_id = ep.project_id and ep.status_cd = '0'
        where 1 =1
        <if test="ownerName !=null and ownerName != ''">
            and t.owner_name= #{ownerName}
        </if>
        <if test="esvId !=null and esvId != ''">
            and t.esv_id= #{esvId}
        </if>
        <if test="esId !=null and esId != ''">
            and t.es_id= #{esId}
        </if>
        <if test="staffName !=null and staffName != ''">
            and t.staff_name= #{staffName}
        </if>
        <if test="statusCd !=null and statusCd != ''">
            and t.status_cd= #{statusCd}
        </if>
        <if test="ownerId !=null and ownerId != ''">
            and t.owner_id= #{ownerId}
        </if>
        <if test="communityId !=null and communityId != ''">
            and t.community_id= #{communityId}
        </if>
        <if test="projectId !=null and projectId != ''">
            and t.project_id= #{projectId}
        </if>
        <if test="examineValue !=null and examineValue != ''">
            and t.examine_value= #{examineValue}
        </if>
        <if test="staffId !=null and staffId != ''">
            and t.staff_id= #{staffId}
        </if>
        <if test="roomId !=null and roomId != ''">
            and t.room_id= #{roomId}
        </if>
        <if test="roomName !=null and roomName != ''">
            and t.room_name= #{roomName}
        </if>
        <if test="esYear !=null and esYear != ''">
            and t.es_year= #{esYear}
        </if>
        order by t.create_time desc
        <if test="page != -1 and page != null ">
            limit #{page}, #{row}
        </if>
 
    </select>
 
 
    <!-- 修改考核评分信息 add by wuxw 2018-07-03 -->
    <update id="updateExamineStaffValueInfo" parameterType="Map">
        update examine_staff_value t set t.status_cd = #{statusCd}
        <if test="newBId != null and newBId != ''">
            ,t.b_id = #{newBId}
        </if>
        <if test="ownerName !=null and ownerName != ''">
            , t.owner_name= #{ownerName}
        </if>
        <if test="esId !=null and esId != ''">
            , t.es_id= #{esId}
        </if>
        <if test="staffName !=null and staffName != ''">
            , t.staff_name= #{staffName}
        </if>
        <if test="ownerId !=null and ownerId != ''">
            , t.owner_id= #{ownerId}
        </if>
        <if test="examineValue !=null and examineValue != ''">
            , t.examine_value= #{examineValue}
        </if>
        <if test="roomId !=null and roomId != ''">
            , t.room_id= #{roomId}
        </if>
        <if test="roomName !=null and roomName != ''">
            , t.room_name= #{roomName}
        </if>
        where 1=1
        <if test="esvId !=null and esvId != ''">
            and t.esv_id= #{esvId}
        </if>
        <if test="projectId !=null and projectId != ''">
            and t.project_id= #{projectId}
        </if>
        <if test="staffId !=null and staffId != ''">
            and t.staff_id= #{staffId}
        </if>
        <if test="communityId !=null and communityId != ''">
            and t.community_id= #{communityId}
        </if>
        <if test="esYear !=null and esYear != ''">
            and t.es_year= #{esYear}
        </if>
 
    </update>
 
    <!-- 查询考核评分数量 add by wuxw 2018-07-03 -->
    <select id="queryExamineStaffValuesCount" parameterType="Map" resultType="Map">
        select count(1) count
        from examine_staff_value t
        where 1 =1
        <if test="ownerName !=null and ownerName != ''">
            and t.owner_name= #{ownerName}
        </if>
        <if test="esvId !=null and esvId != ''">
            and t.esv_id= #{esvId}
        </if>
        <if test="esId !=null and esId != ''">
            and t.es_id= #{esId}
        </if>
        <if test="staffName !=null and staffName != ''">
            and t.staff_name= #{staffName}
        </if>
        <if test="statusCd !=null and statusCd != ''">
            and t.status_cd= #{statusCd}
        </if>
        <if test="ownerId !=null and ownerId != ''">
            and t.owner_id= #{ownerId}
        </if>
        <if test="communityId !=null and communityId != ''">
            and t.community_id= #{communityId}
        </if>
        <if test="projectId !=null and projectId != ''">
            and t.project_id= #{projectId}
        </if>
        <if test="examineValue !=null and examineValue != ''">
            and t.examine_value= #{examineValue}
        </if>
        <if test="staffId !=null and staffId != ''">
            and t.staff_id= #{staffId}
        </if>
        <if test="roomId !=null and roomId != ''">
            and t.room_id= #{roomId}
        </if>
        <if test="roomName !=null and roomName != ''">
            and t.room_name= #{roomName}
        </if>
        <if test="esYear !=null and esYear != ''">
            and t.es_year= #{esYear}
        </if>
 
 
    </select>
 
</mapper>