This commit is contained in:
huangzj
2023-01-17 16:00:13 +08:00
2 changed files with 9 additions and 8 deletions

View File

@@ -42,8 +42,8 @@
SELECT
pss.Org_Id AS orgid,
pss.Org_Name AS orgName,
pg.Generatrix_Id AS busbarId,
pg.Generatrix_Name AS busbarName,
pg.id AS busbarId,
pg.name AS busbarName,
pg.Scale AS generatrixVoltageLevel,
pss.Power_Id AS subId,
pss.Power_Name AS subName,
@@ -71,15 +71,15 @@
<select id="getGeneratrixAndPowerStationInfo"
resultType="com.njcn.device.pms.pojo.dto.GeneratrixAndPowerStationDTO">
SELECT
pg.Generatrix_Id AS generatrixId,
pg.Generatrix_Name AS generatrixName,
pg.id AS generatrixId,
pg.name AS generatrixName,
pg.Scale AS generatrixVoltageLevel,
pss.Power_Id AS powerId,
pss.Power_Name AS powerName,
pss.Voltage_Level AS powerVoltageLevel
FROM
pms_generatrix_wire AS pg
LEFT JOIN pms_statation_stat AS pss ON pg.station = pss.Power_Id
LEFT JOIN pms_statation_stat AS pss ON pg.station_id = pss.Power_Id
WHERE
pg.`Status` = 1
AND pss.`Status` = 1

View File

@@ -13,6 +13,7 @@ import com.njcn.device.pms.pojo.param.PmsGeneratrixParam;
import com.njcn.device.pms.pojo.param.UniversalFrontEndParam;
import com.njcn.device.pms.pojo.po.RStatBusbarHarmonicYPO;
import com.njcn.device.pms.pojo.vo.RStatBusbarHarmonicYVO;
import com.njcn.device.pms.service.majornetwork.IGeneratrixWireService;
import com.njcn.device.pms.service.majornetwork.IPmsGeneralDeviceService;
import com.njcn.device.pms.service.majornetwork.IPmsGeneratrixService;
import com.njcn.device.pms.service.majornetwork.RStatBusbarHarmonicService;
@@ -39,7 +40,7 @@ public class RStatBusbarHarmonicServiceImpl extends ServiceImpl<RStatBusbarHarmo
private final RStatBusbarHarmonicMapper rStatBusbarHarmonicMapper;
private final IPmsGeneratrixService pmsGeneratrixService;
private final IGeneratrixWireService generatrixWireService;
private final IPmsGeneralDeviceService iPmsGeneralDeviceService;
@@ -99,7 +100,7 @@ public class RStatBusbarHarmonicServiceImpl extends ServiceImpl<RStatBusbarHarmo
List<String> busbarIds = result.stream().map(RStatBusbarHarmonicYVO::getBusbarId).collect(Collectors.toList());
PmsGeneratrixParam pmsGeneratrixParam = new PmsGeneratrixParam();
pmsGeneratrixParam.setGeneratrixIds(busbarIds);
List<GeneratrixAndPowerStationDTO> dtoS = pmsGeneratrixService.getGeneratrixAndPowerStationInfo(pmsGeneratrixParam);
List<GeneratrixAndPowerStationDTO> dtoS = generatrixWireService.getGeneratrixAndPowerStationInfo(pmsGeneratrixParam);
for (GeneratrixAndPowerStationDTO dto : dtoS) {
for (RStatBusbarHarmonicYVO vo : result) {
@@ -115,4 +116,4 @@ public class RStatBusbarHarmonicServiceImpl extends ServiceImpl<RStatBusbarHarmo
return result;
}
}
}