问题修改 11.10

master
zhc077 2 weeks ago
parent a89ea23432
commit 678ad04719
  1. 10
      jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/project/controller/ProjectController.java
  2. 2
      jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/project/service/impl/ProjectServiceImpl.java
  3. 6
      jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/projectAnnualBudget/controller/ProjectAnnualBudgetController.java
  4. 1
      jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/controller/SysUserController.java

@ -307,7 +307,6 @@ public class ProjectController extends JeecgController<Project, IProjectService>
} }
IPage<Project> pageList = projectService.page(page, queryWrapper); IPage<Project> pageList = projectService.page(page, queryWrapper);
return Result.OK(pageList); return Result.OK(pageList);
} }
@ -420,7 +419,7 @@ public class ProjectController extends JeecgController<Project, IProjectService>
ProjectType projectType = iProjectTypeService.getById(project.getProjectTypeid()); ProjectType projectType = iProjectTypeService.getById(project.getProjectTypeid());
project.setAnnualName(projectType.getAnnualName()); project.setAnnualName(projectType.getAnnualName());
project.setProjectTypeName(projectType.getTypeName()); project.setProjectTypeName(projectType.getTypeName());
SysDepart sysDepart = iSysDepartService.getById(project.getSysOrgCode()); SysDepart sysDepart = iSysDepartService.getOne(new LambdaQueryWrapper<SysDepart>().eq(SysDepart::getOrgCode,project.getSysOrgCode()));
project.setDepartName(sysDepart.getDepartName()); project.setDepartName(sysDepart.getDepartName());
SysUser sysUser = iSysUserService.getById(project.getProjectCharger()); SysUser sysUser = iSysUserService.getById(project.getProjectCharger());
project.setProjectCharger(sysUser.getRealname()); project.setProjectCharger(sysUser.getRealname());
@ -434,7 +433,8 @@ public class ProjectController extends JeecgController<Project, IProjectService>
ProjectType projectType = iProjectTypeService.getById(project.getProjectTypeid()); ProjectType projectType = iProjectTypeService.getById(project.getProjectTypeid());
project.setAnnualName(projectType.getAnnualName()); project.setAnnualName(projectType.getAnnualName());
project.setProjectTypeName(projectType.getTypeName()); project.setProjectTypeName(projectType.getTypeName());
SysDepart sysDepart = iSysDepartService.getById(project.getSysOrgCode()); // SysDepart sysDepart = iSysDepartService.getById(project.getSysOrgCode());
SysDepart sysDepart = iSysDepartService.getOne(new LambdaQueryWrapper<SysDepart>().eq(SysDepart::getOrgCode,project.getSysOrgCode()));
project.setDepartName(sysDepart.getDepartName()); project.setDepartName(sysDepart.getDepartName());
SysUser sysUser = iSysUserService.getById(project.getProjectCharger()); SysUser sysUser = iSysUserService.getById(project.getProjectCharger());
project.setProjectCharger(sysUser.getRealname()); project.setProjectCharger(sysUser.getRealname());
@ -522,8 +522,12 @@ public class ProjectController extends JeecgController<Project, IProjectService>
Depadminlx depadminlx = iDepadminlxService.getOne(new LambdaQueryWrapper<Depadminlx>().eq(Depadminlx::getDepid, project.getSysOrgCode())); Depadminlx depadminlx = iDepadminlxService.getOne(new LambdaQueryWrapper<Depadminlx>().eq(Depadminlx::getDepid, project.getSysOrgCode()));
DepartExtDto2 dto = new DepartExtDto2(); DepartExtDto2 dto = new DepartExtDto2();
BeanUtils.copyProperties(sysDepart, dto); BeanUtils.copyProperties(sysDepart, dto);
if (ObjectUtil.isNotEmpty(departExt)) {
BeanUtils.copyProperties(departExt, dto); BeanUtils.copyProperties(departExt, dto);
}
if (ObjectUtil.isNotEmpty(depadminlx)) {
BeanUtils.copyProperties(depadminlx, dto); BeanUtils.copyProperties(depadminlx, dto);
}
ProjectType projectType = iProjectTypeService.getById(project.getProjectTypeid()); ProjectType projectType = iProjectTypeService.getById(project.getProjectTypeid());
dto.setAnnualName(projectType.getAnnualName()); dto.setAnnualName(projectType.getAnnualName());
List<DictModel> dictModels = sysBaseApi.queryDictItemsByCode("depart_type"); List<DictModel> dictModels = sysBaseApi.queryDictItemsByCode("depart_type");

@ -106,7 +106,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
BeanUtils.copyProperties(dto, sysDepart); BeanUtils.copyProperties(dto, sysDepart);
BeanUtils.copyProperties(dto, userExt); BeanUtils.copyProperties(dto, userExt);
BeanUtils.copyProperties(dto, project); BeanUtils.copyProperties(dto, project);
project.setSysOrgCode(loginUser.getOrgId()); project.setSysOrgCode(loginUser.getOrgCode());
this.updateById(project); this.updateById(project);
userExt.setUserId(loginUser.getId()); userExt.setUserId(loginUser.getId());

@ -154,9 +154,9 @@ public class ProjectAnnualBudgetController extends JeecgController<ProjectAnnual
@GetMapping(value = "/queryByProjectId/{projectId}") @GetMapping(value = "/queryByProjectId/{projectId}")
public Result<ProjectAnnualBudget> queryByProjectId(@PathVariable("projectId") String projectId) { public Result<ProjectAnnualBudget> queryByProjectId(@PathVariable("projectId") String projectId) {
ProjectAnnualBudget projectAnnualBudget = projectAnnualBudgetService.getOne(new LambdaQueryWrapper<ProjectAnnualBudget>().eq(ProjectAnnualBudget::getProjectId,projectId)); ProjectAnnualBudget projectAnnualBudget = projectAnnualBudgetService.getOne(new LambdaQueryWrapper<ProjectAnnualBudget>().eq(ProjectAnnualBudget::getProjectId,projectId));
if (projectAnnualBudget == null) { /*if (projectAnnualBudget == null) {
return Result.error("未找到对应数据"); return Result.error("暂无数据");
} }*/
return Result.OK(projectAnnualBudget); return Result.OK(projectAnnualBudget);
} }

@ -2024,6 +2024,7 @@ public class SysUserController {
user.setSalt(salt); user.setSalt(salt);
user.setUsername(username); user.setUsername(username);
user.setWorkNo(workon); user.setWorkNo(workon);
user.setOrgCode(depart.getOrgCode());
user.setRealname(realname); user.setRealname(realname);
user.setPassword(passwordEncode); user.setPassword(passwordEncode);
//user.setEmail(email); //user.setEmail(email);

Loading…
Cancel
Save