EvaluationPortalMapper.xml 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  3. <mapper namespace="com.ims.eval.dao.EvaluationPortalMapper">
  4. <!-- 通用查询映射结果 -->
  5. <resultMap id="BaseResultMap" type="com.ims.eval.entity.EvaluationPortal">
  6. <id column="id" property="id" />
  7. <result column="bin_section" property="binSection" />
  8. <result column="bin_stage" property="binStage" />
  9. <result column="bin_property" property="binProperty" />
  10. <result column="company" property="company" />
  11. <result column="grade" property="grade" />
  12. <result column="score" property="score" />
  13. <result column="base_score" property="baseScore" />
  14. <result column="year" property="year" />
  15. <result column="season" property="season" />
  16. <result column="matter_heigh" property="matterHeigh" />
  17. <result column="matter_low" property="matterLow" />
  18. <result column="manage_heigh" property="manageHeigh" />
  19. <result column="manage_low" property="manageLow" />
  20. <result column="standard_heigh" property="standardHeigh" />
  21. <result column="standard_low" property="standardLow" />
  22. <result column="dept_id" property="deptId" />
  23. <result column="create_time" property="createTime" />
  24. <result column="memo1" property="memo1" />
  25. <result column="memo2" property="memo2" />
  26. <result column="memo3" property="memo3" />
  27. <result column="memo4" property="memo4" />
  28. </resultMap>
  29. <!-- 通用查询结果列 -->
  30. <sql id="Base_Column_List">
  31. id, bin_section, bin_stage, bin_property, company, grade, score, base_score, year, season, matter_heigh, matter_low, manage_heigh, manage_low,
  32. standard_heigh, standard_low, dept_id, create_time, memo1, memo2, memo3, memo4
  33. </sql>
  34. <select id="selectPortalList" resultType="java.util.Map">
  35. SELECT
  36. ep.*,
  37. bs.section_name,
  38. ea.portal_id,
  39. ea.matter_heigh_note,
  40. ea.matter_low_note,
  41. ea.manage_height_note,
  42. ea.manage_low_note,
  43. ea.standard_heigh_note,
  44. ea.standard_low_note
  45. FROM
  46. evaluation_portal ep
  47. LEFT JOIN evaluation_portal_attach ea ON ep.id = ea.portal_id
  48. LEFT JOIN bin_section bs ON ep.bin_section = bs.section_code
  49. <where>
  50. <if test="binSection !=null and binSection !=''">
  51. AND ep.bin_section = #{binSection}
  52. </if>
  53. <if test="year !=null and year !=''">
  54. AND ep.year = #{year}
  55. </if>
  56. <if test="season !=null and season !=''">
  57. AND ep.season = #{season}
  58. </if>
  59. <if test="season ==null">
  60. AND ep.season is null
  61. </if>
  62. </where>
  63. ORDER BY SCORE DESC
  64. </select>
  65. <select id="selectEvaluationPortalList" resultType="com.ims.eval.entity.EvaluationPortal">
  66. SELECT
  67. ep.*
  68. FROM
  69. evaluation_portal ep
  70. <where>
  71. <if test="binSection !=null and binSection !=''">
  72. AND ep.bin_section = #{binSection}
  73. </if>
  74. <if test="year !=null and year !=''">
  75. AND ep.year = #{year}
  76. </if>
  77. <if test="season !=null and season !=''">
  78. AND ep.season = #{season}
  79. </if>
  80. <if test="season ==null or season ==''">
  81. AND ep.season is null
  82. </if>
  83. <if test="memo1 !=null and memo1 !=''">
  84. AND ep.memo1 = #{memo1}
  85. </if>
  86. </where>
  87. ORDER BY SCORE DESC
  88. </select>
  89. </mapper>