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