2/11 取货架 槽位编号bug优化1.0

dev_fifo_z
wangwei 5 months ago
parent 51e838ec5f
commit 9e77c204cb

@ -17,4 +17,6 @@ public interface SysWorkplaceFreightMapper extends BaseMapper<SysWorkplaceFreigh
List<SysWorkplaceFreightResponse> filterList(SysWorkplaceFreightRequest request); List<SysWorkplaceFreightResponse> filterList(SysWorkplaceFreightRequest request);
List<SysWorkplaceFreightPrintResponse> getList(SysWorkplaceFreightRequest sysWorkplaceFreightRequest); List<SysWorkplaceFreightPrintResponse> getList(SysWorkplaceFreightRequest sysWorkplaceFreightRequest);
SysWorkplaceFreight selectMaxCode();
} }

@ -72,7 +72,7 @@ public class SysWorkplaceFreightService extends ServiceImpl<SysWorkplaceFreightM
public String createQueueCode() { public String createQueueCode() {
String code; String code;
SysWorkplaceFreight sysWorkplaceQueue = sysWorkplaceFreightMapper.selectOne(new LambdaQueryWrapper<SysWorkplaceFreight>().orderByDesc(SysWorkplaceFreight::getCode).last("LIMIT 1")); SysWorkplaceFreight sysWorkplaceQueue = sysWorkplaceFreightMapper.selectMaxCode();
if (sysWorkplaceQueue == null){ if (sysWorkplaceQueue == null){
//没有数据 新增 //没有数据 新增
code = "DMQ00" + 1; code = "DMQ00" + 1;

@ -66,4 +66,10 @@
</where> </where>
order by swf.code,swl.code, swq.code order by swf.code,swl.code, swq.code
</select> </select>
<select id="selectMaxCode" resultType="com.glxp.api.entity.basic.SysWorkplaceFreight">
SELECT *
from sys_workplace_freight
ORDER BY CAST(SUBSTRING(code, 6) AS UNSIGNED) DESC
LIMIT 1
</select>
</mapper> </mapper>

@ -171,7 +171,7 @@
</where> </where>
</select> </select>
<select id="selectMaxCode" resultType="java.lang.String"> <select id="selectMaxCode" resultType="java.lang.String">
select max(code) as code SELECT MAX(CAST(SUBSTRING_INDEX(code, '-', -1) AS UNSIGNED)) AS code
from sys_workplace_queue from sys_workplace_queue
<where> <where>
<if test="layerCode != null and layerCode != ''"> <if test="layerCode != null and layerCode != ''">
@ -187,7 +187,7 @@
AND layerCode = #{layerCode} AND layerCode = #{layerCode}
</if> </if>
</where> </where>
ORDER BY code DESC ORDER BY CAST(SUBSTRING_INDEX(code, '-', -1) AS UNSIGNED) DESC
LIMIT 1 LIMIT 1
</select> </select>

@ -679,18 +679,21 @@
and basic_products.originUuid <![CDATA[<>]]> '' and basic_products.originUuid <![CDATA[<>]]> ''
</if> </if>
<if test="filterType != null and filterType == 1 and productsType == 2"> <if test="filterType != null and filterType == 1 and productsType == 2">
AND (thirdId <![CDATA[<>]]> '' or thirdId1 <![CDATA[<>]]> '' or thirdId2 <![CDATA[<>]]> '' or AND (thirdId is not null or thirdId1 is not null)
thirdId3 <![CDATA[<>]]> '' or thirdId4 <![CDATA[<>]]> '') </if>
and mainId <![CDATA[<>]]> '' <if test="filterType != null and filterType == 1 and productsType == 2">
AND basic_products.nameCode is not null
</if> </if>
<if test="filterType != null and filterType == 2 and productsType == 1"> <if test="filterType != null and filterType == 2 and productsType == 1">
AND basic_products.originUuid is NULL AND basic_products.originUuid is NULL
</if> </if>
<if test="filterType != null and filterType == 2 and productsType == 2"> <if test="filterType != null and filterType == 2 and productsType == 2">
AND ((thirdId = '' or thirdId is null) or (thirdId1 = '' or thirdId1 is null) AND ((thirdId = '' or thirdId is null) or (thirdId1 = '' or thirdId1 is null)
or (thirdId2 = '' or thirdId2 is null) or (thirdId3 = '' or thirdId3 is null) )
or (thirdId4 = '' or thirdId4 is null)) </if>
AND (mainId = '' or mainId is null) <if test="filterType != null and filterType == 2 and productsType == 2">
AND ( (mainId = '' or mainId is null) or (basic_products.nameCode = '' or basic_products.nameCode is null)
)
</if> </if>
<if test="filterType != null and filterType == 3"> <if test="filterType != null and filterType == 3">
AND (mainId is NULL or mainId = '') AND (mainId is NULL or mainId = '')

Loading…
Cancel
Save