OrganizationRatingMapper.xml 3.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  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.OrganizationRatingMapper">
  4. <select id="selectList" resultType="com.ims.eval.entity.OrganizationRating">
  5. select
  6. r.id,r.organization_year_rating_id,r.organization_short_name,r.organization_id,r.year,r.bin_section,TRIM('"' FROM r.scjy_rate) AS scjy_rate,
  7. TRIM('"' FROM r.qq_rate) AS qq_rate,TRIM('"' FROM r.jj_rate) AS jj_rate,TRIM('"' FROM r.year_rate) AS year_rate,r.create_by,r.update_by,r.create_time,r.update_time,
  8. r.remark,r.safety_env_protection,r.veto,r.net_profit,r.composite_score,r.annual_target,r.bonus_point,r.composite_score_raking,r.project_level,
  9. bs.section_name binsectionname
  10. from
  11. organization_rating r
  12. left join bin_section bs on bs.section_code = r.bin_section
  13. <where>
  14. <if test="id !=null and id !=''">
  15. and r.id=#{id}
  16. </if>
  17. <if test="organizationYearRatingId !=null and organizationYearRatingId !=''">
  18. and r.organization_year_rating_id=#{organizationYearRatingId}
  19. </if>
  20. <if test="binSection !=null and binSection !=''">
  21. and r.bin_section=#{binSection}
  22. </if>
  23. <if test="year !=null and year !=''">
  24. and r.year=#{year}
  25. </if>
  26. <if test="organizationShortName !=null and organizationShortName !=''">
  27. AND r.organization_short_name like CONCAT('%',#{organizationShortName},'%')
  28. </if>
  29. <if test="organizationId !=null and organizationId !=''">
  30. and r.organization_id=#{organizationId}
  31. </if>
  32. <if test="safetyEnvProtection !=null and safetyEnvProtection !=''">
  33. and r.safety_env_protection=#{safetyEnvProtection}
  34. </if>
  35. <if test="veto !=null and veto !=''">
  36. and r.veto=#{veto}
  37. </if>
  38. <if test="netProfit !=null and netProfit !=''">
  39. and r.net_profit=#{netProfit}
  40. </if>
  41. <if test="compositeScore !=null and compositeScore !=''">
  42. and r.composite_score=#{compositeScore}
  43. </if>
  44. <if test="annualTarget !=null and annualTarget !=''">
  45. and r.annual_target=#{annualTarget}
  46. </if>
  47. <if test="bonusPoint !=null and compositeScore !=''">
  48. and r.bonus_point=#{bonusPoint}
  49. </if>
  50. <if test="compositeScoreRaking !=null and compositeScoreRaking !=''">
  51. and r.composite_score_raking=#{compositeScoreRaking}
  52. </if>
  53. <if test="projectLevel !=null and projectLevel !=''">
  54. and r.project_level=#{projectLevel}
  55. </if>
  56. </where>
  57. order by r.organization_short_name
  58. </select>
  59. <select id="selectListSating" resultType="com.ims.eval.entity.OrganizationRating">
  60. select
  61. *
  62. from
  63. organization_rating r
  64. <where>
  65. <if test="organizationYearRatingId !=null and organizationYearRatingId !=''">
  66. and r.organization_year_rating_id=#{organizationYearRatingId}
  67. </if>
  68. <if test="year !=null and year !=''">
  69. and r.year=#{year}
  70. </if>
  71. <if test="organizationId !=null and organizationId !=''">
  72. and r.organization_id=#{organizationId}
  73. </if>
  74. </where>
  75. </select>
  76. </mapper>