TFumigationPesticideMapper.xml 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749
  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.TFumigationPesticideMapper" >
  4. <resultMap id="BaseResultMap" type="com.chinaitop.depot.intelligent.fumigation.model.TFumigationPesticide" >
  5. <id column="id" property="id" jdbcType="VARCHAR" />
  6. <result column="fumigation_id" property="fumigationId" jdbcType="VARCHAR" />
  7. <result column="major_insect_pests" property="majorInsectPests" jdbcType="INTEGER" />
  8. <result column="insect_density" property="insectDensity" jdbcType="VARCHAR" />
  9. <result column="occurrence_place" property="occurrencePlace" jdbcType="VARCHAR" />
  10. <result column="insect_product_time" property="insectProductTime" jdbcType="TIMESTAMP" />
  11. <result column="drug_name" property="drugName" jdbcType="INTEGER" />
  12. <result column="drug_purity" property="drugPurity" jdbcType="VARCHAR" />
  13. <result column="use_drug_type" property="useDrugType" jdbcType="VARCHAR" />
  14. <result column="plann_drug_start_time" property="plannDrugStartTime" jdbcType="TIMESTAMP" />
  15. <result column="plann_drug_use_up_time" property="plannDrugUseUpTime" jdbcType="TIMESTAMP" />
  16. <result column="plann_drug_count" property="plannDrugCount" jdbcType="VARCHAR" />
  17. <result column="seal_type" property="sealType" jdbcType="VARCHAR" />
  18. <result column="setting_concentration" property="settingConcentration" jdbcType="VARCHAR" />
  19. <result column="concentration_check_type" property="concentrationCheckType" jdbcType="VARCHAR" />
  20. <result column="bulk_gas_type" property="bulkGasType" jdbcType="VARCHAR" />
  21. <result column="drug_user_number" property="drugUserNumber" jdbcType="INTEGER" />
  22. <result column="pesticide_operator" property="pesticideOperator" jdbcType="VARCHAR" />
  23. <result column="creater" property="creater" jdbcType="INTEGER" />
  24. <result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
  25. <result column="update_time" property="updateTime" jdbcType="TIMESTAMP" />
  26. <result column="state" property="state" jdbcType="INTEGER" />
  27. <result column="approve_people" property="approvePeople" jdbcType="VARCHAR" />
  28. <result column="approve_department" property="approveDepartment" jdbcType="VARCHAR" />
  29. <result column="approve_note" property="approveNote" jdbcType="VARCHAR" />
  30. <result column="approve_time" property="approveTime" jdbcType="TIMESTAMP" />
  31. <result column="org_id" property="orgId" jdbcType="VARCHAR" />
  32. <result column="syryzzqk" property="syryzzqk" jdbcType="VARCHAR" />
  33. <result column="syzzsh" property="syzzsh" jdbcType="VARCHAR" />
  34. <result column="jx" property="jx" jdbcType="VARCHAR" />
  35. <result column="lddwyyl" property="lddwyyl" jdbcType="DECIMAL" />
  36. <result column="kjdwyyl" property="kjdwyyl" jdbcType="DECIMAL" />
  37. <result column="syff" property="syff" jdbcType="VARCHAR" />
  38. <result column="fzsycs" property="fzsycs" jdbcType="VARCHAR" />
  39. <result column="delete_state" property="deleteState" jdbcType="VARCHAR" />
  40. <result column="updatetime" property="updatetime" jdbcType="TIMESTAMP" />
  41. </resultMap>
  42. <sql id="Example_Where_Clause" >
  43. <where >
  44. <foreach collection="oredCriteria" item="criteria" separator="or" >
  45. <if test="criteria.valid" >
  46. <trim prefix="(" suffix=")" prefixOverrides="and" >
  47. <foreach collection="criteria.criteria" item="criterion" >
  48. <choose >
  49. <when test="criterion.noValue" >
  50. and ${criterion.condition}
  51. </when>
  52. <when test="criterion.singleValue" >
  53. and ${criterion.condition} #{criterion.value}
  54. </when>
  55. <when test="criterion.betweenValue" >
  56. and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
  57. </when>
  58. <when test="criterion.listValue" >
  59. and ${criterion.condition}
  60. <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
  61. #{listItem}
  62. </foreach>
  63. </when>
  64. </choose>
  65. </foreach>
  66. </trim>
  67. </if>
  68. </foreach>
  69. </where>
  70. </sql>
  71. <sql id="Update_By_Example_Where_Clause" >
  72. <where >
  73. <foreach collection="example.oredCriteria" item="criteria" separator="or" >
  74. <if test="criteria.valid" >
  75. <trim prefix="(" suffix=")" prefixOverrides="and" >
  76. <foreach collection="criteria.criteria" item="criterion" >
  77. <choose >
  78. <when test="criterion.noValue" >
  79. and ${criterion.condition}
  80. </when>
  81. <when test="criterion.singleValue" >
  82. and ${criterion.condition} #{criterion.value}
  83. </when>
  84. <when test="criterion.betweenValue" >
  85. and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
  86. </when>
  87. <when test="criterion.listValue" >
  88. and ${criterion.condition}
  89. <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
  90. #{listItem}
  91. </foreach>
  92. </when>
  93. </choose>
  94. </foreach>
  95. </trim>
  96. </if>
  97. </foreach>
  98. </where>
  99. </sql>
  100. <sql id="Base_Column_List" >
  101. id, fumigation_id, major_insect_pests, insect_density, occurrence_place, insect_product_time,
  102. drug_name, drug_purity, use_drug_type, plann_drug_start_time, plann_drug_use_up_time,
  103. plann_drug_count, seal_type, setting_concentration, concentration_check_type, bulk_gas_type,
  104. drug_user_number, pesticide_operator, creater, create_time, update_time, state, approve_people,
  105. approve_department, approve_note, approve_time, org_id, syryzzqk, syzzsh, jx, lddwyyl,
  106. kjdwyyl, syff, fzsycs, delete_state, updatetime
  107. </sql>
  108. <select id="selectByExample" resultMap="BaseResultMap" parameterType="com.chinaitop.depot.intelligent.fumigation.model.TFumigationPesticideExample" >
  109. select
  110. <if test="distinct" >
  111. distinct
  112. </if>
  113. <include refid="Base_Column_List" />
  114. from t_fumigation_pesticide
  115. <if test="_parameter != null" >
  116. <include refid="Example_Where_Clause" />
  117. </if>
  118. <if test="orderByClause != null" >
  119. order by ${orderByClause}
  120. </if>
  121. </select>
  122. <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
  123. select
  124. <include refid="Base_Column_List" />
  125. from t_fumigation_pesticide
  126. where id = #{id,jdbcType=VARCHAR}
  127. </select>
  128. <delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
  129. delete from t_fumigation_pesticide
  130. where id = #{id,jdbcType=VARCHAR}
  131. </delete>
  132. <delete id="deleteByExample" parameterType="com.chinaitop.depot.intelligent.fumigation.model.TFumigationPesticideExample" >
  133. delete from t_fumigation_pesticide
  134. <if test="_parameter != null" >
  135. <include refid="Example_Where_Clause" />
  136. </if>
  137. </delete>
  138. <insert id="insert" useGeneratedKeys="true" keyProperty="id" parameterType="com.chinaitop.depot.intelligent.fumigation.model.TFumigationPesticide" >
  139. insert into t_fumigation_pesticide (id, fumigation_id, major_insect_pests,
  140. insect_density, occurrence_place, insect_product_time,
  141. drug_name, drug_purity, use_drug_type,
  142. plann_drug_start_time, plann_drug_use_up_time,
  143. plann_drug_count, seal_type, setting_concentration,
  144. concentration_check_type, bulk_gas_type, drug_user_number,
  145. pesticide_operator, creater, create_time,
  146. update_time, state, approve_people,
  147. approve_department, approve_note, approve_time,
  148. org_id, syryzzqk, syzzsh,
  149. jx, lddwyyl, kjdwyyl,
  150. syff, fzsycs, delete_state,
  151. updatetime)
  152. values (#{id,jdbcType=VARCHAR}, #{fumigationId,jdbcType=VARCHAR}, #{majorInsectPests,jdbcType=INTEGER},
  153. #{insectDensity,jdbcType=VARCHAR}, #{occurrencePlace,jdbcType=VARCHAR}, #{insectProductTime,jdbcType=TIMESTAMP},
  154. #{drugName,jdbcType=INTEGER}, #{drugPurity,jdbcType=VARCHAR}, #{useDrugType,jdbcType=VARCHAR},
  155. #{plannDrugStartTime,jdbcType=TIMESTAMP}, #{plannDrugUseUpTime,jdbcType=TIMESTAMP},
  156. #{plannDrugCount,jdbcType=VARCHAR}, #{sealType,jdbcType=VARCHAR}, #{settingConcentration,jdbcType=VARCHAR},
  157. #{concentrationCheckType,jdbcType=VARCHAR}, #{bulkGasType,jdbcType=VARCHAR}, #{drugUserNumber,jdbcType=INTEGER},
  158. #{pesticideOperator,jdbcType=VARCHAR}, #{creater,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP},
  159. #{updateTime,jdbcType=TIMESTAMP}, #{state,jdbcType=INTEGER}, #{approvePeople,jdbcType=VARCHAR},
  160. #{approveDepartment,jdbcType=VARCHAR}, #{approveNote,jdbcType=VARCHAR}, #{approveTime,jdbcType=TIMESTAMP},
  161. #{orgId,jdbcType=VARCHAR}, #{syryzzqk,jdbcType=VARCHAR}, #{syzzsh,jdbcType=VARCHAR},
  162. #{jx,jdbcType=VARCHAR}, #{lddwyyl,jdbcType=DECIMAL}, #{kjdwyyl,jdbcType=DECIMAL},
  163. #{syff,jdbcType=VARCHAR}, #{fzsycs,jdbcType=VARCHAR}, #{deleteState,jdbcType=VARCHAR},
  164. #{updatetime,jdbcType=TIMESTAMP})
  165. </insert>
  166. <insert id="insertSelective" parameterType="com.chinaitop.depot.intelligent.fumigation.model.TFumigationPesticide" >
  167. insert into t_fumigation_pesticide
  168. <trim prefix="(" suffix=")" suffixOverrides="," >
  169. <if test="id != null" >
  170. id,
  171. </if>
  172. <if test="fumigationId != null" >
  173. fumigation_id,
  174. </if>
  175. <if test="majorInsectPests != null" >
  176. major_insect_pests,
  177. </if>
  178. <if test="insectDensity != null" >
  179. insect_density,
  180. </if>
  181. <if test="occurrencePlace != null" >
  182. occurrence_place,
  183. </if>
  184. <if test="insectProductTime != null" >
  185. insect_product_time,
  186. </if>
  187. <if test="drugName != null" >
  188. drug_name,
  189. </if>
  190. <if test="drugPurity != null" >
  191. drug_purity,
  192. </if>
  193. <if test="useDrugType != null" >
  194. use_drug_type,
  195. </if>
  196. <if test="plannDrugStartTime != null" >
  197. plann_drug_start_time,
  198. </if>
  199. <if test="plannDrugUseUpTime != null" >
  200. plann_drug_use_up_time,
  201. </if>
  202. <if test="plannDrugCount != null" >
  203. plann_drug_count,
  204. </if>
  205. <if test="sealType != null" >
  206. seal_type,
  207. </if>
  208. <if test="settingConcentration != null" >
  209. setting_concentration,
  210. </if>
  211. <if test="concentrationCheckType != null" >
  212. concentration_check_type,
  213. </if>
  214. <if test="bulkGasType != null" >
  215. bulk_gas_type,
  216. </if>
  217. <if test="drugUserNumber != null" >
  218. drug_user_number,
  219. </if>
  220. <if test="pesticideOperator != null" >
  221. pesticide_operator,
  222. </if>
  223. <if test="creater != null" >
  224. creater,
  225. </if>
  226. <if test="createTime != null" >
  227. create_time,
  228. </if>
  229. <if test="updateTime != null" >
  230. update_time,
  231. </if>
  232. <if test="state != null" >
  233. state,
  234. </if>
  235. <if test="approvePeople != null" >
  236. approve_people,
  237. </if>
  238. <if test="approveDepartment != null" >
  239. approve_department,
  240. </if>
  241. <if test="approveNote != null" >
  242. approve_note,
  243. </if>
  244. <if test="approveTime != null" >
  245. approve_time,
  246. </if>
  247. <if test="orgId != null" >
  248. org_id,
  249. </if>
  250. <if test="syryzzqk != null" >
  251. syryzzqk,
  252. </if>
  253. <if test="syzzsh != null" >
  254. syzzsh,
  255. </if>
  256. <if test="jx != null" >
  257. jx,
  258. </if>
  259. <if test="lddwyyl != null" >
  260. lddwyyl,
  261. </if>
  262. <if test="kjdwyyl != null" >
  263. kjdwyyl,
  264. </if>
  265. <if test="syff != null" >
  266. syff,
  267. </if>
  268. <if test="fzsycs != null" >
  269. fzsycs,
  270. </if>
  271. <if test="deleteState != null" >
  272. delete_state,
  273. </if>
  274. <if test="updatetime != null" >
  275. updatetime,
  276. </if>
  277. </trim>
  278. <trim prefix="values (" suffix=")" suffixOverrides="," >
  279. <if test="id != null" >
  280. #{id,jdbcType=VARCHAR},
  281. </if>
  282. <if test="fumigationId != null" >
  283. #{fumigationId,jdbcType=VARCHAR},
  284. </if>
  285. <if test="majorInsectPests != null" >
  286. #{majorInsectPests,jdbcType=INTEGER},
  287. </if>
  288. <if test="insectDensity != null" >
  289. #{insectDensity,jdbcType=VARCHAR},
  290. </if>
  291. <if test="occurrencePlace != null" >
  292. #{occurrencePlace,jdbcType=VARCHAR},
  293. </if>
  294. <if test="insectProductTime != null" >
  295. #{insectProductTime,jdbcType=TIMESTAMP},
  296. </if>
  297. <if test="drugName != null" >
  298. #{drugName,jdbcType=INTEGER},
  299. </if>
  300. <if test="drugPurity != null" >
  301. #{drugPurity,jdbcType=VARCHAR},
  302. </if>
  303. <if test="useDrugType != null" >
  304. #{useDrugType,jdbcType=VARCHAR},
  305. </if>
  306. <if test="plannDrugStartTime != null" >
  307. #{plannDrugStartTime,jdbcType=TIMESTAMP},
  308. </if>
  309. <if test="plannDrugUseUpTime != null" >
  310. #{plannDrugUseUpTime,jdbcType=TIMESTAMP},
  311. </if>
  312. <if test="plannDrugCount != null" >
  313. #{plannDrugCount,jdbcType=VARCHAR},
  314. </if>
  315. <if test="sealType != null" >
  316. #{sealType,jdbcType=VARCHAR},
  317. </if>
  318. <if test="settingConcentration != null" >
  319. #{settingConcentration,jdbcType=VARCHAR},
  320. </if>
  321. <if test="concentrationCheckType != null" >
  322. #{concentrationCheckType,jdbcType=VARCHAR},
  323. </if>
  324. <if test="bulkGasType != null" >
  325. #{bulkGasType,jdbcType=VARCHAR},
  326. </if>
  327. <if test="drugUserNumber != null" >
  328. #{drugUserNumber,jdbcType=INTEGER},
  329. </if>
  330. <if test="pesticideOperator != null" >
  331. #{pesticideOperator,jdbcType=VARCHAR},
  332. </if>
  333. <if test="creater != null" >
  334. #{creater,jdbcType=INTEGER},
  335. </if>
  336. <if test="createTime != null" >
  337. #{createTime,jdbcType=TIMESTAMP},
  338. </if>
  339. <if test="updateTime != null" >
  340. #{updateTime,jdbcType=TIMESTAMP},
  341. </if>
  342. <if test="state != null" >
  343. #{state,jdbcType=INTEGER},
  344. </if>
  345. <if test="approvePeople != null" >
  346. #{approvePeople,jdbcType=VARCHAR},
  347. </if>
  348. <if test="approveDepartment != null" >
  349. #{approveDepartment,jdbcType=VARCHAR},
  350. </if>
  351. <if test="approveNote != null" >
  352. #{approveNote,jdbcType=VARCHAR},
  353. </if>
  354. <if test="approveTime != null" >
  355. #{approveTime,jdbcType=TIMESTAMP},
  356. </if>
  357. <if test="orgId != null" >
  358. #{orgId,jdbcType=VARCHAR},
  359. </if>
  360. <if test="syryzzqk != null" >
  361. #{syryzzqk,jdbcType=VARCHAR},
  362. </if>
  363. <if test="syzzsh != null" >
  364. #{syzzsh,jdbcType=VARCHAR},
  365. </if>
  366. <if test="jx != null" >
  367. #{jx,jdbcType=VARCHAR},
  368. </if>
  369. <if test="lddwyyl != null" >
  370. #{lddwyyl,jdbcType=DECIMAL},
  371. </if>
  372. <if test="kjdwyyl != null" >
  373. #{kjdwyyl,jdbcType=DECIMAL},
  374. </if>
  375. <if test="syff != null" >
  376. #{syff,jdbcType=VARCHAR},
  377. </if>
  378. <if test="fzsycs != null" >
  379. #{fzsycs,jdbcType=VARCHAR},
  380. </if>
  381. <if test="deleteState != null" >
  382. #{deleteState,jdbcType=VARCHAR},
  383. </if>
  384. <if test="updatetime != null" >
  385. #{updatetime,jdbcType=TIMESTAMP},
  386. </if>
  387. </trim>
  388. </insert>
  389. <select id="countByExample" parameterType="com.chinaitop.depot.intelligent.fumigation.model.TFumigationPesticideExample" resultType="java.lang.Integer" >
  390. select count(*) from t_fumigation_pesticide
  391. <if test="_parameter != null" >
  392. <include refid="Example_Where_Clause" />
  393. </if>
  394. </select>
  395. <update id="updateByExampleSelective" parameterType="map" >
  396. update t_fumigation_pesticide
  397. <set >
  398. <if test="record.id != null" >
  399. id = #{record.id,jdbcType=VARCHAR},
  400. </if>
  401. <if test="record.fumigationId != null" >
  402. fumigation_id = #{record.fumigationId,jdbcType=VARCHAR},
  403. </if>
  404. <if test="record.majorInsectPests != null" >
  405. major_insect_pests = #{record.majorInsectPests,jdbcType=INTEGER},
  406. </if>
  407. <if test="record.insectDensity != null" >
  408. insect_density = #{record.insectDensity,jdbcType=VARCHAR},
  409. </if>
  410. <if test="record.occurrencePlace != null" >
  411. occurrence_place = #{record.occurrencePlace,jdbcType=VARCHAR},
  412. </if>
  413. <if test="record.insectProductTime != null" >
  414. insect_product_time = #{record.insectProductTime,jdbcType=TIMESTAMP},
  415. </if>
  416. <if test="record.drugName != null" >
  417. drug_name = #{record.drugName,jdbcType=INTEGER},
  418. </if>
  419. <if test="record.drugPurity != null" >
  420. drug_purity = #{record.drugPurity,jdbcType=VARCHAR},
  421. </if>
  422. <if test="record.useDrugType != null" >
  423. use_drug_type = #{record.useDrugType,jdbcType=VARCHAR},
  424. </if>
  425. <if test="record.plannDrugStartTime != null" >
  426. plann_drug_start_time = #{record.plannDrugStartTime,jdbcType=TIMESTAMP},
  427. </if>
  428. <if test="record.plannDrugUseUpTime != null" >
  429. plann_drug_use_up_time = #{record.plannDrugUseUpTime,jdbcType=TIMESTAMP},
  430. </if>
  431. <if test="record.plannDrugCount != null" >
  432. plann_drug_count = #{record.plannDrugCount,jdbcType=VARCHAR},
  433. </if>
  434. <if test="record.sealType != null" >
  435. seal_type = #{record.sealType,jdbcType=VARCHAR},
  436. </if>
  437. <if test="record.settingConcentration != null" >
  438. setting_concentration = #{record.settingConcentration,jdbcType=VARCHAR},
  439. </if>
  440. <if test="record.concentrationCheckType != null" >
  441. concentration_check_type = #{record.concentrationCheckType,jdbcType=VARCHAR},
  442. </if>
  443. <if test="record.bulkGasType != null" >
  444. bulk_gas_type = #{record.bulkGasType,jdbcType=VARCHAR},
  445. </if>
  446. <if test="record.drugUserNumber != null" >
  447. drug_user_number = #{record.drugUserNumber,jdbcType=INTEGER},
  448. </if>
  449. <if test="record.pesticideOperator != null" >
  450. pesticide_operator = #{record.pesticideOperator,jdbcType=VARCHAR},
  451. </if>
  452. <if test="record.creater != null" >
  453. creater = #{record.creater,jdbcType=INTEGER},
  454. </if>
  455. <if test="record.createTime != null" >
  456. create_time = #{record.createTime,jdbcType=TIMESTAMP},
  457. </if>
  458. <if test="record.updateTime != null" >
  459. update_time = #{record.updateTime,jdbcType=TIMESTAMP},
  460. </if>
  461. <if test="record.state != null" >
  462. state = #{record.state,jdbcType=INTEGER},
  463. </if>
  464. <if test="record.approvePeople != null" >
  465. approve_people = #{record.approvePeople,jdbcType=VARCHAR},
  466. </if>
  467. <if test="record.approveDepartment != null" >
  468. approve_department = #{record.approveDepartment,jdbcType=VARCHAR},
  469. </if>
  470. <if test="record.approveNote != null" >
  471. approve_note = #{record.approveNote,jdbcType=VARCHAR},
  472. </if>
  473. <if test="record.approveTime != null" >
  474. approve_time = #{record.approveTime,jdbcType=TIMESTAMP},
  475. </if>
  476. <if test="record.orgId != null" >
  477. org_id = #{record.orgId,jdbcType=VARCHAR},
  478. </if>
  479. <if test="record.syryzzqk != null" >
  480. syryzzqk = #{record.syryzzqk,jdbcType=VARCHAR},
  481. </if>
  482. <if test="record.syzzsh != null" >
  483. syzzsh = #{record.syzzsh,jdbcType=VARCHAR},
  484. </if>
  485. <if test="record.jx != null" >
  486. jx = #{record.jx,jdbcType=VARCHAR},
  487. </if>
  488. <if test="record.lddwyyl != null" >
  489. lddwyyl = #{record.lddwyyl,jdbcType=DECIMAL},
  490. </if>
  491. <if test="record.kjdwyyl != null" >
  492. kjdwyyl = #{record.kjdwyyl,jdbcType=DECIMAL},
  493. </if>
  494. <if test="record.syff != null" >
  495. syff = #{record.syff,jdbcType=VARCHAR},
  496. </if>
  497. <if test="record.fzsycs != null" >
  498. fzsycs = #{record.fzsycs,jdbcType=VARCHAR},
  499. </if>
  500. <if test="record.deleteState != null" >
  501. delete_state = #{record.deleteState,jdbcType=VARCHAR},
  502. </if>
  503. <if test="record.updatetime != null" >
  504. updatetime = #{record.updatetime,jdbcType=TIMESTAMP},
  505. </if>
  506. </set>
  507. <if test="_parameter != null" >
  508. <include refid="Update_By_Example_Where_Clause" />
  509. </if>
  510. </update>
  511. <update id="updateByExample" parameterType="map" >
  512. update t_fumigation_pesticide
  513. set id = #{record.id,jdbcType=VARCHAR},
  514. fumigation_id = #{record.fumigationId,jdbcType=VARCHAR},
  515. major_insect_pests = #{record.majorInsectPests,jdbcType=INTEGER},
  516. insect_density = #{record.insectDensity,jdbcType=VARCHAR},
  517. occurrence_place = #{record.occurrencePlace,jdbcType=VARCHAR},
  518. insect_product_time = #{record.insectProductTime,jdbcType=TIMESTAMP},
  519. drug_name = #{record.drugName,jdbcType=INTEGER},
  520. drug_purity = #{record.drugPurity,jdbcType=VARCHAR},
  521. use_drug_type = #{record.useDrugType,jdbcType=VARCHAR},
  522. plann_drug_start_time = #{record.plannDrugStartTime,jdbcType=TIMESTAMP},
  523. plann_drug_use_up_time = #{record.plannDrugUseUpTime,jdbcType=TIMESTAMP},
  524. plann_drug_count = #{record.plannDrugCount,jdbcType=VARCHAR},
  525. seal_type = #{record.sealType,jdbcType=VARCHAR},
  526. setting_concentration = #{record.settingConcentration,jdbcType=VARCHAR},
  527. concentration_check_type = #{record.concentrationCheckType,jdbcType=VARCHAR},
  528. bulk_gas_type = #{record.bulkGasType,jdbcType=VARCHAR},
  529. drug_user_number = #{record.drugUserNumber,jdbcType=INTEGER},
  530. pesticide_operator = #{record.pesticideOperator,jdbcType=VARCHAR},
  531. creater = #{record.creater,jdbcType=INTEGER},
  532. create_time = #{record.createTime,jdbcType=TIMESTAMP},
  533. update_time = #{record.updateTime,jdbcType=TIMESTAMP},
  534. state = #{record.state,jdbcType=INTEGER},
  535. approve_people = #{record.approvePeople,jdbcType=VARCHAR},
  536. approve_department = #{record.approveDepartment,jdbcType=VARCHAR},
  537. approve_note = #{record.approveNote,jdbcType=VARCHAR},
  538. approve_time = #{record.approveTime,jdbcType=TIMESTAMP},
  539. org_id = #{record.orgId,jdbcType=VARCHAR},
  540. syryzzqk = #{record.syryzzqk,jdbcType=VARCHAR},
  541. syzzsh = #{record.syzzsh,jdbcType=VARCHAR},
  542. jx = #{record.jx,jdbcType=VARCHAR},
  543. lddwyyl = #{record.lddwyyl,jdbcType=DECIMAL},
  544. kjdwyyl = #{record.kjdwyyl,jdbcType=DECIMAL},
  545. syff = #{record.syff,jdbcType=VARCHAR},
  546. fzsycs = #{record.fzsycs,jdbcType=VARCHAR},
  547. delete_state = #{record.deleteState,jdbcType=VARCHAR},
  548. updatetime = #{record.updatetime,jdbcType=TIMESTAMP}
  549. <if test="_parameter != null" >
  550. <include refid="Update_By_Example_Where_Clause" />
  551. </if>
  552. </update>
  553. <update id="updateByPrimaryKeySelective" parameterType="com.chinaitop.depot.intelligent.fumigation.model.TFumigationPesticide" >
  554. update t_fumigation_pesticide
  555. <set >
  556. <if test="fumigationId != null" >
  557. fumigation_id = #{fumigationId,jdbcType=VARCHAR},
  558. </if>
  559. <if test="majorInsectPests != null" >
  560. major_insect_pests = #{majorInsectPests,jdbcType=INTEGER},
  561. </if>
  562. <if test="insectDensity != null" >
  563. insect_density = #{insectDensity,jdbcType=VARCHAR},
  564. </if>
  565. <if test="occurrencePlace != null" >
  566. occurrence_place = #{occurrencePlace,jdbcType=VARCHAR},
  567. </if>
  568. <if test="insectProductTime != null" >
  569. insect_product_time = #{insectProductTime,jdbcType=TIMESTAMP},
  570. </if>
  571. <if test="drugName != null" >
  572. drug_name = #{drugName,jdbcType=INTEGER},
  573. </if>
  574. <if test="drugPurity != null" >
  575. drug_purity = #{drugPurity,jdbcType=VARCHAR},
  576. </if>
  577. <if test="useDrugType != null" >
  578. use_drug_type = #{useDrugType,jdbcType=VARCHAR},
  579. </if>
  580. <if test="plannDrugStartTime != null" >
  581. plann_drug_start_time = #{plannDrugStartTime,jdbcType=TIMESTAMP},
  582. </if>
  583. <if test="plannDrugUseUpTime != null" >
  584. plann_drug_use_up_time = #{plannDrugUseUpTime,jdbcType=TIMESTAMP},
  585. </if>
  586. <if test="plannDrugCount != null" >
  587. plann_drug_count = #{plannDrugCount,jdbcType=VARCHAR},
  588. </if>
  589. <if test="sealType != null" >
  590. seal_type = #{sealType,jdbcType=VARCHAR},
  591. </if>
  592. <if test="settingConcentration != null" >
  593. setting_concentration = #{settingConcentration,jdbcType=VARCHAR},
  594. </if>
  595. <if test="concentrationCheckType != null" >
  596. concentration_check_type = #{concentrationCheckType,jdbcType=VARCHAR},
  597. </if>
  598. <if test="bulkGasType != null" >
  599. bulk_gas_type = #{bulkGasType,jdbcType=VARCHAR},
  600. </if>
  601. <if test="drugUserNumber != null" >
  602. drug_user_number = #{drugUserNumber,jdbcType=INTEGER},
  603. </if>
  604. <if test="pesticideOperator != null" >
  605. pesticide_operator = #{pesticideOperator,jdbcType=VARCHAR},
  606. </if>
  607. <if test="creater != null" >
  608. creater = #{creater,jdbcType=INTEGER},
  609. </if>
  610. <if test="createTime != null" >
  611. create_time = #{createTime,jdbcType=TIMESTAMP},
  612. </if>
  613. <if test="updateTime != null" >
  614. update_time = #{updateTime,jdbcType=TIMESTAMP},
  615. </if>
  616. <if test="state != null" >
  617. state = #{state,jdbcType=INTEGER},
  618. </if>
  619. <if test="approvePeople != null" >
  620. approve_people = #{approvePeople,jdbcType=VARCHAR},
  621. </if>
  622. <if test="approveDepartment != null" >
  623. approve_department = #{approveDepartment,jdbcType=VARCHAR},
  624. </if>
  625. <if test="approveNote != null" >
  626. approve_note = #{approveNote,jdbcType=VARCHAR},
  627. </if>
  628. <if test="approveTime != null" >
  629. approve_time = #{approveTime,jdbcType=TIMESTAMP},
  630. </if>
  631. <if test="orgId != null" >
  632. org_id = #{orgId,jdbcType=VARCHAR},
  633. </if>
  634. <if test="syryzzqk != null" >
  635. syryzzqk = #{syryzzqk,jdbcType=VARCHAR},
  636. </if>
  637. <if test="syzzsh != null" >
  638. syzzsh = #{syzzsh,jdbcType=VARCHAR},
  639. </if>
  640. <if test="jx != null" >
  641. jx = #{jx,jdbcType=VARCHAR},
  642. </if>
  643. <if test="lddwyyl != null" >
  644. lddwyyl = #{lddwyyl,jdbcType=DECIMAL},
  645. </if>
  646. <if test="kjdwyyl != null" >
  647. kjdwyyl = #{kjdwyyl,jdbcType=DECIMAL},
  648. </if>
  649. <if test="syff != null" >
  650. syff = #{syff,jdbcType=VARCHAR},
  651. </if>
  652. <if test="fzsycs != null" >
  653. fzsycs = #{fzsycs,jdbcType=VARCHAR},
  654. </if>
  655. <if test="deleteState != null" >
  656. delete_state = #{deleteState,jdbcType=VARCHAR},
  657. </if>
  658. <if test="updatetime != null" >
  659. updatetime = #{updatetime,jdbcType=TIMESTAMP},
  660. </if>
  661. </set>
  662. where id = #{id,jdbcType=VARCHAR}
  663. </update>
  664. <update id="updateByPrimaryKey" parameterType="com.chinaitop.depot.intelligent.fumigation.model.TFumigationPesticide" >
  665. update t_fumigation_pesticide
  666. set fumigation_id = #{fumigationId,jdbcType=VARCHAR},
  667. major_insect_pests = #{majorInsectPests,jdbcType=INTEGER},
  668. insect_density = #{insectDensity,jdbcType=VARCHAR},
  669. occurrence_place = #{occurrencePlace,jdbcType=VARCHAR},
  670. insect_product_time = #{insectProductTime,jdbcType=TIMESTAMP},
  671. drug_name = #{drugName,jdbcType=INTEGER},
  672. drug_purity = #{drugPurity,jdbcType=VARCHAR},
  673. use_drug_type = #{useDrugType,jdbcType=VARCHAR},
  674. plann_drug_start_time = #{plannDrugStartTime,jdbcType=TIMESTAMP},
  675. plann_drug_use_up_time = #{plannDrugUseUpTime,jdbcType=TIMESTAMP},
  676. plann_drug_count = #{plannDrugCount,jdbcType=VARCHAR},
  677. seal_type = #{sealType,jdbcType=VARCHAR},
  678. setting_concentration = #{settingConcentration,jdbcType=VARCHAR},
  679. concentration_check_type = #{concentrationCheckType,jdbcType=VARCHAR},
  680. bulk_gas_type = #{bulkGasType,jdbcType=VARCHAR},
  681. drug_user_number = #{drugUserNumber,jdbcType=INTEGER},
  682. pesticide_operator = #{pesticideOperator,jdbcType=VARCHAR},
  683. creater = #{creater,jdbcType=INTEGER},
  684. create_time = #{createTime,jdbcType=TIMESTAMP},
  685. update_time = #{updateTime,jdbcType=TIMESTAMP},
  686. state = #{state,jdbcType=INTEGER},
  687. approve_people = #{approvePeople,jdbcType=VARCHAR},
  688. approve_department = #{approveDepartment,jdbcType=VARCHAR},
  689. approve_note = #{approveNote,jdbcType=VARCHAR},
  690. approve_time = #{approveTime,jdbcType=TIMESTAMP},
  691. org_id = #{orgId,jdbcType=VARCHAR},
  692. syryzzqk = #{syryzzqk,jdbcType=VARCHAR},
  693. syzzsh = #{syzzsh,jdbcType=VARCHAR},
  694. jx = #{jx,jdbcType=VARCHAR},
  695. lddwyyl = #{lddwyyl,jdbcType=DECIMAL},
  696. kjdwyyl = #{kjdwyyl,jdbcType=DECIMAL},
  697. syff = #{syff,jdbcType=VARCHAR},
  698. fzsycs = #{fzsycs,jdbcType=VARCHAR},
  699. delete_state = #{deleteState,jdbcType=VARCHAR},
  700. updatetime = #{updatetime,jdbcType=TIMESTAMP}
  701. where id = #{id,jdbcType=VARCHAR}
  702. </update>
  703. <select id="getPesticidePlanList" parameterType="java.util.Map" resultType="java.util.HashMap">
  704. SELECT
  705. pes.id,
  706. plan.id fuigationId,
  707. plan.house_id houseId,
  708. pes.major_insect_pests majorInsectPests,
  709. pes.drug_name drugName,
  710. pes.use_drug_type useDrugType,
  711. pes.create_time createTime,
  712. pes.state
  713. FROM
  714. t_fumigation_pesticide pes
  715. LEFT JOIN t_fumigation_plan plan ON pes.fumigation_id = plan.id
  716. WHERE pes.delete_state = 1 AND plan.org_id = #{orgId,jdbcType=INTEGER}
  717. <if test="houseId != null" >
  718. AND plan.house_id = #{houseId,jdbcType=INTEGER}
  719. </if>
  720. </select>
  721. <select id="getPesticidePlanLists" parameterType="java.util.Map" resultType="java.util.HashMap">
  722. SELECT
  723. pes.id,
  724. plan.id fuigationId,
  725. plan.house_id houseId,
  726. pes.major_insect_pests majorInsectPests,
  727. pes.drug_name drugName,
  728. pes.use_drug_type useDrugType,
  729. approval.create_time createTime,
  730. pes.state, approval.id auditId,
  731. approval.result result,
  732. approval.task_id taskId,
  733. approval.task_name taskName,
  734. approval.operator operator
  735. FROM
  736. t_fumigation_pesticide pes
  737. LEFT JOIN t_fumigation_plan plan ON pes.fumigation_id = plan.id
  738. LEFT JOIN business_approval approval ON pes.id = approval.task_id
  739. WHERE plan.org_id = #{orgId,jdbcType=INTEGER}
  740. AND (pes.state = 2 OR pes.state = 3)
  741. <if test="userId != null" >
  742. AND approval.operator = #{userId}
  743. </if>
  744. <if test="houseId != null" >
  745. AND plan.house_id = #{houseId,jdbcType=INTEGER}
  746. </if>
  747. </select>
  748. </mapper>