From 678ad047199333f438e0b1c9a4e39609538ea745 Mon Sep 17 00:00:00 2001 From: zhc077 <565291854@qq.com> Date: Sun, 10 Nov 2024 20:46:14 +0800 Subject: [PATCH] =?UTF-8?q?=E9=97=AE=E9=A2=98=E4=BF=AE=E6=94=B9=2011.10?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../project/controller/ProjectController.java | 20 +++++++++++-------- .../service/impl/ProjectServiceImpl.java | 2 +- .../ProjectAnnualBudgetController.java | 6 +++--- .../system/controller/SysUserController.java | 1 + 4 files changed, 17 insertions(+), 12 deletions(-) diff --git a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/project/controller/ProjectController.java b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/project/controller/ProjectController.java index a68e2e6..d80deb5 100644 --- a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/project/controller/ProjectController.java +++ b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/project/controller/ProjectController.java @@ -124,7 +124,7 @@ public class ProjectController extends JeecgController /** * @description: 申报列表,不同角色可见数据 * @param: [project, pageNo, pageSize, req] - * @return: org.jeecg.common.api.vo.Result> + * @return: org.jeecg.common.api.vo.Result> * @author: z.h.c * @date: 24/11/7 14:56 */ @@ -303,11 +303,10 @@ public class ProjectController extends JeecgController queryWrapper.in("project_status", 12); } if ("kejiju_admin".equals(loginUser.getRoleCode())) { - queryWrapper.in("budget_status", 11,12); + queryWrapper.in("budget_status", 11, 12); } - IPage pageList = projectService.page(page, queryWrapper); return Result.OK(pageList); } @@ -357,7 +356,7 @@ public class ProjectController extends JeecgController queryWrapper.in("project_status", 13); } if ("kejiju_admin".equals(loginUser.getRoleCode())) { - queryWrapper.in("budget_status", 12,13); + queryWrapper.in("budget_status", 12, 13); } IPage pageList = projectService.page(page, queryWrapper); @@ -420,7 +419,7 @@ public class ProjectController extends JeecgController ProjectType projectType = iProjectTypeService.getById(project.getProjectTypeid()); project.setAnnualName(projectType.getAnnualName()); project.setProjectTypeName(projectType.getTypeName()); - SysDepart sysDepart = iSysDepartService.getById(project.getSysOrgCode()); + SysDepart sysDepart = iSysDepartService.getOne(new LambdaQueryWrapper().eq(SysDepart::getOrgCode,project.getSysOrgCode())); project.setDepartName(sysDepart.getDepartName()); SysUser sysUser = iSysUserService.getById(project.getProjectCharger()); project.setProjectCharger(sysUser.getRealname()); @@ -434,7 +433,8 @@ public class ProjectController extends JeecgController ProjectType projectType = iProjectTypeService.getById(project.getProjectTypeid()); project.setAnnualName(projectType.getAnnualName()); project.setProjectTypeName(projectType.getTypeName()); - SysDepart sysDepart = iSysDepartService.getById(project.getSysOrgCode()); +// SysDepart sysDepart = iSysDepartService.getById(project.getSysOrgCode()); + SysDepart sysDepart = iSysDepartService.getOne(new LambdaQueryWrapper().eq(SysDepart::getOrgCode,project.getSysOrgCode())); project.setDepartName(sysDepart.getDepartName()); SysUser sysUser = iSysUserService.getById(project.getProjectCharger()); project.setProjectCharger(sysUser.getRealname()); @@ -522,8 +522,12 @@ public class ProjectController extends JeecgController Depadminlx depadminlx = iDepadminlxService.getOne(new LambdaQueryWrapper().eq(Depadminlx::getDepid, project.getSysOrgCode())); DepartExtDto2 dto = new DepartExtDto2(); BeanUtils.copyProperties(sysDepart, dto); - BeanUtils.copyProperties(departExt, dto); - BeanUtils.copyProperties(depadminlx, dto); + if (ObjectUtil.isNotEmpty(departExt)) { + BeanUtils.copyProperties(departExt, dto); + } + if (ObjectUtil.isNotEmpty(depadminlx)) { + BeanUtils.copyProperties(depadminlx, dto); + } ProjectType projectType = iProjectTypeService.getById(project.getProjectTypeid()); dto.setAnnualName(projectType.getAnnualName()); List dictModels = sysBaseApi.queryDictItemsByCode("depart_type"); diff --git a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/project/service/impl/ProjectServiceImpl.java b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/project/service/impl/ProjectServiceImpl.java index a41dab5..153608c 100644 --- a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/project/service/impl/ProjectServiceImpl.java +++ b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/project/service/impl/ProjectServiceImpl.java @@ -106,7 +106,7 @@ public class ProjectServiceImpl extends ServiceImpl impl BeanUtils.copyProperties(dto, sysDepart); BeanUtils.copyProperties(dto, userExt); BeanUtils.copyProperties(dto, project); - project.setSysOrgCode(loginUser.getOrgId()); + project.setSysOrgCode(loginUser.getOrgCode()); this.updateById(project); userExt.setUserId(loginUser.getId()); diff --git a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/projectAnnualBudget/controller/ProjectAnnualBudgetController.java b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/projectAnnualBudget/controller/ProjectAnnualBudgetController.java index edfbd16..60fd44c 100644 --- a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/projectAnnualBudget/controller/ProjectAnnualBudgetController.java +++ b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/projectAnnualBudget/controller/ProjectAnnualBudgetController.java @@ -154,9 +154,9 @@ public class ProjectAnnualBudgetController extends JeecgController queryByProjectId(@PathVariable("projectId") String projectId) { ProjectAnnualBudget projectAnnualBudget = projectAnnualBudgetService.getOne(new LambdaQueryWrapper().eq(ProjectAnnualBudget::getProjectId,projectId)); - if (projectAnnualBudget == null) { - return Result.error("未找到对应数据"); - } + /*if (projectAnnualBudget == null) { + return Result.error("暂无数据"); + }*/ return Result.OK(projectAnnualBudget); } diff --git a/jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/controller/SysUserController.java b/jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/controller/SysUserController.java index 1c2c097..83a7360 100644 --- a/jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/controller/SysUserController.java +++ b/jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/controller/SysUserController.java @@ -2024,6 +2024,7 @@ public class SysUserController { user.setSalt(salt); user.setUsername(username); user.setWorkNo(workon); + user.setOrgCode(depart.getOrgCode()); user.setRealname(realname); user.setPassword(passwordEncode); //user.setEmail(email);