HsOrgPersonnelFilesMapper.xml 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE mapper
  3. PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  4. "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  5. <mapper namespace="com.willalp.files.mapper.HsOrgPersonnelFilesMapper">
  6. <resultMap type="com.willalp.files.domain.HsOrgPersonnelFiles" id="HsOrgPersonnelFilesResult">
  7. <result property="id" column="id"/>
  8. <result property="userCode" column="user_code"/>
  9. <result property="jobNo" column="job_no"/>
  10. <result property="userName" column="user_name"/>
  11. <result property="userType" column="user_type"/>
  12. <result property="sex" column="sex"/>
  13. <result property="age" column="age"/>
  14. <result property="nation" column="nation"/>
  15. <result property="origo" column="origo"/>
  16. <result property="politicsStatus" column="politics_status"/>
  17. <result property="educationalLevel" column="educational_level"/>
  18. <result property="birthday" column="birthday"/>
  19. <result property="residence" column="residence"/>
  20. <result property="phone" column="phone"/>
  21. <result property="email" column="email"/>
  22. <result property="seatNo" column="seat_no"/>
  23. <result property="post" column="post"/>
  24. <result property="jobTitle" column="job_title"/>
  25. <result property="department" column="department"/>
  26. <result property="hiredate" column="hiredate"/>
  27. <result property="resignationTime" column="resignation_time"/>
  28. <result property="isDelete" column="is_delete"/>
  29. <result property="createBy" column="create_by"/>
  30. <result property="createTime" column="create_time"/>
  31. <result property="updateBy" column="update_by"/>
  32. <result property="updateTime" column="update_time"/>
  33. <result property="remark" column="remark"/>
  34. </resultMap>
  35. <sql id="selectHsOrgPersonnelFilesVo">
  36. select hpf.id,
  37. user_code,
  38. job_no,
  39. user_name,
  40. sex,
  41. suo.user_type,
  42. age,
  43. nation,
  44. origo,
  45. politics_status,
  46. educational_level,
  47. birthday,
  48. residence,
  49. hpf.phone,
  50. hpf.email,
  51. seat_no,
  52. post,
  53. job_title,
  54. sd.dept_name as department,
  55. hiredate,
  56. resignation_time
  57. from hs_org_personnel_files hpf
  58. left join sys_user_organization suo on suo.login_name = hpf.user_code
  59. left join sys_dept sd on sd.dept_id = hpf.department
  60. </sql>
  61. <select id="selectHsOrgPersonnelFilesList" parameterType="HsOrgPersonnelFiles"
  62. resultMap="HsOrgPersonnelFilesResult">
  63. <include refid="selectHsOrgPersonnelFilesVo"/>
  64. <where>
  65. is_delete = 0
  66. And suo.organization_code = 'G00000007'
  67. <if test="userType != null and userType != ''">
  68. and suo.user_type = #{userType}
  69. </if>
  70. <if test="userCode != null and userCode != ''">
  71. and user_code = #{userCode}
  72. </if>
  73. <if test="jobNo != null and jobNo != ''">
  74. and job_no = #{jobNo}
  75. </if>
  76. <if test="userName != null and userName != ''">
  77. and user_name like concat('%', #{userName}, '%')
  78. </if>
  79. <if test="sex != null and sex != ''">
  80. and sex = #{sex}
  81. </if>
  82. <if test="age != null ">
  83. and age = #{age}
  84. </if>
  85. <if test="nation != null and nation != ''">
  86. and nation = #{nation}
  87. </if>
  88. <if test="origo != null and origo != ''">
  89. and origo = #{origo}
  90. </if>
  91. <if test="politicsStatus != null and politicsStatus != ''">
  92. and politics_status = #{politicsStatus}
  93. </if>
  94. <if test="educationalLevel != null and educationalLevel != ''">
  95. and educational_level = #{educationalLevel}
  96. </if>
  97. <if test="birthday != null and birthday != ''">
  98. and birthday = #{birthday}
  99. </if>
  100. <if test="residence != null and residence != ''">
  101. and residence = #{residence}
  102. </if>
  103. <if test="phone != null and phone != ''">
  104. and hpf.phone = #{phone}
  105. </if>
  106. <if test="email != null and email != ''">
  107. and email = #{email}
  108. </if>
  109. <if test="seatNo != null and seatNo != ''">
  110. and seat_no = #{seatNo}
  111. </if>
  112. <if test="jobTitle != null and jobTitle != ''">
  113. and job_title = #{jobTitle}
  114. </if>
  115. <if test="department != null and department != ''">
  116. and sd.dept_id = #{department}
  117. </if>
  118. <if test="hiredate != null ">
  119. and hiredate = #{hiredate}
  120. </if>
  121. <if test="resignationTime != null ">
  122. and resignation_time = #{resignationTime}
  123. </if>
  124. </where>
  125. </select>
  126. </mapper>