You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
54 lines
3.6 KiB
54 lines
3.6 KiB
<?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.ruoyi.invoice.mapper.PoInvoiceHeadWithListMapper">
|
|
|
|
|
|
<select id="selectPoInvoiceHeadWithList" resultType="com.ruoyi.invoice.domain.PoInvoiceHeadWithList" parameterType="PoInvoiceHeadWithList">
|
|
SELECT
|
|
poinvoicehead.invoiceid as invoiceId,
|
|
poinvoicehead.Invoiceno as invoiceNo,
|
|
poinvoicehead.p_code as pCode,
|
|
poinvoicehead.P_name as pName,
|
|
poinvoicehead.HTNO as HTNo,
|
|
poinvoicehead.PAYWAY as payWay,
|
|
poinvoicehead.invoicedate as invoiceDate,
|
|
poinvoicelist.orderno as orderNo,
|
|
poinvoicelist.wl_code as wlCode,
|
|
poinvoicelist.itemname as itemName,
|
|
poinvoicelist.stock_dw as stockDw,
|
|
poinvoicelist.crl_name as crlName,
|
|
poinvoicelist.qty as qty,
|
|
poinvoicelist.price as price,
|
|
poinvoicelist.amt as amt,
|
|
poinvoicehead.tax_invoice_no as taxInvoiceNo,
|
|
poinvoicehead.tax_print_version as taxPriceVersion,
|
|
poinvoicehead.GetMoney_Flag as getMoneyFlag
|
|
FROM
|
|
`poinvoicehead`
|
|
right JOIN poinvoicelist ON poinvoicehead.invoiceid = poinvoicelist.invoiceid
|
|
<where>
|
|
<if test="invoiceId!=null and invoiceId!=''">and poinvoicehead.invoiceid like concat('%', #{invoiceId}, '%')</if>
|
|
<if test="invoiceNo!=null and invoiceNo!=''">and poinvoicehead.Invoiceno like concat('%', #{invoiceNo}, '%')</if>
|
|
<if test="pCode!=null and pCode!=''">and poinvoicehead.p_code like concat('%', #{pCode}, '%')</if>
|
|
<if test="pName!=null and pName!=''">and poinvoicehead.P_name like concat('%', #{pName}, '%')</if>
|
|
<if test="HTNo!=null and HTNo!=''">and poinvoicehead.HTNO like concat('%', #{HTNo}, '%')</if>
|
|
<if test="payWay!=null and payWay!=''">and poinvoicehead.PAYWAY like concat('%', #{payWay}, '%')</if>
|
|
<if test="orderNo!=null and orderNo!=''">and poinvoicelist.orderno like concat('%', #{orderNo}, '%')</if>
|
|
<if test="wlCode!=null and wlCode!=''">and poinvoicelist.wl_code like concat('%', #{wlCode}, '%')</if>
|
|
<if test="itemName!=null and itemName!=''">and poinvoicelist.itemname like concat('%', #{itemName}, '%')</if>
|
|
<if test="stockDw!=null and stockDw!=''">and poinvoicelist.stock_dw like concat('%', #{stockDw}, '%')</if>
|
|
<if test="crlName!=null and crlName!=''">and poinvoicelist.crl_name like concat('%', #{crlName}, '%')</if>
|
|
<if test="qty!=null and qty!=''">and poinvoicelist.qty like concat('%', #{qty}, '%')</if>
|
|
<if test="price!=null and price!=''">and poinvoicelist.price like concat('%', #{price}, '%')</if>
|
|
<if test="amt!=null and amt!=''">and poinvoicelist.amt like concat('%', #{amt}, '%')</if>
|
|
<if test="taxInvoiceNo!=null and taxInvoiceNo!=''">and poinvoicehead.tax_invoice_no like concat('%', #{taxInvoiceNo}, '%')</if>
|
|
<if test="taxPriceVersion!=null and taxPriceVersion!=''">and poinvoicehead.tax_print_version like concat('%', #{taxPriceVersion}, '%')</if>
|
|
<if test="getMoneyFlag!=null and getMoneyFlag!=''">and poinvoicehead.GetMoney_Flag like concat('%', #{getMoneyFlag}, '%')</if>
|
|
<if test="params.beginInvoiceDate != null and params.beginInvoiceDate !=''"> and invoiceDate >= #{params.beginInvoiceDate}</if>
|
|
<if test="params.endInvoiceDate != null and params.endInvoiceDate != ''">and #{params.endInvoiceDate} >= invoiceDate</if>
|
|
</where>
|
|
</select>
|
|
|
|
</mapper>
|