TFumigationPesticideMapper.xml 30 KB

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