Commit 1a792e42 authored by tangwei's avatar tangwei

增加120接口

parent 533f416d
......@@ -30,6 +30,7 @@ public interface AlertCalledMapper extends BaseMapper<AlertCalled> {
Map<String, Integer> queryAlertStatusCount(@Param("beginDate") String beginDate, @Param("endDate") String endDate);
List<AlertCalledZhDto> alertCalledListByAlertStatus(@Param("pageNum")Integer pageNum, @Param("pageSize")Integer pageSize,@Param("par")RequestData par);
List<AlertCalledZhDto> alertCalledListByAlertStatus120(@Param("pageNum")Integer pageNum, @Param("pageSize")Integer pageSize,@Param("par")RequestData par);
int alertCalledListByAlertStatusCount(@Param("par")RequestData par);
......
......@@ -31,6 +31,7 @@ public interface IAlertCalledService {
* **/
List<AlertCalledZhDto> alertCalledListByAlertStatus(Integer pageNum, Integer pageSize,RequestData par);
List<AlertCalledZhDto> alertCalledListByAlertStatus120(Integer pageNum, Integer pageSize,RequestData par);
List<AlertCalledZhDto> alertCalledListByAlertStatusByAid(Integer pageNum, Integer pageSize, RequestData par);
......
......@@ -82,6 +82,71 @@
</if>
</select>
<!-- //判断是否航空器救援 如果为航空器救援则保存冗余字段 response_level_code bug2542 bykongfm -->
<select id="alertCalledListByAlertStatus120" resultType="com.yeejoin.amos.boot.module.jcs.api.dto.AlertCalledZhDto">
SELECT
a.sequence_nbr sequenceNbr,
a.alert_stage alertStage,
a.call_time callTime,
a.update_time updateTime,
a.rescue_grid rescueGrid,
CONCAT(a.alert_type,' ',IFNULL(a.remark,"")) alertType,
a.alert_type_code alarmTypeCode,
a.unit_involved unitInvolved,
a.trapped_num trappedNum,
a.casualties_num casualtiesNum,
a.address ,
a.coordinate_x longitude,
a.coordinate_y latitude,
a.record_url,
a.alert_status,
CASE a.response_level_code
WHEN '1164' THEN '紧急出动'
WHEN '1165' THEN '集结待命'
WHEN '1166' THEN '原地待命'
ELSE '' END responseLevelCode
FROM jc_alert_called a
where a.is_delete=0 and a.alert_type_code = 1214
<!--AND a.coordinate_x IS NOT NULL
AND a.coordinate_y IS NOT NULL-->
<if test='par.status==0'>
and a.alert_status =0
</if>
<if test='par.status==1'>
and a.alert_status =1
</if>
<if test='par.address!=null and par.address!="" '>
and a.address like CONCAT('%',#{par.address},'%') || a.alert_type like CONCAT('%',#{par.address},'%')
</if>
<if test='par.alertTypeCode!=null and par.alertTypeCode!="" '>
and a.alert_type_code = #{par.alertTypeCode}
</if>
<if test='par.alertId!=null'>
and a.sequence_nbr =#{par.alertId}
</if>
<if test='par.whether24!=false'>
and a.call_time &gt;= (NOW() - interval 24 hour)
</if>
<if test='par.orderTime=="1"'>
ORDER BY a.call_time DESC
</if>
<if test='par.orderTime=="2"'>
ORDER BY a.call_time
</if>
<if test='par.orderTime==null'>
ORDER BY a.call_time DESC
</if>
<if test='pageNum!=null and pageSize !=null'>
limit #{pageNum},#{pageSize}
</if>
</select>
<select id="alertCalledListByAlertStatusByAid" resultType="com.yeejoin.amos.boot.module.jcs.api.dto.AlertCalledZhDto">
SELECT
a.sequence_nbr sequenceNbr,
......
......@@ -273,7 +273,7 @@ public class CommandController extends BaseController {
* @return
*/
@TycloudOperation(needAuth = true, ApiLevel = UserType.AGENCY)
@GetMapping(value = "history/listByAid")
@GetMapping(value = "history/listBy120")
@ApiOperation(httpMethod = "GET", value = "警情列表查询", notes = "警情列表查询")
public ResponseModel<Page<AlertCalledZhDto>> listhistoryPageByAid(Integer pageNum, Integer pageSize, RequestData par) {
......@@ -638,6 +638,33 @@ public class CommandController extends BaseController {
}
@TycloudOperation(needAuth = true, ApiLevel = UserType.AGENCY)
@RequestMapping(value = "/seismometeorology120", method = RequestMethod.GET)
@ApiOperation(httpMethod = "GET", value = "跑马灯", notes = "跑马灯")
public ResponseModel<Object> seismometeorology120() throws Exception {
RequestData requestData = new RequestData();
requestData.setWhether24(true);
List<AlertCalledZhDto> list = iAlertCalledService.alertCalledListByAlertStatus120(null, null, requestData);
// List<SeismometeorologyDto> li = seismometeorologyDtoDao.findCarStateByWatchSn();
List<SeismometeorologyDto> li =new ArrayList<>();
//数据组装
for (AlertCalledZhDto alertCalledZhDto : list) {
StringBuffer st = new StringBuffer();
String time = DateUtil.formatDate(alertCalledZhDto.getCallTime(), "yyyy-MM-dd HH:mm:ss");
st.append("【").append(alertCalledZhDto.getAlertType()).append("】").append(" ").append(time).append(" ").append(alertCalledZhDto.getAddress()!=null?alertCalledZhDto.getAddress():"");
SeismometeorologyDto sto = new SeismometeorologyDto(alertCalledZhDto.getSequenceNbr(), "1", "警情通知", null, alertCalledZhDto.getCallTime(), null, st.toString());
li.add(sto);
}
return ResponseHelper.buildResponse(li);
}
// /**
// * 水源列表分页查询
// *
......
......@@ -187,6 +187,13 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto, AlertCal
return list;
}
@Override
public List<AlertCalledZhDto> alertCalledListByAlertStatus120(Integer pageNum, Integer pageSize, RequestData par) {
List<AlertCalledZhDto> list = alertCalledMapper.alertCalledListByAlertStatus120(pageNum, pageSize, par);
return list;
}
@Override
public int alertCalledListByAlertStatusCount(RequestData par) {
......
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