|
|
|
@ -16,28 +16,41 @@
|
|
|
|
|
</resultMap>
|
|
|
|
|
<sql id="Base_Column_List">
|
|
|
|
|
<!--@mbg.generated-->
|
|
|
|
|
id, code, `name`, workPlaceIdFk, remark, createTime, updateTime, `createUser`, updateUser
|
|
|
|
|
id,
|
|
|
|
|
code,
|
|
|
|
|
`name`,
|
|
|
|
|
workPlaceIdFk,
|
|
|
|
|
remark,
|
|
|
|
|
createTime,
|
|
|
|
|
updateTime,
|
|
|
|
|
`createUser`,
|
|
|
|
|
updateUser
|
|
|
|
|
</sql>
|
|
|
|
|
|
|
|
|
|
<select id="selectMaxLayer" resultType="java.lang.Integer">
|
|
|
|
|
select max(layer) as layer from sys_workplace_queue
|
|
|
|
|
select max(layer) as layer
|
|
|
|
|
from sys_workplace_queue
|
|
|
|
|
<where>
|
|
|
|
|
<if test=" freightCode != null and freightCode != ''">
|
|
|
|
|
<if test="freightCode != null and freightCode != ''">
|
|
|
|
|
AND freightCode = #{freightCode}
|
|
|
|
|
</if>
|
|
|
|
|
</where>
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="filterBindList" resultType="com.glxp.api.res.basic.SysWorkplaceQueueResponse">
|
|
|
|
|
select swq.*,bp.nameCode,
|
|
|
|
|
COALESCE(bp.ggxh,bp.bzgg) AS ggxh,
|
|
|
|
|
bp.cpmctymc
|
|
|
|
|
select swq.*,
|
|
|
|
|
bp.nameCode,
|
|
|
|
|
COALESCE(bp.ggxh, bp.bzgg) AS ggxh,
|
|
|
|
|
bp.cpmctymc,sys_workplace.workplaceName
|
|
|
|
|
from sys_workplace_queue swq
|
|
|
|
|
left join
|
|
|
|
|
(select bu.id,bp.nameCode,bp.ggxh,bp.cpmctymc,bp.bzgg
|
|
|
|
|
(select bu.id, bp.nameCode, bp.ggxh, bp.cpmctymc, bp.bzgg
|
|
|
|
|
from basic_udirel bu
|
|
|
|
|
left join basic_products bp ON bu.uuid = bp.uuid
|
|
|
|
|
group by bu.id,bp.nameCode,bp.ggxh,bp.cpmctymc) as bp ON bp.id = swq.relId
|
|
|
|
|
group by bu.id, bp.nameCode, bp.ggxh, bp.cpmctymc) as bp ON bp.id = swq.relId
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
left join sys_workplace on swq.workPlaceIdFk = sys_workplace.workplaceId
|
|
|
|
|
<where>
|
|
|
|
|
<if test="key != null and key != ''">
|
|
|
|
|
AND (
|
|
|
|
@ -68,7 +81,7 @@
|
|
|
|
|
or bp.bzgg like concat('%', #{ggxh}, '%')
|
|
|
|
|
)
|
|
|
|
|
</if>
|
|
|
|
|
<if test=" layerCode != null and layerCode != ''">
|
|
|
|
|
<if test="layerCode != null and layerCode != ''">
|
|
|
|
|
AND (
|
|
|
|
|
layerCode like concat('%', #{layerCode}, '%')
|
|
|
|
|
)
|
|
|
|
@ -78,10 +91,10 @@
|
|
|
|
|
freightCode like concat('%', #{freightCode}, '%')
|
|
|
|
|
)
|
|
|
|
|
</if>
|
|
|
|
|
<if test=" code != null and code != ''">
|
|
|
|
|
<if test="code != null and code != ''">
|
|
|
|
|
AND swq.code = #{code}
|
|
|
|
|
</if>
|
|
|
|
|
<if test=" workPlaceIdFk != null and workPlaceIdFk != ''">
|
|
|
|
|
<if test="workPlaceIdFk != null and workPlaceIdFk != ''">
|
|
|
|
|
AND swq.workPlaceIdFk = #{workPlaceIdFk}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="layerCodes != null and layerCodes.size() > 0">
|
|
|
|
@ -113,7 +126,7 @@
|
|
|
|
|
or swq.name like concat('%', #{key}, '%')
|
|
|
|
|
)
|
|
|
|
|
</if>
|
|
|
|
|
<if test=" layerCode != null and layerCode != ''">
|
|
|
|
|
<if test="layerCode != null and layerCode != ''">
|
|
|
|
|
AND layerCode = #{layerCode}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="layerCodes != null and layerCodes.size() > 0">
|
|
|
|
@ -125,28 +138,31 @@
|
|
|
|
|
</where>
|
|
|
|
|
</select>
|
|
|
|
|
<select id="selectMaxGrid" resultType="java.lang.Integer">
|
|
|
|
|
select max(grid) as grid from sys_workplace_queue
|
|
|
|
|
select max(grid) as grid
|
|
|
|
|
from sys_workplace_queue
|
|
|
|
|
<where>
|
|
|
|
|
<if test=" freightCode != null and freightCode != ''">
|
|
|
|
|
<if test="freightCode != null and freightCode != ''">
|
|
|
|
|
AND freightCode = #{freightCode}
|
|
|
|
|
</if>
|
|
|
|
|
<if test=" layer != null and layer != ''">
|
|
|
|
|
<if test="layer != null and layer != ''">
|
|
|
|
|
AND layer = #{layer}
|
|
|
|
|
</if>
|
|
|
|
|
</where>
|
|
|
|
|
</select>
|
|
|
|
|
<select id="selectMaxCode" resultType="java.lang.String">
|
|
|
|
|
select max(code) as code from sys_workplace_queue
|
|
|
|
|
select max(code) as code
|
|
|
|
|
from sys_workplace_queue
|
|
|
|
|
<where>
|
|
|
|
|
<if test=" layerCode != null and layerCode != ''">
|
|
|
|
|
<if test="layerCode != null and layerCode != ''">
|
|
|
|
|
AND layerCode = #{layerCode}
|
|
|
|
|
</if>
|
|
|
|
|
</where>
|
|
|
|
|
</select>
|
|
|
|
|
<select id="selectByLayerCode" resultType="com.glxp.api.entity.basic.SysWorkplaceQueue">
|
|
|
|
|
select * from sys_workplace_queue
|
|
|
|
|
select *
|
|
|
|
|
from sys_workplace_queue
|
|
|
|
|
<where>
|
|
|
|
|
<if test=" layerCode != null and layerCode != ''">
|
|
|
|
|
<if test="layerCode != null and layerCode != ''">
|
|
|
|
|
AND layerCode = #{layerCode}
|
|
|
|
|
</if>
|
|
|
|
|
</where>
|
|
|
|
@ -154,16 +170,16 @@
|
|
|
|
|
LIMIT 1
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<!-- <update id="updateByRelId">-->
|
|
|
|
|
<!-- UPDATE sys_workplace_queue-->
|
|
|
|
|
<!-- <trim prefix="set" suffixOverrides=",">-->
|
|
|
|
|
<!-- <if test="nameCode != null">-->
|
|
|
|
|
<!-- nameCode=#{nameCode},-->
|
|
|
|
|
<!-- </if>-->
|
|
|
|
|
<!-- </trim>-->
|
|
|
|
|
<!-- WHERE nameCode = #{nameCode}-->
|
|
|
|
|
<!-- and uuid = #{uuid}-->
|
|
|
|
|
<!-- </update>-->
|
|
|
|
|
<!-- <update id="updateByRelId">-->
|
|
|
|
|
<!-- UPDATE sys_workplace_queue-->
|
|
|
|
|
<!-- <trim prefix="set" suffixOverrides=",">-->
|
|
|
|
|
<!-- <if test="nameCode != null">-->
|
|
|
|
|
<!-- nameCode=#{nameCode},-->
|
|
|
|
|
<!-- </if>-->
|
|
|
|
|
<!-- </trim>-->
|
|
|
|
|
<!-- WHERE nameCode = #{nameCode}-->
|
|
|
|
|
<!-- and uuid = #{uuid}-->
|
|
|
|
|
<!-- </update>-->
|
|
|
|
|
<update id="updateByRelId">
|
|
|
|
|
UPDATE sys_workplace_queue
|
|
|
|
|
<set>
|
|
|
|
@ -171,5 +187,4 @@
|
|
|
|
|
</set>
|
|
|
|
|
WHERE code = #{code}
|
|
|
|
|
</update>
|
|
|
|
|
|
|
|
|
|
</mapper>
|
|
|
|
|