Commit ba489051 authored by tangwei's avatar tangwei

Merge branch 'developer' of http://172.16.10.76/moa/amos-boot-biz into developer

parents a6968382 f352f85b
......@@ -50,6 +50,9 @@ public class AlertCalledRo implements Serializable{
@Label(value = "地址")
private String address;
@Label(value = "警情报送id")
private String alertSubmittedId;
/**
* 一般火灾
*/
......
......@@ -15,13 +15,18 @@ public enum AlertBusinessTypeEnum {
/**
* 警情续报,非警情确认,警情结案
*/
警情初报("reportAlert", "297", "警情初报"),
警情续报("reportAlert", "313", "警情续报"),
非警情确认("notAlert", "314", "非警情确认"),
警情结案("endAlert", "315", "警情结案");
一般火灾警情初报("fireReportAlert", "229", "SMS_JCS_0001", "一般火灾警情初报"),
航空器救援警情初报("aircraftReportAlert", "230", "SMS_JCS_0002", "航空器救援警情初报"),
突发事件救援警情初报("emergenciesReportAlert", "235", "SMS_JCS_0003", "突发事件救援警情初报"),
漏油现场安全保障警情初报("oilSpillReportAlert", "237", "SMS_JCS_0004", "漏油现场安全保障警情初报"),
专机保障警情初报("specialReportAlert", "238", "SMS_JCS_0005", "专机保障警情初报"),
警情续报("followReportAlert", "313", "SMS_JCS_0006", "警情续报"),
非警情确认("notAlert", "314", "SMS_JCS_0008", "非警情确认"),
警情结案("endAlert", "315", "SMS_JCS_0009", "警情结案");
private String key;
private String code;
private String sms_code;
private String name;
public String getKey() {
......@@ -47,4 +52,6 @@ public enum AlertBusinessTypeEnum {
public void setName(String name) {
this.name = name;
}
}
......@@ -11,6 +11,7 @@
FROM
cb_fire_team ft
LEFT JOIN cb_firefighters ff ON ff.fire_team_id = ft.sequence_nbr
WHERE ft.is_delete = 0
GROUP BY
ff.fire_team_id
</select>
......
......@@ -27,6 +27,7 @@ import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils;
import org.typroject.tyboot.core.foundation.utils.Bean;
import org.typroject.tyboot.core.rdbms.service.BaseService;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
......@@ -137,23 +138,25 @@ public class PowerTransferServiceImpl extends BaseService<PowerTransferDto, Powe
Long outCarCount = fireCarDtoList.size() - onDutyCarCount;
// 2.查询消防队伍列表
List<FireTeam> fullTimeFireBrigadeList = fireTeamService.list(new QueryWrapper<FireTeam>().eq("type_code",
FireBrigadeTypeEnum.专职消防队.getCode()));
Map<String, List<FireBrigadeResourceDto>> resultMap =
fireCarDtoList.stream().collect(Collectors.groupingBy(FireBrigadeResourceDto::getTeamId));
resultMap.keySet().forEach(brigadeId -> {
FireBrigadeResourceDto fireCarResourceDto = new FireBrigadeResourceDto();
FireTeam fireTeam =
fullTimeFireBrigadeList.stream().filter(team -> brigadeId.equals(team.getSequenceNbr().toString())).findAny().orElse(new FireTeam());
if (ObjectUtils.isNotEmpty(fireTeam.getSequenceNbr())) {
fireCarResourceDto.setId(fireTeam.getSequenceNbr().toString());
fireCarResourceDto.setType(FireBrigadeTypeEnum.专职消防队.getKey());
fireCarResourceDto.setName(fireTeam.getName());
fireCarResourceDto.getChildren().addAll(resultMap.get(brigadeId));
fireCarResourceDto.setOutCount(outCarCount.intValue());
fireCarResourceDto.setOnDutyCount(onDutyCarCount.intValue());
fireBrigadeResourceList.add(fireCarResourceDto);
}
});
FireBrigadeTypeEnum.专职消防队.getCode()).eq("is_delete", 0));
if (!CollectionUtils.isEmpty(fullTimeFireBrigadeList)) {
Map<String, List<FireBrigadeResourceDto>> resultMap =
fireCarDtoList.stream().collect(Collectors.groupingBy(FireBrigadeResourceDto::getTeamId));
resultMap.keySet().forEach(brigadeId -> {
FireBrigadeResourceDto fireCarResourceDto = new FireBrigadeResourceDto();
FireTeam fireTeam =
fullTimeFireBrigadeList.stream().filter(team -> brigadeId.equals(team.getSequenceNbr().toString())).findAny().orElse(new FireTeam());
if (ObjectUtils.isNotEmpty(fireTeam.getSequenceNbr())) {
fireCarResourceDto.setId(fireTeam.getSequenceNbr().toString());
fireCarResourceDto.setType(FireBrigadeTypeEnum.专职消防队.getKey());
fireCarResourceDto.setName(fireTeam.getName());
fireCarResourceDto.getChildren().addAll(resultMap.get(brigadeId));
fireCarResourceDto.setOutCount(outCarCount.intValue());
fireCarResourceDto.setOnDutyCount(onDutyCarCount.intValue());
fireBrigadeResourceList.add(fireCarResourceDto);
}
});
}
// 3.消防队伍-监控大队
List<FireBrigadeResourceDto> monitorFireBrigadeList = fireTeamService.listMonitorFireBrigade();
......@@ -163,7 +166,9 @@ public class PowerTransferServiceImpl extends BaseService<PowerTransferDto, Powe
monitorResourceDto.setType(FireBrigadeTypeEnum.监控大队.getKey());
monitorResourceDto.setChildren(monitorFireBrigadeList);
fireBrigadeResourceList.add(monitorResourceDto);
if (!CollectionUtils.isEmpty(monitorFireBrigadeList)) {
fireBrigadeResourceList.add(monitorResourceDto);
}
return fireBrigadeResourceList;
}
......
......@@ -56,6 +56,10 @@ public class RuleAlertCalledService {
List<AlertFormValue> alertFormValues = alertCalledVo.getAlertFormValue();
for (AlertFormValue alertFormValue : alertFormValues)
{
if (alertFormValue.getFieldCode().equals("alertSubmittedId"))
{
alertCalledRo.setAlertSubmittedId(alertFormValue.getFieldValue());
}
//一般火灾
if (alertFormValue.getFieldCode().equals("fireLocation"))
{
......
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