35 lines
1.4 KiB
XML
35 lines
1.4 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
<mapper namespace="com.suisung.mall.shop.invoicing.mapper.InvoicingStockBillMapper">
|
|
|
|
<!-- 通用查询结果列 -->
|
|
<sql id="Base_Column_List">
|
|
stock_bill_id, stock_bill_number, stock_bill_checked, stock_bill_date, stock_bill_modify_time, stock_bill_time,
|
|
bill_type_id, stock_transport_type_id, store_id, warehouse_id, order_id, stock_bill_remark, employee_id,
|
|
admin_id, stock_bill_other_money, stock_bill_amount, stock_bill_enable, stock_bill_src_id
|
|
</sql>
|
|
|
|
<select id="getBillList" resultType="java.util.Map">
|
|
SELECT
|
|
*
|
|
FROM
|
|
invoicing_stock_bill a
|
|
LEFT JOIN invoicing_warehouse_base b ON a.warehouse_id = b.warehouse_id
|
|
LEFT JOIN invoicing_stock_bill_item c ON a.stock_bill_id = c.stock_bill_id
|
|
LEFT JOIN shop_base_product_unit e ON c.unit_id = e.unit_id
|
|
<where>
|
|
|
|
<if test="warehouse_name != null">
|
|
b.warehouse_name like concat('%', #{warehouse_name}, '%')
|
|
</if>
|
|
<if test="item_Id != null">
|
|
c.item_id like concat('%', #{item_Id}, '%')
|
|
</if>
|
|
AND c.item_id = #{item_id}
|
|
AND b.warehouse_id = #{warehouse_id}
|
|
</where>
|
|
|
|
</select>
|
|
|
|
</mapper>
|