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>
......
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.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.google.common.collect.Lists; import com.google.common.collect.Lists;
import com.yeejoin.amos.boot.biz.common.utils.EnumsUtils; import com.yeejoin.amos.boot.biz.common.utils.EnumsUtils;
import com.yeejoin.amos.boot.module.jcs.api.dto.AlertSubmittedDto; import com.yeejoin.amos.boot.module.jcs.api.dto.AlertSubmittedDto;
import com.yeejoin.amos.boot.module.jcs.api.dto.TemplateExtendDto; import com.yeejoin.amos.boot.module.jcs.api.dto.TemplateExtendDto;
import com.yeejoin.amos.boot.module.jcs.api.entity.AlertCalled; import com.yeejoin.amos.boot.module.jcs.api.entity.*;
import com.yeejoin.amos.boot.module.jcs.api.entity.AlertSubmitted;
import com.yeejoin.amos.boot.module.jcs.api.entity.AlertSubmittedObject;
import com.yeejoin.amos.boot.module.jcs.api.entity.DataDictionary;
import com.yeejoin.amos.boot.module.jcs.api.entity.Template;
import com.yeejoin.amos.boot.module.jcs.api.enums.AlertBusinessTypeEnum; import com.yeejoin.amos.boot.module.jcs.api.enums.AlertBusinessTypeEnum;
import com.yeejoin.amos.boot.module.jcs.api.enums.AlertSchedulingTypeEnum; import com.yeejoin.amos.boot.module.jcs.api.enums.AlertSchedulingTypeEnum;
import com.yeejoin.amos.boot.module.jcs.api.enums.AlertSubmitTypeEnum; import com.yeejoin.amos.boot.module.jcs.api.enums.AlertSubmitTypeEnum;
...@@ -25,6 +22,7 @@ import com.yeejoin.amos.boot.module.jcs.api.vo.FormValue; ...@@ -25,6 +22,7 @@ import com.yeejoin.amos.boot.module.jcs.api.vo.FormValue;
import com.yeejoin.amos.boot.module.jcs.api.vo.PowerTransferCompanyVo; import com.yeejoin.amos.boot.module.jcs.api.vo.PowerTransferCompanyVo;
import com.yeejoin.amos.boot.module.jcs.api.vo.SchedulingReportingVo; import com.yeejoin.amos.boot.module.jcs.api.vo.SchedulingReportingVo;
import com.yeejoin.amos.boot.module.jcs.api.vo.TemplateVo; import com.yeejoin.amos.boot.module.jcs.api.vo.TemplateVo;
import com.yeejoin.amos.boot.module.jcs.biz.rule.action.AlertCalledAction;
import org.apache.commons.lang3.ObjectUtils; import org.apache.commons.lang3.ObjectUtils;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -32,22 +30,17 @@ import org.springframework.stereotype.Service; ...@@ -32,22 +30,17 @@ import org.springframework.stereotype.Service;
import org.typroject.tyboot.core.rdbms.service.BaseService; import org.typroject.tyboot.core.rdbms.service.BaseService;
import java.lang.reflect.Field; import java.lang.reflect.Field;
import java.util.ArrayList; import java.util.*;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.stream.Collectors; import java.util.stream.Collectors;
/** /**
* 警情报送记录 服务实现类 * 警情报送记录 服务实现类
* *
* @author tb * @author tb
* @date 2021-06-17 * @date 2021-06-17
*/ */
@Service @Service
public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto,AlertSubmitted,AlertSubmittedMapper> implements IAlertSubmittedService { public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, AlertSubmitted, AlertSubmittedMapper> implements IAlertSubmittedService {
@Autowired @Autowired
IAlertSubmittedObjectService iAlertSubmittedObjectService; IAlertSubmittedObjectService iAlertSubmittedObjectService;
...@@ -63,6 +56,10 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto,Ale ...@@ -63,6 +56,10 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto,Ale
PowerTransferServiceImpl powerTransferService; PowerTransferServiceImpl powerTransferService;
@Autowired @Autowired
RuleAlertCalledService ruleAlertCalledService; RuleAlertCalledService ruleAlertCalledService;
@Autowired
AlertCalledAction alertCalledAction;
@Autowired
OrgUsrServiceImpl orgUsrService;
@Override @Override
public SchedulingReportingVo listSchedulingByParam(AlertSubmittedDto queryParam) { public SchedulingReportingVo listSchedulingByParam(AlertSubmittedDto queryParam) {
...@@ -110,61 +107,85 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto,Ale ...@@ -110,61 +107,85 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto,Ale
@Override @Override
public Boolean save(AlertSubmittedDto alertSubmittedDto, String userName) throws Exception { public Boolean save(AlertSubmittedDto alertSubmittedDto, String userName) throws Exception {
saveAlertSubmitted(alertSubmittedDto, userName); Long alertSubmittedId = saveAlertSubmitted(alertSubmittedDto, userName);
// 组装规则入参
AlertCalledVo alertCalledVo = new AlertCalledVo();
List<AlertFormValue> alertFormValue = new ArrayList<>();
AlertFormValue formValue = new AlertFormValue();
formValue.setFieldCode("alertSubmittedId");
formValue.setFieldValue(alertSubmittedId.toString());
alertFormValue.add(formValue);
alertCalledVo.setAlertFormValue(alertFormValue);
// TODO 调用规则 // TODO 调用规则
ruleAlertCalledService.fireAlertCalledRule(new AlertCalledVo(null,null)); ruleAlertCalledService.fireAlertCalledRule(alertCalledVo);
return true; return true;
} }
/** /**
* 规则回调 * 规则回调
*/ */
public void ruleCallbackAction(Object obj) { public void ruleCallbackAction(String smsCode,String sendIds, Object object) {
AlertSubmittedDto alertSubmittedDto = new AlertSubmittedDto(); // 获取报送对象列表
alertSubmittedDto.setSubmissionMethodCode(SubmissionMethodEnum.SMS.getCode()); List<AlertSubmittedObject> alertSubmittedObjectList = new ArrayList<>();
alertSubmittedDto.setSchedulingTypeCode(AlertSchedulingTypeEnum.融合调度.getCode()); Set<String> mobiles = new HashSet<>();
// alertSubmittedDto.setBusinessTypeCode(AlertBusinessTypeEnum.警情初报.); // 根据id列表查询所有人员信息
saveAlertSubmitted(alertSubmittedDto, ""); ArrayList<String> list = new ArrayList<>(Arrays.asList(sendIds.split(",")));
Collection<OrgUsr> orgUsrs = orgUsrService.listByIds(list);
// 执行短信报送对象
saveAlertSubmittedObject(alertSubmittedObjectList, smsCode, mobiles, object);
} }
/** /**
* 短信报送 * 短信报送
* *
* @param alertSubmittedDto 警情信息 * @param alertSubmittedDto 警情信息
* @param userName 用户名 * @param userName 用户名
*/ */
public void saveAlertSubmitted(AlertSubmittedDto alertSubmittedDto, String userName) { public Long saveAlertSubmitted(AlertSubmittedDto alertSubmittedDto, String userName) {
// 1.保存警情记录主表 Long alertSubmittedId = alertSubmittedDto.getSequenceNbr();
AlertSubmitted alertSubmitted = new AlertSubmitted(); String smsCode = "";
alertSubmitted.setAlertCalledId(alertSubmittedDto.getAlertCalledId()); Set<String> mobiles = new HashSet<>();
alertSubmitted.setBusinessTypeCode(alertSubmittedDto.getBusinessTypeCode()); HashMap<String, String> smsParams;
Optional<AlertBusinessTypeEnum> businessTypeEnum = EnumsUtils.getEnumObject(AlertBusinessTypeEnum.class, if (alertSubmittedId == null) {
e -> e.getCode().equals(alertSubmittedDto.getBusinessTypeCode()));
alertSubmitted.setBusinessType(businessTypeEnum.get().getName()); // 1.保存警情记录主表
alertSubmitted.setCallLogId(alertSubmittedDto.getCallLogId()); AlertSubmitted alertSubmitted = new AlertSubmitted();
alertSubmitted.setSubmissionMethodCode(alertSubmittedDto.getSubmissionMethodCode()); alertSubmitted.setAlertCalledId(alertSubmittedDto.getAlertCalledId());
Optional<SubmissionMethodEnum> submissionMethodEnum = EnumsUtils.getEnumObject(SubmissionMethodEnum.class, alertSubmitted.setBusinessTypeCode(alertSubmittedDto.getBusinessTypeCode());
e -> e.getCode().equals(alertSubmittedDto.getSubmissionMethodCode())); Optional<AlertBusinessTypeEnum> businessTypeEnum = EnumsUtils.getEnumObject(AlertBusinessTypeEnum.class,
alertSubmitted.setSubmissionMethod(submissionMethodEnum.get().getName()); e -> e.getCode().equals(alertSubmittedDto.getBusinessTypeCode()));
Optional<AlertSchedulingTypeEnum> alertSchedulingTypeEnum = EnumsUtils.getEnumObject(AlertSchedulingTypeEnum.class, alertSubmitted.setBusinessType(businessTypeEnum.get().getName());
e -> e.getCode().equals(alertSubmittedDto.getSchedulingTypeCode())); alertSubmitted.setCallLogId(alertSubmittedDto.getCallLogId());
alertSubmitted.setSchedulingTypeCode(alertSubmittedDto.getSchedulingTypeCode()); alertSubmitted.setSubmissionMethodCode(alertSubmittedDto.getSubmissionMethodCode());
alertSubmitted.setSchedulingType(alertSchedulingTypeEnum.get().getName()); Optional<SubmissionMethodEnum> submissionMethodEnum = EnumsUtils.getEnumObject(SubmissionMethodEnum.class,
alertSubmitted.setSubmissionContent(alertSubmittedDto.getSubmitContent().toJSONString()); e -> e.getCode().equals(alertSubmittedDto.getSubmissionMethodCode()));
alertSubmitted.setSender(userName); alertSubmitted.setSubmissionMethod(submissionMethodEnum.get().getName());
alertSubmitted.setRecUserName(userName); Optional<AlertSchedulingTypeEnum> alertSchedulingTypeEnum =
alertSubmitted.setUpdateTime(new Date()); EnumsUtils.getEnumObject(AlertSchedulingTypeEnum.class,
alertSubmitted.setSubmissionTime(new Date()); e -> e.getCode().equals(alertSubmittedDto.getSchedulingTypeCode()));
alertSubmitted.setSchedulingTypeCode(alertSubmittedDto.getSchedulingTypeCode());
alertSubmitted.setSchedulingType(alertSchedulingTypeEnum.get().getName());
alertSubmitted.setSubmissionContent(alertSubmittedDto.getSubmitContent().toJSONString());
alertSubmitted.setSender(userName);
alertSubmitted.setRecUserName(userName);
alertSubmitted.setUpdateTime(new Date());
alertSubmitted.setSubmissionTime(new Date());
this.baseMapper.insert(alertSubmitted); this.baseMapper.insert(alertSubmitted);
alertSubmittedId = alertSubmitted.getSequenceNbr();
smsCode = businessTypeEnum.get().getSms_code();
}
// 2.保存任务表 // 2.保存任务表
List<AlertSubmittedObject> alertSubmittedObjectList = Lists.newArrayList(); List<AlertSubmittedObject> alertSubmittedObjectList = Lists.newArrayList();
Long finalAlertSubmittedId = alertSubmittedId;
// 报送给单位 // 报送给单位
if (AlertSubmitTypeEnum.Org.getKey().equals(alertSubmittedDto.getType())) { if (AlertSubmitTypeEnum.Org.getKey().equals(alertSubmittedDto.getType())) {
alertSubmittedDto.getSubmitCompanyList().forEach(company -> { alertSubmittedDto.getSubmitCompanyList().forEach(company -> {
AlertSubmittedObject alertSubmittedObject = new AlertSubmittedObject(); AlertSubmittedObject alertSubmittedObject = new AlertSubmittedObject();
alertSubmittedObject.setAlertSubmittedId(alertSubmitted.getSequenceNbr()); alertSubmittedObject.setAlertSubmittedId(finalAlertSubmittedId);
alertSubmittedObject.setType(true); alertSubmittedObject.setType(true);
alertSubmittedObject.setCompanyId(company.getCompanyId()); alertSubmittedObject.setCompanyId(company.getCompanyId());
alertSubmittedObject.setCompanyName(company.getCompanyName()); alertSubmittedObject.setCompanyName(company.getCompanyName());
...@@ -177,7 +198,7 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto,Ale ...@@ -177,7 +198,7 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto,Ale
alertSubmittedDto.getSubmitCompanyList().forEach(company -> { alertSubmittedDto.getSubmitCompanyList().forEach(company -> {
company.getPersonList().forEach(person -> { company.getPersonList().forEach(person -> {
AlertSubmittedObject alertSubmittedObject = new AlertSubmittedObject(); AlertSubmittedObject alertSubmittedObject = new AlertSubmittedObject();
alertSubmittedObject.setAlertSubmittedId(alertSubmitted.getSequenceNbr()); alertSubmittedObject.setAlertSubmittedId(finalAlertSubmittedId);
alertSubmittedObject.setType(false); alertSubmittedObject.setType(false);
alertSubmittedObject.setCompanyId(company.getCompanyId()); alertSubmittedObject.setCompanyId(company.getCompanyId());
alertSubmittedObject.setCompanyName(company.getCompanyName()); alertSubmittedObject.setCompanyName(company.getCompanyName());
...@@ -185,7 +206,7 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto,Ale ...@@ -185,7 +206,7 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto,Ale
alertSubmittedObject.setUserName(person.getPersonName()); alertSubmittedObject.setUserName(person.getPersonName());
alertSubmittedObject.setUserPhone(person.getPersonPhone()); alertSubmittedObject.setUserPhone(person.getPersonPhone());
alertSubmittedObject.setRecUserName(userName); alertSubmittedObject.setRecUserName(userName);
mobiles.add(person.getPersonPhone());
alertSubmittedObjectList.add(alertSubmittedObject); alertSubmittedObjectList.add(alertSubmittedObject);
}); });
}); });
...@@ -198,7 +219,30 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto,Ale ...@@ -198,7 +219,30 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto,Ale
// 4.发送任务消息 // 4.发送任务消息
// 4.1组织短信内容 // 4.1组织短信内容
smsParams = JSON.parseObject(JSON.toJSONString(alertSubmittedDto.getSubmitContent()), HashMap.class);
// 4.2调用短信发送接口 // 4.2调用短信发送接口
alertCalledAction.sendAlertCalleCmd(smsCode, mobiles, smsParams);
return finalAlertSubmittedId;
}
/**
* 短信报送对象
*
* @param alertSubmittedObjectList 报送对象列表
* @param smsCode 短信模板code
* @param mobiles 电话号码列表
* @param object 报送内容
*/
public void saveAlertSubmittedObject(List<AlertSubmittedObject> alertSubmittedObjectList, String smsCode,
Set<String> mobiles, Object object) {
alertSubmittedObjectServiceImpl.saveBatch(alertSubmittedObjectList);
// 发送任务消息
// 组织短信内容
HashMap<String, String> smsParams = new HashMap<String, String>();
Map<String, String> objectMap = JSON.parseObject(JSON.toJSONString(object), HashMap.class);
smsParams.putAll(objectMap);
// 调用短信发送接口
alertCalledAction.sendAlertCalleCmd(smsCode, mobiles, smsParams);
} }
public void getAlertSubmittedContent(Long alertCalledId, ArrayList<TemplateVo> templateVos, String companyName) throws IllegalAccessException { public void getAlertSubmittedContent(Long alertCalledId, ArrayList<TemplateVo> templateVos, String companyName) throws IllegalAccessException {
...@@ -216,7 +260,7 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto,Ale ...@@ -216,7 +260,7 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto,Ale
List<PowerTransferCompanyVo> lastPowerTransferCompany; List<PowerTransferCompanyVo> lastPowerTransferCompany;
if ("警情续报".equals(template.getType()) && (lastPowerTransferCompany = if ("警情续报".equals(template.getType()) && (lastPowerTransferCompany =
powerTransferService.getLastPowerTransferCompany(alertCalledId)).size() > 0) { powerTransferService.getLastPowerTransferCompany(alertCalledId)).size() > 0) {
map.put("businessType",template.getType()); map.put("businessType", template.getType());
// 获取力量调派内容 // 获取力量调派内容
StringBuilder companyNames = new StringBuilder(); StringBuilder companyNames = new StringBuilder();
StringBuilder resourcesInfo = new StringBuilder(); StringBuilder resourcesInfo = new StringBuilder();
...@@ -226,6 +270,7 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto,Ale ...@@ -226,6 +270,7 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto,Ale
} }
map.put("companyNames", companyNames.deleteCharAt(companyNames.length() - 1).toString()); map.put("companyNames", companyNames.deleteCharAt(companyNames.length() - 1).toString());
map.put("resourcesInfo", resourcesInfo.deleteCharAt(resourcesInfo.length() - 1).toString()); map.put("resourcesInfo", resourcesInfo.deleteCharAt(resourcesInfo.length() - 1).toString());
map.put("transferTime",lastPowerTransferCompany.get(0).getRecDate());
} }
TemplateVo templateVo = new TemplateVo(); TemplateVo templateVo = new TemplateVo();
BeanUtils.copyProperties(template, templateVo); BeanUtils.copyProperties(template, templateVo);
......
...@@ -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