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 @@