Commit 6da7355c authored by 赵啸非's avatar 赵啸非

添加用户所属员工

parent c4beeab5
...@@ -430,6 +430,13 @@ export default { ...@@ -430,6 +430,13 @@ export default {
formatter: this.formatter, formatter: this.formatter,
align: "center", align: "center",
}, },
{
prop: "customerId",
label: "所属员工",
formatter: this.formatter,
align: "center",
},
{ {
prop: "roleIds", prop: "roleIds",
label: "所属角色", label: "所属角色",
......
...@@ -19,6 +19,7 @@ import com.mortals.xhx.common.code.UserStatus; ...@@ -19,6 +19,7 @@ import com.mortals.xhx.common.code.UserStatus;
import com.mortals.xhx.common.code.UserType; import com.mortals.xhx.common.code.UserType;
import com.mortals.xhx.module.dept.model.DeptQuery; import com.mortals.xhx.module.dept.model.DeptQuery;
import com.mortals.xhx.module.dept.service.DeptService; import com.mortals.xhx.module.dept.service.DeptService;
import com.mortals.xhx.module.staff.service.StaffService;
import io.jsonwebtoken.Claims; import io.jsonwebtoken.Claims;
import io.jsonwebtoken.Jwts; import io.jsonwebtoken.Jwts;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -51,6 +52,9 @@ public class UserController extends BaseCRUDJsonBodyMappingController<UserServic ...@@ -51,6 +52,9 @@ public class UserController extends BaseCRUDJsonBodyMappingController<UserServic
@Autowired @Autowired
private DeptService deptService; private DeptService deptService;
@Autowired
private StaffService staffService;
public UserController() { public UserController() {
super.setModuleDesc("用户信息"); super.setModuleDesc("用户信息");
} }
...@@ -62,6 +66,8 @@ public class UserController extends BaseCRUDJsonBodyMappingController<UserServic ...@@ -62,6 +66,8 @@ public class UserController extends BaseCRUDJsonBodyMappingController<UserServic
this.addDict(model, "roleIds", roleService.find(new RoleQuery()).stream().collect(Collectors.toMap(x -> x.getId().toString(), y -> y.getName()))); this.addDict(model, "roleIds", roleService.find(new RoleQuery()).stream().collect(Collectors.toMap(x -> x.getId().toString(), y -> y.getName())));
this.addDict(model, "deptId", deptService.find(new DeptQuery()).stream().collect(Collectors.toMap(x -> x.getId().toString(), y -> y.getDeptName(), (o, n) -> n))); this.addDict(model, "deptId", deptService.find(new DeptQuery()).stream().collect(Collectors.toMap(x -> x.getId().toString(), y -> y.getDeptName(), (o, n) -> n)));
this.addDict(model, "customerId", staffService.getCacheList().stream().collect(Collectors.toMap(x -> x.getId().toString(), y -> y.getName(), (o, n) -> n)));
} }
@Override @Override
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment