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.
171 lines
6.0 KiB
XML
171 lines
6.0 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.IoSplitFifoCodeMapper">
|
|
<select id="filterGroupList" parameterType="com.glxp.api.req.inout.IoSplitFifoCodeRequest"
|
|
resultType="com.glxp.api.res.inout.IoSplitCodeResponse">
|
|
SELECT io_split_fifo_code.*,
|
|
sum(totalCount) as groupCount,
|
|
bp.cpmctymc,
|
|
bp.ggxh,
|
|
bp.bzgg,
|
|
bu.useLevelUnit,
|
|
bp.ylqxzcrbarmc,
|
|
bp.manufactory,
|
|
bp.measname,
|
|
bp.zczbhhzbapzbh,
|
|
bp.ybbm,
|
|
bp.zxxsdycpbs,
|
|
bc.name supName,
|
|
sw.workPlaceName
|
|
FROM io_split_fifo_code
|
|
LEFT JOIN basic_udirel bu ON bu.id = io_split_fifo_code.relId
|
|
LEFT JOIN basic_products bp ON bu.uuid = bp.uuid
|
|
left join basic_corp bc on bc.erpId = io_split_fifo_code.supId
|
|
left join sys_workplace sw on sw.workplaceId = io_split_fifo_code.workPlaceCode
|
|
<where>
|
|
<if test="code != '' and code != null">
|
|
AND code LIKE #{code}
|
|
</if>
|
|
<if test="relId != null">
|
|
AND relId = #{relId}
|
|
</if>
|
|
<if test="nameCode != '' and nameCode != null">
|
|
AND nameCode = #{nameCode}
|
|
</if>
|
|
<if test="batchNo != '' and batchNo != null">
|
|
AND batchNo = #{batchNo}
|
|
</if>
|
|
<if test="supId != null">
|
|
AND supId = #{supId}
|
|
</if>
|
|
<if test="invCode != null">
|
|
AND invCode = #{invCode}
|
|
</if>
|
|
<if test="supId != null">
|
|
AND supId = #{supId}
|
|
</if>
|
|
<if test="fifoSplit != null">
|
|
AND fifoSplit = #{fifoSplit}
|
|
</if>
|
|
|
|
<if test="productType != null">
|
|
AND productType = #{productType}
|
|
</if>
|
|
<if test="workPlaceCode != null">
|
|
AND workPlaceCode = #{workPlaceCode}
|
|
</if>
|
|
</where>
|
|
group by relId, batchNo, supId, workPlaceCode
|
|
</select>
|
|
|
|
|
|
<select id="filterList" parameterType="com.glxp.api.req.inout.IoSplitFifoCodeRequest"
|
|
resultType="com.glxp.api.res.inout.IoSplitCodeResponse">
|
|
SELECT io_split_fifo_code.*,
|
|
bp.cpmctymc,
|
|
bp.ggxh,
|
|
bp.bzgg,
|
|
bp.ylqxzcrbarmc,
|
|
bp.manufactory,
|
|
bp.measname,
|
|
bu.useLevelUnit,
|
|
bp.zczbhhzbapzbh,
|
|
|
|
bp.zxxsdycpbs
|
|
FROM io_split_fifo_code
|
|
LEFT JOIN basic_udirel bu ON bu.id = io_split_fifo_code.relId
|
|
LEFT JOIN basic_products bp ON bu.uuid = bp.uuid
|
|
<where>
|
|
<if test="code != '' and code != null">
|
|
AND code LIKE #{code}
|
|
</if>
|
|
<if test="relId != null">
|
|
AND relId = #{relId}
|
|
</if>
|
|
<if test="nameCode != '' and nameCode != null">
|
|
AND nameCode = #{nameCode}
|
|
</if>
|
|
<if test="batchNo != '' and batchNo != null">
|
|
AND batchNo = #{batchNo}
|
|
</if>
|
|
<if test="supId != null">
|
|
AND supId = #{supId}
|
|
</if>
|
|
<if test="invCode != null">
|
|
AND invCode = #{invCode}
|
|
</if>
|
|
<if test="supId != null">
|
|
AND supId = #{supId}
|
|
</if>
|
|
<if test="productType != null">
|
|
AND productType = #{productType}
|
|
</if>
|
|
<if test="workPlaceCode != null">
|
|
AND workPlaceCode = #{workPlaceCode}
|
|
</if>
|
|
<if test="workPlaceQueueCode != null">
|
|
AND workPlaceQueueCode = #{workPlaceQueueCode}
|
|
</if>
|
|
|
|
</where>
|
|
group by io_split_fifo_code.id
|
|
</select>
|
|
|
|
|
|
<select id="findInvRemind" parameterType="long" resultType="com.glxp.api.res.inout.IoSplitCodeResponse">
|
|
SELECT io_split_fifo_code.*,
|
|
sum(totalCount) as groupCount,
|
|
bp.cpmctymc,
|
|
bp.ggxh,
|
|
bp.ylqxzcrbarmc,
|
|
bp.manufactory,
|
|
bp.measname,
|
|
bp.zczbhhzbapzbh,
|
|
bp.ybbm,
|
|
bp.zxxsdycpbs
|
|
FROM io_split_fifo_code
|
|
LEFT JOIN basic_udirel bu ON bu.id = io_split_fifo_code.relId
|
|
LEFT JOIN basic_products bp ON bu.uuid = bp.uuid
|
|
<where>
|
|
<if test="workPlaceCode != null">
|
|
AND workPlaceCode = #{workPlaceCode}
|
|
</if>
|
|
</where>
|
|
group by relId, batchNo, workPlaceCode
|
|
</select>
|
|
|
|
<select id="getAutoPutCode" parameterType="com.glxp.api.req.inout.IoAutoPutRequest"
|
|
resultType="com.glxp.api.res.inout.IoSplitCodeResponse">
|
|
select isfc.*,
|
|
bp.cpmctymc,
|
|
bp.ggxh,
|
|
bp.bzgg,
|
|
bu.useLevelUnit,
|
|
bp.ylqxzcrbarmc,
|
|
bp.manufactory,
|
|
bp.measname,
|
|
bp.zczbhhzbapzbh,
|
|
bp.ybbm,
|
|
bp.zxxsdycpbs
|
|
from io_split_fifo_code isfc
|
|
LEFT JOIN basic_udirel bu on isfc.relId = bu.id
|
|
INNER JOIN basic_products bp on bu.uuid = bp.uuid
|
|
<where>
|
|
isfc.workPlaceQueueCode is null
|
|
<if test="productName != null and productName != ''">
|
|
AND cpmctymc = #{productName}
|
|
</if>
|
|
<if test="bzgg != null and bzgg != ''">
|
|
AND bzgg = #{bzgg}
|
|
</if>
|
|
<if test="batchNo != null and batchNo != ''">
|
|
AND batchNo = #{batchNo}
|
|
</if>
|
|
<if test="code != null and code != ''">
|
|
AND code = #{code}
|
|
</if>
|
|
</where>
|
|
order by isfc.inBactchNo
|
|
</select>
|
|
</mapper>
|