InstallationRequirement.xml 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  3. "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  4. <!-- namespace必须指向DAO接口 -->
  5. <mapper namespace="com.jpsoft.employment.modules.base.dao.InstallationRequirementDAO">
  6. <resultMap id="InstallationRequirementMap" type="com.jpsoft.employment.modules.base.entity.InstallationRequirement">
  7. <id property="id" column="id_" />
  8. <result property="title" column="title_" />
  9. <result property="address" column="address_" />
  10. <result property="image" column="image_" />
  11. <result property="location" column="location_" />
  12. <result property="material" column="material_" />
  13. <result property="size" column="size_" />
  14. <result property="numerical" column="numerical_" />
  15. <result property="isIrregular" column="is_irregular" />
  16. <result property="amount" column="amount_" />
  17. <result property="difficulty" column="difficulty_" />
  18. <result property="isSubsidy" column="is_subsidy" />
  19. <result property="subsidyType" column="subsidy_type" />
  20. <result property="budget" column="budget_" />
  21. <result property="period" column="period_" />
  22. <result property="terminationPeriod" column="termination_period" />
  23. <result property="completionPayProp" column="completion_pay_prop" />
  24. <result property="requirement" column="requirement" />
  25. <result property="stageRequirements" column="stage_requirements" />
  26. <result property="acceptanceCriteria" column="acceptance_criteria" />
  27. <result property="salesRequirement" column="sales_requirement" />
  28. <result property="workOrderId" column="work_order_id" />
  29. <result property="createTime" column="create_time" />
  30. <result property="updateTime" column="update_time" />
  31. <result property="delFlag" column="del_flag" />
  32. <result property="createBy" column="create_by" />
  33. <result property="updateBy" column="update_by" />
  34. <result property="map" column="map_" />
  35. <result property="constructionLocation" column="construction_location" />
  36. <result property="environment" column="environment" />
  37. <result property="volume" column="volume_" />
  38. <result property="material" column="material_" />
  39. <result property="subsidyAmount" column="subsidy_amount" />
  40. </resultMap>
  41. <insert id="insert" parameterType="com.jpsoft.employment.modules.base.entity.InstallationRequirement">
  42. <!--
  43. <selectKey resultType="java.lang.String" order="BEFORE" keyProperty="id">
  44. select sys_guid() from dual
  45. </selectKey>
  46. -->
  47. <![CDATA[
  48. insert into base_installation_requirement
  49. (id_,title_,address_,image_,location_,material_,size_,numerical_,is_irregular,amount_,difficulty_,is_subsidy,subsidy_type,budget_,period_,termination_period,completion_pay_prop,requirement,stage_requirements,acceptance _criteria,sales_requirement,work_order_id,create_time,update_time,del_flag,create_by,update_by,
  50. map_,construction_location,environment,volume_,subsidy_amount)
  51. values
  52. (
  53. #{id,jdbcType=VARCHAR}
  54. ,#{title,jdbcType=VARCHAR}
  55. ,#{address,jdbcType=VARCHAR}
  56. ,#{image,jdbcType=VARCHAR}
  57. ,#{location,jdbcType=VARCHAR}
  58. ,#{material,jdbcType=VARCHAR}
  59. ,#{size,jdbcType= NUMERIC }
  60. ,#{numerical,jdbcType= NUMERIC }
  61. ,#{isIrregular,jdbcType= NUMERIC }
  62. ,#{amount,jdbcType= NUMERIC }
  63. ,#{difficulty,jdbcType=VARCHAR}
  64. ,#{isSubsidy,jdbcType= NUMERIC }
  65. ,#{subsidyType,jdbcType=VARCHAR}
  66. ,#{budget,jdbcType= NUMERIC }
  67. ,#{period,jdbcType=VARCHAR}
  68. ,#{terminationPeriod,jdbcType= NUMERIC }
  69. ,#{completionPayProp,jdbcType= NUMERIC }
  70. ,#{requirement,jdbcType=VARCHAR}
  71. ,#{stageRequirements,jdbcType=VARCHAR}
  72. ,#{acceptance Criteria,jdbcType=VARCHAR}
  73. ,#{salesRequirement,jdbcType=VARCHAR}
  74. ,#{workOrderId,jdbcType=VARCHAR}
  75. ,#{createTime,jdbcType= TIMESTAMP }
  76. ,#{updateTime,jdbcType= TIMESTAMP }
  77. ,#{delFlag,jdbcType= NUMERIC }
  78. ,#{createBy,jdbcType=VARCHAR}
  79. ,#{updateBy,jdbcType=VARCHAR}
  80. ,#{map,jdbcType=VARCHAR}
  81. ,#{constructionLocation,jdbcType=VARCHAR}
  82. ,#{environment,jdbcType=VARCHAR}
  83. ,#{volume,jdbcType= NUMERIC }
  84. ,#{subsidyAmount,jdbcType= NUMERIC }
  85. )
  86. ]]>
  87. </insert>
  88. <delete id="delete" parameterType="string">
  89. delete from base_installation_requirement where id_=#{id,jdbcType=VARCHAR}
  90. </delete>
  91. <update id="update" parameterType="com.jpsoft.employment.modules.base.entity.InstallationRequirement">
  92. update base_installation_requirement
  93. <set>
  94. <if test="title!=null">
  95. title_=#{title,jdbcType=VARCHAR},
  96. </if>
  97. <if test="address!=null">
  98. address_=#{address,jdbcType=VARCHAR},
  99. </if>
  100. <if test="image!=null">
  101. image_=#{image,jdbcType=VARCHAR},
  102. </if>
  103. <if test="location!=null">
  104. location_=#{location,jdbcType=VARCHAR},
  105. </if>
  106. <if test="material!=null">
  107. material_=#{material,jdbcType=VARCHAR},
  108. </if>
  109. <if test="size!=null">
  110. size_=#{size,jdbcType= NUMERIC },
  111. </if>
  112. <if test="numerical!=null">
  113. numerical_=#{numerical,jdbcType= NUMERIC },
  114. </if>
  115. <if test="isIrregular!=null">
  116. is_irregular=#{isIrregular,jdbcType= NUMERIC },
  117. </if>
  118. <if test="amount!=null">
  119. amount_=#{amount,jdbcType= NUMERIC },
  120. </if>
  121. <if test="difficulty!=null">
  122. difficulty_=#{difficulty,jdbcType=VARCHAR},
  123. </if>
  124. <if test="isSubsidy!=null">
  125. is_subsidy=#{isSubsidy,jdbcType= NUMERIC },
  126. </if>
  127. <if test="subsidyType!=null">
  128. subsidy_type=#{subsidyType,jdbcType=VARCHAR},
  129. </if>
  130. <if test="budget!=null">
  131. budget_=#{budget,jdbcType= NUMERIC },
  132. </if>
  133. <if test="period!=null">
  134. period_=#{period,jdbcType=VARCHAR},
  135. </if>
  136. <if test="terminationPeriod!=null">
  137. termination_period=#{terminationPeriod,jdbcType= NUMERIC },
  138. </if>
  139. <if test="completionPayProp!=null">
  140. completion_pay_prop=#{completionPayProp,jdbcType= NUMERIC },
  141. </if>
  142. <if test="requirement!=null">
  143. requirement=#{requirement,jdbcType=VARCHAR},
  144. </if>
  145. <if test="stageRequirements!=null">
  146. stage_requirements=#{stageRequirements,jdbcType=VARCHAR},
  147. </if>
  148. <if test="acceptance Criteria!=null">
  149. acceptance _criteria=#{acceptance Criteria,jdbcType=VARCHAR},
  150. </if>
  151. <if test="salesRequirement!=null">
  152. sales_requirement=#{salesRequirement,jdbcType=VARCHAR},
  153. </if>
  154. <if test="workOrderId!=null">
  155. work_order_id=#{workOrderId,jdbcType=VARCHAR},
  156. </if>
  157. <if test="createTime!=null">
  158. create_time=#{createTime,jdbcType= TIMESTAMP },
  159. </if>
  160. <if test="updateTime!=null">
  161. update_time=#{updateTime,jdbcType= TIMESTAMP },
  162. </if>
  163. <if test="delFlag!=null">
  164. del_flag=#{delFlag,jdbcType= NUMERIC },
  165. </if>
  166. <if test="createBy!=null">
  167. create_by=#{createBy,jdbcType=VARCHAR},
  168. </if>
  169. <if test="updateBy!=null">
  170. update_by=#{updateBy,jdbcType=VARCHAR},
  171. </if>
  172. <if test="map!=null">
  173. map_=#{map,jdbcType=VARCHAR},
  174. </if>
  175. <if test="constructionLocation!=null">
  176. construction_location=#{constructionLocation,jdbcType=VARCHAR},
  177. </if>
  178. <if test="environment!=null">
  179. environment=#{environment,jdbcType=VARCHAR},
  180. </if>
  181. <if test="volume!=null">
  182. volume_=#{volume,jdbcType= NUMERIC },
  183. </if>
  184. <if test="subsidyAmount!=null">
  185. subsidy_amount=#{subsidyAmount,jdbcType= NUMERIC },
  186. </if>
  187. </set>
  188. where id_=#{id}
  189. </update>
  190. <select id="get" parameterType="string" resultMap="InstallationRequirementMap">
  191. select * from base_installation_requirement where id_=#{0}
  192. </select>
  193. <select id="exist" parameterType="string" resultType="int">
  194. select count(*) from base_installation_requirement where id_=#{0}
  195. </select>
  196. <select id="list" resultMap="InstallationRequirementMap">
  197. select * from base_installation_requirement
  198. </select>
  199. <select id="findByWorkOrderId" resultMap="InstallationRequirementMap">
  200. select * from base_installation_requirement where del_flag=false and work_order_id=#{0}
  201. </select>
  202. <select id="search" parameterType="hashmap" resultMap="InstallationRequirementMap">
  203. <![CDATA[
  204. select * from base_installation_requirement
  205. ]]>
  206. <where>
  207. <if test="searchParams.id != null">
  208. and ID_ like #{searchParams.id}
  209. </if>
  210. </where>
  211. <foreach item="sort" collection="sortList" open="order by" separator=",">
  212. ${sort.name} ${sort.order}
  213. </foreach>
  214. </select>
  215. </mapper>