|
@@ -1102,13 +1102,17 @@
|
|
|
</select>
|
|
|
|
|
|
<select id="getBillItemByParam" resultType="com.jsh.erp.datasource.entities.MaterialVo4Unit">
|
|
|
- select m.id, m.name, m.standard, m.model, me.id meId,me.commodity_unit commodityUnit,
|
|
|
- me.purchase_decimal purchaseDecimal, me.wholesale_decimal wholesaleDecimal, me.bar_code mBarCode, me.sku
|
|
|
+ select m.*,u.name unit_name, me.id meId, me.commodity_unit, me.purchase_decimal, me.commodity_decimal,
|
|
|
+ me.wholesale_decimal, me.low_decimal, me.sku,
|
|
|
+ me.production_date, me.expiry_num, me.supplier_id, me.bar_code, me.batch_number, me.depot_id, me.position,d.`name` depotName,s.supplier supplierName
|
|
|
from jsh_material m
|
|
|
left join jsh_material_extend me on m.id=me.material_id and ifnull(me.delete_Flag,'0') !='1'
|
|
|
+ left join jsh_unit u on m.unit_id=u.id and ifnull(u.delete_Flag,'0') !='1'
|
|
|
+ left JOIN jsh_depot d on me.depot_id = d.id and ifnull(d.delete_Flag,'0') !='1'
|
|
|
+ left JOIN jsh_supplier s on me.supplier_id = s.id and ifnull(s.delete_Flag,'0') !='1'
|
|
|
where 1=1
|
|
|
- <if test="barCodes != null">
|
|
|
- and me.batch_number in (${barCodes})
|
|
|
+ <if test="batchNumbers != null">
|
|
|
+ and me.batch_number in (${batchNumbers})
|
|
|
</if>
|
|
|
and ifnull(m.delete_flag,'0') !='1'
|
|
|
order by m.id desc
|