|
@@ -134,7 +134,35 @@
|
|
|
where number = #{number} and id_card = #{idCard}
|
|
where number = #{number} and id_card = #{idCard}
|
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
- <select id="canyanrenyuanhuamingce" resultMap="ResultVoMap">
|
|
|
|
|
-
|
|
|
|
|
|
|
+ <select id="niandugaokejirenyuanhuizongbiao" resultMap="ResultVoMap" parameterType="org.sky.scientific.pojo.dto.TechnicianDTO">
|
|
|
|
|
+ SELECT COUNT(DISTINCT h.work_date) as workDaysByYear,t.*
|
|
|
|
|
+ FROM kd_xm_technician_hours h
|
|
|
|
|
+ LEFT JOIN
|
|
|
|
|
+ (
|
|
|
|
|
+ SELECT
|
|
|
|
|
+ t.unicode,t.`name`,t.gender,t.number, t.id_card,t.birthday, t.ethnic, t.secondary_unit, t.department,t.post,t.post_location,t.nature, t.hire_date, t.education, t.degree, t.school_name, t.major, t.rank, t.practicing_requirement,t.situation,t.personnel_type, t.remark
|
|
|
|
|
+ FROM kd_technician t
|
|
|
|
|
+ WHERE LEFT(t.year_and_month, 4) = #{ew.yearAndMonth}
|
|
|
|
|
+ GROUP BY unicode
|
|
|
|
|
+ ORDER BY t.year_and_month desc
|
|
|
|
|
+ )t on t.unicode = h.unicode
|
|
|
|
|
+ WHERE LEFT(work_date, 4) = #{ew.yearAndMonth}
|
|
|
|
|
+ <if test="ew.name!=null and ew.name!=''">and t.name like concat('%', #{ew.name},'%')</if>
|
|
|
|
|
+ <if test="ew.number!=null and ew.number!=''">and t.number like concat('%',#{ew.number}, '%')</if>
|
|
|
|
|
+ <if test="ew.idCard!=null and ew.idCard!=''">and t.id_card like concat('%', #{ew.idCard}, '%')</if>
|
|
|
|
|
+ <if test="ew.secondaryUnit!=null and ew.secondaryUnit!=''">and t.secondary_unit like concat('%', #{ew.secondaryUnit}, '%')</if>
|
|
|
|
|
+ <if test="ew.department!=null and ew.department!=''">and t.department like concat('%',#{ew.department}, '%')</if>
|
|
|
|
|
+ <if test="ew.post!=null and ew.post!=''">and t.post like concat('%', #{ew.post},'%')</if>
|
|
|
|
|
+ <if test="ew.nature!=null and ew.nature!=''">and t.nature = #{ew.nature}</if>
|
|
|
|
|
+ <if test="ew.personnelType!=null and ew.personnelType!=''">and t.personnel_type = #{ew.personnelType}</if>
|
|
|
|
|
+ <if test="ew.situation !=null and ew.situation!=''">and t.situation = #{ew.situation}</if>
|
|
|
|
|
+ <if test="ew.education !=null and ew.education!=''">and t.education = #{ew.education}</if>
|
|
|
|
|
+ <if test="ew.degree !=null and ew.degree!=''">and t.degree = #{ew.degree}</if>
|
|
|
|
|
+ <if test="ew.rank !=null and ew.rank!=''">and t.rank like concat('%',#{ew.rank}, '%')</if>
|
|
|
|
|
+ <if test="ew.practicingRequirement !=null and ew.practicingRequirement!=''">and t.practicing_requirement like concat('%',#{ew.practicingRequirement}, '%')</if>
|
|
|
|
|
+ <if test="ew.hireStartDate!=null and ew.hireEndDate!=''">and hire_Date between #{ew.hireStartDate} and #{ew.hireEndDate}</if>
|
|
|
|
|
+ GROUP BY h.unicode
|
|
|
|
|
+ HAVING workDaysByYear > 18
|
|
|
</select>
|
|
</select>
|
|
|
|
|
+
|
|
|
</mapper>
|
|
</mapper>
|