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.
64 lines
2.2 KiB
XML
64 lines
2.2 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.IoCodeTempDao">
|
|
<select id="selectCodeList" resultType="com.glxp.api.res.inout.IoCodeTempResponse">
|
|
select ic.*,
|
|
bp.cpmctymc productName,
|
|
bp.ggxh,
|
|
bp.ylqxzcrbarmc,
|
|
bp.zczbhhzbapzbh,
|
|
bp.manufactory,
|
|
bc.name supName
|
|
from io_code_temp ic
|
|
left join basic_products bp on bp.nameCode = ic.nameCode
|
|
left join basic_corp bc on ic.supId = bc.erpId
|
|
<where>
|
|
<if test="orderId != null and orderId != ''">
|
|
orderId = #{orderId}
|
|
</if>
|
|
<if test="code != null and code != ''">
|
|
AND code = #{code}
|
|
</if>
|
|
</where>
|
|
</select>
|
|
|
|
<select id="selectExitCount" resultType="java.lang.Integer">
|
|
select SUM(reCount)
|
|
from io_code_temp
|
|
<where>
|
|
<if test="relId != null and relId != ''">
|
|
relId = #{relId}
|
|
</if>
|
|
<if test="batchNo != null and batchNo != ''">
|
|
AND batchNo = #{batchNo}
|
|
</if>
|
|
<if test="orderId != null and orderId != ''">
|
|
AND orderId = #{orderId}
|
|
</if>
|
|
<if test="supId != null and supId != ''">
|
|
AND supId = #{supId}
|
|
</if>
|
|
</where>
|
|
</select>
|
|
|
|
|
|
<select id="filterJoinProduct" resultType="com.glxp.api.res.inout.IoCodeResponse">
|
|
select ic.*,
|
|
bp.cpmctymc productName,
|
|
bp.ggxh,
|
|
bp.ylqxzcrbarmc,
|
|
bp.zczbhhzbapzbh,
|
|
bp.manufactory,
|
|
bc.name supName
|
|
from io_code_temp ic
|
|
left join basic_products bp on bp.nameCode = ic.nameCode
|
|
left join basic_corp bc on ic.supId = bc.erpId
|
|
<where>
|
|
<if test="orderId != null and orderId != ''">
|
|
AND ic.orderId = #{orderId}
|
|
</if>
|
|
</where>
|
|
group by ic.id
|
|
</select>
|
|
</mapper>
|