优化
This commit is contained in:
parent
7a6776690e
commit
85c4d09d84
@ -17,6 +17,7 @@ import com.zhgd.xmgl.modules.basicdata.service.IGovernmentService;
|
||||
import com.zhgd.xmgl.modules.basicdata.service.ISystemRoleService;
|
||||
import com.zhgd.xmgl.security.SecurityUser;
|
||||
import com.zhgd.xmgl.security.SecurityUtil;
|
||||
import com.zhgd.xmgl.util.ParamEnum;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
@ -80,12 +81,10 @@ public class SystemRoleServiceImpl extends ServiceImpl<SystemRoleMapper, SystemR
|
||||
List<EnterpriseMain> enterpriseMainList = enterpriseMainMapper.selectList(Wrappers.<EnterpriseMain>lambdaQuery().eq(EnterpriseMain::getEnterpriseSn, systemRole.getSn()));
|
||||
for (EnterpriseMain main : enterpriseMainList) {
|
||||
String code = "";
|
||||
if (main.getMainType() == 1) {
|
||||
code = "BUILD";
|
||||
} else if (main.getMainType() == 2) {
|
||||
code = "SUPERVISOR";
|
||||
} else if (main.getMainType() == 3) {
|
||||
code = "OP";
|
||||
for (ParamEnum.EngineeringMain type : ParamEnum.EngineeringMain.values()) {
|
||||
if (main.getMainType() == type.getValue()); {
|
||||
code = type.name();
|
||||
}
|
||||
}
|
||||
SystemRole systemRole1 = this.getOne(Wrappers.<SystemRole>lambdaQuery()
|
||||
.eq(SystemRole::getRoleCode, code));
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user