InvLotLocIdMapper.xml 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE mapper
  3. PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  4. "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  5. <mapper namespace="com.ruoyi.ams.inv.mapper.InvLotLocIdMapper">
  6. <resultMap type="InvLotLocId" id="InvLotLocIdResult">
  7. <result property="lotnum" column="lotnum" />
  8. <result property="locationId" column="location_id" />
  9. <result property="traceid" column="traceid" />
  10. <result property="customerId" column="customer_id" />
  11. <result property="sku" column="sku" />
  12. <result property="qty" column="qty" />
  13. <result property="qtyEach" column="qty_each" />
  14. <result property="qtyallocated" column="qtyallocated" />
  15. <result property="qtyallocatedEach" column="qtyallocated_each" />
  16. <result property="qtypa" column="qtypa" />
  17. <result property="qtyrpin" column="qtyrpin" />
  18. <result property="qtyrpout" column="qtyrpout" />
  19. <result property="qtymvin" column="qtymvin" />
  20. <result property="qtymvout" column="qtymvout" />
  21. <result property="qtyonhold" column="qtyonhold" />
  22. <result property="createBy" column="create_by" />
  23. <result property="createTime" column="create_time" />
  24. <result property="updateBy" column="update_by" />
  25. <result property="updateTime" column="update_time" />
  26. <result property="remark" column="remark" />
  27. </resultMap>
  28. <resultMap type="invLotLocIdLotattVO" id="InvLotLocIdLotattResult">
  29. <result property="lotnum" column="lotnum" />
  30. <result property="locationNo" column="location_no" />
  31. <result property="locationId" column="location_id" />
  32. <result property="sku" column="sku" />
  33. <result property="skuName" column="sku_name" />
  34. <result property="qty" column="qty" />
  35. <result property="qtyallocated" column="qtyallocated" />
  36. <result property="lotnum" column="lotnum" />
  37. <result property="lotatt01" column="lotatt01" />
  38. <result property="lotatt02" column="lotatt02" />
  39. <result property="lotatt03" column="lotatt03" />
  40. <result property="lotatt04" column="lotatt04" />
  41. <result property="lotatt05" column="lotatt05" />
  42. <result property="lotatt06" column="lotatt06" />
  43. <result property="lotatt07" column="lotatt07" />
  44. <result property="lotatt08" column="lotatt08" />
  45. <result property="lotatt09" column="lotatt09" />
  46. <result property="lotatt10" column="lotatt10" />
  47. <result property="lotatt11" column="lotatt11" />
  48. <result property="lotatt12" column="lotatt12" />
  49. <result property="lotatt13" column="lotatt13" />
  50. <result property="lotatt14" column="lotatt14" />
  51. <result property="lotatt15" column="lotatt15" />
  52. <result property="lotatt16" column="lotatt16" />
  53. <result property="lotatt17" column="lotatt17" />
  54. <result property="lotatt18" column="lotatt18" />
  55. </resultMap>
  56. <resultMap type="BaseLocationLotattVO" id="BaseLocationInfoLotattResult">
  57. <result property="id" column="id" />
  58. <result property="warehouseId" column="warehouse_id" />
  59. <result property="zoneId" column="zone_id" />
  60. <result property="locationNo" column="location_no" />
  61. <result property="locationBarcode" column="location_barcode" />
  62. <result property="rowNo" column="row_no" />
  63. <result property="rowIndex" column="row_index" />
  64. <result property="colNo" column="col_no" />
  65. <result property="colIndex" column="col_index" />
  66. <result property="shiftNo" column="shift_no" />
  67. <result property="shiftIndex" column="shift_index" />
  68. <result property="stockStatus" column="stock_status" />
  69. <result property="isEmpty" column="is_empty" />
  70. <result property="bindSku" column="bind_sku" />
  71. <result property="locationType" column="location_type" />
  72. <result property="rackId" column="rack_id" />
  73. <result property="agvStation" column="agv_station" />
  74. <result property="foldedTag" column="folded_tag" />
  75. <result property="foldedCount" column="folded_count" />
  76. <result property="userdefine1" column="userdefine1" />
  77. <result property="userdefine2" column="userdefine2" />
  78. <result property="userdefine3" column="userdefine3" />
  79. <result property="userdefine4" column="userdefine4" />
  80. <result property="userdefine5" column="userdefine5" />
  81. <result property="userdefine6" column="userdefine6" />
  82. <result property="userdefine7" column="userdefine7" />
  83. <result property="userdefine8" column="userdefine8" />
  84. <result property="userdefine9" column="userdefine9" />
  85. <result property="userdefine10" column="userdefine10" />
  86. <result property="createBy" column="create_by" />
  87. <result property="createTime" column="create_time" />
  88. <result property="updateBy" column="update_by" />
  89. <result property="updateTime" column="update_time" />
  90. <result property="remark" column="remark" />
  91. <result property="sku" column="sku" />
  92. <result property="qty" column="qty" />
  93. <result property="lotattVO.lotatt01" column="lotatt01" />
  94. <result property="lotattVO.lotatt02" column="lotatt02" />
  95. <result property="lotattVO.lotatt03" column="lotatt03" />
  96. <result property="lotattVO.lotatt04" column="lotatt04" />
  97. <result property="lotattVO.lotatt05" column="lotatt05" />
  98. <result property="lotattVO.lotatt06" column="lotatt06" />
  99. <result property="lotattVO.lotatt07" column="lotatt07" />
  100. <result property="lotattVO.lotatt08" column="lotatt08" />
  101. <result property="lotattVO.lotatt09" column="lotatt09" />
  102. <result property="lotattVO.lotatt10" column="lotatt10" />
  103. <result property="lotattVO.lotatt11" column="lotatt11" />
  104. <result property="lotattVO.lotatt12" column="lotatt12" />
  105. <result property="lotattVO.lotatt13" column="lotatt13" />
  106. <result property="lotattVO.lotatt14" column="lotatt14" />
  107. <result property="lotattVO.lotatt15" column="lotatt15" />
  108. <result property="lotattVO.lotatt16" column="lotatt16" />
  109. <result property="lotattVO.lotatt17" column="lotatt17" />
  110. <result property="lotattVO.lotatt18" column="lotatt18" />
  111. </resultMap>
  112. <sql id="selectInvLotLocIdVo">
  113. select lotnum, location_id, traceid, customer_id, sku, qty, qty_each, qtyallocated, qtyallocated_each, qtypa, qtyrpin, qtyrpout, qtymvin, qtymvout, qtyonhold, create_by, create_time, update_by, update_time, remark from inv_lot_loc_id
  114. </sql>
  115. <select id="selectInvLotLocIdList" parameterType="InvLotLocId" resultMap="InvLotLocIdResult">
  116. <include refid="selectInvLotLocIdVo"/>
  117. <where>
  118. <if test="traceid != null and traceid != ''"> and traceid = #{traceid}</if>
  119. </where>
  120. </select>
  121. <select id="selectInvLotLocIdByLotnum" parameterType="String" resultMap="InvLotLocIdResult">
  122. <include refid="selectInvLotLocIdVo"/>
  123. where lotnum = #{lotnum}
  124. </select>
  125. <insert id="insertInvLotLocId" parameterType="InvLotLocId">
  126. insert into inv_lot_loc_id
  127. <trim prefix="(" suffix=")" suffixOverrides=",">
  128. <if test="lotnum != null">lotnum,</if>
  129. <if test="locationId != null">location_id,</if>
  130. <if test="traceid != null">traceid,</if>
  131. <if test="customerId != null">customer_id,</if>
  132. <if test="sku != null">sku,</if>
  133. <if test="qty != null">qty,</if>
  134. <if test="qtyEach != null">qty_each,</if>
  135. <if test="qtyallocated != null">qtyallocated,</if>
  136. <if test="qtyallocatedEach != null">qtyallocated_each,</if>
  137. <if test="qtypa != null">qtypa,</if>
  138. <if test="qtyrpin != null">qtyrpin,</if>
  139. <if test="qtyrpout != null">qtyrpout,</if>
  140. <if test="qtymvin != null">qtymvin,</if>
  141. <if test="qtymvout != null">qtymvout,</if>
  142. <if test="qtyonhold != null">qtyonhold,</if>
  143. <if test="createBy != null">create_by,</if>
  144. <if test="createTime != null">create_time,</if>
  145. <if test="updateBy != null">update_by,</if>
  146. <if test="updateTime != null">update_time,</if>
  147. <if test="remark != null">remark,</if>
  148. </trim>
  149. <trim prefix="values (" suffix=")" suffixOverrides=",">
  150. <if test="lotnum != null">#{lotnum},</if>
  151. <if test="locationId != null">#{locationId},</if>
  152. <if test="traceid != null">#{traceid},</if>
  153. <if test="customerId != null">#{customerId},</if>
  154. <if test="sku != null">#{sku},</if>
  155. <if test="qty != null">#{qty},</if>
  156. <if test="qtyEach != null">#{qtyEach},</if>
  157. <if test="qtyallocated != null">#{qtyallocated},</if>
  158. <if test="qtyallocatedEach != null">#{qtyallocatedEach},</if>
  159. <if test="qtypa != null">#{qtypa},</if>
  160. <if test="qtyrpin != null">#{qtyrpin},</if>
  161. <if test="qtyrpout != null">#{qtyrpout},</if>
  162. <if test="qtymvin != null">#{qtymvin},</if>
  163. <if test="qtymvout != null">#{qtymvout},</if>
  164. <if test="qtyonhold != null">#{qtyonhold},</if>
  165. <if test="createBy != null">#{createBy},</if>
  166. <if test="createTime != null">#{createTime},</if>
  167. <if test="updateBy != null">#{updateBy},</if>
  168. <if test="updateTime != null">#{updateTime},</if>
  169. <if test="remark != null">#{remark},</if>
  170. </trim>
  171. </insert>
  172. <update id="updateInvLotLocId" parameterType="InvLotLocId">
  173. update inv_lot_loc_id
  174. <trim prefix="SET" suffixOverrides=",">
  175. <if test="locationId != null">location_id = #{locationId},</if>
  176. <if test="traceid != null">traceid = #{traceid},</if>
  177. <if test="customerId != null">customer_id = #{customerId},</if>
  178. <if test="sku != null">sku = #{sku},</if>
  179. <if test="qty != null">qty = #{qty},</if>
  180. <if test="qtyEach != null">qty_each = #{qtyEach},</if>
  181. <if test="qtyallocated != null">qtyallocated = #{qtyallocated},</if>
  182. <if test="qtyallocatedEach != null">qtyallocated_each = #{qtyallocatedEach},</if>
  183. <if test="qtypa != null">qtypa = #{qtypa},</if>
  184. <if test="qtyrpin != null">qtyrpin = #{qtyrpin},</if>
  185. <if test="qtyrpout != null">qtyrpout = #{qtyrpout},</if>
  186. <if test="qtymvin != null">qtymvin = #{qtymvin},</if>
  187. <if test="qtymvout != null">qtymvout = #{qtymvout},</if>
  188. <if test="qtyonhold != null">qtyonhold = #{qtyonhold},</if>
  189. <if test="createBy != null">create_by = #{createBy},</if>
  190. <if test="createTime != null">create_time = #{createTime},</if>
  191. <if test="updateBy != null">update_by = #{updateBy},</if>
  192. <if test="updateTime != null">update_time = #{updateTime},</if>
  193. <if test="remark != null">remark = #{remark},</if>
  194. </trim>
  195. where lotnum = #{lotnum}
  196. </update>
  197. <delete id="deleteInvLotLocIdByLotnum" parameterType="String">
  198. delete from inv_lot_loc_id where lotnum = #{lotnum}
  199. </delete>
  200. <delete id="deleteInvLotLocIdByLotnums" parameterType="String">
  201. delete from inv_lot_loc_id where lotnum in
  202. <foreach item="lotnum" collection="array" open="(" separator="," close=")">
  203. #{lotnum}
  204. </foreach>
  205. </delete>
  206. <select id="selectInvLocationList" resultMap="BaseLocationInfoLotattResult">
  207. select
  208. b.id, b.warehouse_id, b.zone_id, b.location_no, b.location_barcode, b.row_no, b.row_index, b.col_no, b.col_index, b.shift_no,
  209. b.shift_index, b.stock_status, b.is_empty, b.bind_sku, b.location_type, b.rack_id, b.agv_station, b.folded_tag, b.folded_count,
  210. b.userdefine1, b.userdefine2, b.userdefine3, b.userdefine4, b.userdefine5, b.userdefine6, b.userdefine7, b.userdefine8,
  211. b.userdefine9, b.userdefine10, b.create_by, b.create_time, b.update_by, b.update_time, b.remark, inv.sku, inv.qty, att.*
  212. from inv_lot_loc_id inv
  213. left join inv_lot_att att on inv.lotnum = att.lotnum
  214. left join base_location_info b on inv.location_id = b.id
  215. left join base_sku sk on inv.sku = sk.sku
  216. left join base_sku_type skt on sk.sku_type = skt.item_code
  217. <where>
  218. <if test="zoneId != null and zoneId != ''"> and b.zone_id = #{zoneId}</if>
  219. <if test="sku != null and sku != ''"> and sk.sku = #{sku}</if>
  220. <if test="skuType != null and skuType != ''"> and skt.item_code = #{skuType}</if>
  221. </where>
  222. order by lpad(b.row_no, 11, '0'),b.row_index,lpad(b.shift_no, 11, '0'),b.shift_index,lpad(b.col_no, 11, '0'),b.col_index desc
  223. </select>
  224. <select id="selectInvZoneBySkuLotatt" resultMap="BaseLocationInfoLotattResult">
  225. select
  226. b.zone_id
  227. from inv_lot_loc_id inv
  228. left join inv_lot_att att on inv.lotnum = att.lotnum
  229. left join base_location_info b on inv.location_id = b.id
  230. left join base_sku sk on inv.sku = sk.sku
  231. left join base_sku_type skt on sk.sku_type = skt.item_code
  232. left join base_location_zone bz on b.zone_id = bz.zone_id
  233. <where>
  234. <if test="sku != null and sku != ''"> and sk.sku = #{sku}</if>
  235. <if test="skuType != null and skuType != ''"> and skt.item_code = #{skuType}</if>
  236. <if test="lotattDTO.lotatt01 != null and lotattDTO.lotatt01 != ''"> and att.lotatt01 = #{lotattDTO.lotatt01}</if>
  237. <if test="lotattDTO.lotatt02 != null and lotattDTO.lotatt02 != ''"> and att.lotatt02 = #{lotattDTO.lotatt02}</if>
  238. <if test="lotattDTO.lotatt03 != null and lotattDTO.lotatt03 != ''"> and att.lotatt03 = #{lotattDTO.lotatt03}</if>
  239. <if test="lotattDTO.lotatt04 != null and lotattDTO.lotatt04 != ''"> and att.lotatt04 = #{lotattDTO.lotatt04}</if>
  240. <if test="lotattDTO.lotatt05 != null and lotattDTO.lotatt05 != ''"> and att.lotatt05 = #{lotattDTO.lotatt05}</if>
  241. <if test="lotattDTO.lotatt06 != null and lotattDTO.lotatt06 != ''"> and att.lotatt06 = #{lotattDTO.lotatt06}</if>
  242. <if test="lotattDTO.lotatt07 != null and lotattDTO.lotatt07 != ''"> and att.lotatt07 = #{lotattDTO.lotatt07}</if>
  243. <if test="lotattDTO.lotatt08 != null and lotattDTO.lotatt08 != ''"> and att.lotatt08 = #{lotattDTO.lotatt08}</if>
  244. <if test="lotattDTO.lotatt09 != null and lotattDTO.lotatt09 != ''"> and att.lotatt09 = #{lotattDTO.lotatt09}</if>
  245. <if test="lotattDTO.lotatt10 != null and lotattDTO.lotatt10 != ''"> and att.lotatt10 = #{lotattDTO.lotatt10}</if>
  246. <if test="lotattDTO.lotatt11 != null and lotattDTO.lotatt11 != ''"> and att.lotatt11 = #{lotattDTO.lotatt11}</if>
  247. <if test="lotattDTO.lotatt12 != null and lotattDTO.lotatt12 != ''"> and att.lotatt12 = #{lotattDTO.lotatt12}</if>
  248. <if test="lotattDTO.lotatt13 != null and lotattDTO.lotatt13 != ''"> and att.lotatt13 = #{lotattDTO.lotatt13}</if>
  249. <if test="lotattDTO.lotatt14 != null and lotattDTO.lotatt14 != ''"> and att.lotatt14 = #{lotattDTO.lotatt14}</if>
  250. <if test="lotattDTO.lotatt15 != null and lotattDTO.lotatt15 != ''"> and att.lotatt15 = #{lotattDTO.lotatt15}</if>
  251. <if test="lotattDTO.lotatt16 != null and lotattDTO.lotatt16 != ''"> and att.lotatt16 = #{lotattDTO.lotatt16}</if>
  252. <if test="lotattDTO.lotatt17 != null and lotattDTO.lotatt17 != ''"> and att.lotatt17 = #{lotattDTO.lotatt17}</if>
  253. <if test="lotattDTO.lotatt18 != null and lotattDTO.lotatt18 != ''"> and att.lotatt18 = #{lotattDTO.lotatt18}</if>
  254. </where>
  255. and bz.userdefine1 = 'INV'
  256. </select>
  257. <select id="selectInvLocIdLotattList" resultMap="InvLotLocIdLotattResult">
  258. select
  259. inv.location_id,sk.sku,sk.desc1 sku_name,b.location_no,inv.qty,inv.qtyallocated
  260. ,att.lotnum, att.customer_id, lotatt01, lotatt02, lotatt03, lotatt04,lot05_dict.dict_label lotatt05, supp.supplier_name lotatt06, lotatt07, lotatt08, lotatt09, lotatt10, lotatt11, lotatt12, lotatt13, lotatt14, lotatt15, lotatt16, lotatt17, lotatt18
  261. from inv_lot_loc_id inv
  262. left join inv_lot_att att on inv.lotnum = att.lotnum
  263. left join base_location_info b on inv.location_id = b.id
  264. left join base_sku sk on inv.sku = sk.sku
  265. left join base_sku_type skt on sk.sku_type = skt.item_code
  266. left join (select dict_label,dict_value from sys_dict_data where dict_type = 'ams_inv_quality') lot05_dict on att.lotatt05 = lot05_dict.dict_value
  267. left join (select * from base_supplier) supp on att.lotatt06 = supp.supplier_id
  268. <where>
  269. <if test="zoneId != null and zoneId != ''"> and b.zone_id = #{zoneId}</if>
  270. <if test="sku != null and sku != ''"> and (sk.sku like concat('%', #{sku}, '%') or sk.desc1 like concat('%', #{sku}, '%'))</if>
  271. <if test="locationNo != null and locationNo != ''"> and b.location_no like concat('%', #{locationNo}, '%')</if>
  272. </where>
  273. order by lpad(b.row_no, 11, '0'),b.row_index,lpad(b.shift_no, 11, '0'),b.shift_index,lpad(b.col_no, 11, '0'),b.col_index desc
  274. </select>
  275. <select id="selectInvLocIdLotattByLocationId" resultMap="InvLotLocIdLotattResult">
  276. select
  277. inv.location_id,sk.sku,sk.desc1 sku_name,b.location_no,inv.qty,inv.qtyallocated
  278. ,att.lotnum, att.customer_id, lotatt01, lotatt02, lotatt03, lotatt04, lotatt05, lotatt06, lotatt07, lotatt08, lotatt09, lotatt10, lotatt11, lotatt12, lotatt13, lotatt14, lotatt15, lotatt16, lotatt17, lotatt18
  279. from inv_lot_loc_id inv
  280. left join inv_lot_att att on inv.lotnum = att.lotnum
  281. left join base_location_info b on inv.location_id = b.id
  282. left join base_sku sk on inv.sku = sk.sku
  283. left join base_sku_type skt on sk.sku_type = skt.item_code
  284. where inv.location_id = #{locationId}
  285. </select>
  286. <delete id="deleteInvLotLocIdByLocationId" parameterType="Long">
  287. delete from inv_lot_loc_id where location_id = #{locationId}
  288. </delete>
  289. <update id="updateInvLotLocIdLocationId">
  290. update inv_lot_loc_id set location_id = #{locationTo} where location_id = #{locationFrom}
  291. </update>
  292. <update id="clearInvByLocationId">
  293. delete from inv_lot_loc_id where location_id = #{locationId}
  294. </update>
  295. <select id="queryInvBySku" resultType="double">
  296. select
  297. count(inv.qty) qty
  298. from inv_lot_loc_id inv
  299. left join inv_lot_att att on inv.lotnum = att.lotnum
  300. left join base_location_info b on inv.location_id = b.id
  301. left join base_sku sk on inv.sku = sk.sku
  302. left join base_sku_type skt on sk.sku_type = skt.item_code
  303. left join base_location_zone bz on b.zone_id = bz.zone_id
  304. <where>
  305. <if test="sku != null and sku != ''"> and sk.sku = #{sku}</if>
  306. <if test="lotattDTO.lotatt01 != null and lotattDTO.lotatt01 != ''"> and att.lotatt01 = #{lotattDTO.lotatt01}</if>
  307. <if test="lotattDTO.lotatt02 != null and lotattDTO.lotatt02 != ''"> and att.lotatt02 = #{lotattDTO.lotatt02}</if>
  308. <if test="lotattDTO.lotatt03 != null and lotattDTO.lotatt03 != ''"> and att.lotatt03 = #{lotattDTO.lotatt03}</if>
  309. <if test="lotattDTO.lotatt04 != null and lotattDTO.lotatt04 != ''"> and att.lotatt04 = #{lotattDTO.lotatt04}</if>
  310. <if test="lotattDTO.lotatt05 != null and lotattDTO.lotatt05 != ''"> and att.lotatt05 = #{lotattDTO.lotatt05}</if>
  311. <if test="lotattDTO.lotatt06 != null and lotattDTO.lotatt06 != ''"> and att.lotatt06 = #{lotattDTO.lotatt06}</if>
  312. <if test="lotattDTO.lotatt07 != null and lotattDTO.lotatt07 != ''"> and att.lotatt07 = #{lotattDTO.lotatt07}</if>
  313. <if test="lotattDTO.lotatt08 != null and lotattDTO.lotatt08 != ''"> and att.lotatt08 = #{lotattDTO.lotatt08}</if>
  314. <if test="lotattDTO.lotatt09 != null and lotattDTO.lotatt09 != ''"> and att.lotatt09 = #{lotattDTO.lotatt09}</if>
  315. <if test="lotattDTO.lotatt10 != null and lotattDTO.lotatt10 != ''"> and att.lotatt10 = #{lotattDTO.lotatt10}</if>
  316. <if test="lotattDTO.lotatt11 != null and lotattDTO.lotatt11 != ''"> and att.lotatt11 = #{lotattDTO.lotatt11}</if>
  317. <if test="lotattDTO.lotatt12 != null and lotattDTO.lotatt12 != ''"> and att.lotatt12 = #{lotattDTO.lotatt12}</if>
  318. <if test="lotattDTO.lotatt13 != null and lotattDTO.lotatt13 != ''"> and att.lotatt13 = #{lotattDTO.lotatt13}</if>
  319. <if test="lotattDTO.lotatt14 != null and lotattDTO.lotatt14 != ''"> and att.lotatt14 = #{lotattDTO.lotatt14}</if>
  320. <if test="lotattDTO.lotatt15 != null and lotattDTO.lotatt15 != ''"> and att.lotatt15 = #{lotattDTO.lotatt15}</if>
  321. <if test="lotattDTO.lotatt16 != null and lotattDTO.lotatt16 != ''"> and att.lotatt16 = #{lotattDTO.lotatt16}</if>
  322. <if test="lotattDTO.lotatt17 != null and lotattDTO.lotatt17 != ''"> and att.lotatt17 = #{lotattDTO.lotatt17}</if>
  323. <if test="lotattDTO.lotatt18 != null and lotattDTO.lotatt18 != ''"> and att.lotatt18 = #{lotattDTO.lotatt18}</if>
  324. </where>
  325. and bz.userdefine1 = 'INV'
  326. </select>
  327. </mapper>