OrganizationEvaluationCommonInfoMapper.xml 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  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.OrganizationEvaluationCommonInfoMapper">
  4. <!--
  5. <select id="selectEvaluationInfoList" resultType="com.ims.eval.entity.dto.response.OrganizationEvaluationInfoResDTO">
  6. select
  7. ei.id,
  8. oe.id organizationEvaluationId,
  9. ei.indicator_id,
  10. ei.is_quantified,
  11. id.is_quantified isQuantified2,
  12. be.stage_name,
  13. be.id binStage,
  14. bn.id binSection,
  15. bn.section_name,
  16. oer.id organizationEvaluationRuleId,
  17. oer.organization_name,
  18. oer.organization_id,
  19. oer.organization_short_name,
  20. dd.key_name deptName,
  21. it.type_name,
  22. i.indicator_name,
  23. id.child_name,
  24. id.child_code,
  25. id.option_name,
  26. id.option_code,
  27. ei.quantified_value,
  28. ei.non_quantified_value,
  29. i.unit,
  30. ei.state,
  31. ri.min_score,
  32. ri.max_score
  33. from
  34. organization_evaluation_info ei
  35. inner join organization_evaluation_rule oer on oer.id = ei.organization_evaluation_rule_id
  36. inner join organization_evaluation oe on oe.id = ei.organization_evaluation_id
  37. left join indicator i on ei.indicator_id = i.id
  38. left join evaluate_rule_info ri on ri.indicator_id = i.id and ei.evaluate_rule_info_id = ri.id
  39. left join bin_stage be on i.bin_stage = be.id
  40. left join bin_section bn on i.bin_section = bn.id
  41. left join indicator_type it on i.indicator_type_id = it.id
  42. left join indicator_dictionary id on ei.indicator_dictionary_id = id.id
  43. inner join data_dictionary dd on dd.data_key = i.dept_id
  44. <where>
  45. <if test="organizationEvaluationId !=null and organizationEvaluationId !=''">
  46. and ei.organization_evaluation_id = #{organizationEvaluationId}
  47. </if>
  48. <if test="indicatorId !=null and indicatorId !=''">
  49. and ei.indicator_id = #{indicatorId}
  50. </if>
  51. <if test="binSection !=null and binSection !=''">
  52. and bn.id = #{binSection}
  53. </if>
  54. <if test="binStage !=null and binStage !=''">
  55. and be.id = #{binStage}
  56. </if>
  57. <if test="organizationId !=null and organizationId !=''">
  58. and oer.organization_id = #{organizationId}
  59. </if>
  60. <if test="organizationShortName !=null and organizationShortName !=''">
  61. and oer.organization_short_name like CONCAT('%',#{organizationShortName},'%')
  62. </if>
  63. and id.option_code not in ('CZMAX','CZMIN','LRGXKLMAX','LRGXKLMIN','DWQWLRMAX','DWQWLRMIN','LRGXKHMAX','LRGXKHMIN')
  64. </where>
  65. order by oer.order_num asc
  66. </select>
  67. -->
  68. <select id="selectListAll" resultType="com.ims.eval.entity.OrganizationEvaluationCommonInfo">
  69. SELECT
  70. *
  71. FROM organization_evaluation_common_info ci
  72. <where>
  73. <if test="organizationEvaluationId !=null and organizationEvaluationId !=''">
  74. and ci.organization_evaluation_id = #{organizationEvaluationId}
  75. </if>
  76. <if test="indicatorId !=null and indicatorId !=''">
  77. and ci.indicator_id = #{indicatorId}
  78. </if>
  79. <if test="organizationId !=null and organizationId !=''">
  80. and ci.organization_id = #{organizationId}
  81. </if>
  82. <if test="deptId !=null and deptId !=''">
  83. and ci.dept_id = #{deptId}
  84. </if>
  85. </where>
  86. </select>
  87. </mapper>