BusinessAgentQualityMapper.xml 83 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126
  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.agent.quality.mapper.BusinessAgentQualityMapper" >
  4. <resultMap id="BaseResultMap" type="com.chinaitop.depot.agent.quality.model.BusinessAgentQuality" >
  5. <id column="id" property="id" jdbcType="INTEGER" />
  6. <result column="agent_id" property="agentId" jdbcType="INTEGER" />
  7. <result column="agent_depot_id" property="agentDepotId" jdbcType="INTEGER" />
  8. <result column="storehouse_id" property="storehouseId" jdbcType="INTEGER" />
  9. <result column="warehouse_id" property="warehouseId" jdbcType="INTEGER" />
  10. <result column="type" property="type" jdbcType="VARCHAR" />
  11. <result column="sub_type" property="subType" jdbcType="INTEGER" />
  12. <result column="sub_type_detailed" property="subTypeDetailed" jdbcType="INTEGER" />
  13. <result column="check_time" property="checkTime" jdbcType="TIMESTAMP" />
  14. <result column="check_result" property="checkResult" jdbcType="VARCHAR" />
  15. <result column="checker" property="checker" jdbcType="VARCHAR" />
  16. <result column="level" property="level" jdbcType="INTEGER" />
  17. <result column="capacity" property="capacity" jdbcType="VARCHAR" />
  18. <result column="water" property="water" jdbcType="VARCHAR" />
  19. <result column="impurity" property="impurity" jdbcType="VARCHAR" />
  20. <result column="mineral" property="mineral" jdbcType="VARCHAR" />
  21. <result column="badpart" property="badpart" jdbcType="VARCHAR" />
  22. <result column="colorsmell" property="colorsmell" jdbcType="VARCHAR" />
  23. <result column="keeper_advices" property="keeperAdvices" jdbcType="VARCHAR" />
  24. <result column="keeper_advices_time" property="keeperAdvicesTime" jdbcType="VARCHAR" />
  25. <result column="keeper_advices_paint" property="keeperAdvicesPaint" jdbcType="VARCHAR" />
  26. <result column="chief_advices" property="chiefAdvices" jdbcType="VARCHAR" />
  27. <result column="chief_advices_time" property="chiefAdvicesTime" jdbcType="TIMESTAMP" />
  28. <result column="chiet_advices_paint" property="chietAdvicesPaint" jdbcType="VARCHAR" />
  29. <result column="vice_manager_advices" property="viceManagerAdvices" jdbcType="VARCHAR" />
  30. <result column="vice_manager_advices_time" property="viceManagerAdvicesTime" jdbcType="TIMESTAMP" />
  31. <result column="vice_manager_advices_paint" property="viceManagerAdvicesPaint" jdbcType="VARCHAR" />
  32. <result column="manager_advices" property="managerAdvices" jdbcType="VARCHAR" />
  33. <result column="manager_advices_time" property="managerAdvicesTime" jdbcType="TIMESTAMP" />
  34. <result column="manager_advices_paint" property="managerAdvicesPaint" jdbcType="VARCHAR" />
  35. <result column="improve_result" property="improveResult" jdbcType="VARCHAR" />
  36. <result column="improve_time" property="improveTime" jdbcType="TIMESTAMP" />
  37. <result column="improve_paint" property="improvePaint" jdbcType="VARCHAR" />
  38. <result column="is_firstchecklevel_right" property="isFirstchecklevelRight" jdbcType="VARCHAR" />
  39. <result column="accept_unite" property="acceptUnite" jdbcType="VARCHAR" />
  40. <result column="input_time" property="inputTime" jdbcType="TIMESTAMP" />
  41. <result column="number" property="number" jdbcType="VARCHAR" />
  42. <result column="location" property="location" jdbcType="VARCHAR" />
  43. <result column="keeper" property="keeper" jdbcType="VARCHAR" />
  44. <result column="harvest_time" property="harvestTime" jdbcType="INTEGER" />
  45. <result column="goodpart" property="goodpart" jdbcType="VARCHAR" />
  46. <result column="chooser" property="chooser" jdbcType="VARCHAR" />
  47. <result column="choose_time" property="chooseTime" jdbcType="TIMESTAMP" />
  48. <result column="boldfat_index" property="boldfatIndex" jdbcType="VARCHAR" />
  49. <result column="check_type" property="checkType" jdbcType="VARCHAR" />
  50. <result column="hot_damage" property="hotDamage" jdbcType="VARCHAR" />
  51. <result column="protein_solution_ratio" property="proteinSolutionRatio" jdbcType="VARCHAR" />
  52. <result column="eat_score" property="eatScore" jdbcType="VARCHAR" />
  53. <result column="fat_index" property="fatIndex" jdbcType="VARCHAR" />
  54. <result column="husked_ration" property="huskedRation" jdbcType="VARCHAR" />
  55. <result column="full_good_ration" property="fullGoodRation" jdbcType="VARCHAR" />
  56. <result column="yellow_part" property="yellowPart" jdbcType="VARCHAR" />
  57. <result column="out_husked_ration" property="outHuskedRation" jdbcType="VARCHAR" />
  58. <result column="pests" property="pests" jdbcType="VARCHAR" />
  59. <result column="color_ratio" property="colorRatio" jdbcType="VARCHAR" />
  60. <result column="hard_index" property="hardIndex" jdbcType="VARCHAR" />
  61. <result column="gluten_water_count" property="glutenWaterCount" jdbcType="VARCHAR" />
  62. <result column="remarks" property="remarks" jdbcType="VARCHAR" />
  63. <result column="approver" property="approver" jdbcType="VARCHAR" />
  64. <result column="mildew_count" property="mildewCount" jdbcType="VARCHAR" />
  65. <result column="damage_ratio" property="damageRatio" jdbcType="VARCHAR" />
  66. <result column="hot_damage_ratio" property="hotDamageRatio" jdbcType="VARCHAR" />
  67. <result column="husked_rice_weight" property="huskedRiceWeight" jdbcType="VARCHAR" />
  68. <result column="reviewer" property="reviewer" jdbcType="VARCHAR" />
  69. <result column="apply_check_time" property="applyCheckTime" jdbcType="TIMESTAMP" />
  70. <result column="check_time_type" property="checkTimeType" jdbcType="VARCHAR" />
  71. <result column="check_result_time" property="checkResultTime" jdbcType="TIMESTAMP" />
  72. <result column="store_quality" property="storeQuality" jdbcType="VARCHAR" />
  73. <result column="is_pest" property="isPest" jdbcType="VARCHAR" />
  74. <result column="inspection_standard_basis" property="inspectionStandardBasis" jdbcType="VARCHAR" />
  75. <result column="quality" property="quality" jdbcType="VARCHAR" />
  76. <result column="seal_date" property="sealDate" jdbcType="TIMESTAMP" />
  77. <result column="seal_status" property="sealStatus" jdbcType="VARCHAR" />
  78. <result column="auth_code" property="authCode" jdbcType="VARCHAR" />
  79. <result column="org_id" property="orgId" jdbcType="INTEGER" />
  80. <result column="history_status" property="historyStatus" jdbcType="INTEGER" />
  81. <result column="intermixing_rate" property="intermixingRate" jdbcType="VARCHAR" />
  82. <result column="smelltaste" property="smelltaste" jdbcType="VARCHAR" />
  83. <result column="transparency" property="transparency" jdbcType="VARCHAR" />
  84. <result column="peroxide_value" property="peroxideValue" jdbcType="VARCHAR" />
  85. <result column="smoke_point" property="smokePoint" jdbcType="VARCHAR" />
  86. <result column="reeze_test" property="reezeTest" jdbcType="VARCHAR" />
  87. <result column="residual_solvent" property="residualSolvent" jdbcType="VARCHAR" />
  88. <result column="lead" property="lead" jdbcType="VARCHAR" />
  89. <result column="total_arsenic" property="totalArsenic" jdbcType="VARCHAR" />
  90. <result column="aflatoxin" property="aflatoxin" jdbcType="VARCHAR" />
  91. <result column="butyl_phenol" property="butylPhenol" jdbcType="VARCHAR" />
  92. <result column="updatetime" property="updatetime" jdbcType="TIMESTAMP" />
  93. <result column="zblb" property="zblb" jdbcType="VARCHAR" />
  94. <result column="qydbh" property="qydbh" jdbcType="VARCHAR" />
  95. <result column="qysj" property="qysj" jdbcType="TIMESTAMP" />
  96. <result column="qyqy" property="qyqy" jdbcType="VARCHAR" />
  97. <result column="jdrxm" property="jdrxm" jdbcType="VARCHAR" />
  98. <result column="ypbh" property="ypbh" jdbcType="VARCHAR" />
  99. <result column="sfzcccnx" property="sfzcccnx" jdbcType="VARCHAR" />
  100. <result column="jylb" property="jylb" jdbcType="VARCHAR" />
  101. <result column="qfrq" property="qfrq" jdbcType="TIMESTAMP" />
  102. <result column="ypsl" property="ypsl" jdbcType="VARCHAR" />
  103. <result column="dbsl" property="dbsl" jdbcType="VARCHAR" />
  104. <result column="ypdj" property="ypdj" jdbcType="VARCHAR" />
  105. </resultMap>
  106. <sql id="Example_Where_Clause" >
  107. <where >
  108. <foreach collection="oredCriteria" item="criteria" separator="or" >
  109. <if test="criteria.valid" >
  110. <trim prefix="(" suffix=")" prefixOverrides="and" >
  111. <foreach collection="criteria.criteria" item="criterion" >
  112. <choose >
  113. <when test="criterion.noValue" >
  114. and ${criterion.condition}
  115. </when>
  116. <when test="criterion.singleValue" >
  117. and ${criterion.condition} #{criterion.value}
  118. </when>
  119. <when test="criterion.betweenValue" >
  120. and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
  121. </when>
  122. <when test="criterion.listValue" >
  123. and ${criterion.condition}
  124. <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
  125. #{listItem}
  126. </foreach>
  127. </when>
  128. </choose>
  129. </foreach>
  130. </trim>
  131. </if>
  132. </foreach>
  133. </where>
  134. </sql>
  135. <sql id="Update_By_Example_Where_Clause" >
  136. <where >
  137. <foreach collection="example.oredCriteria" item="criteria" separator="or" >
  138. <if test="criteria.valid" >
  139. <trim prefix="(" suffix=")" prefixOverrides="and" >
  140. <foreach collection="criteria.criteria" item="criterion" >
  141. <choose >
  142. <when test="criterion.noValue" >
  143. and ${criterion.condition}
  144. </when>
  145. <when test="criterion.singleValue" >
  146. and ${criterion.condition} #{criterion.value}
  147. </when>
  148. <when test="criterion.betweenValue" >
  149. and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
  150. </when>
  151. <when test="criterion.listValue" >
  152. and ${criterion.condition}
  153. <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
  154. #{listItem}
  155. </foreach>
  156. </when>
  157. </choose>
  158. </foreach>
  159. </trim>
  160. </if>
  161. </foreach>
  162. </where>
  163. </sql>
  164. <sql id="Base_Column_List" >
  165. id, agent_id, agent_depot_id, storehouse_id, warehouse_id, type, sub_type, sub_type_detailed,
  166. check_time, check_result,checker, level, capacity, water, impurity, mineral, badpart, colorsmell,
  167. keeper_advices, keeper_advices_time, keeper_advices_paint, chief_advices, chief_advices_time,
  168. chiet_advices_paint, vice_manager_advices, vice_manager_advices_time, vice_manager_advices_paint,
  169. manager_advices, manager_advices_time, manager_advices_paint, improve_result, improve_time,
  170. improve_paint, is_firstchecklevel_right, accept_unite, input_time, number, location,
  171. keeper, harvest_time, goodpart, chooser, choose_time, boldfat_index, check_type,
  172. hot_damage, protein_solution_ratio, eat_score, fat_index, husked_ration, full_good_ration,
  173. yellow_part, out_husked_ration, pests, color_ratio, hard_index, gluten_water_count,
  174. remarks, approver, mildew_count, damage_ratio, hot_damage_ratio, husked_rice_weight,
  175. reviewer, apply_check_time, check_time_type, check_result_time, store_quality, is_pest,
  176. inspection_standard_basis, quality, seal_date, seal_status, auth_code, org_id, history_status,
  177. intermixing_rate, smelltaste, transparency, peroxide_value, smoke_point, reeze_test,
  178. residual_solvent, lead, total_arsenic, aflatoxin, butyl_phenol, updatetime, zblb, qydbh, qysj, qyqy, jdrxm, ypbh, sfzcccnx, flag_type,
  179. jylb,qfrq,ypsl,dbsl,ypdj
  180. </sql>
  181. <select id="selectByExample" resultMap="BaseResultMap" parameterType="com.chinaitop.depot.agent.quality.model.BusinessAgentQualityExample" >
  182. select
  183. <if test="distinct" >
  184. distinct
  185. </if>
  186. <include refid="Base_Column_List" />
  187. from business_agent_quality
  188. <if test="_parameter != null" >
  189. <include refid="Example_Where_Clause" />
  190. </if>
  191. <if test="orderByClause != null" >
  192. order by ${orderByClause}
  193. </if>
  194. </select>
  195. <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
  196. select
  197. <include refid="Base_Column_List" />
  198. from business_agent_quality
  199. where id = #{id,jdbcType=INTEGER}
  200. </select>
  201. <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
  202. delete from business_agent_quality
  203. where id = #{id,jdbcType=INTEGER}
  204. </delete>
  205. <delete id="deleteByExample" parameterType="com.chinaitop.depot.agent.quality.model.BusinessAgentQualityExample" >
  206. delete from business_agent_quality
  207. <if test="_parameter != null" >
  208. <include refid="Example_Where_Clause" />
  209. </if>
  210. </delete>
  211. <insert id="insert" useGeneratedKeys="true" keyProperty="id" parameterType="com.chinaitop.depot.agent.quality.model.BusinessAgentQuality" >
  212. insert into business_agent_quality (id, agent_id, agent_depot_id,
  213. storehouse_id, warehouse_id, type,
  214. sub_type, sub_type_detailed, check_time,
  215. check_result,checker, level, capacity,
  216. water, impurity, mineral,
  217. badpart, colorsmell, keeper_advices,
  218. keeper_advices_time, keeper_advices_paint,
  219. chief_advices, chief_advices_time, chiet_advices_paint,
  220. vice_manager_advices, vice_manager_advices_time,
  221. vice_manager_advices_paint, manager_advices,
  222. manager_advices_time, manager_advices_paint,
  223. improve_result, improve_time, improve_paint,
  224. is_firstchecklevel_right, accept_unite, input_time,
  225. number, location, keeper,
  226. harvest_time, goodpart, chooser,
  227. choose_time, boldfat_index, check_type,
  228. hot_damage, protein_solution_ratio, eat_score,
  229. fat_index, husked_ration, full_good_ration,
  230. yellow_part, out_husked_ration, pests,
  231. color_ratio, hard_index, gluten_water_count,
  232. remarks, approver, mildew_count,
  233. damage_ratio, hot_damage_ratio, husked_rice_weight,
  234. reviewer, apply_check_time, check_time_type,
  235. check_result_time, store_quality, is_pest,
  236. inspection_standard_basis, quality, seal_date,
  237. seal_status, auth_code, org_id,
  238. history_status, intermixing_rate, smelltaste,
  239. transparency, peroxide_value, smoke_point,
  240. reeze_test, residual_solvent, lead,
  241. total_arsenic, aflatoxin, butyl_phenol,
  242. updatetime, zblb, qydbh,
  243. qysj, qyqy, jdrxm,
  244. jylb,qfrq,ypsl,dbsl,ypdj,
  245. ypbh, sfzcccnx)
  246. values (#{id,jdbcType=INTEGER}, #{agentId,jdbcType=INTEGER}, #{agentDepotId,jdbcType=INTEGER},
  247. #{storehouseId,jdbcType=INTEGER}, #{warehouseId,jdbcType=INTEGER}, #{type,jdbcType=VARCHAR},
  248. #{subType,jdbcType=INTEGER}, #{subTypeDetailed,jdbcType=INTEGER}, #{checkTime,jdbcType=TIMESTAMP},
  249. #{checkResult,jdbcType=VARCHAR},#{checker,jdbcType=VARCHAR}, #{level,jdbcType=INTEGER}, #{capacity,jdbcType=VARCHAR},
  250. #{water,jdbcType=VARCHAR}, #{impurity,jdbcType=VARCHAR}, #{mineral,jdbcType=VARCHAR},
  251. #{badpart,jdbcType=VARCHAR}, #{colorsmell,jdbcType=VARCHAR}, #{keeperAdvices,jdbcType=VARCHAR},
  252. #{keeperAdvicesTime,jdbcType=VARCHAR}, #{keeperAdvicesPaint,jdbcType=VARCHAR},
  253. #{chiefAdvices,jdbcType=VARCHAR}, #{chiefAdvicesTime,jdbcType=TIMESTAMP}, #{chietAdvicesPaint,jdbcType=VARCHAR},
  254. #{viceManagerAdvices,jdbcType=VARCHAR}, #{viceManagerAdvicesTime,jdbcType=TIMESTAMP},
  255. #{viceManagerAdvicesPaint,jdbcType=VARCHAR}, #{managerAdvices,jdbcType=VARCHAR},
  256. #{managerAdvicesTime,jdbcType=TIMESTAMP}, #{managerAdvicesPaint,jdbcType=VARCHAR},
  257. #{improveResult,jdbcType=VARCHAR}, #{improveTime,jdbcType=TIMESTAMP}, #{improvePaint,jdbcType=VARCHAR},
  258. #{isFirstchecklevelRight,jdbcType=VARCHAR}, #{acceptUnite,jdbcType=VARCHAR}, #{inputTime,jdbcType=TIMESTAMP},
  259. #{number,jdbcType=VARCHAR}, #{location,jdbcType=VARCHAR}, #{keeper,jdbcType=VARCHAR},
  260. #{harvestTime,jdbcType=INTEGER}, #{goodpart,jdbcType=VARCHAR}, #{chooser,jdbcType=VARCHAR},
  261. #{chooseTime,jdbcType=TIMESTAMP}, #{boldfatIndex,jdbcType=VARCHAR}, #{checkType,jdbcType=VARCHAR},
  262. #{hotDamage,jdbcType=VARCHAR}, #{proteinSolutionRatio,jdbcType=VARCHAR}, #{eatScore,jdbcType=VARCHAR},
  263. #{fatIndex,jdbcType=VARCHAR}, #{huskedRation,jdbcType=VARCHAR}, #{fullGoodRation,jdbcType=VARCHAR},
  264. #{yellowPart,jdbcType=VARCHAR}, #{outHuskedRation,jdbcType=VARCHAR}, #{pests,jdbcType=VARCHAR},
  265. #{colorRatio,jdbcType=VARCHAR}, #{hardIndex,jdbcType=VARCHAR}, #{glutenWaterCount,jdbcType=VARCHAR},
  266. #{remarks,jdbcType=VARCHAR}, #{approver,jdbcType=VARCHAR}, #{mildewCount,jdbcType=VARCHAR},
  267. #{damageRatio,jdbcType=VARCHAR}, #{hotDamageRatio,jdbcType=VARCHAR}, #{huskedRiceWeight,jdbcType=VARCHAR},
  268. #{reviewer,jdbcType=VARCHAR}, #{applyCheckTime,jdbcType=TIMESTAMP}, #{checkTimeType,jdbcType=VARCHAR},
  269. #{checkResultTime,jdbcType=TIMESTAMP}, #{storeQuality,jdbcType=VARCHAR}, #{isPest,jdbcType=VARCHAR},
  270. #{inspectionStandardBasis,jdbcType=VARCHAR}, #{quality,jdbcType=VARCHAR}, #{sealDate,jdbcType=TIMESTAMP},
  271. #{sealStatus,jdbcType=VARCHAR}, #{authCode,jdbcType=VARCHAR}, #{orgId,jdbcType=INTEGER},
  272. #{historyStatus,jdbcType=INTEGER}, #{intermixingRate,jdbcType=VARCHAR}, #{smelltaste,jdbcType=VARCHAR},
  273. #{transparency,jdbcType=VARCHAR}, #{peroxideValue,jdbcType=VARCHAR}, #{smokePoint,jdbcType=VARCHAR},
  274. #{reezeTest,jdbcType=VARCHAR}, #{residualSolvent,jdbcType=VARCHAR}, #{lead,jdbcType=VARCHAR},
  275. #{totalArsenic,jdbcType=VARCHAR}, #{aflatoxin,jdbcType=VARCHAR}, #{butylPhenol,jdbcType=VARCHAR},
  276. #{updatetime,jdbcType=TIMESTAMP}, #{zblb,jdbcType=VARCHAR}, #{qydbh,jdbcType=VARCHAR},
  277. #{qysj,jdbcType=TIMESTAMP}, #{qyqy,jdbcType=VARCHAR}, #{jdrxm,jdbcType=VARCHAR},
  278. #{jylb,jdbcType=VARCHAR},#{qfrq,jdbcType=TIMESTAMP},#{ypsl,jdbcType=VARCHAR},#{dbsl,jdbcType=VARCHAR},#{ypdj,jdbcType=VARCHAR},
  279. #{ypbh,jdbcType=VARCHAR}, #{sfzcccnx,jdbcType=VARCHAR})
  280. </insert>
  281. <insert id="insertSelective" useGeneratedKeys="true" keyProperty="id" parameterType="com.chinaitop.depot.agent.quality.model.BusinessAgentQuality" >
  282. insert into business_agent_quality
  283. <trim prefix="(" suffix=")" suffixOverrides="," >
  284. <if test="id != null" >
  285. id,
  286. </if>
  287. <if test="agentId != null" >
  288. agent_id,
  289. </if>
  290. <if test="agentDepotId != null" >
  291. agent_depot_id,
  292. </if>
  293. <if test="storehouseId != null" >
  294. storehouse_id,
  295. </if>
  296. <if test="warehouseId != null" >
  297. warehouse_id,
  298. </if>
  299. <if test="type != null" >
  300. type,
  301. </if>
  302. <if test="subType != null" >
  303. sub_type,
  304. </if>
  305. <if test="subTypeDetailed != null" >
  306. sub_type_detailed,
  307. </if>
  308. <if test="checkTime != null" >
  309. check_time,
  310. </if>
  311. <if test="checkResult != null" >
  312. check_result,
  313. </if>
  314. <if test="checker != null" >
  315. checker,
  316. </if>
  317. <if test="level != null" >
  318. level,
  319. </if>
  320. <if test="capacity != null" >
  321. capacity,
  322. </if>
  323. <if test="water != null" >
  324. water,
  325. </if>
  326. <if test="impurity != null" >
  327. impurity,
  328. </if>
  329. <if test="mineral != null" >
  330. mineral,
  331. </if>
  332. <if test="badpart != null" >
  333. badpart,
  334. </if>
  335. <if test="colorsmell != null" >
  336. colorsmell,
  337. </if>
  338. <if test="keeperAdvices != null" >
  339. keeper_advices,
  340. </if>
  341. <if test="keeperAdvicesTime != null" >
  342. keeper_advices_time,
  343. </if>
  344. <if test="keeperAdvicesPaint != null" >
  345. keeper_advices_paint,
  346. </if>
  347. <if test="chiefAdvices != null" >
  348. chief_advices,
  349. </if>
  350. <if test="chiefAdvicesTime != null" >
  351. chief_advices_time,
  352. </if>
  353. <if test="chietAdvicesPaint != null" >
  354. chiet_advices_paint,
  355. </if>
  356. <if test="viceManagerAdvices != null" >
  357. vice_manager_advices,
  358. </if>
  359. <if test="viceManagerAdvicesTime != null" >
  360. vice_manager_advices_time,
  361. </if>
  362. <if test="viceManagerAdvicesPaint != null" >
  363. vice_manager_advices_paint,
  364. </if>
  365. <if test="managerAdvices != null" >
  366. manager_advices,
  367. </if>
  368. <if test="managerAdvicesTime != null" >
  369. manager_advices_time,
  370. </if>
  371. <if test="managerAdvicesPaint != null" >
  372. manager_advices_paint,
  373. </if>
  374. <if test="improveResult != null" >
  375. improve_result,
  376. </if>
  377. <if test="improveTime != null" >
  378. improve_time,
  379. </if>
  380. <if test="improvePaint != null" >
  381. improve_paint,
  382. </if>
  383. <if test="isFirstchecklevelRight != null" >
  384. is_firstchecklevel_right,
  385. </if>
  386. <if test="acceptUnite != null" >
  387. accept_unite,
  388. </if>
  389. <if test="inputTime != null" >
  390. input_time,
  391. </if>
  392. <if test="number != null" >
  393. number,
  394. </if>
  395. <if test="location != null" >
  396. location,
  397. </if>
  398. <if test="keeper != null" >
  399. keeper,
  400. </if>
  401. <if test="harvestTime != null" >
  402. harvest_time,
  403. </if>
  404. <if test="goodpart != null" >
  405. goodpart,
  406. </if>
  407. <if test="chooser != null" >
  408. chooser,
  409. </if>
  410. <if test="chooseTime != null" >
  411. choose_time,
  412. </if>
  413. <if test="boldfatIndex != null" >
  414. boldfat_index,
  415. </if>
  416. <if test="checkType != null" >
  417. check_type,
  418. </if>
  419. <if test="hotDamage != null" >
  420. hot_damage,
  421. </if>
  422. <if test="proteinSolutionRatio != null" >
  423. protein_solution_ratio,
  424. </if>
  425. <if test="eatScore != null" >
  426. eat_score,
  427. </if>
  428. <if test="fatIndex != null" >
  429. fat_index,
  430. </if>
  431. <if test="huskedRation != null" >
  432. husked_ration,
  433. </if>
  434. <if test="fullGoodRation != null" >
  435. full_good_ration,
  436. </if>
  437. <if test="yellowPart != null" >
  438. yellow_part,
  439. </if>
  440. <if test="outHuskedRation != null" >
  441. out_husked_ration,
  442. </if>
  443. <if test="pests != null" >
  444. pests,
  445. </if>
  446. <if test="colorRatio != null" >
  447. color_ratio,
  448. </if>
  449. <if test="hardIndex != null" >
  450. hard_index,
  451. </if>
  452. <if test="glutenWaterCount != null" >
  453. gluten_water_count,
  454. </if>
  455. <if test="remarks != null" >
  456. remarks,
  457. </if>
  458. <if test="approver != null" >
  459. approver,
  460. </if>
  461. <if test="mildewCount != null" >
  462. mildew_count,
  463. </if>
  464. <if test="damageRatio != null" >
  465. damage_ratio,
  466. </if>
  467. <if test="hotDamageRatio != null" >
  468. hot_damage_ratio,
  469. </if>
  470. <if test="huskedRiceWeight != null" >
  471. husked_rice_weight,
  472. </if>
  473. <if test="reviewer != null" >
  474. reviewer,
  475. </if>
  476. <if test="applyCheckTime != null" >
  477. apply_check_time,
  478. </if>
  479. <if test="checkTimeType != null" >
  480. check_time_type,
  481. </if>
  482. <if test="checkResultTime != null" >
  483. check_result_time,
  484. </if>
  485. <if test="storeQuality != null" >
  486. store_quality,
  487. </if>
  488. <if test="isPest != null" >
  489. is_pest,
  490. </if>
  491. <if test="inspectionStandardBasis != null" >
  492. inspection_standard_basis,
  493. </if>
  494. <if test="quality != null" >
  495. quality,
  496. </if>
  497. <if test="sealDate != null" >
  498. seal_date,
  499. </if>
  500. <if test="sealStatus != null" >
  501. seal_status,
  502. </if>
  503. <if test="authCode != null" >
  504. auth_code,
  505. </if>
  506. <if test="orgId != null" >
  507. org_id,
  508. </if>
  509. <if test="historyStatus != null" >
  510. history_status,
  511. </if>
  512. <if test="intermixingRate != null" >
  513. intermixing_rate,
  514. </if>
  515. <if test="smelltaste != null" >
  516. smelltaste,
  517. </if>
  518. <if test="transparency != null" >
  519. transparency,
  520. </if>
  521. <if test="peroxideValue != null" >
  522. peroxide_value,
  523. </if>
  524. <if test="smokePoint != null" >
  525. smoke_point,
  526. </if>
  527. <if test="reezeTest != null" >
  528. reeze_test,
  529. </if>
  530. <if test="residualSolvent != null" >
  531. residual_solvent,
  532. </if>
  533. <if test="lead != null" >
  534. lead,
  535. </if>
  536. <if test="totalArsenic != null" >
  537. total_arsenic,
  538. </if>
  539. <if test="aflatoxin != null" >
  540. aflatoxin,
  541. </if>
  542. <if test="butylPhenol != null" >
  543. butyl_phenol,
  544. </if>
  545. <if test="updatetime != null" >
  546. updatetime,
  547. </if>
  548. <if test="zblb != null" >
  549. zblb,
  550. </if>
  551. <if test="qydbh != null" >
  552. qydbh,
  553. </if>
  554. <if test="qysj != null" >
  555. qysj,
  556. </if>
  557. <if test="qyqy != null" >
  558. qyqy,
  559. </if>
  560. <if test="jdrxm != null" >
  561. jdrxm,
  562. </if>
  563. <if test="ypbh != null" >
  564. ypbh,
  565. </if>
  566. <if test="sfzcccnx != null" >
  567. sfzcccnx,
  568. </if>
  569. <if test="jylb != null" >
  570. jylb,
  571. </if>
  572. <if test="qfrq != null" >
  573. qfrq,
  574. </if>
  575. <if test="ypsl != null" >
  576. ypsl,
  577. </if>
  578. <if test="dbsl != null" >
  579. dbsl,
  580. </if>
  581. <if test="ypdj != null" >
  582. ypdj,
  583. </if>
  584. </trim>
  585. <trim prefix="values (" suffix=")" suffixOverrides="," >
  586. <if test="id != null" >
  587. #{id,jdbcType=INTEGER},
  588. </if>
  589. <if test="agentId != null" >
  590. #{agentId,jdbcType=INTEGER},
  591. </if>
  592. <if test="agentDepotId != null" >
  593. #{agentDepotId,jdbcType=INTEGER},
  594. </if>
  595. <if test="storehouseId != null" >
  596. #{storehouseId,jdbcType=INTEGER},
  597. </if>
  598. <if test="warehouseId != null" >
  599. #{warehouseId,jdbcType=INTEGER},
  600. </if>
  601. <if test="type != null" >
  602. #{type,jdbcType=VARCHAR},
  603. </if>
  604. <if test="subType != null" >
  605. #{subType,jdbcType=INTEGER},
  606. </if>
  607. <if test="subTypeDetailed != null" >
  608. #{subTypeDetailed,jdbcType=INTEGER},
  609. </if>
  610. <if test="checkTime != null" >
  611. #{checkTime,jdbcType=TIMESTAMP},
  612. </if>
  613. <if test="checkResult != null" >
  614. #{checkResult,jdbcType=VARCHAR},
  615. </if>
  616. <if test="checker != null" >
  617. #{checker,jdbcType=VARCHAR},
  618. </if>
  619. <if test="level != null" >
  620. #{level,jdbcType=INTEGER},
  621. </if>
  622. <if test="capacity != null" >
  623. #{capacity,jdbcType=VARCHAR},
  624. </if>
  625. <if test="water != null" >
  626. #{water,jdbcType=VARCHAR},
  627. </if>
  628. <if test="impurity != null" >
  629. #{impurity,jdbcType=VARCHAR},
  630. </if>
  631. <if test="mineral != null" >
  632. #{mineral,jdbcType=VARCHAR},
  633. </if>
  634. <if test="badpart != null" >
  635. #{badpart,jdbcType=VARCHAR},
  636. </if>
  637. <if test="colorsmell != null" >
  638. #{colorsmell,jdbcType=VARCHAR},
  639. </if>
  640. <if test="keeperAdvices != null" >
  641. #{keeperAdvices,jdbcType=VARCHAR},
  642. </if>
  643. <if test="keeperAdvicesTime != null" >
  644. #{keeperAdvicesTime,jdbcType=VARCHAR},
  645. </if>
  646. <if test="keeperAdvicesPaint != null" >
  647. #{keeperAdvicesPaint,jdbcType=VARCHAR},
  648. </if>
  649. <if test="chiefAdvices != null" >
  650. #{chiefAdvices,jdbcType=VARCHAR},
  651. </if>
  652. <if test="chiefAdvicesTime != null" >
  653. #{chiefAdvicesTime,jdbcType=TIMESTAMP},
  654. </if>
  655. <if test="chietAdvicesPaint != null" >
  656. #{chietAdvicesPaint,jdbcType=VARCHAR},
  657. </if>
  658. <if test="viceManagerAdvices != null" >
  659. #{viceManagerAdvices,jdbcType=VARCHAR},
  660. </if>
  661. <if test="viceManagerAdvicesTime != null" >
  662. #{viceManagerAdvicesTime,jdbcType=TIMESTAMP},
  663. </if>
  664. <if test="viceManagerAdvicesPaint != null" >
  665. #{viceManagerAdvicesPaint,jdbcType=VARCHAR},
  666. </if>
  667. <if test="managerAdvices != null" >
  668. #{managerAdvices,jdbcType=VARCHAR},
  669. </if>
  670. <if test="managerAdvicesTime != null" >
  671. #{managerAdvicesTime,jdbcType=TIMESTAMP},
  672. </if>
  673. <if test="managerAdvicesPaint != null" >
  674. #{managerAdvicesPaint,jdbcType=VARCHAR},
  675. </if>
  676. <if test="improveResult != null" >
  677. #{improveResult,jdbcType=VARCHAR},
  678. </if>
  679. <if test="improveTime != null" >
  680. #{improveTime,jdbcType=TIMESTAMP},
  681. </if>
  682. <if test="improvePaint != null" >
  683. #{improvePaint,jdbcType=VARCHAR},
  684. </if>
  685. <if test="isFirstchecklevelRight != null" >
  686. #{isFirstchecklevelRight,jdbcType=VARCHAR},
  687. </if>
  688. <if test="acceptUnite != null" >
  689. #{acceptUnite,jdbcType=VARCHAR},
  690. </if>
  691. <if test="inputTime != null" >
  692. #{inputTime,jdbcType=TIMESTAMP},
  693. </if>
  694. <if test="number != null" >
  695. #{number,jdbcType=VARCHAR},
  696. </if>
  697. <if test="location != null" >
  698. #{location,jdbcType=VARCHAR},
  699. </if>
  700. <if test="keeper != null" >
  701. #{keeper,jdbcType=VARCHAR},
  702. </if>
  703. <if test="harvestTime != null" >
  704. #{harvestTime,jdbcType=INTEGER},
  705. </if>
  706. <if test="goodpart != null" >
  707. #{goodpart,jdbcType=VARCHAR},
  708. </if>
  709. <if test="chooser != null" >
  710. #{chooser,jdbcType=VARCHAR},
  711. </if>
  712. <if test="chooseTime != null" >
  713. #{chooseTime,jdbcType=TIMESTAMP},
  714. </if>
  715. <if test="boldfatIndex != null" >
  716. #{boldfatIndex,jdbcType=VARCHAR},
  717. </if>
  718. <if test="checkType != null" >
  719. #{checkType,jdbcType=VARCHAR},
  720. </if>
  721. <if test="hotDamage != null" >
  722. #{hotDamage,jdbcType=VARCHAR},
  723. </if>
  724. <if test="proteinSolutionRatio != null" >
  725. #{proteinSolutionRatio,jdbcType=VARCHAR},
  726. </if>
  727. <if test="eatScore != null" >
  728. #{eatScore,jdbcType=VARCHAR},
  729. </if>
  730. <if test="fatIndex != null" >
  731. #{fatIndex,jdbcType=VARCHAR},
  732. </if>
  733. <if test="huskedRation != null" >
  734. #{huskedRation,jdbcType=VARCHAR},
  735. </if>
  736. <if test="fullGoodRation != null" >
  737. #{fullGoodRation,jdbcType=VARCHAR},
  738. </if>
  739. <if test="yellowPart != null" >
  740. #{yellowPart,jdbcType=VARCHAR},
  741. </if>
  742. <if test="outHuskedRation != null" >
  743. #{outHuskedRation,jdbcType=VARCHAR},
  744. </if>
  745. <if test="pests != null" >
  746. #{pests,jdbcType=VARCHAR},
  747. </if>
  748. <if test="colorRatio != null" >
  749. #{colorRatio,jdbcType=VARCHAR},
  750. </if>
  751. <if test="hardIndex != null" >
  752. #{hardIndex,jdbcType=VARCHAR},
  753. </if>
  754. <if test="glutenWaterCount != null" >
  755. #{glutenWaterCount,jdbcType=VARCHAR},
  756. </if>
  757. <if test="remarks != null" >
  758. #{remarks,jdbcType=VARCHAR},
  759. </if>
  760. <if test="approver != null" >
  761. #{approver,jdbcType=VARCHAR},
  762. </if>
  763. <if test="mildewCount != null" >
  764. #{mildewCount,jdbcType=VARCHAR},
  765. </if>
  766. <if test="damageRatio != null" >
  767. #{damageRatio,jdbcType=VARCHAR},
  768. </if>
  769. <if test="hotDamageRatio != null" >
  770. #{hotDamageRatio,jdbcType=VARCHAR},
  771. </if>
  772. <if test="huskedRiceWeight != null" >
  773. #{huskedRiceWeight,jdbcType=VARCHAR},
  774. </if>
  775. <if test="reviewer != null" >
  776. #{reviewer,jdbcType=VARCHAR},
  777. </if>
  778. <if test="applyCheckTime != null" >
  779. #{applyCheckTime,jdbcType=TIMESTAMP},
  780. </if>
  781. <if test="checkTimeType != null" >
  782. #{checkTimeType,jdbcType=VARCHAR},
  783. </if>
  784. <if test="checkResultTime != null" >
  785. #{checkResultTime,jdbcType=TIMESTAMP},
  786. </if>
  787. <if test="storeQuality != null" >
  788. #{storeQuality,jdbcType=VARCHAR},
  789. </if>
  790. <if test="isPest != null" >
  791. #{isPest,jdbcType=VARCHAR},
  792. </if>
  793. <if test="inspectionStandardBasis != null" >
  794. #{inspectionStandardBasis,jdbcType=VARCHAR},
  795. </if>
  796. <if test="quality != null" >
  797. #{quality,jdbcType=VARCHAR},
  798. </if>
  799. <if test="sealDate != null" >
  800. #{sealDate,jdbcType=TIMESTAMP},
  801. </if>
  802. <if test="sealStatus != null" >
  803. #{sealStatus,jdbcType=VARCHAR},
  804. </if>
  805. <if test="authCode != null" >
  806. #{authCode,jdbcType=VARCHAR},
  807. </if>
  808. <if test="orgId != null" >
  809. #{orgId,jdbcType=INTEGER},
  810. </if>
  811. <if test="historyStatus != null" >
  812. #{historyStatus,jdbcType=INTEGER},
  813. </if>
  814. <if test="intermixingRate != null" >
  815. #{intermixingRate,jdbcType=VARCHAR},
  816. </if>
  817. <if test="smelltaste != null" >
  818. #{smelltaste,jdbcType=VARCHAR},
  819. </if>
  820. <if test="transparency != null" >
  821. #{transparency,jdbcType=VARCHAR},
  822. </if>
  823. <if test="peroxideValue != null" >
  824. #{peroxideValue,jdbcType=VARCHAR},
  825. </if>
  826. <if test="smokePoint != null" >
  827. #{smokePoint,jdbcType=VARCHAR},
  828. </if>
  829. <if test="reezeTest != null" >
  830. #{reezeTest,jdbcType=VARCHAR},
  831. </if>
  832. <if test="residualSolvent != null" >
  833. #{residualSolvent,jdbcType=VARCHAR},
  834. </if>
  835. <if test="lead != null" >
  836. #{lead,jdbcType=VARCHAR},
  837. </if>
  838. <if test="totalArsenic != null" >
  839. #{totalArsenic,jdbcType=VARCHAR},
  840. </if>
  841. <if test="aflatoxin != null" >
  842. #{aflatoxin,jdbcType=VARCHAR},
  843. </if>
  844. <if test="butylPhenol != null" >
  845. #{butylPhenol,jdbcType=VARCHAR},
  846. </if>
  847. <if test="updatetime != null" >
  848. #{updatetime,jdbcType=TIMESTAMP},
  849. </if>
  850. <if test="zblb != null" >
  851. #{zblb,jdbcType=VARCHAR},
  852. </if>
  853. <if test="qydbh != null" >
  854. #{qydbh,jdbcType=VARCHAR},
  855. </if>
  856. <if test="qysj != null" >
  857. #{qysj,jdbcType=TIMESTAMP},
  858. </if>
  859. <if test="qyqy != null" >
  860. #{qyqy,jdbcType=VARCHAR},
  861. </if>
  862. <if test="jdrxm != null" >
  863. #{jdrxm,jdbcType=VARCHAR},
  864. </if>
  865. <if test="ypbh != null" >
  866. #{ypbh,jdbcType=VARCHAR},
  867. </if>
  868. <if test="sfzcccnx != null" >
  869. #{sfzcccnx,jdbcType=VARCHAR},
  870. </if>
  871. <if test="jylb != null" >
  872. #{jylb,jdbcType=VARCHAR},
  873. </if>
  874. <if test="qfrq != null" >
  875. #{qfrq,jdbcType=TIMESTAMP},
  876. </if>
  877. <if test="ypsl != null" >
  878. #{ypsl,jdbcType=VARCHAR},
  879. </if>
  880. <if test="dbsl != null" >
  881. #{dbsl,jdbcType=VARCHAR},
  882. </if>
  883. <if test="ypdj != null" >
  884. #{ypdj,jdbcType=VARCHAR},
  885. </if>
  886. </trim>
  887. </insert>
  888. <select id="countByExample" parameterType="com.chinaitop.depot.agent.quality.model.BusinessAgentQualityExample" resultType="java.lang.Integer" >
  889. select count(*) from business_agent_quality
  890. <if test="_parameter != null" >
  891. <include refid="Example_Where_Clause" />
  892. </if>
  893. </select>
  894. <update id="updateByExampleSelective" parameterType="map" >
  895. update business_agent_quality
  896. <set >
  897. <if test="record.id != null" >
  898. id = #{record.id,jdbcType=INTEGER},
  899. </if>
  900. <if test="record.agentId != null" >
  901. agent_id = #{record.agentId,jdbcType=INTEGER},
  902. </if>
  903. <if test="record.agentDepotId != null" >
  904. agent_depot_id = #{record.agentDepotId,jdbcType=INTEGER},
  905. </if>
  906. <if test="record.storehouseId != null" >
  907. storehouse_id = #{record.storehouseId,jdbcType=INTEGER},
  908. </if>
  909. <if test="record.warehouseId != null" >
  910. warehouse_id = #{record.warehouseId,jdbcType=INTEGER},
  911. </if>
  912. <if test="record.type != null" >
  913. type = #{record.type,jdbcType=VARCHAR},
  914. </if>
  915. <if test="record.subType != null" >
  916. sub_type = #{record.subType,jdbcType=INTEGER},
  917. </if>
  918. <if test="record.subTypeDetailed != null" >
  919. sub_type_detailed = #{record.subTypeDetailed,jdbcType=INTEGER},
  920. </if>
  921. <if test="record.checkTime != null" >
  922. check_time = #{record.checkTime,jdbcType=TIMESTAMP},
  923. </if>
  924. <if test="record.checkResult != null" >
  925. check_result = #{record.checkResult,jdbcType=VARCHAR},
  926. </if>
  927. <if test="record.checker != null" >
  928. checker = #{checker,jdbcType=VARCHAR},
  929. </if>
  930. <if test="record.level != null" >
  931. level = #{record.level,jdbcType=INTEGER},
  932. </if>
  933. <if test="record.capacity != null" >
  934. capacity = #{record.capacity,jdbcType=VARCHAR},
  935. </if>
  936. <if test="record.water != null" >
  937. water = #{record.water,jdbcType=VARCHAR},
  938. </if>
  939. <if test="record.impurity != null" >
  940. impurity = #{record.impurity,jdbcType=VARCHAR},
  941. </if>
  942. <if test="record.mineral != null" >
  943. mineral = #{record.mineral,jdbcType=VARCHAR},
  944. </if>
  945. <if test="record.badpart != null" >
  946. badpart = #{record.badpart,jdbcType=VARCHAR},
  947. </if>
  948. <if test="record.colorsmell != null" >
  949. colorsmell = #{record.colorsmell,jdbcType=VARCHAR},
  950. </if>
  951. <if test="record.keeperAdvices != null" >
  952. keeper_advices = #{record.keeperAdvices,jdbcType=VARCHAR},
  953. </if>
  954. <if test="record.keeperAdvicesTime != null" >
  955. keeper_advices_time = #{record.keeperAdvicesTime,jdbcType=VARCHAR},
  956. </if>
  957. <if test="record.keeperAdvicesPaint != null" >
  958. keeper_advices_paint = #{record.keeperAdvicesPaint,jdbcType=VARCHAR},
  959. </if>
  960. <if test="record.chiefAdvices != null" >
  961. chief_advices = #{record.chiefAdvices,jdbcType=VARCHAR},
  962. </if>
  963. <if test="record.chiefAdvicesTime != null" >
  964. chief_advices_time = #{record.chiefAdvicesTime,jdbcType=TIMESTAMP},
  965. </if>
  966. <if test="record.chietAdvicesPaint != null" >
  967. chiet_advices_paint = #{record.chietAdvicesPaint,jdbcType=VARCHAR},
  968. </if>
  969. <if test="record.viceManagerAdvices != null" >
  970. vice_manager_advices = #{record.viceManagerAdvices,jdbcType=VARCHAR},
  971. </if>
  972. <if test="record.viceManagerAdvicesTime != null" >
  973. vice_manager_advices_time = #{record.viceManagerAdvicesTime,jdbcType=TIMESTAMP},
  974. </if>
  975. <if test="record.viceManagerAdvicesPaint != null" >
  976. vice_manager_advices_paint = #{record.viceManagerAdvicesPaint,jdbcType=VARCHAR},
  977. </if>
  978. <if test="record.managerAdvices != null" >
  979. manager_advices = #{record.managerAdvices,jdbcType=VARCHAR},
  980. </if>
  981. <if test="record.managerAdvicesTime != null" >
  982. manager_advices_time = #{record.managerAdvicesTime,jdbcType=TIMESTAMP},
  983. </if>
  984. <if test="record.managerAdvicesPaint != null" >
  985. manager_advices_paint = #{record.managerAdvicesPaint,jdbcType=VARCHAR},
  986. </if>
  987. <if test="record.improveResult != null" >
  988. improve_result = #{record.improveResult,jdbcType=VARCHAR},
  989. </if>
  990. <if test="record.improveTime != null" >
  991. improve_time = #{record.improveTime,jdbcType=TIMESTAMP},
  992. </if>
  993. <if test="record.improvePaint != null" >
  994. improve_paint = #{record.improvePaint,jdbcType=VARCHAR},
  995. </if>
  996. <if test="record.isFirstchecklevelRight != null" >
  997. is_firstchecklevel_right = #{record.isFirstchecklevelRight,jdbcType=VARCHAR},
  998. </if>
  999. <if test="record.acceptUnite != null" >
  1000. accept_unite = #{record.acceptUnite,jdbcType=VARCHAR},
  1001. </if>
  1002. <if test="record.inputTime != null" >
  1003. input_time = #{record.inputTime,jdbcType=TIMESTAMP},
  1004. </if>
  1005. <if test="record.number != null" >
  1006. number = #{record.number,jdbcType=VARCHAR},
  1007. </if>
  1008. <if test="record.location != null" >
  1009. location = #{record.location,jdbcType=VARCHAR},
  1010. </if>
  1011. <if test="record.keeper != null" >
  1012. keeper = #{record.keeper,jdbcType=VARCHAR},
  1013. </if>
  1014. <if test="record.harvestTime != null" >
  1015. harvest_time = #{record.harvestTime,jdbcType=INTEGER},
  1016. </if>
  1017. <if test="record.goodpart != null" >
  1018. goodpart = #{record.goodpart,jdbcType=VARCHAR},
  1019. </if>
  1020. <if test="record.chooser != null" >
  1021. chooser = #{record.chooser,jdbcType=VARCHAR},
  1022. </if>
  1023. <if test="record.chooseTime != null" >
  1024. choose_time = #{record.chooseTime,jdbcType=TIMESTAMP},
  1025. </if>
  1026. <if test="record.boldfatIndex != null" >
  1027. boldfat_index = #{record.boldfatIndex,jdbcType=VARCHAR},
  1028. </if>
  1029. <if test="record.checkType != null" >
  1030. check_type = #{record.checkType,jdbcType=VARCHAR},
  1031. </if>
  1032. <if test="record.hotDamage != null" >
  1033. hot_damage = #{record.hotDamage,jdbcType=VARCHAR},
  1034. </if>
  1035. <if test="record.proteinSolutionRatio != null" >
  1036. protein_solution_ratio = #{record.proteinSolutionRatio,jdbcType=VARCHAR},
  1037. </if>
  1038. <if test="record.eatScore != null" >
  1039. eat_score = #{record.eatScore,jdbcType=VARCHAR},
  1040. </if>
  1041. <if test="record.fatIndex != null" >
  1042. fat_index = #{record.fatIndex,jdbcType=VARCHAR},
  1043. </if>
  1044. <if test="record.huskedRation != null" >
  1045. husked_ration = #{record.huskedRation,jdbcType=VARCHAR},
  1046. </if>
  1047. <if test="record.fullGoodRation != null" >
  1048. full_good_ration = #{record.fullGoodRation,jdbcType=VARCHAR},
  1049. </if>
  1050. <if test="record.yellowPart != null" >
  1051. yellow_part = #{record.yellowPart,jdbcType=VARCHAR},
  1052. </if>
  1053. <if test="record.outHuskedRation != null" >
  1054. out_husked_ration = #{record.outHuskedRation,jdbcType=VARCHAR},
  1055. </if>
  1056. <if test="record.pests != null" >
  1057. pests = #{record.pests,jdbcType=VARCHAR},
  1058. </if>
  1059. <if test="record.colorRatio != null" >
  1060. color_ratio = #{record.colorRatio,jdbcType=VARCHAR},
  1061. </if>
  1062. <if test="record.hardIndex != null" >
  1063. hard_index = #{record.hardIndex,jdbcType=VARCHAR},
  1064. </if>
  1065. <if test="record.glutenWaterCount != null" >
  1066. gluten_water_count = #{record.glutenWaterCount,jdbcType=VARCHAR},
  1067. </if>
  1068. <if test="record.remarks != null" >
  1069. remarks = #{record.remarks,jdbcType=VARCHAR},
  1070. </if>
  1071. <if test="record.approver != null" >
  1072. approver = #{record.approver,jdbcType=VARCHAR},
  1073. </if>
  1074. <if test="record.mildewCount != null" >
  1075. mildew_count = #{record.mildewCount,jdbcType=VARCHAR},
  1076. </if>
  1077. <if test="record.damageRatio != null" >
  1078. damage_ratio = #{record.damageRatio,jdbcType=VARCHAR},
  1079. </if>
  1080. <if test="record.hotDamageRatio != null" >
  1081. hot_damage_ratio = #{record.hotDamageRatio,jdbcType=VARCHAR},
  1082. </if>
  1083. <if test="record.huskedRiceWeight != null" >
  1084. husked_rice_weight = #{record.huskedRiceWeight,jdbcType=VARCHAR},
  1085. </if>
  1086. <if test="record.reviewer != null" >
  1087. reviewer = #{record.reviewer,jdbcType=VARCHAR},
  1088. </if>
  1089. <if test="record.applyCheckTime != null" >
  1090. apply_check_time = #{record.applyCheckTime,jdbcType=TIMESTAMP},
  1091. </if>
  1092. <if test="record.checkTimeType != null" >
  1093. check_time_type = #{record.checkTimeType,jdbcType=VARCHAR},
  1094. </if>
  1095. <if test="record.checkResultTime != null" >
  1096. check_result_time = #{record.checkResultTime,jdbcType=TIMESTAMP},
  1097. </if>
  1098. <if test="record.storeQuality != null" >
  1099. store_quality = #{record.storeQuality,jdbcType=VARCHAR},
  1100. </if>
  1101. <if test="record.isPest != null" >
  1102. is_pest = #{record.isPest,jdbcType=VARCHAR},
  1103. </if>
  1104. <if test="record.inspectionStandardBasis != null" >
  1105. inspection_standard_basis = #{record.inspectionStandardBasis,jdbcType=VARCHAR},
  1106. </if>
  1107. <if test="record.quality != null" >
  1108. quality = #{record.quality,jdbcType=VARCHAR},
  1109. </if>
  1110. <if test="record.sealDate != null" >
  1111. seal_date = #{record.sealDate,jdbcType=TIMESTAMP},
  1112. </if>
  1113. <if test="record.sealStatus != null" >
  1114. seal_status = #{record.sealStatus,jdbcType=VARCHAR},
  1115. </if>
  1116. <if test="record.authCode != null" >
  1117. auth_code = #{record.authCode,jdbcType=VARCHAR},
  1118. </if>
  1119. <if test="record.orgId != null" >
  1120. org_id = #{record.orgId,jdbcType=INTEGER},
  1121. </if>
  1122. <if test="record.historyStatus != null" >
  1123. history_status = #{record.historyStatus,jdbcType=INTEGER},
  1124. </if>
  1125. <if test="record.intermixingRate != null" >
  1126. intermixing_rate = #{record.intermixingRate,jdbcType=VARCHAR},
  1127. </if>
  1128. <if test="record.smelltaste != null" >
  1129. smelltaste = #{record.smelltaste,jdbcType=VARCHAR},
  1130. </if>
  1131. <if test="record.transparency != null" >
  1132. transparency = #{record.transparency,jdbcType=VARCHAR},
  1133. </if>
  1134. <if test="record.peroxideValue != null" >
  1135. peroxide_value = #{record.peroxideValue,jdbcType=VARCHAR},
  1136. </if>
  1137. <if test="record.smokePoint != null" >
  1138. smoke_point = #{record.smokePoint,jdbcType=VARCHAR},
  1139. </if>
  1140. <if test="record.reezeTest != null" >
  1141. reeze_test = #{record.reezeTest,jdbcType=VARCHAR},
  1142. </if>
  1143. <if test="record.residualSolvent != null" >
  1144. residual_solvent = #{record.residualSolvent,jdbcType=VARCHAR},
  1145. </if>
  1146. <if test="record.lead != null" >
  1147. lead = #{record.lead,jdbcType=VARCHAR},
  1148. </if>
  1149. <if test="record.totalArsenic != null" >
  1150. total_arsenic = #{record.totalArsenic,jdbcType=VARCHAR},
  1151. </if>
  1152. <if test="record.aflatoxin != null" >
  1153. aflatoxin = #{record.aflatoxin,jdbcType=VARCHAR},
  1154. </if>
  1155. <if test="record.butylPhenol != null" >
  1156. butyl_phenol = #{record.butylPhenol,jdbcType=VARCHAR},
  1157. </if>
  1158. <if test="record.updatetime != null" >
  1159. updatetime = #{record.updatetime,jdbcType=TIMESTAMP},
  1160. </if>
  1161. <if test="record.zblb != null" >
  1162. zblb = #{record.zblb,jdbcType=VARCHAR},
  1163. </if>
  1164. <if test="record.qydbh != null" >
  1165. qydbh = #{record.qydbh,jdbcType=VARCHAR},
  1166. </if>
  1167. <if test="record.qysj != null" >
  1168. qysj = #{record.qysj,jdbcType=TIMESTAMP},
  1169. </if>
  1170. <if test="record.qyqy != null" >
  1171. qyqy = #{record.qyqy,jdbcType=VARCHAR},
  1172. </if>
  1173. <if test="record.jdrxm != null" >
  1174. jdrxm = #{record.jdrxm,jdbcType=VARCHAR},
  1175. </if>
  1176. <if test="record.ypbh != null" >
  1177. ypbh = #{record.ypbh,jdbcType=VARCHAR},
  1178. </if>
  1179. <if test="record.sfzcccnx != null" >
  1180. sfzcccnx = #{record.sfzcccnx,jdbcType=VARCHAR},
  1181. </if>
  1182. <if test="record.jylb != null" >
  1183. jylb = #{record.jylb,jdbcType=VARCHAR},
  1184. </if>
  1185. <if test="record.qfrq != null" >
  1186. qfrq = #{record.qfrq,jdbcType=TIMESTAMP},
  1187. </if>
  1188. <if test="record.ypsl != null" >
  1189. ypsl = #{record.ypsl,jdbcType=VARCHAR},
  1190. </if>
  1191. <if test="record.dbsl != null" >
  1192. dbsl = #{record.dbsl,jdbcType=VARCHAR},
  1193. </if>
  1194. <if test="record.ypdj != null" >
  1195. ypdj = #{record.ypdj,jdbcType=VARCHAR},
  1196. </if>
  1197. </set>
  1198. <if test="_parameter != null" >
  1199. <include refid="Update_By_Example_Where_Clause" />
  1200. </if>
  1201. </update>
  1202. <update id="updateByExample" parameterType="map" >
  1203. update business_agent_quality
  1204. set id = #{record.id,jdbcType=INTEGER},
  1205. agent_id = #{record.agentId,jdbcType=INTEGER},
  1206. agent_depot_id = #{record.agentDepotId,jdbcType=INTEGER},
  1207. storehouse_id = #{record.storehouseId,jdbcType=INTEGER},
  1208. warehouse_id = #{record.warehouseId,jdbcType=INTEGER},
  1209. type = #{record.type,jdbcType=VARCHAR},
  1210. sub_type = #{record.subType,jdbcType=INTEGER},
  1211. sub_type_detailed = #{record.subTypeDetailed,jdbcType=INTEGER},
  1212. check_time = #{record.checkTime,jdbcType=TIMESTAMP},
  1213. check_result = #{record.checkResult,jdbcType=VARCHAR},
  1214. checker = #{record.checker,jdbcType=VARCHAR},
  1215. level = #{record.level,jdbcType=INTEGER},
  1216. capacity = #{record.capacity,jdbcType=VARCHAR},
  1217. water = #{record.water,jdbcType=VARCHAR},
  1218. impurity = #{record.impurity,jdbcType=VARCHAR},
  1219. mineral = #{record.mineral,jdbcType=VARCHAR},
  1220. badpart = #{record.badpart,jdbcType=VARCHAR},
  1221. colorsmell = #{record.colorsmell,jdbcType=VARCHAR},
  1222. keeper_advices = #{record.keeperAdvices,jdbcType=VARCHAR},
  1223. keeper_advices_time = #{record.keeperAdvicesTime,jdbcType=VARCHAR},
  1224. keeper_advices_paint = #{record.keeperAdvicesPaint,jdbcType=VARCHAR},
  1225. chief_advices = #{record.chiefAdvices,jdbcType=VARCHAR},
  1226. chief_advices_time = #{record.chiefAdvicesTime,jdbcType=TIMESTAMP},
  1227. chiet_advices_paint = #{record.chietAdvicesPaint,jdbcType=VARCHAR},
  1228. vice_manager_advices = #{record.viceManagerAdvices,jdbcType=VARCHAR},
  1229. vice_manager_advices_time = #{record.viceManagerAdvicesTime,jdbcType=TIMESTAMP},
  1230. vice_manager_advices_paint = #{record.viceManagerAdvicesPaint,jdbcType=VARCHAR},
  1231. manager_advices = #{record.managerAdvices,jdbcType=VARCHAR},
  1232. manager_advices_time = #{record.managerAdvicesTime,jdbcType=TIMESTAMP},
  1233. manager_advices_paint = #{record.managerAdvicesPaint,jdbcType=VARCHAR},
  1234. improve_result = #{record.improveResult,jdbcType=VARCHAR},
  1235. improve_time = #{record.improveTime,jdbcType=TIMESTAMP},
  1236. improve_paint = #{record.improvePaint,jdbcType=VARCHAR},
  1237. is_firstchecklevel_right = #{record.isFirstchecklevelRight,jdbcType=VARCHAR},
  1238. accept_unite = #{record.acceptUnite,jdbcType=VARCHAR},
  1239. input_time = #{record.inputTime,jdbcType=TIMESTAMP},
  1240. number = #{record.number,jdbcType=VARCHAR},
  1241. location = #{record.location,jdbcType=VARCHAR},
  1242. keeper = #{record.keeper,jdbcType=VARCHAR},
  1243. harvest_time = #{record.harvestTime,jdbcType=INTEGER},
  1244. goodpart = #{record.goodpart,jdbcType=VARCHAR},
  1245. chooser = #{record.chooser,jdbcType=VARCHAR},
  1246. choose_time = #{record.chooseTime,jdbcType=TIMESTAMP},
  1247. boldfat_index = #{record.boldfatIndex,jdbcType=VARCHAR},
  1248. check_type = #{record.checkType,jdbcType=VARCHAR},
  1249. hot_damage = #{record.hotDamage,jdbcType=VARCHAR},
  1250. protein_solution_ratio = #{record.proteinSolutionRatio,jdbcType=VARCHAR},
  1251. eat_score = #{record.eatScore,jdbcType=VARCHAR},
  1252. fat_index = #{record.fatIndex,jdbcType=VARCHAR},
  1253. husked_ration = #{record.huskedRation,jdbcType=VARCHAR},
  1254. full_good_ration = #{record.fullGoodRation,jdbcType=VARCHAR},
  1255. yellow_part = #{record.yellowPart,jdbcType=VARCHAR},
  1256. out_husked_ration = #{record.outHuskedRation,jdbcType=VARCHAR},
  1257. pests = #{record.pests,jdbcType=VARCHAR},
  1258. color_ratio = #{record.colorRatio,jdbcType=VARCHAR},
  1259. hard_index = #{record.hardIndex,jdbcType=VARCHAR},
  1260. gluten_water_count = #{record.glutenWaterCount,jdbcType=VARCHAR},
  1261. remarks = #{record.remarks,jdbcType=VARCHAR},
  1262. approver = #{record.approver,jdbcType=VARCHAR},
  1263. mildew_count = #{record.mildewCount,jdbcType=VARCHAR},
  1264. damage_ratio = #{record.damageRatio,jdbcType=VARCHAR},
  1265. hot_damage_ratio = #{record.hotDamageRatio,jdbcType=VARCHAR},
  1266. husked_rice_weight = #{record.huskedRiceWeight,jdbcType=VARCHAR},
  1267. reviewer = #{record.reviewer,jdbcType=VARCHAR},
  1268. apply_check_time = #{record.applyCheckTime,jdbcType=TIMESTAMP},
  1269. check_time_type = #{record.checkTimeType,jdbcType=VARCHAR},
  1270. check_result_time = #{record.checkResultTime,jdbcType=TIMESTAMP},
  1271. store_quality = #{record.storeQuality,jdbcType=VARCHAR},
  1272. is_pest = #{record.isPest,jdbcType=VARCHAR},
  1273. inspection_standard_basis = #{record.inspectionStandardBasis,jdbcType=VARCHAR},
  1274. quality = #{record.quality,jdbcType=VARCHAR},
  1275. seal_date = #{record.sealDate,jdbcType=TIMESTAMP},
  1276. seal_status = #{record.sealStatus,jdbcType=VARCHAR},
  1277. auth_code = #{record.authCode,jdbcType=VARCHAR},
  1278. org_id = #{record.orgId,jdbcType=INTEGER},
  1279. history_status = #{record.historyStatus,jdbcType=INTEGER},
  1280. intermixing_rate = #{record.intermixingRate,jdbcType=VARCHAR},
  1281. smelltaste = #{record.smelltaste,jdbcType=VARCHAR},
  1282. transparency = #{record.transparency,jdbcType=VARCHAR},
  1283. peroxide_value = #{record.peroxideValue,jdbcType=VARCHAR},
  1284. smoke_point = #{record.smokePoint,jdbcType=VARCHAR},
  1285. reeze_test = #{record.reezeTest,jdbcType=VARCHAR},
  1286. residual_solvent = #{record.residualSolvent,jdbcType=VARCHAR},
  1287. lead = #{record.lead,jdbcType=VARCHAR},
  1288. total_arsenic = #{record.totalArsenic,jdbcType=VARCHAR},
  1289. aflatoxin = #{record.aflatoxin,jdbcType=VARCHAR},
  1290. butyl_phenol = #{record.butylPhenol,jdbcType=VARCHAR},
  1291. updatetime = #{record.updatetime,jdbcType=TIMESTAMP},
  1292. zblb = #{record.zblb,jdbcType=VARCHAR},
  1293. qydbh = #{record.qydbh,jdbcType=VARCHAR},
  1294. qysj = #{record.qysj,jdbcType=TIMESTAMP},
  1295. qyqy = #{record.qyqy,jdbcType=VARCHAR},
  1296. jdrxm = #{record.jdrxm,jdbcType=VARCHAR},
  1297. ypbh = #{record.ypbh,jdbcType=VARCHAR},
  1298. sfzcccnx = #{record.sfzcccnx,jdbcType=VARCHAR},
  1299. jylb= #{record.jylb,jdbcType=VARCHAR},
  1300. qfrq= #{record.qfrq,jdbcType=TIMESTAMP},
  1301. ypsl= #{record.ypsl,jdbcType=VARCHAR},
  1302. dbsl= #{record.dbsl,jdbcType=VARCHAR},
  1303. ypdj= #{record.ypdj,jdbcType=VARCHAR}
  1304. <if test="_parameter != null" >
  1305. <include refid="Update_By_Example_Where_Clause" />
  1306. </if>
  1307. </update>
  1308. <update id="updateByPrimaryKeySelective" parameterType="com.chinaitop.depot.agent.quality.model.BusinessAgentQuality" >
  1309. update business_agent_quality
  1310. <set >
  1311. <if test="agentId != null" >
  1312. agent_id = #{agentId,jdbcType=INTEGER},
  1313. </if>
  1314. <if test="agentDepotId != null" >
  1315. agent_depot_id = #{agentDepotId,jdbcType=INTEGER},
  1316. </if>
  1317. <if test="storehouseId != null" >
  1318. storehouse_id = #{storehouseId,jdbcType=INTEGER},
  1319. </if>
  1320. <if test="warehouseId != null" >
  1321. warehouse_id = #{warehouseId,jdbcType=INTEGER},
  1322. </if>
  1323. <if test="type != null" >
  1324. type = #{type,jdbcType=VARCHAR},
  1325. </if>
  1326. <if test="subType != null" >
  1327. sub_type = #{subType,jdbcType=INTEGER},
  1328. </if>
  1329. <if test="subTypeDetailed != null" >
  1330. sub_type_detailed = #{subTypeDetailed,jdbcType=INTEGER},
  1331. </if>
  1332. <if test="checkTime != null" >
  1333. check_time = #{checkTime,jdbcType=TIMESTAMP},
  1334. </if>
  1335. <if test="checkResult != null" >
  1336. check_result = #{checkResult,jdbcType=VARCHAR},
  1337. </if>
  1338. <if test="checker != null" >
  1339. checker = #{checker,jdbcType=VARCHAR},
  1340. </if>
  1341. <if test="level != null" >
  1342. level = #{level,jdbcType=INTEGER},
  1343. </if>
  1344. <if test="capacity != null" >
  1345. capacity = #{capacity,jdbcType=VARCHAR},
  1346. </if>
  1347. <if test="water != null" >
  1348. water = #{water,jdbcType=VARCHAR},
  1349. </if>
  1350. <if test="impurity != null" >
  1351. impurity = #{impurity,jdbcType=VARCHAR},
  1352. </if>
  1353. <if test="mineral != null" >
  1354. mineral = #{mineral,jdbcType=VARCHAR},
  1355. </if>
  1356. <if test="badpart != null" >
  1357. badpart = #{badpart,jdbcType=VARCHAR},
  1358. </if>
  1359. <if test="colorsmell != null" >
  1360. colorsmell = #{colorsmell,jdbcType=VARCHAR},
  1361. </if>
  1362. <if test="keeperAdvices != null" >
  1363. keeper_advices = #{keeperAdvices,jdbcType=VARCHAR},
  1364. </if>
  1365. <if test="keeperAdvicesTime != null" >
  1366. keeper_advices_time = #{keeperAdvicesTime,jdbcType=VARCHAR},
  1367. </if>
  1368. <if test="keeperAdvicesPaint != null" >
  1369. keeper_advices_paint = #{keeperAdvicesPaint,jdbcType=VARCHAR},
  1370. </if>
  1371. <if test="chiefAdvices != null" >
  1372. chief_advices = #{chiefAdvices,jdbcType=VARCHAR},
  1373. </if>
  1374. <if test="chiefAdvicesTime != null" >
  1375. chief_advices_time = #{chiefAdvicesTime,jdbcType=TIMESTAMP},
  1376. </if>
  1377. <if test="chietAdvicesPaint != null" >
  1378. chiet_advices_paint = #{chietAdvicesPaint,jdbcType=VARCHAR},
  1379. </if>
  1380. <if test="viceManagerAdvices != null" >
  1381. vice_manager_advices = #{viceManagerAdvices,jdbcType=VARCHAR},
  1382. </if>
  1383. <if test="viceManagerAdvicesTime != null" >
  1384. vice_manager_advices_time = #{viceManagerAdvicesTime,jdbcType=TIMESTAMP},
  1385. </if>
  1386. <if test="viceManagerAdvicesPaint != null" >
  1387. vice_manager_advices_paint = #{viceManagerAdvicesPaint,jdbcType=VARCHAR},
  1388. </if>
  1389. <if test="managerAdvices != null" >
  1390. manager_advices = #{managerAdvices,jdbcType=VARCHAR},
  1391. </if>
  1392. <if test="managerAdvicesTime != null" >
  1393. manager_advices_time = #{managerAdvicesTime,jdbcType=TIMESTAMP},
  1394. </if>
  1395. <if test="managerAdvicesPaint != null" >
  1396. manager_advices_paint = #{managerAdvicesPaint,jdbcType=VARCHAR},
  1397. </if>
  1398. <if test="improveResult != null" >
  1399. improve_result = #{improveResult,jdbcType=VARCHAR},
  1400. </if>
  1401. <if test="improveTime != null" >
  1402. improve_time = #{improveTime,jdbcType=TIMESTAMP},
  1403. </if>
  1404. <if test="improvePaint != null" >
  1405. improve_paint = #{improvePaint,jdbcType=VARCHAR},
  1406. </if>
  1407. <if test="isFirstchecklevelRight != null" >
  1408. is_firstchecklevel_right = #{isFirstchecklevelRight,jdbcType=VARCHAR},
  1409. </if>
  1410. <if test="acceptUnite != null" >
  1411. accept_unite = #{acceptUnite,jdbcType=VARCHAR},
  1412. </if>
  1413. <if test="inputTime != null" >
  1414. input_time = #{inputTime,jdbcType=TIMESTAMP},
  1415. </if>
  1416. <if test="number != null" >
  1417. number = #{number,jdbcType=VARCHAR},
  1418. </if>
  1419. <if test="location != null" >
  1420. location = #{location,jdbcType=VARCHAR},
  1421. </if>
  1422. <if test="keeper != null" >
  1423. keeper = #{keeper,jdbcType=VARCHAR},
  1424. </if>
  1425. <if test="harvestTime != null" >
  1426. harvest_time = #{harvestTime,jdbcType=INTEGER},
  1427. </if>
  1428. <if test="goodpart != null" >
  1429. goodpart = #{goodpart,jdbcType=VARCHAR},
  1430. </if>
  1431. <if test="chooser != null" >
  1432. chooser = #{chooser,jdbcType=VARCHAR},
  1433. </if>
  1434. <if test="chooseTime != null" >
  1435. choose_time = #{chooseTime,jdbcType=TIMESTAMP},
  1436. </if>
  1437. <if test="boldfatIndex != null" >
  1438. boldfat_index = #{boldfatIndex,jdbcType=VARCHAR},
  1439. </if>
  1440. <if test="checkType != null" >
  1441. check_type = #{checkType,jdbcType=VARCHAR},
  1442. </if>
  1443. <if test="hotDamage != null" >
  1444. hot_damage = #{hotDamage,jdbcType=VARCHAR},
  1445. </if>
  1446. <if test="proteinSolutionRatio != null" >
  1447. protein_solution_ratio = #{proteinSolutionRatio,jdbcType=VARCHAR},
  1448. </if>
  1449. <if test="eatScore != null" >
  1450. eat_score = #{eatScore,jdbcType=VARCHAR},
  1451. </if>
  1452. <if test="fatIndex != null" >
  1453. fat_index = #{fatIndex,jdbcType=VARCHAR},
  1454. </if>
  1455. <if test="huskedRation != null" >
  1456. husked_ration = #{huskedRation,jdbcType=VARCHAR},
  1457. </if>
  1458. <if test="fullGoodRation != null" >
  1459. full_good_ration = #{fullGoodRation,jdbcType=VARCHAR},
  1460. </if>
  1461. <if test="yellowPart != null" >
  1462. yellow_part = #{yellowPart,jdbcType=VARCHAR},
  1463. </if>
  1464. <if test="outHuskedRation != null" >
  1465. out_husked_ration = #{outHuskedRation,jdbcType=VARCHAR},
  1466. </if>
  1467. <if test="pests != null" >
  1468. pests = #{pests,jdbcType=VARCHAR},
  1469. </if>
  1470. <if test="colorRatio != null" >
  1471. color_ratio = #{colorRatio,jdbcType=VARCHAR},
  1472. </if>
  1473. <if test="hardIndex != null" >
  1474. hard_index = #{hardIndex,jdbcType=VARCHAR},
  1475. </if>
  1476. <if test="glutenWaterCount != null" >
  1477. gluten_water_count = #{glutenWaterCount,jdbcType=VARCHAR},
  1478. </if>
  1479. <if test="remarks != null" >
  1480. remarks = #{remarks,jdbcType=VARCHAR},
  1481. </if>
  1482. <if test="approver != null" >
  1483. approver = #{approver,jdbcType=VARCHAR},
  1484. </if>
  1485. <if test="mildewCount != null" >
  1486. mildew_count = #{mildewCount,jdbcType=VARCHAR},
  1487. </if>
  1488. <if test="damageRatio != null" >
  1489. damage_ratio = #{damageRatio,jdbcType=VARCHAR},
  1490. </if>
  1491. <if test="hotDamageRatio != null" >
  1492. hot_damage_ratio = #{hotDamageRatio,jdbcType=VARCHAR},
  1493. </if>
  1494. <if test="huskedRiceWeight != null" >
  1495. husked_rice_weight = #{huskedRiceWeight,jdbcType=VARCHAR},
  1496. </if>
  1497. <if test="reviewer != null" >
  1498. reviewer = #{reviewer,jdbcType=VARCHAR},
  1499. </if>
  1500. <if test="applyCheckTime != null" >
  1501. apply_check_time = #{applyCheckTime,jdbcType=TIMESTAMP},
  1502. </if>
  1503. <if test="checkTimeType != null" >
  1504. check_time_type = #{checkTimeType,jdbcType=VARCHAR},
  1505. </if>
  1506. <if test="checkResultTime != null" >
  1507. check_result_time = #{checkResultTime,jdbcType=TIMESTAMP},
  1508. </if>
  1509. <if test="storeQuality != null" >
  1510. store_quality = #{storeQuality,jdbcType=VARCHAR},
  1511. </if>
  1512. <if test="isPest != null" >
  1513. is_pest = #{isPest,jdbcType=VARCHAR},
  1514. </if>
  1515. <if test="inspectionStandardBasis != null" >
  1516. inspection_standard_basis = #{inspectionStandardBasis,jdbcType=VARCHAR},
  1517. </if>
  1518. <if test="quality != null" >
  1519. quality = #{quality,jdbcType=VARCHAR},
  1520. </if>
  1521. <if test="sealDate != null" >
  1522. seal_date = #{sealDate,jdbcType=TIMESTAMP},
  1523. </if>
  1524. <if test="sealStatus != null" >
  1525. seal_status = #{sealStatus,jdbcType=VARCHAR},
  1526. </if>
  1527. <if test="authCode != null" >
  1528. auth_code = #{authCode,jdbcType=VARCHAR},
  1529. </if>
  1530. <if test="orgId != null" >
  1531. org_id = #{orgId,jdbcType=INTEGER},
  1532. </if>
  1533. <if test="historyStatus != null" >
  1534. history_status = #{historyStatus,jdbcType=INTEGER},
  1535. </if>
  1536. <if test="intermixingRate != null" >
  1537. intermixing_rate = #{intermixingRate,jdbcType=VARCHAR},
  1538. </if>
  1539. <if test="smelltaste != null" >
  1540. smelltaste = #{smelltaste,jdbcType=VARCHAR},
  1541. </if>
  1542. <if test="transparency != null" >
  1543. transparency = #{transparency,jdbcType=VARCHAR},
  1544. </if>
  1545. <if test="peroxideValue != null" >
  1546. peroxide_value = #{peroxideValue,jdbcType=VARCHAR},
  1547. </if>
  1548. <if test="smokePoint != null" >
  1549. smoke_point = #{smokePoint,jdbcType=VARCHAR},
  1550. </if>
  1551. <if test="reezeTest != null" >
  1552. reeze_test = #{reezeTest,jdbcType=VARCHAR},
  1553. </if>
  1554. <if test="residualSolvent != null" >
  1555. residual_solvent = #{residualSolvent,jdbcType=VARCHAR},
  1556. </if>
  1557. <if test="lead != null" >
  1558. lead = #{lead,jdbcType=VARCHAR},
  1559. </if>
  1560. <if test="totalArsenic != null" >
  1561. total_arsenic = #{totalArsenic,jdbcType=VARCHAR},
  1562. </if>
  1563. <if test="aflatoxin != null" >
  1564. aflatoxin = #{aflatoxin,jdbcType=VARCHAR},
  1565. </if>
  1566. <if test="butylPhenol != null" >
  1567. butyl_phenol = #{butylPhenol,jdbcType=VARCHAR},
  1568. </if>
  1569. <if test="updatetime != null" >
  1570. updatetime = #{updatetime,jdbcType=TIMESTAMP},
  1571. </if>
  1572. <if test="zblb != null" >
  1573. zblb = #{zblb,jdbcType=VARCHAR},
  1574. </if>
  1575. <if test="qydbh != null" >
  1576. qydbh = #{qydbh,jdbcType=VARCHAR},
  1577. </if>
  1578. <if test="qysj != null" >
  1579. qysj = #{qysj,jdbcType=TIMESTAMP},
  1580. </if>
  1581. <if test="qyqy != null" >
  1582. qyqy = #{qyqy,jdbcType=VARCHAR},
  1583. </if>
  1584. <if test="jdrxm != null" >
  1585. jdrxm = #{jdrxm,jdbcType=VARCHAR},
  1586. </if>
  1587. <if test="ypbh != null" >
  1588. ypbh = #{ypbh,jdbcType=VARCHAR},
  1589. </if>
  1590. <if test="sfzcccnx != null" >
  1591. sfzcccnx = #{sfzcccnx,jdbcType=VARCHAR},
  1592. </if>
  1593. <if test="jylb != null" >
  1594. jylb = #{jylb,jdbcType=VARCHAR},
  1595. </if>
  1596. <if test="qfrq != null" >
  1597. qfrq = #{qfrq,jdbcType=TIMESTAMP},
  1598. </if>
  1599. <if test="ypsl != null" >
  1600. ypsl = #{ypsl,jdbcType=VARCHAR},
  1601. </if>
  1602. <if test="dbsl != null" >
  1603. dbsl = #{dbsl,jdbcType=VARCHAR},
  1604. </if>
  1605. <if test="ypdj != null" >
  1606. ypdj = #{ypdj,jdbcType=VARCHAR},
  1607. </if>
  1608. </set>
  1609. where id = #{id,jdbcType=INTEGER}
  1610. </update>
  1611. <update id="updateByPrimaryKey" parameterType="com.chinaitop.depot.agent.quality.model.BusinessAgentQuality" >
  1612. update business_agent_quality
  1613. set agent_id = #{agentId,jdbcType=INTEGER},
  1614. agent_depot_id = #{agentDepotId,jdbcType=INTEGER},
  1615. storehouse_id = #{storehouseId,jdbcType=INTEGER},
  1616. warehouse_id = #{warehouseId,jdbcType=INTEGER},
  1617. type = #{type,jdbcType=VARCHAR},
  1618. sub_type = #{subType,jdbcType=INTEGER},
  1619. sub_type_detailed = #{subTypeDetailed,jdbcType=INTEGER},
  1620. check_time = #{checkTime,jdbcType=TIMESTAMP},
  1621. check_result = #{checkResult,jdbcType=VARCHAR},
  1622. checker = #{checker,jdbcType=VARCHAR},
  1623. level = #{level,jdbcType=INTEGER},
  1624. capacity = #{capacity,jdbcType=VARCHAR},
  1625. water = #{water,jdbcType=VARCHAR},
  1626. impurity = #{impurity,jdbcType=VARCHAR},
  1627. mineral = #{mineral,jdbcType=VARCHAR},
  1628. badpart = #{badpart,jdbcType=VARCHAR},
  1629. colorsmell = #{colorsmell,jdbcType=VARCHAR},
  1630. keeper_advices = #{keeperAdvices,jdbcType=VARCHAR},
  1631. keeper_advices_time = #{keeperAdvicesTime,jdbcType=VARCHAR},
  1632. keeper_advices_paint = #{keeperAdvicesPaint,jdbcType=VARCHAR},
  1633. chief_advices = #{chiefAdvices,jdbcType=VARCHAR},
  1634. chief_advices_time = #{chiefAdvicesTime,jdbcType=TIMESTAMP},
  1635. chiet_advices_paint = #{chietAdvicesPaint,jdbcType=VARCHAR},
  1636. vice_manager_advices = #{viceManagerAdvices,jdbcType=VARCHAR},
  1637. vice_manager_advices_time = #{viceManagerAdvicesTime,jdbcType=TIMESTAMP},
  1638. vice_manager_advices_paint = #{viceManagerAdvicesPaint,jdbcType=VARCHAR},
  1639. manager_advices = #{managerAdvices,jdbcType=VARCHAR},
  1640. manager_advices_time = #{managerAdvicesTime,jdbcType=TIMESTAMP},
  1641. manager_advices_paint = #{managerAdvicesPaint,jdbcType=VARCHAR},
  1642. improve_result = #{improveResult,jdbcType=VARCHAR},
  1643. improve_time = #{improveTime,jdbcType=TIMESTAMP},
  1644. improve_paint = #{improvePaint,jdbcType=VARCHAR},
  1645. is_firstchecklevel_right = #{isFirstchecklevelRight,jdbcType=VARCHAR},
  1646. accept_unite = #{acceptUnite,jdbcType=VARCHAR},
  1647. input_time = #{inputTime,jdbcType=TIMESTAMP},
  1648. number = #{number,jdbcType=VARCHAR},
  1649. location = #{location,jdbcType=VARCHAR},
  1650. keeper = #{keeper,jdbcType=VARCHAR},
  1651. harvest_time = #{harvestTime,jdbcType=INTEGER},
  1652. goodpart = #{goodpart,jdbcType=VARCHAR},
  1653. chooser = #{chooser,jdbcType=VARCHAR},
  1654. choose_time = #{chooseTime,jdbcType=TIMESTAMP},
  1655. boldfat_index = #{boldfatIndex,jdbcType=VARCHAR},
  1656. check_type = #{checkType,jdbcType=VARCHAR},
  1657. hot_damage = #{hotDamage,jdbcType=VARCHAR},
  1658. protein_solution_ratio = #{proteinSolutionRatio,jdbcType=VARCHAR},
  1659. eat_score = #{eatScore,jdbcType=VARCHAR},
  1660. fat_index = #{fatIndex,jdbcType=VARCHAR},
  1661. husked_ration = #{huskedRation,jdbcType=VARCHAR},
  1662. full_good_ration = #{fullGoodRation,jdbcType=VARCHAR},
  1663. yellow_part = #{yellowPart,jdbcType=VARCHAR},
  1664. out_husked_ration = #{outHuskedRation,jdbcType=VARCHAR},
  1665. pests = #{pests,jdbcType=VARCHAR},
  1666. color_ratio = #{colorRatio,jdbcType=VARCHAR},
  1667. hard_index = #{hardIndex,jdbcType=VARCHAR},
  1668. gluten_water_count = #{glutenWaterCount,jdbcType=VARCHAR},
  1669. remarks = #{remarks,jdbcType=VARCHAR},
  1670. approver = #{approver,jdbcType=VARCHAR},
  1671. mildew_count = #{mildewCount,jdbcType=VARCHAR},
  1672. damage_ratio = #{damageRatio,jdbcType=VARCHAR},
  1673. hot_damage_ratio = #{hotDamageRatio,jdbcType=VARCHAR},
  1674. husked_rice_weight = #{huskedRiceWeight,jdbcType=VARCHAR},
  1675. reviewer = #{reviewer,jdbcType=VARCHAR},
  1676. apply_check_time = #{applyCheckTime,jdbcType=TIMESTAMP},
  1677. check_time_type = #{checkTimeType,jdbcType=VARCHAR},
  1678. check_result_time = #{checkResultTime,jdbcType=TIMESTAMP},
  1679. store_quality = #{storeQuality,jdbcType=VARCHAR},
  1680. is_pest = #{isPest,jdbcType=VARCHAR},
  1681. inspection_standard_basis = #{inspectionStandardBasis,jdbcType=VARCHAR},
  1682. quality = #{quality,jdbcType=VARCHAR},
  1683. seal_date = #{sealDate,jdbcType=TIMESTAMP},
  1684. seal_status = #{sealStatus,jdbcType=VARCHAR},
  1685. auth_code = #{authCode,jdbcType=VARCHAR},
  1686. org_id = #{orgId,jdbcType=INTEGER},
  1687. history_status = #{historyStatus,jdbcType=INTEGER},
  1688. intermixing_rate = #{intermixingRate,jdbcType=VARCHAR},
  1689. smelltaste = #{smelltaste,jdbcType=VARCHAR},
  1690. transparency = #{transparency,jdbcType=VARCHAR},
  1691. peroxide_value = #{peroxideValue,jdbcType=VARCHAR},
  1692. smoke_point = #{smokePoint,jdbcType=VARCHAR},
  1693. reeze_test = #{reezeTest,jdbcType=VARCHAR},
  1694. residual_solvent = #{residualSolvent,jdbcType=VARCHAR},
  1695. lead = #{lead,jdbcType=VARCHAR},
  1696. total_arsenic = #{totalArsenic,jdbcType=VARCHAR},
  1697. aflatoxin = #{aflatoxin,jdbcType=VARCHAR},
  1698. butyl_phenol = #{butylPhenol,jdbcType=VARCHAR},
  1699. updatetime = #{updatetime,jdbcType=TIMESTAMP},
  1700. zblb = #{zblb,jdbcType=VARCHAR},
  1701. qydbh = #{qydbh,jdbcType=VARCHAR},
  1702. qysj = #{qysj,jdbcType=TIMESTAMP},
  1703. qyqy = #{qyqy,jdbcType=VARCHAR},
  1704. jdrxm = #{jdrxm,jdbcType=VARCHAR},
  1705. ypbh = #{ypbh,jdbcType=VARCHAR},
  1706. sfzcccnx = #{sfzcccnx,jdbcType=VARCHAR},
  1707. jylb= #{record.jylb,jdbcType=VARCHAR},
  1708. qfrq= #{record.qfrq,jdbcType=TIMESTAMP},
  1709. ypsl= #{record.ypsl,jdbcType=VARCHAR},
  1710. dbsl= #{record.dbsl,jdbcType=VARCHAR},
  1711. ypdj= #{record.ypdj,jdbcType=VARCHAR}
  1712. where id = #{id,jdbcType=INTEGER}
  1713. </update>
  1714. <select id="getHouseIdList" parameterType="com.chinaitop.depot.agent.quality.model.BusinessAgentQuality" resultMap="BaseResultMap">
  1715. SELECT a.id id, a.storehouse_id storehouse_id, a.level level, a.sub_type_detailed sub_type_detailed
  1716. FROM
  1717. (SELECT
  1718. id,
  1719. storehouse_id,
  1720. level,
  1721. sub_type_detailed
  1722. FROM
  1723. business_agent_quality
  1724. WHERE
  1725. type = 5
  1726. ORDER BY
  1727. id DESC
  1728. ) a
  1729. GROUP BY a.storehouse_id
  1730. HAVING
  1731. <if test="level != null">
  1732. level = #{level}
  1733. </if>
  1734. AND
  1735. <if test="subTypeDetailed != null">
  1736. sub_type_detailed = #{subTypeDetailed}
  1737. </if>
  1738. </select>
  1739. <select id="getWareHouseIdList" parameterType="com.chinaitop.depot.agent.quality.model.BusinessAgentQuality" resultMap="BaseResultMap">
  1740. SELECT a.id id, a.warehouse_id warehouse_id, a.level level, a.sub_type_detailed sub_type_detailed
  1741. FROM
  1742. (SELECT
  1743. id,
  1744. warehouse_id,
  1745. level,
  1746. sub_type_detailed
  1747. FROM
  1748. business_agent_quality
  1749. WHERE
  1750. type = 5
  1751. AND
  1752. <if test="storehouseId != null">
  1753. storehouse_id = #{storehouseId, jdbcType=VARCHAR}
  1754. </if>
  1755. ORDER BY
  1756. id DESC
  1757. ) a
  1758. GROUP BY a.warehouse_id
  1759. HAVING
  1760. <if test="level != null">
  1761. level = #{level}
  1762. </if>
  1763. AND
  1764. <if test="subTypeDetailed != null">
  1765. sub_type_detailed = #{subTypeDetailed}
  1766. </if>
  1767. </select>
  1768. <select id="getThirdCheckList" resultMap="BaseResultMap">
  1769. SELECT
  1770. <include refid="Base_Column_List" />,
  1771. sqk.agent_id,sqk.agent_depot_id,sqk.storehouse_id
  1772. FROM business_agent_quality as sqk
  1773. WHERE
  1774. sqk.id not in (
  1775. SELECT
  1776. sfs.qualitycheck_id
  1777. FROM
  1778. storage_foodbasicinfochecks as sfs
  1779. WHERE
  1780. sfs.foodbasicinfo_id =#{id}
  1781. )
  1782. and sqk.type = '5'
  1783. and sqk.storehouse_id =#{storehouseId}
  1784. and sqk.warehouse_id = #{warehouseId}
  1785. </select>
  1786. <select id="getQualitycheckListByFoodbasicinfoCheck" resultMap="BaseResultMap">
  1787. SELECT
  1788. <include refid="Base_Column_List" />,
  1789. sqk.agent_id,sqk.agent_depot_id,sqk.storehouse_id
  1790. FROM business_agent_quality sqk
  1791. WHERE sqk.id in (
  1792. SELECT qualitycheck_id
  1793. FROM storage_foodbasicinfochecks fcs
  1794. WHERE fcs.foodbasicinfo_id =#{id}
  1795. and fcs.house_id =#{storehouseId}
  1796. and fcs.warehouse_id = #{warehouseId}
  1797. )
  1798. </select>
  1799. <sql id="ExtBase_Column_List">
  1800. sqk.id, sqk.warehouse_id, sqk.type, sqk.sub_type, sqk.sub_type_detailed, sqk.check_time, sqk.check_result,sqk.checker,
  1801. sqk.level, sqk.capacity, sqk.water, sqk.impurity, sqk.mineral, sqk.badpart, sqk.colorsmell, sqk.keeper_advices,
  1802. sqk.keeper_advices_time, sqk.keeper_advices_paint, sqk.chief_advices, sqk.chief_advices_time, sqk.chiet_advices_paint,
  1803. sqk.vice_manager_advices, sqk.vice_manager_advices_time, sqk.vice_manager_advices_paint, sqk.manager_advices,
  1804. sqk.manager_advices_time, sqk.manager_advices_paint, sqk.improve_result, sqk.improve_time, sqk.improve_paint,
  1805. sqk.is_firstchecklevel_right, sqk.accept_unite, sqk.input_time, sqk.number, sqk.location, sqk.keeper, sqk.harvest_time,
  1806. sqk.goodpart, sqk.chooser, sqk.choose_time, sqk.boldfat_index, sqk.check_type, sqk.hot_damage, sqk.protein_solution_ratio,
  1807. sqk.eat_score, sqk.fat_index, sqk.husked_ration, sqk.full_good_ration, sqk.yellow_part, sqk.out_husked_ration,
  1808. sqk.pests, sqk.color_ratio, sqk.hard_index, sqk.gluten_water_count, sqk.remarks, approver, sqk.mildew_count,
  1809. sqk.damage_ratio, sqk.hot_damage_ratio, sqk.husked_rice_weight, sqk.reviewer, sqk.apply_check_time, sqk.check_time_type,
  1810. sqk.check_result_time, sqk.store_quality, sqk.is_pest, sqk.inspection_standard_basis, sqk.quality, sqk.seal_date,
  1811. sqk.seal_status, sqk.auth_code, sqk.org_id, sqk.history_status,
  1812. sqk.intermixing_rate,sqk.smelltaste,sqk.transparency,sqk.peroxide_value,
  1813. sqk.smoke_point,sqk.reeze_test,sqk.residual_solvent,sqk.lead,sqk.total_arsenic,sqk.aflatoxin,sqk.butyl_phenol,
  1814. sqk.updatetime,sqk.zblb,sqk.qydbh,sqk.qyqy,sqk.jdrxm,sqk.ypbh,sqk.sfzcccnx,
  1815. sqk.jylb,sqk.ypsl,sqk.dbsl,sqk.ypdj,sqk.qfrq
  1816. <!--云南新增的字段,先注释掉方便调试-->
  1817. /*, sqk.intermixing_rate,sqk.smelltaste,sqk.transparency,sqk.peroxide_value,
  1818. sqk.smoke_point,sqk.reeze_test,sqk.residual_solvent,sqk.lead,sqk.total_arsenic,sqk.aflatoxin,sqk.butyl_phenol*/
  1819. </sql>
  1820. <select id="queryPrimaryKey" resultMap="BaseResultMap">
  1821. select
  1822. <include refid="ExtBase_Column_List" />,
  1823. sqk.agent_id,sqk.agent_depot_id,sqk.storehouse_id,
  1824. bs.storeHouse_name storehouseName,bw.warehouse_name wareHouseName
  1825. FROM business_agent_quality sqk
  1826. LEFT JOIN basic_storehouse bs on bs.storehouse_id = sqk.storehouse_id
  1827. LEFT JOIN basic_warehouse bw on bw.warehouse_id = sqk.warehouse_id
  1828. where sqk.id = #{id,jdbcType=INTEGER}
  1829. </select>
  1830. <select id="queryByExample" parameterType="com.chinaitop.depot.agent.quality.model.BusinessAgentQuality" resultMap="BaseResultMap">
  1831. SELECT
  1832. <include refid="ExtBase_Column_List"/>,
  1833. sqk.agent_id,sqk.agent_depot_id,sqk.storehouse_id,
  1834. store.storeHouse_name storehouseName,
  1835. ware.warehouse_name wareHouseName,
  1836. sfo.id foodbasicinfoId,
  1837. agent.agent_name agentName,
  1838. depot.agent_depot_name agentDepotName,
  1839. '0' AS stateType
  1840. FROM business_agent_quality sqk
  1841. LEFT JOIN basic_storehouse store ON store.storehouse_id = sqk.storehouse_id
  1842. LEFT JOIN basic_warehouse ware ON ware.warehouse_id = sqk.warehouse_id
  1843. LEFT JOIN storage_foodbasicinfo sfo on sfo.house_id = sqk.storehouse_id and sfo.warehouse_id = sqk.warehouse_id
  1844. LEFT JOIN business_agent agent ON agent.id = sqk.agent_id
  1845. LEFT JOIN business_agent_depot depot ON depot.id = sqk.agent_depot_id
  1846. <where>
  1847. (ware.library_type = 1
  1848. OR store.library_type = 1 )
  1849. <if test="agentId !=null">
  1850. and sqk.agent_id = #{agentId}
  1851. </if>
  1852. <if test="agentDepotId !=null">
  1853. and sqk.agent_depot_id = #{agentDepotId}
  1854. </if>
  1855. <if test="storehouseId !=null">
  1856. and sqk.storehouse_id = #{storehouseId}
  1857. </if>
  1858. <if test="warehouseId !=null">
  1859. and sqk.warehouse_id = #{warehouseId}
  1860. </if>
  1861. <if test="type !=null">
  1862. and sqk.type = #{type}
  1863. </if>
  1864. <if test="subTypeDetailed !=null">
  1865. and sqk.sub_type_detailed = #{subTypeDetailed}
  1866. </if>
  1867. <if test="level !=null">
  1868. and sqk.level = #{level}
  1869. </if>
  1870. <if test="historyStatus !=null">
  1871. and sqk.history_status = #{historyStatus}
  1872. </if>
  1873. <if test="sealStatus !=null">
  1874. and sqk.seal_status = #{sealStatus}
  1875. </if>
  1876. <if test="checkResult !=null">
  1877. and sqk.check_result = #{checkResult}
  1878. </if>
  1879. <if test="quality !=null">
  1880. and sqk.quality = #{quality}
  1881. </if>
  1882. <if test="subType !=null">
  1883. and sqk.sub_type = #{subType}
  1884. </if>
  1885. <if test="searchStartDate !=null">
  1886. and STR_TO_DATE(sqk.check_time, '%Y-%m-%d') <![CDATA[ >= ]]> #{searchStartDate}
  1887. </if>
  1888. <if test="searchEndDate !=null">
  1889. and STR_TO_DATE(sqk.check_time, '%Y-%m-%d') &lt;= #{searchEndDate}
  1890. </if>
  1891. AND sqk.org_id = #{orgId}
  1892. </where>
  1893. GROUP BY sqk.id
  1894. UNION ALL
  1895. select
  1896. <include refid="ExtBase_Column_List"/>,
  1897. sqk.agent_id,sqk.agent_depot_id,sqk.storehouse_id,
  1898. bstore.storeHouse_name storehouseName,
  1899. bware.warehouse_name wareHouseName,
  1900. sfo.id foodbasicinfoId,
  1901. agent.agent_name agentName,
  1902. depot.agent_depot_name agentDepotName,
  1903. '0' AS stateType
  1904. FROM business_agent_quality sqk
  1905. INNER JOIN business_agent_storehouse aStore ON aStore.storehouse_id = sqk.storehouse_id
  1906. INNER JOIN business_agent_warehouse aWare ON aWare.warehouse_id = sqk.warehouse_id
  1907. LEFT JOIN basic_storehouse bstore ON bstore.storehouse_id = aStore.storehouse_id
  1908. LEFT JOIN basic_warehouse bware ON bware.warehouse_id = aWare.warehouse_id
  1909. LEFT JOIN storage_foodbasicinfo sfo on sfo.house_id = aStore.storehouse_id and sfo.warehouse_id = aWare.warehouse_id
  1910. LEFT JOIN business_agent agent ON agent.id = sqk.agent_id
  1911. LEFT JOIN business_agent_depot depot ON depot.id = sqk.agent_depot_id
  1912. <where>
  1913. <if test="agentId !=null">
  1914. and sqk.agent_id = #{agentId}
  1915. </if>
  1916. <if test="agentDepotId !=null">
  1917. and sqk.agent_depot_id = #{agentDepotId}
  1918. </if>
  1919. <if test="storehouseId !=null">
  1920. and sqk.storehouse_id = #{storehouseId}
  1921. </if>
  1922. <if test="warehouseId !=null">
  1923. and sqk.warehouse_id = #{warehouseId}
  1924. </if>
  1925. <if test="type !=null">
  1926. and sqk.type = #{type}
  1927. </if>
  1928. <if test="subTypeDetailed !=null">
  1929. and sqk.sub_type_detailed = #{subTypeDetailed}
  1930. </if>
  1931. <if test="level !=null">
  1932. and sqk.level = #{level}
  1933. </if>
  1934. <if test="historyStatus !=null">
  1935. and sqk.history_status = #{historyStatus}
  1936. </if>
  1937. <if test="sealStatus !=null">
  1938. and sqk.seal_status = #{sealStatus}
  1939. </if>
  1940. <if test="checkResult !=null">
  1941. and sqk.check_result = #{checkResult}
  1942. </if>
  1943. AND sqk.org_id = #{orgId}
  1944. </where>
  1945. GROUP BY sqk.id
  1946. UNION ALL
  1947. select
  1948. <include refid="ExtBase_Column_List"/>,
  1949. depot.agent_id ,depot.id agent_depot_id,sqk.house_id storehouse_id,
  1950. store.storeHouse_name storehouseName,
  1951. ware.warehouse_name wareHouseName,
  1952. sfo.id foodbasicinfoId,
  1953. agent.agent_name agentName,
  1954. depot.agent_depot_name agentDepotName,
  1955. '1' AS stateType
  1956. FROM
  1957. storage_qualitycheck sqk
  1958. LEFT JOIN business_agent_depot depot ON depot.depot_id = sqk.org_id
  1959. LEFT JOIN business_agent agent ON agent.id = depot.agent_id
  1960. LEFT JOIN business_agent_storehouse house ON depot.id = house.agent_depot_id AND house.storehouse_id = sqk.house_id
  1961. AND DATE_FORMAT(house.create_time,'%Y-%m-%d') &gt;= DATE_FORMAT(sqk.check_time,'%Y-%m-%d')
  1962. LEFT JOIN basic_storehouse store ON store.storehouse_id = sqk.house_id
  1963. LEFT JOIN basic_warehouse ware ON ware.warehouse_id = sqk.warehouse_id
  1964. LEFT JOIN storage_foodbasicinfo sfo ON sfo.house_id = sqk.house_id AND sfo.warehouse_id = sqk.warehouse_id
  1965. <where>
  1966. <if test="agentId !=null">
  1967. and agent.id = #{agentId}
  1968. </if>
  1969. <if test="agentDepotId !=null">
  1970. and depot.id = #{agentDepotId}
  1971. </if>
  1972. <if test="storehouseId !=null">
  1973. and sqk.house_id = #{storehouseId}
  1974. </if>
  1975. <if test="warehouseId !=null">
  1976. and sqk.warehouse_id = #{warehouseId}
  1977. </if>
  1978. <if test="type !=null">
  1979. and sqk.type = #{type}
  1980. </if>
  1981. <if test="subTypeDetailed !=null">
  1982. and sqk.sub_type_detailed = #{subTypeDetailed}
  1983. </if>
  1984. <if test="level !=null">
  1985. and sqk.level = #{level}
  1986. </if>
  1987. <if test="historyStatus !=null">
  1988. and sqk.history_status = #{historyStatus}
  1989. </if>
  1990. <if test="sealStatus !=null">
  1991. and sqk.seal_status = #{sealStatus}
  1992. </if>
  1993. <if test="checkResult !=null">
  1994. and sqk.check_result = #{checkResult}
  1995. </if>
  1996. AND depot.org_id = #{orgId}
  1997. AND house.org_id = #{orgId}
  1998. AND house.del_flag = '1'
  1999. </where>
  2000. GROUP BY sqk.id
  2001. </select>
  2002. <select id="getStoreQualityList" resultType="java.util.Map">
  2003. select
  2004. <include refid="Base_Column_List" />,
  2005. sqk.agent_id,sqk.agent_depot_id,sqk.storehouse_id
  2006. from business_agent_quality
  2007. where
  2008. type=5 and history_status=0 and store_quality=1;
  2009. </select>
  2010. <select id="getTrdStoreQualityList" resultMap="BaseResultMap">
  2011. select
  2012. <include refid="Base_Column_List" />,
  2013. sqk.agent_id,sqk.agent_depot_id,sqk.storehouse_id
  2014. from business_agent_quality
  2015. where
  2016. type=5 and history_status=0 and store_quality=1;
  2017. </select>
  2018. <select id="getDataByZJId" resultMap="BaseResultMap" parameterType="java.util.Map" >
  2019. SELECT
  2020. quality.*,house.storehouse_name storehouseName,warehouse.warehouse_name wareHouseName, acceptance.id acceptanceId
  2021. FROM
  2022. business_plan_acceptance acceptance
  2023. INNER JOIN business_plan_acceptance_detail detail ON detail.acceptance_id = acceptance.id
  2024. INNER JOIN business_agent_quality quality ON quality.id = detail.qualitycheck_id
  2025. INNER JOIN basic_storehouse house ON house.storehouse_id = quality.storehouse_id
  2026. INNER JOIN basic_warehouse warehouse ON warehouse.warehouse_id = quality.warehouse_id
  2027. where acceptance.plan_id = #{id,jdbcType=VARCHAR}
  2028. </select>
  2029. <!--封仓的数据-->
  2030. <select id="queryByExampleData" parameterType="com.chinaitop.depot.agent.quality.model.BusinessAgentQuality" resultMap="BaseResultMap">
  2031. select
  2032. sqk.id,
  2033. sqk.storehouse_id, sqk.warehouse_id,
  2034. bs.storeHouse_name storehouseName,
  2035. bs.keeping_way keepMethod,
  2036. bs.grain_heigth height,
  2037. bs.bin_volume disperseCapacity,
  2038. bs.depot_name depotName,
  2039. bw.warehouse_name wareHouseName,
  2040. bswd.id bswdId,
  2041. bswd.in_price price
  2042. FROM business_agent_quality sqk
  2043. LEFT JOIN basic_storehouse bs on bs.storehouse_id = sqk.storehouse_id
  2044. LEFT JOIN basic_warehouse bw on bw.warehouse_id = sqk.warehouse_id
  2045. LEFT JOIN business_store_ware_detail bswd on sqk.storehouse_id = bswd.house_id and sqk.warehouse_id = bswd.warehouse_id
  2046. <where>
  2047. <if test="storehouseId !=null">
  2048. and sqk.storehouse_id = #{storehouseId}
  2049. </if>
  2050. <if test="warehouseId !=null">
  2051. and sqk.warehouse_id = #{warehouseId}
  2052. </if>
  2053. <if test="id != null">
  2054. and sqk.id = #{id}
  2055. </if>
  2056. <if test="type !=null">
  2057. and sqk.type = #{type}
  2058. </if>
  2059. <if test="subTypeDetailed !=null">
  2060. and sqk.sub_type_detailed = #{subTypeDetailed}
  2061. </if>
  2062. <if test="level !=null">
  2063. and sqk.level = #{level}
  2064. </if>
  2065. <if test="historyStatus !=null">
  2066. and sqk.history_status = #{historyStatus}
  2067. </if>
  2068. <if test="sealStatus !=null">
  2069. and sqk.seal_status = #{sealStatus}
  2070. </if>
  2071. <if test="notice !=null">
  2072. and bswd.type = "notice"
  2073. </if>
  2074. </where>
  2075. GROUP BY sqk.id,bswd.in_price
  2076. order by sqk.id desc
  2077. </select>
  2078. <select id="queryByQualitycheckusiness" parameterType="com.chinaitop.depot.agent.quality.model.BusinessAgentQuality" resultMap="BaseResultMap">
  2079. SELECT DISTINCT
  2080. sqk.id,
  2081. sqk.storehouse_id,
  2082. sqk.warehouse_id
  2083. FROM business_agent_quality sqk
  2084. LEFT JOIN business_store_ware_detail bswd on sqk.storehouse_id = bswd.house_id and sqk.warehouse_id = bswd.warehouse_id
  2085. <where>
  2086. <if test="storehouseId !=null">
  2087. and sqk.storehouse_id = #{storehouseId}
  2088. </if>
  2089. <if test="warehouseId !=null">
  2090. and sqk.warehouse_id = #{warehouseId}
  2091. </if>
  2092. <if test="id != null">
  2093. and sqk.id = #{id}
  2094. </if>
  2095. <if test="type !=null">
  2096. and sqk.type = #{type}
  2097. </if>
  2098. <if test="historyStatus !=null">
  2099. and sqk.history_status = #{historyStatus}
  2100. </if>
  2101. <if test="sealStatus !=null">
  2102. and sqk.seal_status = #{sealStatus}
  2103. </if>
  2104. </where>
  2105. and bswd.type = "notice"
  2106. </select>
  2107. </mapper>