Guiji_Medicine_Mapper2.xml 9.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197
  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.sooka.mapper.Guiji_Medicine_Mapper2">
  4. <sql id="global_name">
  5. id,create_time,cd_time,cd_batch,cd_operation,cd_source,
  6. </sql>
  7. <sql id="global_value">
  8. #{id},now(),#{cd_time},#{cd_batch},#{cd_operation},#{cd_source},
  9. </sql>
  10. <sql id="update_sql">
  11. create_time = now(),cd_batch = #{cd_batch},cd_operation = #{cd_operation},cd_source =#{cd_source},
  12. </sql>
  13. <insert id="add_guiji_medicine_dept_data" parameterType="com.sooka.model.bo.Guiji_medicine_dept_data_Bean">
  14. insert into t_guiji_medicine_plant (
  15. <include refid="global_name"></include>
  16. plantName, plantAddress, plantHectare, produceTons, produceValue, plantYear)
  17. values (
  18. <include refid="global_value"></include>
  19. #{plantName}, #{plantAddress}, #{plantHectare}, #{produceTons}, #{produceValue}, #{plantYear})
  20. </insert>
  21. <update id="update_guiji_medicine_dept_data" parameterType="com.sooka.model.bo.Guiji_medicine_dept_data_Bean">
  22. update t_guiji_medicine_plant
  23. <trim prefix="SET" suffixOverrides=",">
  24. <include refid="update_sql"></include>
  25. <if test="plantName != null and plantName != ''">
  26. plantName = #{plantName},
  27. </if>
  28. <if test="plantAddress != null and plantAddress != ''">
  29. plantAddress = #{plantAddress},
  30. </if>
  31. <if test="plantHectare != null and plantHectare != ''">
  32. plantHectare = #{plantHectare},
  33. </if>
  34. <if test="produceTons != null and produceTons != ''">
  35. produceTons = #{produceTons},
  36. </if>
  37. <if test="produceValue != null and produceValue != ''">
  38. produceValue = #{produceValue},
  39. </if>
  40. <if test="plantYear != null and plantYear != ''">
  41. plantYear = #{plantYear},
  42. </if>
  43. </trim>
  44. where id = #{id}
  45. </update>
  46. <insert id="add_guiji_medicine_dept_data2" parameterType="com.sooka.model.bo.Guiji_medicine_dept_data2_Bean">
  47. insert into t_guiji_medicine_platform (
  48. <include refid="global_name"></include>
  49. platformName, constructingUnit, constructingDate, platformAddress, platformAddressExt, platformLevel, platformType)
  50. values (
  51. <include refid="global_value"></include>
  52. #{platformName}, #{constructingUnit}, #{constructingDate}, #{platformAddress}, #{platformAddressExt}, #{platformLevel}, #{platformType})
  53. </insert>
  54. <update id="update_guiji_medicine_dept_data2" parameterType="com.sooka.model.bo.Guiji_medicine_dept_data2_Bean">
  55. update t_guiji_medicine_platform
  56. <trim prefix="SET" suffixOverrides=",">
  57. <include refid="update_sql"></include>
  58. <if test="platformName != null and platformName != ''">
  59. platformName = #{platformName},
  60. </if>
  61. <if test="constructingUnit != null and constructingUnit != ''">
  62. constructingUnit = #{constructingUnit},
  63. </if>
  64. <if test="constructingDate != null and constructingDate != ''">
  65. constructingDate = #{constructingDate},
  66. </if>
  67. <if test="platformAddress != null and platformAddress != ''">
  68. platformAddress = #{platformAddress},
  69. </if>
  70. <if test="platformAddressExt != null and platformAddressExt != ''">
  71. platformAddressExt = #{platformAddressExt},
  72. </if>
  73. <if test="platformLevel != null and platformLevel != ''">
  74. platformLevel = #{platformLevel},
  75. </if>
  76. <if test="platformType != null and platformType != ''">
  77. platformType = #{platformType},
  78. </if>
  79. </trim>
  80. where id = #{id}
  81. </update>
  82. <insert id="add_guiji_medicine_dept_data3" parameterType="com.sooka.model.bo.Guiji_medicine_dept_data3_Bean">
  83. insert into t_guiji_medicine_project (
  84. <include refid="global_name"></include>
  85. projectName, projectOrgName, projectAddress, projectStatus, projectTotalInvestment, projectStart, projectEnd)
  86. values (
  87. <include refid="global_value"></include>
  88. #{projectName}, #{projectOrgName}, #{projectAddress}, #{projectStatus}, #{projectTotalInvestment}, #{projectStart}, #{projectEnd})
  89. </insert>
  90. <update id="update_guiji_medicine_dept_data3" parameterType="com.sooka.model.bo.Guiji_medicine_dept_data3_Bean">
  91. update t_guiji_medicine_project
  92. <trim prefix="SET" suffixOverrides=",">
  93. <include refid="update_sql"></include>
  94. <if test="projectName != null and projectName != ''">
  95. projectName = #{projectName},
  96. </if>
  97. <if test="projectOrgName != null and projectOrgName != ''">
  98. projectOrgName = #{projectOrgName},
  99. </if>
  100. <if test="projectAddress != null and projectAddress != ''">
  101. projectAddress = #{projectAddress},
  102. </if>
  103. <if test="projectStatus != null and projectStatus != ''">
  104. projectStatus = #{projectStatus},
  105. </if>
  106. <if test="projectTotalInvestment != null and projectTotalInvestment != ''">
  107. projectTotalInvestment = #{projectTotalInvestment},
  108. </if>
  109. <if test="projectStart != null and projectStart != ''">
  110. projectStart = #{projectStart},
  111. </if>
  112. <if test="projectEnd != null and projectEnd != ''">
  113. projectEnd = #{projectEnd},
  114. </if>
  115. </trim>
  116. where id = #{id}
  117. </update>
  118. <insert id="add_guiji_medicine_dept_data4" parameterType="com.sooka.model.bo.Guiji_medicine_dept_data4_Bean">
  119. insert into t_guiji_medicine_industry (
  120. <include refid="global_name"></include>
  121. year, month, economyType, number, yearOnYear, cityProportion)
  122. values (
  123. <include refid="global_value"></include>
  124. #{year}, #{month}, #{economyType}, #{number}, #{yearOnYear}, #{cityProportion})
  125. </insert>
  126. <update id="update_guiji_medicine_dept_data4" parameterType="com.sooka.model.bo.Guiji_medicine_dept_data4_Bean">
  127. update t_guiji_medicine_industry
  128. <trim prefix="SET" suffixOverrides=",">
  129. <include refid="update_sql"></include>
  130. <if test="year != null and year != ''">
  131. year = #{year},
  132. </if>
  133. <if test="month != null and month != ''">
  134. month = #{month},
  135. </if>
  136. <if test="economyType != null and economyType != ''">
  137. economyType = #{economyType},
  138. </if>
  139. <if test="number != null and number != ''">
  140. number = #{number},
  141. </if>
  142. <if test="yearOnYear != null and yearOnYear != ''">
  143. yearOnYear = #{yearOnYear},
  144. </if>
  145. <if test="cityProportion != null and cityProportion != ''">
  146. cityProportion = #{cityProportion},
  147. </if>
  148. </trim>
  149. where id = #{id}
  150. </update>
  151. <select id="select_1" resultType="com.sooka.model.bo.Guiji_medicine_dept_data_Bean" parameterType="com.sooka.model.bo.Guiji_medicine_dept_data_Bean">
  152. select id, create_time, cd_time, cd_batch, cd_operation, cd_source, plantName, plantAddress, plantHectare, produceTons, produceValue, plantYear from t_guiji_medicine_plant
  153. where 1=1
  154. <if test="plantName != null and plantName != ''">
  155. and plantName = #{plantName}
  156. </if>
  157. </select>
  158. <select id="select_2" resultType="com.sooka.model.bo.Guiji_medicine_dept_data2_Bean" parameterType="com.sooka.model.bo.Guiji_medicine_dept_data2_Bean">
  159. select id, create_time, cd_time, cd_batch, cd_operation, cd_source, platformName, constructingUnit, constructingDate, platformAddress, platformAddressExt, platformLevel, platformType from t_guiji_medicine_platform
  160. where 1=1
  161. <if test="platformName != null and platformName != ''">
  162. and platformName = #{platformName}
  163. </if>
  164. </select>
  165. <select id="select_3" resultType="com.sooka.model.bo.Guiji_medicine_dept_data3_Bean" parameterType="com.sooka.model.bo.Guiji_medicine_dept_data3_Bean">
  166. select id, create_time, cd_time, cd_batch, cd_operation, cd_source, projectName, projectOrgName, projectAddress, projectStatus, projectTotalInvestment, projectStart, projectEnd from t_guiji_medicine_project
  167. where 1=1
  168. <if test="projectName != null and projectName != ''">
  169. and projectName = #{projectName}
  170. </if>
  171. </select>
  172. <select id="select_4" resultType="com.sooka.model.bo.Guiji_medicine_dept_data4_Bean" parameterType="com.sooka.model.bo.Guiji_medicine_dept_data4_Bean">
  173. select id, create_time, cd_time, cd_batch, cd_operation, cd_source, year, month, economyType, number, yearOnYear, cityProportion from t_guiji_medicine_industry
  174. where 1=1
  175. <if test="year != null and year != ''">
  176. and year = #{year}
  177. </if>
  178. </select>
  179. </mapper>