Commit 5b6131e3 authored by 李成龙's avatar 李成龙

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

# Conflicts: # amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/controller/AlertCalledController.java
parents feaa75f8 709713e5
...@@ -5,6 +5,8 @@ import lombok.Data; ...@@ -5,6 +5,8 @@ import lombok.Data;
import java.io.Serializable; import java.io.Serializable;
import java.util.Date; import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableField;
/** /**
* 基础DTO * 基础DTO
* @author kinky * @author kinky
...@@ -24,4 +26,10 @@ public class BaseDto implements Serializable{ ...@@ -24,4 +26,10 @@ public class BaseDto implements Serializable{
protected Date recDate; protected Date recDate;
@ApiModelProperty(value = "更新人") @ApiModelProperty(value = "更新人")
protected String recUserId; protected String recUserId;
/**
* 是否删除
*/
@TableField(value = "is_delete")
private Boolean isDelete;
} }
...@@ -19,11 +19,11 @@ public class RedisKey { ...@@ -19,11 +19,11 @@ public class RedisKey {
//根据消防人员id查询岗位学历信息工作经历 //根据消防人员id查询岗位学历信息工作经历
public static final String EDUCATION_POST_EXPERIENCE_FIREFIGHTERS_ID="education_post_experience_firefighters_id_"; public static final String EDUCATION_POST_EXPERIENCE_FIREFIGHTERS_ID="education_post_experience_firefighters_id_";
//根据合同信id 查询合同信息 //根据合同信id 查询合同信息
public static final String CONTRACT_ID="contract_id"; public static final String CONTRACT_ID="contract_id_";
//根据思想状况信息id 查询思想信息 //根据思想状况信息id 查询思想信息
public static final String THOUGHT_ID="thought_id"; public static final String THOUGHT_ID="thought_id_";
//根据警情id查询警情详情记录 //根据警情id查询警情详情记录
public static final String ALERTCALLED_ID="alertcalled_id"; public static final String ALERTCALLED_ID="alertcalled_id_";
/** 驼峰转下划线(简单写法,效率低于{@link #humpToLine2(String)}) */ /** 驼峰转下划线(简单写法,效率低于{@link #humpToLine2(String)}) */
public static String humpToLine(String str) { public static String humpToLine(String str) {
......
...@@ -25,6 +25,12 @@ spring.data.elasticsearch.cluster-name=elasticsearch ...@@ -25,6 +25,12 @@ spring.data.elasticsearch.cluster-name=elasticsearch
spring.data.elasticsearch.cluster-nodes=172.16.3.3:9300 spring.data.elasticsearch.cluster-nodes=172.16.3.3:9300
spring.elasticsearch.rest.uris=http://172.16.3.3:9200 spring.elasticsearch.rest.uris=http://172.16.3.3:9200
## emqx
emqx.clean-session=true
emqx.client-id=${spring.application.name}-${random.int[1024,65536]}
emqx.broker=tcp://172.16.10.85:1883
emqx.user-name=super
emqx.password=a123456
security.systemctl.name=AMOS-API-SYSTEMCTL security.systemctl.name=AMOS-API-SYSTEMCTL
......
package com.yeejoin.amos.boot.module.jcs.api.dto;
import java.io.Serializable;
import com.yeejoin.amos.component.rule.Label;
import com.yeejoin.amos.component.rule.RuleFact;
import lombok.Data;
/**
*
* <pre>
* 警情报送规则触发对象
* </pre>
*
* @author gwb
* @version $Id: AlertCalledRo.java, v 0.1 2021年6月24日 下午3:31:14 gwb Exp $
*/
@Data
@RuleFact(value = "警情信息",project = "西咸机场119接处警规则")
public class AlertCalledRo implements Serializable{
/**
* <pre>
*
* </pre>
*/
private static final long serialVersionUID = -8105736102662461646L;
@Label("警情id")
private Long sequenceNbr;
@Label(value = "警情类型")
private String alertType;
@Label(value = "警情类型code")
private String alertTypeCode;
}
...@@ -33,4 +33,13 @@ public class AlertFromDto extends BaseDto{ ...@@ -33,4 +33,13 @@ public class AlertFromDto extends BaseDto{
@ApiModelProperty(value = "操作人名称") @ApiModelProperty(value = "操作人名称")
private String recUserName; private String recUserName;
@ApiModelProperty(value = "是否一行显示")
private Boolean isBlock;
//新加排序字段
@ApiModelProperty(value = "排序字段")
private int sortNum;
public Boolean getIsBlock() {
return this.isBlock;
}
} }
...@@ -53,6 +53,7 @@ public class AlertSubmittedDto extends BaseDto{ ...@@ -53,6 +53,7 @@ public class AlertSubmittedDto extends BaseDto{
/** /**
* 报送内容 * 报送内容
*/ */
@ApiModelProperty(value = "报送内容")
private JSONObject submitContent; private JSONObject submitContent;
/** /**
......
...@@ -4,8 +4,18 @@ import com.yeejoin.amos.boot.module.jcs.api.vo.AlertCalledVo; ...@@ -4,8 +4,18 @@ import com.yeejoin.amos.boot.module.jcs.api.vo.AlertCalledVo;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode;
/**
*
* <pre>
* 警情信息ES请求参数对象
* </pre>
*
* @author gwb
* @version $Id: ESAlertCalledRequestDto.java, v 0.1 2021年6月24日 下午3:30:40 gwb Exp $
*/
@Data @Data
@EqualsAndHashCode(callSuper = true)
public class ESAlertCalledRequestDto extends AlertCalledVo public class ESAlertCalledRequestDto extends AlertCalledVo
{ {
@ApiModelProperty(value = "警情状态") @ApiModelProperty(value = "警情状态")
......
package com.yeejoin.amos.boot.module.jcs.api.dto; package com.yeejoin.amos.boot.module.jcs.api.dto;
import com.google.common.collect.Lists;
import com.yeejoin.amos.boot.biz.common.dto.BaseDto; import com.yeejoin.amos.boot.biz.common.dto.BaseDto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import java.util.List;
/** /**
* 消防dto * 消防队伍下资源dto
* *
* @author tb * @author DELL
*/ */
@Data @Data
@ApiModel(value="FireCarDto", description="消防车dto") public class FireBrigadeResourceDto extends BaseDto {
public class FireCarDto extends BaseDto {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "车辆id") @ApiModelProperty(value = "资源id")
private String id; private String id;
@ApiModelProperty(value = "车辆名称") @ApiModelProperty(value = "资源名称")
private String name; private String name;
@ApiModelProperty(value = "资源图片")
private String img;
@ApiModelProperty(value = "资源类型")
private String type;
@ApiModelProperty(value = "所属队伍id") @ApiModelProperty(value = "所属队伍id")
private String teamId; private String teamId;
...@@ -36,4 +43,19 @@ public class FireCarDto extends BaseDto { ...@@ -36,4 +43,19 @@ public class FireCarDto extends BaseDto {
@ApiModelProperty(value = "车辆状态描述") @ApiModelProperty(value = "车辆状态描述")
private String carStateDesc; private String carStateDesc;
@ApiModelProperty(value = "队伍下人员数量")
private int personCount;
@ApiModelProperty(value = "车辆类型")
private String chassisBrand;
@ApiModelProperty(value = "执勤车辆个数")
private Integer onDutyCount;
@ApiModelProperty(value = "出动车辆个数")
private Integer outCount;
@ApiModelProperty(value = "子资源节点")
private List<FireBrigadeResourceDto> children = Lists.newArrayList();
} }
...@@ -71,5 +71,5 @@ public class FireTeamDto extends BaseDto { ...@@ -71,5 +71,5 @@ public class FireTeamDto extends BaseDto {
private String outCount; private String outCount;
@ApiModelProperty(value = "队伍下车辆") @ApiModelProperty(value = "队伍下车辆")
private List<FireCarDto> children; private List<FireBrigadeResourceDto> children;
} }
...@@ -44,7 +44,7 @@ public class AlertForm extends BaseEntity { ...@@ -44,7 +44,7 @@ public class AlertForm extends BaseEntity {
private String fieldValueCode; private String fieldValueCode;
@ApiModelProperty(value = "是否一行显示") @ApiModelProperty(value = "是否一行显示")
private boolean isBlock; private Boolean isBlock;
//新加排序字段 //新加排序字段
@ApiModelProperty(value = "排序字段") @ApiModelProperty(value = "排序字段")
private int sortNum; private int sortNum;
......
...@@ -15,6 +15,7 @@ public enum AlertBusinessTypeEnum { ...@@ -15,6 +15,7 @@ public enum AlertBusinessTypeEnum {
/** /**
* 警情续报,非警情确认,警情结案 * 警情续报,非警情确认,警情结案
*/ */
警情初报("reportAlert", "297", "警情初报"),
警情续报("reportAlert", "313", "警情续报"), 警情续报("reportAlert", "313", "警情续报"),
非警情确认("notAlert", "314", "非警情确认"), 非警情确认("notAlert", "314", "非警情确认"),
警情结案("endAlert", "315", "警情结案"); 警情结案("endAlert", "315", "警情结案");
......
package com.yeejoin.amos.boot.module.jcs.api.mapper; package com.yeejoin.amos.boot.module.jcs.api.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yeejoin.amos.boot.module.jcs.api.dto.FireBrigadeResourceDto;
import com.yeejoin.amos.boot.module.jcs.api.entity.FireTeam; import com.yeejoin.amos.boot.module.jcs.api.entity.FireTeam;
import com.yeejoin.amos.boot.module.jcs.api.vo.FireTeamListVo; import com.yeejoin.amos.boot.module.jcs.api.vo.FireTeamListVo;
import com.yeejoin.amos.boot.module.jcs.api.vo.FireTeamVo; import com.yeejoin.amos.boot.module.jcs.api.vo.FireTeamVo;
...@@ -34,4 +35,10 @@ public interface FireTeamMapper extends BaseMapper<FireTeam> { ...@@ -34,4 +35,10 @@ public interface FireTeamMapper extends BaseMapper<FireTeam> {
+ "</script>") + "</script>")
Map<String, Long> getFireTeamCount(int pageNum, int pageSize, FireTeamListVo par); Map<String, Long> getFireTeamCount(int pageNum, int pageSize, FireTeamListVo par);
/**
* 返回监控大队信息列表
*
* @return
*/
List<FireBrigadeResourceDto> listMonitorFireBrigade();
} }
...@@ -2,6 +2,10 @@ package com.yeejoin.amos.boot.module.jcs.api.mapper; ...@@ -2,6 +2,10 @@ package com.yeejoin.amos.boot.module.jcs.api.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yeejoin.amos.boot.module.jcs.api.entity.OrgUsr; import com.yeejoin.amos.boot.module.jcs.api.entity.OrgUsr;
import java.util.List;
import java.util.Map;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
...@@ -18,4 +22,6 @@ public interface OrgUsrMapper extends BaseMapper<OrgUsr> { ...@@ -18,4 +22,6 @@ public interface OrgUsrMapper extends BaseMapper<OrgUsr> {
* @return * @return
*/ */
String selectUpUnitByParam(@Param("biz_org_code")String biz_org_code); String selectUpUnitByParam(@Param("biz_org_code")String biz_org_code);
List<Map<String, Object>> selectPersonList(Map<String, Object> map);
} }
...@@ -5,6 +5,7 @@ import com.yeejoin.amos.boot.module.jcs.api.dto.AlertSubmittedDto; ...@@ -5,6 +5,7 @@ import com.yeejoin.amos.boot.module.jcs.api.dto.AlertSubmittedDto;
import com.yeejoin.amos.boot.module.jcs.api.entity.AlertSubmitted; import com.yeejoin.amos.boot.module.jcs.api.entity.AlertSubmitted;
import com.yeejoin.amos.boot.module.jcs.api.vo.AlertSubmittedSMSVo; import com.yeejoin.amos.boot.module.jcs.api.vo.AlertSubmittedSMSVo;
import com.yeejoin.amos.boot.module.jcs.api.vo.SchedulingReportingVo; import com.yeejoin.amos.boot.module.jcs.api.vo.SchedulingReportingVo;
import com.yeejoin.amos.feign.privilege.model.AgencyUserModel;
/** /**
* 警情报送记录 服务类 * 警情报送记录 服务类
...@@ -34,9 +35,10 @@ public interface IAlertSubmittedService extends IService<AlertSubmitted> { ...@@ -34,9 +35,10 @@ public interface IAlertSubmittedService extends IService<AlertSubmitted> {
* 警情报送保存 * 警情报送保存
* *
* @param alertSubmittedDto * @param alertSubmittedDto
* @param userName
* @return * @return
*/ */
Boolean save(AlertSubmittedDto alertSubmittedDto); Boolean save(AlertSubmittedDto alertSubmittedDto, String userName) throws Exception;
AlertSubmittedSMSVo getSchedulingContent(Long id); AlertSubmittedSMSVo getSchedulingContent(Long id);
} }
package com.yeejoin.amos.boot.module.jcs.api.service; package com.yeejoin.amos.boot.module.jcs.api.service;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.yeejoin.amos.boot.module.jcs.api.entity.OrgUsr;
import com.yeejoin.amos.boot.module.jcs.api.vo.FormValue;
import com.yeejoin.amos.boot.module.jcs.api.vo.OrgMenuVo; import com.yeejoin.amos.boot.module.jcs.api.vo.OrgMenuVo;
import com.yeejoin.amos.boot.module.jcs.api.vo.OrgUsrVo;
import java.util.Collection; import java.util.Collection;
import java.util.List; import java.util.List;
...@@ -15,12 +19,65 @@ import java.util.Map; ...@@ -15,12 +19,65 @@ import java.util.Map;
* @date 2021-06-18 * @date 2021-06-18
*/ */
public interface IOrgUsrService { public interface IOrgUsrService {
/**
* 查询上级单位
* @param parent_id
* @return
*/
String selectUpUnitByParam(String parent_id); String selectUpUnitByParam(String parent_id);
/**
* 获取父级
* @param topId
* @param entityList
* @param packageURL
* @param IDMethodName
* @param IDHierarchy
* @param NAMEMethodName
* @param PARENTIDMethodName
* @param OrgTypeMethodName
* @return
* @throws Exception
*/
List<OrgMenuVo> getTree(Long topId, Collection entityList, String packageURL, String IDMethodName, int IDHierarchy, List<OrgMenuVo> getTree(Long topId, Collection entityList, String packageURL, String IDMethodName, int IDHierarchy,
String NAMEMethodName, String PARENTIDMethodName, String OrgTypeMethodName) throws Exception; String NAMEMethodName, String PARENTIDMethodName, String OrgTypeMethodName) throws Exception;
/**
* 获取子数据集合
* @param topId
* @param entityList
* @param packageURL
* @param IDMethodName
* @param IDHierarchy
* @param NAMEMethodName
* @param PARENTIDMethodName
* @param OrgTypeMethodName
* @return
* @throws Exception
*/
List<OrgMenuVo> getSub(Long topId, Collection entityList, String packageURL, String IDMethodName, int IDHierarchy, List<OrgMenuVo> getSub(Long topId, Collection entityList, String packageURL, String IDMethodName, int IDHierarchy,
String NAMEMethodName, String PARENTIDMethodName, String OrgTypeMethodName) throws Exception; String NAMEMethodName, String PARENTIDMethodName, String OrgTypeMethodName) throws Exception;
List<Map<String, Object>> returnCompanyPersonMsg(List<Long> ids) throws Exception;
/**
* 组装融合调度单位人员信息
* @param ids
* @return
* @throws Exception
*/
List<Map<String, Object>> returnCompanyPersonMsg(List<Long> ids) throws Exception;
/**
* 获取动态表单数据
* @param queryWrapper
* @return
* @throws Exception
*/
List<FormValue> getFormValue(QueryWrapper queryWrapper) throws Exception;
/**
* 保存 机构/部门/人员基本信息
* @param
* @throws Exception
*/
void saveOrgUsr (OrgUsr oriOrgUsr,Long id) throws Exception;;
} }
package com.yeejoin.amos.boot.module.jcs.api.service; package com.yeejoin.amos.boot.module.jcs.api.service;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import com.yeejoin.amos.boot.module.jcs.api.dto.FireBrigadeResourceDto;
import com.yeejoin.amos.boot.module.jcs.api.dto.PowerTransferDto; import com.yeejoin.amos.boot.module.jcs.api.dto.PowerTransferDto;
import com.yeejoin.amos.boot.module.jcs.api.entity.PowerTransfer; import com.yeejoin.amos.boot.module.jcs.api.entity.PowerTransfer;
import com.yeejoin.amos.boot.module.jcs.api.vo.PowerTransferCompanyVo; import com.yeejoin.amos.boot.module.jcs.api.vo.PowerTransferCompanyVo;
...@@ -25,5 +26,5 @@ public interface IPowerTransferService extends IService<PowerTransfer> { ...@@ -25,5 +26,5 @@ public interface IPowerTransferService extends IService<PowerTransfer> {
/** /**
* 获取力量调派资源树 * 获取力量调派资源树
*/ */
void getPowerTree(); List<FireBrigadeResourceDto> getPowerTree();
} }
package com.yeejoin.amos.boot.module.jcs.api.vo; package com.yeejoin.amos.boot.module.jcs.api.vo;
import com.alibaba.fastjson.JSONObject;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
/** /**
...@@ -8,34 +10,28 @@ import lombok.Data; ...@@ -8,34 +10,28 @@ import lombok.Data;
@Data @Data
public class AlertSubmittedExtVo extends AlertSubmittedVo { public class AlertSubmittedExtVo extends AlertSubmittedVo {
/** @ApiModelProperty(value = "主键")
* 主键
*/
private Long sequenceNbr; private Long sequenceNbr;
/** @ApiModelProperty(value = "记录主表id")
* 记录主表id
*/
private Long alertSubmittedId; private Long alertSubmittedId;
/** @ApiModelProperty(value = "单位名称")
* 单位名称
*/
private String companyName; private String companyName;
/** @ApiModelProperty(value = "人员名称")
* 人员名称
*/
private String userName; private String userName;
/** @ApiModelProperty(value = "电话号码")
* 电话号码
*/
private String userPhone; private String userPhone;
/** @ApiModelProperty(value = "通话时长")
* 通话时长
*/
private String communicationTime; private String communicationTime;
@ApiModelProperty(value = "报送对象")
private String extraInfo;
@ApiModelProperty(value = "报送内容value")
private JSONObject submissionContentValue;
} }
...@@ -52,8 +52,4 @@ public class OrgUsrDownloadTemplateVO { ...@@ -52,8 +52,4 @@ public class OrgUsrDownloadTemplateVO {
@ApiModelProperty(value = "归属机构/部门/人员") @ApiModelProperty(value = "归属机构/部门/人员")
private String parentId; private String parentId;
@Excel(name = "amos中公司/部门ID",width = 30)
@ApiModelProperty(value = "扩展属性1")
private String orgExpandAttr1;
} }
...@@ -6,6 +6,7 @@ import io.swagger.annotations.ApiModelProperty; ...@@ -6,6 +6,7 @@ import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import lombok.experimental.Accessors; import lombok.experimental.Accessors;
import java.io.Serializable;
import java.util.List; import java.util.List;
/** /**
...@@ -18,18 +19,41 @@ import java.util.List; ...@@ -18,18 +19,41 @@ import java.util.List;
@Accessors(chain = true) @Accessors(chain = true)
@TableName("cb_org_usr") @TableName("cb_org_usr")
@ApiModel(value="OrgUsrVo", description="机构/部门/人员表") @ApiModel(value="OrgUsrVo", description="机构/部门/人员表")
public class OrgUsrFormVo { public class OrgUsrFormVo implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "单位id") @ApiModelProperty(value = "单位id")
private Long id; private Long id;
@ApiModelProperty(value = "单位id")
protected Long sequenceNbr;
@ApiModelProperty(value = "单位名称") @ApiModelProperty(value = "单位名称")
private String currentUnit; private String currentUnit;
@ApiModelProperty(value = "归属机构/部门") @ApiModelProperty(value = "归属机构/部门")
private String parentId; private String parentId;
@ApiModelProperty(value = "机构/部门名称")
private String bizOrgName;
@ApiModelProperty(value = "机构编码")
private String bizOrgCode;
@ApiModelProperty(value = "amos中公司/部门ID")
private String amosOrgId;
@ApiModelProperty(value = "amos中公司/部门编码")
private String amosOrgCode;
@ApiModelProperty(value = "机构类型`")
private String bizOrgType;
@ApiModelProperty(value = "所属建筑名称")
private String buildName;
@ApiModelProperty(value = "所属建筑ID")
private String buildId;
private Integer personNum; private Integer personNum;
......
...@@ -31,6 +31,7 @@ ...@@ -31,6 +31,7 @@
<if test="alertSubmittedDto.businessTypeCode != null and alertSubmittedDto.businessTypeCode != ''"> <if test="alertSubmittedDto.businessTypeCode != null and alertSubmittedDto.businessTypeCode != ''">
and jas.business_type_code = #{alertSubmittedDto.businessTypeCode} and jas.business_type_code = #{alertSubmittedDto.businessTypeCode}
</if> </if>
order by jas.submission_time desc
</select> </select>
<select id="listReportingByParam" resultType="com.yeejoin.amos.boot.module.jcs.api.vo.AlertSubmittedExtVo"> <select id="listReportingByParam" resultType="com.yeejoin.amos.boot.module.jcs.api.vo.AlertSubmittedExtVo">
select select
...@@ -46,8 +47,8 @@ ...@@ -46,8 +47,8 @@
jas.submission_method_code, jas.submission_method_code,
jas.update_time, jas.update_time,
jaso.sequence_nbr, jaso.sequence_nbr,
group_concat(distinct jaso.company_name) companyName, group_concat(distinct jaso.company_name Separator '、') companyName,
group_concat(distinct jaso.user_name) userName group_concat(distinct jaso.user_name Separator '、') userName
from jc_alert_submitted jas from jc_alert_submitted jas
left join jc_alert_submitted_object jaso on jas.sequence_nbr = jaso.alert_submitted_id left join jc_alert_submitted_object jaso on jas.sequence_nbr = jaso.alert_submitted_id
where 1=1 where 1=1
...@@ -60,7 +61,8 @@ ...@@ -60,7 +61,8 @@
<if test="alertSubmittedDto.businessTypeCode != null and alertSubmittedDto.businessTypeCode != ''"> <if test="alertSubmittedDto.businessTypeCode != null and alertSubmittedDto.businessTypeCode != ''">
and jas.business_type_code = #{alertSubmittedDto.businessTypeCode} and jas.business_type_code = #{alertSubmittedDto.businessTypeCode}
</if> </if>
group by jaso.alert_submitted_id group by jas.sequence_nbr, jas.submission_time
order by jas.submission_time desc
</select> </select>
<select id="getSchedulingContent" resultType="com.yeejoin.amos.boot.module.jcs.api.vo.AlertSubmittedSMSVo"> <select id="getSchedulingContent" resultType="com.yeejoin.amos.boot.module.jcs.api.vo.AlertSubmittedSMSVo">
......
...@@ -2,4 +2,16 @@ ...@@ -2,4 +2,16 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yeejoin.amos.boot.module.jcs.api.mapper.FireTeamMapper"> <mapper namespace="com.yeejoin.amos.boot.module.jcs.api.mapper.FireTeamMapper">
<select id="listMonitorFireBrigade" resultType="com.yeejoin.amos.boot.module.jcs.api.dto.FireBrigadeResourceDto">
SELECT
ft.sequence_nbr id,
ft.NAME,
ft.img,
COUNT( DISTINCT ff.sequence_nbr ) personCount
FROM
cb_fire_team ft
LEFT JOIN cb_firefighters ff ON ff.fire_team_id = ft.sequence_nbr
GROUP BY
ff.fire_team_id
</select>
</mapper> </mapper>
...@@ -14,4 +14,23 @@ ...@@ -14,4 +14,23 @@
</if> </if>
</select> </select>
<select id="selectPersonList" resultType="Map">
SELECT
DISTINCT
u. sequence_nbr sequenceNbr,
u.biz_org_name bizOrgName,
u.biz_org_code bizOrgCode,
<if test="fields != null">
<foreach collection="fields" item="item" separator=",">MAX(case v.field_code when #{item} then v.field_value end) ${item}</foreach>
</if>
FROM
cb_org_usr u,
jc_alert_form_value v
LEFT JOIN jc_alert_form f ON f.sequence_nbr = v.alert_form_id
where u.sequence_nbr = v.alert_called_id
and v.alert_type_code = #{alertTypeCode}
LIMIT #{pageNum}, #{pageSize}
</select>
</mapper> </mapper>
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
left join jc_power_transfer pt on ptc.power_transfer_id = pt.sequence_nbr left join jc_power_transfer pt on ptc.power_transfer_id = pt.sequence_nbr
right join jc_power_transfer_company_resources ptcr right join jc_power_transfer_company_resources ptcr
on ptcr.power_transfer_company_id = ptc.sequence_nbr on ptcr.power_transfer_company_id = ptc.sequence_nbr
where pt.alert_called_id = '63453543' where pt.alert_called_id = #{alertCalledId}
and ptc.is_distribution_agencies = 0) r and ptc.is_distribution_agencies = 0) r
group by company_name, type, rec_date group by company_name, type, rec_date
having rec_date = (select rec_date from jc_power_transfer_company_resources order by rec_date desc limit 1) having rec_date = (select rec_date from jc_power_transfer_company_resources order by rec_date desc limit 1)
......
...@@ -6,7 +6,7 @@ import java.util.Arrays; ...@@ -6,7 +6,7 @@ import java.util.Arrays;
import java.util.List; import java.util.List;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import java.util.stream.Stream; import java.util.stream.Stream;
import com.yeejoin.amos.boot.module.jcs.biz.service.impl.ESAlertCalledService;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
...@@ -44,7 +44,6 @@ import com.yeejoin.amos.boot.module.jcs.api.vo.AlertCalledVo; ...@@ -44,7 +44,6 @@ import com.yeejoin.amos.boot.module.jcs.api.vo.AlertCalledVo;
import com.yeejoin.amos.boot.module.jcs.api.vo.FormValue; import com.yeejoin.amos.boot.module.jcs.api.vo.FormValue;
import com.yeejoin.amos.boot.module.jcs.biz.service.impl.AlertCalledServiceImpl; import com.yeejoin.amos.boot.module.jcs.biz.service.impl.AlertCalledServiceImpl;
import com.yeejoin.amos.boot.module.jcs.biz.service.impl.AlertFormValueServiceImpl; import com.yeejoin.amos.boot.module.jcs.biz.service.impl.AlertFormValueServiceImpl;
import com.yeejoin.amos.boot.module.jcs.biz.service.impl.ESAlertCalledService;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
...@@ -258,7 +257,7 @@ public class AlertCalledController extends BaseController { ...@@ -258,7 +257,7 @@ public class AlertCalledController extends BaseController {
try { try {
field.setAccessible(true); field.setAccessible(true);
Object o = field.get(alertCalled); Object o = field.get(alertCalled);
if (o != null) { if (o != null && !"serialVersionUID".equals(field.getName())) {
Class<?> type = field.getType(); Class<?> type = field.getType();
String name = NameUtils.camel2Underline(field.getName()); String name = NameUtils.camel2Underline(field.getName());
if (type.equals(Integer.class)) { if (type.equals(Integer.class)) {
...@@ -270,7 +269,7 @@ public class AlertCalledController extends BaseController { ...@@ -270,7 +269,7 @@ public class AlertCalledController extends BaseController {
} else if (type.equals(Boolean.class)) { } else if (type.equals(Boolean.class)) {
Boolean fileValue = (Boolean) field.get(alertCalled); Boolean fileValue = (Boolean) field.get(alertCalled);
queryWrapper.eq(name, fileValue); queryWrapper.eq(name, fileValue);
}else if (type.equals(Long.class)) { }else if (type.equals(Long.class) || "long".equals(type.toString())) {
Long fileValue = (Long) field.get(alertCalled); Long fileValue = (Long) field.get(alertCalled);
queryWrapper.eq(name, fileValue); queryWrapper.eq(name, fileValue);
} }
......
...@@ -6,25 +6,33 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; ...@@ -6,25 +6,33 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.biz.common.controller.BaseController; import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import com.yeejoin.amos.boot.biz.common.utils.NameUtils; import com.yeejoin.amos.boot.biz.common.utils.NameUtils;
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.entity.*; import com.yeejoin.amos.boot.module.jcs.api.entity.AlertSubmitted;
import com.yeejoin.amos.boot.module.jcs.api.enums.SubmissionMethodEnum; import com.yeejoin.amos.boot.module.jcs.api.enums.SubmissionMethodEnum;
import com.yeejoin.amos.boot.module.jcs.api.vo.*; import com.yeejoin.amos.boot.module.jcs.api.vo.AlertSubmittedSMSVo;
import com.yeejoin.amos.boot.module.jcs.biz.service.impl.*; 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.biz.service.impl.AlertCalledServiceImpl;
import com.yeejoin.amos.boot.module.jcs.biz.service.impl.AlertSubmittedServiceImpl;
import com.yeejoin.amos.boot.module.jcs.biz.service.impl.DataDictionaryServiceImpl;
import com.yeejoin.amos.boot.module.jcs.biz.service.impl.PowerTransferServiceImpl;
import com.yeejoin.amos.boot.module.jcs.biz.service.impl.TemplateServiceImpl;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import org.typroject.tyboot.core.foundation.enumeration.UserType; import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.restful.doc.TycloudOperation; import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import org.typroject.tyboot.core.restful.utils.ResponseHelper; import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel; import org.typroject.tyboot.core.restful.utils.ResponseModel;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.ws.rs.HEAD; import java.util.ArrayList;
import java.lang.reflect.Field; import java.util.Arrays;
import java.util.*;
/** /**
...@@ -58,14 +66,11 @@ public class AlertSubmittedController extends BaseController { ...@@ -58,14 +66,11 @@ public class AlertSubmittedController extends BaseController {
* *
* @return * @return
*/ */
@TycloudOperation(needAuth = true, ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@RequestMapping(value = "/save", method = RequestMethod.POST) @RequestMapping(value = "/save", method = RequestMethod.POST)
@ApiOperation(httpMethod = "POST", value = "新增警情报送记录", notes = "新增警情报送记录") @ApiOperation(httpMethod = "POST", value = "新增警情报送记录", notes = "新增警情报送记录")
public ResponseModel<Object> saveAlertSubmitted(@RequestBody AlertSubmittedDto alertSubmittedDto) throws Exception {
public ResponseModel<Object> saveAlertSubmitted(HttpServletRequest request, return ResponseHelper.buildResponse(alertSubmittedService.save(alertSubmittedDto, getUserInfo().getUserName()));
@RequestBody AlertSubmittedDto alertSubmittedDto) {
return ResponseHelper.buildResponse(alertSubmittedService.save(alertSubmittedDto));
} }
/** /**
...@@ -74,14 +79,12 @@ public class AlertSubmittedController extends BaseController { ...@@ -74,14 +79,12 @@ public class AlertSubmittedController extends BaseController {
* @param id * @param id
* @return * @return
*/ */
@TycloudOperation(needAuth = true, ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@RequestMapping(value = "/{id}", method = RequestMethod.DELETE) @RequestMapping(value = "/{id}", method = RequestMethod.DELETE)
@ApiOperation(httpMethod = "DELETE", value = "根据id删除", notes = "根据id删除") @ApiOperation(httpMethod = "DELETE", value = "根据id删除", notes = "根据id删除")
public ResponseModel<Boolean> deleteById(HttpServletRequest request, @PathVariable Long id) { public ResponseModel<Boolean> deleteById(@PathVariable Long id) {
return ResponseHelper.buildResponse(alertSubmittedService.removeById(id)); return ResponseHelper.buildResponse(alertSubmittedService.removeById(id));
} }
/** /**
...@@ -89,15 +92,12 @@ public class AlertSubmittedController extends BaseController { ...@@ -89,15 +92,12 @@ public class AlertSubmittedController extends BaseController {
* *
* @return * @return
*/ */
@TycloudOperation(needAuth = true, ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@RequestMapping(value = "/updateById", method = RequestMethod.PUT) @RequestMapping(value = "/updateById", method = RequestMethod.PUT)
@ApiOperation(httpMethod = "PUT", value = "修改警情报送记录", notes = "修改警情报送记录") @ApiOperation(httpMethod = "PUT", value = "修改警情报送记录", notes = "修改警情报送记录")
public ResponseModel<Boolean> updateByIdAlertSubmitted(HttpServletRequest request, public ResponseModel<Boolean> updateByIdAlertSubmitted(@RequestBody AlertSubmitted alertSubmitted) {
@RequestBody AlertSubmitted alertSubmitted) {
return ResponseHelper.buildResponse(alertSubmittedService.updateById(alertSubmitted)); return ResponseHelper.buildResponse(alertSubmittedService.updateById(alertSubmitted));
} }
/** /**
...@@ -106,10 +106,10 @@ public class AlertSubmittedController extends BaseController { ...@@ -106,10 +106,10 @@ public class AlertSubmittedController extends BaseController {
* @param id * @param id
* @return * @return
*/ */
@TycloudOperation(needAuth = true, ApiLevel = UserType.AGENCY) @TycloudOperation( ApiLevel = UserType.AGENCY)
@RequestMapping(value = "/{id}", method = RequestMethod.GET) @RequestMapping(value = "/{id}", method = RequestMethod.GET)
@ApiOperation(httpMethod = "GET", value = "根据id查询", notes = "根据id查询") @ApiOperation(httpMethod = "GET", value = "根据id查询", notes = "根据id查询")
public ResponseModel<AlertSubmitted> selectById(HttpServletRequest request, @PathVariable Long id) { public ResponseModel<AlertSubmitted> selectById(@PathVariable Long id) {
return ResponseHelper.buildResponse(alertSubmittedService.getById(id)); return ResponseHelper.buildResponse(alertSubmittedService.getById(id));
} }
...@@ -126,7 +126,7 @@ public class AlertSubmittedController extends BaseController { ...@@ -126,7 +126,7 @@ public class AlertSubmittedController extends BaseController {
@ApiOperation(httpMethod = "POST", value = "根据警情id查询警情报送列表", notes = "根据警情id查询警情报送列表") @ApiOperation(httpMethod = "POST", value = "根据警情id查询警情报送列表", notes = "根据警情id查询警情报送列表")
public ResponseModel<SchedulingReportingVo> listReportingByParam(@RequestBody AlertSubmittedDto queryParam) { public ResponseModel<SchedulingReportingVo> listReportingByParam(@RequestBody AlertSubmittedDto queryParam) {
queryParam.setSubmissionMethodCode(SubmissionMethodEnum.PHONE.getCode()); queryParam.setSubmissionMethodCode(SubmissionMethodEnum.SMS.getCode());
return ResponseHelper.buildResponse(alertSubmittedService.listReportingByParam(queryParam)); return ResponseHelper.buildResponse(alertSubmittedService.listReportingByParam(queryParam));
} }
...@@ -135,7 +135,7 @@ public class AlertSubmittedController extends BaseController { ...@@ -135,7 +135,7 @@ public class AlertSubmittedController extends BaseController {
* *
* @return * @return
*/ */
@TycloudOperation(needAuth = true, ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@RequestMapping(value = "/list", method = RequestMethod.GET) @RequestMapping(value = "/list", method = RequestMethod.GET)
@ApiOperation(httpMethod = "GET", value = "列表分页查询", notes = "列表分页查询") @ApiOperation(httpMethod = "GET", value = "列表分页查询", notes = "列表分页查询")
public IPage<AlertSubmitted> listPage(String pageNum, String pageSize, AlertSubmitted alertSubmitted) { public IPage<AlertSubmitted> listPage(String pageNum, String pageSize, AlertSubmitted alertSubmitted) {
......
...@@ -44,7 +44,7 @@ public class AlertSubmittedObjectController extends BaseController { ...@@ -44,7 +44,7 @@ public class AlertSubmittedObjectController extends BaseController {
* 新增报送对象 * 新增报送对象
* @return * @return
*/ */
@TycloudOperation(needAuth = true, ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@RequestMapping(value = "/save", method = RequestMethod.POST) @RequestMapping(value = "/save", method = RequestMethod.POST)
@ApiOperation(httpMethod = "POST", value = "新增报送对象", notes = "新增报送对象") @ApiOperation(httpMethod = "POST", value = "新增报送对象", notes = "新增报送对象")
public boolean saveAlertSubmittedObject(HttpServletRequest request, @RequestBody AlertSubmittedObject alertSubmittedObject){ public boolean saveAlertSubmittedObject(HttpServletRequest request, @RequestBody AlertSubmittedObject alertSubmittedObject){
...@@ -56,7 +56,7 @@ public class AlertSubmittedObjectController extends BaseController { ...@@ -56,7 +56,7 @@ public class AlertSubmittedObjectController extends BaseController {
* @param id * @param id
* @return * @return
*/ */
@TycloudOperation(needAuth = true, ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@RequestMapping(value = "/{id}", method = RequestMethod.DELETE) @RequestMapping(value = "/{id}", method = RequestMethod.DELETE)
@ApiOperation(httpMethod = "DELETE", value = "根据id删除", notes = "根据id删除") @ApiOperation(httpMethod = "DELETE", value = "根据id删除", notes = "根据id删除")
public boolean deleteById(HttpServletRequest request, @PathVariable Long id){ public boolean deleteById(HttpServletRequest request, @PathVariable Long id){
...@@ -67,7 +67,7 @@ public class AlertSubmittedObjectController extends BaseController { ...@@ -67,7 +67,7 @@ public class AlertSubmittedObjectController extends BaseController {
* 修改报送对象 * 修改报送对象
* @return * @return
*/ */
@TycloudOperation(needAuth = true, ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@RequestMapping(value = "/updateById", method = RequestMethod.PUT) @RequestMapping(value = "/updateById", method = RequestMethod.PUT)
@ApiOperation(httpMethod = "PUT", value = "修改报送对象", notes = "修改报送对象") @ApiOperation(httpMethod = "PUT", value = "修改报送对象", notes = "修改报送对象")
public boolean updateByIdAlertSubmittedObject(HttpServletRequest request, @RequestBody AlertSubmittedObject alertSubmittedObject){ public boolean updateByIdAlertSubmittedObject(HttpServletRequest request, @RequestBody AlertSubmittedObject alertSubmittedObject){
...@@ -79,7 +79,7 @@ public class AlertSubmittedObjectController extends BaseController { ...@@ -79,7 +79,7 @@ public class AlertSubmittedObjectController extends BaseController {
* @param id * @param id
* @return * @return
*/ */
@TycloudOperation(needAuth = true, ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@RequestMapping(value = "/{id}", method = RequestMethod.GET) @RequestMapping(value = "/{id}", method = RequestMethod.GET)
@ApiOperation(httpMethod = "GET", value = "根据id查询", notes = "根据id查询") @ApiOperation(httpMethod = "GET", value = "根据id查询", notes = "根据id查询")
public AlertSubmittedObject selectById(HttpServletRequest request, @PathVariable Long id){ public AlertSubmittedObject selectById(HttpServletRequest request, @PathVariable Long id){
...@@ -90,7 +90,7 @@ public class AlertSubmittedObjectController extends BaseController { ...@@ -90,7 +90,7 @@ public class AlertSubmittedObjectController extends BaseController {
* 列表分页查询 * 列表分页查询
* @return * @return
*/ */
@TycloudOperation(needAuth = true, ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@RequestMapping(value = "/list", method = RequestMethod.GET) @RequestMapping(value = "/list", method = RequestMethod.GET)
@ApiOperation(httpMethod = "GET", value = "列表分页查询", notes = "列表分页查询") @ApiOperation(httpMethod = "GET", value = "列表分页查询", notes = "列表分页查询")
public IPage<AlertSubmittedObject> listPage(String pageNum,String pageSize, AlertSubmittedObject alertSubmittedObject){ public IPage<AlertSubmittedObject> listPage(String pageNum,String pageSize, AlertSubmittedObject alertSubmittedObject){
......
...@@ -13,6 +13,8 @@ import java.util.Map; ...@@ -13,6 +13,8 @@ import java.util.Map;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import com.yeejoin.amos.boot.module.jcs.api.dto.AlertFromValueDto;
import com.yeejoin.amos.boot.module.jcs.api.vo.AlertFormValueVo;
import com.yeejoin.amos.boot.module.jcs.api.vo.OrgDepartmentFormVo; import com.yeejoin.amos.boot.module.jcs.api.vo.OrgDepartmentFormVo;
import com.yeejoin.amos.boot.module.jcs.api.vo.OrgMenuVo; import com.yeejoin.amos.boot.module.jcs.api.vo.OrgMenuVo;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
...@@ -108,17 +110,31 @@ public class OrgDepartmentController { ...@@ -108,17 +110,31 @@ public class OrgDepartmentController {
@TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY) @TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY)
@RequestMapping(value = "/{id}", method = RequestMethod.PUT) @RequestMapping(value = "/{id}", method = RequestMethod.PUT)
@ApiOperation(httpMethod = "PUT", value = "更新单位数据", notes = "更新单位数据") @ApiOperation(httpMethod = "PUT", value = "更新单位数据", notes = "更新单位数据")
public ResponseModel<Object> updateByIdOrgUsr(HttpServletRequest request, @RequestBody OrgDepartmentVo OrgDepartmentVo, @PathVariable Long id) { public ResponseModel<Object> updateByIdOrgUsr(HttpServletRequest request, @RequestBody OrgDepartmentVo OrgDepartmentVo, @PathVariable Long id) throws Exception {
// 修改人员信息 // 修改部门信息
OrgUsr orgUsr = new OrgUsr(); OrgUsr orgUsr = new OrgUsr();
BeanUtils.copyProperties(OrgDepartmentVo,orgUsr); OrgUsr oriOrgUsr = iOrgUsrService.getById(id);
iOrgUsrService.updateById(orgUsr); BeanUtils.copyProperties(OrgDepartmentVo, orgUsr);
iOrgUsrService.saveOrgUsr(oriOrgUsr,id);
// 动态表单 // 动态表单
List<AlertFormValue> alertFromValuelist = OrgDepartmentVo.getAlertFormValue(); List<AlertFormValue> alertFromValuelist = OrgDepartmentVo.getAlertFormValue();
// 填充主键 // 填充主键
alertFromValuelist.stream().forEach(alertFromValue -> { alertFromValuelist.stream().forEach(alertFromValue -> {
alertFromValue.setAlertCalledId(orgUsr.getSequenceNbr()); alertFromValue.setAlertCalledId(orgUsr.getSequenceNbr());
}); });
List<AlertFromValueDto> formList = iAlertFromValueService.queryByCalledId(orgUsr.getSequenceNbr());
for (AlertFormValue dis : alertFromValuelist) {
for (AlertFromValueDto src : formList) {
if (dis.getAlertFormId() == src.getAlertFormId()) {
dis.setSequenceNbr(src.getSequenceNbr());
dis.setRecDate(new Date());
dis.setRecUserId(oriOrgUsr.getRecUserId());
dis.setRecUserName(oriOrgUsr.getRecUserName());
break;
}
}
}
// 保存动态表单数据 // 保存动态表单数据
iAlertFromValueService.updateBatchById(alertFromValuelist); iAlertFromValueService.updateBatchById(alertFromValuelist);
return ResponseHelper.buildResponse(null); return ResponseHelper.buildResponse(null);
...@@ -134,24 +150,26 @@ public class OrgDepartmentController { ...@@ -134,24 +150,26 @@ public class OrgDepartmentController {
@TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY) @TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY)
@RequestMapping(value = "/{id}", method = RequestMethod.GET) @RequestMapping(value = "/{id}", method = RequestMethod.GET)
@ApiOperation(httpMethod = "GET", value = "获取部门详情", notes = "获取部门详情") @ApiOperation(httpMethod = "GET", value = "获取部门详情", notes = "获取部门详情")
public ResponseModel<OrgDepartmentFormVo> selectById(HttpServletRequest request, @PathVariable Long id) { public ResponseModel<OrgDepartmentFormVo> selectById(HttpServletRequest request, @PathVariable Long id) throws Exception {
QueryWrapper<AlertFormValue> queryWrapper = new QueryWrapper<>(); QueryWrapper<AlertFormValue> queryWrapper = new QueryWrapper<>();
OrgUsr orgUsr = iOrgUsrService.getById(id); OrgUsr orgUsr = iOrgUsrService.getById(id);
queryWrapper.eq("alert_called_id", id); queryWrapper.eq("alert_called_id", id);
// 动态表单数据 // 动态表单数据
List<AlertFormValue> list = iAlertFromValueService.list(queryWrapper); List<AlertFormValueVo> list = iAlertFromValueService.listByCalledId(id);
List<FormValue> formValue = new ArrayList<FormValue>(); List<FormValue> formValue = new ArrayList();
for (AlertFormValue alertFormValue : list) { for (AlertFormValueVo alertFormValue : list) {
if (alertFormValue.getFieldValueCode() == null){ if (alertFormValue.getFieldValueCode() == null) {
FormValue value = new FormValue(alertFormValue.getFieldCode(), alertFormValue.getFieldName(), "text", alertFormValue.getFieldValue(), alertFormValue.getIsBlock()); FormValue value = new FormValue(alertFormValue.getFieldCode(), alertFormValue.getFieldName(), alertFormValue.getFieldType(),
alertFormValue.getFieldValue(), alertFormValue.getIsBlock());
formValue.add(value); formValue.add(value);
}else { } else {
FormValue value = new FormValue(alertFormValue.getFieldCode(), alertFormValue.getFieldName(), "text", alertFormValue.getFieldValueCode(), alertFormValue.getIsBlock()); FormValue value = new FormValue(alertFormValue.getFieldCode(), alertFormValue.getFieldName(), alertFormValue.getFieldType(),
alertFormValue.getFieldValueCode(), alertFormValue.getIsBlock());
formValue.add(value); formValue.add(value);
} }
} }
OrgDepartmentFormVo orgDepartmentFormVo = new OrgDepartmentFormVo(); OrgDepartmentFormVo orgDepartmentFormVo = new OrgDepartmentFormVo();
BeanUtils.copyProperties(orgUsr,orgDepartmentFormVo); BeanUtils.copyProperties(orgUsr, orgDepartmentFormVo);
orgDepartmentFormVo.setDynamicFormAlert(formValue); orgDepartmentFormVo.setDynamicFormAlert(formValue);
return ResponseHelper.buildResponse(orgDepartmentFormVo); return ResponseHelper.buildResponse(orgDepartmentFormVo);
} }
...@@ -165,7 +183,7 @@ public class OrgDepartmentController { ...@@ -165,7 +183,7 @@ public class OrgDepartmentController {
@TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY) @TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY)
@RequestMapping(value = "/companyTree", method = RequestMethod.GET) @RequestMapping(value = "/companyTree", method = RequestMethod.GET)
@ApiOperation(httpMethod = "GET", value = "获取部门树", notes = "获取部门树") @ApiOperation(httpMethod = "GET", value = "获取部门树", notes = "获取部门树")
public ResponseModel< List<OrgMenuVo>> selectCompanyTree() throws Exception { public ResponseModel<List<OrgMenuVo>> selectCompanyTree() throws Exception {
Map<String, Object> columnMap = new HashMap<>(); Map<String, Object> columnMap = new HashMap<>();
columnMap.put("is_delete", CommonConstant.IS_DELETE_00); columnMap.put("is_delete", CommonConstant.IS_DELETE_00);
columnMap.put("biz_org_type", CommonConstant.BIZ_ORG_TYPE_DEPARTMENT); columnMap.put("biz_org_type", CommonConstant.BIZ_ORG_TYPE_DEPARTMENT);
...@@ -229,9 +247,9 @@ public class OrgDepartmentController { ...@@ -229,9 +247,9 @@ public class OrgDepartmentController {
* @return * @return
*/ */
@TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY) @TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY)
@RequestMapping(value = "download-template/", method = RequestMethod.POST) @RequestMapping(value = "download-template", method = RequestMethod.POST)
@ApiOperation(httpMethod = "POST", value = "根据类型导出模板", notes = "根据类型导出模板") @ApiOperation(httpMethod = "POST", value = "导出模板", notes = "导出模板")
public ResponseModel<Object> downloadTemplate(HttpServletResponse response, @RequestBody List<OrgUsrDownloadTemplateVO> OrgUsrDownloadTemplateVO) throws UnsupportedEncodingException { public ResponseModel downloadTemplate(HttpServletResponse response, @RequestBody List<OrgUsrDownloadTemplateVO> OrgUsrDownloadTemplateVO) throws UnsupportedEncodingException {
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMddhhmmss"); SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMddhhmmss");
ExcelUtils.exportExcel(OrgUsrDownloadTemplateVO, "部门信息", "部门信息", OrgUsrDownloadTemplateVO.class, simpleDateFormat.format(new Date()) + ".xls", response); ExcelUtils.exportExcel(OrgUsrDownloadTemplateVO, "部门信息", "部门信息", OrgUsrDownloadTemplateVO.class, simpleDateFormat.format(new Date()) + ".xls", response);
return ResponseHelper.buildResponse(null); return ResponseHelper.buildResponse(null);
......
...@@ -21,6 +21,7 @@ import org.springframework.web.bind.annotation.RequestMapping; ...@@ -21,6 +21,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import org.typroject.tyboot.core.foundation.enumeration.UserType; import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.foundation.utils.Bean;
import org.typroject.tyboot.core.restful.doc.TycloudOperation; import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import org.typroject.tyboot.core.restful.utils.ResponseHelper; import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel; import org.typroject.tyboot.core.restful.utils.ResponseModel;
...@@ -110,17 +111,12 @@ public class OrgPersonController { ...@@ -110,17 +111,12 @@ public class OrgPersonController {
@RequestMapping(value = "/{id}", method = RequestMethod.PUT) @RequestMapping(value = "/{id}", method = RequestMethod.PUT)
@ApiOperation(httpMethod = "PUT", value = "更新单位数据", notes = "更新单位数据") @ApiOperation(httpMethod = "PUT", value = "更新单位数据", notes = "更新单位数据")
public ResponseModel updateByIdOrgUsr(HttpServletRequest request, @RequestBody OrgPersonVo OrgPersonVo, public ResponseModel updateByIdOrgUsr(HttpServletRequest request, @RequestBody OrgPersonVo OrgPersonVo,
@PathVariable Long id) { @PathVariable Long id) throws Exception {
// 修改人员信息 // 修改人员信息
OrgUsr orgUsr = new OrgUsr(); OrgUsr orgUsr = new OrgUsr();
OrgUsr oriOrgUsr = iOrgUsrService.getById(id); OrgUsr oriOrgUsr = iOrgUsrService.getById(id);
BeanUtils.copyProperties(OrgPersonVo, orgUsr); BeanUtils.copyProperties(OrgPersonVo, orgUsr);
orgUsr.setBizOrgType(CommonConstant.BIZ_ORG_TYPE_PERSON); iOrgUsrService.saveOrgUsr(oriOrgUsr,id);
orgUsr.setSequenceNbr(id);
orgUsr.setRecDate(new Date());
orgUsr.setRecUserId(oriOrgUsr.getRecUserId());
orgUsr.setRecUserName(oriOrgUsr.getRecUserName());
iOrgUsrService.updateById(orgUsr);
// 动态表单 // 动态表单
List<AlertFormValue> alertFromValuelist = OrgPersonVo.getAlertFormValue(); List<AlertFormValue> alertFromValuelist = OrgPersonVo.getAlertFormValue();
// 填充主键 // 填充主键
...@@ -136,6 +132,7 @@ public class OrgPersonController { ...@@ -136,6 +132,7 @@ public class OrgPersonController {
dis.setRecDate(new Date()); dis.setRecDate(new Date());
dis.setRecUserId(oriOrgUsr.getRecUserId()); dis.setRecUserId(oriOrgUsr.getRecUserId());
dis.setRecUserName(oriOrgUsr.getRecUserName()); dis.setRecUserName(oriOrgUsr.getRecUserName());
dis.setAlertTypeCode(src.getAlertTypeCode());
break; break;
} }
} }
...@@ -178,6 +175,32 @@ public class OrgPersonController { ...@@ -178,6 +175,32 @@ public class OrgPersonController {
orgUsrFormVo.setDynamicFormAlert(formValue); orgUsrFormVo.setDynamicFormAlert(formValue);
return ResponseHelper.buildResponse(orgUsrFormVo); return ResponseHelper.buildResponse(orgUsrFormVo);
} }
/**
* 根据id查询人员
*
* @param id
* @return
*/
@TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY)
@RequestMapping(value = "/show/{id}", method = RequestMethod.GET)
@ApiOperation(httpMethod = "GET", value = "获取人员详情", notes = "获取人员详情")
public ResponseModel selectForShowById(HttpServletRequest request, @PathVariable Long id) {
OrgUsr orgUsr = iOrgUsrService.getById(id);
QueryWrapper queryWrapper = new QueryWrapper<>();
queryWrapper.eq("alert_called_id", id);
// 动态表单数据
List<AlertFormValueVo> list = iAlertFromValueService.listByCalledId(id);
List<FormValue> formValue = new ArrayList();
Map<String, Object> result = Bean.BeantoMap(orgUsr);
for (AlertFormValueVo alertFormValue : list) {
result.put(alertFormValue.getFieldCode(), alertFormValue.getFieldValue());
}
return ResponseHelper.buildResponse(result);
}
/** /**
* 获取人员树 * 获取人员树
...@@ -206,43 +229,7 @@ public class OrgPersonController { ...@@ -206,43 +229,7 @@ public class OrgPersonController {
@RequestMapping(value = "/list", method = RequestMethod.GET) @RequestMapping(value = "/list", method = RequestMethod.GET)
@ApiOperation(httpMethod = "GET", value = "列表分页查询", notes = "列表分页查询") @ApiOperation(httpMethod = "GET", value = "列表分页查询", notes = "列表分页查询")
public ResponseModel<Object> listPage(String pageNum, String pageSize, OrgUsr orgUsr) { public ResponseModel<Object> listPage(String pageNum, String pageSize, OrgUsr orgUsr) {
return ResponseHelper.buildResponse(iOrgUsrService.pagePerson(pageNum, pageSize, orgUsr));
Page<OrgUsr> pageBean;
QueryWrapper<OrgUsr> orgUsrQueryWrapper = new QueryWrapper<>();
Class<? extends OrgUsr> aClass = orgUsr.getClass();
Arrays.stream(aClass.getDeclaredFields()).forEach(field -> {
try {
field.setAccessible(true);
Object o = field.get(orgUsr);
if (o != null) {
Class<?> type = field.getType();
String name = NameUtils.camel2Underline(field.getName());
if (type.equals(Integer.class)) {
Integer fileValue = (Integer) field.get(orgUsr);
orgUsrQueryWrapper.eq(name, fileValue);
} else if (type.equals(Long.class)) {
Long fileValue = (Long) field.get(orgUsr);
orgUsrQueryWrapper.eq(name, fileValue);
} else if (type.equals(String.class)) {
String fileValue = (String) field.get(orgUsr);
orgUsrQueryWrapper.eq(name, fileValue);
} else {
String fileValue = (String) field.get(orgUsr);
orgUsrQueryWrapper.eq(name, fileValue);
}
}
} catch (Exception e) {
}
});
IPage<OrgUsr> page;
if (StringUtils.isBlank(pageNum) || StringUtils.isBlank(pageSize)) {
pageBean = new Page<>(0, Long.MAX_VALUE);
} else {
pageBean = new Page<>(Integer.parseInt(pageNum), Integer.parseInt(pageSize));
}
orgUsrQueryWrapper.eq("biz_org_type", CommonConstant.BIZ_ORG_TYPE_PERSON);
page = iOrgUsrService.page(pageBean, orgUsrQueryWrapper);
return ResponseHelper.buildResponse(page);
} }
/** /**
...@@ -274,11 +261,27 @@ public class OrgPersonController { ...@@ -274,11 +261,27 @@ public class OrgPersonController {
@TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY) @TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY)
@RequestMapping(value = "/download-template", method = RequestMethod.GET) @RequestMapping(value = "/download-template", method = RequestMethod.GET)
@ApiOperation(httpMethod = "GET", value = "导出人员模板", notes = "导出人员模板") @ApiOperation(httpMethod = "GET", value = "导出人员模板", notes = "导出人员模板")
public ResponseModel downloadTemplate(HttpServletResponse response) throws UnsupportedEncodingException { public ResponseModel downloadTemplate(HttpServletResponse response, @RequestBody List<OrgUsrDownloadTemplateVO> OrgUsrDownloadTemplateVO) throws UnsupportedEncodingException {
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMddhhmmss"); SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMddhhmmss");
List<OrgUsrDownloadTemplateVO> OrgUsrDownloadTemplateVO = new ArrayList<>(); ExcelUtils.exportExcel(OrgUsrDownloadTemplateVO, "人员信息", "人员信息", OrgUsrDownloadTemplateVO.class, simpleDateFormat.format(new Date()) + ".xls", response);
ExcelUtils.exportExcel(OrgUsrDownloadTemplateVO, "人员信息", "人员信息", OrgUsrDownloadTemplateVO.class, return ResponseHelper.buildResponse(null);
simpleDateFormat.format(new Date()) + ".xls", response);
return ResponseHelper.buildResponse(null);
} }
// /**
// *
// *
// * @param orgCode
// * @return
// */
// @TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY)
// @RequestMapping(value = "/{orgCode}/users", method = RequestMethod.GET)
// @ApiOperation(httpMethod = "GET", value = "根据orgCode查询人员", notes = "根据orgCode查询人员")
// public ResponseModel selectUsersByOrgCode(HttpServletRequest request, String pageNum, String pageSize, @PathVariable Long orgCode) {
// Map<String, Object> columnMap = new HashMap<>();
// columnMap.put("is_delete",CommonConstant.IS_DELETE_00);
// columnMap.put("biz_org_code", orgCode);
// columnMap.put("biz_org_type", CommonConstant.BIZ_ORG_TYPE_PERSON);
// return ResponseHelper.buildResponse( iOrgUsrService.listByMap(columnMap));
// }
} }
...@@ -13,6 +13,8 @@ import java.util.Map; ...@@ -13,6 +13,8 @@ import java.util.Map;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import com.yeejoin.amos.boot.module.jcs.api.dto.AlertFromValueDto;
import com.yeejoin.amos.boot.module.jcs.api.vo.AlertFormValueVo;
import com.yeejoin.amos.boot.module.jcs.api.vo.OrgMenuVo; import com.yeejoin.amos.boot.module.jcs.api.vo.OrgMenuVo;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
...@@ -111,17 +113,30 @@ public class OrgUsrController extends BaseController { ...@@ -111,17 +113,30 @@ public class OrgUsrController extends BaseController {
@TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY) @TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY)
@RequestMapping(value = "/{id}", method = RequestMethod.PUT) @RequestMapping(value = "/{id}", method = RequestMethod.PUT)
@ApiOperation(httpMethod = "PUT", value = "更新单位数据", notes = "更新单位数据") @ApiOperation(httpMethod = "PUT", value = "更新单位数据", notes = "更新单位数据")
public ResponseModel updateByIdOrgUsr(HttpServletRequest request, @RequestBody OrgUsrVo OrgUsrVo, @PathVariable Long id) { public ResponseModel updateByIdOrgUsr(HttpServletRequest request, @RequestBody OrgUsrVo OrgUsrVo, @PathVariable Long id) throws Exception {
// 修改单位信息 // 修改单位信息
OrgUsr orgUsr = new OrgUsr(); OrgUsr orgUsr = new OrgUsr();
BeanUtils.copyProperties(OrgUsrVo,orgUsr); OrgUsr oriOrgUsr = iOrgUsrService.getById(id);
iOrgUsrService.updateById(orgUsr); BeanUtils.copyProperties(OrgUsrVo, orgUsr);
iOrgUsrService.saveOrgUsr(oriOrgUsr,id);
// 动态表单 // 动态表单
List<AlertFormValue> alertFromValuelist = OrgUsrVo.getAlertFormValue(); List<AlertFormValue> alertFromValuelist = OrgUsrVo.getAlertFormValue();
// 填充主键 // 填充主键
alertFromValuelist.stream().forEach(alertFromValue -> { alertFromValuelist.stream().forEach(alertFromValue -> {
alertFromValue.setAlertCalledId(orgUsr.getSequenceNbr()); alertFromValue.setAlertCalledId(orgUsr.getSequenceNbr());
}); });
List<AlertFromValueDto> formList = iAlertFromValueService.queryByCalledId(orgUsr.getSequenceNbr());
for (AlertFormValue dis : alertFromValuelist) {
for (AlertFromValueDto src : formList) {
if (dis.getAlertFormId() == src.getAlertFormId()) {
dis.setSequenceNbr(src.getSequenceNbr());
dis.setRecDate(new Date());
dis.setRecUserId(oriOrgUsr.getRecUserId());
dis.setRecUserName(oriOrgUsr.getRecUserName());
break;
}
}
}
// 保存动态表单数据 // 保存动态表单数据
iAlertFromValueService.updateBatchById(alertFromValuelist); iAlertFromValueService.updateBatchById(alertFromValuelist);
return ResponseHelper.buildResponse(null); return ResponseHelper.buildResponse(null);
...@@ -137,19 +152,21 @@ public class OrgUsrController extends BaseController { ...@@ -137,19 +152,21 @@ public class OrgUsrController extends BaseController {
@TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY) @TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY)
@RequestMapping(value = "/{id}", method = RequestMethod.GET) @RequestMapping(value = "/{id}", method = RequestMethod.GET)
@ApiOperation(httpMethod = "GET", value = "获取单位详情", notes = "获取单位详情") @ApiOperation(httpMethod = "GET", value = "获取单位详情", notes = "获取单位详情")
public ResponseModel selectById(HttpServletRequest request, @PathVariable Long id) { public ResponseModel selectById(HttpServletRequest request, @PathVariable Long id) throws Exception {
OrgUsr orgUsr = iOrgUsrService.getById(id); OrgUsr orgUsr = iOrgUsrService.getById(id);
QueryWrapper queryWrapper = new QueryWrapper<OrgUsr>(); QueryWrapper queryWrapper = new QueryWrapper<OrgUsr>();
queryWrapper.eq("alert_called_id", id); queryWrapper.eq("alert_called_id", id);
// 动态表单数据 // 动态表单数据
List<AlertFormValue> list = iAlertFromValueService.list(queryWrapper); List<AlertFormValueVo> list = iAlertFromValueService.listByCalledId(id);
List<FormValue> formValue = new ArrayList(); List<FormValue> formValue = new ArrayList();
for (AlertFormValue alertFormValue : list) { for (AlertFormValueVo alertFormValue : list) {
if (alertFormValue.getFieldValueCode() == null){ if (alertFormValue.getFieldValueCode() == null) {
FormValue value = new FormValue(alertFormValue.getFieldCode(), alertFormValue.getFieldName(), "text", alertFormValue.getFieldValue(), alertFormValue.getIsBlock()); FormValue value = new FormValue(alertFormValue.getFieldCode(), alertFormValue.getFieldName(), alertFormValue.getFieldType(),
alertFormValue.getFieldValue(), alertFormValue.getIsBlock());
formValue.add(value); formValue.add(value);
}else { } else {
FormValue value = new FormValue(alertFormValue.getFieldCode(), alertFormValue.getFieldName(), "text", alertFormValue.getFieldValueCode(), alertFormValue.getIsBlock()); FormValue value = new FormValue(alertFormValue.getFieldCode(), alertFormValue.getFieldName(), alertFormValue.getFieldType(),
alertFormValue.getFieldValueCode(), alertFormValue.getIsBlock());
formValue.add(value); formValue.add(value);
} }
} }
...@@ -298,8 +315,8 @@ public class OrgUsrController extends BaseController { ...@@ -298,8 +315,8 @@ public class OrgUsrController extends BaseController {
* @return * @return
*/ */
@TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY) @TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY)
@RequestMapping(value = "download-template/{type}", method = RequestMethod.POST) @RequestMapping(value = "download-template", method = RequestMethod.POST)
@ApiOperation(httpMethod = "POST", value = "根据类型导出模板", notes = "根据类型导出模板") @ApiOperation(httpMethod = "POST", value = "导出模板", notes = "导出模板")
public ResponseModel downloadTemplate(HttpServletResponse response, @RequestBody List<OrgUsrDownloadTemplateVO> OrgUsrDownloadTemplateVO) throws UnsupportedEncodingException { public ResponseModel downloadTemplate(HttpServletResponse response, @RequestBody List<OrgUsrDownloadTemplateVO> OrgUsrDownloadTemplateVO) throws UnsupportedEncodingException {
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMddhhmmss"); SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMddhhmmss");
ExcelUtils.exportExcel(OrgUsrDownloadTemplateVO, "单位信息", "单位信息", OrgUsrDownloadTemplateVO.class, simpleDateFormat.format(new Date()) + ".xls", response); ExcelUtils.exportExcel(OrgUsrDownloadTemplateVO, "单位信息", "单位信息", OrgUsrDownloadTemplateVO.class, simpleDateFormat.format(new Date()) + ".xls", response);
......
...@@ -181,8 +181,7 @@ public class PowerTransferController extends BaseController { ...@@ -181,8 +181,7 @@ public class PowerTransferController extends BaseController {
@GetMapping(value = "/power/tree") @GetMapping(value = "/power/tree")
@ApiOperation(value = "力量调派资源树", notes = "力量调派资源树") @ApiOperation(value = "力量调派资源树", notes = "力量调派资源树")
public ResponseModel<Object> getPowerTree() { public ResponseModel<Object> getPowerTree() {
powerTransferService.getPowerTree(); return ResponseHelper.buildResponse(powerTransferService.getPowerTree());
return ResponseHelper.buildResponse("");
} }
} }
package com.yeejoin.amos.boot.module.jcs.biz.rule.action;
import java.util.HashMap;
import java.util.Map;
import javax.annotation.PostConstruct;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;
import com.yeejoin.amos.boot.module.jcs.api.dto.AlertCalledRo;
import com.yeejoin.amos.component.rule.RuleActionBean;
import com.yeejoin.amos.component.rule.RuleMethod;
import com.yeejoin.amos.feign.systemctl.Systemctl;
/**
*
* <pre>
* 警情报送规则动作
* </pre>
*
* @author gwb
* @version $Id: AlertCalledAction.java, v 0.1 2021年6月24日 下午4:41:22 gwb Exp $
*/
@Component
@RuleActionBean(beanLabel = "警情报送" )
public class AlertCalledAction {
public static final Logger log = LoggerFactory.getLogger(AlertCalledAction.class);
@PostConstruct
public void init() throws Exception
{
System.out.println();
}
public void sendSysMessage(String msgType, AlertCalledRo contingency) {
// ContingencyRo ro = (ContingencyRo)contingency;
// ro.setTelemetryMap(null);
// ro.setTelesignallingMap(null);
// Constructor<?> constructor;
// try {
// constructor = Class.forName(
// PACKAGEURL + result.getClass().getSimpleName() + "Message")
// .getConstructor(ActionResult.class);
// AbstractActionResultMessage<?> action = (AbstractActionResultMessage<?>) constructor.newInstance(result);
// ToipResponse toipResponse = action.buildResponse(msgType, contingency, result.toJson());
// String topic = String.format("/%s/%s/%s", serviceName, stationName,"numberPlan");
// log.info(String.format("mqtt[%s]:【 %s 】", topic, toipResponse.toJsonStr()));
// webMqttComponent.publish(topic, toipResponse.toJsonStr());
// ContingencyEvent event = new ContingencyEvent(this);
// event.setMsgBody(toipResponse.toJsonStr());
// event.setTopic(topic);
// event.setMsgType(msgType);
// event.setContingency(contingency);
// contingencyLogPublisher.publish(event);
//
// } catch (Exception e) {
// e.printStackTrace();
// }
}
/**
*
* <pre>
* 短信报送
* </pre>
*
* @param smsTemp
* @param sendType
* @param sendIds
* @param alertCalledRo
*/
@RuleMethod(methodLabel = "短信报送", project = "西咸机场119接处警规则")
public void sendcmd(String smsTemp, String sendType, String sendIds, Object object) {
AlertCalledRo alertCalledRo = (AlertCalledRo)object;
HashMap<String, String> smsParams = new HashMap<String, String>();
smsParams.put("smsType", "MOBILE_REGISTER");
smsParams.put("mobile", "15191462503");
Systemctl.smsClient.sendVerifyCode(smsParams);
// ContingencyRo ro = (ContingencyRo)contingency;
// ro.setTelemetryMap(null);
// ro.setTelesignallingMap(null);
// Constructor<?> constructor;
// try {
// constructor = Class.forName(
// PACKAGEURL + result.getClass().getSimpleName() + "Message")
// .getConstructor(ActionResult.class);
// AbstractActionResultMessage<?> action = (AbstractActionResultMessage<?>) constructor.newInstance(result);
// if ("mqtt".equals(pushType.toLowerCase())) {
// ToipResponse toipResponse = action.buildResponse(msgType, contingency, result.toJson());
// String topic = String.format("/%s/%s/%s", serviceName, stationName,"plan");
// log.info(String.format("mqtt[%s]:【 %s 】", topic, toipResponse.toJsonStr()));
// webMqttComponent.publish(topic, toipResponse.toJsonStr());
//
// ContingencyEvent event = new ContingencyEvent(this);
// event.setMsgBody(toipResponse.toJsonStr());
// event.setTopic(topic);
// event.setMsgType(msgType);
// event.setContingency(contingency);
// contingencyLogPublisher.publish(event);
// } else if ("websocket".equals(pushType.toLowerCase())){
// action.execute(msgType, contingency);
// }
//
// } catch (Exception e) {
// e.printStackTrace();
// }
}
}
package com.yeejoin.amos.boot.module.jcs.biz.service.impl; package com.yeejoin.amos.boot.module.jcs.biz.service.impl;
import java.util.Date;
import java.util.List; import java.util.List;
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.typroject.tyboot.core.rdbms.service.BaseService; import org.typroject.tyboot.core.rdbms.service.BaseService;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
...@@ -17,6 +19,8 @@ import com.yeejoin.amos.boot.module.jcs.api.mapper.AlertCalledMapper; ...@@ -17,6 +19,8 @@ import com.yeejoin.amos.boot.module.jcs.api.mapper.AlertCalledMapper;
import com.yeejoin.amos.boot.module.jcs.api.service.IAlertCalledService; import com.yeejoin.amos.boot.module.jcs.api.service.IAlertCalledService;
import com.yeejoin.amos.boot.module.jcs.api.vo.AlertCalledVo; import com.yeejoin.amos.boot.module.jcs.api.vo.AlertCalledVo;
import javax.annotation.Resource;
/** /**
* 警情接警记录 服务实现类 * 警情接警记录 服务实现类
* *
...@@ -28,7 +32,7 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall ...@@ -28,7 +32,7 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall
@Autowired @Autowired
RedisUtils redisUtils; RedisUtils redisUtils;
@Autowired @Resource
AlertCalledMapper alertCalledMapper; AlertCalledMapper alertCalledMapper;
@Autowired @Autowired
...@@ -37,6 +41,8 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall ...@@ -37,6 +41,8 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall
@Autowired @Autowired
private ESAlertCalledService eSAlertCalledService; private ESAlertCalledService eSAlertCalledService;
@Autowired
RuleAlertCalledService ruleAlertCalledService;
/** /**
* *
* <pre> * <pre>
...@@ -46,11 +52,12 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall ...@@ -46,11 +52,12 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall
* @param alertCalledVo * @param alertCalledVo
* @return * @return
*/ */
public AlertCalledVo createAlertCalled(AlertCalledVo alertCalledVo) throws Exception { @Transactional
public AlertCalledVo createAlertCalled(AlertCalledVo alertCalledVo) {
try {
// 警情基本信息 // 警情基本信息
AlertCalled alertCalled = alertCalledVo.getAlertCalled(); AlertCalled alertCalled = alertCalledVo.getAlertCalled();
alertCalled.setCallTime(new Date());
// 判断是否归并警情 // 判断是否归并警情
if (alertCalled.getFatherAlert() != null) { if (alertCalled.getFatherAlert() != null) {
// 警情归并,设置当前警情状态为结束。 // 警情归并,设置当前警情状态为结束。
...@@ -58,15 +65,18 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall ...@@ -58,15 +65,18 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall
alertCalled.setAlertStage(AlertStageEnums.JQJB.getValue()); alertCalled.setAlertStage(AlertStageEnums.JQJB.getValue());
alertCalled.setAlarmType(AlertStageEnums.JQGB.getValue()); alertCalled.setAlarmType(AlertStageEnums.JQGB.getValue());
alertCalled.setAlarmTypeCode(AlertStageEnums.JQGB.getCode()); alertCalled.setAlarmTypeCode(AlertStageEnums.JQGB.getCode());
this.save(alertCalled);
} else { } else {
// 警情报送 // 警情报送
// ****************************************************待确认开发 // ****************************************************待确认开发
alertCalled.setAlertStage(AlertStageEnums.LLDP.getValue()); alertCalled.setAlertStage(AlertStageEnums.LLDP.getValue());
alertCalled.setAlarmType(AlertStageEnums.JQCB.getValue()); alertCalled.setAlarmType(AlertStageEnums.JQCB.getValue());
alertCalled.setAlarmTypeCode(AlertStageEnums.JQCB.getCode()); alertCalled.setAlarmTypeCode(AlertStageEnums.JQCB.getCode());
this.save(alertCalled);
//调用规则
ruleAlertCalledService.fireAlertCalledRule(new AlertCalledVo(alertCalled,null));
} }
this.save(alertCalled);
// 动态表单 // 动态表单
List<AlertFormValue> alertFormValuelist = alertCalledVo.getAlertFormValue(); List<AlertFormValue> alertFormValuelist = alertCalledVo.getAlertFormValue();
// 填充警情主键 // 填充警情主键
...@@ -82,7 +92,10 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall ...@@ -82,7 +92,10 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall
*/ */
eSAlertCalledService.saveAlertCalledToES(alertCalled); eSAlertCalledService.saveAlertCalledToES(alertCalled);
return alertCalledVo; return alertCalledVo;
} catch (Exception e) {
throw new RuntimeException("报送失败,系统异常!");
}
} }
...@@ -91,6 +104,7 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall ...@@ -91,6 +104,7 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall
* type:警情相关 操作类型 0警情续报 1非警情确认 2 警情结案 * type:警情相关 操作类型 0警情续报 1非警情确认 2 警情结案
* */ * */
@Override @Override
@Transactional
public boolean updateAlertCalled(Long id, String code) { public boolean updateAlertCalled(Long id, String code) {
// TODO Auto-generated method stub // TODO Auto-generated method stub
try { try {
......
...@@ -5,6 +5,8 @@ import java.util.Collection; ...@@ -5,6 +5,8 @@ import java.util.Collection;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.stream.Collector;
import java.util.stream.Collectors;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
...@@ -43,7 +45,7 @@ public class AlertFormServiceImpl extends BaseService<AlertFromDto,AlertForm,Ale ...@@ -43,7 +45,7 @@ public class AlertFormServiceImpl extends BaseService<AlertFromDto,AlertForm,Ale
for (AlertForm alertFrom : alertFormValue) { for (AlertForm alertFrom : alertFormValue) {
if(alertFrom.getFieldType().equals("string")||alertFrom.getFieldType().equals("date")||alertFrom.getFieldType().equals("textarea")) { if(alertFrom.getFieldType().equals("string")||alertFrom.getFieldType().equals("date")||alertFrom.getFieldType().equals("textarea")) {
AlertFormVo vo = new AlertFormVo(alertFrom.getFieldCode(), alertFrom.getFieldName(), alertFrom.getFieldType(), null, AlertFormVo vo = new AlertFormVo(alertFrom.getFieldCode(), alertFrom.getFieldName(), alertFrom.getFieldType(), null,
new AlertFormValue(alertFrom.getSequenceNbr(),alertFrom.getFieldName(), alertFrom.getFieldCode(),alertFrom.isBlock())); new AlertFormValue(alertFrom.getSequenceNbr(),alertFrom.getFieldName(), alertFrom.getFieldCode(),alertFrom.getIsBlock()));
listfrom.add(vo); listfrom.add(vo);
}else { }else {
// 查询数据项 // 查询数据项
...@@ -52,7 +54,7 @@ public class AlertFormServiceImpl extends BaseService<AlertFromDto,AlertForm,Ale ...@@ -52,7 +54,7 @@ public class AlertFormServiceImpl extends BaseService<AlertFromDto,AlertForm,Ale
queryWrappercolumnMap.orderByAsc("sort_num"); queryWrappercolumnMap.orderByAsc("sort_num");
Collection<DataDictionary> listDataDictionary = iDataDictionaryService.list(queryWrappercolumnMap); Collection<DataDictionary> listDataDictionary = iDataDictionaryService.list(queryWrappercolumnMap);
AlertFormVo vo = new AlertFormVo(alertFrom.getFieldCode(), alertFrom.getFieldName(), alertFrom.getFieldType(), AlertFormVo vo = new AlertFormVo(alertFrom.getFieldCode(), alertFrom.getFieldName(), alertFrom.getFieldType(),
new Items(getdata(listDataDictionary)), new AlertFormValue(alertFrom.getSequenceNbr(),alertFrom.getFieldName(), alertFrom.getFieldCode(),alertFrom.isBlock())); new Items(getdata(listDataDictionary)), new AlertFormValue(alertFrom.getSequenceNbr(),alertFrom.getFieldName(), alertFrom.getFieldCode(),alertFrom.getIsBlock()));
listfrom.add(vo); listfrom.add(vo);
} }
} }
...@@ -69,4 +71,12 @@ public class AlertFormServiceImpl extends BaseService<AlertFromDto,AlertForm,Ale ...@@ -69,4 +71,12 @@ public class AlertFormServiceImpl extends BaseService<AlertFromDto,AlertForm,Ale
} }
return listAlertListvalue; return listAlertListvalue;
} }
public List<String> queryListByFormId(String typeCode) {
return this.queryListByTypeCode(typeCode).stream().map(c -> c.getFieldCode()).collect(Collectors.toList());
}
private List<AlertFromDto> queryListByTypeCode(String alertTypeCode) {
return this.queryForList(null, false, alertTypeCode);
}
} }
package com.yeejoin.amos.boot.module.jcs.biz.service.impl; package com.yeejoin.amos.boot.module.jcs.biz.service.impl;
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.entity.*; 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.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;
...@@ -12,19 +18,27 @@ import com.yeejoin.amos.boot.module.jcs.api.enums.SubmissionMethodEnum; ...@@ -12,19 +18,27 @@ import com.yeejoin.amos.boot.module.jcs.api.enums.SubmissionMethodEnum;
import com.yeejoin.amos.boot.module.jcs.api.mapper.AlertSubmittedMapper; import com.yeejoin.amos.boot.module.jcs.api.mapper.AlertSubmittedMapper;
import com.yeejoin.amos.boot.module.jcs.api.service.IAlertSubmittedObjectService; import com.yeejoin.amos.boot.module.jcs.api.service.IAlertSubmittedObjectService;
import com.yeejoin.amos.boot.module.jcs.api.service.IAlertSubmittedService; import com.yeejoin.amos.boot.module.jcs.api.service.IAlertSubmittedService;
import com.yeejoin.amos.boot.module.jcs.api.vo.*; import com.yeejoin.amos.boot.module.jcs.api.vo.AlertCalledVo;
import org.springframework.beans.BeanUtils;
import com.yeejoin.amos.boot.module.jcs.api.vo.AlertSubmittedExtVo; import com.yeejoin.amos.boot.module.jcs.api.vo.AlertSubmittedExtVo;
import com.yeejoin.amos.boot.module.jcs.api.vo.AlertSubmittedSMSVo;
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.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.feign.privilege.model.AgencyUserModel;
import org.apache.commons.lang3.ObjectUtils; import org.apache.commons.lang3.ObjectUtils;
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.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.Date;
import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.*; import java.util.Optional;
import java.util.stream.Collectors; import java.util.stream.Collectors;
/** /**
...@@ -48,6 +62,8 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto,Ale ...@@ -48,6 +62,8 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto,Ale
TemplateServiceImpl templateService; TemplateServiceImpl templateService;
@Autowired @Autowired
PowerTransferServiceImpl powerTransferService; PowerTransferServiceImpl powerTransferService;
@Autowired
RuleAlertCalledService ruleAlertCalledService;
@Override @Override
public SchedulingReportingVo listSchedulingByParam(AlertSubmittedDto queryParam) { public SchedulingReportingVo listSchedulingByParam(AlertSubmittedDto queryParam) {
...@@ -73,33 +89,73 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto,Ale ...@@ -73,33 +89,73 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto,Ale
public SchedulingReportingVo listReportingByParam(AlertSubmittedDto queryParam) { public SchedulingReportingVo listReportingByParam(AlertSubmittedDto queryParam) {
SchedulingReportingVo schedulingReportingVo = new SchedulingReportingVo(); SchedulingReportingVo schedulingReportingVo = new SchedulingReportingVo();
List<AlertSubmittedExtVo> alertSubmittedExtVoList = this.baseMapper.listReportingByParam(queryParam); List<AlertSubmittedExtVo> alertSubmittedExtVoList = this.baseMapper.listReportingByParam(queryParam);
schedulingReportingVo.setSchedulingReportingList(alertSubmittedExtVoList); if (ObjectUtils.isNotEmpty(alertSubmittedExtVoList)) {
// TODO 填充短信报送内容 // 组装额外信息
String _extraInfo = "报送给%s、%s";
alertSubmittedExtVoList.forEach(alertSubmittedExtVo -> {
alertSubmittedExtVo.setExtraInfo(String.format(_extraInfo, alertSubmittedExtVo.getCompanyName(),
alertSubmittedExtVo.getUserName()));
String extraInfo = String.format("已报送%d条", alertSubmittedExtVoList.size()); TemplateExtendDto template = templateService.getByType(alertSubmittedExtVo.getBusinessTypeCode());
schedulingReportingVo.setExtraInfo(extraInfo); String richContent = template.getRichContent();
alertSubmittedExtVo.setSubmissionContentValue(JSONObject.parseObject(alertSubmittedExtVo.getSubmissionContent()));
alertSubmittedExtVo.setSubmissionContent(richContent);
});
schedulingReportingVo.setSchedulingReportingList(alertSubmittedExtVoList);
String extraInfo = String.format("已报送%d条", alertSubmittedExtVoList.size());
schedulingReportingVo.setExtraInfo(extraInfo);
}
return schedulingReportingVo; return schedulingReportingVo;
} }
@Override @Override
public Boolean save(AlertSubmittedDto alertSubmittedDto) { public Boolean save(AlertSubmittedDto alertSubmittedDto, String userName) throws Exception {
saveAlertSubmitted(alertSubmittedDto, userName);
// TODO 调用规则
ruleAlertCalledService.fireAlertCalledRule(new AlertCalledVo(null,null));
return true;
}
/**
* 规则回调
*/
public void ruleCallbackAction(Object obj) {
AlertSubmittedDto alertSubmittedDto = new AlertSubmittedDto();
alertSubmittedDto.setSubmissionMethodCode(SubmissionMethodEnum.SMS.getCode());
alertSubmittedDto.setSchedulingTypeCode(AlertSchedulingTypeEnum.融合调度.getCode());
// alertSubmittedDto.setBusinessTypeCode(AlertBusinessTypeEnum.警情初报.);
saveAlertSubmitted(alertSubmittedDto, "");
}
/**
* 短信报送
*
* @param alertSubmittedDto 警情信息
* @param userName 用户名
*/
public void saveAlertSubmitted(AlertSubmittedDto alertSubmittedDto, String userName) {
// 1.保存警情记录主表 // 1.保存警情记录主表
AlertSubmitted alertSubmitted = new AlertSubmitted(); AlertSubmitted alertSubmitted = new AlertSubmitted();
alertSubmitted.setAlertCalledId(alertSubmittedDto.getAlertCalledId()); alertSubmitted.setAlertCalledId(alertSubmittedDto.getAlertCalledId());
alertSubmitted.setBusinessTypeCode(alertSubmittedDto.getBusinessTypeCode()); alertSubmitted.setBusinessTypeCode(alertSubmittedDto.getBusinessTypeCode());
Optional<AlertBusinessTypeEnum> businessTypeEnum = EnumsUtils.getEnumObject(AlertBusinessTypeEnum.class, Optional<AlertBusinessTypeEnum> businessTypeEnum = EnumsUtils.getEnumObject(AlertBusinessTypeEnum.class,
e -> e.getCode().equals(alertSubmittedDto.getBusinessTypeCode())); e -> e.getCode().equals(alertSubmittedDto.getBusinessTypeCode()));
alertSubmitted.setBusinessType(businessTypeEnum.orElse(AlertBusinessTypeEnum.警情续报).getName()); alertSubmitted.setBusinessType(businessTypeEnum.get().getName());
alertSubmitted.setCallLogId(alertSubmittedDto.getCallLogId()); alertSubmitted.setCallLogId(alertSubmittedDto.getCallLogId());
alertSubmitted.setSubmissionMethodCode(alertSubmittedDto.getSubmissionMethodCode()); alertSubmitted.setSubmissionMethodCode(alertSubmittedDto.getSubmissionMethodCode());
Optional<SubmissionMethodEnum> submissionMethodEnum = EnumsUtils.getEnumObject(SubmissionMethodEnum.class, Optional<SubmissionMethodEnum> submissionMethodEnum = EnumsUtils.getEnumObject(SubmissionMethodEnum.class,
e -> e.getCode().equals(alertSubmittedDto.getBusinessTypeCode())); e -> e.getCode().equals(alertSubmittedDto.getBusinessTypeCode()));
alertSubmitted.setSubmissionMethod(submissionMethodEnum.orElse(SubmissionMethodEnum.SMS).getName()); alertSubmitted.setSubmissionMethod(submissionMethodEnum.get().getName());
Optional<AlertSchedulingTypeEnum> alertSchedulingTypeEnum = EnumsUtils.getEnumObject(AlertSchedulingTypeEnum.class, Optional<AlertSchedulingTypeEnum> alertSchedulingTypeEnum = EnumsUtils.getEnumObject(AlertSchedulingTypeEnum.class,
e -> e.getCode().equals(alertSubmittedDto.getBusinessTypeCode())); e -> e.getCode().equals(alertSubmittedDto.getBusinessTypeCode()));
alertSubmitted.setSchedulingTypeCode(alertSubmittedDto.getSchedulingTypeCode()); alertSubmitted.setSchedulingTypeCode(alertSubmittedDto.getSchedulingTypeCode());
alertSubmitted.setSchedulingType(alertSchedulingTypeEnum.orElse(AlertSchedulingTypeEnum.融合调度).getName()); alertSubmitted.setSchedulingType(alertSchedulingTypeEnum.get().getName());
alertSubmitted.setSubmissionContent(alertSubmittedDto.getSubmitContent().toJSONString()); 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);
...@@ -113,6 +169,7 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto,Ale ...@@ -113,6 +169,7 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto,Ale
alertSubmittedObject.setType(true); alertSubmittedObject.setType(true);
alertSubmittedObject.setCompanyId(company.getCompanyId()); alertSubmittedObject.setCompanyId(company.getCompanyId());
alertSubmittedObject.setCompanyName(company.getCompanyName()); alertSubmittedObject.setCompanyName(company.getCompanyName());
alertSubmittedObject.setRecUserName(userName);
alertSubmittedObjectList.add(alertSubmittedObject); alertSubmittedObjectList.add(alertSubmittedObject);
}); });
...@@ -128,16 +185,21 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto,Ale ...@@ -128,16 +185,21 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto,Ale
alertSubmittedObject.setUserId(person.getPersonId()); alertSubmittedObject.setUserId(person.getPersonId());
alertSubmittedObject.setUserName(person.getPersonName()); alertSubmittedObject.setUserName(person.getPersonName());
alertSubmittedObject.setUserPhone(person.getPersonPhone()); alertSubmittedObject.setUserPhone(person.getPersonPhone());
alertSubmittedObject.setRecUserName(userName);
alertSubmittedObjectList.add(alertSubmittedObject); alertSubmittedObjectList.add(alertSubmittedObject);
}); });
}); });
} }
alertSubmittedObjectServiceImpl.saveBatch(alertSubmittedObjectList); alertSubmittedObjectServiceImpl.saveBatch(alertSubmittedObjectList);
// 3.发送任务消息
// 调用平台短信发送接口发送消息 // 3.更新警情状态
return true; alertCalledService.updateAlertCalled(alertSubmittedDto.getAlertCalledId(),
alertSubmittedDto.getBusinessTypeCode());
// 4.发送任务消息
// 4.1组织短信内容
// 4.2调用短信发送接口
} }
public void getAlertSubmittedContent(Long alertCalledId, ArrayList<TemplateVo> templateVos, String companyName) throws IllegalAccessException { public void getAlertSubmittedContent(Long alertCalledId, ArrayList<TemplateVo> templateVos, String companyName) throws IllegalAccessException {
...@@ -153,9 +215,9 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto,Ale ...@@ -153,9 +215,9 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto,Ale
Template template = templateService.getOne(new QueryWrapper<Template>().eq("type_code", Template template = templateService.getOne(new QueryWrapper<Template>().eq("type_code",
dataDictionary.getCode())); dataDictionary.getCode()));
List<PowerTransferCompanyVo> lastPowerTransferCompany; List<PowerTransferCompanyVo> lastPowerTransferCompany;
powerTransferService.getLastPowerTransferCompany(alertCalledId);
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());
// 获取力量调派内容 // 获取力量调派内容
StringBuilder companyNames = new StringBuilder(); StringBuilder companyNames = new StringBuilder();
StringBuilder resourcesInfo = new StringBuilder(); StringBuilder resourcesInfo = new StringBuilder();
...@@ -173,6 +235,11 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto,Ale ...@@ -173,6 +235,11 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto,Ale
} }
} }
@Override
public AlertSubmittedSMSVo getSchedulingContent(Long id) {
return this.baseMapper.getSchedulingContent(id);
}
/** /**
* 将Object对象里面的属性和值转化成Map对象 * 将Object对象里面的属性和值转化成Map对象
* *
...@@ -201,9 +268,4 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto,Ale ...@@ -201,9 +268,4 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto,Ale
} }
return map; return map;
} }
@Override
public AlertSubmittedSMSVo getSchedulingContent(Long id) {
return this.baseMapper.getSchedulingContent(id);
}
} }
package com.yeejoin.amos.boot.module.jcs.biz.service.impl; package com.yeejoin.amos.boot.module.jcs.biz.service.impl;
import com.yeejoin.amos.boot.module.jcs.api.dto.FireBrigadeResourceDto;
import com.yeejoin.amos.boot.module.jcs.api.dto.FireTeamDto; import com.yeejoin.amos.boot.module.jcs.api.dto.FireTeamDto;
import com.yeejoin.amos.boot.module.jcs.api.entity.FireTeam; import com.yeejoin.amos.boot.module.jcs.api.entity.FireTeam;
import com.yeejoin.amos.boot.module.jcs.api.mapper.FireTeamMapper; import com.yeejoin.amos.boot.module.jcs.api.mapper.FireTeamMapper;
...@@ -36,4 +37,13 @@ public class FireTeamServiceImpl extends BaseService<FireTeamDto, FireTeam,FireT ...@@ -36,4 +37,13 @@ public class FireTeamServiceImpl extends BaseService<FireTeamDto, FireTeam,FireT
return fireTeamMapper.getFireTeamCount( pageNum, pageSize, par) ; return fireTeamMapper.getFireTeamCount( pageNum, pageSize, par) ;
} }
/**
* 获取监控大队列表
*
* @return
*/
public List<FireBrigadeResourceDto> listMonitorFireBrigade() {
return fireTeamMapper.listMonitorFireBrigade();
}
} }
...@@ -4,20 +4,29 @@ package com.yeejoin.amos.boot.module.jcs.biz.service.impl; ...@@ -4,20 +4,29 @@ package com.yeejoin.amos.boot.module.jcs.biz.service.impl;
import com.yeejoin.amos.boot.module.jcs.api.dto.OrgUsrDto; import com.yeejoin.amos.boot.module.jcs.api.dto.OrgUsrDto;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.biz.common.constants.CommonConstant; import com.yeejoin.amos.boot.biz.common.constants.CommonConstant;
import com.yeejoin.amos.boot.biz.common.utils.NameUtils;
import com.yeejoin.amos.boot.module.jcs.api.entity.AlertFormValue; import com.yeejoin.amos.boot.module.jcs.api.entity.AlertFormValue;
import com.yeejoin.amos.boot.module.jcs.api.entity.OrgUsr; import com.yeejoin.amos.boot.module.jcs.api.entity.OrgUsr;
import com.yeejoin.amos.boot.module.jcs.api.mapper.OrgUsrMapper; import com.yeejoin.amos.boot.module.jcs.api.mapper.OrgUsrMapper;
import com.yeejoin.amos.boot.module.jcs.api.service.IOrgUsrService; import com.yeejoin.amos.boot.module.jcs.api.service.IOrgUsrService;
import com.yeejoin.amos.boot.module.jcs.api.vo.FormValue;
import com.yeejoin.amos.boot.module.jcs.api.vo.OrgMenuVo; import com.yeejoin.amos.boot.module.jcs.api.vo.OrgMenuVo;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
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.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import java.lang.reflect.Method; import java.lang.reflect.Method;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection; import java.util.Collection;
import java.util.Date;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -33,6 +42,8 @@ import java.util.Map; ...@@ -33,6 +42,8 @@ import java.util.Map;
public class OrgUsrServiceImpl extends BaseService<OrgUsrDto,OrgUsr,OrgUsrMapper> implements IOrgUsrService { public class OrgUsrServiceImpl extends BaseService<OrgUsrDto,OrgUsr,OrgUsrMapper> implements IOrgUsrService {
@Autowired @Autowired
AlertFormValueServiceImpl alertFormValueServiceImpl; AlertFormValueServiceImpl alertFormValueServiceImpl;
@Autowired
AlertFormServiceImpl alertFormServiceImpl;
@Override @Override
public String selectUpUnitByParam(String biz_org_code) { public String selectUpUnitByParam(String biz_org_code) {
...@@ -241,6 +252,74 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto,OrgUsr,OrgUsrMappe ...@@ -241,6 +252,74 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto,OrgUsr,OrgUsrMappe
} }
return companyPersonMsg; return companyPersonMsg;
} }
public IPage<Map<String, Object>> pagePerson(String pageNum, String pageSize, OrgUsr orgUsr) {
IPage<Map<String, Object>> pageBean = null;
if (StringUtils.isBlank(pageNum) || StringUtils.isBlank(pageSize)) {
pageBean = new Page<>(0, Long.MAX_VALUE);
} else {
pageBean = new Page<>(Integer.parseInt(pageNum), Integer.parseInt(pageSize));
}
QueryWrapper<OrgUsr> orgUsrQueryWrapper = new QueryWrapper<>();
Class<? extends OrgUsr> aClass = orgUsr.getClass();
Arrays.stream(aClass.getDeclaredFields()).forEach(field -> {
try {
field.setAccessible(true);
Object o = field.get(orgUsr);
if (o != null) {
Class<?> type = field.getType();
String name = NameUtils.camel2Underline(field.getName());
if (type.equals(Integer.class)) {
Integer fileValue = (Integer) field.get(orgUsr);
orgUsrQueryWrapper.eq(name, fileValue);
} else if (type.equals(Long.class)) {
Long fileValue = (Long) field.get(orgUsr);
orgUsrQueryWrapper.eq(name, fileValue);
} else if (type.equals(String.class)) {
String fileValue = (String) field.get(orgUsr);
orgUsrQueryWrapper.eq(name, fileValue);
} else {
String fileValue = (String) field.get(orgUsr);
orgUsrQueryWrapper.eq(name, fileValue);
}
}
} catch (Exception e) {
}
});
pageBean.setTotal(this.baseMapper.selectCount(orgUsrQueryWrapper));
Map<String, Object> map = Bean.BeantoMap(orgUsr);
map.put("pageNum", (pageBean.getCurrent() -1) * pageBean.getSize());
map.put("pageSize", pageBean.getSize());
map.put("fields", alertFormServiceImpl.queryListByFormId("246"));
map.put("alertTypeCode", "246");
pageBean.setRecords(this.baseMapper.selectPersonList(map));
return pageBean;
}
@Override
public List<FormValue> getFormValue(QueryWrapper queryWrapper) throws Exception {
List<AlertFormValue> list = alertFormValueServiceImpl.list(queryWrapper);
List<FormValue> formValue = new ArrayList();
for (AlertFormValue alertFormValue : list) {
if (alertFormValue.getFieldValueCode() == null){
FormValue value = new FormValue(alertFormValue.getFieldCode(), alertFormValue.getFieldName(), "text", alertFormValue.getFieldValue(), alertFormValue.getIsBlock());
formValue.add(value);
}else {
FormValue value = new FormValue(alertFormValue.getFieldCode(), alertFormValue.getFieldName(), "text", alertFormValue.getFieldValueCode(), alertFormValue.getIsBlock());
formValue.add(value);
}
}
return formValue;
}
@Override
public void saveOrgUsr(OrgUsr oriOrgUsr,Long id) throws Exception {
OrgUsr orgUsr = new OrgUsr();
orgUsr.setBizOrgType(CommonConstant.BIZ_ORG_TYPE_PERSON);
orgUsr.setSequenceNbr(id);
orgUsr.setRecDate(new Date());
orgUsr.setRecUserId(oriOrgUsr.getRecUserId());
orgUsr.setRecUserName(oriOrgUsr.getRecUserName());
updateById(orgUsr);
}
} }
...@@ -2,9 +2,7 @@ package com.yeejoin.amos.boot.module.jcs.biz.service.impl; ...@@ -2,9 +2,7 @@ package com.yeejoin.amos.boot.module.jcs.biz.service.impl;
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.TreeParser; import com.yeejoin.amos.boot.module.jcs.api.dto.FireBrigadeResourceDto;
import com.yeejoin.amos.boot.module.jcs.api.dto.FireCarDto;
import com.yeejoin.amos.boot.module.jcs.api.dto.FireTeamDto;
import com.yeejoin.amos.boot.module.jcs.api.dto.PowerTransferCompanyDto; import com.yeejoin.amos.boot.module.jcs.api.dto.PowerTransferCompanyDto;
import com.yeejoin.amos.boot.module.jcs.api.dto.PowerTransferCompanyResourcesDto; import com.yeejoin.amos.boot.module.jcs.api.dto.PowerTransferCompanyResourcesDto;
import com.yeejoin.amos.boot.module.jcs.api.dto.PowerTransferDto; import com.yeejoin.amos.boot.module.jcs.api.dto.PowerTransferDto;
...@@ -29,7 +27,6 @@ import org.springframework.beans.BeanUtils; ...@@ -29,7 +27,6 @@ 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;
...@@ -115,46 +112,60 @@ public class PowerTransferServiceImpl extends BaseService<PowerTransferDto, Powe ...@@ -115,46 +112,60 @@ public class PowerTransferServiceImpl extends BaseService<PowerTransferDto, Powe
} }
@Override @Override
public void getPowerTree() { public List<FireBrigadeResourceDto> getPowerTree() {
List<FireBrigadeResourceDto> fireBrigadeResourceList = Lists.newArrayList();
// 1.调用装备服务接口查询车辆列表 // 1.调用装备服务接口查询车辆列表
List<FireCarDto> fireCarDtoList = Lists.newArrayList(); List<FireBrigadeResourceDto> fireCarDtoList = Lists.newArrayList();
ResponseModel<Object> result = equipFeignService.getFireCarListAll(); ResponseModel<Object> result = equipFeignService.getFireCarListAll();
if (!ObjectUtils.isEmpty(result)) { if (!ObjectUtils.isEmpty(result)) {
List<Map<String, Object>> fireCarListMapList = (List<Map<String, Object>>) result.getResult(); List<Map<String, Object>> fireCarListMapList = (List<Map<String, Object>>) result.getResult();
fireCarListMapList.stream().filter(car -> ObjectUtils.isNotEmpty(car.get("teamId"))).forEach(car -> { fireCarListMapList.stream().filter(car -> ObjectUtils.isNotEmpty(car.get("teamId"))).forEach(car -> {
FireCarDto fireCarDto = (FireCarDto) Bean.mapToBean(car, FireCarDto.class); FireBrigadeResourceDto fireCarDto = (FireBrigadeResourceDto) Bean.mapToBean(car, FireBrigadeResourceDto.class);
if (FireCarStatusEnum.onDuty.getCode().equals(fireCarDto.getCarState())) { if (FireCarStatusEnum.onDuty.getCode().equals(fireCarDto.getCarState())) {
fireCarDto.setCarStateDesc(FireCarStatusEnum.onDuty.getName()); fireCarDto.setCarStateDesc(FireCarStatusEnum.onDuty.getName());
} else { } else {
fireCarDto.setCarState(FireCarStatusEnum.out.getCode());
fireCarDto.setCarStateDesc(FireCarStatusEnum.out.getName()); fireCarDto.setCarStateDesc(FireCarStatusEnum.out.getName());
} }
fireCarDtoList.add(fireCarDto); fireCarDtoList.add(fireCarDto);
}); });
} }
Long onDutyCarCount =
fireCarDtoList.stream().filter(car -> FireCarStatusEnum.onDuty.getCode().equals(car.getCarState())).count();
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()));
List<FireTeam> monitorFireBrigadeList = fireTeamService.list(new QueryWrapper<FireTeam>().eq("type_code", Map<String, List<FireBrigadeResourceDto>> resultMap =
FireBrigadeTypeEnum.监控大队.getCode())); fireCarDtoList.stream().collect(Collectors.groupingBy(FireBrigadeResourceDto::getTeamId));
resultMap.keySet().forEach(brigadeId -> {
// 3.组装专职消防队伍车辆 FireBrigadeResourceDto fireCarResourceDto = new FireBrigadeResourceDto();
// List<FireTeamDto> fireTeamDtoList = Lists.newArrayList(); FireTeam fireTeam =
// if (!CollectionUtils.isEmpty(fullTimeFireBrigadeList)) { fullTimeFireBrigadeList.stream().filter(team -> brigadeId.equals(team.getSequenceNbr().toString())).findAny().orElse(new FireTeam());
// fullTimeFireBrigadeList.forEach(brigade -> { if (ObjectUtils.isNotEmpty(fireTeam.getSequenceNbr())) {
// FireTeamDto teamDto = new FireTeamDto(); fireCarResourceDto.setId(fireTeam.getSequenceNbr().toString());
// BeanUtils.copyProperties(brigade, teamDto); fireCarResourceDto.setType(FireBrigadeTypeEnum.专职消防队.getKey());
// teamDto.setType(FireBrigadeTypeEnum.专职消防队.getKey()); fireCarResourceDto.setName(fireTeam.getName());
// fireCarResourceDto.getChildren().addAll(resultMap.get(brigadeId));
//// teamDto.setChildren(); fireCarResourceDto.setOutCount(outCarCount.intValue());
// }); fireCarResourceDto.setOnDutyCount(onDutyCarCount.intValue());
// } fireBrigadeResourceList.add(fireCarResourceDto);
fireCarDtoList.stream().collect(Collectors.groupingBy(FireCarDto::getTeamId)); }
try { });
TreeParser.getTree(null, monitorFireBrigadeList, FireTeam.class.getName(), "getSequenceNbr", 2, "getName",
"getParent"); // 3.消防队伍-监控大队
} catch (Exception e) { List<FireBrigadeResourceDto> monitorFireBrigadeList = fireTeamService.listMonitorFireBrigade();
e.printStackTrace(); FireBrigadeResourceDto monitorResourceDto = new FireBrigadeResourceDto();
} monitorResourceDto.setId("0");
monitorResourceDto.setName(FireBrigadeTypeEnum.监控大队.getName());
monitorResourceDto.setType(FireBrigadeTypeEnum.监控大队.getKey());
monitorResourceDto.setChildren(monitorFireBrigadeList);
fireBrigadeResourceList.add(monitorResourceDto);
return fireBrigadeResourceList;
} }
private List<PowerTransferCompanyResources> DtoEntityBatchConvert(List<PowerTransferCompanyResourcesDto> powerTransferCompanyResourcesDtoList, Long powerTransferCompanySequenceNbr) { private List<PowerTransferCompanyResources> DtoEntityBatchConvert(List<PowerTransferCompanyResourcesDto> powerTransferCompanyResourcesDtoList, Long powerTransferCompanySequenceNbr) {
......
package com.yeejoin.amos.boot.module.jcs.biz.service.impl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import org.typroject.tyboot.core.restful.exception.instance.BadRequest;
import com.yeejoin.amos.boot.module.jcs.api.dto.AlertCalledRo;
import com.yeejoin.amos.boot.module.jcs.api.entity.AlertCalled;
import com.yeejoin.amos.boot.module.jcs.api.vo.AlertCalledVo;
import com.yeejoin.amos.component.rule.RuleTrigger;
/**
*
* <pre>
* 规则触发服务
* </pre>
*
* @author gwb
* @version $Id: RuleAlertCalledService.java, v 0.1 2021年6月24日 下午6:30:44 gwb Exp $
*/
@Service
public class RuleAlertCalledService {
@Autowired
private RuleTrigger ruleTrigger;
/**
*
* <pre>
* 触发警情报送规则
* </pre>
*
* @param alertCalled
* @return
* @throws Exception
*/
public Boolean fireAlertCalledRule(AlertCalledVo alertCalledVo) throws Exception
{
AlertCalled alertCalled = alertCalledVo.getAlertCalled();
if (ValidationUtil.isEmpty(alertCalled))
{
throw new BadRequest("参数校验失败.");
}
//构建警情报送规则对象
AlertCalledRo alertCalledRo = new AlertCalledRo();
alertCalledRo.setSequenceNbr(alertCalled.getSequenceNbr());
alertCalledRo.setAlertType(alertCalled.getAlertType());
alertCalledRo.setAlertTypeCode(alertCalled.getAlertTypeCode());
alertCalledRo.setAlertTypeCode("229");
//触发规则
ruleTrigger.publish(alertCalledRo, "西咸机场119接处警规则/alertCalledRule", new String[0]);
return true;
}
}
...@@ -12,12 +12,18 @@ ...@@ -12,12 +12,18 @@
<dependencies> <dependencies>
<!-- ES-->
<dependency> <dependency>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-elasticsearch</artifactId> <artifactId>spring-boot-starter-data-elasticsearch</artifactId>
</dependency> </dependency>
<!-- amos rule-->
<dependency>
<groupId>com.yeejoin</groupId>
<artifactId>amos-component-rule</artifactId>
<version>1.4.7</version>
</dependency>
</dependencies> </dependencies>
<modules> <modules>
......
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