Commit 12c85eba authored by chenhao's avatar chenhao

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

parents bcde67be f64380e8
......@@ -134,5 +134,7 @@ public interface DutyPersonShiftMapper extends BaseMapper<DutyPersonShift> {
List<Map<String, Object>> getFirstAidForTypeCodeAndCompanyId(long company);
List<Map<String, Object>> queryByCompanyId(Long companyId);
List<Map<String, Object>> queryByCompanyId();
List<Map<String, Object>> queryByCompanyNew(String bizOrgName);
}
......@@ -37,5 +37,5 @@ public interface FirefightersMapper extends BaseMapper<Firefighters> {
List<FirefightersExcelDto> exportToExcel(Boolean isDelete, String name, String postQualification, String fireTeamId,
String state, String areasExpertise, String jobTitle);
List<FirefightersDto> queryById(Long teamId,String[] gw);
List<FirefightersDto> queryById(@Param("gw")String[] gw);
}
......@@ -92,5 +92,5 @@ public interface OrgUsrMapper extends BaseMapper<OrgUsr> {
List<Map<String, Long>> countDeptByCompanyId(@Param("companyIdList") List<String> companyIdList);
List<Map<String,Object>> queryCompanyId(Long id);
List<Map<String,Object>> queryCompanyId(String bizOrgName);
}
......@@ -34,5 +34,7 @@ public interface IDutyPersonService extends IDutyCommonService {
*/
List<DutyPersonDto> findByDutyAreaId(Long dutyAreaId);
List<Map<String, Object>> queryByCompanyId(Long companyId);
List<Map<String, Object>> queryByCompanyId();
List<Map<String, Object>> queryByCompanyNew(String bizOrgName);
}
......@@ -342,25 +342,44 @@ AND cft.type_code = (
</select>
<select id='queryByCompanyId' resultType="map">
SELECT
e.field_code,
e.field_name,
e.field_value
FROM
cb_dynamic_form_instance e,
(SELECT
i.*
FROM
cb_dynamic_form_instance i
,
(SELECT * FROM `cb_duty_person_shift` where to_days(duty_date) = to_days(now())) b
WHERE
i.instance_id = b.instance_id
AND
i.field_code = 'deptId'
AND
i.field_value = #{companyId}) c
WHERE
e. instance_id = c.instance_id
select biz_org_name as bizOrgName,sequence_nbr sequenceNbr,field_value as telephone from (
select orgUsr.biz_org_name,i.field_value,orgUsr.sequence_nbr
from cb_org_usr orgUsr left join cb_dynamic_form_instance i on orgUsr.sequence_nbr =
i.instance_id where i.field_code = 'telephone') as d
where d.sequence_nbr in (
select userId from (
select cb.duty_date,a.deptId,c.userId from cb_duty_person_shift cb
left join (select i.instance_id id1 ,if(i.field_code = 'deptId',
i.field_value, null) as 'deptId' from cb_dynamic_form_instance i
where i.field_code = 'deptId' and i.field_value is not null) a
on cb.instance_id = a.id1
left join (select i.instance_id id3 ,if(i.field_code = 'userId',
i.field_value, null) as 'userId' from cb_dynamic_form_instance i
where i.field_code = 'userId' and i.field_value is not null) c
on cb.instance_id = c.id3
where to_days(cb.duty_date) = to_days(now()) and
a.deptId in ( select sequence_nbr from cb_org_usr cou where biz_org_name = '消防救援保障部' or
biz_org_name = '综合办公室' or biz_org_name = '消防支队' or biz_org_name = '应急指挥科' )) r )
</select>
<select id='queryByCompanyNew' resultType="map">
select biz_org_name as bizOrgName,sequence_nbr sequenceNbr,field_value as telephone from (
select orgUsr.biz_org_name,i.field_value,orgUsr.sequence_nbr
from cb_org_usr orgUsr left join cb_dynamic_form_instance i on orgUsr.sequence_nbr =
i.instance_id where i.field_code = 'telephone') as d
where d.sequence_nbr in (
select userId from (
select cb.duty_date,a.deptId,c.userId from cb_duty_person_shift cb
left join (select i.instance_id id1 ,if(i.field_code = 'deptId',
i.field_value, null) as 'deptId' from cb_dynamic_form_instance i
where i.field_code = 'deptId' and i.field_value is not null) a
on cb.instance_id = a.id1
left join (select i.instance_id id3 ,if(i.field_code = 'userId',
i.field_value, null) as 'userId' from cb_dynamic_form_instance i
where i.field_code = 'userId' and i.field_value is not null) c
on cb.instance_id = c.id3
where to_days(cb.duty_date) = to_days(now()) and
a.deptId in ( select sequence_nbr from cb_org_usr cou where biz_org_name = #{bizOrgName})) r )
</select>
</mapper>
......@@ -174,11 +174,14 @@
<select id="queryById" resultType="com.yeejoin.amos.boot.module.common.api.dto.FirefightersDto">
SELECT
*
firefighters.sequence_nbr sequenceNbr ,
firefighters.name,
mobile_phone as mobilePhone
FROM
cb_firefighters
cb_firefighters firefighters
WHERE
fire_team_id = #{teamId}
fire_team_id in ( select sequence_nbr from cb_fire_team cft where company in (
select sequence_nbr from cb_org_usr cou where biz_org_name = '消防救援部') )
<if test="gw != null">
And job_title_code In
<foreach item="item" collection="gw" index="index" open="(" separator="," close=")">
......
......@@ -687,35 +687,16 @@ LEFT JOIN (
</select>
<select id="queryCompanyId" resultType="map">
SELECT
d.field_code ,
d.field_name ,
d.field_value ,
s.sequence_nbr,
s.biz_org_name,
s.parent_id
FROM
cb_dynamic_form_instance d ,
( SELECT
u.*
FROM
cb_org_usr u,
cb_dynamic_form_instance i
where
u.parent_id = #{id}
AND
u.is_delete = 0
AND
u.biz_org_type = 'PERSON'
AND
i.instance_id = u.sequence_nbr
AND
i.field_code = 'administrativePositionCode'
AND
i.field_value is not NULL ) s
WHERE
d.instance_id = s.sequence_nbr
AND
d.field_code = 'telephone'
select * from (
select cou.biz_org_name bizOrgName,cou.sequence_nbr sequenceNbr ,cou .parent_id parentId,
a.fireManagementPostCode, b.telephone from cb_org_usr cou
left join (select i.instance_id id1 ,if(i.field_code = 'fireManagementPostCode',
i.field_value_label, null) as 'fireManagementPostCode' from cb_dynamic_form_instance i where i.field_code = 'fireManagementPostCode'
and i.field_value_label is not null) a on cou .sequence_nbr = a.id1
left join (select i.instance_id id2,if(i.field_code = 'telephone',
i.field_value, null) as 'telephone' from cb_dynamic_form_instance i where i.field_code = 'telephone'
and i.field_value is not null) b on cou .sequence_nbr = b.id2
) d where d.parentId in (select sequence_nbr from cb_org_usr cou where biz_org_name = #{bizOrgName})
and (d.fireManagementPostCode = '消防安全管理人' or d.fireManagementPostCode = '消防安全责任人')
</select>
</mapper>
......@@ -26,7 +26,7 @@ public class AlertCalledRo implements Serializable{
*
* </pre>
*/
private static final long serialVersionUID = 7091835997817930383L;
private static final long serialVersionUID = 529623529216238088L;
/**
* 通用属性
......@@ -46,6 +46,12 @@ public class AlertCalledRo implements Serializable{
@Label(value = "发送单位")
private String companyName;
@Label(value = "联系人")
private String contactUser;
@Label(value = "联系电话")
private String contactPhone;
@Label(value = "被困人数")
private String trappedNum;
......@@ -57,6 +63,24 @@ public class AlertCalledRo implements Serializable{
@Label(value = "警情报送id")
private String alertSubmittedId;
@Label(value = "事发单位")
private String unitInvolved;
@Label(value = "模板替换内容")
private String replaceContent;
@Label(value = "警情报送类型(0,警情报送,1,警情续报,2,非警情确认,3,警情结案)")
private String alertWay;
@Label(value = "警情续报,非警情确认,警情结案,选择人员ids")
private String ids;
@Label(value = "警情续报自定义内容")
private String feedback;
/**
* 一般火灾
*/
......@@ -74,5 +98,77 @@ public class AlertCalledRo implements Serializable{
/**
* 航空器救援
*/
@Label(value = "航班号")
private String flightNumber;
@Label(value = "飞机型号")
private String aircraftModel;
@Label(value = "落地时间")
private String landingTime;
@Label(value = "灾害事故情况")
private String accidentSituationHkq;
@Label(value = "燃油量")
private String fuelQuantity;
@Label(value = "发展态势")
private String developmentTrend;
@Label(value = "载客量")
private String passengerCapacity;
@Label(value = "航空器故障部位")
private String damageLocation;
@Label(value = "迫降跑道")
private String forcedLandingTrack;
/**
* 突发事件救援
*/
@Label(value = "灾害事故情况")
private String accidentSituation;
/**
* 漏油现场安全保障
*/
@Label(value = "航班号")
private String flightNumberLy;
@Label(value = "机位")
private String seat;
@Label(value = "漏油面积")
private String oilLeakageArea;
/**
* 专机保障
*/
@Label(value = "保障等级")
private String securityLevel;
@Label(value = "机位")
private String seatBz;
/**
* 120急救
*/
@Label(value = "患者现状")
private String patientStatus;
@Label(value = "性别")
private String gender;
@Label(value = "年龄段")
private String ageGroup;
//
// /**
// * 其他
// */
// @Label(value = "灾害事故情况")
// private String accidentSituation;
}
......@@ -24,6 +24,7 @@ public enum AlertStageEnums {
LYXC("237", "漏油现场安全保障"),
ZJBZ("238", "转机保障"),
QTJQ("242", "其他"),
JJJQ("1214", "120急救"),
RG("226", "人工上报"),
DJ("228", "对讲呼入"),
......
......@@ -43,6 +43,9 @@ public interface IAlertCalledService {
Object selectAlertCalledByIdNoRedis(Long id);
Object selectAlertCalledByIdNoRedisNew(Long id);
Map<String,Object> selectAlertCalledKeyValueLabelById( Long id);
......
......@@ -191,18 +191,18 @@ public class DutyPersonController extends BaseController {
return ResponseHelper.buildResponse(iDutyPersonService.findByDutyAreaId(dutyAreaId));
}
/**
*
*
* @return ResponseModel
*/
@TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
@GetMapping(value = "/companyId/{companyId}")
@ApiOperation(httpMethod = "GET", value = "查询当日值班人员", notes = "查询当日值班人员")
public ResponseModel<List<Map<String, Object>>> queryByCompanyId(
@PathVariable Long companyId) throws Exception {
return ResponseHelper.buildResponse(iDutyPersonService.queryByCompanyId(companyId));
}
// /**
// *
// *
// * @return ResponseModel
// */
// @TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
// @GetMapping(value = "/companyId/{companyId}")
// @ApiOperation(httpMethod = "GET", value = "查询当日值班人员", notes = "查询当日值班人员")
// public ResponseModel<List<Map<String, Object>>> queryByCompanyId(
// @PathVariable Long companyId) throws Exception {
// return ResponseHelper.buildResponse(iDutyPersonService.queryByCompanyId(companyId));
// }
}
......@@ -268,17 +268,17 @@ public class OrgPersonController {
}
}
/**
* 机场单位下 各单位下人员岗位不为空的人员
*
* @param id
* @return
*/
@TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY)
@RequestMapping(value = "/companyId/{id}", method = RequestMethod.GET)
@ApiOperation(httpMethod = "GET", value = "获取人员岗位不为空的人员详情", notes = "获取人员岗位不为空的人员详情")
public ResponseModel<Object> queryCompanyId(HttpServletRequest request,
@PathVariable Long id) throws Exception {
return ResponseHelper.buildResponse(iOrgUsrService.queryCompanyId(id));
}
// /**
// * 机场单位下 各单位下人员岗位不为空的人员
// *
// * @param id
// * @return
// */
// @TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY)
// @RequestMapping(value = "/companyId/{id}", method = RequestMethod.GET)
// @ApiOperation(httpMethod = "GET", value = "获取人员岗位不为空的人员详情", notes = "获取人员岗位不为空的人员详情")
// public ResponseModel<Object> queryCompanyId(HttpServletRequest request,
// @PathVariable Long id) throws Exception {
// return ResponseHelper.buildResponse(iOrgUsrService.queryCompanyId(id));
// }
}
......@@ -303,17 +303,14 @@ public Object BuildScheduleDetails(String dutyDay, Long shiftId, String postType
}
@Override
public List<Map<String, Object>> queryByCompanyId(){
return dutyPersonShiftMapper.queryByCompanyId();
}
public List<Map<String, Object>> queryByCompanyId(Long companyId){
return dutyPersonShiftMapper.queryByCompanyId(companyId);
@Override
public List<Map<String, Object>> queryByCompanyNew(String bizOrgName){
return dutyPersonShiftMapper.queryByCompanyNew(bizOrgName);
}
......
......@@ -133,9 +133,10 @@ public class FirefightersServiceImpl extends BaseService<FirefightersDto, Firefi
return firefightersMapper.getFirefightersName();
}
public List<FirefightersDto> queryById(Long teamId,String[] gw){
public List<FirefightersDto> queryById(String[] gw){
return firefightersMapper.queryById(teamId,gw);
return firefightersMapper.queryById(gw);
}
/**
* 获取指定岗位名称下的队伍人员电话号码信息
......
......@@ -1860,9 +1860,9 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
return resultMap;
}
public List<Map<String,Object>> queryCompanyId(Long id) {
public List<Map<String,Object>> queryCompanyId(String bizOrgName) {
return orgUsrMapper.queryCompanyId(id);
return orgUsrMapper.queryCompanyId(bizOrgName);
}
}
......@@ -333,21 +333,7 @@ public class FirefightersController extends BaseController {
return ResponseHelper.buildResponse(menus);
}
/**
*查询
*
* @param
* @return
* @throws Exception
*/
@TycloudOperation(needAuth = true, ApiLevel = UserType.AGENCY)
@RequestMapping(value = "/gw/{id}", method = RequestMethod.GET)
@ApiOperation(httpMethod = "GET", value = "根据id查询", notes = "根据id查询")
public ResponseModel<Object> queryById( @PathVariable Long teamId) throws Exception {
//规则提供岗位名称
String[] gw =new String[]{"1202","1203","1204","1205","1206","1207","1209","1208","1210","1211"};
return ResponseHelper.buildResponse(iFirefightersService.queryById(teamId,gw));
}
......
......@@ -2,6 +2,8 @@ package com.yeejoin.amos.boot.module.jcs.biz.rule.action;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
import org.slf4j.Logger;
......@@ -64,14 +66,13 @@ public class AlertCalledAction {
*
* @param smsCode 短信模板code
* @param sendType 发送类型
* @param sendIds 人员id
* @param object 模板内容对象
* @throws Exception 异常
*/
@RuleMethod(methodLabel = "短信报送", project = "西咸机场119接处警规则")
public void sendcmd(String smsCode, String sendType, String sendIds, Object object) throws Exception {
public void sendcmd(String smsCode, String sendType, List<Map<String,Object>> submittedList, Object object) throws Exception {
alertSubmittedService.ruleCallbackAction(smsCode, sendIds, object);
alertSubmittedService.ruleCallbackAction(smsCode, submittedList, object);
}
......
......@@ -9,6 +9,7 @@ import java.util.Set;
import java.util.function.Function;
import java.util.stream.Collectors;
import com.yeejoin.amos.boot.module.jcs.api.enums.AlertBusinessTypeEnum;
import org.apache.commons.lang3.StringUtils;
import org.joda.time.DateTime;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -269,6 +270,25 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto, AlertCal
}
/**
* 根据灾情id 查询灾情详情
**/
@Override
public Object selectAlertCalledByIdNoRedisNew(Long id) {
// 警情基本信息
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>();
//
AlertCalledObjsDto alertCalledFormVo = new AlertCalledObjsDto();
alertCalledFormVo.setAlertCalled(alertCalled);
alertCalledFormVo.setAlertFormValue(list);
return alertCalledFormVo;
}
/**
* <pre>
* 保存警情信息
* </pre>
......@@ -348,8 +368,8 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto, AlertCal
alertCalledObjsDto.setAlertCalled(alertCalled);
alertCalledObjsDto.setAlertFormValue(alertFormValuelist);
// 警情报送
// 调用规则
ruleAlertCalledService.fireAlertCalledRule(alertCalledObjsDto);
// 调用规则 警情初报
ruleAlertCalledService.fireAlertCalledRule(alertCalledObjsDto, AlertBusinessTypeEnum.警情初报.getCode(), null);
// 通知实战指挥页面发送mqtt 默认发送 String 类型 0, 新警情 1 警情状态变化
emqKeeper.getMqttClient().publish(topic, "0".getBytes(), RuleConfig.DEFAULT_QOS, true);
/**
......
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