|
|
@@ -48,7 +48,8 @@
|
|
|
|
|
|
<select id="selectTechnicianPage" resultMap="technicianResultMap"
|
|
|
parameterType="org.sky.scientific.pojo.dto.TechnicianDTO">
|
|
|
- select * from kd_technician
|
|
|
+ select *
|
|
|
+ from kd_technician
|
|
|
where is_deleted = 0 and year_and_month = #{technician.yearAndMonth}
|
|
|
<if test="technician.name!=null and technician.name!=''">and name like concat(concat('%', #{technician.name}),
|
|
|
'%')
|
|
|
@@ -74,67 +75,6 @@
|
|
|
order by year_and_month asc, id asc
|
|
|
</select>
|
|
|
|
|
|
- <select id="exportTechnicianList" resultType="org.sky.scientific.excel.TechnicianExcel"
|
|
|
- parameterType="org.sky.scientific.pojo.dto.TechnicianDTO">
|
|
|
- select t1.*
|
|
|
- from kd_technician t1
|
|
|
- <if test="technician.yearAndMonth.length()==4">
|
|
|
- INNER JOIN
|
|
|
- (
|
|
|
- SELECT unicode, MAX( year_and_month ) AS max_month
|
|
|
- FROM kd_technician
|
|
|
- WHERE LEFT ( year_and_month, 4 ) = #{technician.yearAndMonth} AND is_deleted = 0
|
|
|
- GROUP BY unicode
|
|
|
- ) t2
|
|
|
- ON t1.unicode= t2.unicode AND year_and_month = t2.max_month
|
|
|
- </if>
|
|
|
- where is_deleted = 0
|
|
|
- <if test="technician.name!=null and technician.name!=''">and name like concat(concat('%', #{technician.name}),
|
|
|
- '%')
|
|
|
- </if>
|
|
|
- <if test="technician.number!=null and technician.number!=''">and name like concat(concat('%',
|
|
|
- #{technician.number}), '%')
|
|
|
- </if>
|
|
|
- <if test="technician.idCard!=null and technician.idCard!=''">and id_card like
|
|
|
- concat(concat('%', #{technician.idCard}), '%')
|
|
|
- </if>
|
|
|
- <if test="technician.secondaryUnit!=null and technician.secondaryUnit!=''">and secondary_unit like
|
|
|
- concat(concat('%', #{technician.secondaryUnit}), '%')
|
|
|
- </if>
|
|
|
- <if test="technician.department!=null and technician.department!=''">and department like concat(concat('%',
|
|
|
- #{technician.department}), '%')
|
|
|
- </if>
|
|
|
- <if test="technician.post!=null and technician.post!=''">and post like concat(concat('%', #{technician.post}),
|
|
|
- '%')
|
|
|
- </if>
|
|
|
- <if test="technician.postLocation!=null and technician.postLocation!=''">and post_location like
|
|
|
- concat(concat('%', #{technician.postLocation}), '%')
|
|
|
- </if>
|
|
|
- <if test="technician.nature!=null and technician.nature!=''">and nature = #{technician.nature}</if>
|
|
|
- <if test="technician.education!=null and technician.education!=''">and education = #{technician.education}</if>
|
|
|
- <if test="technician.degree!=null and technician.degree!=''">and degree = #{technician.degree}</if>
|
|
|
- <if test="technician.rank!=null and technician.rank!=''">and rank = #{technician.rank}</if>
|
|
|
- <if test="technician.personnelType!=null and technician.personnelType!=''">and personnel_type =
|
|
|
- #{technician.personnelType}
|
|
|
- </if>
|
|
|
- <if test="technician.situation !=null and technician.situation!=''">and situation = #{technician.situation}</if>
|
|
|
- <if test="technician.practicingRequirement !=null and technician.practicingRequirement!=''">and
|
|
|
- practicing_requirement like concat(concat('%', #{technician.practicingRequirement}), '%')
|
|
|
- </if>
|
|
|
- <if test="technician.hireStartDate!=null and technician.hireEndDate!=''">and hire_Date between
|
|
|
- #{technician.hireStartDate} and #{technician.hireEndDate}
|
|
|
- </if>
|
|
|
- <choose>
|
|
|
- <when test="technician.yearAndMonth.length()==4">
|
|
|
- and LEFT ( t1.year_and_month, 4 ) = #{technician.yearAndMonth}
|
|
|
- </when>
|
|
|
- <otherwise>
|
|
|
- and t1.year_and_month = #{technician.yearAndMonth}
|
|
|
- </otherwise>
|
|
|
- </choose>
|
|
|
- order by year_and_month asc, id asc
|
|
|
- </select>
|
|
|
-
|
|
|
<select id="selectByYear" resultMap="technicianResultMap" parameterType="org.sky.scientific.pojo.dto.TechnicianDTO">
|
|
|
select t1.*
|
|
|
from kd_technician t1
|
|
|
@@ -177,11 +117,6 @@
|
|
|
order by year_and_month asc, t1.id asc
|
|
|
</select>
|
|
|
|
|
|
- <select id="exportTechnician" resultType="org.sky.scientific.excel.TechnicianExcel">
|
|
|
- SELECT *
|
|
|
- FROM kd_technician ${ew.customSqlSegment}
|
|
|
- </select>
|
|
|
-
|
|
|
<select id="selectByUnicodeAndYearAndMonth"
|
|
|
resultType="org.sky.scientific.pojo.entity.TechnicianEntity">
|
|
|
select *
|