5 Commits

Author SHA1 Message Date
xy
6b0feb1320 修改实时数据不显示问题 2025-12-26 11:25:51 +08:00
cdf
e92326c55d 报告bug解决 2025-12-26 10:19:45 +08:00
xy
7abbfd500b 微调 2025-12-25 20:45:47 +08:00
xy
77360ef468 Merge remote-tracking branch 'origin/master' 2025-12-25 20:29:52 +08:00
xy
56d88939c4 去除打印日志 2025-12-23 10:25:13 +08:00
4 changed files with 19 additions and 17 deletions

View File

@@ -11,7 +11,6 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.njcn.common.pojo.enums.common.DataStateEnum; import com.njcn.common.pojo.enums.common.DataStateEnum;
import com.njcn.csdevice.constant.DataParam; import com.njcn.csdevice.constant.DataParam;
import com.njcn.csdevice.controller.project.EngineeringController;
import com.njcn.csdevice.enums.LineBaseEnum; import com.njcn.csdevice.enums.LineBaseEnum;
import com.njcn.csdevice.mapper.*; import com.njcn.csdevice.mapper.*;
import com.njcn.csdevice.pojo.dto.DevDetailDTO; import com.njcn.csdevice.pojo.dto.DevDetailDTO;
@@ -210,7 +209,7 @@ public class CsLedgerServiceImpl extends ServiceImpl<CsLedgerMapper, CsLedger> i
List<CsLedgerVO> ledger; List<CsLedgerVO> ledger;
String role = RequestUtil.getUserRole(); String role = RequestUtil.getUserRole();
List<String> roles = JSONArray.parseArray(role, String.class); List<String> roles = JSONArray.parseArray(role, String.class);
if (roles.contains(AppRoleEnum.ROOT.getCode()) || roles.contains(AppRoleEnum.OPERATION_MANAGER.getCode())) { if(roles.contains(AppRoleEnum.ROOT.getCode()) || roles.contains(AppRoleEnum.OPERATION_MANAGER.getCode()) || roles.contains(AppRoleEnum.REGULAR_USER.getCode())){
ledger = allList.stream() ledger = allList.stream()
.filter(item -> Objects.equals(item.getLevel(), 2) && Objects.equals(item.getPid(), "0")) .filter(item -> Objects.equals(item.getLevel(), 2) && Objects.equals(item.getPid(), "0"))
.collect(Collectors.toList()); .collect(Collectors.toList());
@@ -414,7 +413,7 @@ public class CsLedgerServiceImpl extends ServiceImpl<CsLedgerMapper, CsLedger> i
List<CsLedgerVO> ledger; List<CsLedgerVO> ledger;
String role = RequestUtil.getUserRole(); String role = RequestUtil.getUserRole();
List<String> roles = JSONArray.parseArray(role, String.class); List<String> roles = JSONArray.parseArray(role, String.class);
if (roles.contains(AppRoleEnum.ROOT.getCode()) || roles.contains(AppRoleEnum.OPERATION_MANAGER.getCode())) { if(roles.contains(AppRoleEnum.ROOT.getCode()) || roles.contains(AppRoleEnum.OPERATION_MANAGER.getCode()) || roles.contains(AppRoleEnum.REGULAR_USER.getCode())){
ledger = allList.stream() ledger = allList.stream()
.filter(item -> Objects.equals(item.getLevel(), 2) && Objects.equals(item.getPid(), "0")) .filter(item -> Objects.equals(item.getLevel(), 2) && Objects.equals(item.getPid(), "0"))
.collect(Collectors.toList()); .collect(Collectors.toList());

View File

@@ -47,7 +47,7 @@ public class RoleEngineerDevServiceImpl implements RoleEngineerDevService {
QueryWrapper<CsLedger> csLedgerQueryWrapper = new QueryWrapper<>(); QueryWrapper<CsLedger> csLedgerQueryWrapper = new QueryWrapper<>();
List<String> collect = new ArrayList<>(); List<String> collect = new ArrayList<>();
if(Objects.equals(role,AppRoleEnum.APP_VIP_USER.getCode())){ if(Objects.equals(role,AppRoleEnum.APP_VIP_USER.getCode()) || Objects.equals(role,AppRoleEnum.REGULAR_USER_8000.getCode())){
csDeviceUserPOQueryWrapper.clear(); csDeviceUserPOQueryWrapper.clear();
csEngineeringUserPOQueryWrapper.clear(); csEngineeringUserPOQueryWrapper.clear();
csLedgerQueryWrapper.clear(); csLedgerQueryWrapper.clear();
@@ -94,7 +94,7 @@ public class RoleEngineerDevServiceImpl implements RoleEngineerDevService {
} }
// ||Objects.equals(role,"bxs_user") // ||Objects.equals(role,"bxs_user")
else if(Objects.equals(role,AppRoleEnum.ROOT.getCode())||Objects.equals(role,AppRoleEnum.OPERATION_MANAGER.getCode())){ else if(Objects.equals(role,AppRoleEnum.ROOT.getCode()) || Objects.equals(role,AppRoleEnum.OPERATION_MANAGER.getCode()) || Objects.equals(role,AppRoleEnum.REGULAR_USER.getCode()) ){
List<CsEngineeringPO> csEngineeringPOS = csEngineeringMapper.selectList(null); List<CsEngineeringPO> csEngineeringPOS = csEngineeringMapper.selectList(null);
collect =csEngineeringPOS.stream().filter(temp->Objects.equals(temp.getStatus(),"1")).map(CsEngineeringPO::getId).collect(Collectors.toList()); collect =csEngineeringPOS.stream().filter(temp->Objects.equals(temp.getStatus(),"1")).map(CsEngineeringPO::getId).collect(Collectors.toList());
} }
@@ -116,7 +116,7 @@ public class RoleEngineerDevServiceImpl implements RoleEngineerDevService {
List<String> collect = new ArrayList<>(); List<String> collect = new ArrayList<>();
if( if(
Objects.equals(role,AppRoleEnum.APP_VIP_USER.getCode())){ Objects.equals(role,AppRoleEnum.APP_VIP_USER.getCode()) || Objects.equals(role,AppRoleEnum.REGULAR_USER_8000.getCode())){
csDeviceUserPOQueryWrapper.clear(); csDeviceUserPOQueryWrapper.clear();
csDeviceUserPOQueryWrapper.eq("status","1").and(wq -> { csDeviceUserPOQueryWrapper.eq("status","1").and(wq -> {
wq.eq("primary_user_id", userIndex) wq.eq("primary_user_id", userIndex)
@@ -198,7 +198,7 @@ public class RoleEngineerDevServiceImpl implements RoleEngineerDevService {
} }
// ||Objects.equals(role,"bxs_user") // ||Objects.equals(role,"bxs_user")
else if(Objects.equals(role,AppRoleEnum.ROOT.getCode())||Objects.equals(role,AppRoleEnum.OPERATION_MANAGER.getCode())){ else if(Objects.equals(role,AppRoleEnum.ROOT.getCode())||Objects.equals(role,AppRoleEnum.OPERATION_MANAGER.getCode()) || Objects.equals(role,AppRoleEnum.REGULAR_USER.getCode())){
csLedgerQueryWrapper.clear(); csLedgerQueryWrapper.clear();
csLedgerQueryWrapper.eq("level",2).eq("state",1); csLedgerQueryWrapper.eq("level",2).eq("state",1);
List<CsLedger> csLedgers = csLedgerMapper.selectList(csLedgerQueryWrapper); List<CsLedger> csLedgers = csLedgerMapper.selectList(csLedgerQueryWrapper);

View File

@@ -146,6 +146,16 @@
<build> <build>
<finalName>csHarmonicBoot</finalName> <finalName>csHarmonicBoot</finalName>
<plugins> <plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<configuration>
<encoding>UTF-8</encoding>
<nonFilteredFileExtensions>
<nonFilteredFileExtension>docx</nonFilteredFileExtension>
</nonFilteredFileExtensions>
</configuration>
</plugin>
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId> <artifactId>maven-compiler-plugin</artifactId>

View File

@@ -165,7 +165,6 @@ public class LineTargetServiceImpl implements ILineTargetService {
} }
String clDid = influxDbParamUtil.getClDidByLineId(item.getLineId()); String clDid = influxDbParamUtil.getClDidByLineId(item.getLineId());
//基础信息 //基础信息
System.out.println(item.getLineId());
CsRtDataVO vo = getLineRtData(item.getId(),item.getLineId(),tempTable[3],tempTable[0],Objects.equals(tempTable[1],"T")?"M":tempTable[1],tempTable[2],targetName,clDid); CsRtDataVO vo = getLineRtData(item.getId(),item.getLineId(),tempTable[3],tempTable[0],Objects.equals(tempTable[1],"T")?"M":tempTable[1],tempTable[2],targetName,clDid);
//设备状态信息 //设备状态信息
CsEquipmentDeliveryPO po = equipmentFeignClient.getDevByLineId(item.getLineId()).getData(); CsEquipmentDeliveryPO po = equipmentFeignClient.getDevByLineId(item.getLineId()).getData();
@@ -215,7 +214,7 @@ public class LineTargetServiceImpl implements ILineTargetService {
.collect(Collectors.toList()); .collect(Collectors.toList());
String s = tempUid.get(tempUid.size() - 1); String s = tempUid.get(tempUid.size() - 1);
String[] tempTable = s.replace("$", "").split("#"); String[] tempTable = s.replace("$", "").split("#");
result.add(getLineRtDataNew(item.getId(),item.getLineId(),tempTable[3],tempTable[0],Objects.equals(tempTable[1],"T")?"M":tempTable[1],tempTable[2].toUpperCase(),temp,item.getUnit().get(i))); result.add(getLineRtDataNew(item.getId(),item.getLineId(),tempTable[3],tempTable[0],Objects.equals(tempTable[1],"T")?"M":tempTable[1],tempTable[2],temp,item.getUnit().get(i)));
// result.add(getLineRtData(item.getId(),item.getLineId(),tempUid.get(3),tempUid.get(0),tempUid.get(1),tempUid.get(2).toUpperCase(),temp,"%")); // result.add(getLineRtData(item.getId(),item.getLineId(),tempUid.get(3),tempUid.get(0),tempUid.get(1),tempUid.get(2).toUpperCase(),temp,"%"));
} }
} }
@@ -273,13 +272,6 @@ public class LineTargetServiceImpl implements ILineTargetService {
*/ */
public CsRtDataVO getLineRtData(String id,String lineId, String tableName, String columnName, String phasic, String dataType, String target, String cldId) { public CsRtDataVO getLineRtData(String id,String lineId, String tableName, String columnName, String phasic, String dataType, String target, String cldId) {
CsRtDataVO csRtDataVO = new CsRtDataVO(); CsRtDataVO csRtDataVO = new CsRtDataVO();
log.info("---------------------------------------------------------------------------------------------------------------");
log.info(lineId);
log.info(tableName);
log.info(columnName);
log.info(phasic);
log.info(dataType);
log.info(cldId);
StatisticalDataDTO statisticalDataDTO = commonService.getLineRtData(lineId,tableName,columnName,phasic,dataType,cldId); StatisticalDataDTO statisticalDataDTO = commonService.getLineRtData(lineId,tableName,columnName,phasic,dataType,cldId);
if(Objects.isNull(statisticalDataDTO)){ if(Objects.isNull(statisticalDataDTO)){
statisticalDataDTO = new StatisticalDataDTO(); statisticalDataDTO = new StatisticalDataDTO();
@@ -311,7 +303,8 @@ public class LineTargetServiceImpl implements ILineTargetService {
*/ */
public CsRtDataVO getLineRtDataNew(String id,String lineId, String tableName, String columnName, String phasic, String dataType, String target,String uint) { public CsRtDataVO getLineRtDataNew(String id,String lineId, String tableName, String columnName, String phasic, String dataType, String target,String uint) {
CsRtDataVO csRtDataVO = new CsRtDataVO(); CsRtDataVO csRtDataVO = new CsRtDataVO();
StatisticalDataDTO statisticalDataDTO = commonService.getLineRtData(lineId,tableName,columnName,phasic,dataType,null); String clDid = influxDbParamUtil.getClDidByLineId(lineId);
StatisticalDataDTO statisticalDataDTO = commonService.getLineRtData(lineId,tableName,columnName,phasic,dataType,clDid);
if(Objects.isNull(statisticalDataDTO)){ if(Objects.isNull(statisticalDataDTO)){
statisticalDataDTO = new StatisticalDataDTO(); statisticalDataDTO = new StatisticalDataDTO();
statisticalDataDTO.setLineId(lineId); statisticalDataDTO.setLineId(lineId);