TFumigationAfterMapper.xml 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639
  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.chinaitop.depot.intelligent.fumigation.mapper.TFumigationAfterMapper" >
  4. <resultMap id="BaseResultMap" type="com.chinaitop.depot.intelligent.fumigation.model.TFumigationAfter" >
  5. <id column="id" property="id" jdbcType="VARCHAR" />
  6. <result column="house_id" property="houseId" jdbcType="INTEGER" />
  7. <result column="fumigation_id" property="fumigationId" jdbcType="VARCHAR" />
  8. <result column="sampling_culture_temperature" property="samplingCultureTemperature" jdbcType="VARCHAR" />
  9. <result column="sampling_culture_humidity" property="samplingCultureHumidity" jdbcType="VARCHAR" />
  10. <result column="sampling_culture_month_survival" property="samplingCultureMonthSurvival" jdbcType="INTEGER" />
  11. <result column="kill_insect_rate" property="killInsectRate" jdbcType="VARCHAR" />
  12. <result column="check_insect_cage_time" property="checkInsectCageTime" jdbcType="TIMESTAMP" />
  13. <result column="insect_cage_kill_rate" property="insectCageKillRate" jdbcType="VARCHAR" />
  14. <result column="effect_analysis" property="effectAnalysis" jdbcType="VARCHAR" />
  15. <result column="creater" property="creater" jdbcType="INTEGER" />
  16. <result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
  17. <result column="update_time" property="updateTime" jdbcType="TIMESTAMP" />
  18. <result column="org_id" property="orgId" jdbcType="INTEGER" />
  19. <result column="czsjzysj" property="czsjzysj" jdbcType="TIMESTAMP" />
  20. <result column="czsjzyrs" property="czsjzyrs" jdbcType="INTEGER" />
  21. <result column="czsjff" property="czsjff" jdbcType="VARCHAR" />
  22. <result column="czsjzypzr" property="czsjzypzr" jdbcType="VARCHAR" />
  23. <result column="czclcs" property="czclcs" jdbcType="VARCHAR" />
  24. <result column="czclzyrs" property="czclzyrs" jdbcType="INTEGER" />
  25. <result column="czclpzr" property="czclpzr" jdbcType="VARCHAR" />
  26. <result column="xzhhcjcqk" property="xzhhcjcqk" jdbcType="VARCHAR" />
  27. <result column="xzhckmd" property="xzhckmd" jdbcType="INTEGER" />
  28. <result column="pyswthhcs" property="pyswthhcs" jdbcType="INTEGER" />
  29. <result column="pysswthhcs" property="pysswthhcs" jdbcType="INTEGER" />
  30. <result column="xzxgpj" property="xzxgpj" jdbcType="VARCHAR" />
  31. <result column="delete_state" property="deleteState" jdbcType="VARCHAR" />
  32. <result column="updatetime" property="updatetime" jdbcType="TIMESTAMP" />
  33. </resultMap>
  34. <sql id="Example_Where_Clause" >
  35. <where >
  36. <foreach collection="oredCriteria" item="criteria" separator="or" >
  37. <if test="criteria.valid" >
  38. <trim prefix="(" suffix=")" prefixOverrides="and" >
  39. <foreach collection="criteria.criteria" item="criterion" >
  40. <choose >
  41. <when test="criterion.noValue" >
  42. and ${criterion.condition}
  43. </when>
  44. <when test="criterion.singleValue" >
  45. and ${criterion.condition} #{criterion.value}
  46. </when>
  47. <when test="criterion.betweenValue" >
  48. and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
  49. </when>
  50. <when test="criterion.listValue" >
  51. and ${criterion.condition}
  52. <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
  53. #{listItem}
  54. </foreach>
  55. </when>
  56. </choose>
  57. </foreach>
  58. </trim>
  59. </if>
  60. </foreach>
  61. </where>
  62. </sql>
  63. <sql id="Update_By_Example_Where_Clause" >
  64. <where >
  65. <foreach collection="example.oredCriteria" item="criteria" separator="or" >
  66. <if test="criteria.valid" >
  67. <trim prefix="(" suffix=")" prefixOverrides="and" >
  68. <foreach collection="criteria.criteria" item="criterion" >
  69. <choose >
  70. <when test="criterion.noValue" >
  71. and ${criterion.condition}
  72. </when>
  73. <when test="criterion.singleValue" >
  74. and ${criterion.condition} #{criterion.value}
  75. </when>
  76. <when test="criterion.betweenValue" >
  77. and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
  78. </when>
  79. <when test="criterion.listValue" >
  80. and ${criterion.condition}
  81. <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
  82. #{listItem}
  83. </foreach>
  84. </when>
  85. </choose>
  86. </foreach>
  87. </trim>
  88. </if>
  89. </foreach>
  90. </where>
  91. </sql>
  92. <sql id="Base_Column_List" >
  93. id, house_id, fumigation_id, sampling_culture_temperature, sampling_culture_humidity,
  94. sampling_culture_month_survival, kill_insect_rate, check_insect_cage_time, insect_cage_kill_rate,
  95. effect_analysis, creater, create_time, update_time, org_id, czsjzysj, czsjzyrs, czsjff,
  96. czsjzypzr, czclcs, czclzyrs, czclpzr, xzhhcjcqk, xzhckmd, pyswthhcs, pysswthhcs,
  97. xzxgpj, delete_state, updatetime
  98. </sql>
  99. <select id="selectByExample" resultMap="BaseResultMap" parameterType="com.chinaitop.depot.intelligent.fumigation.model.TFumigationAfterExample" >
  100. select
  101. <if test="distinct" >
  102. distinct
  103. </if>
  104. <include refid="Base_Column_List" />
  105. from t_fumigation_after
  106. <if test="_parameter != null" >
  107. <include refid="Example_Where_Clause" />
  108. </if>
  109. <if test="orderByClause != null" >
  110. order by ${orderByClause}
  111. </if>
  112. </select>
  113. <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
  114. select
  115. <include refid="Base_Column_List" />
  116. from t_fumigation_after
  117. where id = #{id,jdbcType=VARCHAR}
  118. </select>
  119. <delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
  120. delete from t_fumigation_after
  121. where id = #{id,jdbcType=VARCHAR}
  122. </delete>
  123. <delete id="deleteByExample" parameterType="com.chinaitop.depot.intelligent.fumigation.model.TFumigationAfterExample" >
  124. delete from t_fumigation_after
  125. <if test="_parameter != null" >
  126. <include refid="Example_Where_Clause" />
  127. </if>
  128. </delete>
  129. <insert id="insert" parameterType="com.chinaitop.depot.intelligent.fumigation.model.TFumigationAfter" >
  130. insert into t_fumigation_after (id, house_id, fumigation_id,
  131. sampling_culture_temperature, sampling_culture_humidity,
  132. sampling_culture_month_survival, kill_insect_rate,
  133. check_insect_cage_time, insect_cage_kill_rate,
  134. effect_analysis, creater, create_time,
  135. update_time, org_id, czsjzysj,
  136. czsjzyrs, czsjff, czsjzypzr,
  137. czclcs, czclzyrs, czclpzr,
  138. xzhhcjcqk, xzhckmd, pyswthhcs,
  139. pysswthhcs, xzxgpj, delete_state,
  140. updatetime)
  141. values (#{id,jdbcType=VARCHAR}, #{houseId,jdbcType=INTEGER}, #{fumigationId,jdbcType=VARCHAR},
  142. #{samplingCultureTemperature,jdbcType=VARCHAR}, #{samplingCultureHumidity,jdbcType=VARCHAR},
  143. #{samplingCultureMonthSurvival,jdbcType=INTEGER}, #{killInsectRate,jdbcType=VARCHAR},
  144. #{checkInsectCageTime,jdbcType=TIMESTAMP}, #{insectCageKillRate,jdbcType=VARCHAR},
  145. #{effectAnalysis,jdbcType=VARCHAR}, #{creater,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP},
  146. #{updateTime,jdbcType=TIMESTAMP}, #{orgId,jdbcType=INTEGER}, #{czsjzysj,jdbcType=TIMESTAMP},
  147. #{czsjzyrs,jdbcType=INTEGER}, #{czsjff,jdbcType=VARCHAR}, #{czsjzypzr,jdbcType=VARCHAR},
  148. #{czclcs,jdbcType=VARCHAR}, #{czclzyrs,jdbcType=INTEGER}, #{czclpzr,jdbcType=VARCHAR},
  149. #{xzhhcjcqk,jdbcType=VARCHAR}, #{xzhckmd,jdbcType=INTEGER}, #{pyswthhcs,jdbcType=INTEGER},
  150. #{pysswthhcs,jdbcType=INTEGER}, #{xzxgpj,jdbcType=VARCHAR}, #{deleteState,jdbcType=VARCHAR},
  151. #{updatetime,jdbcType=TIMESTAMP})
  152. </insert>
  153. <insert id="insertSelective" parameterType="com.chinaitop.depot.intelligent.fumigation.model.TFumigationAfter" >
  154. insert into t_fumigation_after
  155. <trim prefix="(" suffix=")" suffixOverrides="," >
  156. <if test="id != null" >
  157. id,
  158. </if>
  159. <if test="houseId != null" >
  160. house_id,
  161. </if>
  162. <if test="fumigationId != null" >
  163. fumigation_id,
  164. </if>
  165. <if test="samplingCultureTemperature != null" >
  166. sampling_culture_temperature,
  167. </if>
  168. <if test="samplingCultureHumidity != null" >
  169. sampling_culture_humidity,
  170. </if>
  171. <if test="samplingCultureMonthSurvival != null" >
  172. sampling_culture_month_survival,
  173. </if>
  174. <if test="killInsectRate != null" >
  175. kill_insect_rate,
  176. </if>
  177. <if test="checkInsectCageTime != null" >
  178. check_insect_cage_time,
  179. </if>
  180. <if test="insectCageKillRate != null" >
  181. insect_cage_kill_rate,
  182. </if>
  183. <if test="effectAnalysis != null" >
  184. effect_analysis,
  185. </if>
  186. <if test="creater != null" >
  187. creater,
  188. </if>
  189. <if test="createTime != null" >
  190. create_time,
  191. </if>
  192. <if test="updateTime != null" >
  193. update_time,
  194. </if>
  195. <if test="orgId != null" >
  196. org_id,
  197. </if>
  198. <if test="czsjzysj != null" >
  199. czsjzysj,
  200. </if>
  201. <if test="czsjzyrs != null" >
  202. czsjzyrs,
  203. </if>
  204. <if test="czsjff != null" >
  205. czsjff,
  206. </if>
  207. <if test="czsjzypzr != null" >
  208. czsjzypzr,
  209. </if>
  210. <if test="czclcs != null" >
  211. czclcs,
  212. </if>
  213. <if test="czclzyrs != null" >
  214. czclzyrs,
  215. </if>
  216. <if test="czclpzr != null" >
  217. czclpzr,
  218. </if>
  219. <if test="xzhhcjcqk != null" >
  220. xzhhcjcqk,
  221. </if>
  222. <if test="xzhckmd != null" >
  223. xzhckmd,
  224. </if>
  225. <if test="pyswthhcs != null" >
  226. pyswthhcs,
  227. </if>
  228. <if test="pysswthhcs != null" >
  229. pysswthhcs,
  230. </if>
  231. <if test="xzxgpj != null" >
  232. xzxgpj,
  233. </if>
  234. <if test="deleteState != null" >
  235. delete_state,
  236. </if>
  237. <if test="updatetime != null" >
  238. updatetime,
  239. </if>
  240. </trim>
  241. <trim prefix="values (" suffix=")" suffixOverrides="," >
  242. <if test="id != null" >
  243. #{id,jdbcType=VARCHAR},
  244. </if>
  245. <if test="houseId != null" >
  246. #{houseId,jdbcType=INTEGER},
  247. </if>
  248. <if test="fumigationId != null" >
  249. #{fumigationId,jdbcType=VARCHAR},
  250. </if>
  251. <if test="samplingCultureTemperature != null" >
  252. #{samplingCultureTemperature,jdbcType=VARCHAR},
  253. </if>
  254. <if test="samplingCultureHumidity != null" >
  255. #{samplingCultureHumidity,jdbcType=VARCHAR},
  256. </if>
  257. <if test="samplingCultureMonthSurvival != null" >
  258. #{samplingCultureMonthSurvival,jdbcType=INTEGER},
  259. </if>
  260. <if test="killInsectRate != null" >
  261. #{killInsectRate,jdbcType=VARCHAR},
  262. </if>
  263. <if test="checkInsectCageTime != null" >
  264. #{checkInsectCageTime,jdbcType=TIMESTAMP},
  265. </if>
  266. <if test="insectCageKillRate != null" >
  267. #{insectCageKillRate,jdbcType=VARCHAR},
  268. </if>
  269. <if test="effectAnalysis != null" >
  270. #{effectAnalysis,jdbcType=VARCHAR},
  271. </if>
  272. <if test="creater != null" >
  273. #{creater,jdbcType=INTEGER},
  274. </if>
  275. <if test="createTime != null" >
  276. #{createTime,jdbcType=TIMESTAMP},
  277. </if>
  278. <if test="updateTime != null" >
  279. #{updateTime,jdbcType=TIMESTAMP},
  280. </if>
  281. <if test="orgId != null" >
  282. #{orgId,jdbcType=INTEGER},
  283. </if>
  284. <if test="czsjzysj != null" >
  285. #{czsjzysj,jdbcType=TIMESTAMP},
  286. </if>
  287. <if test="czsjzyrs != null" >
  288. #{czsjzyrs,jdbcType=INTEGER},
  289. </if>
  290. <if test="czsjff != null" >
  291. #{czsjff,jdbcType=VARCHAR},
  292. </if>
  293. <if test="czsjzypzr != null" >
  294. #{czsjzypzr,jdbcType=VARCHAR},
  295. </if>
  296. <if test="czclcs != null" >
  297. #{czclcs,jdbcType=VARCHAR},
  298. </if>
  299. <if test="czclzyrs != null" >
  300. #{czclzyrs,jdbcType=INTEGER},
  301. </if>
  302. <if test="czclpzr != null" >
  303. #{czclpzr,jdbcType=VARCHAR},
  304. </if>
  305. <if test="xzhhcjcqk != null" >
  306. #{xzhhcjcqk,jdbcType=VARCHAR},
  307. </if>
  308. <if test="xzhckmd != null" >
  309. #{xzhckmd,jdbcType=INTEGER},
  310. </if>
  311. <if test="pyswthhcs != null" >
  312. #{pyswthhcs,jdbcType=INTEGER},
  313. </if>
  314. <if test="pysswthhcs != null" >
  315. #{pysswthhcs,jdbcType=INTEGER},
  316. </if>
  317. <if test="xzxgpj != null" >
  318. #{xzxgpj,jdbcType=VARCHAR},
  319. </if>
  320. <if test="deleteState != null" >
  321. #{deleteState,jdbcType=VARCHAR},
  322. </if>
  323. <if test="updatetime != null" >
  324. #{updatetime,jdbcType=TIMESTAMP},
  325. </if>
  326. </trim>
  327. </insert>
  328. <select id="countByExample" parameterType="com.chinaitop.depot.intelligent.fumigation.model.TFumigationAfterExample" resultType="java.lang.Integer" >
  329. select count(*) from t_fumigation_after
  330. <if test="_parameter != null" >
  331. <include refid="Example_Where_Clause" />
  332. </if>
  333. </select>
  334. <update id="updateByExampleSelective" parameterType="map" >
  335. update t_fumigation_after
  336. <set >
  337. <if test="record.id != null" >
  338. id = #{record.id,jdbcType=VARCHAR},
  339. </if>
  340. <if test="record.houseId != null" >
  341. house_id = #{record.houseId,jdbcType=INTEGER},
  342. </if>
  343. <if test="record.fumigationId != null" >
  344. fumigation_id = #{record.fumigationId,jdbcType=VARCHAR},
  345. </if>
  346. <if test="record.samplingCultureTemperature != null" >
  347. sampling_culture_temperature = #{record.samplingCultureTemperature,jdbcType=VARCHAR},
  348. </if>
  349. <if test="record.samplingCultureHumidity != null" >
  350. sampling_culture_humidity = #{record.samplingCultureHumidity,jdbcType=VARCHAR},
  351. </if>
  352. <if test="record.samplingCultureMonthSurvival != null" >
  353. sampling_culture_month_survival = #{record.samplingCultureMonthSurvival,jdbcType=INTEGER},
  354. </if>
  355. <if test="record.killInsectRate != null" >
  356. kill_insect_rate = #{record.killInsectRate,jdbcType=VARCHAR},
  357. </if>
  358. <if test="record.checkInsectCageTime != null" >
  359. check_insect_cage_time = #{record.checkInsectCageTime,jdbcType=TIMESTAMP},
  360. </if>
  361. <if test="record.insectCageKillRate != null" >
  362. insect_cage_kill_rate = #{record.insectCageKillRate,jdbcType=VARCHAR},
  363. </if>
  364. <if test="record.effectAnalysis != null" >
  365. effect_analysis = #{record.effectAnalysis,jdbcType=VARCHAR},
  366. </if>
  367. <if test="record.creater != null" >
  368. creater = #{record.creater,jdbcType=INTEGER},
  369. </if>
  370. <if test="record.createTime != null" >
  371. create_time = #{record.createTime,jdbcType=TIMESTAMP},
  372. </if>
  373. <if test="record.updateTime != null" >
  374. update_time = #{record.updateTime,jdbcType=TIMESTAMP},
  375. </if>
  376. <if test="record.orgId != null" >
  377. org_id = #{record.orgId,jdbcType=INTEGER},
  378. </if>
  379. <if test="record.czsjzysj != null" >
  380. czsjzysj = #{record.czsjzysj,jdbcType=TIMESTAMP},
  381. </if>
  382. <if test="record.czsjzyrs != null" >
  383. czsjzyrs = #{record.czsjzyrs,jdbcType=INTEGER},
  384. </if>
  385. <if test="record.czsjff != null" >
  386. czsjff = #{record.czsjff,jdbcType=VARCHAR},
  387. </if>
  388. <if test="record.czsjzypzr != null" >
  389. czsjzypzr = #{record.czsjzypzr,jdbcType=VARCHAR},
  390. </if>
  391. <if test="record.czclcs != null" >
  392. czclcs = #{record.czclcs,jdbcType=VARCHAR},
  393. </if>
  394. <if test="record.czclzyrs != null" >
  395. czclzyrs = #{record.czclzyrs,jdbcType=INTEGER},
  396. </if>
  397. <if test="record.czclpzr != null" >
  398. czclpzr = #{record.czclpzr,jdbcType=VARCHAR},
  399. </if>
  400. <if test="record.xzhhcjcqk != null" >
  401. xzhhcjcqk = #{record.xzhhcjcqk,jdbcType=VARCHAR},
  402. </if>
  403. <if test="record.xzhckmd != null" >
  404. xzhckmd = #{record.xzhckmd,jdbcType=INTEGER},
  405. </if>
  406. <if test="record.pyswthhcs != null" >
  407. pyswthhcs = #{record.pyswthhcs,jdbcType=INTEGER},
  408. </if>
  409. <if test="record.pysswthhcs != null" >
  410. pysswthhcs = #{record.pysswthhcs,jdbcType=INTEGER},
  411. </if>
  412. <if test="record.xzxgpj != null" >
  413. xzxgpj = #{record.xzxgpj,jdbcType=VARCHAR},
  414. </if>
  415. <if test="record.deleteState != null" >
  416. delete_state = #{record.deleteState,jdbcType=VARCHAR},
  417. </if>
  418. <if test="record.updatetime != null" >
  419. updatetime = #{record.updatetime,jdbcType=TIMESTAMP},
  420. </if>
  421. </set>
  422. <if test="_parameter != null" >
  423. <include refid="Update_By_Example_Where_Clause" />
  424. </if>
  425. </update>
  426. <update id="updateByExample" parameterType="map" >
  427. update t_fumigation_after
  428. set id = #{record.id,jdbcType=VARCHAR},
  429. house_id = #{record.houseId,jdbcType=INTEGER},
  430. fumigation_id = #{record.fumigationId,jdbcType=VARCHAR},
  431. sampling_culture_temperature = #{record.samplingCultureTemperature,jdbcType=VARCHAR},
  432. sampling_culture_humidity = #{record.samplingCultureHumidity,jdbcType=VARCHAR},
  433. sampling_culture_month_survival = #{record.samplingCultureMonthSurvival,jdbcType=INTEGER},
  434. kill_insect_rate = #{record.killInsectRate,jdbcType=VARCHAR},
  435. check_insect_cage_time = #{record.checkInsectCageTime,jdbcType=TIMESTAMP},
  436. insect_cage_kill_rate = #{record.insectCageKillRate,jdbcType=VARCHAR},
  437. effect_analysis = #{record.effectAnalysis,jdbcType=VARCHAR},
  438. creater = #{record.creater,jdbcType=INTEGER},
  439. create_time = #{record.createTime,jdbcType=TIMESTAMP},
  440. update_time = #{record.updateTime,jdbcType=TIMESTAMP},
  441. org_id = #{record.orgId,jdbcType=INTEGER},
  442. czsjzysj = #{record.czsjzysj,jdbcType=TIMESTAMP},
  443. czsjzyrs = #{record.czsjzyrs,jdbcType=INTEGER},
  444. czsjff = #{record.czsjff,jdbcType=VARCHAR},
  445. czsjzypzr = #{record.czsjzypzr,jdbcType=VARCHAR},
  446. czclcs = #{record.czclcs,jdbcType=VARCHAR},
  447. czclzyrs = #{record.czclzyrs,jdbcType=INTEGER},
  448. czclpzr = #{record.czclpzr,jdbcType=VARCHAR},
  449. xzhhcjcqk = #{record.xzhhcjcqk,jdbcType=VARCHAR},
  450. xzhckmd = #{record.xzhckmd,jdbcType=INTEGER},
  451. pyswthhcs = #{record.pyswthhcs,jdbcType=INTEGER},
  452. pysswthhcs = #{record.pysswthhcs,jdbcType=INTEGER},
  453. xzxgpj = #{record.xzxgpj,jdbcType=VARCHAR},
  454. delete_state = #{record.deleteState,jdbcType=VARCHAR},
  455. updatetime = #{record.updatetime,jdbcType=TIMESTAMP}
  456. <if test="_parameter != null" >
  457. <include refid="Update_By_Example_Where_Clause" />
  458. </if>
  459. </update>
  460. <update id="updateByPrimaryKeySelective" parameterType="com.chinaitop.depot.intelligent.fumigation.model.TFumigationAfter" >
  461. update t_fumigation_after
  462. <set >
  463. <if test="houseId != null" >
  464. house_id = #{houseId,jdbcType=INTEGER},
  465. </if>
  466. <if test="fumigationId != null" >
  467. fumigation_id = #{fumigationId,jdbcType=VARCHAR},
  468. </if>
  469. <if test="samplingCultureTemperature != null" >
  470. sampling_culture_temperature = #{samplingCultureTemperature,jdbcType=VARCHAR},
  471. </if>
  472. <if test="samplingCultureHumidity != null" >
  473. sampling_culture_humidity = #{samplingCultureHumidity,jdbcType=VARCHAR},
  474. </if>
  475. <if test="samplingCultureMonthSurvival != null" >
  476. sampling_culture_month_survival = #{samplingCultureMonthSurvival,jdbcType=INTEGER},
  477. </if>
  478. <if test="killInsectRate != null" >
  479. kill_insect_rate = #{killInsectRate,jdbcType=VARCHAR},
  480. </if>
  481. <if test="checkInsectCageTime != null" >
  482. check_insect_cage_time = #{checkInsectCageTime,jdbcType=TIMESTAMP},
  483. </if>
  484. <if test="insectCageKillRate != null" >
  485. insect_cage_kill_rate = #{insectCageKillRate,jdbcType=VARCHAR},
  486. </if>
  487. <if test="effectAnalysis != null" >
  488. effect_analysis = #{effectAnalysis,jdbcType=VARCHAR},
  489. </if>
  490. <if test="creater != null" >
  491. creater = #{creater,jdbcType=INTEGER},
  492. </if>
  493. <if test="createTime != null" >
  494. create_time = #{createTime,jdbcType=TIMESTAMP},
  495. </if>
  496. <if test="updateTime != null" >
  497. update_time = #{updateTime,jdbcType=TIMESTAMP},
  498. </if>
  499. <if test="orgId != null" >
  500. org_id = #{orgId,jdbcType=INTEGER},
  501. </if>
  502. <if test="czsjzysj != null" >
  503. czsjzysj = #{czsjzysj,jdbcType=TIMESTAMP},
  504. </if>
  505. <if test="czsjzyrs != null" >
  506. czsjzyrs = #{czsjzyrs,jdbcType=INTEGER},
  507. </if>
  508. <if test="czsjff != null" >
  509. czsjff = #{czsjff,jdbcType=VARCHAR},
  510. </if>
  511. <if test="czsjzypzr != null" >
  512. czsjzypzr = #{czsjzypzr,jdbcType=VARCHAR},
  513. </if>
  514. <if test="czclcs != null" >
  515. czclcs = #{czclcs,jdbcType=VARCHAR},
  516. </if>
  517. <if test="czclzyrs != null" >
  518. czclzyrs = #{czclzyrs,jdbcType=INTEGER},
  519. </if>
  520. <if test="czclpzr != null" >
  521. czclpzr = #{czclpzr,jdbcType=VARCHAR},
  522. </if>
  523. <if test="xzhhcjcqk != null" >
  524. xzhhcjcqk = #{xzhhcjcqk,jdbcType=VARCHAR},
  525. </if>
  526. <if test="xzhckmd != null" >
  527. xzhckmd = #{xzhckmd,jdbcType=INTEGER},
  528. </if>
  529. <if test="pyswthhcs != null" >
  530. pyswthhcs = #{pyswthhcs,jdbcType=INTEGER},
  531. </if>
  532. <if test="pysswthhcs != null" >
  533. pysswthhcs = #{pysswthhcs,jdbcType=INTEGER},
  534. </if>
  535. <if test="xzxgpj != null" >
  536. xzxgpj = #{xzxgpj,jdbcType=VARCHAR},
  537. </if>
  538. <if test="deleteState != null" >
  539. delete_state = #{deleteState,jdbcType=VARCHAR},
  540. </if>
  541. <if test="updatetime != null" >
  542. updatetime = #{updatetime,jdbcType=TIMESTAMP},
  543. </if>
  544. </set>
  545. where id = #{id,jdbcType=VARCHAR}
  546. </update>
  547. <update id="updateByPrimaryKey" parameterType="com.chinaitop.depot.intelligent.fumigation.model.TFumigationAfter" >
  548. update t_fumigation_after
  549. set house_id = #{houseId,jdbcType=INTEGER},
  550. fumigation_id = #{fumigationId,jdbcType=VARCHAR},
  551. sampling_culture_temperature = #{samplingCultureTemperature,jdbcType=VARCHAR},
  552. sampling_culture_humidity = #{samplingCultureHumidity,jdbcType=VARCHAR},
  553. sampling_culture_month_survival = #{samplingCultureMonthSurvival,jdbcType=INTEGER},
  554. kill_insect_rate = #{killInsectRate,jdbcType=VARCHAR},
  555. check_insect_cage_time = #{checkInsectCageTime,jdbcType=TIMESTAMP},
  556. insect_cage_kill_rate = #{insectCageKillRate,jdbcType=VARCHAR},
  557. effect_analysis = #{effectAnalysis,jdbcType=VARCHAR},
  558. creater = #{creater,jdbcType=INTEGER},
  559. create_time = #{createTime,jdbcType=TIMESTAMP},
  560. update_time = #{updateTime,jdbcType=TIMESTAMP},
  561. org_id = #{orgId,jdbcType=INTEGER},
  562. czsjzysj = #{czsjzysj,jdbcType=TIMESTAMP},
  563. czsjzyrs = #{czsjzyrs,jdbcType=INTEGER},
  564. czsjff = #{czsjff,jdbcType=VARCHAR},
  565. czsjzypzr = #{czsjzypzr,jdbcType=VARCHAR},
  566. czclcs = #{czclcs,jdbcType=VARCHAR},
  567. czclzyrs = #{czclzyrs,jdbcType=INTEGER},
  568. czclpzr = #{czclpzr,jdbcType=VARCHAR},
  569. xzhhcjcqk = #{xzhhcjcqk,jdbcType=VARCHAR},
  570. xzhckmd = #{xzhckmd,jdbcType=INTEGER},
  571. pyswthhcs = #{pyswthhcs,jdbcType=INTEGER},
  572. pysswthhcs = #{pysswthhcs,jdbcType=INTEGER},
  573. xzxgpj = #{xzxgpj,jdbcType=VARCHAR},
  574. delete_state = #{deleteState,jdbcType=VARCHAR},
  575. updatetime = #{updatetime,jdbcType=TIMESTAMP}
  576. where id = #{id,jdbcType=VARCHAR}
  577. </update>
  578. <select id="getFumigationAfterList" parameterType="java.util.Map" resultType="java.util.HashMap">
  579. SELECT
  580. af.id,
  581. plan.id fumigationId,
  582. plan.house_id houseId,
  583. plan.fumigation_type fumigationType,
  584. pes.drug_name drugName,
  585. af.creater,
  586. af.create_time createTime
  587. FROM
  588. t_fumigation_after af
  589. INNER JOIN t_fumigation_plan plan ON af.fumigation_id = plan.id
  590. INNER JOIN t_fumigation_pesticide pes ON pes.fumigation_id = plan.id
  591. WHERE af.delete_state = 1 AND af.org_id = #{orgId,jdbcType=INTEGER}
  592. <if test="houseId != null" >
  593. AND plan.house_id = #{houseId,jdbcType=INTEGER}
  594. </if>
  595. GROUP BY af.id
  596. ORDER BY af.create_time DESC
  597. </select>
  598. <select id="selectHomeWorkQueryList" parameterType="java.util.Map" resultType="java.util.HashMap">
  599. SELECT
  600. 1 AS planType,
  601. process.id,
  602. plan.id AS fumigationId,
  603. plan.house_id AS houseId,
  604. process.create_time AS createTime,
  605. process.creater,
  606. plan.fumigation_type AS fumigationType,
  607. pes.drug_name AS drugName
  608. FROM
  609. t_fumigation_process process
  610. INNER JOIN t_fumigation_plan plan ON plan.id = process.fumigation_id
  611. INNER JOIN t_fumigation_pesticide pes ON pes.fumigation_id = plan.id
  612. WHERE process.delete_state = 1 AND process.org_id = #{orgId,jdbcType=INTEGER}
  613. <if test="houseId != null" >
  614. AND plan.house_id = #{houseId,jdbcType=INTEGER}
  615. </if>
  616. GROUP BY process.id
  617. UNION ALL
  618. SELECT
  619. 2 AS planType,
  620. af.id,
  621. plan.id AS fumigationId,
  622. plan.house_id AS houseId,
  623. af.create_time AS createTime,
  624. af.creater,
  625. plan.fumigation_type AS fumigationType,
  626. pes.drug_name AS drugName
  627. FROM
  628. t_fumigation_after af
  629. INNER JOIN t_fumigation_plan plan ON plan.id = af.fumigation_id
  630. INNER JOIN t_fumigation_pesticide pes ON pes.fumigation_id = plan.id
  631. WHERE af.delete_state = 1 AND af.org_id = #{orgId,jdbcType=INTEGER}
  632. <if test="houseId != null" >
  633. AND plan.house_id = #{houseId,jdbcType=INTEGER}
  634. </if>
  635. GROUP BY af.id
  636. ORDER BY createTime DESC
  637. </select>
  638. </mapper>