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/inv/StockCompareMapper.xml

43 lines
1.7 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.inv.StockCompareMapper">
<!-- select sc.*,aw.name invName,bt.name actionName,au.employeeName createUserName
from inv_stock_compare sc
left join auth_warehouse aw on aw.code = sc.invCode
left join basic_bussiness_type bt on bt.action = sc.action
left join auth_user au on au.id = sc.createUser -->
<select id="pageVo" resultType="com.glxp.api.vo.inv.StockCompareVo">
select sc.*,au.employeeName createUserName
from inv_stock_compare sc
left join auth_user au on au.id = sc.createUser
<where>
<if test="param.id!=null and param.id!=''">
and sc.id = #{param.id}
</if>
<if test="param.thrSysId!=null and param.thrSysId!=''">
and sc.thrSysId = #{param.thrSysId}
</if>
<if test="param.invCode!=null and param.invCode!=''">
and sc.invCode = #{param.invCode}
</if>
<if test="param.mainAction!=null and param.mainAction!=''">
and sc.mainAction = #{param.mainAction}
</if>
<if test="param.action!=null and param.action!=''">
and sc.action = #{param.action}
</if>
<if test="param.status!=null">
and sc.status = #{param.status}
</if>
<if test="param.remark!=null and param.remark!=''">
and sc.remark like concat('%',#{param.remark},'%')
</if>
</where>
order by sc.createTime desc
</select>
</mapper>