万材erp项目
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.4 KiB

2 years ago
<?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.PoInvoiceChooseItemMapper">
<select id="selectPoInvoiceChooseItemList" resultType="com.ruoyi.invoice.domain.PoInvoiceChooseItem" parameterType="PoInvoiceChooseItem">
SELECT
stocklist.stockno as stockNo,
stock_info.stockname as stockName,
stocklist.Wl_Code as wlCode,
stocklist.Itemname as itemName,
stocklist.Itemstandard as itemStandard,
stocklist.Stock_dw as stockDw,
stocklist.wldm as wldm,
stocklist.now_juan as nowJuan,
stocklist.now_qty as nowQty,
stocklist.PO_PI_NO as poPiNo,
stocklist.Inclass as inClass,
stocklist.Default_position as defaultPosition,
item_info.weight as weight,
item_info.FU_Width as fuWidth,
item_info.Long_Width as longWidth,
item_info.p_wldm as pWldm,
item_info.MadeClass as madeClass,
stocklist.ItemClass as itemClass
FROM
`stocklist`
LEFT JOIN stock_info ON stocklist.stockno = stock_info.StockNO
LEFT JOIN item_info ON item_info.Wl_Code = stocklist.Wl_Code
<where>
<if test="stockNo!=null and stockNo!=''">and stocklist.stockno like concat('%', #{stockNo}, '%')</if>
<if test="stockName!=null and stockName!=''">and stock_info.stockname like concat('%', #{stockName}, '%')</if>
<if test="wlCode!=null and wlCode!=''">and stocklist.Wl_Code like concat('%', #{wlCode}, '%')</if>
<if test="itemName!=null and itemName!=''">and stocklist.Itemname like concat('%', #{itemName}, '%')</if>
<if test="itemStandard!=null and itemStandard!=''">and stocklist.Itemstandard like concat('%', #{itemStandard}, '%')</if>
<if test="stockDw!=null and stockDw!=''">and stocklist.Stock_dw like concat('%', #{stockDw}, '%')</if>
<if test="wldm!=null and wldm!=''">and stocklist.wldm like concat('%', #{wldm}, '%')</if>
<if test="nowJuan!=null and nowJuan!=''">and stocklist.now_juan like concat('%', #{nowJuan}, '%')</if>
<if test="nowQty!=null and nowQty!=''">and stocklist.now_qty like concat('%', #{nowQty}, '%')</if>
<if test="poPiNo!=null and poPiNo!=''">and stocklist.PO_PI_NO like concat('%', #{poPiNo}, '%')</if>
<if test="inClass!=null and inClass!=''">and stocklist.Inclass like concat('%', #{inClass}, '%')</if>
<if test="defaultPosition!=null and defaultPosition!=''">and stocklist.Default_position like concat('%', #{defaultPosition}, '%')</if>
<if test="weight!=null and weight!=''">and item_info.weight like concat('%', #{weight}, '%')</if>
<if test="fuWidth!=null and fuWidth!=''">and item_info.FU_Width like concat('%', #{fuWidth}, '%')</if>
<if test="longWidth!=null and longWidth!=''">and item_info.Long_Width like concat('%', #{longWidth}, '%')</if>
<if test="pWldm!=null and pWldm!=''">and item_info.p_wldm like concat('%', #{pWldm}, '%')</if>
<if test="madeClass!=null and madeClass!=''">and item_info.MadeClass like concat('%', #{madeClass}, '%')</if>
<if test="itemClass!=null and itemClass!=''">and stocklist.ItemClass like concat('%', #{itemClass}, '%')</if>
</where>
</select>
</mapper>