Commit 2ad30e0c authored by wujiang's avatar wujiang

Merge branch 'dev0124' of http://36.40.66.175:5000/moa/amos-boot-biz into dev0124

parents f121dcc1 3d54697d
...@@ -69,14 +69,15 @@ public interface JpStationMapper extends BaseMapper<JpStation> { ...@@ -69,14 +69,15 @@ public interface JpStationMapper extends BaseMapper<JpStation> {
List<DropDown> getDealerNew(@Param("regionalCompaniesSeq") String regionalCompaniesSeq); List<DropDown> getDealerNew(@Param("regionalCompaniesSeq") String regionalCompaniesSeq);
// @UserEmpower(field ={"ORG_CODE"} ,dealerField ={"ORG_CODE"}, fieldConditions ={"in","in"} ,relationship="and",specific=false) @UserEmpower(field ={"ORG_CODE"} ,dealerField ={"ORG_CODE"}, fieldConditions ={"in","in"} ,relationship="and",specific=false)
List<PowerStationStatistics> getRegionPage(String regionName); List<PowerStationStatistics> getRegionPage(String regionName);
PowerStationStatistics getRegionStatistics(String code); PowerStationStatistics getRegionStatistics(String code);
List<PowerStationStatistics> getDealerPage(String regionalCompaniesCode, String dealerName);
List<PowerStationStatistics> getDealerPage(String regionCompanyOrgCode, String dealerName); @UserEmpower(field ={"hygf_jp_station.regional_companies_code"},dealerField ={"hygf_jp_station.amos_company_code","hygf_jp_station.regional_companies_code"} ,fieldConditions ={"eq","in"} ,relationship="and")
List<JpStationDto> queryAllPowerStation(String regionalCompaniesCode, String amosCompanyCode, String powerStationId);
} }
...@@ -38,7 +38,7 @@ public interface IJpStationService { ...@@ -38,7 +38,7 @@ public interface IJpStationService {
com.baomidou.mybatisplus.extension.plugins.pagination.Page<PowerStationStatistics> getRegionStatistics(Integer current, Integer size, String regionName); com.baomidou.mybatisplus.extension.plugins.pagination.Page<PowerStationStatistics> getRegionStatistics(Integer current, Integer size, String regionName);
com.baomidou.mybatisplus.extension.plugins.pagination.Page<PowerStationStatistics> getDealerStatistics(Integer current, Integer size, String regionCompanyOrgCode, String dealerName); com.baomidou.mybatisplus.extension.plugins.pagination.Page<PowerStationStatistics> getDealerStatistics(Integer current, Integer size, String regionalCompaniesCode, String dealerName);
......
...@@ -31,11 +31,16 @@ public interface TdHygfJpInverterWarnMapper extends BaseMapper<TdHygfJpInverterW ...@@ -31,11 +31,16 @@ public interface TdHygfJpInverterWarnMapper extends BaseMapper<TdHygfJpInverterW
TdHygfJpInverterWarnDto getByTime(@Param("createdTime") long createdTime); TdHygfJpInverterWarnDto getByTime(@Param("createdTime") long createdTime);
@UserEmpower(field ={"regional_companies_code"},dealerField ={"amos_company_code","regional_companies_code"} ,fieldConditions ={"eq","in"} ,relationship="and") @UserEmpower(field = {"regional_companies_code"}, dealerField = {"amos_company_code", "regional_companies_code"}, fieldConditions = {"eq", "in"}, relationship = "and")
List<TdHygfJpInverterWarnDto> selectWarnList(String state, String level, String minvalue, String maxValue, String snCode, List<String> stationId, String startTime, String endTime, String content, Integer current, Integer size,String handlerStatus,String stationName); List<TdHygfJpInverterWarnDto> selectWarnList(String state, String level, String minvalue, String maxValue, String snCode, List<String> stationId, String startTime, String endTime, String content, Integer current, Integer size, String handlerStatus, String stationName);
@UserEmpower(field ={"regional_companies_code"},dealerField ={"amos_company_code","regional_companies_code"} ,fieldConditions ={"eq","in"} ,relationship="and")
int selectWarnListTotal(String state, String level, String minvalue, String maxValue, String snCode, List<String> stationId, String startTime, String endTime, String content,String handlerStatus,String stationName); @UserEmpower(field = {"regional_companies_code"}, dealerField = {"amos_company_code", "regional_companies_code"}, fieldConditions = {"eq", "in"}, relationship = "and")
int selectWarnListTotal(String state, String level, String minvalue, String maxValue, String snCode, List<String> stationId, String startTime, String endTime, String content, String handlerStatus, String stationName);
@Select("SELECT * from td_hygf_jp_inverter_warn WHERE (third_station_id = #{thirdStationId} AND sn_code = #{sncode} AND created_time = #{createdTime})") @Select("SELECT * from td_hygf_jp_inverter_warn WHERE (third_station_id = #{thirdStationId} AND sn_code = #{sncode} AND created_time = #{createdTime})")
TdHygfJpInverterWarn getInverTerWarnByparams(@Param("createdTime") long createdTime, @Param("sncode") String snCode, @Param("thirdStationId") String thirdStationId); TdHygfJpInverterWarn getInverTerWarnByparams(@Param("createdTime") long createdTime, @Param("sncode") String snCode, @Param("thirdStationId") String thirdStationId);
// @UserEmpower(field ={"regional_companies_code"},dealerField ={"amos_company_code","regional_companies_code"} ,fieldConditions ={"eq","in"} ,relationship="and")
List<TdHygfJpInverterWarnDto> queryAlarmNumber(@Param("thirdStationIds") List<String> thirdStationIds);
} }
...@@ -645,21 +645,41 @@ ...@@ -645,21 +645,41 @@
<!-- 根据区域orgCode查询经销商--> <!-- 根据区域orgCode查询经销商-->
<select id="getDealerPage" resultType="com.yeejoin.amos.boot.module.hygf.api.dto.PowerStationStatistics"> <select id="getDealerPage" resultType="com.yeejoin.amos.boot.module.hygf.api.dto.PowerStationStatistics">
select hui.name as name, hui.amos_company_code as code SELECT hygf_unit_info.`name` name, hygf_unit_info.amos_company_code code, hygf_regional_companies.regional_companies_code FROM hygf_regional_companies LEFT JOIN hygf_unit_info
from hygf_regional_companies hrc ON hygf_unit_info.sequence_nbr=hygf_regional_companies.unit_info_id WHERE hygf_unit_info.audit_status='2'
RIGHT JOIN hygf_unit_info hui AND hygf_unit_info.blacklist='0' AND hygf_unit_info.is_delete='0'
ON hrc.unit_info_id = hui.sequence_nbr <if test="regionalCompaniesCode!=null and regionalCompaniesCode!=''">
and hygf_regional_companies.regional_companies_code = #{regionalCompaniesCode}
</if>
<if test="dealerName != null and dealerName!=''">
and hygf_unit_info.`name` like concat("%",#{dealerName},"%")
</if>
and hygf_unit_info.amos_company_code is not null
</select>
<!-- 查询所有场站-->
<select id="queryAllPowerStation" resultType="com.yeejoin.amos.boot.module.hygf.api.dto.JpStationDto">
select
name,
third_station_id
from hygf_jp_station
<where> <where>
hui.blacklist=0 and hui.is_delete=0 <if test="powerStationId!=null">
<if test="regionCompanyOrgCode != null and regionCompanyOrgCode!=''"> and hygf_jp_station.sequence_nbr =#{powerStationId}
and hrc.regional_companies_code = #{regionCompanyOrgCode}
</if> </if>
<if test="dealerName != null and dealerName!=''">
and hui.name like concat("%",#{dealerName},"%") <if test="regionalCompaniesCode!=null">
and hygf_jp_station.regional_companies_code =#{regionalCompaniesCode}
</if>
<if test="amosCompanyCode!=null">
and hygf_jp_station.amos_company_code =#{amosCompanyCode}
</if> </if>
</where> </where>
</select> </select>
</mapper> </mapper>
...@@ -158,4 +158,20 @@ ...@@ -158,4 +158,20 @@
</where> </where>
</select> </select>
<select id="queryAlarmNumber" resultType="com.yeejoin.amos.boot.module.hygf.api.dto.TdHygfJpInverterWarnDto">
SELECT
`state`
FROM house_pv_data.td_hygf_jp_inverter_warn
<where>
<if test="thirdStationIds != null and thirdStationIds.size > 0 ">
third_station_id in
<foreach collection="thirdStationIds" item="item" open='(' close=')' separator=",">
#{item}
</foreach>
</if>
</where>
</select>
</mapper> </mapper>
...@@ -825,7 +825,7 @@ public class JpStationController extends BaseController { ...@@ -825,7 +825,7 @@ public class JpStationController extends BaseController {
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET", value = "查询当前登录人权限区域公司统计数据", notes = "查询当前登录人权限区域公司统计数据") @ApiOperation(httpMethod = "GET", value = "查询当前登录人权限区域公司统计数据", notes = "查询当前登录人权限区域公司统计数据")
@GetMapping(value = "/getRegionStatistics") @GetMapping(value = "/getRegionStatistics")
// @UserLimits @UserLimits
public ResponseModel<Page<PowerStationStatistics>> getRegionStatistics(@RequestParam(defaultValue = "1") Integer current, @RequestParam(defaultValue = "10") Integer size, @RequestParam(required = false) String regionName) { public ResponseModel<Page<PowerStationStatistics>> getRegionStatistics(@RequestParam(defaultValue = "1") Integer current, @RequestParam(defaultValue = "10") Integer size, @RequestParam(required = false) String regionName) {
Page<PowerStationStatistics> poserStatisticsData = jpStationServiceImpl.getRegionStatistics(current, size, regionName); Page<PowerStationStatistics> poserStatisticsData = jpStationServiceImpl.getRegionStatistics(current, size, regionName);
...@@ -837,10 +837,10 @@ public class JpStationController extends BaseController { ...@@ -837,10 +837,10 @@ public class JpStationController extends BaseController {
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET", value = "查询经销商统计数据", notes = "查询经销商统计数据") @ApiOperation(httpMethod = "GET", value = "查询经销商统计数据", notes = "查询经销商统计数据")
@GetMapping(value = "/getDealerStatistics") @GetMapping(value = "/getDealerStatistics")
// @UserLimits @UserLimits
public ResponseModel<Page<PowerStationStatistics>> getDealerStatistics(@RequestParam(defaultValue = "1") Integer current, @RequestParam(defaultValue = "10") Integer size, String regionCompanyOrgCode, @RequestParam(required = false) String dealerName) { public ResponseModel<Page<PowerStationStatistics>> getDealerStatistics(@RequestParam(defaultValue = "1") Integer current, @RequestParam(defaultValue = "10") Integer size, String regionalCompaniesCode, @RequestParam(required = false) String dealerName) {
Page<PowerStationStatistics> poserStatisticsData = jpStationServiceImpl.getDealerStatistics(current, size, regionCompanyOrgCode, dealerName); Page<PowerStationStatistics> poserStatisticsData = jpStationServiceImpl.getDealerStatistics(current, size, regionalCompaniesCode, dealerName);
return ResponseHelper.buildResponse(poserStatisticsData); return ResponseHelper.buildResponse(poserStatisticsData);
} }
......
...@@ -286,8 +286,7 @@ public class TdHygfJpInverterWarnController extends BaseController { ...@@ -286,8 +286,7 @@ public class TdHygfJpInverterWarnController extends BaseController {
} }
List<TdHygfJpInverterWarnDto> maps = tdHygfJpInverterWarnServiceImpl.selectWarnList(state, level, minvalue, maxValue, snCode, stationId, startTime, endTime, content, current, size, handlerStatus, stationName);
List<TdHygfJpInverterWarnDto> maps = tdHygfJpInverterWarnServiceImpl.selectWarnList(state, level, minvalue, maxValue, snCode, stationId, startTime, endTime, content, current, size, handlerStatus,stationName);
for (TdHygfJpInverterWarnDto map : maps) { for (TdHygfJpInverterWarnDto map : maps) {
// if (nameMaps.containsKey(map.getThirdStationId())) { // if (nameMaps.containsKey(map.getThirdStationId())) {
// map.setStationName(nameMaps.get(map.getThirdStationId())); // map.setStationName(nameMaps.get(map.getThirdStationId()));
...@@ -296,7 +295,7 @@ public class TdHygfJpInverterWarnController extends BaseController { ...@@ -296,7 +295,7 @@ public class TdHygfJpInverterWarnController extends BaseController {
map.setTimeLongFormat(te); map.setTimeLongFormat(te);
} }
result.setTotal(tdHygfJpInverterWarnServiceImpl.selectWarnListTotal(state, level, minvalue, maxValue, snCode, stationId, startTime, endTime, content, handlerStatus,stationName)); result.setTotal(tdHygfJpInverterWarnServiceImpl.selectWarnListTotal(state, level, minvalue, maxValue, snCode, stationId, startTime, endTime, content, handlerStatus, stationName));
List<Long> waringIds = maps.stream().map(tdHygfJpInverterWarnDto -> tdHygfJpInverterWarnDto.getCreatedTime()).collect(Collectors.toList()); List<Long> waringIds = maps.stream().map(tdHygfJpInverterWarnDto -> tdHygfJpInverterWarnDto.getCreatedTime()).collect(Collectors.toList());
if (waringIds.size() == 0) { if (waringIds.size() == 0) {
waringIds = Arrays.asList(0L); waringIds = Arrays.asList(0L);
...@@ -317,4 +316,18 @@ public class TdHygfJpInverterWarnController extends BaseController { ...@@ -317,4 +316,18 @@ public class TdHygfJpInverterWarnController extends BaseController {
return ResponseHelper.buildResponse(result); return ResponseHelper.buildResponse(result);
} }
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET", value = "户用光伏逆变器报警表统计数据查询", notes = "户用光伏逆变器报警表统计数据查询")
@GetMapping(value = "/queryAlarmNumber")
@UserLimits
public ResponseModel<Map<String, Object>> queryAlarmNumber(@RequestParam(required = false) String regionalCompaniesCode,
@RequestParam(required = false) String amosCompanyCode,
@RequestParam(required = false) String powerStationId
) {
Map<String, Object> result = tdHygfJpInverterWarnServiceImpl.queryAlarmNumber(regionalCompaniesCode, amosCompanyCode, powerStationId);
return ResponseHelper.buildResponse(result);
}
} }
...@@ -940,10 +940,10 @@ public class JpStationServiceImpl extends BaseService<JpStationDto,JpStation,JpS ...@@ -940,10 +940,10 @@ public class JpStationServiceImpl extends BaseService<JpStationDto,JpStation,JpS
} }
@Override @Override
public Page<PowerStationStatistics> getDealerStatistics(Integer current, Integer size, String regionCompanyOrgCode, String dealerName) { public Page<PowerStationStatistics> getDealerStatistics(Integer current, Integer size, String regionalCompaniesCode, String dealerName) {
PageHelper.startPage(current, size); PageHelper.startPage(current, size);
// 根据区域公司orgCode查询区域公司下所有的经销商 // 根据区域公司orgCode查询区域公司下所有的经销商
List<PowerStationStatistics> dealerPage = jpStationMapper.getDealerPage(regionCompanyOrgCode, dealerName); List<PowerStationStatistics> dealerPage = jpStationMapper.getDealerPage(regionalCompaniesCode, dealerName);
PageInfo<PowerStationStatistics> page = new PageInfo(dealerPage); PageInfo<PowerStationStatistics> page = new PageInfo(dealerPage);
Page<PowerStationStatistics> pagenew = new Page<PowerStationStatistics>(); Page<PowerStationStatistics> pagenew = new Page<PowerStationStatistics>();
...@@ -964,4 +964,9 @@ public class JpStationServiceImpl extends BaseService<JpStationDto,JpStation,JpS ...@@ -964,4 +964,9 @@ public class JpStationServiceImpl extends BaseService<JpStationDto,JpStation,JpS
} }
public List<JpStationDto> queryAllPowerStation(String regionalCompaniesCode, String amosCompanyCode, String powerStationId) {
List<JpStationDto> powerStationList = jpStationMapper.queryAllPowerStation(regionalCompaniesCode, amosCompanyCode, powerStationId);
return powerStationList;
}
} }
\ No newline at end of file
...@@ -8,6 +8,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; ...@@ -8,6 +8,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo; import com.github.pagehelper.PageInfo;
import com.yeejoin.amos.boot.module.hygf.api.dto.HYGFMaintenanceTicketsDto; import com.yeejoin.amos.boot.module.hygf.api.dto.HYGFMaintenanceTicketsDto;
import com.yeejoin.amos.boot.module.hygf.api.dto.JpStationDto;
import com.yeejoin.amos.boot.module.hygf.api.dto.TdHygfJpInverterWarnDto; import com.yeejoin.amos.boot.module.hygf.api.dto.TdHygfJpInverterWarnDto;
import com.yeejoin.amos.boot.module.hygf.api.entity.HYGFMaintenanceTickets; import com.yeejoin.amos.boot.module.hygf.api.entity.HYGFMaintenanceTickets;
import com.yeejoin.amos.boot.module.hygf.api.entity.JpStation; import com.yeejoin.amos.boot.module.hygf.api.entity.JpStation;
...@@ -19,6 +20,7 @@ import com.yeejoin.amos.boot.module.hygf.api.util.TimeUtil; ...@@ -19,6 +20,7 @@ import com.yeejoin.amos.boot.module.hygf.api.util.TimeUtil;
import jdk.nashorn.internal.ir.annotations.Ignore; import jdk.nashorn.internal.ir.annotations.Ignore;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
import org.typroject.tyboot.core.rdbms.service.BaseService; import org.typroject.tyboot.core.rdbms.service.BaseService;
import java.util.*; import java.util.*;
...@@ -42,6 +44,7 @@ public class TdHygfJpInverterWarnServiceImpl ...@@ -42,6 +44,7 @@ public class TdHygfJpInverterWarnServiceImpl
HYGFMaintenanceTicketsMapper hygfMaintenanceTicketsMapper; HYGFMaintenanceTicketsMapper hygfMaintenanceTicketsMapper;
@Autowired @Autowired
TdHygfJpInverterWarnMapper tdHygfJpInverterWarnMapper; TdHygfJpInverterWarnMapper tdHygfJpInverterWarnMapper;
/** /**
* 分页查询 * 分页查询
*/ */
...@@ -96,18 +99,18 @@ public class TdHygfJpInverterWarnServiceImpl ...@@ -96,18 +99,18 @@ public class TdHygfJpInverterWarnServiceImpl
} }
List<HYGFMaintenanceTickets> hygfMaintenanceTicketsList = hygfMaintenanceTicketsMapper.selectList(new QueryWrapper<HYGFMaintenanceTickets>().in("warning_id", waringIds)); List<HYGFMaintenanceTickets> hygfMaintenanceTicketsList = hygfMaintenanceTicketsMapper.selectList(new QueryWrapper<HYGFMaintenanceTickets>().in("warning_id", waringIds));
if (hygfMaintenanceTicketsList.size() > 0) { if (hygfMaintenanceTicketsList.size() > 0) {
list.forEach(i -> { list.forEach(i -> {
List<HYGFMaintenanceTickets> ticketsList = hygfMaintenanceTicketsList.stream().filter(hygfmaintenanceTickets -> i.getCreatedTime().equals(hygfmaintenanceTickets.getWarningId())).collect(Collectors.toList()); List<HYGFMaintenanceTickets> ticketsList = hygfMaintenanceTicketsList.stream().filter(hygfmaintenanceTickets -> i.getCreatedTime().equals(hygfmaintenanceTickets.getWarningId())).collect(Collectors.toList());
if (ObjectUtil.isNotEmpty(ticketsList)) { if (ObjectUtil.isNotEmpty(ticketsList)) {
Set<String> status = ticketsList.stream().map(HYGFMaintenanceTickets::getHandlerStatus).collect(Collectors.toSet()); Set<String> status = ticketsList.stream().map(HYGFMaintenanceTickets::getHandlerStatus).collect(Collectors.toSet());
if (status.contains("未处理")) { if (status.contains("未处理")) {
i.setTicketStatus("处理中"); i.setTicketStatus("处理中");
} }
if (status.contains("已处理") && status.size() == 1) { if (status.contains("已处理") && status.size() == 1) {
i.setTicketStatus("已处理"); i.setTicketStatus("已处理");
} }
} }
}); });
} }
PageInfo<TdHygfJpInverterWarnDto> page = new PageInfo(list); PageInfo<TdHygfJpInverterWarnDto> page = new PageInfo(list);
com.baomidou.mybatisplus.extension.plugins.pagination.Page<TdHygfJpInverterWarnDto> pagenew = new com.baomidou.mybatisplus.extension.plugins.pagination.Page<TdHygfJpInverterWarnDto>(); com.baomidou.mybatisplus.extension.plugins.pagination.Page<TdHygfJpInverterWarnDto> pagenew = new com.baomidou.mybatisplus.extension.plugins.pagination.Page<TdHygfJpInverterWarnDto>();
...@@ -166,7 +169,7 @@ public class TdHygfJpInverterWarnServiceImpl ...@@ -166,7 +169,7 @@ public class TdHygfJpInverterWarnServiceImpl
return tdHygfJpInverterWarnDto; return tdHygfJpInverterWarnDto;
} }
public List<TdHygfJpInverterWarnDto> selectWarnList(String state, String level, String minvalue, String maxValue, String snCode, List<String> stationId, String startTime, String endTime, String content, Integer current, Integer size, String handlerStatus,String stationName) { public List<TdHygfJpInverterWarnDto> selectWarnList(String state, String level, String minvalue, String maxValue, String snCode, List<String> stationId, String startTime, String endTime, String content, Integer current, Integer size, String handlerStatus, String stationName) {
List<TdHygfJpInverterWarnDto> list = tdHygfJpInverterWarnMapper.selectWarnList(state, level, minvalue, maxValue, snCode, stationId, startTime, endTime, content, (current - 1) * size, size, handlerStatus, stationName); List<TdHygfJpInverterWarnDto> list = tdHygfJpInverterWarnMapper.selectWarnList(state, level, minvalue, maxValue, snCode, stationId, startTime, endTime, content, (current - 1) * size, size, handlerStatus, stationName);
list.forEach(i -> { list.forEach(i -> {
JpStation jpStation = jpStationServiceImpl.getOne(new LambdaQueryWrapper<JpStation>() JpStation jpStation = jpStationServiceImpl.getOne(new LambdaQueryWrapper<JpStation>()
...@@ -180,7 +183,46 @@ public class TdHygfJpInverterWarnServiceImpl ...@@ -180,7 +183,46 @@ public class TdHygfJpInverterWarnServiceImpl
return list; return list;
} }
public int selectWarnListTotal(String state, String level, String minvalue, String maxValue, String snCode, List<String> stationId, String startTime, String endTime, String content, String handlerStatus,String stationName) { public int selectWarnListTotal(String state, String level, String minvalue, String maxValue, String snCode, List<String> stationId, String startTime, String endTime, String content, String handlerStatus, String stationName) {
return tdHygfJpInverterWarnMapper.selectWarnListTotal(state, level, minvalue, maxValue, snCode, stationId, startTime, endTime, content, handlerStatus, stationName); return tdHygfJpInverterWarnMapper.selectWarnListTotal(state, level, minvalue, maxValue, snCode, stationId, startTime, endTime, content, handlerStatus, stationName);
} }
public Map<String, Object> queryAlarmNumber(String regionalCompaniesCode, String amosCompanyCode, String powerStationId) {
// 查询所有场站
List<JpStationDto> jpStationDtos = jpStationServiceImpl.queryAllPowerStation(regionalCompaniesCode, amosCompanyCode, powerStationId);
Map<String, Object> result = new HashMap<>();
if (!CollectionUtils.isEmpty(jpStationDtos)) {
// 获取thirdStationId集合
List<String> thirdStationIds = jpStationDtos.stream().map(JpStation -> JpStation.getThirdStationId()).collect(Collectors.toList());
List<TdHygfJpInverterWarnDto> tdHygfJpInverterWarnDtos = tdHygfJpInverterWarnMapper.queryAlarmNumber(thirdStationIds);
ArrayList<String> yclArray = new ArrayList<>();
ArrayList<String> wclArray = new ArrayList<>();
tdHygfJpInverterWarnDtos.stream().forEach(tdHygfJpInverterWarnDto -> {
if (tdHygfJpInverterWarnDto.getState().equals("已恢复") || tdHygfJpInverterWarnDto.getState().equals("已处理")) {
yclArray.add(tdHygfJpInverterWarnDto.getState());
} else {
wclArray.add(tdHygfJpInverterWarnDto.getState());
}
});
result.put("ycl", yclArray.size());
result.put("wcl", wclArray.size());
}else {
result.put("ycl", 0);
result.put("wcl", 0);
}
return result;
}
} }
\ No newline at end of file
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