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

132 lines
4.4 KiB
XML

11 months ago
<?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">
11 months ago
<select id="filterGroupList" parameterType="com.glxp.api.req.inout.IoSplitFifoCodeRequest"
11 months ago
resultType="com.glxp.api.res.inout.IoSplitCodeResponse">
SELECT io_split_fifo_code.*,
10 months ago
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
11 months ago
FROM io_split_fifo_code
10 months ago
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
11 months ago
<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>
11 months ago
<if test="fifoSplit != null">
AND fifoSplit = #{fifoSplit}
</if>
11 months ago
<if test="productType != null">
AND productType = #{productType}
</if>
11 months ago
<if test="workPlaceCode != null">
11 months ago
AND workPlaceCode = #{workPlaceCode}
</if>
</where>
group by relId, batchNo, supId, workPlaceCode
</select>
11 months ago
<select id="filterList" parameterType="com.glxp.api.req.inout.IoSplitFifoCodeRequest"
resultType="com.glxp.api.res.inout.IoSplitCodeResponse">
SELECT io_split_fifo_code.*,
10 months ago
bp.cpmctymc,
bp.ggxh,
bp.bzgg,
bp.ylqxzcrbarmc,
bp.manufactory,
bp.measname,
bu.useLevelUnit,
bp.zczbhhzbapzbh,
bp.ybbm,
bp.zxxsdycpbs
11 months ago
FROM io_split_fifo_code
10 months ago
LEFT JOIN basic_udirel bu ON bu.id = io_split_fifo_code.relId
LEFT JOIN basic_products bp ON bu.uuid = bp.uuid
11 months ago
<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>
11 months ago
<if test="workPlaceCode != null">
11 months ago
AND workPlaceCode = #{workPlaceCode}
</if>
</where>
</select>
11 months ago
<select id="findInvRemind" parameterType="long" resultType="com.glxp.api.res.inout.IoSplitCodeResponse">
SELECT io_split_fifo_code.*,
10 months ago
sum(totalCount) as groupCount,
bp.cpmctymc,
bp.ggxh,
bp.ylqxzcrbarmc,
bp.manufactory,
bp.measname,
bp.zczbhhzbapzbh,
bp.ybbm,
bp.zxxsdycpbs
11 months ago
FROM io_split_fifo_code
10 months ago
LEFT JOIN basic_udirel bu ON bu.id = io_split_fifo_code.relId
LEFT JOIN basic_products bp ON bu.uuid = bp.uuid
11 months ago
<where>
11 months ago
<if test="workPlaceCode != null">
11 months ago
AND workPlaceCode = #{workPlaceCode}
</if>
</where>
group by relId, batchNo, workPlaceCode
</select>
11 months ago
</mapper>