This commit is contained in:
pengjie 2023-11-29 09:38:57 +08:00
parent 7a6776690e
commit 85c4d09d84

View File

@ -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));