Commit 138904fa authored by tangwei's avatar tangwei

指挥接口编写

parent 9a6113a1
package com.yeejoin.amos.boot.module.common.api.dto;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yeejoin.amos.boot.biz.common.dto.BaseDto;
import com.yeejoin.amos.boot.module.common.api.excel.ExplicitConstraint;
import com.yeejoin.amos.boot.module.common.api.excel.RoleNameExplicitConstraint;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
/**
* 微型消防站
*
* @author system_generator
* @date 2021-06-28
*/
@Data
@ApiModel(value = "FireStationzhDto", description = "指挥微型消防站")
public class FireStationzhDto {
@ApiModelProperty(value = "主键ID")
protected Long sequenceNbr;
@ApiModelProperty(value = "微型消防站名称")
private String name;
@ApiModelProperty(value = "负责人名称")
private String personChargeName;
@ApiModelProperty(value = "负责人电话")
private String personChargeTelephone;
@ApiModelProperty(value = "战备装备数量")
private int eqNum;
@ApiModelProperty(value = "战备人数量")
private int userNum;
@ApiModelProperty(value = "战备车辆数量")
private int carNum;
@ApiModelProperty(value = "距离灾情点距离 单位 米")
private Double distance;
@ApiModelProperty(value = "经度")
private Double longitude;
@ApiModelProperty(value = "纬度")
private Double latitude;
}
\ No newline at end of file
package com.yeejoin.amos.boot.module.common.api.dto;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.yeejoin.amos.boot.biz.common.dto.BaseDto;
import com.yeejoin.amos.boot.module.common.api.excel.ExplicitConstraint;
import com.yeejoin.amos.boot.module.common.api.excel.RoleNameExplicitConstraint;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
import java.util.List;
/**
* 消防队伍
*
* @author tb
* @date 2021-06-07
*/
@Data
@ApiModel(value = "FireTeamZhDto", description = "指挥消防队伍")
public class FireTeamZhDto {
@ApiModelProperty(value = "机构名称")
private String companyName;
@ApiModelProperty(value = "主键ID")
protected Long sequenceNbr;
@ApiModelProperty(value = "单位名称")
private String name;
@ApiModelProperty(value = "消防队类型")
private String type;
@ApiModelProperty(value = "队伍地址")
private String address;
@ApiModelProperty(value = "经度")
private Double longitude;
@ApiModelProperty(value = "纬度")
private Double latitude;
@ApiModelProperty(value = "联系人")
private String contactUser;
@ApiModelProperty(value = "联系电话")
private String contactPhone;
@ApiModelProperty(value = "车辆数")
private int carNum;
@ApiModelProperty(value = " 人数")
private int userNum;
@ApiModelProperty(value = "距离灾情点距离 单位 米")
private Double distance;
}
\ No newline at end of file
package com.yeejoin.amos.boot.module.common.api.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @description:
* @author: tw
* @createDate: 2021/7/14
* 指挥资源,请求坐标类
*/
@Data
@ApiModel(value = "RequestData", description = "指挥资源,请求坐标类")
public class RequestData {
@ApiModelProperty(value = "经度")
private Double longitude;
@ApiModelProperty(value = "纬度")
private Double latitude;
@ApiModelProperty(value = "距离")
private Double distance;
@ApiModelProperty(value = "水源资源类型(hydrant:消火栓、crane:消防水鹤、natural:天然水源、pool:消防水池)")
private String resourceType;
@ApiModelProperty(value = "队伍类型code")
private String typeCode;
}
...@@ -33,9 +33,16 @@ public class WaterResourceDto extends BaseDto { ...@@ -33,9 +33,16 @@ public class WaterResourceDto extends BaseDto {
@ApiModelProperty(value = "地址") @ApiModelProperty(value = "地址")
private String address; private String address;
// @ApiModelProperty(value = "经纬度坐标")
// private String latLang;
@ExcelIgnore
@ApiModelProperty(value = "经度")
private Double longitude;
@ExcelIgnore @ExcelIgnore
@ApiModelProperty(value = "经纬度坐标") @ApiModelProperty(value = "纬度")
private String latLang; private Double latitude;
@ExcelIgnore @ExcelIgnore
@ApiModelProperty(value = "资源类型(消火栓、消防水鹤、天然水源、消防水池)") @ApiModelProperty(value = "资源类型(消火栓、消防水鹤、天然水源、消防水池)")
......
package com.yeejoin.amos.boot.module.common.api.dto;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.TableField;
import com.yeejoin.amos.boot.biz.common.dto.BaseDto;
import com.yeejoin.amos.boot.module.common.api.excel.ExplicitConstraint;
import com.yeejoin.amos.boot.module.common.api.excel.RoleNameExplicitConstraint;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
import java.util.List;
/**
* @author system_generator
* @date 2021-06-29
*/
@Data
@ApiModel(value = "WaterResourceZhDto", description = " 指挥水资源")
public class WaterResourceZhDto {
@ApiModelProperty(value = "资源名称")
private String name;
@ApiModelProperty(value = "地址")
private String address;
@ApiModelProperty(value = "主键ID")
protected Long sequenceNbr;
@ApiModelProperty(value = "经度")
private Double longitude;
@ApiModelProperty(value = "纬度")
private Double latitude;
@ApiModelProperty(value = "资源类型(消火栓、消防水鹤、天然水源、消防水池)")
private String resourceType;
@ApiModelProperty(value = "资源类型名称(消火栓、消防水鹤、天然水源、消防水池)")
private String resourceTypeName;
@ApiModelProperty(value = "所在建筑")
private String belongBuilding;
@ApiModelProperty(value = "所属消防系统")
private String belongFightingSystem;
@ApiModelProperty(value = "管理单位")
private String managementUnit;
@ApiModelProperty(value = "维保单位")
private String maintenanceUnit;
@ApiModelProperty(value = "距离灾情点距离 单位 米")
private Double distance;
}
...@@ -2,6 +2,7 @@ package com.yeejoin.amos.boot.module.common.api.entity; ...@@ -2,6 +2,7 @@ package com.yeejoin.amos.boot.module.common.api.entity;
import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModelProperty;
import org.typroject.tyboot.core.rdbms.orm.entity.BaseEntity; import org.typroject.tyboot.core.rdbms.orm.entity.BaseEntity;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
...@@ -37,8 +38,14 @@ public class WaterResource extends BaseEntity { ...@@ -37,8 +38,14 @@ public class WaterResource extends BaseEntity {
/** /**
* 经纬度坐标 * 经纬度坐标
*/ */
@TableField("lat_lang") // @TableField("lat_lang")
private String latLang; // private String latLang;
@ApiModelProperty(value = "经度")
private Double longitude;
@ApiModelProperty(value = "纬度")
private Double latitude;
/** /**
* 资源类型(消火栓、消防水鹤、天然水源、消防水池) * 资源类型(消火栓、消防水鹤、天然水源、消防水池)
*/ */
......
...@@ -2,6 +2,8 @@ package com.yeejoin.amos.boot.module.common.api.mapper; ...@@ -2,6 +2,8 @@ package com.yeejoin.amos.boot.module.common.api.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yeejoin.amos.boot.module.common.api.dto.FireStationDto; import com.yeejoin.amos.boot.module.common.api.dto.FireStationDto;
import com.yeejoin.amos.boot.module.common.api.dto.FireStationzhDto;
import com.yeejoin.amos.boot.module.common.api.dto.RequestData;
import com.yeejoin.amos.boot.module.common.api.entity.FireStation; import com.yeejoin.amos.boot.module.common.api.entity.FireStation;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
...@@ -36,4 +38,18 @@ public interface FireStationMapper extends BaseMapper<FireStation> { ...@@ -36,4 +38,18 @@ public interface FireStationMapper extends BaseMapper<FireStation> {
+ "</script>") + "</script>")
Map<String, Long> getFireStationCount(@Param("par")FireStationDto par); Map<String, Long> getFireStationCount(@Param("par")FireStationDto par);
/***
*
* 指挥系统 -微型消防站资源 列表
*
* **/
List<FireStationzhDto> getStationList(@Param("pageNum")int pageNum, @Param("pageSize")int pageSize, @Param("par") RequestData par);
/***
*
* 指挥系统 -微型消防站资源统计
*
* **/
Integer getStationListCount(@Param("par")RequestData par);
} }
...@@ -3,11 +3,7 @@ package com.yeejoin.amos.boot.module.common.api.mapper; ...@@ -3,11 +3,7 @@ package com.yeejoin.amos.boot.module.common.api.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.module.common.api.dto.FireBrigadeResourceDto; import com.yeejoin.amos.boot.module.common.api.dto.*;
import com.yeejoin.amos.boot.module.common.api.dto.FireTeamCardDto;
import com.yeejoin.amos.boot.module.common.api.dto.FireTeamDto;
import com.yeejoin.amos.boot.module.common.api.dto.FireTeamListDto;
import com.yeejoin.amos.boot.module.common.api.dto.FirefightersDto;
import com.yeejoin.amos.boot.module.common.api.entity.FireTeam; import com.yeejoin.amos.boot.module.common.api.entity.FireTeam;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
...@@ -71,4 +67,32 @@ public interface FireTeamMapper extends BaseMapper<FireTeam> { ...@@ -71,4 +67,32 @@ public interface FireTeamMapper extends BaseMapper<FireTeam> {
* @return * @return
*/ */
List<FireTeam> listFireTeamById(Long teamId); List<FireTeam> listFireTeamById(Long teamId);
/***
*
* 指挥队伍资源 列表
*
* **/
List<FireTeamZhDto> getFireTeamList(@Param("pageNum")int pageNum, @Param("pageSize")int pageSize, @Param("par") RequestData par);
/***
*
* 指挥队伍资源 统计
*
* **/
Integer getFireTeamListCount(@Param("par")RequestData par);
} }
package com.yeejoin.amos.boot.module.common.api.mapper; package com.yeejoin.amos.boot.module.common.api.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yeejoin.amos.boot.module.common.api.dto.RequestData;
import com.yeejoin.amos.boot.module.common.api.dto.WaterResourceDto; import com.yeejoin.amos.boot.module.common.api.dto.WaterResourceDto;
import com.yeejoin.amos.boot.module.common.api.dto.WaterResourceZhDto;
import com.yeejoin.amos.boot.module.common.api.entity.WaterResource; import com.yeejoin.amos.boot.module.common.api.entity.WaterResource;
import org.apache.ibatis.annotations.Param;
import java.util.List; import java.util.List;
/** /**
...@@ -16,4 +18,20 @@ public interface WaterResourceMapper extends BaseMapper<WaterResource> { ...@@ -16,4 +18,20 @@ public interface WaterResourceMapper extends BaseMapper<WaterResource> {
List<WaterResourceDto> exportToExcel(Boolean isDelete); List<WaterResourceDto> exportToExcel(Boolean isDelete);
/***
*
* 指挥水源资源 列表
*
* **/
List<WaterResourceZhDto> getWaterResourceList(@Param("pageNum")int pageNum, @Param("pageSize")int pageSize, @Param("par") RequestData par);
/***
*
* 指挥水源资源统计
*
* **/
Integer getWaterResourceListCount(@Param("par")RequestData par);
} }
...@@ -3,8 +3,13 @@ package com.yeejoin.amos.boot.module.common.api.service; ...@@ -3,8 +3,13 @@ package com.yeejoin.amos.boot.module.common.api.service;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.module.common.api.dto.FireStationDto; import com.yeejoin.amos.boot.module.common.api.dto.FireStationDto;
import com.yeejoin.amos.boot.module.common.api.dto.FireStationzhDto;
import com.yeejoin.amos.boot.module.common.api.dto.RequestData;
import io.swagger.annotations.ApiModelProperty;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import java.util.List;
/** /**
* 微型消防站接口类 * 微型消防站接口类
* *
...@@ -14,5 +19,23 @@ import org.apache.ibatis.annotations.Param; ...@@ -14,5 +19,23 @@ import org.apache.ibatis.annotations.Param;
public interface IFireStationService { public interface IFireStationService {
Page<FireStationDto> getFirefighters(@Param("pageNum")int pageNum,@Param("pageSize")int pageSize,@Param("par")FireStationDto par); Page<FireStationDto> getFirefighters(@Param("pageNum")int pageNum,@Param("pageSize")int pageSize,@Param("par")FireStationDto par);
/***
*
* 指挥系统 -微型消防站资源 列表
*
* **/
List<FireStationzhDto> getStationList(Integer pageNum, Integer pageSize, RequestData requestData);
/***
*
* 指挥系统 -微型消防站资源统计
*
* **/
Integer getStationListCount(RequestData requestData);
/**
*
* 指挥微型消防站详情
*
* */
FireStationDto selectBySequenceNbr(Long id);
} }
package com.yeejoin.amos.boot.module.common.api.service; package com.yeejoin.amos.boot.module.common.api.service;
import com.yeejoin.amos.boot.module.common.api.dto.FireTeamZhDto;
import com.yeejoin.amos.boot.module.common.api.dto.RequestData;
import com.yeejoin.amos.boot.module.common.api.entity.FireTeam;
import java.util.List;
/** /**
* 消防队伍 服务类 * 消防队伍 服务类
* *
...@@ -7,4 +13,30 @@ package com.yeejoin.amos.boot.module.common.api.service; ...@@ -7,4 +13,30 @@ package com.yeejoin.amos.boot.module.common.api.service;
* @date 2021-06-07 * @date 2021-06-07
*/ */
public interface IFireTeamService { public interface IFireTeamService {
/***
*
* 指挥队伍资源 列表
*
* **/
List<FireTeamZhDto> getFireTeamList(Integer pageNum, Integer pageSize, RequestData par);
/***
*
* 指挥队伍资源 统计
*
* **/
Integer getFireTeamListCount(RequestData par);
/**
*
*
* 消防队伍详情
*
* **/
FireTeam getFireTeamBySequenceNbr(Long id);
} }
package com.yeejoin.amos.boot.module.common.api.service; package com.yeejoin.amos.boot.module.common.api.service;
import com.yeejoin.amos.boot.module.common.api.dto.RequestData;
import com.yeejoin.amos.boot.module.common.api.dto.WaterResourceDto;
import com.yeejoin.amos.boot.module.common.api.dto.WaterResourceZhDto;
import java.util.List;
/** /**
* 接口类 * 接口类
* *
...@@ -9,4 +16,24 @@ package com.yeejoin.amos.boot.module.common.api.service; ...@@ -9,4 +16,24 @@ package com.yeejoin.amos.boot.module.common.api.service;
*/ */
public interface IWaterResourceService { public interface IWaterResourceService {
/***
*
* 指挥水源资源 列表
*
* **/
List<WaterResourceZhDto> getWaterResourceList(Integer pageNum, Integer pageSize, RequestData requestData);
/***
*
* 指挥水源资源统计
*
* **/
Integer getWaterResourceListCount(RequestData requestData);
/**
*
* 指挥水源资源详情
*
* */
WaterResourceDto selectBySequenceNbr(Long id);
} }
...@@ -2,4 +2,34 @@ ...@@ -2,4 +2,34 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yeejoin.amos.boot.module.common.api.mapper.FireStationMapper"> <mapper namespace="com.yeejoin.amos.boot.module.common.api.mapper.FireStationMapper">
<select id="getStationList" resultType="com.yeejoin.amos.boot.module.common.api.dto.FireStationzhDto">
SELECT
a.sequence_nbr sequenceNbr,
a.person_charge_name personChargeName,
a.longitude,
a.latitude,
a.person_charge_telephone personChargeTelephone,
Round(st_distance(point(a.longitude,a.latitude),point(#{par.longitude},#{par.latitude}))*111195,1) AS distance
FROM cb_fire_station a
where a.is_delete=0 and a.longitude is not null and a.latitude is not null
<if test='par.distance!=null'>
Round(st_distance(point(a.longitude,a.latitude),point(#{par.longitude},#{par.latitude}))*111195,1) &lt;= #{par.distance}
</if>
ORDER BY distance limit #{pageNum},#{pageSize}
</select>
<select id="getStationListCount" resultType="Integer">
SELECT
COUNT(a.sequence_nbr) num
FROM cb_water_resource a
where a.is_delete=0 and a.longitude is not null and a.latitude is not null
<if test='par.distance!=null'>
Round(st_distance(point(a.longitude,a.latitude),point(#{par.longitude},#{par.latitude}))*111195,1) &lt;= #{par.distance}
</if>
</select>
</mapper> </mapper>
...@@ -79,4 +79,60 @@ ...@@ -79,4 +79,60 @@
AND tree_code LIKE CONCAT((SELECT tree_code FROM cb_fire_team WHERE sequence_nbr = #{teamId}),'%'); AND tree_code LIKE CONCAT((SELECT tree_code FROM cb_fire_team WHERE sequence_nbr = #{teamId}),'%');
</if> </if>
</select> </select>
<select id="getFireTeamList" resultType="com.yeejoin.amos.boot.module.common.api.dto.FireTeamZhDto">
SELECT
a.sequence_nbr sequenceNbr,
a.company_name companyName,
a.longitude,
a.latitude,
a.address,
a.type ,
a.name ,
a.contact_user contactUser,
a.contact_phone contactPhone,
( SELECT count( 1 ) FROM cb_firefighters WHERE fire_team_id = a.sequence_nbr AND is_delete = 0 ) userNum,
Round(st_distance(point(a.longitude,a.latitude),point(#{par.longitude},#{par.latitude}))*111195,1) AS distance
FROM cb_fire_team a
where a.is_delete=0 and a.longitude is not null and a.latitude is not null
<if test='par.typeCode!=null'>
and a.type_code= #{par.typeCode}
</if>
<if test='par.distance!=null'>
and Round(st_distance(point(a.longitude,a.latitude),point(#{par.longitude},#{par.latitude}))*111195,1) &lt;= #{par.distance}
</if>
ORDER BY distance limit #{pageNum},#{pageSize}
</select>
<select id="getFireTeamListCount" resultType="Integer">
SELECT
COUNT(a.sequence_nbr) num
FROM cb_fire_team a
where a.is_delete=0 and a.longitude is not null and a.latitude is not null
<if test='par.typeCode!=null'>
and a.type_code= #{par.typeCode}
</if>
<if test='par.distance!=null'>
and Round(st_distance(point(a.longitude,a.latitude),point(#{par.longitude},#{par.latitude}))*111195,1) &lt;= #{par.distance}
</if>
</select>
</mapper> </mapper>
...@@ -56,4 +56,68 @@ ...@@ -56,4 +56,68 @@
left join cb_water_resource_iot ri on r.sequence_nbr = ri.resource_id left join cb_water_resource_iot ri on r.sequence_nbr = ri.resource_id
where r.is_delete = #{isDelete} where r.is_delete = #{isDelete}
</select> </select>
<select id="getWaterResourceList" resultType="com.yeejoin.amos.boot.module.common.api.dto.WaterResourceZhDto">
SELECT
a.sequence_nbr sequenceNbr,
a.name,
a.longitude,
a.latitude,
a.address,
a.resource_type resourceType,
a.resource_type_name resourceTypeName,
a.belong_building belongBuilding,
a.belong_fighting_system belongFightingSystem,
a.management_unit managementUnit,
a.maintenance_unit maintenanceUnit,
Round(st_distance(point(a.longitude,a.latitude),point(#{par.longitude},#{par.latitude}))*111195,1) AS distance
FROM cb_water_resource a
where a.is_delete=0 and a.longitude is not null and a.latitude is not null
<if test='par.resourceType!=null'>
and a.resource_type= #{par.resourceType}
</if>
<if test='par.distance!=null'>
and Round(st_distance(point(a.longitude,a.latitude),point(#{par.longitude},#{par.latitude}))*111195,1) &lt;= #{par.distance}
</if>
ORDER BY distance limit #{pageNum},#{pageSize}
</select>
<select id="getWaterResourceListCount" resultType="Integer">
SELECT
COUNT(a.sequence_nbr) num
FROM cb_water_resource a
where a.is_delete=0 and a.longitude is not null and a.latitude is not null
<if test='par.resourceType!=null'>
and a.resource_type= #{par.resourceType}
</if>
<if test='par.distance!=null'>
and Round(st_distance(point(a.longitude,a.latitude),point(#{par.longitude},#{par.latitude}))*111195,1) &lt;= #{par.distance}
</if>
</select>
</mapper> </mapper>
package com.yeejoin.amos.boot.module.jcs.api.dto;
import com.yeejoin.amos.boot.biz.common.dto.BaseDto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
/**
* 警情接警记录
*
* @author tb
* @date 2021-06-17
*/
@Data
@ApiModel(value="AlertCalledZhDto", description=" 指挥警情接警记录")
public class AlertCalledZhDto {
@ApiModelProperty(value = "主键ID")
protected Long sequenceNbr;
@ApiModelProperty(value = "警情阶段")
private String alertStage;
@ApiModelProperty(value = "接警时间")
private Date callTime;
@ApiModelProperty(value = "警情类型")
private String alertType;
@ApiModelProperty(value = "事发单位")
private String unitInvolved;
@ApiModelProperty(value = "被困人数")
private Integer trappedNum;
@ApiModelProperty(value = "伤亡人数")
private Integer casualtiesNum;
@ApiModelProperty(value = "地址")
private String address;
@ApiModelProperty(value = "经度")
private String longitude;
@ApiModelProperty(value = "纬度")
private String latitude;
@ApiModelProperty(value = "响应级别字典code 为了过滤用(只有航空器故障有)")
private String responseLevelCode;
}
...@@ -21,7 +21,7 @@ import java.util.Map; ...@@ -21,7 +21,7 @@ import java.util.Map;
* *
* @author Dell * @author Dell
*/ */
@FeignClient(name = "AMOS-EQUIPMANAGE", path = "equip", configuration = {MultipartSupportConfig.class}) @FeignClient(name = "AMOS-EQUIPMANAGE-KY", path = "equip", configuration = {MultipartSupportConfig.class})
public interface EquipFeignClient { public interface EquipFeignClient {
/** /**
...@@ -68,6 +68,16 @@ public interface EquipFeignClient { ...@@ -68,6 +68,16 @@ public interface EquipFeignClient {
@RequestMapping(value = "/car/list-all", method = RequestMethod.GET) @RequestMapping(value = "/car/list-all", method = RequestMethod.GET)
ResponseModel<Object> getFireCarListAll(); ResponseModel<Object> getFireCarListAll();
/**
* 获取个队伍下车辆统计
*
* @return
*/
@RequestMapping(value = "/car/list-info", method = RequestMethod.GET)
ResponseModel<List<Map<String,Object>>> getFireCarListAllcount();
/** /**
* 获取消防系统列表 * 获取消防系统列表
* *
......
package com.yeejoin.amos.boot.module.jcs.api.mapper; package com.yeejoin.amos.boot.module.jcs.api.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yeejoin.amos.boot.module.jcs.api.dto.AlertCalledZhDto;
import com.yeejoin.amos.boot.module.jcs.api.entity.AlertCalled; import com.yeejoin.amos.boot.module.jcs.api.entity.AlertCalled;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Map; import java.util.Map;
/** /**
...@@ -15,4 +17,6 @@ import java.util.Map; ...@@ -15,4 +17,6 @@ import java.util.Map;
public interface AlertCalledMapper extends BaseMapper<AlertCalled> { public interface AlertCalledMapper extends BaseMapper<AlertCalled> {
Map<String, Integer> queryAlertStatusCount(@Param("beginDate") String beginDate, @Param("endDate") String endDate); Map<String, Integer> queryAlertStatusCount(@Param("beginDate") String beginDate, @Param("endDate") String endDate);
List<AlertCalledZhDto> alertCalledListByAlertStatus(@Param("address") String address);
} }
package com.yeejoin.amos.boot.module.jcs.api.service; package com.yeejoin.amos.boot.module.jcs.api.service;
import com.yeejoin.amos.boot.module.jcs.api.dto.AlertCalledZhDto;
import com.yeejoin.amos.boot.module.jcs.api.entity.AlertCalled;
import org.springframework.web.bind.annotation.PathVariable;
import java.util.List;
/** /**
* 警情接警记录 服务类 * 警情接警记录 服务类
* *
...@@ -12,4 +18,19 @@ public interface IAlertCalledService { ...@@ -12,4 +18,19 @@ public interface IAlertCalledService {
* type:警情相关 操作类型 警情续报 非警情确认 警情结案 * type:警情相关 操作类型 警情续报 非警情确认 警情结案
* */ * */
boolean updateAlertCalled(Long id, String code); boolean updateAlertCalled(Long id, String code);
/**
*
* 指挥系统 未结束的警情列表
*
* **/
List<AlertCalledZhDto> alertCalledListByAlertStatus(String address);
/**
*
* 根据灾情id 查询灾情详情
*
* **/
Object selectAlertCalledById( Long id);
} }
...@@ -12,4 +12,36 @@ ...@@ -12,4 +12,36 @@
WHERE WHERE
call_time BETWEEN #{beginDate} AND #{endDate} call_time BETWEEN #{beginDate} AND #{endDate}
</select> </select>
<select id="alertCalledListByAlertStatus" resultType="com.yeejoin.amos.boot.module.jcs.api.dto.AlertCalledZhDto">
SELECT
a.sequence_nbr sequenceNbr,
a.alert_stage alertStage,
a.call_time callTime,
a.alert_type alertType,
a.unit_involved unitInvolved,
a.trapped_num trappedNum,
a.casualties_num casualtiesNum,
a.address ,
a.coordinate_x longitude,
a.coordinate_y latitude,
CASE a.response_level_code
WHEN '243' THEN '一级'
WHEN '244' THEN '二级'
WHEN '245' THEN '三级'
ELSE '' END responseLevelCode
FROM jc_alert_called a
where a.alert_status =0
AND a.is_delete=0
AND a.coordinate_x IS NOT NULL
AND a.coordinate_y IS NOT NULL
<if test='address!=null'>
and a.address like CONCAT('%',#{address},'%')
</if>
ORDER BY
a.call_time DESC
</select>
</mapper> </mapper>
...@@ -3,6 +3,8 @@ package com.yeejoin.amos.boot.module.common.biz.service.impl; ...@@ -3,6 +3,8 @@ package com.yeejoin.amos.boot.module.common.biz.service.impl;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.module.common.api.dto.FireStationDto; import com.yeejoin.amos.boot.module.common.api.dto.FireStationDto;
import com.yeejoin.amos.boot.module.common.api.dto.FireStationzhDto;
import com.yeejoin.amos.boot.module.common.api.dto.RequestData;
import com.yeejoin.amos.boot.module.common.api.entity.FireStation; import com.yeejoin.amos.boot.module.common.api.entity.FireStation;
import com.yeejoin.amos.boot.module.common.api.entity.OrgUsr; import com.yeejoin.amos.boot.module.common.api.entity.OrgUsr;
import com.yeejoin.amos.boot.module.common.api.mapper.FireStationMapper; import com.yeejoin.amos.boot.module.common.api.mapper.FireStationMapper;
...@@ -28,6 +30,7 @@ import java.util.Map; ...@@ -28,6 +30,7 @@ import java.util.Map;
public class FireStationServiceImpl extends BaseService<FireStationDto, FireStation, FireStationMapper> public class FireStationServiceImpl extends BaseService<FireStationDto, FireStation, FireStationMapper>
implements IFireStationService { implements IFireStationService {
@Autowired @Autowired
FireStationMapper fireStationMapper; FireStationMapper fireStationMapper;
@Autowired @Autowired
...@@ -63,6 +66,28 @@ public class FireStationServiceImpl extends BaseService<FireStationDto, FireStat ...@@ -63,6 +66,28 @@ public class FireStationServiceImpl extends BaseService<FireStationDto, FireStat
return pageBean.setRecords(list); return pageBean.setRecords(list);
} }
@Override
public List<FireStationzhDto> getStationList(Integer pageNum, Integer pageSize, RequestData requestData) {
if (null == pageNum || null == pageSize) {
pageNum = 1;
pageSize = Integer.MAX_VALUE;
}else{
pageNum=(pageNum - 1) * pageSize;
}
return fireStationMapper.getStationList(pageNum,pageSize,requestData);
}
@Override
public Integer getStationListCount(RequestData requestData) {
return fireStationMapper.getStationListCount(requestData);
}
@Override
public FireStationDto selectBySequenceNbr(Long id) {
return this.queryBySeq(id);
}
/** /**
* 新增 * 新增
***/ ***/
......
...@@ -5,6 +5,9 @@ import java.util.Optional; ...@@ -5,6 +5,9 @@ import java.util.Optional;
import javax.annotation.Resource; import javax.annotation.Resource;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.yeejoin.amos.boot.module.common.api.dto.*;
import com.yeejoin.amos.boot.module.common.api.entity.*;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -16,13 +19,6 @@ import org.typroject.tyboot.core.rdbms.service.BaseService; ...@@ -16,13 +19,6 @@ import org.typroject.tyboot.core.rdbms.service.BaseService;
import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONArray;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.biz.common.utils.EnumsUtils; import com.yeejoin.amos.boot.biz.common.utils.EnumsUtils;
import com.yeejoin.amos.boot.module.common.api.dto.WaterResourceCraneDto;
import com.yeejoin.amos.boot.module.common.api.dto.WaterResourceDto;
import com.yeejoin.amos.boot.module.common.api.dto.WaterResourceHydrantDto;
import com.yeejoin.amos.boot.module.common.api.dto.WaterResourceIotDto;
import com.yeejoin.amos.boot.module.common.api.dto.WaterResourceNaturalDto;
import com.yeejoin.amos.boot.module.common.api.dto.WaterResourcePoolDto;
import com.yeejoin.amos.boot.module.common.api.entity.WaterResource;
import com.yeejoin.amos.boot.module.common.api.enums.WaterResourceTypeEnum; import com.yeejoin.amos.boot.module.common.api.enums.WaterResourceTypeEnum;
import com.yeejoin.amos.boot.module.common.api.mapper.WaterResourceMapper; import com.yeejoin.amos.boot.module.common.api.mapper.WaterResourceMapper;
import com.yeejoin.amos.boot.module.common.api.service.IWaterResourceService; import com.yeejoin.amos.boot.module.common.api.service.IWaterResourceService;
...@@ -145,4 +141,72 @@ public class WaterResourceServiceImpl extends BaseService<WaterResourceDto, Wate ...@@ -145,4 +141,72 @@ public class WaterResourceServiceImpl extends BaseService<WaterResourceDto, Wate
public List<WaterResourceDto> exportToExcel(@Condition(Operator.eq) Boolean isDelete) { public List<WaterResourceDto> exportToExcel(@Condition(Operator.eq) Boolean isDelete) {
return waterResourceMapper.exportToExcel(isDelete); return waterResourceMapper.exportToExcel(isDelete);
} }
@Override
public List<WaterResourceZhDto> getWaterResourceList(Integer pageNum, Integer pageSize, RequestData requestData) {
if (null == pageNum || null == pageSize) {
pageNum = 1;
pageSize = Integer.MAX_VALUE;
}else{
pageNum=(pageNum - 1) * pageSize;
}
return waterResourceMapper.getWaterResourceList( pageNum, pageSize, requestData);
}
@Override
public Integer getWaterResourceListCount(RequestData requestData) {
return waterResourceMapper.getWaterResourceListCount(requestData);
}
@Override
public WaterResourceDto selectBySequenceNbr(Long sequenceNbr) {
// 查询基本信息
WaterResourceDto waterResourceDto = this.queryBySeq(sequenceNbr);
waterResourceDto.setRealityImgList(JSONArray.parseArray(waterResourceDto.getRealityImg(), Object.class));
waterResourceDto.setOrientationImgList(JSONArray.parseArray(waterResourceDto.getOrientationImg()));
Boolean isDelete = waterResourceDto.getIsDelete();
// 查询属性信息
String resourceType = waterResourceDto.getResourceType();
if (!StringUtils.isEmpty(resourceType)) {
switch (resourceType) {
case "hydrant":
WaterResourceHydrant waterResourceHydrant =
waterResourceHydrantService.getOne(new QueryWrapper<WaterResourceHydrant>().eq(
"resource_id",
sequenceNbr));
BeanUtils.copyProperties(waterResourceHydrant, waterResourceDto);
break;
case "crane":
WaterResourceCrane waterResourceCrane =
waterResourceCraneService.getOne(new QueryWrapper<WaterResourceCrane>().eq("resource_id",
sequenceNbr));
BeanUtils.copyProperties(waterResourceCrane, waterResourceDto);
break;
case "natural":
WaterResourceNatural waterResourceNatural =
waterResourceNaturalService.getOne(new QueryWrapper<WaterResourceNatural>().eq(
"resource_id",
sequenceNbr));
BeanUtils.copyProperties(waterResourceNatural, waterResourceDto);
break;
case "pool":
WaterResourcePool waterResourcePool =
waterResourcePoolService.getOne(new QueryWrapper<WaterResourcePool>().eq("resource_id",
sequenceNbr));
BeanUtils.copyProperties(waterResourcePool, waterResourceDto);
break;
}
}
waterResourceDto.setSequenceNbr(sequenceNbr);
waterResourceDto.setIsDelete(isDelete);
// 查询物联参数
if (waterResourceDto.getIsIot()) {
WaterResourceIot waterResourceIot = waterResourceIotService.getOne(new QueryWrapper<WaterResourceIot>().eq(
"resource_id", sequenceNbr));
WaterResourceIotDto waterResourceIotDto = new WaterResourceIotDto();
BeanUtils.copyProperties(waterResourceIot, waterResourceIotDto);
waterResourceDto.setWaterResourceIotDto(waterResourceIotDto);
}
return waterResourceDto;
}
} }
...@@ -136,28 +136,8 @@ public class AlertCalledController extends BaseController { ...@@ -136,28 +136,8 @@ public class AlertCalledController extends BaseController {
@ApiOperation(httpMethod = "GET", value = "根据id查询", notes = "根据id查询") @ApiOperation(httpMethod = "GET", value = "根据id查询", notes = "根据id查询")
public ResponseModel<Object> selectById(@PathVariable Long id) { public ResponseModel<Object> selectById(@PathVariable Long id) {
if(redisUtils.hasKey(RedisKey.ALERTCALLED_ID+id)){ return ResponseHelper.buildResponse(iAlertCalledService.selectAlertCalledById(id));
Object obj= redisUtils.get(RedisKey.ALERTCALLED_ID+id);
return ResponseHelper.buildResponse(obj);
}else{
// 警情基本信息
AlertCalled alertCalled = iAlertCalledService.getById(id);
QueryWrapper<AlertFormValue> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("alert_called_id", id);
// 警情动态表单数据
List<AlertFormValue> list = iAlertFormValueService.list(queryWrapper);
List<FormValue> formValue = new ArrayList<FormValue>();
if(list!=null&&list.size()>0) {
for (AlertFormValue alertFormValue : list) {
FormValue value = new FormValue(alertFormValue.getFieldCode(), alertFormValue.getFieldName(), "text", alertFormValue.getFieldValue(),alertFormValue.getBlock());
formValue.add(value);
}
}
AlertCalledFormDto alertCalledFormVo = new AlertCalledFormDto(alertCalled, formValue);
redisUtils.set(RedisKey.ALERTCALLED_ID+id,JSON.toJSON(alertCalledFormVo),time);
return ResponseHelper.buildResponse(alertCalledFormVo);
}
} }
/** /**
......
package com.yeejoin.amos.boot.module.jcs.biz.service.impl; package com.yeejoin.amos.boot.module.jcs.biz.service.impl;
import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.google.common.collect.Lists; import com.google.common.collect.Lists;
import com.google.common.collect.Maps; import com.google.common.collect.Maps;
import com.yeejoin.amos.boot.biz.common.utils.DateUtils; import com.yeejoin.amos.boot.biz.common.utils.DateUtils;
import com.yeejoin.amos.boot.biz.common.utils.RedisKey; import com.yeejoin.amos.boot.biz.common.utils.RedisKey;
import com.yeejoin.amos.boot.biz.common.utils.RedisUtils; import com.yeejoin.amos.boot.biz.common.utils.RedisUtils;
import com.yeejoin.amos.boot.module.common.api.dto.FormValue;
import com.yeejoin.amos.boot.module.jcs.api.dto.AlertCalledDto; import com.yeejoin.amos.boot.module.jcs.api.dto.AlertCalledDto;
import com.yeejoin.amos.boot.module.jcs.api.dto.AlertCalledFormDto;
import com.yeejoin.amos.boot.module.jcs.api.dto.AlertCalledObjsDto; import com.yeejoin.amos.boot.module.jcs.api.dto.AlertCalledObjsDto;
import com.yeejoin.amos.boot.module.jcs.api.dto.AlertCalledZhDto;
import com.yeejoin.amos.boot.module.jcs.api.entity.AlertCalled; import com.yeejoin.amos.boot.module.jcs.api.entity.AlertCalled;
import com.yeejoin.amos.boot.module.jcs.api.entity.AlertFormValue; import com.yeejoin.amos.boot.module.jcs.api.entity.AlertFormValue;
import com.yeejoin.amos.boot.module.jcs.api.entity.Template; import com.yeejoin.amos.boot.module.jcs.api.entity.Template;
...@@ -25,10 +30,13 @@ import org.springframework.stereotype.Service; ...@@ -25,10 +30,13 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import org.typroject.tyboot.component.emq.EmqKeeper; import org.typroject.tyboot.component.emq.EmqKeeper;
import org.typroject.tyboot.core.foundation.utils.Bean; import org.typroject.tyboot.core.foundation.utils.Bean;
import org.typroject.tyboot.core.foundation.utils.StringUtil;
import org.typroject.tyboot.core.foundation.utils.ValidationUtil; import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import org.typroject.tyboot.core.rdbms.service.BaseService; import org.typroject.tyboot.core.rdbms.service.BaseService;
import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -46,7 +54,7 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall ...@@ -46,7 +54,7 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall
@Autowired @Autowired
RedisUtils redisUtils; RedisUtils redisUtils;
@Resource @Autowired
AlertCalledMapper alertCalledMapper; AlertCalledMapper alertCalledMapper;
@Autowired @Autowired
...@@ -64,9 +72,56 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall ...@@ -64,9 +72,56 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall
@Value("${mqtt.topic.command.alert.notice}") @Value("${mqtt.topic.command.alert.notice}")
private String topic; private String topic;
@Value("${redis.cache.failure.time}")
private long time;
@Autowired @Autowired
TemplateMapper templateMapper; TemplateMapper templateMapper;
/**
*
* 指挥系统 未结束的警情列表
*
* **/
@Override
public List<AlertCalledZhDto> alertCalledListByAlertStatus(String address) {
List<AlertCalledZhDto> list = alertCalledMapper.alertCalledListByAlertStatus(address);
return list;
}
/**
*
* 根据灾情id 查询灾情详情
*
* **/
@Override
public Object selectAlertCalledById(Long id) {
if(redisUtils.hasKey(RedisKey.ALERTCALLED_ID+id)){
Object obj= redisUtils.get(RedisKey.ALERTCALLED_ID+id);
return ResponseHelper.buildResponse(obj);
}else{
// 警情基本信息
AlertCalled alertCalled = this.getById(id);
QueryWrapper<AlertFormValue> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("alert_called_id", id);
// 警情动态表单数据
List<AlertFormValue> list = iAlertFormValueService.list(queryWrapper);
List<FormValue> formValue = new ArrayList<FormValue>();
if(list!=null&&list.size()>0) {
for (AlertFormValue alertFormValue : list) {
FormValue value = new FormValue(alertFormValue.getFieldCode(), alertFormValue.getFieldName(), "text", alertFormValue.getFieldValue(),alertFormValue.getBlock());
formValue.add(value);
}
}
AlertCalledFormDto alertCalledFormVo = new AlertCalledFormDto(alertCalled, formValue);
redisUtils.set(RedisKey.ALERTCALLED_ID+id, JSON.toJSON(alertCalledFormVo),time);
return ResponseHelper.buildResponse(alertCalledFormVo);
}
}
/** /**
* *
* <pre> * <pre>
...@@ -180,6 +235,10 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall ...@@ -180,6 +235,10 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall
* 同步更新存ES * 同步更新存ES
*/ */
eSAlertCalledService.saveAlertCalledToES(alertCalled); eSAlertCalledService.saveAlertCalledToES(alertCalled);
//通知实战指挥页面发送mqtt 默认发送 String 类型 0新警情, 1警情状态变化
emqKeeper.getMqttClient().publish(topic, "1".getBytes(), RuleConfig.DEFAULT_QOS, true);
return true; return true;
} catch (Exception e) { } catch (Exception e) {
throw new RuntimeException("系统异常!"); throw new RuntimeException("系统异常!");
......
...@@ -8,12 +8,9 @@ import com.google.common.collect.Maps; ...@@ -8,12 +8,9 @@ import com.google.common.collect.Maps;
import com.yeejoin.amos.boot.biz.common.utils.Menu; import com.yeejoin.amos.boot.biz.common.utils.Menu;
import com.yeejoin.amos.boot.biz.common.utils.MenuFrom; import com.yeejoin.amos.boot.biz.common.utils.MenuFrom;
import com.yeejoin.amos.boot.biz.common.utils.TreeParser; import com.yeejoin.amos.boot.biz.common.utils.TreeParser;
import com.yeejoin.amos.boot.module.common.api.dto.FireBrigadeResourceDto; import com.yeejoin.amos.boot.module.common.api.dto.*;
import com.yeejoin.amos.boot.module.common.api.dto.FireTeamCardDto;
import com.yeejoin.amos.boot.module.common.api.dto.FireTeamDto;
import com.yeejoin.amos.boot.module.common.api.dto.FireTeamListDto;
import com.yeejoin.amos.boot.module.common.api.dto.FirefightersDto;
import com.yeejoin.amos.boot.module.common.api.entity.FireTeam; import com.yeejoin.amos.boot.module.common.api.entity.FireTeam;
import com.yeejoin.amos.boot.module.common.api.entity.Firefighters;
import com.yeejoin.amos.boot.module.common.api.entity.OrgUsr; import com.yeejoin.amos.boot.module.common.api.entity.OrgUsr;
import com.yeejoin.amos.boot.module.common.api.mapper.FireTeamMapper; import com.yeejoin.amos.boot.module.common.api.mapper.FireTeamMapper;
import com.yeejoin.amos.boot.module.common.api.service.IFireTeamService; import com.yeejoin.amos.boot.module.common.api.service.IFireTeamService;
...@@ -27,10 +24,7 @@ import org.typroject.tyboot.core.rdbms.service.BaseService; ...@@ -27,10 +24,7 @@ import org.typroject.tyboot.core.rdbms.service.BaseService;
import org.typroject.tyboot.core.restful.utils.ResponseModel; import org.typroject.tyboot.core.restful.utils.ResponseModel;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.util.Collection; import java.util.*;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.stream.Collectors; import java.util.stream.Collectors;
/** /**
...@@ -199,4 +193,46 @@ public class FireTeamServiceImpl extends BaseService<FireTeamDto, FireTeam, Fire ...@@ -199,4 +193,46 @@ public class FireTeamServiceImpl extends BaseService<FireTeamDto, FireTeam, Fire
} }
update(new UpdateWrapper<FireTeam>().eq("sequence_nbr", parent).set("is_delete", 1)); update(new UpdateWrapper<FireTeam>().eq("sequence_nbr", parent).set("is_delete", 1));
} }
@Override
public List<FireTeamZhDto> getFireTeamList(Integer pageNum, Integer pageSize, RequestData par) {
if (null == pageNum || null == pageSize) {
pageNum = 1;
pageSize = Integer.MAX_VALUE;
}else{
pageNum=(pageNum - 1) * pageSize;
}
List<FireTeamZhDto> list= fireTeamMapper.getFireTeamList( pageNum, pageSize, par);
// 获取消防车辆列表
ResponseModel<List<Map<String,Object>>> result = equipFeignClient.getFireCarListAllcount();
List<Map<String,Object>> result1 = result.getResult();
if(result1!=null&&result1.size()>0){
Map<String, Object> combineResultMap = new HashMap<String, Object>();
result1.stream().forEach(obj ->{
combineResultMap.putAll(obj);
});
list.stream().forEach(obj ->{
if(combineResultMap.containsKey(obj.getSequenceNbr())){
obj.setCarNum(Integer.valueOf(combineResultMap.get(obj.getSequenceNbr()).toString()));
}
});
}
return list;
}
@Override
public Integer getFireTeamListCount(RequestData par) {
return fireTeamMapper.getFireTeamListCount(par);
}
@Override
public FireTeam getFireTeamBySequenceNbr(Long id) {
return this.getById(id);
}
} }
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