DailyRecordSupercheckDao.xml 32 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030
  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="cn.ourwill.module.house.dao.daily.DailyRecordSupercheckDao">
  4. <resultMap type="cn.ourwill.module.house.entity.daily.DailyRecordSupercheck" id="baseMap">
  5. <result column="id" property="id"/>
  6. <result column="uuid" property="uuid"/>
  7. <result column="type" property="type"/>
  8. <result column="checker" property="checker"/>
  9. <result column="check_time" property="checkTime"/>
  10. <result column="check_desc" property="checkDesc"/>
  11. <result column="problems" property="problems"/>
  12. <result column="advices" property="advices"/>
  13. <result column="remarks" property="remarks"/>
  14. <result column="capacity" property="capacity"/>
  15. <result column="wheat" property="wheat"/>
  16. <result column="rice" property="rice"/>
  17. <result column="corn" property="corn"/>
  18. <result column="bean" property="bean"/>
  19. <result column="improver_plan" property="improverPlan"/>
  20. <result column="improver_start_plan" property="improverStartPlan"/>
  21. <result column="improver_end_plan" property="improverEndPlan"/>
  22. <result column="improver" property="improver"/>
  23. <result column="improve_start_time" property="improveStartTime"/>
  24. <result column="improve_end_time" property="improveEndTime"/>
  25. <result column="improve_works" property="improveWorks"/>
  26. <result column="improve_result" property="improveResult"/>
  27. <!--<result column="house_id" property="houseId"/>-->
  28. <result column="c_id" property="cId"/>
  29. <result column="c_time" property="cTime"/>
  30. <result column="u_id" property="uId"/>
  31. <result column="u_time" property="uTime"/>
  32. <result column="version" property="version"/>
  33. <result column="provinceId" property="provinceId"/>
  34. <result column="cityId" property="cityId"/>
  35. <result column="grainId" property="grainId"/>
  36. <result column="houseId" property="houseId"/>
  37. <result column="pic" property="pic"/>
  38. <result column="audit" property="audit"/>
  39. <result column="checker_pic" property="checkerPic"/>
  40. <result column="pics" property="pics"/>
  41. <result column="other_type" property="otherType"/>
  42. <result column="other_house" property="otherHouse"/>
  43. <result column="problem_radio" property="problemRadio"/>
  44. <result column="checker2" property="checker2"/>
  45. <result column="checker_unit" property="checkerUnit"/>
  46. <result column="checker_job" property="checkerJob"/>
  47. <result column="checker_head" property="checkerHead"/>
  48. <result column="operator" property="operator"/>
  49. <result column="code" property="code"/>
  50. <result column="tick" property="tick"/>
  51. <result column="back_date" property="backDate"/>
  52. </resultMap>
  53. <sql id="columns">
  54. id ,
  55. uuid ,
  56. `type`,
  57. checker ,
  58. check_time ,
  59. check_desc ,
  60. problems ,
  61. advices ,
  62. remarks ,
  63. capacity ,
  64. wheat ,
  65. rice ,
  66. corn ,
  67. bean ,
  68. improver_plan ,
  69. improver_start_plan ,
  70. improver_end_plan ,
  71. improver ,
  72. improve_start_time ,
  73. improve_end_time ,
  74. improve_works ,
  75. improve_result ,
  76. c_id ,
  77. c_time ,
  78. u_id ,
  79. u_time ,
  80. version,
  81. provinceId,
  82. cityId,
  83. houseId,
  84. grainId,
  85. pic,
  86. checker_pic,
  87. pics,
  88. audit,
  89. other_type,
  90. other_house,
  91. problem_radio,
  92. checker2,
  93. checker_head,
  94. checker_unit,
  95. checker_job,
  96. tick,
  97. code,
  98. operator,
  99. back_date
  100. </sql>
  101. <sql id="joinCols">
  102. </sql>
  103. <select id="get" resultMap="baseMap">
  104. SELECT
  105. <include refid="columns"/>
  106. FROM daily_record_supercheck a
  107. <include refid="joinCols"/>
  108. WHERE a.id = #{id}
  109. </select>
  110. <select id="getcheckDate" resultType="cn.ourwill.module.house.entity.daily.DailyRecordSupercheck">
  111. SELECT
  112. DATE_FORMAT(a.check_time,'%Y-%m-%d') as check_time,
  113. a.type,
  114. a.audit,
  115. a.sync_flag,
  116. a.problems,
  117. a.improver_plan,
  118. a.grainId,
  119. hi.house_name,
  120. CONCAT(sg.NAME,if(hi.house_name &lt;&gt;'',hi.house_name,'其他仓'+a.other_house)) as checker2
  121. FROM daily_record_supercheck a
  122. LEFT JOIN sys_grain sg on sg.id=a.grainId
  123. LEFT JOIN house_info hi on hi.id=a.houseId
  124. <where>
  125. <if test="grainId !=null and grainId != ''">
  126. grainId = #{grainId}
  127. </if>
  128. </where>
  129. /* SELECT
  130. *
  131. FROM daily_record_supercheck a
  132. LEFT JOIN sys_grain sg on sg.id=a.grainId
  133. LEFT JOIN house_info hi on hi.id=a.houseId*/
  134. </select>
  135. <select id="getcheckDateAll" resultType="cn.ourwill.module.house.entity.daily.DailyRecordSupercheck">
  136. SELECT
  137. *
  138. FROM daily_record_supercheck a
  139. LEFT JOIN sys_grain sg on sg.id=a.grainId
  140. LEFT JOIN house_info hi on hi.id=a.houseId
  141. </select>
  142. <select id="getSearchDatePay" resultType="cn.ourwill.module.house.entity.daily.DailyRecordSupercheck" parameterType="java.lang.String" >
  143. SELECT
  144. DATE_FORMAT(a.check_time,'%Y-%m-%d') as check_time,
  145. a.type,
  146. a.audit,
  147. a.sync_flag,
  148. a.problems,
  149. a.improver_plan,
  150. a.grainId,
  151. CONCAT(sg.NAME,if(hi.house_name &lt;&gt;'',hi.house_name,'其他仓'+a.other_house)) as checker2
  152. FROM daily_record_supercheck a
  153. LEFT JOIN sys_grain sg on sg.id=a.grainId
  154. LEFT JOIN house_info hi on hi.id=a.houseId
  155. <where>
  156. <if test="searchStartDate !=null and searchStartDate != ''">
  157. and check_time <![CDATA[ >= ]]> #{searchStartDate}
  158. </if>
  159. <if test="searchEndDate !=null and searchEndDate != ''">
  160. and check_time &lt;= #{searchEndDate}
  161. </if>
  162. <if test="grainId !=null and grainId != ''">
  163. and grainId = #{grainId}
  164. </if>
  165. <if test="houseId !=null and houseId != ''">
  166. and houseId = #{houseId}
  167. </if>
  168. </where>
  169. </select>
  170. <select id="getByUuid" resultMap="baseMap">
  171. SELECT
  172. <include refid="columns"/>
  173. FROM daily_record_supercheck a
  174. <include refid="joinCols"/>
  175. WHERE a.uuid = #{uuid}
  176. </select>
  177. <!--监督检查页面查询-->
  178. <select id="findList" resultMap="baseMap">
  179. SELECT
  180. check_time,
  181. a.type,
  182. audit,
  183. sync_flag,
  184. problems,
  185. problem_radio,
  186. improver_plan,
  187. improve_start_time ,
  188. improve_end_time ,
  189. grainId,
  190. a.id,
  191. code,
  192. houseId,
  193. checker,
  194. other_house,
  195. other_type,
  196. check_desc,
  197. advices,
  198. checker_head,
  199. checker_unit,
  200. checker_job
  201. FROM daily_record_supercheck a
  202. left join sys_grain sg on a.grainId = sg.id
  203. <include refid="joinCols"/>
  204. <where>
  205. <if test="id !=null">
  206. and id = #{id}
  207. </if>
  208. <if test="type !=null">
  209. and a.type = #{type}
  210. <!--><if test="type ==1 ">
  211. and ( houseId is not null and houseId != '' )
  212. </if>
  213. <if test="type ==2 ">
  214. and `type`=#{type}
  215. </if>
  216. <-->
  217. </if>
  218. <if test="searchStartDate !=null">
  219. and check_time <![CDATA[ >= ]]> #{searchStartDate}
  220. </if>
  221. <if test="searchEndDate !=null">
  222. and check_time &lt;= #{searchEndDate}
  223. </if>
  224. <if test="uuid !=null">
  225. and uuid = #{uuid}
  226. </if>
  227. <if test="checker !=null">
  228. and checker = #{checker}
  229. </if>
  230. <if test="checkTime !=null">
  231. and check_time = #{checkTime}
  232. </if>
  233. <if test="advices !=null">
  234. and advices = #{advices}
  235. </if>
  236. <if test="capacity !=null">
  237. and capacity = #{capacity}
  238. </if>
  239. <if test="wheat !=null">
  240. and wheat = #{wheat}
  241. </if>
  242. <if test="rice !=null">
  243. and rice = #{rice}
  244. </if>
  245. <if test="corn !=null">
  246. and corn = #{corn}
  247. </if>
  248. <if test="bean !=null">
  249. and bean = #{bean}
  250. </if>
  251. <if test="improverPlan !=null">
  252. and improver_plan = #{improverPlan}
  253. </if>
  254. <if test="improverStartPlan !=null">
  255. and improver_start_plan = #{improverStartPlan}
  256. </if>
  257. <if test="improverEndPlan !=null">
  258. and improver_end_plan = #{improverEndPlan}
  259. </if>
  260. <if test="improver !=null">
  261. and improver = #{improver}
  262. </if>
  263. <if test="improveStartTime !=null">
  264. and improve_start_time = #{improveStartTime}
  265. </if>
  266. <if test="houseId !=null">
  267. and houseId = #{houseId}
  268. </if>
  269. <if test="grainId !=null">
  270. and grainId = #{grainId}
  271. </if>
  272. <if test="audit !=null">
  273. and audit = #{audit}
  274. </if>
  275. <if test="otherType !=null">
  276. and other_type = #{otherType}
  277. </if>
  278. <if test="otherHouse !=null">
  279. and other_house = #{otherHouse}
  280. </if>
  281. <if test="problemRadio !=null">
  282. and problem_radio = #{problemRadio}
  283. </if>
  284. <if test="cityId !=null and cityId !=''">
  285. and sg.parentId = #{cityId}
  286. </if>
  287. <if test="houseIds !=null">
  288. and houseId in
  289. <foreach item="item" index="index" collection="houseIds" open="(" separator="," close=")">
  290. #{item}
  291. </foreach>
  292. </if>
  293. </where>
  294. order by check_time desc, id desc
  295. <!--<choose>
  296. <when test="page !=null and page.orderBy != null and page.orderBy != ''">
  297. ORDER BY ${page.orderBy}
  298. </when>
  299. <otherwise>
  300. order by check_time desc
  301. </otherwise>
  302. </choose>-->
  303. </select>
  304. <select id="findBookList" resultMap="baseMap">
  305. SELECT
  306. id,
  307. grainId,
  308. problems,
  309. checker_head,
  310. improve_result,
  311. improver,
  312. improve_start_time,
  313. improve_end_time,
  314. tick,
  315. code,
  316. operator,
  317. back_date
  318. FROM daily_record_supercheck a
  319. <include refid="joinCols"/>
  320. <where>
  321. code is not null
  322. <if test="code !=null">
  323. and code = #{code}
  324. </if>
  325. <if test="grainId !=null">
  326. and grainId = #{grainId}
  327. </if>
  328. <if test="searchStartDate !=null">
  329. and back_date <![CDATA[ >= ]]> #{searchStartDate}
  330. </if>
  331. <if test="searchEndDate !=null">
  332. and back_date &lt;= #{searchEndDate}
  333. </if>
  334. </where>
  335. order by check_time desc, id desc
  336. </select>
  337. <select id="findAllList" resultMap="baseMap">
  338. SELECT
  339. <include refid="columns"/>
  340. FROM daily_record_supercheck a
  341. <include refid="joinCols"/>
  342. <where>
  343. <if test="id !=null">
  344. and id = #{id}
  345. </if>
  346. <if test="type !=null">
  347. <if test="type ==1 ">
  348. and ( houseId is not null and houseId != '' )
  349. </if>
  350. </if>
  351. <if test="searchStartDate !=null">
  352. and check_time <![CDATA[ >= ]]> #{searchStartDate}
  353. </if>
  354. <if test="searchEndDate !=null">
  355. and check_time &lt;= #{searchEndDate}
  356. </if>
  357. <if test="uuid !=null">
  358. and uuid = #{uuid}
  359. </if>
  360. <if test="checker !=null">
  361. and checker = #{checker}
  362. </if>
  363. <if test="checkTime !=null">
  364. and grainId = #{checkTime}
  365. </if>
  366. <if test="code !=null">
  367. and code = #{code}
  368. </if>
  369. <if test="grainId !=null">
  370. and check_time = #{grainId}
  371. </if>
  372. <if test="checkDesc !=null">
  373. and check_desc = #{checkDesc}
  374. </if>
  375. <if test="problems !=null">
  376. and problems = #{problems}
  377. </if>
  378. <if test="advices !=null">
  379. and advices = #{advices}
  380. </if>
  381. <if test="remarks !=null">
  382. and remarks = #{remarks}
  383. </if>
  384. <if test="capacity !=null">
  385. and capacity = #{capacity}
  386. </if>
  387. <if test="wheat !=null">
  388. and wheat = #{wheat}
  389. </if>
  390. <if test="rice !=null">
  391. and rice = #{rice}
  392. </if>
  393. <if test="corn !=null">
  394. and corn = #{corn}
  395. </if>
  396. <if test="bean !=null">
  397. and bean = #{bean}
  398. </if>
  399. <if test="houseId !=null">
  400. and houseId = #{houseId}
  401. </if>
  402. <if test="version !=null">
  403. and version = #{version}
  404. </if>
  405. <if test="audit !=null">
  406. and audit = #{audit}
  407. </if>
  408. <if test="otherType !=null">
  409. and other_type = #{otherType}
  410. </if>
  411. <if test="otherHouse !=null">
  412. and other_house = #{otherHouse}
  413. </if>
  414. <if test="problemRadio !=null">
  415. and problem_radio = #{problemRadio}
  416. </if>
  417. </where>
  418. <choose>
  419. <when test="page !=null and page.orderBy != null and page.orderBy != ''">
  420. ORDER BY ${page.orderBy}
  421. </when>
  422. <otherwise>
  423. order by check_time desc
  424. </otherwise>
  425. </choose>
  426. </select>
  427. <insert id="insert" keyColumn="id" keyProperty="id" useGeneratedKeys="true"
  428. parameterType="cn.ourwill.module.house.entity.daily.DailyRecordSupercheck">
  429. INSERT INTO daily_record_supercheck
  430. <trim prefix="(" suffix=")" suffixOverrides=",">
  431. <if test=" id != null">
  432. id,
  433. </if>
  434. <if test=" uuid != null">
  435. uuid,
  436. </if>
  437. <if test=" type != null">
  438. `type`,
  439. </if>
  440. <if test=" checker != null">
  441. checker,
  442. </if>
  443. <if test=" checkTime != null">
  444. check_time,
  445. </if>
  446. <if test=" checkDesc != null">
  447. check_desc,
  448. </if>
  449. <if test=" problems != null">
  450. problems,
  451. </if>
  452. <if test=" advices != null">
  453. advices,
  454. </if>
  455. <if test=" remarks != null">
  456. remarks,
  457. </if>
  458. <if test=" capacity != null">
  459. capacity,
  460. </if>
  461. <if test=" wheat != null">
  462. wheat,
  463. </if>
  464. <if test=" rice != null">
  465. rice,
  466. </if>
  467. <if test=" corn != null">
  468. corn,
  469. </if>
  470. <if test=" bean != null">
  471. bean,
  472. </if>
  473. <if test="improverPlan != null and improverPlan!=''">
  474. improver_plan ,
  475. </if>
  476. <if test="improverStartPlan != null and improverStartPlan!=''">
  477. improver_start_plan ,
  478. </if>
  479. <if test="improverEndPlan != null and improverEndPlan!=''">
  480. improver_end_plan ,
  481. </if>
  482. <if test=" improver != null">
  483. improver,
  484. </if>
  485. <if test=" improveStartTime != null">
  486. improve_start_time,
  487. </if>
  488. <if test=" improveEndTime != null">
  489. improve_end_time,
  490. </if>
  491. <if test=" improveWorks != null">
  492. improve_works,
  493. </if>
  494. <if test=" improveResult != null">
  495. improve_result,
  496. </if>
  497. <if test=" provinceId != null">
  498. provinceId,
  499. </if>
  500. <if test=" cityId != null">
  501. cityId,
  502. </if>
  503. <if test=" grainId != null">
  504. grainId,
  505. </if>
  506. <if test=" houseId != null">
  507. houseId,
  508. </if>
  509. <if test=" pic != null">
  510. pic,
  511. </if>
  512. <if test=" pics != null">
  513. pics,
  514. </if>
  515. <if test=" audit != null">
  516. audit,
  517. </if>
  518. <if test=" checkerPic != null">
  519. checker_pic,
  520. </if>
  521. <if test=" cId != null">
  522. c_id,
  523. </if>
  524. <if test=" cTime != null">
  525. c_time,
  526. </if>
  527. <if test=" uId != null">
  528. u_id,
  529. </if>
  530. <if test=" uTime != null">
  531. u_time,
  532. </if>
  533. <if test=" version != null">
  534. version,
  535. </if>
  536. <if test="otherType !=null">
  537. other_type,
  538. </if>
  539. <if test="otherHouse !=null">
  540. other_house,
  541. </if>
  542. <if test="problemRadio !=null">
  543. problem_radio,
  544. </if>
  545. <if test="checker2 !=null">
  546. checker2,
  547. </if>
  548. <if test="checkerHead !=null">
  549. checker_head,
  550. </if>
  551. <if test="checkerUnit !=null">
  552. checker_unit,
  553. </if>
  554. <if test="checkerJob !=null">
  555. checker_job,
  556. </if>
  557. <if test="code !=null">
  558. code,
  559. </if>
  560. <if test="tick !=null">
  561. tick,
  562. </if>
  563. <if test="operator !=null">
  564. operator,
  565. </if>
  566. <if test="backDate !=null">
  567. back_date
  568. </if>
  569. </trim>
  570. <trim prefix="values (" suffix=")" suffixOverrides=",">
  571. <if test=" id != null">
  572. #{id}, </if>
  573. <if test=" uuid != null">
  574. #{uuid}, </if>
  575. <if test=" type != null">
  576. #{type}, </if>
  577. <if test=" checker != null">
  578. #{checker}, </if>
  579. <if test=" checkTime != null">
  580. #{checkTime}, </if>
  581. <if test=" checkDesc != null">
  582. #{checkDesc}, </if>
  583. <if test=" problems != null">
  584. #{problems}, </if>
  585. <if test=" advices != null">
  586. #{advices}, </if>
  587. <if test=" remarks != null">
  588. #{remarks}, </if>
  589. <if test=" capacity != null">
  590. #{capacity}, </if>
  591. <if test=" wheat != null">
  592. #{wheat}, </if>
  593. <if test=" rice != null">
  594. #{rice}, </if>
  595. <if test=" corn != null">
  596. #{corn}, </if>
  597. <if test=" bean != null">
  598. #{bean}, </if>
  599. <if test="improverPlan != null and improverPlan!=''">
  600. #{improverPlan} ,</if>
  601. <if test="improverStartPlan != null and improverStartPlan!=''">
  602. #{improverStartPlan} ,</if>
  603. <if test="improverEndPlan != null and improverEndPlan!=''">
  604. #{improverEndPlan} ,</if>
  605. <if test=" improver != null">
  606. #{improver}, </if>
  607. <if test=" improveStartTime != null">
  608. #{improveStartTime}, </if>
  609. <if test=" improveEndTime != null">
  610. #{improveEndTime}, </if>
  611. <if test=" improveWorks != null">
  612. #{improveWorks}, </if>
  613. <if test=" improveResult != null">
  614. #{improveResult}, </if>
  615. <if test=" provinceId != null">
  616. #{provinceId},
  617. </if>
  618. <if test=" cityId != null">
  619. #{cityId},
  620. </if>
  621. <if test=" grainId != null">
  622. #{grainId},
  623. </if>
  624. <if test=" houseId != null">
  625. #{houseId},
  626. </if>
  627. <if test=" pic != null">
  628. #{pic},
  629. </if>
  630. <if test=" pics != null">
  631. #{pics},
  632. </if>
  633. <if test=" audit != null">
  634. #{audit},
  635. </if>
  636. <if test=" checkerPic != null">
  637. #{checkerPic},
  638. </if>
  639. <if test=" cId != null">
  640. #{cId}, </if>
  641. <if test=" cTime != null">
  642. #{cTime}, </if>
  643. <if test=" uId != null">
  644. #{uId}, </if>
  645. <if test=" uTime != null">
  646. #{uTime}, </if>
  647. <if test=" version != null">
  648. #{version}, </if>
  649. <if test="otherType !=null">
  650. #{otherType}, </if>
  651. <if test="otherHouse !=null">
  652. #{otherHouse}, </if>
  653. <if test="problemRadio !=null">
  654. #{problemRadio},
  655. </if>
  656. <if test="checker2 !=null">
  657. #{checker2},
  658. </if>
  659. <if test="checkerHead !=null">
  660. #{checkerHead},
  661. </if>
  662. <if test="checkerUnit !=null">
  663. #{checkerUnit},
  664. </if>
  665. <if test="checkerJob !=null">
  666. #{checkerJob},
  667. </if>
  668. <if test="code !=null">
  669. #{code},
  670. </if>
  671. <if test="tick !=null">
  672. #{tick},
  673. </if>
  674. <if test="operator !=null">
  675. #{operator},
  676. </if>
  677. <if test="backDate !=null">
  678. #{backDate}
  679. </if>
  680. </trim>
  681. </insert>
  682. <update id="update" parameterType="cn.ourwill.module.house.entity.daily.DailyRecordSupercheck">
  683. UPDATE daily_record_supercheck <set>
  684. <if test="id != null">
  685. id= #{id} ,
  686. </if>
  687. <if test="uuid != null">
  688. uuid= #{uuid} ,
  689. </if>
  690. <if test="type != null">
  691. `type`= #{type} ,
  692. </if>
  693. <if test="checker != null">
  694. checker= #{checker} ,
  695. </if>
  696. <if test="checkTime != null">
  697. check_time= #{checkTime} ,
  698. </if>
  699. <if test="checkDesc != null">
  700. check_desc= #{checkDesc} ,
  701. </if>
  702. <if test="problems != null">
  703. problems= #{problems} ,
  704. </if>
  705. <if test="advices != null">
  706. advices= #{advices} ,
  707. </if>
  708. <if test="remarks != null">
  709. remarks= #{remarks} ,
  710. </if>
  711. <if test="capacity != null">
  712. capacity= #{capacity} ,
  713. </if>
  714. <if test="wheat != null">
  715. wheat= #{wheat} ,
  716. </if>
  717. <if test="rice != null">
  718. rice= #{rice} ,
  719. </if>
  720. <if test="corn != null">
  721. corn= #{corn} ,
  722. </if>
  723. <if test="bean != null">
  724. bean= #{bean} ,
  725. </if>
  726. <if test="improverPlan != null and improverPlan!=''">
  727. improver_plan= #{improverPlan} ,
  728. </if>
  729. <if test="improverStartPlan != null and improverStartPlan!=''">
  730. improver_start_plan= #{improverStartPlan} ,
  731. </if>
  732. <if test="improverEndPlan != null and improverEndPlan!=''">
  733. improver_end_plan= #{improverEndPlan} ,
  734. </if>
  735. <if test="improver != null">
  736. improver= #{improver} ,
  737. </if>
  738. <if test="improveStartTime != null">
  739. improve_start_time= #{improveStartTime} ,
  740. </if>
  741. <if test="improveEndTime != null">
  742. improve_end_time= #{improveEndTime} ,
  743. </if>
  744. <if test="improveWorks != null">
  745. improve_works= #{improveWorks} ,
  746. </if>
  747. <if test="improveResult != null">
  748. improve_result= #{improveResult} ,
  749. </if>
  750. <if test="houseId != null">
  751. houseId= #{houseId} ,
  752. </if>
  753. <if test="audit != null">
  754. audit= #{audit} ,
  755. </if>
  756. <if test="checkerPic != null">
  757. checker_pic= #{checkerPic} ,
  758. </if>
  759. <if test="cId != null">
  760. c_id= #{cId} ,
  761. </if>
  762. <if test="cTime != null">
  763. c_time= #{cTime} ,
  764. </if>
  765. <if test="uId != null">
  766. u_id= #{uId} ,
  767. </if>
  768. <if test="uTime != null">
  769. u_time= #{uTime} ,
  770. </if>
  771. <if test="version != null">
  772. version= #{version} ,
  773. </if>
  774. <if test=" pic != null">
  775. pic= #{pic},
  776. </if>
  777. <if test=" pics != null">
  778. pics= #{pics},
  779. </if>
  780. <if test="otherType !=null">
  781. other_type = #{otherType},
  782. </if>
  783. <if test="otherHouse !=null">
  784. other_house = #{otherHouse},
  785. </if>
  786. <if test="problemRadio !=null">
  787. problem_radio = #{problemRadio},
  788. </if>
  789. <if test="checker2 !=null">
  790. checker2 = #{checker2},
  791. </if>
  792. <if test="checkerHead !=null">
  793. checker_head =#{checkerHead},
  794. </if>
  795. <if test="checkerUnit !=null">
  796. checker_unit = #{checkerUnit},
  797. </if>
  798. <if test="checkerJob !=null">
  799. checker_job = #{checkerJob},
  800. </if>
  801. <if test="code !=null">
  802. code=#{code},
  803. </if>
  804. <if test="tick !=null">
  805. tick= #{tick},
  806. </if>
  807. <if test="operator !=null">
  808. operator = #{operator},
  809. </if>
  810. <if test="backDate !=null">
  811. back_date = #{backDate}
  812. </if>
  813. </set>
  814. WHERE id = #{id}
  815. </update>
  816. <update id="updateByUuid" parameterType="cn.ourwill.module.house.entity.daily.DailyRecordSupercheck">
  817. UPDATE daily_record_supercheck <set>
  818. <if test="uuid != null">
  819. uuid= #{uuid} ,
  820. </if>
  821. <if test="type != null">
  822. `type`= #{type} ,
  823. </if>
  824. <if test="checker != null">
  825. checker= #{checker} ,
  826. </if>
  827. <if test="checkTime != null">
  828. check_time= #{checkTime} ,
  829. </if>
  830. <if test="checkDesc != null">
  831. check_desc= #{checkDesc} ,
  832. </if>
  833. <if test="problems != null">
  834. problems= #{problems} ,
  835. </if>
  836. <if test="advices != null">
  837. advices= #{advices} ,
  838. </if>
  839. <if test="remarks != null">
  840. remarks= #{remarks} ,
  841. </if>
  842. <if test="capacity != null">
  843. capacity= #{capacity} ,
  844. </if>
  845. <if test="wheat != null">
  846. wheat= #{wheat} ,
  847. </if>
  848. <if test="rice != null">
  849. rice= #{rice} ,
  850. </if>
  851. <if test="corn != null">
  852. corn= #{corn} ,
  853. </if>
  854. <if test="bean != null">
  855. bean= #{bean} ,
  856. </if>
  857. <if test="improverPlan != null">
  858. improver_plan= #{improverPlan} ,
  859. </if>
  860. <if test="improverStartPlan != null">
  861. improver_start_plan= #{improverStartPlan} ,
  862. </if>
  863. <if test="improverEndPlan != null">
  864. improver_end_plan= #{improverEndPlan} ,
  865. </if>
  866. <if test="improver != null">
  867. improver= #{improver} ,
  868. </if>
  869. <if test="improveStartTime != null">
  870. improve_start_time= #{improveStartTime} ,
  871. </if>
  872. <if test="improveEndTime != null">
  873. improve_end_time= #{improveEndTime} ,
  874. </if>
  875. <if test="improveWorks != null">
  876. improve_works= #{improveWorks} ,
  877. </if>
  878. <if test="improveResult != null">
  879. improve_result= #{improveResult} ,
  880. </if>
  881. <if test="houseId != null">
  882. houseId= #{houseId} ,
  883. </if>
  884. <if test="audit != null">
  885. audit= #{audit} ,
  886. </if>
  887. <if test="checkerPic != null">
  888. checker_pic= #{checkerPic} ,
  889. </if>
  890. <if test="cId != null">
  891. c_id= #{cId} ,
  892. </if>
  893. <if test="cTime != null">
  894. c_time= #{cTime} ,
  895. </if>
  896. <if test="uId != null">
  897. u_id= #{uId} ,
  898. </if>
  899. <if test="uTime != null">
  900. u_time= #{uTime} ,
  901. </if>
  902. <if test="version != null">
  903. version= #{version} ,
  904. </if>
  905. <if test=" pic != null">
  906. pic= #{pic},
  907. </if>
  908. <if test=" pics != null">
  909. pics= #{pics},
  910. </if>
  911. <if test="otherType !=null">
  912. other_type = #{otherType},
  913. </if>
  914. <if test="otherHouse !=null">
  915. other_house = #{otherHouse},
  916. </if>
  917. <if test="problemRadio !=null">
  918. problem_radio = #{problemRadio},
  919. </if>
  920. <if test="checker2 !=null">
  921. checker2 = #{checker2},
  922. </if>
  923. <if test="checkerHead !=null">
  924. checker_head =#{checkerHead},
  925. </if>
  926. <if test="checkerUnit !=null">
  927. checker_unit = #{checkerUnit},
  928. </if>
  929. <if test="checkerJob !=null">
  930. checker_job = #{checkerJob},
  931. </if>
  932. <if test="code !=null">
  933. code=#{code},
  934. </if>
  935. <if test="tick !=null">
  936. tick= #{tick},
  937. </if>
  938. <if test="operator !=null">
  939. operator = #{operator},
  940. </if>
  941. <if test="backDate !=null">
  942. back_date = #{backDate}
  943. </if>
  944. </set>
  945. WHERE uuid = #{uuid}
  946. </update>
  947. <delete id="deleteById" parameterType="java.lang.Long">
  948. DELETE FROM daily_record_supercheck WHERE id = #{id}
  949. </delete>
  950. <delete id="deleteByIds" parameterType="java.util.List">
  951. DELETE FROM daily_record_supercheck WHERE id IN
  952. <foreach collection="list" index="index" item="item" open="(" separator="," close=")">
  953. #{item}
  954. </foreach>
  955. </delete>
  956. <select id="findByHouseId" resultMap="baseMap">
  957. SELECT *
  958. FROM daily_record_supercheck
  959. where houseId=#{houseId} /*AND other_type='日常查仓'*/
  960. <if test="cTime != null">
  961. AND check_time <![CDATA[ <= ]]> #{cTime}
  962. </if>
  963. </select>
  964. <select id="findByHouseIdNoPage" resultMap="baseMap">
  965. SELECT *
  966. FROM daily_record_supercheck
  967. where houseId=#{houseId} AND other_type='日常查仓'
  968. <if test="cTime != null">
  969. AND check_time <![CDATA[ <= ]]> #{cTime}
  970. </if>
  971. </select>
  972. <select id="findByHouseId1" parameterType="java.util.Map" resultType="java.util.Map">
  973. SELECT checker
  974. FROM daily_record_supercheck
  975. where houseId=#{houseId}
  976. </select>
  977. <select id="findHouseId" resultMap="baseMap">
  978. SELECT *
  979. FROM daily_record_supercheck
  980. <where>
  981. <if test="houseId !=null">
  982. and houseId = #{houseId}
  983. </if>
  984. <if test="cTime !=null">
  985. and check_time like CONCAT(#{cTime},'%')
  986. </if>
  987. </where>
  988. order by check_time asc limit #{num},#{size}
  989. </select>
  990. <delete id="deleteSupercheckByHouseId" parameterType="java.lang.Long">
  991. DELETE FROM daily_record_supercheck
  992. WHERE houseId = #{houseId}
  993. <if test="cTime != null">
  994. AND check_time <![CDATA[ <= ]]> #{cTime}
  995. </if>
  996. </delete>
  997. </mapper>