You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
udi-wms-java/src/main/resources/mybatis/mapper/inout/IoStatDayDao.xml

30 lines
1.3 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.glxp.api.dao.inout.IoStatDayDao">
<select id="filterList" resultType="com.glxp.api.entity.inout.IoStatDayEntity">
select *, ( SELECT NAME FROM auth_dept WHERE io_stat_day.deptCode = auth_dept.CODE ) deptName
from io_stat_day
<where>
<if test="recordKey != null and recordKey != ''">
AND recordKeyFk = #{recordKey}
</if>
<if test="batchNo != null and batchNo != ''">
AND batchNo like concat('%', #{batchNo}, '%')
</if>
<if test="productName != null and productName != ''">
AND productName like concat('%', #{productName}, '%')
</if>
<if test="ggxh != null and ggxh != ''">
AND ggxh like concat('%', #{ggxh}, '%')
</if>
</where>
</select>
<select id="filterListByRecordKey" resultType="com.glxp.api.entity.inout.IoStatDayEntity">
select *, ( SELECT NAME FROM auth_dept WHERE io_stat_day.deptCode = auth_dept.CODE ) deptName
from io_stat_day
where recordKeyFk = #{recordKey}
</select>
</mapper>