Commit 8e44700d authored by caotao's avatar caotao

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

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