Commit fa8d7e5e authored by chenzhao's avatar chenzhao

增加权限控制 # 故障告警/消防告警/跑马灯权限标识 true 机场 / false 电力

parent a5a936e5
......@@ -10,6 +10,7 @@ import javax.servlet.http.HttpServletResponse;
import com.yeejoin.amos.boot.biz.common.bo.ReginParams;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.MediaType;
import org.springframework.util.ObjectUtils;
import org.springframework.web.bind.annotation.RequestMapping;
......@@ -51,8 +52,8 @@ public class EquipmentAlarmController extends AbstractBaseController {
@Autowired
IEquipmentSpecificAlarmService iEquipmentSpecificAlarmService;
@Value("${equip.enabled}")
private Boolean equioEnabled;
/**
* 列表列名
*
......@@ -157,11 +158,17 @@ public class EquipmentAlarmController extends AbstractBaseController {
request12.setName("isRemoveShield");
request12.setValue(StringUtil.isNotEmpty(isRemoveShield) ? StringUtils.trimToNull(isRemoveShield) : null);
queryRequests.add(request12);
if (!ValidationUtil.isEmpty(reginParams.getPersonIdentity())){
if (equioEnabled) {
if (!ValidationUtil.isEmpty(reginParams.getPersonIdentity())) {
CommonRequest request13 = new CommonRequest();
request13.setName("bizOrgCode");
request13.setValue(StringUtil.isNotEmpty(reginParams.getPersonIdentity().getBizOrgCode()) ? reginParams.getPersonIdentity().getBizOrgCode() : null);
queryRequests.add(request13);
}
}else {
CommonRequest request13 = new CommonRequest();
request13.setName("bizOrgCode");
request13.setValue(StringUtil.isNotEmpty(reginParams.getPersonIdentity().getBizOrgCode()) ? reginParams.getPersonIdentity().getBizOrgCode() : null );
queryRequests.add(request13);
request13.setValue("");
}
CommonPageInfoParam param = CommonPageParamUtil.fillCommonPageInfoParam(queryRequests, commonPageable);
Page<Map<String, Object>> list = iEquipmentSpecificAlarmService.listPage(param);
......@@ -279,13 +286,20 @@ public class EquipmentAlarmController extends AbstractBaseController {
request13.setName("isRemovedFire");
request13.setValue(StringUtil.isNotEmpty(isRemovedFire) ? StringUtils.trimToNull(isRemovedFire) : null);
queryRequests.add(request13);
if (!ValidationUtil.isEmpty(reginParams.getPersonIdentity())){
if (equioEnabled){
if (!ValidationUtil.isEmpty(reginParams.getPersonIdentity())){
CommonRequest request14 = new CommonRequest();
request14.setName("bizOrgCode");
request14.setValue(StringUtil.isNotEmpty(reginParams.getPersonIdentity().getBizOrgCode()) ? reginParams.getPersonIdentity().getBizOrgCode() : null );
queryRequests.add(request14);
}
}else {
CommonRequest request14 = new CommonRequest();
request14.setName("bizOrgCode");
request14.setValue(StringUtil.isNotEmpty(reginParams.getPersonIdentity().getBizOrgCode()) ? reginParams.getPersonIdentity().getBizOrgCode() : null );
queryRequests.add(request14);
request14.setValue("");
}
CommonPageInfoParam param = CommonPageParamUtil.fillCommonPageInfoParam(queryRequests, commonPageable);
CommonPageInfoParam param = CommonPageParamUtil.fillCommonPageInfoParam(queryRequests, commonPageable);
org.springframework.data.domain.Page<AlarmListDataVO> list = iEquipmentSpecificAlarmService.listAlarmsPage(param);
return CommonResponseUtil.success(list);
}
......
......@@ -85,6 +85,8 @@ dcs.token-key=dcs_token_key
dcs.client.secret=fire_system
dcs.x.hw.id=NR_REST_APP
dcs.x.hw.appKey=s+YkvQhwilx91TRJHhNDmw==
# 故障告警/消防告警/跑马灯权限标识 true 机场 / false 电力
equip.enabled =true
management.endpoints.enabled-by-default=false
......
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