Commit 1a323c36 authored by wangxl's avatar wangxl

1

parent b0df2339
......@@ -5,16 +5,15 @@ import com.yiboshi.science.base.Pagination;
import com.yiboshi.science.config.annotation.Logs;
import com.yiboshi.science.config.security.SecurityUserHolder;
import com.yiboshi.science.entity.ComExpert;
import com.yiboshi.science.entity.ComExpertSpec;
import com.yiboshi.science.entity.SystemUser;
import com.yiboshi.science.enumeration.CommonEnum;
import com.yiboshi.science.param.dto.ComExpertSpecDTO;
import com.yiboshi.science.param.dto.ComPersonDTO;
import com.yiboshi.science.param.dto.SystemUserDTO;
import com.yiboshi.science.param.query.SystemUserQueryVO;
import com.yiboshi.science.rest.BaseController;
import com.yiboshi.science.service.ComExpertService;
import com.yiboshi.science.service.ComProjectAssignService;
import com.yiboshi.science.service.SystemUserRoleService;
import com.yiboshi.science.service.SystemUserService;
import com.yiboshi.science.service.*;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.commons.lang.StringUtils;
......@@ -49,6 +48,9 @@ public class SystemUserController extends BaseController<SystemUserService, Syst
@Autowired
private ComExpertService comExpertService;
@Autowired
private ComExpertSpecService comExpertSpecService;
/**
* 功能:分页查询
*
......@@ -110,14 +112,17 @@ public class SystemUserController extends BaseController<SystemUserService, Syst
for (String e : roles) {
if (!r.contains(e)) {
systemUserRoleService.deleteRoleByUserId(dto.getId(), e);
if (e.equals(CommonEnum.systemRole.expert.getCode().toString())) {
ComExpert comExpert = new ComExpert();
comExpert.setPersonId(user.getPersonId());
comExpert = comExpertService.getEntity(comExpert);
if (null != comExpert && !comProjectAssignService.isAssignByExpertId(comExpert.getId())) {
comExpertService.deleteById(comExpert.getId());
}
}
// if (e.equals(CommonEnum.systemRole.expert.getCode().toString())) {
// ComExpert comExpert = new ComExpert();
// comExpert.setPersonId(user.getPersonId());
// comExpert = comExpertService.getEntity(comExpert);
// if (null != comExpert && !comProjectAssignService.isAssignByExpertId(comExpert.getId())) {
// comExpertService.deleteById(comExpert.getId());
// ComExpertSpec spec=new ComExpertSpec();
// spec.setExpertId(comExpert.getId());
// comExpertSpecService.delete(spec);
// }
// }
}
}
String s = StringUtils.join(roles.toArray(), ",");
......
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