StorageGrainAnalysisMapper.xml 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619
  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.grainAnalysis.mapper.StorageGrainAnalysisMapper">
  4. <resultMap id="BaseResultMap" type="com.chinaitop.depot.grainAnalysis.model.StorageGrainAnalysis">
  5. <id column="id" jdbcType="INTEGER" property="id" />
  6. <result column="analysis_id" jdbcType="VARCHAR" property="analysisId" />
  7. <result column="org_id" jdbcType="INTEGER" property="orgId" />
  8. <result column="org_name" jdbcType="VARCHAR" property="orgName" />
  9. <result column="storehouse_id" jdbcType="INTEGER" property="storehouseId" />
  10. <result column="storehouse_code" jdbcType="VARCHAR" property="storehouseCode" />
  11. <result column="warehouse_id" jdbcType="INTEGER" property="warehouseId" />
  12. <result column="storehouse_type" jdbcType="INTEGER" property="storehouseType" />
  13. <result column="foodstuff_type" jdbcType="INTEGER" property="foodstuffType" />
  14. <result column="keeper_name" jdbcType="VARCHAR" property="keeperName" />
  15. <result column="analysis_type" jdbcType="INTEGER" property="analysisType" />
  16. <result column="check_date_start" jdbcType="TIMESTAMP" property="checkDateStart" />
  17. <result column="check_date_end" jdbcType="TIMESTAMP" property="checkDateEnd" />
  18. <result column="year" jdbcType="INTEGER" property="year" />
  19. <result column="month" jdbcType="INTEGER" property="month" />
  20. <result column="submit_person" jdbcType="VARCHAR" property="submitPerson" />
  21. <result column="submit_date" jdbcType="TIMESTAMP" property="submitDate" />
  22. <result column="grain_analysis" jdbcType="VARCHAR" property="grainAnalysis" />
  23. <result column="grain_state" jdbcType="VARCHAR" property="grainState" />
  24. <result column="conclusion" jdbcType="VARCHAR" property="conclusion" />
  25. <result column="chief_opinion" jdbcType="VARCHAR" property="chiefOpinion" />
  26. <result column="remark" jdbcType="VARCHAR" property="remark" />
  27. <result column="auditor" jdbcType="VARCHAR" property="auditor" />
  28. <result column="auditor_date" jdbcType="TIMESTAMP" property="auditorDate" />
  29. <result column="auditor_opinion" jdbcType="VARCHAR" property="auditorOpinion" />
  30. <result column="auditor_status" jdbcType="INTEGER" property="auditorStatus" />
  31. <result column="input_date" jdbcType="TIMESTAMP" property="inputDate" />
  32. </resultMap>
  33. <sql id="Example_Where_Clause">
  34. <where>
  35. <foreach collection="oredCriteria" item="criteria" separator="or">
  36. <if test="criteria.valid">
  37. <trim prefix="(" prefixOverrides="and" suffix=")">
  38. <foreach collection="criteria.criteria" item="criterion">
  39. <choose>
  40. <when test="criterion.noValue">
  41. and ${criterion.condition}
  42. </when>
  43. <when test="criterion.singleValue">
  44. and ${criterion.condition} #{criterion.value}
  45. </when>
  46. <when test="criterion.betweenValue">
  47. and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
  48. </when>
  49. <when test="criterion.listValue">
  50. and ${criterion.condition}
  51. <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
  52. #{listItem}
  53. </foreach>
  54. </when>
  55. </choose>
  56. </foreach>
  57. </trim>
  58. </if>
  59. </foreach>
  60. </where>
  61. </sql>
  62. <sql id="Update_By_Example_Where_Clause">
  63. <where>
  64. <foreach collection="example.oredCriteria" item="criteria" separator="or">
  65. <if test="criteria.valid">
  66. <trim prefix="(" prefixOverrides="and" suffix=")">
  67. <foreach collection="criteria.criteria" item="criterion">
  68. <choose>
  69. <when test="criterion.noValue">
  70. and ${criterion.condition}
  71. </when>
  72. <when test="criterion.singleValue">
  73. and ${criterion.condition} #{criterion.value}
  74. </when>
  75. <when test="criterion.betweenValue">
  76. and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
  77. </when>
  78. <when test="criterion.listValue">
  79. and ${criterion.condition}
  80. <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
  81. #{listItem}
  82. </foreach>
  83. </when>
  84. </choose>
  85. </foreach>
  86. </trim>
  87. </if>
  88. </foreach>
  89. </where>
  90. </sql>
  91. <sql id="Base_Column_List">
  92. id, analysis_id, org_id, org_name, storehouse_id, storehouse_code, warehouse_id,
  93. storehouse_type, foodstuff_type, keeper_name, analysis_type, check_date_start, check_date_end,
  94. year, month, submit_person, submit_date, grain_analysis, grain_state, conclusion,
  95. chief_opinion, remark, auditor, auditor_date, auditor_opinion, auditor_status, input_date
  96. </sql>
  97. <select id="selectByExample" parameterType="com.chinaitop.depot.grainAnalysis.model.StorageGrainAnalysisExample" resultMap="BaseResultMap">
  98. select
  99. <if test="distinct">
  100. distinct
  101. </if>
  102. <include refid="Base_Column_List" />
  103. from storage_grain_analysis
  104. <if test="_parameter != null">
  105. <include refid="Example_Where_Clause" />
  106. </if>
  107. <if test="orderByClause != null">
  108. order by ${orderByClause}
  109. </if>
  110. </select>
  111. <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
  112. select
  113. <include refid="Base_Column_List" />
  114. from storage_grain_analysis
  115. where id = #{id,jdbcType=INTEGER}
  116. </select>
  117. <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
  118. delete from storage_grain_analysis
  119. where id = #{id,jdbcType=INTEGER}
  120. </delete>
  121. <delete id="deleteByExample" parameterType="com.chinaitop.depot.grainAnalysis.model.StorageGrainAnalysisExample">
  122. delete from storage_grain_analysis
  123. <if test="_parameter != null">
  124. <include refid="Example_Where_Clause" />
  125. </if>
  126. </delete>
  127. <insert id="insert" keyProperty="id" useGeneratedKeys="true" parameterType="com.chinaitop.depot.grainAnalysis.model.StorageGrainAnalysis">
  128. insert into storage_grain_analysis (id, analysis_id, org_id,
  129. org_name, storehouse_id, storehouse_code,
  130. warehouse_id, storehouse_type, foodstuff_type,
  131. keeper_name, analysis_type, check_date_start,
  132. check_date_end, year, month,
  133. submit_person, submit_date, grain_analysis,
  134. grain_state, conclusion, chief_opinion,
  135. remark, auditor, auditor_date,
  136. auditor_opinion, auditor_status, input_date
  137. )
  138. values (#{id,jdbcType=INTEGER}, #{analysisId,jdbcType=VARCHAR}, #{orgId,jdbcType=INTEGER},
  139. #{orgName,jdbcType=VARCHAR}, #{storehouseId,jdbcType=INTEGER}, #{storehouseCode,jdbcType=VARCHAR},
  140. #{warehouseId,jdbcType=INTEGER}, #{storehouseType,jdbcType=INTEGER}, #{foodstuffType,jdbcType=INTEGER},
  141. #{keeperName,jdbcType=VARCHAR}, #{analysisType,jdbcType=INTEGER}, #{checkDateStart,jdbcType=TIMESTAMP},
  142. #{checkDateEnd,jdbcType=TIMESTAMP}, #{year,jdbcType=INTEGER}, #{month,jdbcType=INTEGER},
  143. #{submitPerson,jdbcType=VARCHAR}, #{submitDate,jdbcType=TIMESTAMP}, #{grainAnalysis,jdbcType=VARCHAR},
  144. #{grainState,jdbcType=VARCHAR}, #{conclusion,jdbcType=VARCHAR}, #{chiefOpinion,jdbcType=VARCHAR},
  145. #{remark,jdbcType=VARCHAR}, #{auditor,jdbcType=VARCHAR}, #{auditorDate,jdbcType=TIMESTAMP},
  146. #{auditorOpinion,jdbcType=VARCHAR}, #{auditorStatus,jdbcType=INTEGER}, #{inputDate,jdbcType=TIMESTAMP}
  147. )
  148. </insert>
  149. <insert id="insertSelective" keyProperty="id" useGeneratedKeys="true" parameterType="com.chinaitop.depot.grainAnalysis.model.StorageGrainAnalysis">
  150. insert into storage_grain_analysis
  151. <trim prefix="(" suffix=")" suffixOverrides=",">
  152. <if test="id != null">
  153. id,
  154. </if>
  155. <if test="analysisId != null">
  156. analysis_id,
  157. </if>
  158. <if test="orgId != null">
  159. org_id,
  160. </if>
  161. <if test="orgName != null">
  162. org_name,
  163. </if>
  164. <if test="storehouseId != null">
  165. storehouse_id,
  166. </if>
  167. <if test="storehouseCode != null">
  168. storehouse_code,
  169. </if>
  170. <if test="warehouseId != null">
  171. warehouse_id,
  172. </if>
  173. <if test="storehouseType != null">
  174. storehouse_type,
  175. </if>
  176. <if test="foodstuffType != null">
  177. foodstuff_type,
  178. </if>
  179. <if test="keeperName != null">
  180. keeper_name,
  181. </if>
  182. <if test="analysisType != null">
  183. analysis_type,
  184. </if>
  185. <if test="checkDateStart != null">
  186. check_date_start,
  187. </if>
  188. <if test="checkDateEnd != null">
  189. check_date_end,
  190. </if>
  191. <if test="year != null">
  192. year,
  193. </if>
  194. <if test="month != null">
  195. month,
  196. </if>
  197. <if test="submitPerson != null">
  198. submit_person,
  199. </if>
  200. <if test="submitDate != null">
  201. submit_date,
  202. </if>
  203. <if test="grainAnalysis != null">
  204. grain_analysis,
  205. </if>
  206. <if test="grainState != null">
  207. grain_state,
  208. </if>
  209. <if test="conclusion != null">
  210. conclusion,
  211. </if>
  212. <if test="chiefOpinion != null">
  213. chief_opinion,
  214. </if>
  215. <if test="remark != null">
  216. remark,
  217. </if>
  218. <if test="auditor != null">
  219. auditor,
  220. </if>
  221. <if test="auditorDate != null">
  222. auditor_date,
  223. </if>
  224. <if test="auditorOpinion != null">
  225. auditor_opinion,
  226. </if>
  227. <if test="auditorStatus != null">
  228. auditor_status,
  229. </if>
  230. <if test="inputDate != null">
  231. input_date,
  232. </if>
  233. </trim>
  234. <trim prefix="values (" suffix=")" suffixOverrides=",">
  235. <if test="id != null">
  236. #{id,jdbcType=INTEGER},
  237. </if>
  238. <if test="analysisId != null">
  239. #{analysisId,jdbcType=VARCHAR},
  240. </if>
  241. <if test="orgId != null">
  242. #{orgId,jdbcType=INTEGER},
  243. </if>
  244. <if test="orgName != null">
  245. #{orgName,jdbcType=VARCHAR},
  246. </if>
  247. <if test="storehouseId != null">
  248. #{storehouseId,jdbcType=INTEGER},
  249. </if>
  250. <if test="storehouseCode != null">
  251. #{storehouseCode,jdbcType=VARCHAR},
  252. </if>
  253. <if test="warehouseId != null">
  254. #{warehouseId,jdbcType=INTEGER},
  255. </if>
  256. <if test="storehouseType != null">
  257. #{storehouseType,jdbcType=INTEGER},
  258. </if>
  259. <if test="foodstuffType != null">
  260. #{foodstuffType,jdbcType=INTEGER},
  261. </if>
  262. <if test="keeperName != null">
  263. #{keeperName,jdbcType=VARCHAR},
  264. </if>
  265. <if test="analysisType != null">
  266. #{analysisType,jdbcType=INTEGER},
  267. </if>
  268. <if test="checkDateStart != null">
  269. #{checkDateStart,jdbcType=TIMESTAMP},
  270. </if>
  271. <if test="checkDateEnd != null">
  272. #{checkDateEnd,jdbcType=TIMESTAMP},
  273. </if>
  274. <if test="year != null">
  275. #{year,jdbcType=INTEGER},
  276. </if>
  277. <if test="month != null">
  278. #{month,jdbcType=INTEGER},
  279. </if>
  280. <if test="submitPerson != null">
  281. #{submitPerson,jdbcType=VARCHAR},
  282. </if>
  283. <if test="submitDate != null">
  284. #{submitDate,jdbcType=TIMESTAMP},
  285. </if>
  286. <if test="grainAnalysis != null">
  287. #{grainAnalysis,jdbcType=VARCHAR},
  288. </if>
  289. <if test="grainState != null">
  290. #{grainState,jdbcType=VARCHAR},
  291. </if>
  292. <if test="conclusion != null">
  293. #{conclusion,jdbcType=VARCHAR},
  294. </if>
  295. <if test="chiefOpinion != null">
  296. #{chiefOpinion,jdbcType=VARCHAR},
  297. </if>
  298. <if test="remark != null">
  299. #{remark,jdbcType=VARCHAR},
  300. </if>
  301. <if test="auditor != null">
  302. #{auditor,jdbcType=VARCHAR},
  303. </if>
  304. <if test="auditorDate != null">
  305. #{auditorDate,jdbcType=TIMESTAMP},
  306. </if>
  307. <if test="auditorOpinion != null">
  308. #{auditorOpinion,jdbcType=VARCHAR},
  309. </if>
  310. <if test="auditorStatus != null">
  311. #{auditorStatus,jdbcType=INTEGER},
  312. </if>
  313. <if test="inputDate != null">
  314. #{inputDate,jdbcType=TIMESTAMP},
  315. </if>
  316. </trim>
  317. </insert>
  318. <select id="countByExample" parameterType="com.chinaitop.depot.grainAnalysis.model.StorageGrainAnalysisExample" resultType="java.lang.Integer">
  319. select count(*) from storage_grain_analysis
  320. <if test="_parameter != null">
  321. <include refid="Example_Where_Clause" />
  322. </if>
  323. </select>
  324. <update id="updateByExampleSelective" parameterType="map">
  325. update storage_grain_analysis
  326. <set>
  327. <if test="record.id != null">
  328. id = #{record.id,jdbcType=INTEGER},
  329. </if>
  330. <if test="record.analysisId != null">
  331. analysis_id = #{record.analysisId,jdbcType=VARCHAR},
  332. </if>
  333. <if test="record.orgId != null">
  334. org_id = #{record.orgId,jdbcType=INTEGER},
  335. </if>
  336. <if test="record.orgName != null">
  337. org_name = #{record.orgName,jdbcType=VARCHAR},
  338. </if>
  339. <if test="record.storehouseId != null">
  340. storehouse_id = #{record.storehouseId,jdbcType=INTEGER},
  341. </if>
  342. <if test="record.storehouseCode != null">
  343. storehouse_code = #{record.storehouseCode,jdbcType=VARCHAR},
  344. </if>
  345. <if test="record.warehouseId != null">
  346. warehouse_id = #{record.warehouseId,jdbcType=INTEGER},
  347. </if>
  348. <if test="record.storehouseType != null">
  349. storehouse_type = #{record.storehouseType,jdbcType=INTEGER},
  350. </if>
  351. <if test="record.foodstuffType != null">
  352. foodstuff_type = #{record.foodstuffType,jdbcType=INTEGER},
  353. </if>
  354. <if test="record.keeperName != null">
  355. keeper_name = #{record.keeperName,jdbcType=VARCHAR},
  356. </if>
  357. <if test="record.analysisType != null">
  358. analysis_type = #{record.analysisType,jdbcType=INTEGER},
  359. </if>
  360. <if test="record.checkDateStart != null">
  361. check_date_start = #{record.checkDateStart,jdbcType=TIMESTAMP},
  362. </if>
  363. <if test="record.checkDateEnd != null">
  364. check_date_end = #{record.checkDateEnd,jdbcType=TIMESTAMP},
  365. </if>
  366. <if test="record.year != null">
  367. year = #{record.year,jdbcType=INTEGER},
  368. </if>
  369. <if test="record.month != null">
  370. month = #{record.month,jdbcType=INTEGER},
  371. </if>
  372. <if test="record.submitPerson != null">
  373. submit_person = #{record.submitPerson,jdbcType=VARCHAR},
  374. </if>
  375. <if test="record.submitDate != null">
  376. submit_date = #{record.submitDate,jdbcType=TIMESTAMP},
  377. </if>
  378. <if test="record.grainAnalysis != null">
  379. grain_analysis = #{record.grainAnalysis,jdbcType=VARCHAR},
  380. </if>
  381. <if test="record.grainState != null">
  382. grain_state = #{record.grainState,jdbcType=VARCHAR},
  383. </if>
  384. <if test="record.conclusion != null">
  385. conclusion = #{record.conclusion,jdbcType=VARCHAR},
  386. </if>
  387. <if test="record.chiefOpinion != null">
  388. chief_opinion = #{record.chiefOpinion,jdbcType=VARCHAR},
  389. </if>
  390. <if test="record.remark != null">
  391. remark = #{record.remark,jdbcType=VARCHAR},
  392. </if>
  393. <if test="record.auditor != null">
  394. auditor = #{record.auditor,jdbcType=VARCHAR},
  395. </if>
  396. <if test="record.auditorDate != null">
  397. auditor_date = #{record.auditorDate,jdbcType=TIMESTAMP},
  398. </if>
  399. <if test="record.auditorOpinion != null">
  400. auditor_opinion = #{record.auditorOpinion,jdbcType=VARCHAR},
  401. </if>
  402. <if test="record.auditorStatus != null">
  403. auditor_status = #{record.auditorStatus,jdbcType=INTEGER},
  404. </if>
  405. <if test="record.inputDate != null">
  406. input_date = #{record.inputDate,jdbcType=TIMESTAMP},
  407. </if>
  408. </set>
  409. <if test="_parameter != null">
  410. <include refid="Update_By_Example_Where_Clause" />
  411. </if>
  412. </update>
  413. <update id="updateByExample" parameterType="map">
  414. update storage_grain_analysis
  415. set id = #{record.id,jdbcType=INTEGER},
  416. analysis_id = #{record.analysisId,jdbcType=VARCHAR},
  417. org_id = #{record.orgId,jdbcType=INTEGER},
  418. org_name = #{record.orgName,jdbcType=VARCHAR},
  419. storehouse_id = #{record.storehouseId,jdbcType=INTEGER},
  420. storehouse_code = #{record.storehouseCode,jdbcType=VARCHAR},
  421. warehouse_id = #{record.warehouseId,jdbcType=INTEGER},
  422. storehouse_type = #{record.storehouseType,jdbcType=INTEGER},
  423. foodstuff_type = #{record.foodstuffType,jdbcType=INTEGER},
  424. keeper_name = #{record.keeperName,jdbcType=VARCHAR},
  425. analysis_type = #{record.analysisType,jdbcType=INTEGER},
  426. check_date_start = #{record.checkDateStart,jdbcType=TIMESTAMP},
  427. check_date_end = #{record.checkDateEnd,jdbcType=TIMESTAMP},
  428. year = #{record.year,jdbcType=INTEGER},
  429. month = #{record.month,jdbcType=INTEGER},
  430. submit_person = #{record.submitPerson,jdbcType=VARCHAR},
  431. submit_date = #{record.submitDate,jdbcType=TIMESTAMP},
  432. grain_analysis = #{record.grainAnalysis,jdbcType=VARCHAR},
  433. grain_state = #{record.grainState,jdbcType=VARCHAR},
  434. conclusion = #{record.conclusion,jdbcType=VARCHAR},
  435. chief_opinion = #{record.chiefOpinion,jdbcType=VARCHAR},
  436. remark = #{record.remark,jdbcType=VARCHAR},
  437. auditor = #{record.auditor,jdbcType=VARCHAR},
  438. auditor_date = #{record.auditorDate,jdbcType=TIMESTAMP},
  439. auditor_opinion = #{record.auditorOpinion,jdbcType=VARCHAR},
  440. auditor_status = #{record.auditorStatus,jdbcType=INTEGER},
  441. input_date = #{record.inputDate,jdbcType=TIMESTAMP}
  442. <if test="_parameter != null">
  443. <include refid="Update_By_Example_Where_Clause" />
  444. </if>
  445. </update>
  446. <update id="updateByPrimaryKeySelective" parameterType="com.chinaitop.depot.grainAnalysis.model.StorageGrainAnalysis">
  447. update storage_grain_analysis
  448. <set>
  449. <if test="analysisId != null">
  450. analysis_id = #{analysisId,jdbcType=VARCHAR},
  451. </if>
  452. <if test="orgId != null">
  453. org_id = #{orgId,jdbcType=INTEGER},
  454. </if>
  455. <if test="orgName != null">
  456. org_name = #{orgName,jdbcType=VARCHAR},
  457. </if>
  458. <if test="storehouseId != null">
  459. storehouse_id = #{storehouseId,jdbcType=INTEGER},
  460. </if>
  461. <if test="storehouseCode != null">
  462. storehouse_code = #{storehouseCode,jdbcType=VARCHAR},
  463. </if>
  464. <if test="warehouseId != null">
  465. warehouse_id = #{warehouseId,jdbcType=INTEGER},
  466. </if>
  467. <if test="storehouseType != null">
  468. storehouse_type = #{storehouseType,jdbcType=INTEGER},
  469. </if>
  470. <if test="foodstuffType != null">
  471. foodstuff_type = #{foodstuffType,jdbcType=INTEGER},
  472. </if>
  473. <if test="keeperName != null">
  474. keeper_name = #{keeperName,jdbcType=VARCHAR},
  475. </if>
  476. <if test="analysisType != null">
  477. analysis_type = #{analysisType,jdbcType=INTEGER},
  478. </if>
  479. <if test="checkDateStart != null">
  480. check_date_start = #{checkDateStart,jdbcType=TIMESTAMP},
  481. </if>
  482. <if test="checkDateEnd != null">
  483. check_date_end = #{checkDateEnd,jdbcType=TIMESTAMP},
  484. </if>
  485. <if test="year != null">
  486. year = #{year,jdbcType=INTEGER},
  487. </if>
  488. <if test="month != null">
  489. month = #{month,jdbcType=INTEGER},
  490. </if>
  491. <if test="submitPerson != null">
  492. submit_person = #{submitPerson,jdbcType=VARCHAR},
  493. </if>
  494. <if test="submitDate != null">
  495. submit_date = #{submitDate,jdbcType=TIMESTAMP},
  496. </if>
  497. <if test="grainAnalysis != null">
  498. grain_analysis = #{grainAnalysis,jdbcType=VARCHAR},
  499. </if>
  500. <if test="grainState != null">
  501. grain_state = #{grainState,jdbcType=VARCHAR},
  502. </if>
  503. <if test="conclusion != null">
  504. conclusion = #{conclusion,jdbcType=VARCHAR},
  505. </if>
  506. <if test="chiefOpinion != null">
  507. chief_opinion = #{chiefOpinion,jdbcType=VARCHAR},
  508. </if>
  509. <if test="remark != null">
  510. remark = #{remark,jdbcType=VARCHAR},
  511. </if>
  512. <if test="auditor != null">
  513. auditor = #{auditor,jdbcType=VARCHAR},
  514. </if>
  515. <if test="auditorDate != null">
  516. auditor_date = #{auditorDate,jdbcType=TIMESTAMP},
  517. </if>
  518. <if test="auditorOpinion != null">
  519. auditor_opinion = #{auditorOpinion,jdbcType=VARCHAR},
  520. </if>
  521. <if test="auditorStatus != null">
  522. auditor_status = #{auditorStatus,jdbcType=INTEGER},
  523. </if>
  524. <if test="inputDate != null">
  525. input_date = #{inputDate,jdbcType=TIMESTAMP},
  526. </if>
  527. </set>
  528. where id = #{id,jdbcType=INTEGER}
  529. </update>
  530. <update id="updateByPrimaryKey" parameterType="com.chinaitop.depot.grainAnalysis.model.StorageGrainAnalysis">
  531. update storage_grain_analysis
  532. set analysis_id = #{analysisId,jdbcType=VARCHAR},
  533. org_id = #{orgId,jdbcType=INTEGER},
  534. org_name = #{orgName,jdbcType=VARCHAR},
  535. storehouse_id = #{storehouseId,jdbcType=INTEGER},
  536. storehouse_code = #{storehouseCode,jdbcType=VARCHAR},
  537. warehouse_id = #{warehouseId,jdbcType=INTEGER},
  538. storehouse_type = #{storehouseType,jdbcType=INTEGER},
  539. foodstuff_type = #{foodstuffType,jdbcType=INTEGER},
  540. keeper_name = #{keeperName,jdbcType=VARCHAR},
  541. analysis_type = #{analysisType,jdbcType=INTEGER},
  542. check_date_start = #{checkDateStart,jdbcType=TIMESTAMP},
  543. check_date_end = #{checkDateEnd,jdbcType=TIMESTAMP},
  544. year = #{year,jdbcType=INTEGER},
  545. month = #{month,jdbcType=INTEGER},
  546. submit_person = #{submitPerson,jdbcType=VARCHAR},
  547. submit_date = #{submitDate,jdbcType=TIMESTAMP},
  548. grain_analysis = #{grainAnalysis,jdbcType=VARCHAR},
  549. grain_state = #{grainState,jdbcType=VARCHAR},
  550. conclusion = #{conclusion,jdbcType=VARCHAR},
  551. chief_opinion = #{chiefOpinion,jdbcType=VARCHAR},
  552. remark = #{remark,jdbcType=VARCHAR},
  553. auditor = #{auditor,jdbcType=VARCHAR},
  554. auditor_date = #{auditorDate,jdbcType=TIMESTAMP},
  555. auditor_opinion = #{auditorOpinion,jdbcType=VARCHAR},
  556. auditor_status = #{auditorStatus,jdbcType=INTEGER},
  557. input_date = #{inputDate,jdbcType=TIMESTAMP}
  558. where id = #{id,jdbcType=INTEGER}
  559. </update>
  560. <select id="selectStoreHouseObj" resultType="java.util.Map" parameterType="java.util.Map">
  561. SELECT * FROM basic_storehouse WHERE storehouse_id=#{house_id}
  562. </select>
  563. <!-- 查询粮情专卡的数据 -->
  564. <select id="queryLqzkData" resultType="java.util.Map" parameterType="java.util.Map">
  565. SELECT
  566. foods.house_type "houseType",
  567. foods.sub_type "subType",
  568. keeper.`name` "recorder"
  569. FROM
  570. storage_foodbasicinfo foods
  571. LEFT JOIN basic_keeper_house house ON house.house_Id = foods.house_id
  572. LEFT JOIN basic_keeper keeper ON house.keeper_Id = keeper.id
  573. WHERE 1=1 AND seal_status=1 AND history_status=0
  574. <if test="orgId != null">
  575. and foods.org_id=#{orgId}
  576. </if>
  577. <if test="houseId != null">
  578. and foods.house_id=#{houseId}
  579. </if>
  580. <if test="wareId != null">
  581. and foods.warehouse_id=#{wareId}
  582. </if>
  583. ORDER BY foods.id DESC
  584. </select>
  585. <!-- 查询周粮情分析数据 -->
  586. <select id="getThreeTempData" parameterType="java.util.Map" resultType="java.util.Map">
  587. SELECT
  588. id id,
  589. org_id orgId,
  590. storehouse houseId,
  591. time checkDate,
  592. inTemp inTemp,
  593. outTemp outTemp,
  594. inH inWater,
  595. outH outWater,
  596. max maxTemp,
  597. min minTemp,
  598. avg avgTemp,
  599. avg lsTemp
  600. FROM
  601. t_testdata
  602. <where>
  603. iLq_yq = '0'
  604. <if test="orgId != null">
  605. AND org_id = #{orgId}
  606. </if>
  607. <if test="storehouse != null">
  608. AND storehouse = #{storehouse}
  609. </if>
  610. <if test="startDate != null and endDate != null">
  611. AND time BETWEEN #{startDate} AND #{endDate}
  612. </if>
  613. </where>
  614. <if test="weekParams != null">
  615. GROUP BY DATE(checkDate)
  616. </if>
  617. ORDER BY time DESC
  618. </select>
  619. </mapper>