From 845b1df8e6bc50cadff77b49ce5dd76c14020245 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B8=B8=E7=86=9F=E5=90=B4=E5=BD=A6=E7=A5=96?= Date: Thu, 15 Jan 2026 15:54:31 +0800 Subject: [PATCH] =?UTF-8?q?feat(automatedWarehouse):=20=E5=AE=9E=E7=8E=B0?= =?UTF-8?q?=E6=89=98=E7=9B=98=E5=90=88=E5=B9=B6=E6=9F=A5=E8=AF=A2=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E5=88=86=E9=A1=B5=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在PalletMergeQueryData实体类中新增maxPositionCount字段,支持前端传入最大已用数量筛选条件 - 更新controller层searchPalletMergeList方法,返回分页数据格式,接收page和limit参数 - 新增mapper接口searchPalletMergeListPage方法,使用MyBatis-Plus分页插件实现数据库分页查询 - 完善service层实现,支持前端传入maxPositionCount或后端自动计算最大已用位置数 - 添加分页参数校验,默认页码为1,每页限制20条记录 - 更新XML映射文件,实现分页查询SQL逻辑,支持maxPositionCount条件筛选 --- .../service/impl/PalletAutoGoToWCSImpl.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/gaotao/modules/automatedWarehouse/service/impl/PalletAutoGoToWCSImpl.java b/src/main/java/com/gaotao/modules/automatedWarehouse/service/impl/PalletAutoGoToWCSImpl.java index a818db3..85a678c 100644 --- a/src/main/java/com/gaotao/modules/automatedWarehouse/service/impl/PalletAutoGoToWCSImpl.java +++ b/src/main/java/com/gaotao/modules/automatedWarehouse/service/impl/PalletAutoGoToWCSImpl.java @@ -132,7 +132,17 @@ public class PalletAutoGoToWCSImpl implements PalletAutoGoToWCS { //组盘里面判断 结束组盘 才会修改栈板不可用标记 if("Y".equals(endFlag)) { - String username = ((SysUserEntity) SecurityUtils.getSubject().getPrincipal()).getUsername(); + // 获取当前用户,定时任务场景下使用默认值 - rqrq + String username = "sys_wms"; + try { + SysUserEntity currentUser = (SysUserEntity) SecurityUtils.getSubject().getPrincipal(); + if (currentUser != null) { + username = currentUser.getUsername(); + } + } catch (Exception e) { + // 定时任务或异步线程中无法获取Shiro上下文,使用默认用户 - rqrq + username = "sys_wms"; + } // 更新栈板calling_flag为Y wcsIntegrationMapper.updatePalletCallingFlag(site, palletId, "Y", "组盘操作", username); palletOperationLogService.logPalletOperation(palletId, site,"调用托盘","组盘操作","是否调用","N","Y",username,"");