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/IoOrderMutiMapper.xml

53 lines
2.1 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.IoOrderMutiMapper">
<select id="filterList" parameterType="com.glxp.api.req.inout.IoOrderMutiRequest"
resultType="com.glxp.api.res.inout.IoOrderMutiResponse">
SELECT
io.*,
b1.ggxh,
b1.cpmctymc,
(SELECT userName FROM auth_user WHERE auth_user.id=io.createUser) as createUserName,
(SELECT userName FROM auth_user WHERE auth_user.id=io.auditUser) as auditUserName
FROM
io_order_muti io
LEFT JOIN basic_products b1 on b1.nameCode=io.nameCode
<where>
<if test=" udiCode!= '' and udiCode != null">
and io.udiCode = #{udiCode}
</if>
<if test=" relIdFk!= '' and relIdFk != null">
and b1.nameCode = #{relIdFk}
</if>
<if test=" mark!= '' and mark != null">
and io.mark = #{mark}
</if>
<if test=" orderIdFk!= '' and orderIdFk != null">
and io.orderIdFk = #{orderIdFk}
</if>
<if test=" nameCode!= '' and nameCode != null">
and io.nameCode = #{nameCode}
</if>
<if test=" ggxh!= '' and ggxh != null">
and b1.ggxh = #{ggxh}
</if>
<if test=" cpmctymc!= '' and cpmctymc != null">
AND b1.cpmctymc LIKE CONCAT('%', #{cpmctymc}, '%')
</if>
<if test="status != null">
and io.status = #{status}
</if>
<if test=" createUser!= '' and createUser != null">
and io.createUser = #{createUser}
</if>
<if test="startDate != null and startDate != '' and endDate != null and endDate != ''">
AND date_format(io.createTime, '%Y-%m-%d') between date_format(#{startDate},
'%Y-%m-%d') and date_format(#{endDate}, '%Y-%m-%d')
</if>
</where>
GROUP BY io.id
</select>
</mapper>