BisInspRsvrSdRprDao.xml 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  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.BisInspRsvrSdRprDao">
  4. <resultMap type="cn.com.goldenwater.dcproj.model.BisInspRsvrSdRpr" id="bisInspRsvrSdRprResultMap">
  5. <result property="isMontData" column="IS_MONT_DATA"/>
  6. <result property="isNmorlRun" column="IS_NMORL_RUN"/>
  7. <result property="isDngChk" column="IS_DNG_CHK"/>
  8. <result property="dataStat" column="DATA_STAT"/>
  9. <result property="persId" column="PERS_ID"/>
  10. <result property="intm" column="INTM"/>
  11. <result property="uptm" column="UPTM"/>
  12. <result property="note" column="NOTE"/>
  13. <result property="id" column="ID"/>
  14. <result property="rgstrId" column="RGSTR_ID"/>
  15. <result property="isRoadChk" column="IS_ROAD_CHK"/>
  16. </resultMap>
  17. <sql id="table_columns">
  18. IS_MONT_DATA,
  19. IS_NMORL_RUN,
  20. IS_DNG_CHK,
  21. DATA_STAT,
  22. PERS_ID,
  23. INTM,
  24. UPTM,
  25. NOTE,
  26. ID,
  27. RGSTR_ID,
  28. IS_ROAD_CHK
  29. </sql>
  30. <sql id="entity_properties">
  31. #{isMontData},
  32. #{isNmorlRun},
  33. #{isDngChk},
  34. #{dataStat},
  35. #{persId},
  36. #{intm},
  37. #{uptm},
  38. #{note},
  39. #{id},
  40. #{rgstrId},
  41. #{isRoadChk}
  42. </sql>
  43. <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
  44. <sql id="page_where">
  45. <trim prefix="where" prefixOverrides="and | or ">
  46. <if test="isNmorlRun != null and isNmorlRun != ''">and IS_NMORL_RUN = #{isNmorlRun}</if>
  47. <if test="isDngChk != null and isDngChk != ''">and IS_DNG_CHK = #{isDngChk}</if>
  48. <if test="dataStat != null and dataStat != ''">and DATA_STAT = #{dataStat}</if>
  49. <if test="persId != null and persId != ''">and PERS_ID = #{persId}</if>
  50. <if test="intm != null">and INTM = #{intm}</if>
  51. <if test="uptm != null">and UPTM = #{uptm}</if>
  52. <if test="note != null and note != ''">and NOTE = #{note}</if>
  53. <if test="id != null and id != ''">and ID = #{id}</if>
  54. <if test="rgstrId != null and rgstrId != ''">and RGSTR_ID = #{rgstrId}</if>
  55. <if test="isRoadChk != null and isRoadChk != ''">and IS_ROAD_CHK = #{isRoadChk}</if>
  56. </trim>
  57. </sql>
  58. <select id="get" resultMap="bisInspRsvrSdRprResultMap" parameterType="String" >
  59. select <include refid="table_columns" /> from BIS_INSP_RSVR_SD_RPR where RGSTR_ID = #{id}
  60. </select>
  61. <select id="getBy" resultMap="bisInspRsvrSdRprResultMap">
  62. select <include refid="table_columns" /> from BIS_INSP_RSVR_SD_RPR <include refid="page_where" />
  63. </select>
  64. <select id="findAll" resultMap="bisInspRsvrSdRprResultMap">
  65. select <include refid="table_columns" /> from BIS_INSP_RSVR_SD_RPR
  66. </select>
  67. <select id="findList" resultMap="bisInspRsvrSdRprResultMap">
  68. select <include refid="table_columns" /> from BIS_INSP_RSVR_SD_RPR <include refid="page_where" />
  69. </select>
  70. <select id="selectCount" resultType="int" >
  71. select count(ID) from BIS_INSP_RSVR_SD_RPR <include refid="page_where" />
  72. </select>
  73. <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.BisInspRsvrSdRpr">
  74. insert into BIS_INSP_RSVR_SD_RPR( <include refid="table_columns" /> )
  75. values ( <include refid="entity_properties" /> )
  76. </insert>
  77. <delete id="delete" parameterType="java.lang.String">
  78. update BIS_INSP_RSVR_SD_RPR set DATA_STAT='9' where ID = #{id}
  79. </delete>
  80. <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspRsvrSdRpr">
  81. delete from BIS_INSP_RSVR_SD_RPR <include refid="page_where" />
  82. </delete>
  83. <update id="deleteInFlag" parameterType="java.lang.String">
  84. update BIS_INSP_RSVR_SD_RPR set flag_valid = 0 where ID = #{id}
  85. </update>
  86. <update id="update" parameterType="cn.com.goldenwater.dcproj.model.BisInspRsvrSdRpr">
  87. update BIS_INSP_RSVR_SD_RPR
  88. <trim prefix="set" suffixOverrides=",">
  89. <if test="isMontData != null and isMontData != ''">IS_MONT_DATA = #{isMontData},</if>
  90. <if test="isNmorlRun != null and isNmorlRun != ''">IS_NMORL_RUN = #{isNmorlRun},</if>
  91. <if test="isDngChk != null and isDngChk != ''">IS_DNG_CHK = #{isDngChk},</if>
  92. <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
  93. <if test="persId != null and persId != ''">PERS_ID = #{persId},</if>
  94. <if test="intm != null">INTM = #{intm},</if>
  95. <if test="uptm != null">UPTM = #{uptm},</if>
  96. <if test="note != null and note != ''">NOTE = #{note},</if>
  97. <if test="id != null and id != ''">ID = #{id},</if>
  98. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID = #{rgstrId},</if>
  99. <if test="isRoadChk != null and isRoadChk != ''">IS_ROAD_CHK = #{isRoadChk},</if>
  100. </trim>
  101. <where>ID = #{id}</where>
  102. </update>
  103. <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspRsvrSdRpr">
  104. update BIS_INSP_RSVR_SD_RPR
  105. <trim prefix="set" suffixOverrides=",">
  106. <if test="isMontData != null and isMontData != ''">IS_MONT_DATA = #{isMontData},</if>
  107. <if test="isNmorlRun != null and isNmorlRun != ''">IS_NMORL_RUN = #{isNmorlRun},</if>
  108. <if test="isDngChk != null and isDngChk != ''">IS_DNG_CHK = #{isDngChk},</if>
  109. <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
  110. <if test="persId != null and persId != ''">PERS_ID = #{persId},</if>
  111. <if test="intm != null">INTM = #{intm},</if>
  112. <if test="uptm != null">UPTM = #{uptm},</if>
  113. <if test="note != null and note != ''">NOTE = #{note},</if>
  114. <if test="id != null and id != ''">ID = #{id},</if>
  115. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID = #{rgstrId},</if>
  116. <if test="isRoadChk != null and isRoadChk != ''">IS_ROAD_CHK = #{isRoadChk},</if>
  117. </trim>
  118. <include refid="page_where" />
  119. </update>
  120. <!-- 其他自定义SQL -->
  121. </mapper>