TacTacInspPersPrisLtsDao.xml 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170
  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="cn.com.goldenwater.dcproj.dao.TacTacInspPersPrisLtsDao">
  4. <resultMap type="cn.com.goldenwater.dcproj.model.TacTacInspPersPrisLts" id="tacTacInspPersPrisLtsResultMap">
  5. <result property="id" column="ID"/>
  6. <result property="persPrisId" column="PERS_PRIS_ID"/>
  7. <result property="tenetType" column="TENET_TYPE"/>
  8. <result property="totalSize" column="TOTAL_SIZE"/>
  9. <result property="specialSize" column="SPECIAL_SIZE"/>
  10. <result property="assistantSize" column="ASSISTANT_SIZE"/>
  11. <result property="earlyTisSize" column="EARLY_TIS_SIZE"/>
  12. <result property="devemanageTisSize" column="DEVEMANAGE_TIS_SIZE"/>
  13. <result property="planTisSize" column="PLAN_TIS_SIZE"/>
  14. <result property="financeTisSize" column="FINANCE_TIS_SIZE"/>
  15. <result property="qualityTisSize" column="QUALITY_TIS_SIZE"/>
  16. <result property="safetyTisSize" column="SAFETY_TIS_SIZE"/>
  17. <result property="persId" column="PERS_ID"/>
  18. <result property="inTm" column="IN_TM"/>
  19. <result property="upTm" column="UP_TM"/>
  20. <result property="dataStat" column="DATA_STAT"/>
  21. </resultMap>
  22. <sql id="table_columns">
  23. ID,
  24. PERS_PRIS_ID,
  25. TENET_TYPE,
  26. TOTAL_SIZE,
  27. SPECIAL_SIZE,
  28. ASSISTANT_SIZE,
  29. EARLY_TIS_SIZE,
  30. DEVEMANAGE_TIS_SIZE,
  31. PLAN_TIS_SIZE,
  32. FINANCE_TIS_SIZE,
  33. QUALITY_TIS_SIZE,
  34. SAFETY_TIS_SIZE,
  35. PERS_ID,
  36. IN_TM,
  37. UP_TM,
  38. DATA_STAT
  39. </sql>
  40. <sql id="entity_properties">
  41. #{id},
  42. #{persPrisId},
  43. #{tenetType},
  44. #{totalSize},
  45. #{specialSize},
  46. #{assistantSize},
  47. #{earlyTisSize},
  48. #{devemanageTisSize},
  49. #{planTisSize},
  50. #{financeTisSize},
  51. #{qualityTisSize},
  52. #{safetyTisSize},
  53. #{persId},
  54. #{inTm},
  55. #{upTm},
  56. #{dataStat}
  57. </sql>
  58. <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
  59. <sql id="page_where">
  60. <trim prefix="where" prefixOverrides="and | or ">
  61. <if test="persPrisId != null and persPrisId != ''">and PERS_PRIS_ID = #{persPrisId}</if>
  62. <if test="tenetType != null and tenetType != ''">and TENET_TYPE = #{tenetType}</if>
  63. <if test="totalSize != null and totalSize != ''">and TOTAL_SIZE = #{totalSize}</if>
  64. <if test="specialSize != null and specialSize != ''">and SPECIAL_SIZE = #{specialSize}</if>
  65. <if test="assistantSize != null and assistantSize != ''">and ASSISTANT_SIZE = #{assistantSize}</if>
  66. <if test="earlyTisSize != null and earlyTisSize != ''">and EARLY_TIS_SIZE = #{earlyTisSize}</if>
  67. <if test="devemanageTisSize != null and devemanageTisSize != ''">and DEVEMANAGE_TIS_SIZE = #{devemanageTisSize}</if>
  68. <if test="planTisSize != null and planTisSize != ''">and PLAN_TIS_SIZE = #{planTisSize}</if>
  69. <if test="financeTisSize != null and financeTisSize != ''">and FINANCE_TIS_SIZE = #{financeTisSize}</if>
  70. <if test="qualityTisSize != null and qualityTisSize != ''">and QUALITY_TIS_SIZE = #{qualityTisSize}</if>
  71. <if test="safetyTisSize != null and safetyTisSize != ''">and SAFETY_TIS_SIZE = #{safetyTisSize}</if>
  72. <if test="persId != null and persId != ''">and PERS_ID = #{persId}</if>
  73. <if test="inTm != null">and IN_TM = #{inTm}</if>
  74. <if test="upTm != null">and UP_TM = #{upTm}</if>
  75. <if test="dataStat != null and dataStat != ''">and DATA_STAT = #{dataStat}</if>
  76. </trim>
  77. </sql>
  78. <select id="get" resultMap="tacTacInspPersPrisLtsResultMap" parameterType="String" >
  79. select <include refid="table_columns" /> from TAC_TAC_INSP_PERS_PRIS_LTS where ID = #{id}
  80. </select>
  81. <select id="getBy" resultMap="tacTacInspPersPrisLtsResultMap">
  82. select <include refid="table_columns" /> from TAC_TAC_INSP_PERS_PRIS_LTS <include refid="page_where" />
  83. </select>
  84. <select id="findAll" resultMap="tacTacInspPersPrisLtsResultMap">
  85. select <include refid="table_columns" /> from TAC_TAC_INSP_PERS_PRIS_LTS
  86. </select>
  87. <select id="findList" resultMap="tacTacInspPersPrisLtsResultMap">
  88. select <include refid="table_columns" /> from TAC_TAC_INSP_PERS_PRIS_LTS <include refid="page_where" />
  89. </select>
  90. <select id="selectCount" resultType="int" >
  91. select count(ID) from TAC_TAC_INSP_PERS_PRIS_LTS <include refid="page_where" />
  92. </select>
  93. <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.TacTacInspPersPrisLts">
  94. insert into TAC_TAC_INSP_PERS_PRIS_LTS( <include refid="table_columns" /> )
  95. values ( <include refid="entity_properties" /> )
  96. </insert>
  97. <delete id="delete" parameterType="java.lang.String">
  98. delete from TAC_TAC_INSP_PERS_PRIS_LTS where ID = #{id}
  99. </delete>
  100. <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.TacTacInspPersPrisLts">
  101. delete from TAC_TAC_INSP_PERS_PRIS_LTS <include refid="page_where" />
  102. </delete>
  103. <update id="deleteInFlag" parameterType="java.lang.String">
  104. update TAC_TAC_INSP_PERS_PRIS_LTS set flag_valid = 0 where ID = #{id}
  105. </update>
  106. <update id="update" parameterType="cn.com.goldenwater.dcproj.model.TacTacInspPersPrisLts">
  107. update TAC_TAC_INSP_PERS_PRIS_LTS
  108. <trim prefix="set" suffixOverrides=",">
  109. <if test="persPrisId != null and persPrisId != ''">PERS_PRIS_ID = #{persPrisId},</if>
  110. <if test="tenetType != null and tenetType != ''">TENET_TYPE = #{tenetType},</if>
  111. TOTAL_SIZE = #{totalSize},
  112. SPECIAL_SIZE = #{specialSize},
  113. ASSISTANT_SIZE = #{assistantSize},
  114. EARLY_TIS_SIZE = #{earlyTisSize},
  115. DEVEMANAGE_TIS_SIZE = #{devemanageTisSize},
  116. PLAN_TIS_SIZE = #{planTisSize},
  117. FINANCE_TIS_SIZE = #{financeTisSize},
  118. QUALITY_TIS_SIZE = #{qualityTisSize},
  119. SAFETY_TIS_SIZE = #{safetyTisSize},
  120. <if test="persId != null and persId != ''">PERS_ID = #{persId},</if>
  121. <if test="inTm != null">IN_TM = #{inTm},</if>
  122. <if test="upTm != null">UP_TM = #{upTm},</if>
  123. <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
  124. </trim>
  125. <where>ID = #{id}</where>
  126. </update>
  127. <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.TacTacInspPersPrisLts">
  128. update TAC_TAC_INSP_PERS_PRIS_LTS
  129. <trim prefix="set" suffixOverrides=",">
  130. <if test="persPrisId != null and persPrisId != ''">PERS_PRIS_ID = #{persPrisId},</if>
  131. <if test="tenetType != null and tenetType != ''">TENET_TYPE = #{tenetType},</if>
  132. <if test="totalSize != null and totalSize != ''">TOTAL_SIZE = #{totalSize},</if>
  133. <if test="specialSize != null and specialSize != ''">SPECIAL_SIZE = #{specialSize},</if>
  134. <if test="assistantSize != null and assistantSize != ''">ASSISTANT_SIZE = #{assistantSize},</if>
  135. <if test="earlyTisSize != null and earlyTisSize != ''">EARLY_TIS_SIZE = #{earlyTisSize},</if>
  136. <if test="devemanageTisSize != null and devemanageTisSize != ''">DEVEMANAGE_TIS_SIZE = #{devemanageTisSize},</if>
  137. <if test="planTisSize != null and planTisSize != ''">PLAN_TIS_SIZE = #{planTisSize},</if>
  138. <if test="financeTisSize != null and financeTisSize != ''">FINANCE_TIS_SIZE = #{financeTisSize},</if>
  139. <if test="qualityTisSize != null and qualityTisSize != ''">QUALITY_TIS_SIZE = #{qualityTisSize},</if>
  140. <if test="safetyTisSize != null and safetyTisSize != ''">SAFETY_TIS_SIZE = #{safetyTisSize},</if>
  141. <if test="persId != null and persId != ''">PERS_ID = #{persId},</if>
  142. <if test="inTm != null">IN_TM = #{inTm},</if>
  143. <if test="upTm != null">UP_TM = #{upTm},</if>
  144. <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
  145. </trim>
  146. <include refid="page_where" />
  147. </update>
  148. <!-- 其他自定义SQL -->
  149. </mapper>