Commit f4be9825 authored by KeYong's avatar KeYong

Merge remote-tracking branch 'origin/develop_dl_plan6_temp' into develop_dl_plan6_temp

parents 5b9a1343 f2a68435
......@@ -859,11 +859,13 @@ public class ConfigureController extends AbstractBaseController {
* 每天凌晨0点25分 对当前换流站历史数据进行处理
* */
@Scheduled(cron = "${jobs.day.cron.old}")
@PersonIdentify
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/iotWeekReporOldData")
@ApiOperation(httpMethod = "GET", value = "物联报表 历史数据处理", notes = "物联报表 历史数据处理")
public ResponseModel iotWeekReportData(Page page) {
public ResponseModel iotWeekReportData() {
Page page = new Page<>();
page.setSize(20L);
page.setCurrent(1L);
List<Integer> reportTypes = Arrays.asList(1, 2, 3);
reportTypes.forEach(reportType->{
AnalysisReportLogDto dto = new AnalysisReportLogDto();
......
......@@ -214,4 +214,6 @@ public interface FormInstanceMapper extends BaseMapper<FormInstance> {
List<String> selectChildListdate(@Param("id")Long id);
int updateFormFieldValue(@Param("id") Long id, @Param("name") String name, @Param("value") String value);
Long queryVideoCountByBizOrgCode(@Param("bizOrgCode") String bizOrgCode);
}
......@@ -1451,7 +1451,7 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i
vo.setName(orgUsrDto.getBizOrgName());
vo.setId(orgUsrDto.getSequenceNbr());
vo.setBizOrgName(orgUsrDto.getBizOrgName());
vo.setTotal(buildingTreeVos.stream().filter(b -> !ObjectUtils.isEmpty(b.getBizOrgCode()) && b.getBizOrgCode().contains(ObjectUtils.isEmpty(vo.getBizOrgCode())?"":vo.getBizOrgCode()) && "building".equals(b.getGroupType())).count());
vo.setTotal(!StringUtils.isEmpty(orgUsrDto.getBizOrgCode()) ? formInstanceMapper.queryVideoCountByBizOrgCode(orgUsrDto.getBizOrgCode()) : 0L);
return vo;
}).collect(Collectors.toList());
// 3.将建筑的bizOrgCode转换为parentId连接树 ,拼接数据准备
......@@ -1488,7 +1488,7 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i
c.setTotal(countMap.get(c.getInstanceId()) == null ? 0L : countMap.get(c.getInstanceId()));
} else {
// 方法 复用,覆盖掉不需要的数据
c.setTotal(0L);
// c.setTotal(0L);
}
});
//2.list to tree
......@@ -1496,7 +1496,9 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i
.filter(a -> companyBuildingList.stream().noneMatch(c -> c.getId().toString().equals(a.getParentId())))
.peek(b -> {
b.setChildren(getCompanyBuildingChildrenWithCount(b.getId().toString(), companyBuildingList));
b.setTotal(b.getChildren().stream().filter(c -> c.getTotal() != null).mapToLong(BuildingTreeVo::getTotal).sum());
if (!ALL_BUILDING.equals(b.getGroupType())) {
b.setTotal(b.getChildren().stream().filter(c -> c.getTotal() != null).mapToLong(BuildingTreeVo::getTotal).sum());
}
}).collect(Collectors.toList());
}
......
......@@ -125,4 +125,5 @@ fxkgtId=1522051112935387138
management.security.enabled=true
management.endpoint.health.show-details=always
spring.security.user.name=admin
spring.security.user.password=a1234560stationCode=LSHLZ1bZAJU645Pgl7
\ No newline at end of file
spring.security.user.password=a1234560
stationCode=LSHLZ1bZAJU645Pgl7
\ No newline at end of file
......@@ -303,6 +303,7 @@
`wlesal`.`equipment_specific_index_key` AS `indexKey`,
`wlesal`.`equipment_specific_index_name` AS `indexName`,
`wlesal`.`equipment_specific_id` AS `specificId`,
`wlesal`.emergency_level_color as levelColor,
IF
( `wlesal`.`clean_time` IS NOT NULL, '已消除', '未消除' ) AS `cleanStatus`,
`wlesal`.`iot_code` AS `iotCode`,
......
......@@ -2176,17 +2176,16 @@
<select id="getWater" resultType="java.util.Map">
SELECT
ei.equipment_specific_id
r.*
FROM
cb_water_resource r
LEFT JOIN cb_water_resource_pool rp ON rp.resource_id = r.sequence_nbr
LEFT JOIN wl_equipment_specific_index ei ON ei.equipment_specific_id = rp.level_device_id
WHERE
r.resource_type in ( 'industryPool','pool')
AND r.is_delete = 1
and ei.equipment_specific_id is not null
and ei.equipment_specific_id =#{id}
and FIND_IN_SET( #{id}, rp.level_device_id) > 0
</select>
<select id="getStationCode" resultType="java.util.Map">
......
......@@ -645,4 +645,9 @@ AND field_name =#{name}
</if>
</where>
</select>
<select id="queryVideoCountByBizOrgCode" resultType="java.lang.Long">
select count(1) from wl_video where biz_org_code like concat(#{bizOrgCode}, '%')
</select>
</mapper>
......@@ -58,7 +58,7 @@
</if>
group by wlv.id
order by wlv.create_date desc
order by wlv.create_date desc, v.id desc
</select>
<!-- SELECT
v.id AS id,
......@@ -121,8 +121,8 @@
<if test="dto.type!=null and dto.type!=''">
and v.type = #{dto.type}
</if>
GROUP BY id
order by v.create_date
GROUP BY v.id
order by v.create_date desc, v.id desc
</when>
<when test='dto.buildingId == null || dto.buildingId ==""'>
<where>
......@@ -142,8 +142,8 @@
and v.type =#{dto.type}
</if>
</where>
GROUP BY id
order by v.create_date
GROUP BY v.id
order by v.create_date desc, v.id desc
</when>
</choose>
</select>
......
......@@ -98,7 +98,7 @@
<![CDATA[
CONCAT(
'巡检地点:',
pp.address,
IFNULL(pp.address, '无'),
'<br />点编号:',
pp.point_no,
'<br />当前状态:',
......@@ -121,7 +121,7 @@
) ]]> saveMsg,
CONCAT(
'巡检地点:',
pp.address,
IFNULL(pp.address, '无'),
';点编号:',
pp.point_no,
';当前状态:',
......
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