|
@@ -6,6 +6,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
6
|
6
|
|
7
|
7
|
<resultMap type="CmcPerformanceStaff" id="CmcPerformanceStaffResult">
|
8
|
8
|
<result property="performanceStaffId" column="performance_staff_id" />
|
|
9
|
+ <result property="performanceId" column="performance_id" />
|
9
|
10
|
<result property="projectId" column="project_id" />
|
10
|
11
|
<result property="projectNumber" column="project_number" />
|
11
|
12
|
<result property="userId" column="user_id" />
|
|
@@ -36,7 +37,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
36
|
37
|
</resultMap>
|
37
|
38
|
|
38
|
39
|
<sql id="selectCmcPerformanceStaffVo">
|
39
|
|
- select ps.performance_staff_id, ps.project_id, p.project_number, p.project_name, ps.user_id, u.nick_name, ps.work_type, ps.content, ps.scale_grade, ps.workload, ps.unit, ps.price,
|
|
40
|
+ select ps.performance_staff_id, ps.performance_id, ps.project_id, p.project_number, p.project_name, ps.user_id, u.nick_name, ps.work_type, ps.content, ps.scale_grade, ps.workload, ps.unit, ps.price,
|
40
|
41
|
ps.coefficient, ps.performance, ps.performance_month, ps.remark from cmc_performance_staff as ps
|
41
|
42
|
left join cmc_project as p on p.project_id = ps.project_id
|
42
|
43
|
left join sys_user as u on u.user_id = ps.user_id
|
|
@@ -45,6 +46,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
45
|
46
|
<select id="selectCmcPerformanceStaffList" parameterType="CmcPerformanceStaff" resultMap="CmcPerformanceStaffResult">
|
46
|
47
|
<include refid="selectCmcPerformanceStaffVo"/>
|
47
|
48
|
<where>
|
|
49
|
+ <if test="performanceId != null and performanceId != ''"> and ps.performance_id = #{performanceId}</if>
|
48
|
50
|
<if test="projectId != null and projectId != ''"> and ps.project_id = #{projectId}</if>
|
49
|
51
|
<if test="userId != null "> and ps.user_id = #{userId}</if>
|
50
|
52
|
<if test="workType != null and workType != ''"> and ps.work_type = #{workType}</if>
|
|
@@ -66,6 +68,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
66
|
68
|
<insert id="insertCmcPerformanceStaff" parameterType="CmcPerformanceStaff" useGeneratedKeys="true" keyProperty="performanceStaffId">
|
67
|
69
|
insert into cmc_performance_staff
|
68
|
70
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
71
|
+ <if test="performanceId != null">performance_id,</if>
|
69
|
72
|
<if test="projectId != null">project_id,</if>
|
70
|
73
|
<if test="userId != null">user_id,</if>
|
71
|
74
|
<if test="workType != null">work_type,</if>
|
|
@@ -80,6 +83,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
80
|
83
|
<if test="remark != null">remark,</if>
|
81
|
84
|
</trim>
|
82
|
85
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
86
|
+ <if test="performanceId != null">#{performanceId},</if>
|
83
|
87
|
<if test="projectId != null">#{projectId},</if>
|
84
|
88
|
<if test="userId != null">#{userId},</if>
|
85
|
89
|
<if test="workType != null">#{workType},</if>
|
|
@@ -98,6 +102,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
98
|
102
|
<update id="updateCmcPerformanceStaff" parameterType="CmcPerformanceStaff">
|
99
|
103
|
update cmc_performance_staff
|
100
|
104
|
<trim prefix="SET" suffixOverrides=",">
|
|
105
|
+ <if test="performanceId != null">performance_id = #{performanceId},</if>
|
101
|
106
|
<if test="projectId != null">project_id = #{projectId},</if>
|
102
|
107
|
<if test="userId != null">user_id = #{userId},</if>
|
103
|
108
|
<if test="workType != null">work_type = #{workType},</if>
|