Commit ffd47222 authored by zhangsen's avatar zhangsen

bug 修改

parent ad35804c
...@@ -214,4 +214,6 @@ public interface FormInstanceMapper extends BaseMapper<FormInstance> { ...@@ -214,4 +214,6 @@ public interface FormInstanceMapper extends BaseMapper<FormInstance> {
List<String> selectChildListdate(@Param("id")Long id); List<String> selectChildListdate(@Param("id")Long id);
int updateFormFieldValue(@Param("id") Long id, @Param("name") String name, @Param("value") String value); 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 ...@@ -1451,7 +1451,7 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i
vo.setName(orgUsrDto.getBizOrgName()); vo.setName(orgUsrDto.getBizOrgName());
vo.setId(orgUsrDto.getSequenceNbr()); vo.setId(orgUsrDto.getSequenceNbr());
vo.setBizOrgName(orgUsrDto.getBizOrgName()); 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; return vo;
}).collect(Collectors.toList()); }).collect(Collectors.toList());
// 3.将建筑的bizOrgCode转换为parentId连接树 ,拼接数据准备 // 3.将建筑的bizOrgCode转换为parentId连接树 ,拼接数据准备
...@@ -1488,7 +1488,7 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i ...@@ -1488,7 +1488,7 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i
c.setTotal(countMap.get(c.getInstanceId()) == null ? 0L : countMap.get(c.getInstanceId())); c.setTotal(countMap.get(c.getInstanceId()) == null ? 0L : countMap.get(c.getInstanceId()));
} else { } else {
// 方法 复用,覆盖掉不需要的数据 // 方法 复用,覆盖掉不需要的数据
c.setTotal(0L); // c.setTotal(0L);
} }
}); });
//2.list to tree //2.list to tree
...@@ -1496,7 +1496,9 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i ...@@ -1496,7 +1496,9 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i
.filter(a -> companyBuildingList.stream().noneMatch(c -> c.getId().toString().equals(a.getParentId()))) .filter(a -> companyBuildingList.stream().noneMatch(c -> c.getId().toString().equals(a.getParentId())))
.peek(b -> { .peek(b -> {
b.setChildren(getCompanyBuildingChildrenWithCount(b.getId().toString(), companyBuildingList)); 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()); }).collect(Collectors.toList());
} }
......
...@@ -302,6 +302,7 @@ ...@@ -302,6 +302,7 @@
`wlesal`.`equipment_specific_index_key` AS `indexKey`, `wlesal`.`equipment_specific_index_key` AS `indexKey`,
`wlesal`.`equipment_specific_index_name` AS `indexName`, `wlesal`.`equipment_specific_index_name` AS `indexName`,
`wlesal`.`equipment_specific_id` AS `specificId`, `wlesal`.`equipment_specific_id` AS `specificId`,
`wlesal`.emergency_level_color as levelColor,
IF IF
( `wlesal`.`clean_time` IS NOT NULL, '已消除', '未消除' ) AS `cleanStatus`, ( `wlesal`.`clean_time` IS NOT NULL, '已消除', '未消除' ) AS `cleanStatus`,
`wlesal`.`iot_code` AS `iotCode`, `wlesal`.`iot_code` AS `iotCode`,
......
...@@ -645,4 +645,9 @@ AND field_name =#{name} ...@@ -645,4 +645,9 @@ AND field_name =#{name}
</if> </if>
</where> </where>
</select> </select>
<select id="queryVideoCountByBizOrgCode" resultType="java.lang.Long">
select count(1) from wl_video where biz_org_code like concat(#{bizOrgCode}, '%')
</select>
</mapper> </mapper>
...@@ -58,7 +58,7 @@ ...@@ -58,7 +58,7 @@
</if> </if>
group by wlv.id group by wlv.id
order by wlv.create_date desc order by wlv.create_date desc, v.id desc
</select> </select>
<!-- SELECT <!-- SELECT
v.id AS id, v.id AS id,
...@@ -121,8 +121,8 @@ ...@@ -121,8 +121,8 @@
<if test="dto.type!=null and dto.type!=''"> <if test="dto.type!=null and dto.type!=''">
and v.type = #{dto.type} and v.type = #{dto.type}
</if> </if>
GROUP BY id GROUP BY v.id
order by v.create_date order by v.create_date desc, v.id desc
</when> </when>
<when test='dto.buildingId == null || dto.buildingId ==""'> <when test='dto.buildingId == null || dto.buildingId ==""'>
<where> <where>
...@@ -142,8 +142,8 @@ ...@@ -142,8 +142,8 @@
and v.type =#{dto.type} and v.type =#{dto.type}
</if> </if>
</where> </where>
GROUP BY id GROUP BY v.id
order by v.create_date order by v.create_date desc, v.id desc
</when> </when>
</choose> </choose>
</select> </select>
......
...@@ -98,7 +98,7 @@ ...@@ -98,7 +98,7 @@
<![CDATA[ <![CDATA[
CONCAT( CONCAT(
'巡检地点:', '巡检地点:',
pp.address, IFNULL(pp.address, '无'),
'<br />点编号:', '<br />点编号:',
pp.point_no, pp.point_no,
'<br />当前状态:', '<br />当前状态:',
...@@ -121,7 +121,7 @@ ...@@ -121,7 +121,7 @@
) ]]> saveMsg, ) ]]> saveMsg,
CONCAT( CONCAT(
'巡检地点:', '巡检地点:',
pp.address, IFNULL(pp.address, '无'),
';点编号:', ';点编号:',
pp.point_no, 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