bug修改

dev_unify
yewj 8 months ago
parent 4acc72064f
commit 81622f8fcf

@ -87,4 +87,9 @@ public class SysWorkplaceQueueResponse {
private String cpmctymc; private String cpmctymc;
private String relId; private String relId;
/**
*
*/
private String workplaceName;
} }

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

Loading…
Cancel
Save