Commit 8e44700d authored by caotao's avatar caotao

智能分析指标权限配置权限过滤问题处理

parent 83f124b9
......@@ -58,7 +58,7 @@ public class IdxBizFanWeightController extends BaseController {
String userId = reginParams.getUserModel().getUserId();
StdUserEmpower stdUserEmpower = userEmpowerMapper.selectOne(new QueryWrapper<StdUserEmpower>().eq("amos_user_id", userId).eq("permission_type", "YTH"));
String orgCode = "86";
if (ObjectUtils.isEmpty(stdUserEmpower)) {
if (!ObjectUtils.isEmpty(stdUserEmpower)) {
orgCode = stdUserEmpower.getAmosOrgCode().get(0);
}
LambdaQueryWrapper<IdxBizFanWeight> qu=new LambdaQueryWrapper<>();
......@@ -123,7 +123,7 @@ public class IdxBizFanWeightController extends BaseController {
String userId = reginParams.getUserModel().getUserId();
StdUserEmpower stdUserEmpower = userEmpowerMapper.selectOne(new QueryWrapper<StdUserEmpower>().eq("amos_user_id", userId).eq("permission_type", "YTH"));
String orgCode = "86";
if (ObjectUtils.isEmpty(stdUserEmpower)) {
if (!ObjectUtils.isEmpty(stdUserEmpower)) {
orgCode = stdUserEmpower.getAmosOrgCode().get(0);
}
QueryWrapper< IdxBizFanWeight> qu=new QueryWrapper<>();
......
......@@ -63,7 +63,7 @@ public class IdxBizPvWeightController extends BaseController {
String userId = reginParams.getUserModel().getUserId();
StdUserEmpower stdUserEmpower = userEmpowerMapper.selectOne(new QueryWrapper<StdUserEmpower>().eq("amos_user_id", userId).eq("permission_type", "YTH"));
String orgCode = "86";
if (ObjectUtils.isEmpty(stdUserEmpower)) {
if (!ObjectUtils.isEmpty(stdUserEmpower)) {
orgCode = stdUserEmpower.getAmosOrgCode().get(0);
}
LambdaQueryWrapper<IdxBizPvWeight> qu=new LambdaQueryWrapper<>();
......@@ -130,7 +130,7 @@ public class IdxBizPvWeightController extends BaseController {
String userId = reginParams.getUserModel().getUserId();
StdUserEmpower stdUserEmpower = userEmpowerMapper.selectOne(new QueryWrapper<StdUserEmpower>().eq("amos_user_id", userId).eq("permission_type", "YTH"));
String orgCode = "86";
if (ObjectUtils.isEmpty(stdUserEmpower)) {
if (!ObjectUtils.isEmpty(stdUserEmpower)) {
orgCode = stdUserEmpower.getAmosOrgCode().get(0);
}
QueryWrapper< IdxBizPvWeight> qu=new QueryWrapper<>();
......
......@@ -104,6 +104,10 @@ public class IdxBizFanPointProcessVariableClassificationDto {
@TableField("KKS")
private String kks;
@ApiModelProperty(value = "orgCode")
@TableField("ORG_CODE")
private String orgCode;
private Double currentValue;
......
......@@ -5,19 +5,19 @@ import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.time.LocalDateTime;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
/**
*
*
* @author system_generator
* @date 2023-08-15
*/
@Data
@ApiModel(value="IdxBizPvPointProcessVariableClassificationDto", description="")
@ApiModel(value = "IdxBizPvPointProcessVariableClassificationDto", description = "")
public class IdxBizPvPointProcessVariableClassificationDto {
private static final long serialVersionUID = 1L;
......@@ -102,6 +102,9 @@ public class IdxBizPvPointProcessVariableClassificationDto {
@ApiModelProperty(value = "KKS码")
@TableField("KKS")
private String kks;
@ApiModelProperty(value = "orgCode")
@TableField("ORG_CODE")
private String orgCode;
private Double currentValue;
......
......@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yeejoin.amos.boot.biz.common.entity.BaseEntity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
......@@ -156,4 +157,8 @@ public class IdxBizFanPointProcessVariableClassification{
@TableField("KKS")
private String kks;
@ApiModelProperty(value = "orgCode")
@TableField("ORG_CODE")
private String orgCode;
}
......@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yeejoin.amos.boot.biz.common.entity.BaseEntity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
......@@ -164,4 +165,7 @@ public class IdxBizPvPointProcessVariableClassification{
@TableField("KKS")
private String kks;
@ApiModelProperty(value = "orgCode")
@TableField("ORG_CODE")
private String orgCode;
}
......@@ -1740,6 +1740,7 @@ public class CommonServiceImpl {
fanHealthIndex.setHealthLevel(fanHealthIndex.getHealthLevel());
fanHealthIndex.setKks(idxBizFanHealthIndex.getKks());
fanHealthIndex.setRecDate(format);
fanHealthIndex.setOrgCode(obj.getOrgCode());
fanHealthIndices1.add(fanHealthIndex);
}
}
......@@ -2019,6 +2020,7 @@ public class CommonServiceImpl {
pvHealthIndex.setHealthLevel(idxBizPvHealthIndex.getHealthLevel());
pvHealthIndex.setKks(idxBizPvHealthIndex.getKks());
pvHealthIndex.setRecDate(format);
pvHealthIndex.setOrgCode(obj.getOrgCode());
fanHealthIndices1.add(pvHealthIndex);
}
}
......
......@@ -804,6 +804,7 @@ public class HealthStatusIndicatorServiceImpl {
fanWarningRecord.setRecDate(format);
fanWarningRecord.setTs(timestamp);
fanWarningRecord.setHealthIndex(String.format(CommonConstans.Onedecimalplaces,idxBizFanHealthIndices.get(0).getHealthIndex()));
fanWarningRecord.setOrgCode(idxBizFanHealthIndices.get(0).getOrgCode());
tdFanWarningRecordList.add(fanWarningRecord);
......@@ -972,6 +973,7 @@ public class HealthStatusIndicatorServiceImpl {
fanWarningRecord.setRecDate(format);
fanWarningRecord.setTs(timestamp);
fanWarningRecord.setHealthIndex(String.format(CommonConstans.Onedecimalplaces,idxBizFanHealthIndices.get(0).getHealthIndex()));
fanWarningRecord.setOrgCode(idxBizFanHealthIndices.get(0).getOrgCode());
tdFanWarningRecordList.add(fanWarningRecord);
}
}
......@@ -1143,6 +1145,7 @@ public class HealthStatusIndicatorServiceImpl {
fanWarningRecord.setRecDate(format);
fanWarningRecord.setTs(timestamp);
fanWarningRecord.setHealthIndex(String.format(CommonConstans.Onedecimalplaces,idxBizFanHealthIndices.get(0).getHealthIndex()));
fanWarningRecord.setOrgCode(idxBizFanHealthIndices.get(0).getOrgCode());
tdFanWarningRecordList.add(fanWarningRecord);
}
}
......
......@@ -30,4 +30,5 @@ public class FanHealthIndex implements Serializable {
private String pointName;
private String analysisTime;
private String kks;
private String orgCode;
}
......@@ -31,4 +31,5 @@ public class FanHealthIndexDay implements Serializable {
private String kks;
private String status;
private String value;
private String orgCode;
}
......@@ -31,4 +31,5 @@ public class FanHealthIndexHour implements Serializable {
private String kks;
private String status;
private String value;
private String orgCode;
}
......@@ -31,4 +31,5 @@ public class FanHealthIndexMoment implements Serializable {
private String kks;
private String status;
private String value;
private String orgCode;
}
......@@ -28,4 +28,5 @@ public class FanWarningRecord implements Serializable {
private String kks;
private String warningPeriod;
private String status;
private String orgCode;
}
......@@ -34,5 +34,5 @@ public class PvHealthIndex {
private String pointName;
private String analysisTime;
private String kks;
private String orgCode;
}
......@@ -36,4 +36,5 @@ public class PvHealthIndexDay {
private String kks;
private String value;
private String status;
private String orgCode;
}
......@@ -36,5 +36,5 @@ public class PvHealthIndexHour {
private String kks;
private String value;
private String status;
private String orgCode;
}
......@@ -36,5 +36,5 @@ public class PvHealthIndexMoment {
private String kks;
private String value;
private String status;
private String orgCode;
}
......@@ -30,4 +30,5 @@ public class PvWarningRecord implements Serializable {
private String kks;
private String warningPeriod;
private String status;
private String orgCode;
}
......@@ -358,7 +358,8 @@
`ANOMALY`,
`POINT_NAME`,
`ANALYSIS_TIME`,
`KKS`
`KKS`,
`ORG_CODE`
)
values
<foreach collection="list" separator="," item="item" index="index">
......@@ -383,6 +384,7 @@
#{item.pointName, jdbcType=VARCHAR},
#{item.analysisTime, jdbcType=VARCHAR},
#{item.kks, jdbcType=VARCHAR}
#{item.orgCode, jdbcType=VARCHAR}
)
</foreach>
</insert>
......
......@@ -29,6 +29,7 @@
#{item.pointName, jdbcType=VARCHAR},
#{item.analysisTime, jdbcType=VARCHAR},
#{item.kks, jdbcType=VARCHAR}
#{item.orgCode, jdbcType=VARCHAR}
)
</foreach>
</insert>
......@@ -48,6 +49,7 @@
avg(anomaly) as anomaly,
point_name,
kks,
org_code,
AVG(health_index) as health_index
from
#{tableName}
......@@ -79,6 +81,7 @@
equipment_name,
number,
avg(anomaly) as anomaly,
org_code,
AVG(health_index) as health_index
from
#{tableName}
......@@ -104,6 +107,7 @@
number,
equipment_name,
avg(anomaly) as anomaly,
org_code,
AVG(health_index) as health_index
from
#{tableName}
......@@ -126,6 +130,7 @@
'场站' as analysis_obj_type,
area,
avg(anomaly) as anomaly,
org_code,
AVG(health_index) as health_index
from
#{tableName}
......@@ -144,6 +149,7 @@
'片区' as analysis_obj_type,
area,
avg(anomaly) as anomaly,
org_code,
AVG(health_index) as health_index
from
#{tableName}
......@@ -224,6 +230,7 @@
#{item.pointName, jdbcType=VARCHAR},
#{item.analysisTime, jdbcType=VARCHAR},
#{item.kks, jdbcType=VARCHAR}
#{item.orgCode, jdbcType=VARCHAR}
)
</foreach>
......@@ -498,6 +505,7 @@
select
'全域' as analysis_obj_type,
avg(anomaly) as anomaly,
org_code,
AVG(health_index) as health_index
from
#{tableName}
......
......@@ -52,6 +52,7 @@
#{item.kks, jdbcType=VARCHAR},
#{item.warningPeriod, jdbcType=VARCHAR},
#{item.status, jdbcType=VARCHAR})
#{item.orgCode, jdbcType=VARCHAR})
</foreach>
</insert>
......
......@@ -63,6 +63,7 @@
#{item.pointName, jdbcType=VARCHAR},
#{item.analysisTime, jdbcType=VARCHAR},
#{item.kks, jdbcType=VARCHAR}
#{item.orgCode, jdbcType=VARCHAR}
)
</foreach>
</insert>
......
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