Commit 1f189d7f authored by 朱晨阳's avatar 朱晨阳

修改运维人员不显示电站监控区域公司列表

parent aefbd010
...@@ -55,6 +55,7 @@ public class UserLimitsAdvice { ...@@ -55,6 +55,7 @@ public class UserLimitsAdvice {
private static final String ROLEFLAGADMIN="-经销商-管理员"; private static final String ROLEFLAGADMIN="-经销商-管理员";
private static final String ROLEFLDEVELOP="-经销商-开发"; private static final String ROLEFLDEVELOP="-经销商-开发";
private static final String MAINTENANCE="-运维人员";
//调用的方法有该注解才会拦截 //调用的方法有该注解才会拦截
@Pointcut("@annotation(com.yeejoin.amos.boot.module.hygf.api.config.UserLimits)") @Pointcut("@annotation(com.yeejoin.amos.boot.module.hygf.api.config.UserLimits)")
...@@ -99,7 +100,16 @@ public class UserLimitsAdvice { ...@@ -99,7 +100,16 @@ public class UserLimitsAdvice {
stdUserEmpower.setFarmer(true); stdUserEmpower.setFarmer(true);
}else{ } else if(org.contains(MAINTENANCE)) {
// 运维人员
UserUnitInformationDto userUnitInformationDto=personnelBusinessMapper.getMaintenanceUserUnitInformationDto(userid);
stdUserEmpower.setFlag(false);
stdUserEmpower.setDeveloperId(userUnitInformationDto!=null?userUnitInformationDto.getAmosUnitInfoId():null);
stdUserEmpower.setRegionalCompaniesCode(userUnitInformationDto!=null?userUnitInformationDto.getRegionalCompaniesCode():null);
stdUserEmpower.setAmosOrgCode(Arrays.asList(userUnitInformationDto.getAmosDealerOrgCode()));
stdUserEmpower.setUserId(userid);
} else{
LambdaQueryWrapper<StdUserEmpower> qu=new LambdaQueryWrapper(); LambdaQueryWrapper<StdUserEmpower> qu=new LambdaQueryWrapper();
qu.eq(StdUserEmpower::getAmosUserId,userid); qu.eq(StdUserEmpower::getAmosUserId,userid);
qu.eq(StdUserEmpower::getPermissionType,"HYGF"); qu.eq(StdUserEmpower::getPermissionType,"HYGF");
......
...@@ -26,4 +26,10 @@ public interface PersonnelBusinessMapper extends BaseMapper<PersonnelBusiness> { ...@@ -26,4 +26,10 @@ public interface PersonnelBusinessMapper extends BaseMapper<PersonnelBusiness> {
UserUnitInformationDto getUserUnitInformationDto(@Param("userId")String userId); UserUnitInformationDto getUserUnitInformationDto(@Param("userId")String userId);
//根据平台userid 获取运维人员信息
UserUnitInformationDto getMaintenanceUserUnitInformationDto(@Param("userId")String userId);
} }
...@@ -83,4 +83,35 @@ select ORG_CODE orgCode from privilege_company where privilege_company.SEQUEN ...@@ -83,4 +83,35 @@ select ORG_CODE orgCode from privilege_company where privilege_company.SEQUEN
</select> </select>
<select id="getMaintenanceUserUnitInformationDto" resultType="com.yeejoin.amos.boot.module.hygf.api.dto.UserUnitInformationDto">
SELECT
hygf_maintenance.regional_companies_seq regionalCompaniesSeq,
hygf_maintenance.regional_companies_code regionalCompaniesCode,
hygf_maintenance.regional_companies_name regionalCompaniesName,
std_user_biz.amos_id amosUnitId,
privilege_company.COMPANY_NAME amosUnitName,
privilege_company.ORG_CODE amosUnitOrgCode,
hygf_maintenance.dealer_id amosDealerId,
hygf_unit_info.`name` amosDealerName,
hygf_unit_info.amos_company_code amosDealerOrgCode,
hygf_unit_info.sequence_nbr amosUnitInfoId
FROM
std_user_biz
JOIN hygf_maintenance on std_user_biz.sequence_nbr = hygf_maintenance.foundation_id
JOIN hygf_unit_info on hygf_maintenance.dealer_id = hygf_unit_info.sequence_nbr
JOIN privilege_company on privilege_company.SEQUENCE_NBR = std_user_biz.amos_id
WHERE
std_user_biz.amos_user_id =#{userId}
</select>
</mapper> </mapper>
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