FlowFieldInputMapper.xml 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE mapper
  3. PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  4. "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  5. <mapper namespace="com.fidms.web.mapper.FlowFieldInputMapper">
  6. <resultMap type="FlowFieldInput" id="FlowFieldInputResult">
  7. <result property="id" column="id" />
  8. <result property="model3dId" column="model_3d_id" />
  9. <result property="machNumber" column="mach_number" />
  10. <result property="flowDirectionX" column="flow_direction_x"/>
  11. <result property="flowDirectionY" column="flow_direction_y"/>
  12. <result property="flowDirectionZ" column="flow_direction_z"/>
  13. <result property="flowVelocityX" column="flow_velocity_x" />
  14. <result property="flowVelocityY" column="flow_velocity_y" />
  15. <result property="flowVelocityZ" column="flow_velocity_z" />
  16. <result property="flowTemperature" column="flow_temperature" />
  17. <result property="flowPressure" column="flow_pressure" />
  18. <result property="flowDensity" column="flow_density" />
  19. <result property="flightAltitude" column="flight_altitude"/>
  20. <result property="co2MassFraction" column="co2_mass_fraction" />
  21. <result property="coMassFraction" column="co_mass_fraction" />
  22. <result property="h2oMassFraction" column="h2o_mass_fraction" />
  23. <result property="fluentGridFile" column="fluent_grid_file" />
  24. <result property="fluentGridFilePath" column="fluent_grid_file_path" />
  25. <result property="fluentCasFile" column="fluent_cas_file" />
  26. <result property="fluentCasFilePath" column="fluent_cas_file_path" />
  27. <result property="fluentDatFile" column="fluent_dat_file" />
  28. <result property="fluentDatFilePath" column="fluent_dat_file_path" />
  29. <result property="exhaustSystemConnotationTemperature" column="exhaust_system_connotation_temperature" />
  30. <result property="exhaustSystemIntrinsicTemperature" column="exhaust_system_intrinsic_temperature" />
  31. <result property="exhaustSystemConnotationPressure" column="exhaust_system_connotation_pressure" />
  32. <result property="exhaustSystemIntrinsicPressure" column="exhaust_system_intrinsic_pressure" />
  33. <result property="exhaustSystemConnotationFlow" column="exhaust_system_connotation_flow" />
  34. <result property="exhaustSystemIntrinsicFlow" column="exhaust_system_intrinsic_flow" />
  35. <result property="remark" column="remark" />
  36. <result property="createBy" column="create_by" />
  37. <result property="createTime" column="create_time" />
  38. <result property="updateBy" column="update_by" />
  39. <result property="updateTime" column="update_time" />
  40. </resultMap>
  41. <sql id="selectFlowFieldInputVo">
  42. SELECT
  43. ffi.id,
  44. ffi.model_3d_id,
  45. m3.`name` model3dName,
  46. ffi.mach_number,
  47. ffi.flow_velocity_x,
  48. ffi.flow_velocity_y,
  49. ffi.flow_velocity_z,
  50. ffi.flow_direction_x,
  51. ffi.flow_direction_y,
  52. ffi.flow_direction_z,
  53. ffi.flow_temperature,
  54. ffi.flow_pressure,
  55. ffi.flow_density,
  56. ffi.flight_altitude,
  57. ffi.co2_mass_fraction,
  58. ffi.co_mass_fraction,
  59. ffi.h2o_mass_fraction,
  60. ffi.fluent_grid_file,
  61. ffi.fluent_grid_file_path,
  62. ffi.fluent_cas_file,
  63. ffi.fluent_cas_file_path,
  64. ffi.fluent_dat_file,
  65. ffi.fluent_dat_file_path,
  66. ffi.exhaust_system_connotation_temperature,
  67. ffi.exhaust_system_intrinsic_temperature,
  68. ffi.exhaust_system_connotation_pressure,
  69. ffi.exhaust_system_intrinsic_pressure,
  70. ffi.exhaust_system_connotation_flow,
  71. ffi.exhaust_system_intrinsic_flow,
  72. ffi.remark,
  73. ffi.create_by,
  74. ffi.create_time,
  75. ffi.update_by,
  76. ffi.update_time
  77. FROM
  78. bz_flow_field_input_t ffi
  79. LEFT JOIN bz_model_3d_t m3 ON ffi.model_3d_id = m3.id
  80. </sql>
  81. <select id="selectFlowFieldInputList" parameterType="FlowFieldInput" resultMap="FlowFieldInputResult">
  82. <include refid="selectFlowFieldInputVo"/>
  83. <where>
  84. <if test="model3dId != null "> and model_3d_id = #{model3dId}</if>
  85. <if test="machNumber != null "> and mach_number = #{machNumber}</if>
  86. <if test="flowDirectionX != null "> and flow_direction_x = #{flowDirectionX}</if>
  87. <if test="flowDirectionY != null "> and flow_direction_y = #{flowDirectionY}</if>
  88. <if test="flowDirectionZ != null "> and flow_direction_z = #{flowDirectionZ}</if>
  89. <if test="flowVelocityX != null "> and flow_velocity_x = #{flowVelocityX}</if>
  90. <if test="flowVelocityY != null "> and flow_velocity_y = #{flowVelocityY}</if>
  91. <if test="flowVelocityZ != null "> and flow_velocity_z = #{flowVelocityZ}</if>
  92. <if test="flowTemperature != null"> and flow_temperature = #{flowTemperaure}</if>
  93. <if test="flowPressure != null" > and flow_pressure = #{flowPressure}</if>
  94. <if test="flowDensity != null"> and flow_density = #{flowDensity}</if>
  95. <if test="flightAltitude != null"> and flight_altitude= #{flightAltitude}</if>
  96. <if test="co2MassFraction != null "> and co2_mass_fraction = #{co2MassFraction}</if>
  97. <if test="coMassFraction != null "> and co_mass_fraction = #{coMassFraction}</if>
  98. <if test="h2oMassFraction != null "> and h2o_mass_fraction = #{h2oMassFraction}</if>
  99. <if test="fluentGridFile != null and fluentGridFile != ''"> and fluent_grid_file = #{fluentGridFile}</if>
  100. <if test="fluentGridFilePath != null and fluentGridFilePath != ''"> and fluent_grid_file_path = #{fluentGridFilePath}</if>
  101. <if test="fluentCasFile != null and fluentCasFile != ''"> and fluent_cas_file = #{fluentCasFile}</if>
  102. <if test="fluentCasFilePath != null and fluentCasFilePath != ''"> and fluent_cas_file_path = #{fluentCasFilePath}</if>
  103. <if test="fluentDatFile != null and fluentDatFile != ''"> and fluent_dat_file = #{fluentDatFile}</if>
  104. <if test="fluentDatFilePath != null and fluentDatFilePath != ''"> and fluent_dat_file_path = #{fluentDatFilePath}</if>
  105. <if test="exhaustSystemConnotationTemperature != null and exhaustSystemConnotationTemperature != ''"> and exhaust_system_connotation_temperature = #{exhaustSystemConnotationTemperature}</if>
  106. <if test="exhaustSystemIntrinsicTemperature != null and exhaustSystemIntrinsicTemperature != ''"> and exhaust_system_intrinsic_temperature = #{exhaustSystemIntrinsicTemperature}</if>
  107. <if test="exhaustSystemConnotationPressure != null and exhaustSystemConnotationPressure != ''"> and exhaust_system_connotation_pressure = #{exhaustSystemConnotationPressure}</if>
  108. <if test="exhaustSystemIntrinsicPressure != null and exhaustSystemIntrinsicPressure != ''"> and exhaust_system_intrinsic_pressure = #{exhaustSystemIntrinsicPressure}</if>
  109. <if test="exhaustSystemConnotationFlow != null and exhaustSystemConnotationFlow != ''"> and exhaust_system_connotation_flow = #{exhaustSystemConnotationFlow}</if>
  110. <if test="exhaustSystemIntrinsicFlow != null and exhaustSystemIntrinsicFlow != ''"> and exhaust_system_intrinsic_flow = #{exhaustSystemIntrinsicFlow}</if>
  111. <if test="remark != null and remark != ''"> and remark = #{remark}</if>
  112. </where>
  113. </select>
  114. <select id="selectFlowFieldInputById" parameterType="Long" resultMap="FlowFieldInputResult">
  115. <include refid="selectFlowFieldInputVo"/>
  116. where ffi.id = #{id}
  117. </select>
  118. <insert id="insertFlowFieldInput" parameterType="FlowFieldInput" useGeneratedKeys="true" keyProperty="id">
  119. insert into bz_flow_field_input_t
  120. <trim prefix="(" suffix=")" suffixOverrides=",">
  121. <if test="model3dId != null">model_3d_id,</if>
  122. <if test="machNumber != null">mach_number,</if>
  123. <if test="flowDirectionX != null" >flow_direction_x,</if>
  124. <if test="flowDirectionY != null" >flow_direction_y,</if>
  125. <if test="flowDirectionZ != null" >flow_direction_z,</if>
  126. <if test="flowVelocityX != null">flow_velocity_x,</if>
  127. <if test="flowVelocityY != null">flow_velocity_y,</if>
  128. <if test="flowVelocityZ != null">flow_velocity_z,</if>
  129. <if test="flowTemperature != null">flow_temperature,</if>
  130. <if test="flowPressure != null">flow_pressure,</if>
  131. <if test="flowDensity != null">flow_density,</if>
  132. <if test="flightAltitude !=null">flight_altitude,</if>
  133. <if test="co2MassFraction != null">co2_mass_fraction,</if>
  134. <if test="coMassFraction != null">co_mass_fraction,</if>
  135. <if test="h2oMassFraction != null">h2o_mass_fraction,</if>
  136. <if test="fluentGridFile != null and fluentGridFile != ''">fluent_grid_file,</if>
  137. <if test="fluentGridFilePath != null and fluentGridFilePath != ''">fluent_grid_file_path,</if>
  138. <if test="fluentCasFile != null and fluentCasFile != ''">fluent_cas_file,</if>
  139. <if test="fluentCasFilePath != null and fluentCasFilePath != ''">fluent_cas_file_path,</if>
  140. <if test="fluentDatFile != null and fluentDatFile != ''">fluent_dat_file,</if>
  141. <if test="fluentDatFilePath != null and fluentDatFilePath != ''">fluent_dat_file_path,</if>
  142. <if test="exhaustSystemConnotationTemperature != null and exhaustSystemConnotationTemperature != ''">exhaust_system_connotation_temperature,</if>
  143. <if test="exhaustSystemIntrinsicTemperature != null and exhaustSystemIntrinsicTemperature != ''">exhaust_system_intrinsic_temperature,</if>
  144. <if test="exhaustSystemConnotationPressure != null and exhaustSystemConnotationPressure != ''">exhaust_system_connotation_pressure,</if>
  145. <if test="exhaustSystemIntrinsicPressure != null and exhaustSystemIntrinsicPressure != ''">exhaust_system_intrinsic_pressure,</if>
  146. <if test="exhaustSystemConnotationFlow != null and exhaustSystemConnotationFlow != ''">exhaust_system_connotation_flow,</if>
  147. <if test="exhaustSystemIntrinsicFlow != null and exhaustSystemIntrinsicFlow != ''">exhaust_system_intrinsic_flow,</if>
  148. <if test="remark != null and remark != ''">remark,</if>
  149. <if test="createBy != null">create_by,</if>
  150. <if test="createTime != null">create_time,</if>
  151. <if test="updateBy != null">update_by,</if>
  152. <if test="updateTime != null">update_time,</if>
  153. </trim>
  154. <trim prefix="values (" suffix=")" suffixOverrides=",">
  155. <if test="model3dId != null">#{model3dId},</if>
  156. <if test="machNumber != null">#{machNumber},</if>
  157. <if test="flowDirectionX != null">#{flowDirectionX},</if>
  158. <if test="flowDirectionY != null">#{flowDirectionY},</if>
  159. <if test="flowDirectionZ != null">#{flowDirectionZ},</if>
  160. <if test="flowVelocityX != null">#{flowVelocityX},</if>
  161. <if test="flowVelocityY != null">#{flowVelocityY},</if>
  162. <if test="flowVelocityZ != null">#{flowVelocityZ},</if>
  163. <if test="flowTemperature != null">#{flowTemperature},</if>
  164. <if test="flowPressure != null">#{flowPressure},</if>
  165. <if test="flowDensity!= null">#{flowDensity},</if>
  166. <if test="flightAltitude != null">#{flightAltitude},</if>
  167. <if test="co2MassFraction != null">#{co2MassFraction},</if>
  168. <if test="coMassFraction != null">#{coMassFraction},</if>
  169. <if test="h2oMassFraction != null">#{h2oMassFraction},</if>
  170. <if test="fluentGridFile != null and fluentGridFile != ''">#{fluentGridFile},</if>
  171. <if test="fluentGridFilePath != null and fluentGridFilePath != ''">#{fluentGridFilePath},</if>
  172. <if test="fluentCasFile != null and fluentCasFile != ''">#{fluentCasFile},</if>
  173. <if test="fluentCasFilePath != null and fluentCasFilePath != ''">#{fluentCasFilePath},</if>
  174. <if test="fluentDatFile != null and fluentDatFile != ''">#{fluentDatFile},</if>
  175. <if test="fluentDatFilePath != null and fluentDatFilePath != ''">#{fluentDatFilePath},</if>
  176. <if test="exhaustSystemConnotationTemperature != null and exhaustSystemConnotationTemperature != ''">#{exhaustSystemConnotationTemperature},</if>
  177. <if test="exhaustSystemIntrinsicTemperature != null and exhaustSystemIntrinsicTemperature != ''">#{exhaustSystemIntrinsicTemperature},</if>
  178. <if test="exhaustSystemConnotationPressure != null and exhaustSystemConnotationPressure != ''">#{exhaustSystemConnotationPressure},</if>
  179. <if test="exhaustSystemIntrinsicPressure != null and exhaustSystemIntrinsicPressure != ''">#{exhaustSystemIntrinsicPressure},</if>
  180. <if test="exhaustSystemConnotationFlow != null and exhaustSystemConnotationFlow != ''">#{exhaustSystemConnotationFlow},</if>
  181. <if test="exhaustSystemIntrinsicFlow != null and exhaustSystemIntrinsicFlow != ''">#{exhaustSystemIntrinsicFlow},</if>
  182. <if test="remark != null and remark != ''">#{remark},</if>
  183. <if test="createBy != null">#{createBy},</if>
  184. <if test="createTime != null">#{createTime},</if>
  185. <if test="updateBy != null">#{updateBy},</if>
  186. <if test="updateTime != null">#{updateTime},</if>
  187. </trim>
  188. </insert>
  189. <update id="updateFlowFieldInput" parameterType="FlowFieldInput">
  190. update bz_flow_field_input_t
  191. <trim prefix="SET" suffixOverrides=",">
  192. <if test="model3dId != null">model_3d_id = #{model3dId},</if>
  193. <if test="machNumber != null">mach_number = #{machNumber},</if>
  194. <if test="flowDirectionX != null">flow_direction_x = #{flowDirectionX},</if>
  195. <if test="flowDirectionY != null">flow_direction_y = #{flowDirectionY},</if>
  196. <if test="flowDirectionZ != null">flow_direction_z = #{flowDirectionZ},</if>
  197. <if test="flowVelocityX != null">flow_velocity_x = #{flowVelocityX},</if>
  198. <if test="flowVelocityY != null">flow_velocity_y = #{flowVelocityY},</if>
  199. <if test="flowVelocityZ != null">flow_velocity_z = #{flowVelocityZ},</if>
  200. <if test="flowTemperature != null">flow_temperature = #{flowTemperature},</if>
  201. <if test="flowPressure != null">flow_pressure =#{flowPressure},</if>
  202. <if test="flowDensity != null">flow_density =#{flowDensity},</if>
  203. <if test="flightAltitude != null">flight_altitude =#{flightAltitude},</if>
  204. <if test="co2MassFraction != null">co2_mass_fraction = #{co2MassFraction},</if>
  205. <if test="coMassFraction != null">co_mass_fraction = #{coMassFraction},</if>
  206. <if test="h2oMassFraction != null">h2o_mass_fraction = #{h2oMassFraction},</if>
  207. <if test="fluentGridFile != null and fluentGridFile != ''">fluent_grid_file = #{fluentGridFile},</if>
  208. <if test="fluentGridFilePath != null and fluentGridFilePath != ''">fluent_grid_file_path = #{fluentGridFilePath},</if>
  209. <if test="fluentCasFile != null and fluentCasFile != ''">fluent_cas_file = #{fluentCasFile},</if>
  210. <if test="fluentCasFilePath != null and fluentCasFilePath != ''">fluent_cas_file_path = #{fluentCasFilePath},</if>
  211. <if test="fluentDatFile != null and fluentDatFile != ''">fluent_dat_file = #{fluentDatFile},</if>
  212. <if test="fluentDatFilePath != null and fluentDatFilePath != ''">fluent_dat_file_path = #{fluentDatFilePath},</if>
  213. <if test="exhaustSystemConnotationTemperature != null and exhaustSystemConnotationTemperature != ''">exhaust_system_connotation_temperature = #{exhaustSystemConnotationTemperature},</if>
  214. <if test="exhaustSystemIntrinsicTemperature != null and exhaustSystemIntrinsicTemperature != ''">exhaust_system_intrinsic_temperature= #{exhaustSystemIntrinsicTemperature},</if>
  215. <if test="exhaustSystemConnotationPressure != null and exhaustSystemConnotationPressure != ''">exhaust_system_connotation_pressure= #{exhaustSystemConnotationPressure},</if>
  216. <if test="exhaustSystemIntrinsicPressure != null and exhaustSystemIntrinsicPressure != ''">exhaust_system_intrinsic_pressure= #{exhaustSystemIntrinsicPressure},</if>
  217. <if test="exhaustSystemConnotationFlow != null and exhaustSystemConnotationFlow != ''">exhaust_system_connotation_flow= #{exhaustSystemConnotationFlow},</if>
  218. <if test="exhaustSystemIntrinsicFlow != null and exhaustSystemIntrinsicFlow != ''">exhaust_system_intrinsic_flow= #{exhaustSystemIntrinsicFlow},</if>
  219. <if test="remark != null and remark != ''">remark= #{remark},</if>
  220. <if test="createBy != null">create_by = #{createBy},</if>
  221. <if test="createTime != null">create_time = #{createTime},</if>
  222. <if test="updateBy != null">update_by = #{updateBy},</if>
  223. <if test="updateTime != null">update_time = #{updateTime},</if>
  224. </trim>
  225. where id = #{id}
  226. </update>
  227. <delete id="deleteFlowFieldInputById" parameterType="Long">
  228. delete from bz_flow_field_input_t where id = #{id}
  229. </delete>
  230. <delete id="deleteFlowFieldInputByIds" parameterType="String">
  231. delete from bz_flow_field_input_t where id in
  232. <foreach item="id" collection="array" open="(" separator="," close=")">
  233. #{id}
  234. </foreach>
  235. </delete>
  236. <select id="getFlowFieldInputList" resultType="Map">
  237. select id from bz_flow_field_input_t order by id desc
  238. </select>
  239. <select id="getflowfieldinputOption" parameterType="String" resultType="Map">
  240. select distinct model_3d_id
  241. from bz_flow_field_input_t
  242. where bz_flow_field_input_t.model_3d_id in
  243. <foreach item="id" collection="array" open="(" separator="," close=")">
  244. #{id}
  245. </foreach>
  246. group by model_3d_id
  247. having count(0) > 0
  248. </select>
  249. </mapper>