|
@@ -21,6 +21,8 @@ import com.google.common.collect.Maps;
|
|
import com.jeeplus.common.json.AjaxJson;
|
|
import com.jeeplus.common.json.AjaxJson;
|
|
import com.jeeplus.common.oss.OSSClientUtil;
|
|
import com.jeeplus.common.oss.OSSClientUtil;
|
|
import com.jeeplus.modules.sys.entity.Area;
|
|
import com.jeeplus.modules.sys.entity.Area;
|
|
|
|
+import com.jeeplus.modules.sys.entity.Role;
|
|
|
|
+import com.jeeplus.modules.sys.service.RoleService;
|
|
import com.jeeplus.modules.sys.utils.DictUtils;
|
|
import com.jeeplus.modules.sys.utils.DictUtils;
|
|
import com.jeeplus.modules.sys.utils.UserUtils;
|
|
import com.jeeplus.modules.sys.utils.UserUtils;
|
|
import com.jeeplus.modules.sysimportinfo.entity.SysImportInfo;
|
|
import com.jeeplus.modules.sysimportinfo.entity.SysImportInfo;
|
|
@@ -75,6 +77,8 @@ public class WorkStaffBasicInfoController extends BaseController {
|
|
private WorkProjectNotifyService workProjectNotifyService;
|
|
private WorkProjectNotifyService workProjectNotifyService;
|
|
@Autowired
|
|
@Autowired
|
|
private SysImportInfoService sysImportInfoService;
|
|
private SysImportInfoService sysImportInfoService;
|
|
|
|
+ @Autowired
|
|
|
|
+ private RoleService roleService;
|
|
|
|
|
|
@ModelAttribute
|
|
@ModelAttribute
|
|
public WorkStaffBasicInfo get(@RequestParam(required=false) String id) {
|
|
public WorkStaffBasicInfo get(@RequestParam(required=false) String id) {
|
|
@@ -118,6 +122,7 @@ public class WorkStaffBasicInfoController extends BaseController {
|
|
workStaffBasicInfo.setMarriage("未婚");
|
|
workStaffBasicInfo.setMarriage("未婚");
|
|
workStaffBasicInfo.setNation(DictUtils.getDictValue("汉族","nation_type",""));
|
|
workStaffBasicInfo.setNation(DictUtils.getDictValue("汉族","nation_type",""));
|
|
}
|
|
}
|
|
|
|
+ workStaffBasicInfo.setRoleId(roleService.getRoleIdByUserId(workStaffBasicInfo.getUserId()));
|
|
model.addAttribute("workStaffBasicInfo", workStaffBasicInfo);
|
|
model.addAttribute("workStaffBasicInfo", workStaffBasicInfo);
|
|
String view = "modules/workstaff/workStaffBasicInfoForm";
|
|
String view = "modules/workstaff/workStaffBasicInfoForm";
|
|
if(UserUtils.getUser().getId().equals(workStaffBasicInfo.getUserId())){
|
|
if(UserUtils.getUser().getId().equals(workStaffBasicInfo.getUserId())){
|
|
@@ -186,7 +191,10 @@ public class WorkStaffBasicInfoController extends BaseController {
|
|
if(StringUtils.isNotBlank(workStaffBasicInfo.getId())){
|
|
if(StringUtils.isNotBlank(workStaffBasicInfo.getId())){
|
|
workStaffBasicInfoService.queryDetails(workStaffBasicInfo);
|
|
workStaffBasicInfoService.queryDetails(workStaffBasicInfo);
|
|
}
|
|
}
|
|
- model.addAttribute("workStaffBasicInfo", workStaffBasicInfo);
|
|
|
|
|
|
+ Role role = roleService.get(roleService.getRoleIdByUserId(workStaffBasicInfo.getUserId()));
|
|
|
|
+ workStaffBasicInfo.setRoleId(role.getId());
|
|
|
|
+ workStaffBasicInfo.setRoleName(role.getName());
|
|
|
|
+ model.addAttribute("workStaffBasicInfo", workStaffBasicInfo);
|
|
return "modules/workstaff/workStaffBasicInfoView";
|
|
return "modules/workstaff/workStaffBasicInfoView";
|
|
}
|
|
}
|
|
|
|
|