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.
82 lines
4.1 KiB
XML
82 lines
4.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.inv.InvProductRationMapper">
|
|
<resultMap id="BaseResultMap" type="com.glxp.api.entity.inv.InvProductRationEntity">
|
|
<!--@mbg.generated-->
|
|
<!--@Table inv_product_ration-->
|
|
<id column="id" jdbcType="INTEGER" property="id"/>
|
|
<result column="relId" jdbcType="BIGINT" property="relId"/>
|
|
<result column="supId" jdbcType="BIGINT" property="supId"/>
|
|
<result column="rationCount" jdbcType="INTEGER" property="rationCount"/>
|
|
<result column="invCount" jdbcType="INTEGER" property="invCount"/>
|
|
<result column="busType" jdbcType="VARCHAR" property="busType"/>
|
|
<result column="scanType" jdbcType="VARCHAR" property="scanType"/>
|
|
<result column="curInvCode" jdbcType="VARCHAR" property="curInvCode"/>
|
|
<result column="lyInvCode" jdbcType="VARCHAR" property="lyInvCode"/>
|
|
<result column="sgInvCode" jdbcType="VARCHAR" property="sgInvCode"/>
|
|
<result column="jhInvCode" jdbcType="VARCHAR" property="jhInvCode"/>
|
|
<result column="cgInvCode" jdbcType="VARCHAR" property="cgInvCode"/>
|
|
<result column="fromInvCode" jdbcType="VARCHAR" property="fromInvCode"/>
|
|
<result column="updateTime" jdbcType="TIMESTAMP" property="updateTime"/>
|
|
<result column="updateUser" jdbcType="TIMESTAMP" property="updateUser"/>
|
|
<result column="createTime" jdbcType="TIMESTAMP" property="createTime"/>
|
|
<result column="createUser" jdbcType="VARCHAR" property="createUser"/>
|
|
<result column="remark" jdbcType="VARCHAR" property="remark"/>
|
|
</resultMap>
|
|
<sql id="Base_Column_List">
|
|
<!--@mbg.generated-->
|
|
id, relId, rationCount, invCount, busType, scanType, curInvCode, lyInvCode, sgInvCode,
|
|
jhInvCode, cgInvCode, fromInvCode, updateTime, updateUser, createTime, `createUser`,
|
|
remark
|
|
</sql>
|
|
|
|
|
|
<select id="filterList" resultType="com.glxp.api.res.inv.InvProductRationResponse"
|
|
parameterType="com.glxp.api.req.inv.InvProductRationRequest">
|
|
select ip.*,
|
|
bp.cpmctymc,
|
|
bp.measname,
|
|
bp.ggxh,
|
|
bp.ylqxzcrbarmc,
|
|
bp.zczbhhzbapzbh,
|
|
bp.nameCode,
|
|
basic_corp.name supName,
|
|
auth_warehouse.name invName,
|
|
bbt.name scanTypeName
|
|
from inv_product_ration ip
|
|
left join basic_udirel on ip.relId = basic_udirel.id
|
|
inner join basic_products bp on basic_udirel.uuid = bp.uuid
|
|
left join basic_corp on ip.supId = basic_corp.erpId
|
|
left join auth_warehouse on auth_warehouse.code = ip.curInvCode
|
|
left join basic_bussiness_type bbt on ip.scanType = bbt.action
|
|
<where>
|
|
bp.diType = 1
|
|
<if test="cpmctymc != null and cpmctymc != ''">
|
|
AND bp.cpmctymc like concat('%', #{cpmctymc}, '%')
|
|
</if>
|
|
<if test="nameCode != null and nameCode != ''">
|
|
AND bp.nameCode like concat('%', #{nameCode}, '%')
|
|
</if>
|
|
<if test="relId != null and relId != ''">
|
|
AND ip.relId = #{relId}
|
|
</if>
|
|
<if test="ggxh != null and ggxh != ''">
|
|
AND bp.ggxh like concat('%', #{ggxh}, '%')
|
|
</if>
|
|
<if test="ylqxzcrbarmc != null and ylqxzcrbarmc != ''">
|
|
AND bp.ylqxzcrbarmc like concat('%', #{ylqxzcrbarmc}, '%')
|
|
</if>
|
|
<if test="zczbhhzbapzbh != null and zczbhhzbapzbh != ''">
|
|
AND bp.zczbhhzbapzbh like concat('%', #{zczbhhzbapzbh}, '%')
|
|
</if>
|
|
<if test="supId != null and supId != ''">
|
|
AND ip.supId = #{supId}
|
|
</if>
|
|
<if test="curInvCode != null and curInvCode != ''">
|
|
AND ip.curInvCode = #{curInvCode}
|
|
</if>
|
|
</where>
|
|
order by ip.updateTime desc
|
|
</select>
|
|
</mapper>
|