refactor(logs): 重构日志服务相关配置和线路数据分析逻辑
- 将CsLogsPOMapper.xml从cs-device模块迁移至cs-system模块 - 更新CsLogsFeignClient的服务器配置从CS_DEVICE_BOOT到CS_SYSTEM_BOOT - 优化CsGroupServiceImpl中的设备线路查询逻辑,直接使用敏感用户ID获取线路数据 - 在StableDataServiceImpl中新增电网侧和负荷侧字典常量定义 - 重构线路数据过滤逻辑,按电网侧和负荷侧分别处理数据 - 添加数据分组处理机制,区分治理前后数据并设置相应标识
This commit is contained in:
@@ -1,23 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.njcn.csdevice.mapper.CsLogsPOMapper">
|
||||
<resultMap id="BaseResultMap" type="com.njcn.csdevice.pojo.po.CsLogsPO">
|
||||
<!--@mbg.generated-->
|
||||
<!--@Table cs_logs-->
|
||||
<id column="id" jdbcType="VARCHAR" property="id" />
|
||||
<result column="user_name" jdbcType="VARCHAR" property="userName" />
|
||||
<result column="operate" jdbcType="VARCHAR" property="operate" />
|
||||
<result column="result" jdbcType="INTEGER" property="result" />
|
||||
<result column="fail_reason" jdbcType="VARCHAR" property="failReason" />
|
||||
<result column="create_by" jdbcType="CHAR" property="createBy" />
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
<result column="update_by" jdbcType="CHAR" property="updateBy" />
|
||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||
<result column="login_name" jdbcType="VARCHAR" property="loginName" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
<!--@mbg.generated-->
|
||||
id, user_name, operate, `result`, fail_reason, create_by, create_time, update_by,
|
||||
update_time, login_name
|
||||
</sql>
|
||||
</mapper>
|
||||
@@ -1337,12 +1337,7 @@ public class CsGroupServiceImpl extends ServiceImpl<CsGroupMapper, CsGroup> impl
|
||||
result.put("before", new ArrayList<>());
|
||||
result.put("after", new ArrayList<>());
|
||||
String sensitiveUserId = param.getSensitiveUserId();
|
||||
List<CsEquipmentDeliveryPO> devList = csLineFeignClient.getDevBySensitiveUser(Collections.singletonList(sensitiveUserId)).getData();
|
||||
if (CollUtil.isEmpty(devList)) {
|
||||
return result;
|
||||
}
|
||||
List<String> devIds = devList.stream().map(CsEquipmentDeliveryPO::getId).collect(Collectors.toList());
|
||||
List<CsLinePO> linePOList = csLineFeignClient.getLinesByDevList(devIds).getData();
|
||||
List<CsLinePO> linePOList = csLineFeignClient.getLinesByDevList(Collections.singletonList(sensitiveUserId)).getData();
|
||||
DictData loadSideDictData = dicDataFeignClient.getDicDataByCode(LOAD_SIDE_DICT_CODE).getData();
|
||||
DictData gridSideDictData = dicDataFeignClient.getDicDataByCode(GRID_SIDE_DICT_CODE).getData();
|
||||
CsLinePO gridSideLine = linePOList.stream().filter(linePO -> linePO.getPosition().equals(gridSideDictData.getId())).findFirst().orElse(null);
|
||||
|
||||
Reference in New Issue
Block a user