详情修改

gst4base
王家东 2 months ago
parent 282de55ae8
commit 5e6d4ae8e0
  1. 20
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/comp/controller/CompController.java

@ -479,6 +479,26 @@ public class CompController extends JeecgController<Comp, ICompService> {
@GetMapping(value = "/complistnoxq") @GetMapping(value = "/complistnoxq")
public Result<?> complistnoxq(@RequestParam(name = "id", required = true) String id) { public Result<?> complistnoxq(@RequestParam(name = "id", required = true) String id) {
Comp comp = compService.getById(id); Comp comp = compService.getById(id);
if (comp.getCompAdmin()!= null) {
QueryChainWrapper<SysUser> query = sysUserService.query();
query.eq("work_no", comp.getCompAdmin());
SysUser sysUser = query.one();
if (sysUser != null && sysUser.getRealname() != null) {
comp.setCompAdmin(sysUser.getRealname());
}
}
if (comp.getCompOrgan() != null) {
SysDepart sysDepart = iSysDepartService.getById(comp.getCompOrgan());
if (sysDepart != null && sysDepart.getDepartName() != null) {
comp.setComporderc(sysDepart.getDepartName());
}
}
if (!comp.getCompTypeId().isEmpty()) {
CompType compType = compTypeService.getById(comp.getCompTypeId());
if (compType != null && compType.getTypeName() != null) {
comp.setCompTypeId(compType.getTypeName());
}
}
return Result.OK(comp); return Result.OK(comp);
} }

Loading…
Cancel
Save