代码提交
This commit is contained in:
@@ -21,7 +21,7 @@ import java.util.List;
|
|||||||
public interface CsEventUserPOMapper extends BaseMapper<CsEventUserPO> {
|
public interface CsEventUserPOMapper extends BaseMapper<CsEventUserPO> {
|
||||||
Integer queryEventCount(@Param("csEventUserQueryParam") CsEventUserQueryParam csEventUserQueryParam);
|
Integer queryEventCount(@Param("csEventUserQueryParam") CsEventUserQueryParam csEventUserQueryParam);
|
||||||
|
|
||||||
List<EventDetailVO> queryUserEventList(@Param("csEventUserQueryParam") CsEventUserQueryParam csEventUserQueryParam);
|
List<EventDetailVO> queryUserEventList(@Param("csEventUserQueryParam") CsEventUserQueryParam csEventUserQueryParam, @Param("devIds") List<String> devIds);
|
||||||
|
|
||||||
Page<EventDetailVO> queryEventpage(Page<EventDetailVO> returnpage, @Param("csEventUserQueryPage") CsEventUserQueryPage csEventUserQueryPage, @Param("devIds") List<String> devIds);
|
Page<EventDetailVO> queryEventpage(Page<EventDetailVO> returnpage, @Param("csEventUserQueryPage") CsEventUserQueryPage csEventUserQueryPage, @Param("devIds") List<String> devIds);
|
||||||
}
|
}
|
||||||
@@ -46,6 +46,10 @@
|
|||||||
#{item}
|
#{item}
|
||||||
</foreach>
|
</foreach>
|
||||||
</if>
|
</if>
|
||||||
|
and b.device_id in
|
||||||
|
<foreach collection="devIds" index="index" item="item" open="(" separator="," close=")">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
|
||||||
<if test="csEventUserQueryParam!=null and csEventUserQueryParam.type != null and csEventUserQueryParam.type !=''">
|
<if test="csEventUserQueryParam!=null and csEventUserQueryParam.type != null and csEventUserQueryParam.type !=''">
|
||||||
AND b.type =#{ csEventUserQueryParam.type}
|
AND b.type =#{ csEventUserQueryParam.type}
|
||||||
|
|||||||
@@ -88,7 +88,20 @@ public class CsEventUserPOServiceImpl extends ServiceImpl<CsEventUserPOMapper, C
|
|||||||
// List<String> collect = data.stream().map(DictData::getCode).collect(Collectors.toList());
|
// List<String> collect = data.stream().map(DictData::getCode).collect(Collectors.toList());
|
||||||
// csEventUserQueryParam.setTarget(collect);
|
// csEventUserQueryParam.setTarget(collect);
|
||||||
// }
|
// }
|
||||||
List<EventDetailVO> list = this.getBaseMapper().queryUserEventList(csEventUserQueryParam);
|
|
||||||
|
List<String> deviceId = new ArrayList<>();
|
||||||
|
List<CsLedgerVO> data = csLedgerFeignClient.getDeviceTree().getData();
|
||||||
|
|
||||||
|
List<String> collect = data.stream().map(CsLedgerVO::getChildren).
|
||||||
|
flatMap(Collection::stream).
|
||||||
|
map(CsLedgerVO::getChildren).
|
||||||
|
flatMap(Collection::stream).
|
||||||
|
map(CsLedgerVO::getId).
|
||||||
|
collect(Collectors.toList());
|
||||||
|
if (CollectionUtils.isEmpty(collect)){
|
||||||
|
return new ArrayList<>();
|
||||||
|
}
|
||||||
|
List<EventDetailVO> list = this.getBaseMapper().queryUserEventList(csEventUserQueryParam,collect);
|
||||||
// 主要用于统计不关心详情,详情重分页查询获取
|
// 主要用于统计不关心详情,详情重分页查询获取
|
||||||
// list.forEach(temp->{
|
// list.forEach(temp->{
|
||||||
// DevDetailDTO devDetail = csLedgerFeignClient.queryDevDetail(temp.getDeviceId()).getData();
|
// DevDetailDTO devDetail = csLedgerFeignClient.queryDevDetail(temp.getDeviceId()).getData();
|
||||||
|
|||||||
Reference in New Issue
Block a user