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.
38 lines
2.2 KiB
38 lines
2.2 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.stock.mapper.CheckHeadMapper">
|
||
|
|
||
|
|
||
|
<select id="selectCheckHeadWithList" resultType="com.ruoyi.stock.domain.CheckHeadWithList" parameterType="com.ruoyi.stock.domain.CheckHeadWithList">
|
||
|
SELECT
|
||
|
check_head.checkId as checkId,
|
||
|
check_head.stockName as stockName,
|
||
|
check_head.checkDate as checkDate,
|
||
|
check_list.itemCode as itemCode,
|
||
|
check_list.itemName as itemName,
|
||
|
check_list.itemSpecification as itemSpecification,
|
||
|
check_list.unit as unit,
|
||
|
check_list.batchNumber as batchNumber,
|
||
|
check_list.checkQty as checkQty,
|
||
|
check_list.isUpdate as isUpdate
|
||
|
FROM
|
||
|
check_list
|
||
|
LEFT JOIN check_head ON check_head.checkId = check_list.checkId
|
||
|
<where>
|
||
|
<if test="checkId != null and checkId != ''"> and checkId like concat('%', #{checkId}, '%')</if>
|
||
|
<if test="stockName != null and stockName != ''"> and stockName like concat('%', #{stockName}, '%')</if>
|
||
|
<if test="itemCode != null and itemCode != ''"> and itemCode like concat('%', #{itemCode}, '%')</if>
|
||
|
<if test="itemName != null and itemName != ''"> and itemName like concat('%', #{itemName}, '%')</if>
|
||
|
<if test="itemSpecification != null and itemSpecification != ''"> and itemSpecification like concat('%', #{itemSpecification}, '%')</if>
|
||
|
<if test="unit != null and unit != ''"> and unit like concat('%', #{unit}, '%')</if>
|
||
|
<if test="batchNumber != null and batchNumber != ''"> and batchNumber like concat('%', #{batchNumber}, '%')</if>
|
||
|
<if test="checkQty != null and checkQty != ''"> and checkQty = #{checkQty}</if>
|
||
|
<if test="isUpdate != null and isUpdate != ''"> and isUpdate = #{isUpdate}</if>
|
||
|
<if test="params.beginCheckDate != null and params.beginCheckDate !=''"> and checkDate >= #{params.beginCheckDate}</if>
|
||
|
<if test="params.endCheckDate != null and params.endCheckDate != ''">and #{params.endCheckDate} >= checkDate</if>
|
||
|
</where>
|
||
|
</select>
|
||
|
|
||
|
</mapper>
|