StorageFoodbasicinfoMapper.xml 38 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009
  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.ventilation.mapper.StorageFoodbasicinfoMapper">
  4. <resultMap id="BaseResultMap" type="com.chinaitop.depot.intelligent.ventilation.model.StorageFoodbasicinfo">
  5. <id column="id" jdbcType="INTEGER" property="id" />
  6. <result column="house_id" jdbcType="INTEGER" property="houseId" />
  7. <result column="warehouse_id" jdbcType="INTEGER" property="warehouseId" />
  8. <result column="record_unite" jdbcType="VARCHAR" property="recordUnite" />
  9. <result column="keep_unite" jdbcType="VARCHAR" property="keepUnite" />
  10. <result column="location_num" jdbcType="VARCHAR" property="locationNum" />
  11. <result column="quality" jdbcType="VARCHAR" property="quality" />
  12. <result column="sub_type" jdbcType="INTEGER" property="subType" />
  13. <result column="sub_type_detailed" jdbcType="INTEGER" property="subTypeDetailed" />
  14. <result column="htype" jdbcType="VARCHAR" property="htype" />
  15. <result column="number" jdbcType="DOUBLE" property="number" />
  16. <result column="stand_number" jdbcType="DOUBLE" property="standNumber" />
  17. <result column="input_year" jdbcType="TIMESTAMP" property="inputYear" />
  18. <result column="grow_year" jdbcType="INTEGER" property="growYear" />
  19. <result column="keep_method" jdbcType="VARCHAR" property="keepMethod" />
  20. <result column="level" jdbcType="VARCHAR" property="level" />
  21. <result column="weight" jdbcType="VARCHAR" property="weight" />
  22. <result column="impurity" jdbcType="VARCHAR" property="impurity" />
  23. <result column="water" jdbcType="VARCHAR" property="water" />
  24. <result column="unsound" jdbcType="VARCHAR" property="unsound" />
  25. <result column="recorder" jdbcType="VARCHAR" property="recorder" />
  26. <result column="house_type" jdbcType="VARCHAR" property="houseType" />
  27. <result column="design_house_capacity" jdbcType="DECIMAL" property="designHouseCapacity" />
  28. <result column="valid_house_capacity" jdbcType="VARCHAR" property="validHouseCapacity" />
  29. <result column="price" jdbcType="VARCHAR" property="price" />
  30. <result column="place_of_origin" jdbcType="VARCHAR" property="placeOfOrigin" />
  31. <result column="storage_location" jdbcType="VARCHAR" property="storageLocation" />
  32. <result column="disperse_capacity" jdbcType="VARCHAR" property="disperseCapacity" />
  33. <result column="length" jdbcType="DECIMAL" property="length" />
  34. <result column="width" jdbcType="DECIMAL" property="width" />
  35. <result column="height" jdbcType="DECIMAL" property="height" />
  36. <result column="pack_num" jdbcType="VARCHAR" property="packNum" />
  37. <result column="pack_average_weight" jdbcType="VARCHAR" property="packAverageWeight" />
  38. <result column="keeper_ids" jdbcType="VARCHAR" property="keeperIds" />
  39. <result column="gluten_water_count" jdbcType="VARCHAR" property="glutenWaterCount" />
  40. <result column="eat_score" jdbcType="VARCHAR" property="eatScore" />
  41. <result column="unit_head" jdbcType="VARCHAR" property="unitHead" />
  42. <result column="fat_index" jdbcType="VARCHAR" property="fatIndex" />
  43. <result column="peroxide_value" jdbcType="VARCHAR" property="peroxideValue" />
  44. <result column="refraction_index" jdbcType="VARCHAR" property="refractionIndex" />
  45. <result column="residual_solvent" jdbcType="VARCHAR" property="residualSolvent" />
  46. <result column="filling_time" jdbcType="VARCHAR" property="fillingTime" />
  47. <result column="line_height" jdbcType="DECIMAL" property="lineHeight" />
  48. <result column="seal_status" jdbcType="VARCHAR" property="sealStatus" />
  49. <result column="auth_code" jdbcType="VARCHAR" property="authCode" />
  50. <result column="org_id" jdbcType="INTEGER" property="orgId" />
  51. <result column="history_status" jdbcType="INTEGER" property="historyStatus" />
  52. </resultMap>
  53. <sql id="Example_Where_Clause">
  54. <where>
  55. <foreach collection="oredCriteria" item="criteria" separator="or">
  56. <if test="criteria.valid">
  57. <trim prefix="(" prefixOverrides="and" suffix=")">
  58. <foreach collection="criteria.criteria" item="criterion">
  59. <choose>
  60. <when test="criterion.noValue">
  61. and ${criterion.condition}
  62. </when>
  63. <when test="criterion.singleValue">
  64. and ${criterion.condition} #{criterion.value}
  65. </when>
  66. <when test="criterion.betweenValue">
  67. and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
  68. </when>
  69. <when test="criterion.listValue">
  70. and ${criterion.condition}
  71. <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
  72. #{listItem}
  73. </foreach>
  74. </when>
  75. </choose>
  76. </foreach>
  77. </trim>
  78. </if>
  79. </foreach>
  80. </where>
  81. </sql>
  82. <sql id="Update_By_Example_Where_Clause">
  83. <where>
  84. <foreach collection="example.oredCriteria" item="criteria" separator="or">
  85. <if test="criteria.valid">
  86. <trim prefix="(" prefixOverrides="and" suffix=")">
  87. <foreach collection="criteria.criteria" item="criterion">
  88. <choose>
  89. <when test="criterion.noValue">
  90. and ${criterion.condition}
  91. </when>
  92. <when test="criterion.singleValue">
  93. and ${criterion.condition} #{criterion.value}
  94. </when>
  95. <when test="criterion.betweenValue">
  96. and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
  97. </when>
  98. <when test="criterion.listValue">
  99. and ${criterion.condition}
  100. <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
  101. #{listItem}
  102. </foreach>
  103. </when>
  104. </choose>
  105. </foreach>
  106. </trim>
  107. </if>
  108. </foreach>
  109. </where>
  110. </sql>
  111. <sql id="Base_Column_List">
  112. id, house_id, warehouse_id, record_unite, keep_unite, location_num, quality, sub_type,
  113. sub_type_detailed, htype, number, stand_number, input_year, grow_year, keep_method,
  114. level, weight, impurity, water, unsound, recorder, house_type, design_house_capacity,
  115. valid_house_capacity, price, place_of_origin, storage_location, disperse_capacity,
  116. length, width, height, pack_num, pack_average_weight, keeper_ids, gluten_water_count,
  117. eat_score, unit_head, fat_index, peroxide_value, refraction_index, residual_solvent,
  118. filling_time, line_height, seal_status, auth_code, org_id, history_status
  119. </sql>
  120. <select id="selectByExample" parameterType="com.chinaitop.depot.intelligent.ventilation.model.StorageFoodbasicinfoExample" resultMap="BaseResultMap">
  121. select
  122. <if test="distinct">
  123. distinct
  124. </if>
  125. <include refid="Base_Column_List" />
  126. from storage_foodbasicinfo
  127. <if test="_parameter != null">
  128. <include refid="Example_Where_Clause" />
  129. </if>
  130. <if test="orderByClause != null">
  131. order by ${orderByClause}
  132. </if>
  133. </select>
  134. <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
  135. select
  136. <include refid="Base_Column_List" />
  137. from storage_foodbasicinfo
  138. where id = #{id,jdbcType=INTEGER}
  139. </select>
  140. <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
  141. delete from storage_foodbasicinfo
  142. where id = #{id,jdbcType=INTEGER}
  143. </delete>
  144. <delete id="deleteByExample" parameterType="com.chinaitop.depot.intelligent.ventilation.model.StorageFoodbasicinfoExample">
  145. delete from storage_foodbasicinfo
  146. <if test="_parameter != null">
  147. <include refid="Example_Where_Clause" />
  148. </if>
  149. </delete>
  150. <insert id="insert" parameterType="com.chinaitop.depot.intelligent.ventilation.model.StorageFoodbasicinfo">
  151. insert into storage_foodbasicinfo (id, house_id, warehouse_id,
  152. record_unite, keep_unite, location_num,
  153. quality, sub_type, sub_type_detailed,
  154. htype, number, stand_number,
  155. input_year, grow_year, keep_method,
  156. level, weight, impurity,
  157. water, unsound, recorder,
  158. house_type, design_house_capacity, valid_house_capacity,
  159. price, place_of_origin, storage_location,
  160. disperse_capacity, length, width,
  161. height, pack_num, pack_average_weight,
  162. keeper_ids, gluten_water_count, eat_score,
  163. unit_head, fat_index, peroxide_value,
  164. refraction_index, residual_solvent, filling_time,
  165. line_height, seal_status, auth_code,
  166. org_id, history_status)
  167. values (#{id,jdbcType=INTEGER}, #{houseId,jdbcType=INTEGER}, #{warehouseId,jdbcType=INTEGER},
  168. #{recordUnite,jdbcType=VARCHAR}, #{keepUnite,jdbcType=VARCHAR}, #{locationNum,jdbcType=VARCHAR},
  169. #{quality,jdbcType=VARCHAR}, #{subType,jdbcType=INTEGER}, #{subTypeDetailed,jdbcType=INTEGER},
  170. #{htype,jdbcType=VARCHAR}, #{number,jdbcType=DOUBLE}, #{standNumber,jdbcType=DOUBLE},
  171. #{inputYear,jdbcType=TIMESTAMP}, #{growYear,jdbcType=INTEGER}, #{keepMethod,jdbcType=VARCHAR},
  172. #{level,jdbcType=VARCHAR}, #{weight,jdbcType=VARCHAR}, #{impurity,jdbcType=VARCHAR},
  173. #{water,jdbcType=VARCHAR}, #{unsound,jdbcType=VARCHAR}, #{recorder,jdbcType=VARCHAR},
  174. #{houseType,jdbcType=VARCHAR}, #{designHouseCapacity,jdbcType=DECIMAL}, #{validHouseCapacity,jdbcType=VARCHAR},
  175. #{price,jdbcType=VARCHAR}, #{placeOfOrigin,jdbcType=VARCHAR}, #{storageLocation,jdbcType=VARCHAR},
  176. #{disperseCapacity,jdbcType=VARCHAR}, #{length,jdbcType=DECIMAL}, #{width,jdbcType=DECIMAL},
  177. #{height,jdbcType=DECIMAL}, #{packNum,jdbcType=VARCHAR}, #{packAverageWeight,jdbcType=VARCHAR},
  178. #{keeperIds,jdbcType=VARCHAR}, #{glutenWaterCount,jdbcType=VARCHAR}, #{eatScore,jdbcType=VARCHAR},
  179. #{unitHead,jdbcType=VARCHAR}, #{fatIndex,jdbcType=VARCHAR}, #{peroxideValue,jdbcType=VARCHAR},
  180. #{refractionIndex,jdbcType=VARCHAR}, #{residualSolvent,jdbcType=VARCHAR}, #{fillingTime,jdbcType=VARCHAR},
  181. #{lineHeight,jdbcType=DECIMAL}, #{sealStatus,jdbcType=VARCHAR}, #{authCode,jdbcType=VARCHAR},
  182. #{orgId,jdbcType=INTEGER}, #{historyStatus,jdbcType=INTEGER})
  183. </insert>
  184. <insert id="insertSelective" useGeneratedKeys="true" keyProperty="id" parameterType="com.chinaitop.depot.intelligent.ventilation.model.StorageFoodbasicinfo">
  185. insert into storage_foodbasicinfo
  186. <trim prefix="(" suffix=")" suffixOverrides=",">
  187. <if test="id != null">
  188. id,
  189. </if>
  190. <if test="houseId != null">
  191. house_id,
  192. </if>
  193. <if test="warehouseId != null">
  194. warehouse_id,
  195. </if>
  196. <if test="recordUnite != null">
  197. record_unite,
  198. </if>
  199. <if test="keepUnite != null">
  200. keep_unite,
  201. </if>
  202. <if test="locationNum != null">
  203. location_num,
  204. </if>
  205. <if test="quality != null">
  206. quality,
  207. </if>
  208. <if test="subType != null">
  209. sub_type,
  210. </if>
  211. <if test="subTypeDetailed != null">
  212. sub_type_detailed,
  213. </if>
  214. <if test="htype != null">
  215. htype,
  216. </if>
  217. <if test="number != null">
  218. number,
  219. </if>
  220. <if test="standNumber != null">
  221. stand_number,
  222. </if>
  223. <if test="inputYear != null">
  224. input_year,
  225. </if>
  226. <if test="growYear != null">
  227. grow_year,
  228. </if>
  229. <if test="keepMethod != null">
  230. keep_method,
  231. </if>
  232. <if test="level != null">
  233. level,
  234. </if>
  235. <if test="weight != null">
  236. weight,
  237. </if>
  238. <if test="impurity != null">
  239. impurity,
  240. </if>
  241. <if test="water != null">
  242. water,
  243. </if>
  244. <if test="unsound != null">
  245. unsound,
  246. </if>
  247. <if test="recorder != null">
  248. recorder,
  249. </if>
  250. <if test="houseType != null">
  251. house_type,
  252. </if>
  253. <if test="designHouseCapacity != null">
  254. design_house_capacity,
  255. </if>
  256. <if test="validHouseCapacity != null">
  257. valid_house_capacity,
  258. </if>
  259. <if test="price != null">
  260. price,
  261. </if>
  262. <if test="placeOfOrigin != null">
  263. place_of_origin,
  264. </if>
  265. <if test="storageLocation != null">
  266. storage_location,
  267. </if>
  268. <if test="disperseCapacity != null">
  269. disperse_capacity,
  270. </if>
  271. <if test="length != null">
  272. length,
  273. </if>
  274. <if test="width != null">
  275. width,
  276. </if>
  277. <if test="height != null">
  278. height,
  279. </if>
  280. <if test="packNum != null">
  281. pack_num,
  282. </if>
  283. <if test="packAverageWeight != null">
  284. pack_average_weight,
  285. </if>
  286. <if test="keeperIds != null">
  287. keeper_ids,
  288. </if>
  289. <if test="glutenWaterCount != null">
  290. gluten_water_count,
  291. </if>
  292. <if test="eatScore != null">
  293. eat_score,
  294. </if>
  295. <if test="unitHead != null">
  296. unit_head,
  297. </if>
  298. <if test="fatIndex != null">
  299. fat_index,
  300. </if>
  301. <if test="peroxideValue != null">
  302. peroxide_value,
  303. </if>
  304. <if test="refractionIndex != null">
  305. refraction_index,
  306. </if>
  307. <if test="residualSolvent != null">
  308. residual_solvent,
  309. </if>
  310. <if test="fillingTime != null">
  311. filling_time,
  312. </if>
  313. <if test="lineHeight != null">
  314. line_height,
  315. </if>
  316. <if test="sealStatus != null">
  317. seal_status,
  318. </if>
  319. <if test="authCode != null">
  320. auth_code,
  321. </if>
  322. <if test="orgId != null">
  323. org_id,
  324. </if>
  325. <if test="historyStatus != null">
  326. history_status,
  327. </if>
  328. </trim>
  329. <trim prefix="values (" suffix=")" suffixOverrides=",">
  330. <if test="id != null">
  331. #{id,jdbcType=INTEGER},
  332. </if>
  333. <if test="houseId != null">
  334. #{houseId,jdbcType=INTEGER},
  335. </if>
  336. <if test="warehouseId != null">
  337. #{warehouseId,jdbcType=INTEGER},
  338. </if>
  339. <if test="recordUnite != null">
  340. #{recordUnite,jdbcType=VARCHAR},
  341. </if>
  342. <if test="keepUnite != null">
  343. #{keepUnite,jdbcType=VARCHAR},
  344. </if>
  345. <if test="locationNum != null">
  346. #{locationNum,jdbcType=VARCHAR},
  347. </if>
  348. <if test="quality != null">
  349. #{quality,jdbcType=VARCHAR},
  350. </if>
  351. <if test="subType != null">
  352. #{subType,jdbcType=INTEGER},
  353. </if>
  354. <if test="subTypeDetailed != null">
  355. #{subTypeDetailed,jdbcType=INTEGER},
  356. </if>
  357. <if test="htype != null">
  358. #{htype,jdbcType=VARCHAR},
  359. </if>
  360. <if test="number != null">
  361. #{number,jdbcType=DOUBLE},
  362. </if>
  363. <if test="standNumber != null">
  364. #{standNumber,jdbcType=DOUBLE},
  365. </if>
  366. <if test="inputYear != null">
  367. #{inputYear,jdbcType=TIMESTAMP},
  368. </if>
  369. <if test="growYear != null">
  370. #{growYear,jdbcType=INTEGER},
  371. </if>
  372. <if test="keepMethod != null">
  373. #{keepMethod,jdbcType=VARCHAR},
  374. </if>
  375. <if test="level != null">
  376. #{level,jdbcType=VARCHAR},
  377. </if>
  378. <if test="weight != null">
  379. #{weight,jdbcType=VARCHAR},
  380. </if>
  381. <if test="impurity != null">
  382. #{impurity,jdbcType=VARCHAR},
  383. </if>
  384. <if test="water != null">
  385. #{water,jdbcType=VARCHAR},
  386. </if>
  387. <if test="unsound != null">
  388. #{unsound,jdbcType=VARCHAR},
  389. </if>
  390. <if test="recorder != null">
  391. #{recorder,jdbcType=VARCHAR},
  392. </if>
  393. <if test="houseType != null">
  394. #{houseType,jdbcType=VARCHAR},
  395. </if>
  396. <if test="designHouseCapacity != null">
  397. #{designHouseCapacity,jdbcType=DECIMAL},
  398. </if>
  399. <if test="validHouseCapacity != null">
  400. #{validHouseCapacity,jdbcType=VARCHAR},
  401. </if>
  402. <if test="price != null">
  403. #{price,jdbcType=VARCHAR},
  404. </if>
  405. <if test="placeOfOrigin != null">
  406. #{placeOfOrigin,jdbcType=VARCHAR},
  407. </if>
  408. <if test="storageLocation != null">
  409. #{storageLocation,jdbcType=VARCHAR},
  410. </if>
  411. <if test="disperseCapacity != null">
  412. #{disperseCapacity,jdbcType=VARCHAR},
  413. </if>
  414. <if test="length != null">
  415. #{length,jdbcType=DECIMAL},
  416. </if>
  417. <if test="width != null">
  418. #{width,jdbcType=DECIMAL},
  419. </if>
  420. <if test="height != null">
  421. #{height,jdbcType=DECIMAL},
  422. </if>
  423. <if test="packNum != null">
  424. #{packNum,jdbcType=VARCHAR},
  425. </if>
  426. <if test="packAverageWeight != null">
  427. #{packAverageWeight,jdbcType=VARCHAR},
  428. </if>
  429. <if test="keeperIds != null">
  430. #{keeperIds,jdbcType=VARCHAR},
  431. </if>
  432. <if test="glutenWaterCount != null">
  433. #{glutenWaterCount,jdbcType=VARCHAR},
  434. </if>
  435. <if test="eatScore != null">
  436. #{eatScore,jdbcType=VARCHAR},
  437. </if>
  438. <if test="unitHead != null">
  439. #{unitHead,jdbcType=VARCHAR},
  440. </if>
  441. <if test="fatIndex != null">
  442. #{fatIndex,jdbcType=VARCHAR},
  443. </if>
  444. <if test="peroxideValue != null">
  445. #{peroxideValue,jdbcType=VARCHAR},
  446. </if>
  447. <if test="refractionIndex != null">
  448. #{refractionIndex,jdbcType=VARCHAR},
  449. </if>
  450. <if test="residualSolvent != null">
  451. #{residualSolvent,jdbcType=VARCHAR},
  452. </if>
  453. <if test="fillingTime != null">
  454. #{fillingTime,jdbcType=VARCHAR},
  455. </if>
  456. <if test="lineHeight != null">
  457. #{lineHeight,jdbcType=DECIMAL},
  458. </if>
  459. <if test="sealStatus != null">
  460. #{sealStatus,jdbcType=VARCHAR},
  461. </if>
  462. <if test="authCode != null">
  463. #{authCode,jdbcType=VARCHAR},
  464. </if>
  465. <if test="orgId != null">
  466. #{orgId,jdbcType=INTEGER},
  467. </if>
  468. <if test="historyStatus != null">
  469. #{historyStatus,jdbcType=INTEGER},
  470. </if>
  471. </trim>
  472. </insert>
  473. <select id="countByExample" parameterType="com.chinaitop.depot.intelligent.ventilation.model.StorageFoodbasicinfoExample" resultType="java.lang.Integer">
  474. select count(*) from storage_foodbasicinfo
  475. <if test="_parameter != null">
  476. <include refid="Example_Where_Clause" />
  477. </if>
  478. </select>
  479. <update id="updateByExampleSelective" parameterType="map">
  480. update storage_foodbasicinfo
  481. <set>
  482. <if test="record.id != null">
  483. id = #{record.id,jdbcType=INTEGER},
  484. </if>
  485. <if test="record.houseId != null">
  486. house_id = #{record.houseId,jdbcType=INTEGER},
  487. </if>
  488. <if test="record.warehouseId != null">
  489. warehouse_id = #{record.warehouseId,jdbcType=INTEGER},
  490. </if>
  491. <if test="record.recordUnite != null">
  492. record_unite = #{record.recordUnite,jdbcType=VARCHAR},
  493. </if>
  494. <if test="record.keepUnite != null">
  495. keep_unite = #{record.keepUnite,jdbcType=VARCHAR},
  496. </if>
  497. <if test="record.locationNum != null">
  498. location_num = #{record.locationNum,jdbcType=VARCHAR},
  499. </if>
  500. <if test="record.quality != null">
  501. quality = #{record.quality,jdbcType=VARCHAR},
  502. </if>
  503. <if test="record.subType != null">
  504. sub_type = #{record.subType,jdbcType=INTEGER},
  505. </if>
  506. <if test="record.subTypeDetailed != null">
  507. sub_type_detailed = #{record.subTypeDetailed,jdbcType=INTEGER},
  508. </if>
  509. <if test="record.htype != null">
  510. htype = #{record.htype,jdbcType=VARCHAR},
  511. </if>
  512. <if test="record.number != null">
  513. number = #{record.number,jdbcType=DOUBLE},
  514. </if>
  515. <if test="record.standNumber != null">
  516. stand_number = #{record.standNumber,jdbcType=DOUBLE},
  517. </if>
  518. <if test="record.inputYear != null">
  519. input_year = #{record.inputYear,jdbcType=TIMESTAMP},
  520. </if>
  521. <if test="record.growYear != null">
  522. grow_year = #{record.growYear,jdbcType=INTEGER},
  523. </if>
  524. <if test="record.keepMethod != null">
  525. keep_method = #{record.keepMethod,jdbcType=VARCHAR},
  526. </if>
  527. <if test="record.level != null">
  528. level = #{record.level,jdbcType=VARCHAR},
  529. </if>
  530. <if test="record.weight != null">
  531. weight = #{record.weight,jdbcType=VARCHAR},
  532. </if>
  533. <if test="record.impurity != null">
  534. impurity = #{record.impurity,jdbcType=VARCHAR},
  535. </if>
  536. <if test="record.water != null">
  537. water = #{record.water,jdbcType=VARCHAR},
  538. </if>
  539. <if test="record.unsound != null">
  540. unsound = #{record.unsound,jdbcType=VARCHAR},
  541. </if>
  542. <if test="record.recorder != null">
  543. recorder = #{record.recorder,jdbcType=VARCHAR},
  544. </if>
  545. <if test="record.houseType != null">
  546. house_type = #{record.houseType,jdbcType=VARCHAR},
  547. </if>
  548. <if test="record.designHouseCapacity != null">
  549. design_house_capacity = #{record.designHouseCapacity,jdbcType=DECIMAL},
  550. </if>
  551. <if test="record.validHouseCapacity != null">
  552. valid_house_capacity = #{record.validHouseCapacity,jdbcType=VARCHAR},
  553. </if>
  554. <if test="record.price != null">
  555. price = #{record.price,jdbcType=VARCHAR},
  556. </if>
  557. <if test="record.placeOfOrigin != null">
  558. place_of_origin = #{record.placeOfOrigin,jdbcType=VARCHAR},
  559. </if>
  560. <if test="record.storageLocation != null">
  561. storage_location = #{record.storageLocation,jdbcType=VARCHAR},
  562. </if>
  563. <if test="record.disperseCapacity != null">
  564. disperse_capacity = #{record.disperseCapacity,jdbcType=VARCHAR},
  565. </if>
  566. <if test="record.length != null">
  567. length = #{record.length,jdbcType=DECIMAL},
  568. </if>
  569. <if test="record.width != null">
  570. width = #{record.width,jdbcType=DECIMAL},
  571. </if>
  572. <if test="record.height != null">
  573. height = #{record.height,jdbcType=DECIMAL},
  574. </if>
  575. <if test="record.packNum != null">
  576. pack_num = #{record.packNum,jdbcType=VARCHAR},
  577. </if>
  578. <if test="record.packAverageWeight != null">
  579. pack_average_weight = #{record.packAverageWeight,jdbcType=VARCHAR},
  580. </if>
  581. <if test="record.keeperIds != null">
  582. keeper_ids = #{record.keeperIds,jdbcType=VARCHAR},
  583. </if>
  584. <if test="record.glutenWaterCount != null">
  585. gluten_water_count = #{record.glutenWaterCount,jdbcType=VARCHAR},
  586. </if>
  587. <if test="record.eatScore != null">
  588. eat_score = #{record.eatScore,jdbcType=VARCHAR},
  589. </if>
  590. <if test="record.unitHead != null">
  591. unit_head = #{record.unitHead,jdbcType=VARCHAR},
  592. </if>
  593. <if test="record.fatIndex != null">
  594. fat_index = #{record.fatIndex,jdbcType=VARCHAR},
  595. </if>
  596. <if test="record.peroxideValue != null">
  597. peroxide_value = #{record.peroxideValue,jdbcType=VARCHAR},
  598. </if>
  599. <if test="record.refractionIndex != null">
  600. refraction_index = #{record.refractionIndex,jdbcType=VARCHAR},
  601. </if>
  602. <if test="record.residualSolvent != null">
  603. residual_solvent = #{record.residualSolvent,jdbcType=VARCHAR},
  604. </if>
  605. <if test="record.fillingTime != null">
  606. filling_time = #{record.fillingTime,jdbcType=VARCHAR},
  607. </if>
  608. <if test="record.lineHeight != null">
  609. line_height = #{record.lineHeight,jdbcType=DECIMAL},
  610. </if>
  611. <if test="record.sealStatus != null">
  612. seal_status = #{record.sealStatus,jdbcType=VARCHAR},
  613. </if>
  614. <if test="record.authCode != null">
  615. auth_code = #{record.authCode,jdbcType=VARCHAR},
  616. </if>
  617. <if test="record.orgId != null">
  618. org_id = #{record.orgId,jdbcType=INTEGER},
  619. </if>
  620. <if test="record.historyStatus != null">
  621. history_status = #{record.historyStatus,jdbcType=INTEGER},
  622. </if>
  623. </set>
  624. <if test="_parameter != null">
  625. <include refid="Update_By_Example_Where_Clause" />
  626. </if>
  627. </update>
  628. <update id="updateByExample" parameterType="map">
  629. update storage_foodbasicinfo
  630. set id = #{record.id,jdbcType=INTEGER},
  631. house_id = #{record.houseId,jdbcType=INTEGER},
  632. warehouse_id = #{record.warehouseId,jdbcType=INTEGER},
  633. record_unite = #{record.recordUnite,jdbcType=VARCHAR},
  634. keep_unite = #{record.keepUnite,jdbcType=VARCHAR},
  635. location_num = #{record.locationNum,jdbcType=VARCHAR},
  636. quality = #{record.quality,jdbcType=VARCHAR},
  637. sub_type = #{record.subType,jdbcType=INTEGER},
  638. sub_type_detailed = #{record.subTypeDetailed,jdbcType=INTEGER},
  639. htype = #{record.htype,jdbcType=VARCHAR},
  640. number = #{record.number,jdbcType=DOUBLE},
  641. stand_number = #{record.standNumber,jdbcType=DOUBLE},
  642. input_year = #{record.inputYear,jdbcType=TIMESTAMP},
  643. grow_year = #{record.growYear,jdbcType=INTEGER},
  644. keep_method = #{record.keepMethod,jdbcType=VARCHAR},
  645. level = #{record.level,jdbcType=VARCHAR},
  646. weight = #{record.weight,jdbcType=VARCHAR},
  647. impurity = #{record.impurity,jdbcType=VARCHAR},
  648. water = #{record.water,jdbcType=VARCHAR},
  649. unsound = #{record.unsound,jdbcType=VARCHAR},
  650. recorder = #{record.recorder,jdbcType=VARCHAR},
  651. house_type = #{record.houseType,jdbcType=VARCHAR},
  652. design_house_capacity = #{record.designHouseCapacity,jdbcType=DECIMAL},
  653. valid_house_capacity = #{record.validHouseCapacity,jdbcType=VARCHAR},
  654. price = #{record.price,jdbcType=VARCHAR},
  655. place_of_origin = #{record.placeOfOrigin,jdbcType=VARCHAR},
  656. storage_location = #{record.storageLocation,jdbcType=VARCHAR},
  657. disperse_capacity = #{record.disperseCapacity,jdbcType=VARCHAR},
  658. length = #{record.length,jdbcType=DECIMAL},
  659. width = #{record.width,jdbcType=DECIMAL},
  660. height = #{record.height,jdbcType=DECIMAL},
  661. pack_num = #{record.packNum,jdbcType=VARCHAR},
  662. pack_average_weight = #{record.packAverageWeight,jdbcType=VARCHAR},
  663. keeper_ids = #{record.keeperIds,jdbcType=VARCHAR},
  664. gluten_water_count = #{record.glutenWaterCount,jdbcType=VARCHAR},
  665. eat_score = #{record.eatScore,jdbcType=VARCHAR},
  666. unit_head = #{record.unitHead,jdbcType=VARCHAR},
  667. fat_index = #{record.fatIndex,jdbcType=VARCHAR},
  668. peroxide_value = #{record.peroxideValue,jdbcType=VARCHAR},
  669. refraction_index = #{record.refractionIndex,jdbcType=VARCHAR},
  670. residual_solvent = #{record.residualSolvent,jdbcType=VARCHAR},
  671. filling_time = #{record.fillingTime,jdbcType=VARCHAR},
  672. line_height = #{record.lineHeight,jdbcType=DECIMAL},
  673. seal_status = #{record.sealStatus,jdbcType=VARCHAR},
  674. auth_code = #{record.authCode,jdbcType=VARCHAR},
  675. org_id = #{record.orgId,jdbcType=INTEGER},
  676. history_status = #{record.historyStatus,jdbcType=INTEGER}
  677. <if test="_parameter != null">
  678. <include refid="Update_By_Example_Where_Clause" />
  679. </if>
  680. </update>
  681. <update id="updateByPrimaryKeySelective" parameterType="com.chinaitop.depot.intelligent.ventilation.model.StorageFoodbasicinfo">
  682. update storage_foodbasicinfo
  683. <set>
  684. <if test="houseId != null">
  685. house_id = #{houseId,jdbcType=INTEGER},
  686. </if>
  687. <if test="warehouseId != null">
  688. warehouse_id = #{warehouseId,jdbcType=INTEGER},
  689. </if>
  690. <if test="recordUnite != null">
  691. record_unite = #{recordUnite,jdbcType=VARCHAR},
  692. </if>
  693. <if test="keepUnite != null">
  694. keep_unite = #{keepUnite,jdbcType=VARCHAR},
  695. </if>
  696. <if test="locationNum != null">
  697. location_num = #{locationNum,jdbcType=VARCHAR},
  698. </if>
  699. <if test="quality != null">
  700. quality = #{quality,jdbcType=VARCHAR},
  701. </if>
  702. <if test="subType != null">
  703. sub_type = #{subType,jdbcType=INTEGER},
  704. </if>
  705. <if test="subTypeDetailed != null">
  706. sub_type_detailed = #{subTypeDetailed,jdbcType=INTEGER},
  707. </if>
  708. <if test="htype != null">
  709. htype = #{htype,jdbcType=VARCHAR},
  710. </if>
  711. <if test="number != null">
  712. number = #{number,jdbcType=DOUBLE},
  713. </if>
  714. <if test="standNumber != null">
  715. stand_number = #{standNumber,jdbcType=DOUBLE},
  716. </if>
  717. <if test="inputYear != null">
  718. input_year = #{inputYear,jdbcType=TIMESTAMP},
  719. </if>
  720. <if test="growYear != null">
  721. grow_year = #{growYear,jdbcType=INTEGER},
  722. </if>
  723. <if test="keepMethod != null">
  724. keep_method = #{keepMethod,jdbcType=VARCHAR},
  725. </if>
  726. <if test="level != null">
  727. level = #{level,jdbcType=VARCHAR},
  728. </if>
  729. <if test="weight != null">
  730. weight = #{weight,jdbcType=VARCHAR},
  731. </if>
  732. <if test="impurity != null">
  733. impurity = #{impurity,jdbcType=VARCHAR},
  734. </if>
  735. <if test="water != null">
  736. water = #{water,jdbcType=VARCHAR},
  737. </if>
  738. <if test="unsound != null">
  739. unsound = #{unsound,jdbcType=VARCHAR},
  740. </if>
  741. <if test="recorder != null">
  742. recorder = #{recorder,jdbcType=VARCHAR},
  743. </if>
  744. <if test="houseType != null">
  745. house_type = #{houseType,jdbcType=VARCHAR},
  746. </if>
  747. <if test="designHouseCapacity != null">
  748. design_house_capacity = #{designHouseCapacity,jdbcType=DECIMAL},
  749. </if>
  750. <if test="validHouseCapacity != null">
  751. valid_house_capacity = #{validHouseCapacity,jdbcType=VARCHAR},
  752. </if>
  753. <if test="price != null">
  754. price = #{price,jdbcType=VARCHAR},
  755. </if>
  756. <if test="placeOfOrigin != null">
  757. place_of_origin = #{placeOfOrigin,jdbcType=VARCHAR},
  758. </if>
  759. <if test="storageLocation != null">
  760. storage_location = #{storageLocation,jdbcType=VARCHAR},
  761. </if>
  762. <if test="disperseCapacity != null">
  763. disperse_capacity = #{disperseCapacity,jdbcType=VARCHAR},
  764. </if>
  765. <if test="length != null">
  766. length = #{length,jdbcType=DECIMAL},
  767. </if>
  768. <if test="width != null">
  769. width = #{width,jdbcType=DECIMAL},
  770. </if>
  771. <if test="height != null">
  772. height = #{height,jdbcType=DECIMAL},
  773. </if>
  774. <if test="packNum != null">
  775. pack_num = #{packNum,jdbcType=VARCHAR},
  776. </if>
  777. <if test="packAverageWeight != null">
  778. pack_average_weight = #{packAverageWeight,jdbcType=VARCHAR},
  779. </if>
  780. <if test="keeperIds != null">
  781. keeper_ids = #{keeperIds,jdbcType=VARCHAR},
  782. </if>
  783. <if test="glutenWaterCount != null">
  784. gluten_water_count = #{glutenWaterCount,jdbcType=VARCHAR},
  785. </if>
  786. <if test="eatScore != null">
  787. eat_score = #{eatScore,jdbcType=VARCHAR},
  788. </if>
  789. <if test="unitHead != null">
  790. unit_head = #{unitHead,jdbcType=VARCHAR},
  791. </if>
  792. <if test="fatIndex != null">
  793. fat_index = #{fatIndex,jdbcType=VARCHAR},
  794. </if>
  795. <if test="peroxideValue != null">
  796. peroxide_value = #{peroxideValue,jdbcType=VARCHAR},
  797. </if>
  798. <if test="refractionIndex != null">
  799. refraction_index = #{refractionIndex,jdbcType=VARCHAR},
  800. </if>
  801. <if test="residualSolvent != null">
  802. residual_solvent = #{residualSolvent,jdbcType=VARCHAR},
  803. </if>
  804. <if test="fillingTime != null">
  805. filling_time = #{fillingTime,jdbcType=VARCHAR},
  806. </if>
  807. <if test="lineHeight != null">
  808. line_height = #{lineHeight,jdbcType=DECIMAL},
  809. </if>
  810. <if test="sealStatus != null">
  811. seal_status = #{sealStatus,jdbcType=VARCHAR},
  812. </if>
  813. <if test="authCode != null">
  814. auth_code = #{authCode,jdbcType=VARCHAR},
  815. </if>
  816. <if test="orgId != null">
  817. org_id = #{orgId,jdbcType=INTEGER},
  818. </if>
  819. <if test="historyStatus != null">
  820. history_status = #{historyStatus,jdbcType=INTEGER},
  821. </if>
  822. </set>
  823. where id = #{id,jdbcType=INTEGER}
  824. </update>
  825. <update id="updateByPrimaryKey" parameterType="com.chinaitop.depot.intelligent.ventilation.model.StorageFoodbasicinfo">
  826. update storage_foodbasicinfo
  827. set house_id = #{houseId,jdbcType=INTEGER},
  828. warehouse_id = #{warehouseId,jdbcType=INTEGER},
  829. record_unite = #{recordUnite,jdbcType=VARCHAR},
  830. keep_unite = #{keepUnite,jdbcType=VARCHAR},
  831. location_num = #{locationNum,jdbcType=VARCHAR},
  832. quality = #{quality,jdbcType=VARCHAR},
  833. sub_type = #{subType,jdbcType=INTEGER},
  834. sub_type_detailed = #{subTypeDetailed,jdbcType=INTEGER},
  835. htype = #{htype,jdbcType=VARCHAR},
  836. number = #{number,jdbcType=DOUBLE},
  837. stand_number = #{standNumber,jdbcType=DOUBLE},
  838. input_year = #{inputYear,jdbcType=TIMESTAMP},
  839. grow_year = #{growYear,jdbcType=INTEGER},
  840. keep_method = #{keepMethod,jdbcType=VARCHAR},
  841. level = #{level,jdbcType=VARCHAR},
  842. weight = #{weight,jdbcType=VARCHAR},
  843. impurity = #{impurity,jdbcType=VARCHAR},
  844. water = #{water,jdbcType=VARCHAR},
  845. unsound = #{unsound,jdbcType=VARCHAR},
  846. recorder = #{recorder,jdbcType=VARCHAR},
  847. house_type = #{houseType,jdbcType=VARCHAR},
  848. design_house_capacity = #{designHouseCapacity,jdbcType=DECIMAL},
  849. valid_house_capacity = #{validHouseCapacity,jdbcType=VARCHAR},
  850. price = #{price,jdbcType=VARCHAR},
  851. place_of_origin = #{placeOfOrigin,jdbcType=VARCHAR},
  852. storage_location = #{storageLocation,jdbcType=VARCHAR},
  853. disperse_capacity = #{disperseCapacity,jdbcType=VARCHAR},
  854. length = #{length,jdbcType=DECIMAL},
  855. width = #{width,jdbcType=DECIMAL},
  856. height = #{height,jdbcType=DECIMAL},
  857. pack_num = #{packNum,jdbcType=VARCHAR},
  858. pack_average_weight = #{packAverageWeight,jdbcType=VARCHAR},
  859. keeper_ids = #{keeperIds,jdbcType=VARCHAR},
  860. gluten_water_count = #{glutenWaterCount,jdbcType=VARCHAR},
  861. eat_score = #{eatScore,jdbcType=VARCHAR},
  862. unit_head = #{unitHead,jdbcType=VARCHAR},
  863. fat_index = #{fatIndex,jdbcType=VARCHAR},
  864. peroxide_value = #{peroxideValue,jdbcType=VARCHAR},
  865. refraction_index = #{refractionIndex,jdbcType=VARCHAR},
  866. residual_solvent = #{residualSolvent,jdbcType=VARCHAR},
  867. filling_time = #{fillingTime,jdbcType=VARCHAR},
  868. line_height = #{lineHeight,jdbcType=DECIMAL},
  869. seal_status = #{sealStatus,jdbcType=VARCHAR},
  870. auth_code = #{authCode,jdbcType=VARCHAR},
  871. org_id = #{orgId,jdbcType=INTEGER},
  872. history_status = #{historyStatus,jdbcType=INTEGER}
  873. where id = #{id,jdbcType=INTEGER}
  874. </update>
  875. <select id="getFoodbasicInfoByHouseIdAndWarehouseId" resultMap="BaseResultMap">
  876. SELECT
  877. sf.id,
  878. sf.record_unite,
  879. sf.filling_time,
  880. sf.keep_unite,
  881. sf.price,
  882. sf.storage_location,
  883. sf.keep_method,
  884. sf.disperse_capacity,
  885. sf.height,
  886. sf.pack_num,
  887. sf.pack_average_weight,
  888. sf.keeper_ids,
  889. sf.auth_code,
  890. sf.grow_year,
  891. sf.place_of_origin,
  892. <!-- #bs.storehouse_id,-->
  893. bs.storehouse_code storehouseCode,
  894. bs.storehouse_type house_type,
  895. bs.design_capacity design_house_capacity,
  896. bs.length,
  897. bs.width,
  898. bs.storeHouse_name storehouseName,
  899. bw.warehouse_name wareHouseName,
  900. <!--bs.depot_name keep_unite,-->
  901. bw.warehouse_code warehouseCode,
  902. <!--#bw.warehouse_name,-->
  903. <!-- #bw.warehouse_id,-->
  904. temp_sqk.water,
  905. temp_sqk.impurity,
  906. temp_sqk.badpart unsound,
  907. temp_sqk.capacity weight,
  908. temp_sqk. LEVEL,
  909. temp_sqk.input_time input_year,
  910. temp_sqk.gluten_water_count,
  911. temp_sqk.eat_score,
  912. temp_sqk.fat_index,
  913. temp_fcbgz.hwxz quality,
  914. temp_fcbgz.pz sub_type,
  915. temp_fcbgz.mxpz sub_type_detailed,
  916. temp_fcbgz.kcsl number,
  917. temp_fcbgz.kcsl * 0.001 stand_number,
  918. temp_fcbgz.hwcd,
  919. temp_fcbgz.scnf
  920. FROM
  921. storage_foodbasicinfo sf
  922. LEFT JOIN basic_warehouse bw ON bw.storehouse_id = sf.house_id
  923. AND sf.warehouse_id = bw.warehouse_id
  924. LEFT JOIN (
  925. SELECT
  926. *
  927. FROM
  928. storage_qualitycheck sqk
  929. WHERE 1=1
  930. <if test="houseId != null">
  931. AND sqk.house_id = #{houseId}
  932. </if>
  933. <if test="warehouseId != null">
  934. AND sqk.warehouse_id = #{warehouseId}
  935. </if>
  936. AND sqk.type = 1
  937. AND sqk.history_status = 0
  938. ORDER BY
  939. id DESC
  940. LIMIT 1
  941. ) temp_sqk ON sf.house_id = temp_sqk.house_id
  942. AND sf.warehouse_id = temp_sqk.warehouse_id
  943. LEFT JOIN basic_storehouse bs ON bs.storehouse_id = sf.house_id
  944. LEFT JOIN (
  945. SELECT
  946. *
  947. FROM
  948. lsreport_ts.data_kcgl_fcbgz_default fcbgz
  949. WHERE 1=1
  950. <if test="houseId != null">
  951. AND fcbgz.ch = #{houseId}
  952. </if>
  953. <if test="warehouseId != null">
  954. AND fcbgz.hwh = #{warehouseId}
  955. </if>
  956. ORDER BY
  957. rq DESC
  958. LIMIT 1
  959. ) temp_fcbgz ON sf.house_id = temp_fcbgz.ch
  960. AND sf.warehouse_id = temp_fcbgz.hwh
  961. WHERE 1=1
  962. <if test="houseId != null">
  963. AND sf.house_id = #{houseId}
  964. </if>
  965. <if test="warehouseId != null">
  966. AND sf.warehouse_id = #{warehouseId}
  967. </if>
  968. AND sf.warehouse_id
  969. AND sf.history_status = 0
  970. ORDER BY
  971. sf.id DESC
  972. LIMIT 1
  973. </select>
  974. <sql id="ExtBase_Column_List">
  975. sfo.id, sfo.house_id, sfo.warehouse_id, sfo.record_unite, sfo.keep_unite, sfo.location_num, sfo.quality, sfo.sub_type,
  976. sfo.sub_type_detailed, sfo.htype, sfo.number, sfo.stand_number, sfo.input_year, sfo.grow_year, sfo.keep_method,
  977. sfo.level, sfo.weight, sfo.impurity, sfo.water, sfo.unsound, sfo.recorder, sfo.house_type, sfo.design_house_capacity,
  978. sfo.valid_house_capacity, sfo.price, sfo.place_of_origin, sfo.storage_location, sfo.disperse_capacity,
  979. sfo.length, sfo.width, sfo.height, sfo.pack_num, sfo.pack_average_weight, sfo.keeper_ids, sfo.gluten_water_count,
  980. sfo.eat_score, sfo.unit_head, sfo.fat_index, sfo.peroxide_value, sfo.refraction_index, sfo.residual_solvent,
  981. sfo.filling_time, sfo.line_height, sfo.seal_status, sfo.auth_code, sfo.org_id, sfo.history_status
  982. </sql>
  983. <select id="queryByExample" parameterType="com.chinaitop.depot.intelligent.ventilation.model.StorageFoodbasicinfoExample" resultMap="BaseResultMap">
  984. select
  985. <include refid="ExtBase_Column_List" />,
  986. bs.storeHouse_name storehouseName,bw.warehouse_name wareHouseName
  987. FROM storage_foodbasicinfo sfo
  988. LEFT JOIN basic_storehouse bs on bs.storehouse_id = sfo.house_id
  989. LEFT JOIN basic_warehouse bw on bw.warehouse_id = sfo.warehouse_id
  990. <where>
  991. <if test="houseId != null">
  992. and sfo.house_id = #{houseId}
  993. </if>
  994. <if test="warehouseId != null">
  995. and sfo.warehouse_id = #{warehouseId}
  996. </if>
  997. <if test="historyStatus != null">
  998. and sfo.history_status = #{historyStatus}
  999. </if>
  1000. </where>
  1001. order by sfo.id desc
  1002. </select>
  1003. </mapper>