Commit ed8343b3 authored by caotao's avatar caotao

修改智能分析健康指数、权重等权限过滤

parent c2cdd554
......@@ -84,9 +84,9 @@ public class TdInfoQueryController extends BaseController {
ReginParams reginParams = getSelectedOrgInfo();
String userId = reginParams.getUserModel().getUserId();
StdUserEmpower stdUserEmpower = userEmpowerMapper.selectOne(new QueryWrapper<StdUserEmpower>().eq("amos_user_id", userId).eq("permission_type", "YTH"));
String orgCode = "86";
String orgCode = "86"+"%";
if (!ObjectUtils.isEmpty(stdUserEmpower)) {
orgCode = stdUserEmpower.getAmosOrgCode().get(0);
orgCode = stdUserEmpower.getAmosOrgCode().get(0)+"%";
}
dto.setOrgCode(orgCode);
if (CharSequenceUtil.isNotEmpty(dto.getStartDate())) {
......@@ -160,9 +160,9 @@ public class TdInfoQueryController extends BaseController {
ReginParams reginParams = getSelectedOrgInfo();
String userId = reginParams.getUserModel().getUserId();
StdUserEmpower stdUserEmpower = userEmpowerMapper.selectOne(new QueryWrapper<StdUserEmpower>().eq("amos_user_id", userId).eq("permission_type", "YTH"));
String orgCode = "86";
String orgCode = "86"+"%";
if (!ObjectUtils.isEmpty(stdUserEmpower)) {
orgCode = stdUserEmpower.getAmosOrgCode().get(0);
orgCode = stdUserEmpower.getAmosOrgCode().get(0)+"%";
}
dto.setOrgCode(orgCode);
if (CharSequenceUtil.isNotEmpty(dto.getStartDate())) {
......@@ -219,9 +219,9 @@ public class TdInfoQueryController extends BaseController {
ReginParams reginParams = getSelectedOrgInfo();
String userId = reginParams.getUserModel().getUserId();
StdUserEmpower stdUserEmpower = userEmpowerMapper.selectOne(new QueryWrapper<StdUserEmpower>().eq("amos_user_id", userId).eq("permission_type", "YTH"));
String orgCode = "86";
String orgCode = "86"+"%";
if (!ObjectUtils.isEmpty(stdUserEmpower)) {
orgCode = stdUserEmpower.getAmosOrgCode().get(0);
orgCode = stdUserEmpower.getAmosOrgCode().get(0)+"%";
}
dto.setOrgCode(orgCode);
if (CharSequenceUtil.isNotEmpty(dto.getStartDate())) {
......@@ -277,9 +277,9 @@ public class TdInfoQueryController extends BaseController {
ReginParams reginParams = getSelectedOrgInfo();
String userId = reginParams.getUserModel().getUserId();
StdUserEmpower stdUserEmpower = userEmpowerMapper.selectOne(new QueryWrapper<StdUserEmpower>().eq("amos_user_id", userId).eq("permission_type", "YTH"));
String orgCode = "86";
String orgCode = "86"+"%";
if (!ObjectUtils.isEmpty(stdUserEmpower)) {
orgCode = stdUserEmpower.getAmosOrgCode().get(0);
orgCode = stdUserEmpower.getAmosOrgCode().get(0)+"%";
}
dto.setOrgCode(orgCode);
if (CharSequenceUtil.isNotEmpty(dto.getStartDate())) {
......
......@@ -301,6 +301,7 @@ public class HealthStatusIndicatorServiceImpl {
pvWarningRecord.setRecDate(format);
pvWarningRecord.setTs(timestamp);
pvWarningRecord.setHealthIndex(String.format(CommonConstans.Onedecimalplaces,idxBizPvHealthIndices.get(0).getHealthIndex()));
pvWarningRecord.setOrgCode(idxBizPvHealthIndices.get(0).getOrgCode());
tdPvWarningRecordList.add(pvWarningRecord);
// idxBizPvWarningRecordMapper.insert(idxBizPvWarningRecord);
}
......
......@@ -181,10 +181,11 @@
<if test="dto.subSystem!= null and dto.subSystem!= ''">AND sub_system = #{dto.subSystem} </if>
<if test="dto.equipmentName!= null and dto.equipmentName!= ''">AND equipment_name = #{dto.equipmentName}
</if>
<if test="dto.orgCode != null and dto.orgCode != ''">
and org_code like #{dto.orgCode}
</if>
</where>
<if test="dto.orgCode != null and dto.orgCode != ''">
org_code like CONCAT(#{dto.orgCode},'%')
</if>
<if test="dto.orderColumns != null and dto.orderColumns != ''">
order by ${dto.orderColumns}
</if>
......@@ -209,10 +210,11 @@
<if test="dto.subSystem!= null and dto.subSystem!= ''">AND sub_system = #{dto.subSystem} </if>
<if test="dto.equipmentName!= null and dto.equipmentName!= ''">AND equipment_name = #{dto.equipmentName}
</if>
<if test="dto.orgCode != null and dto.orgCode != ''">
and org_code like #{dto.orgCode}
</if>
</where>
<if test="dto.orgCode != null and dto.orgCode != ''">
org_code like CONCAT(#{dto.orgCode},'%')
</if>
</select>
<select id="saveBatchHealthIndexLatestInfo" resultType="int">
......
......@@ -241,10 +241,10 @@
#{item}
</foreach>
</if>
<if test="dto.orgCode != null and dto.orgCode != ''">
and org_code like #{dto.orgCode}
</if>
</where>
<if test="dto.orgCode != null and dto.orgCode != ''">
org_code like concat(#{dto.orgCode},'%')
</if>
<if test="dto.orderColumns != null and dto.orderColumns != ''">
order by ${dto.orderColumns}
</if>
......@@ -271,10 +271,10 @@
#{item}
</foreach>
</if>
<if test="dto.orgCode != null and dto.orgCode != ''">
and org_code like #{dto.orgCode}
</if>
</where>
<if test="dto.orgCode != null and dto.orgCode != ''">
org_code like concat(#{dto.orgCode},'%')
</if>
</select>
<select id="getInfoByTs" resultType="com.yeejoin.amos.boot.module.jxiop.biz.tdengine.FanWarningRecord">
......
......@@ -212,10 +212,11 @@
<if test="dto.healthLevel!= null and dto.healthLevel!= ''">AND health_level = #{dto.healthLevel} </if>
<if test="dto.equipmentName!= null and dto.equipmentName!= ''">AND equipment_name = #{dto.equipmentName}
</if>
<if test="dto.orgCode != null and dto.orgCode != ''">
and org_code like #{dto.orgCode}
</if>
</where>
<if test="dto.orgCode != null and dto.orgCode != ''">
org_code like CONCAT(#{dto.orgCode},'%')
</if>
<if test="dto.orderColumns != null and dto.orderColumns != ''">
order by ${dto.orderColumns}
</if>
......@@ -239,10 +240,11 @@
<if test="dto.healthLevel!= null and dto.healthLevel!= ''">AND health_level = #{dto.healthLevel} </if>
<if test="dto.equipmentName!= null and dto.equipmentName!= ''">AND equipment_name = #{dto.equipmentName}
</if>
<if test="dto.orgCode != null and dto.orgCode != ''">
and org_code like #{dto.orgCode}
</if>
</where>
<if test="dto.orgCode != null and dto.orgCode != ''">
org_code like CONCAT(#{dto.orgCode},'%')
</if>
</select>
<select id="saveBatchHealthIndexLatestInfo" resultType="int">
......
......@@ -260,10 +260,11 @@
<if test="dto.disposotionState!= null and dto.disposotionState!= ''">AND disposotion_state = #{dto.disposotionState} </if>
<if test="dto.endDate!= null and dto.endDate!= '' "> and ts &lt;= #{dto.endDate} </if>
<if test="dto.startDate!= null and dto.startDate!= ''"> and ts &gt;= #{dto.startDate} </if>
<if test="dto.orgCode != null and dto.orgCode != ''">
and org_code like #{dto.orgCode}
</if>
</where>
<if test="dto.orgCode != null and dto.orgCode != ''">
org_code like concat(#{dto.orgCode},'%')
</if>
<if test="dto.orderColumns != null and dto.orderColumns != ''">
order by ${dto.orderColumns}
</if>
......@@ -285,10 +286,11 @@
<if test="dto.disposotionState!= null and dto.disposotionState!= ''">AND disposotion_state = #{dto.disposotionState} </if>
<if test="dto.endDate!= null and dto.endDate!= '' "> and ts &lt;= #{dto.endDate} </if>
<if test="dto.startDate!= null and dto.startDate!= ''"> and ts &gt;= #{dto.startDate} </if>
<if test="dto.orgCode != null and dto.orgCode != ''">
and org_code like #{dto.orgCode}
</if>
</where>
<if test="dto.orgCode != null and dto.orgCode != ''">
org_code like concat(#{dto.orgCode},'%')
</if>
</select>
<select id="getInfoByTs" resultType="com.yeejoin.amos.boot.module.jxiop.biz.tdengine.PvWarningRecord">
......
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