From bfaf3de88e341fbfc45f7a0f1dfa4f7e5b1ba6c3 Mon Sep 17 00:00:00 2001 From: syruan <15555146157@163.com> Date: Thu, 8 Jan 2026 13:42:58 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B3=A8=E9=87=8A=E4=BC=98=E5=8C=96=E8=B0=83?= =?UTF-8?q?=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/BackChangeServiceImpl.java | 6 +- .../service/Impl/ToolLedgerServiceImpl.java | 15 +- .../material/toolLedger/ToolLedgerMapper.xml | 149 +++++++++--------- 3 files changed, 82 insertions(+), 88 deletions(-) diff --git a/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/back/service/impl/BackChangeServiceImpl.java b/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/back/service/impl/BackChangeServiceImpl.java index 4efd623..7f65a3d 100644 --- a/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/back/service/impl/BackChangeServiceImpl.java +++ b/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/back/service/impl/BackChangeServiceImpl.java @@ -542,7 +542,7 @@ public class BackChangeServiceImpl implements BackChangeService { } } //如果有需要维修的设备 - if (toBeRepairList.size() > 0) { + if (!toBeRepairList.isEmpty()) { //创建维修任务 String userName = SecurityUtils.getLoginUser().getSysUser().getNickName(); Long changeId = addRepairTask(userName); @@ -589,8 +589,8 @@ public class BackChangeServiceImpl implements BackChangeService { /** * 生成维修任务编号 * - * @param thisMonthMaxOrder - * @return + * @param thisMonthMaxOrder 本月最大序号 + * @return String 任务编码 */ private String genderRepairTaskCode(int thisMonthMaxOrder) { SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd"); diff --git a/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/toolLedger/service/Impl/ToolLedgerServiceImpl.java b/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/toolLedger/service/Impl/ToolLedgerServiceImpl.java index 37b0a14..acb2795 100644 --- a/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/toolLedger/service/Impl/ToolLedgerServiceImpl.java +++ b/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/toolLedger/service/Impl/ToolLedgerServiceImpl.java @@ -47,7 +47,7 @@ public class ToolLedgerServiceImpl implements ToolLedgerService { // entity.setCompanyId(deptId); // } if(ADMIN_ID.equals(userId)){ - entity.setCompanyId(1L); + entity.setCompanyId(null); }else{ entity.setCompanyId(deptId); } @@ -64,15 +64,10 @@ public class ToolLedgerServiceImpl implements ToolLedgerService { public List listCode(ToolLedgerEntity entity) { Long deptId = SecurityUtils.getLoginUser().getSysUser().getDeptId(); Long userId = SecurityUtils.getLoginUser().getUserid(); - // 管理员和省公司可查看所有数据 -// if (userId != null && deptId != null -// && !userId.equals(ADMIN_ID) -// && !deptId.equals(PROVINCE_COMPANY_DEPT_ID)) { -// entity.setCompanyId(deptId); -// } - if(ADMIN_ID.equals(userId)){ - entity.setCompanyId(1L); - }else{ + if (ADMIN_ID.equals(userId)) { + // 管理员可查看所有数据 + entity.setCompanyId(null); + } else { entity.setCompanyId(deptId); } List toolLedgerEntities = mapper.listCode(entity); diff --git a/bonus-modules/bonus-material-mall/src/main/resources/mapper/material/toolLedger/ToolLedgerMapper.xml b/bonus-modules/bonus-material-mall/src/main/resources/mapper/material/toolLedger/ToolLedgerMapper.xml index f0c7e24..4c2cba6 100644 --- a/bonus-modules/bonus-material-mall/src/main/resources/mapper/material/toolLedger/ToolLedgerMapper.xml +++ b/bonus-modules/bonus-material-mall/src/main/resources/mapper/material/toolLedger/ToolLedgerMapper.xml @@ -167,84 +167,83 @@