Commit 8ca07d33 authored by tangwei's avatar tangwei

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

parents cec6d94d f2c126fa
package com.yeejoin.amos.boot.biz.common.dto; package com.yeejoin.amos.boot.biz.common.dto;
import java.io.Serializable;
import java.util.Date;
import com.alibaba.excel.annotation.ExcelIgnore; import com.alibaba.excel.annotation.ExcelIgnore;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/** /**
* 基础DTO * 基础DTO
* @author kinky * @author kinky
...@@ -30,10 +30,7 @@ public class BaseDto implements Serializable{ ...@@ -30,10 +30,7 @@ public class BaseDto implements Serializable{
@ApiModelProperty(value = "更新人") @ApiModelProperty(value = "更新人")
protected String recUserId; protected String recUserId;
/**
* 是否删除
*/
@ExcelIgnore @ExcelIgnore
@TableField(value = "is_delete") @ApiModelProperty(value = "是否删除")
private Boolean isDelete; private Boolean isDelete;
} }
...@@ -96,5 +96,13 @@ public class AlertCalledDto extends BaseDto{ ...@@ -96,5 +96,13 @@ public class AlertCalledDto extends BaseDto{
@ApiModelProperty(value = "发送人名称") @ApiModelProperty(value = "发送人名称")
private String recUserName; private String recUserName;
@ApiModelProperty(value = "接警时间开始---用于列表过滤")
private Date callTimeStart ;
@ApiModelProperty(value = "接警时间结束---用于列表过滤")
private Date callTimeEnd ;
@ApiModelProperty(value = "响应级别字典code 为了过滤用(只有航空器故障有)")
private String responseLevelCode;
} }
package com.yeejoin.amos.boot.module.jcs.api.vo; package com.yeejoin.amos.boot.module.jcs.api.dto;
import com.yeejoin.amos.boot.biz.common.dto.BaseDto;
import com.yeejoin.amos.boot.module.jcs.api.entity.AlertCalled; import com.yeejoin.amos.boot.module.jcs.api.entity.AlertCalled;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.List; import java.util.List;
...@@ -11,19 +15,21 @@ import java.util.List; ...@@ -11,19 +15,21 @@ import java.util.List;
* 动态表单值 * 动态表单值
* */ * */
@Data @Data
public class AlertCalledFormVo { @EqualsAndHashCode(callSuper = true)
@ApiModelProperty(value = "警情基本信息") @ApiModel(value="AlertCalledFormDto", description=" 动态表单值")
public class AlertCalledFormDto extends BaseDto{
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "警情基本信息")
private AlertCalled alertCalled; private AlertCalled alertCalled;
@ApiModelProperty(value = "动态表单值") @ApiModelProperty(value = "动态表单值")
private List<FormValue> dynamicFormAlert; private List<FormValue> dynamicFormAlert;
public AlertCalledFormVo(AlertCalled alertCalled, List<FormValue> formValue) { public AlertCalledFormDto(AlertCalled alertCalled, List<FormValue> formValue) {
this.alertCalled = alertCalled; this.alertCalled = alertCalled;
this.dynamicFormAlert = formValue; this.dynamicFormAlert = formValue;
} }
public AlertCalledFormVo() {
}
} }
package com.yeejoin.amos.boot.module.jcs.api.vo; package com.yeejoin.amos.boot.module.jcs.api.dto;
import java.util.List;
import com.yeejoin.amos.boot.biz.common.dto.BaseDto;
import com.yeejoin.amos.boot.module.jcs.api.entity.AlertCalled; import com.yeejoin.amos.boot.module.jcs.api.entity.AlertCalled;
import com.yeejoin.amos.boot.module.jcs.api.entity.AlertFormValue; import com.yeejoin.amos.boot.module.jcs.api.entity.AlertFormValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.List;
/** /**
* 保存警情接警记录 * 警情接警记录对象集合
* * @author system
* @author tb *
* @date 2021-06-17 */
*/
@Data @Data
public class AlertCalledVo{ @EqualsAndHashCode(callSuper = true)
@ApiModel(value="AlertCalledObjsDto", description="警情接警记录对象集合")
public class AlertCalledObjsDto extends BaseDto{
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "警情基本信息") @ApiModelProperty(value = "警情基本信息")
private AlertCalled alertCalled; private AlertCalled alertCalled;
@ApiModelProperty(value = "动态表单值") @ApiModelProperty(value = "动态表单值")
private List<AlertFormValue> alertFormValue; private List<AlertFormValue> alertFormValue;
public AlertCalledVo(AlertCalled alertCalled, List<AlertFormValue> alertFormValue) {
this.alertCalled = alertCalled;
this.alertFormValue = alertFormValue;
}
public AlertCalledVo() {
}
} }
...@@ -14,7 +14,7 @@ import lombok.EqualsAndHashCode; ...@@ -14,7 +14,7 @@ import lombok.EqualsAndHashCode;
@Data @Data
@EqualsAndHashCode(callSuper = true) @EqualsAndHashCode(callSuper = true)
@ApiModel(value="AlertFromDto", description="警情表单") @ApiModel(value="AlertFromDto", description="警情表单")
public class AlertFromDto extends BaseDto{ public class AlertFormDto extends BaseDto{
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
......
package com.yeejoin.amos.boot.module.jcs.api.vo; package com.yeejoin.amos.boot.module.jcs.api.dto;
import java.io.Serializable;
import com.yeejoin.amos.boot.module.jcs.api.entity.AlertFormValue; import com.yeejoin.amos.boot.module.jcs.api.entity.AlertFormValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
/** /**
* 表 * 表表单初始值
* *
* @author tb * @author tb
* @date 2021-06-17 * @date 2021-06-17
*/ */
@Data @Data
public class AlertFormVo{ @ApiModel(value="AlertFormInitDto", description="表单初始值")
public class AlertFormInitDto implements Serializable{
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
...@@ -32,11 +37,11 @@ public class AlertFormVo{ ...@@ -32,11 +37,11 @@ public class AlertFormVo{
@ApiModelProperty(value = "提交表单附加字段") @ApiModelProperty(value = "提交表单附加字段")
private AlertFormValue formItemDescr; private AlertFormValue formItemDescr;
public AlertFormVo() { public AlertFormInitDto() {
super(); super();
} }
public AlertFormVo(String key, String label, String type, Items data) { public AlertFormInitDto(String key, String label, String type, Items data) {
super(); super();
this.key = key; this.key = key;
this.label = label; this.label = label;
......
...@@ -14,7 +14,7 @@ import lombok.EqualsAndHashCode; ...@@ -14,7 +14,7 @@ import lombok.EqualsAndHashCode;
@Data @Data
@EqualsAndHashCode(callSuper = true) @EqualsAndHashCode(callSuper = true)
@ApiModel(value="AlertFromTypeDto", description="动态表单类型") @ApiModel(value="AlertFromTypeDto", description="动态表单类型")
public class AlertFromTypeDto extends BaseDto { public class AlertFormTypeDto extends BaseDto {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
......
...@@ -7,14 +7,14 @@ import lombok.Data; ...@@ -7,14 +7,14 @@ import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
/** /**
* *
* *表单实例值
* @author tb * @author tb
* @date 2021-06-17 * @date 2021-06-17
*/ */
@Data @Data
@EqualsAndHashCode(callSuper = true) @EqualsAndHashCode(callSuper = true)
@ApiModel(value="AlertFromValueDto", description="") @ApiModel(value="AlertFromValueDto", description="表单实例值")
public class AlertFromValueDto extends BaseDto { public class AlertFormValueDto extends BaseDto {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
...@@ -41,8 +41,10 @@ public class AlertFromValueDto extends BaseDto { ...@@ -41,8 +41,10 @@ public class AlertFromValueDto extends BaseDto {
@ApiModelProperty(value = "操作人名称") @ApiModelProperty(value = "操作人名称")
private String recUserName; private String recUserName;
@ApiModelProperty(value = "是否一行显示")
private Boolean block; private Boolean block;
private Boolean isDelete; @ApiModelProperty(value = "表单类型")
private String fieldType;
} }
package com.yeejoin.amos.boot.module.jcs.api.vo; package com.yeejoin.amos.boot.module.jcs.api.dto;
/* /*
* *
* 下拉表单值 * 下拉表单值
* */ * */
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
@Data @Data
public class AlertListvalue { @ApiModel(value="AlertListvalue", description="下拉表单值")
public class AlertListvalue implements Serializable{
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "key") @ApiModelProperty(value = "key")
private String key; private String key;
@ApiModelProperty(value = "名称") @ApiModelProperty(value = "名称")
......
package com.yeejoin.amos.boot.module.jcs.api.dto; package com.yeejoin.amos.boot.module.jcs.api.dto;
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; import lombok.EqualsAndHashCode;
...@@ -15,8 +14,9 @@ import lombok.EqualsAndHashCode; ...@@ -15,8 +14,9 @@ import lombok.EqualsAndHashCode;
*/ */
@Data @Data
@EqualsAndHashCode(callSuper = true) @EqualsAndHashCode(callSuper = true)
public class ESAlertCalledRequestDto extends AlertCalledVo public class ESAlertCalledRequestDto extends AlertCalledObjsDto
{ {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "警情状态") @ApiModelProperty(value = "警情状态")
private String[] alertStatus; private String[] alertStatus;
} }
package com.yeejoin.amos.boot.module.jcs.api.vo; package com.yeejoin.amos.boot.module.jcs.api.dto;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
/** /**
* 消防队伍 * 消防队伍卡片列表dto
* *
* @author tb * @author tb
* @date 2021-06-07 * @date 2021-06-07
*/ */
@Data @Data
@ApiModel(value = "FireTeamVo", description = "消防队伍") @ApiModel(value = "FireTeamCardDto", description = "消防队伍卡片列表dto")
public class FireTeamVo { public class FireTeamCardDto {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "消防队伍图片") @ApiModelProperty(value = "消防队伍图片")
private String img; private String img;
@ApiModelProperty(value = "队伍名称") @ApiModelProperty(value = "队伍名称")
...@@ -32,13 +31,11 @@ public class FireTeamVo { ...@@ -32,13 +31,11 @@ public class FireTeamVo {
@ApiModelProperty(value = "队伍id") @ApiModelProperty(value = "队伍id")
private Long sequenceNbr; private Long sequenceNbr;
@ApiModelProperty(value = "队伍车数量") @ApiModelProperty(value = "队伍车数量")
private Double carNum = 0D; private Integer carNum = 0;
@ApiModelProperty(value = "队伍装备数量") @ApiModelProperty(value = "队伍人员数量")
private Double eqNum = 0D; private Integer fighterNum = 0;
@ApiModelProperty(value = "出动数量") @ApiModelProperty(value = "出动数量")
private Integer dispatchNum; private Integer dispatchNum;
@ApiModelProperty(value = "执勤数量") @ApiModelProperty(value = "执勤数量")
private Integer onDutyNum; private Integer onDutyNum;
} }
package com.yeejoin.amos.boot.module.jcs.api.dto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
*
* @author DELL
*/
@Data
public class FireTeamListDto {
@ApiModelProperty(value = "单位名称")
private String name;
@ApiModelProperty(value = "机构code")
private String companyCode;
@ApiModelProperty(value = "队伍code")
private String typeCode;
@ApiModelProperty(value = "父级id")
private Long parent;
}
package com.yeejoin.amos.boot.module.jcs.api.vo; package com.yeejoin.amos.boot.module.jcs.api.dto;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
...@@ -13,9 +16,11 @@ import lombok.Data; ...@@ -13,9 +16,11 @@ import lombok.Data;
* 动态表单值 * 动态表单值
*/ */
@Data @Data
public class FormValue { @ApiModel(value="FormValue", description="动态表单值")
public class FormValue implements Serializable{
@ApiModelProperty(value = "key") private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "key")
private String key; private String key;
@ApiModelProperty(value = "label") @ApiModelProperty(value = "label")
private String label; private String label;
......
package com.yeejoin.amos.boot.module.jcs.api.vo; package com.yeejoin.amos.boot.module.jcs.api.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import java.io.Serializable;
import java.util.List; import java.util.List;
/** /**
...@@ -10,8 +12,11 @@ import java.util.List; ...@@ -10,8 +12,11 @@ import java.util.List;
* *
**/ **/
@Data @Data
public class Items { @ApiModel(value="FormValue", description="动态表单值")
public class Items implements Serializable{
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "初始化值") @ApiModelProperty(value = "初始化值")
private List<AlertListvalue> items; private List<AlertListvalue> items;
......
package com.yeejoin.amos.boot.module.jcs.api.dto; package com.yeejoin.amos.boot.module.jcs.api.dto;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.yeejoin.amos.boot.module.jcs.api.vo.FormValue;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
......
...@@ -2,7 +2,6 @@ package com.yeejoin.amos.boot.module.jcs.api.dto; ...@@ -2,7 +2,6 @@ package com.yeejoin.amos.boot.module.jcs.api.dto;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.yeejoin.amos.boot.biz.common.entity.BaseEntity; import com.yeejoin.amos.boot.biz.common.entity.BaseEntity;
import com.yeejoin.amos.boot.module.jcs.api.vo.FormValue;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
......
package com.yeejoin.amos.boot.module.jcs.api.dto; package com.yeejoin.amos.boot.module.jcs.api.dto;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.yeejoin.amos.boot.module.jcs.api.vo.FormValue;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
......
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.AlertFormValueDto;
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.vo.AlertFormValueVo;
import java.util.List; import java.util.List;
...@@ -14,6 +14,6 @@ import java.util.List; ...@@ -14,6 +14,6 @@ import java.util.List;
*/ */
public interface AlertFormValueMapper extends BaseMapper<AlertFormValue> { public interface AlertFormValueMapper extends BaseMapper<AlertFormValue> {
public List<AlertFormValueVo> selectListByCalledId(Long id); public List<AlertFormValueDto> selectListByCalledId(Long id);
} }
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.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.module.jcs.api.dto.FireBrigadeResourceDto; import com.yeejoin.amos.boot.module.jcs.api.dto.FireBrigadeResourceDto;
import com.yeejoin.amos.boot.module.jcs.api.dto.FireTeamCardDto;
import com.yeejoin.amos.boot.module.jcs.api.dto.FireTeamListDto;
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.FireTeamVo;
import org.apache.ibatis.annotations.Select;
import java.util.List; import java.util.List;
import java.util.Map;
/** /**
* 消防队伍 Mapper 接口 * 消防队伍 Mapper 接口
...@@ -18,22 +18,22 @@ import java.util.Map; ...@@ -18,22 +18,22 @@ import java.util.Map;
*/ */
public interface FireTeamMapper extends BaseMapper<FireTeam> { public interface FireTeamMapper extends BaseMapper<FireTeam> {
@Select("<script>" // @Select("<script>"
+ "select a.sequence_nbr sequenceNbr, a.img,a.name,a.contact_user contactUser,a.contact_phone contactPhone, a.address from cb_fire_team a where a.is_delete=0" // + "select a.sequence_nbr sequenceNbr, a.img,a.name,a.contact_user contactUser,a.contact_phone contactPhone, a.address from cb_fire_team a where a.is_delete=0"
+ "<if test='par.parent!=null'>" + "and a.parent= #{par.parent}" + "</if>" // + "<if test='par.parent!=null'>" + "and a.parent= #{par.parent}" + "</if>"
+ "<if test='par.typeCode!=null'>" + "and a.type_code= #{par.typeCode}" + "</if>" // + "<if test='par.typeCode!=null'>" + "and a.type_code= #{par.typeCode}" + "</if>"
+ "<if test='par.companyCode!=null'>" + "and a.company_code= #{par.companyCode}" + "</if>" // + "<if test='par.companyCode!=null'>" + "and a.company_code= #{par.companyCode}" + "</if>"
+ "<if test='par.name!=null'>" + "and a.name= #{par.name}" + "</if>" // + "<if test='par.name!=null'>" + "and a.name= #{par.name}" + "</if>"
+ "</script>") // + "</script>")
List<FireTeamVo> getFireTeam(int pageNum, int pageSize, FireTeamListVo par); // List<FireTeamVo> getFireTeam(int pageNum, int pageSize, FireTeamListVo par);
@Select("<script>" // @Select("<script>"
+ "select COUNT(a.sequence_nbr) num from cb_fire_team a where a.is_delete=0" // + "select COUNT(a.sequence_nbr) num from cb_fire_team a where a.is_delete=0"
+ "<if test='par.parent!=null'>" + "and a.parent= #{par.parent}" + "</if>" // + "<if test='par.parent!=null'>" + "and a.parent= #{par.parent}" + "</if>"
+ "<if test='par.typeCode!=null'>" + "and a.type_code= #{par.typeCode}" + "</if>" // + "<if test='par.typeCode!=null'>" + "and a.type_code= #{par.typeCode}" + "</if>"
+ "<if test='par.companyCode!=null'>" + "and a.company_code= #{par.companyCode}" + "</if>" // + "<if test='par.companyCode!=null'>" + "and a.company_code= #{par.companyCode}" + "</if>"
+ "<if test='par.name!=null'>" + " and a.name= #{par.name}" + "</if>" // + "<if test='par.name!=null'>" + " and a.name= #{par.name}" + "</if>"
+ "</script>") // + "</script>")
Map<String, Long> getFireTeamCount(int pageNum, int pageSize, FireTeamListVo par); // Map<String, Long> getFireTeamCount(int pageNum, int pageSize, FireTeamListVo par);
/** /**
* 返回监控大队信息列表 * 返回监控大队信息列表
...@@ -41,4 +41,13 @@ public interface FireTeamMapper extends BaseMapper<FireTeam> { ...@@ -41,4 +41,13 @@ public interface FireTeamMapper extends BaseMapper<FireTeam> {
* @return * @return
*/ */
List<FireBrigadeResourceDto> listMonitorFireBrigade(); List<FireBrigadeResourceDto> listMonitorFireBrigade();
/**
* 查询消防队伍卡片分页列表
*
* @param page
* @param par
* @return
*/
IPage<FireTeamCardDto> getFireTeamForPage(Page page, FireTeamListDto par);
} }
package com.yeejoin.amos.boot.module.jcs.api.service; package com.yeejoin.amos.boot.module.jcs.api.service;
import com.yeejoin.amos.boot.module.jcs.api.vo.FireTeamListVo;
import com.yeejoin.amos.boot.module.jcs.api.vo.FireTeamVo;
import java.util.List;
import java.util.Map;
/** /**
* 消防队伍 服务类 * 消防队伍 服务类
* *
...@@ -13,8 +7,4 @@ import java.util.Map; ...@@ -13,8 +7,4 @@ import java.util.Map;
* @date 2021-06-07 * @date 2021-06-07
*/ */
public interface IFireTeamService { public interface IFireTeamService {
List<FireTeamVo> getFireTeam(int pageNum, int pageSize, FireTeamListVo par);
Map<String, Long> getFireTeamCount(int pageNum, int pageSize, FireTeamListVo par);
} }
...@@ -5,6 +5,7 @@ import java.util.List; ...@@ -5,6 +5,7 @@ import java.util.List;
import java.util.Map; import java.util.Map;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.yeejoin.amos.boot.module.jcs.api.dto.FormValue;
import com.yeejoin.amos.boot.module.jcs.api.dto.OrgDepartmentDto; import com.yeejoin.amos.boot.module.jcs.api.dto.OrgDepartmentDto;
import com.yeejoin.amos.boot.module.jcs.api.dto.OrgDepartmentFormDto; import com.yeejoin.amos.boot.module.jcs.api.dto.OrgDepartmentFormDto;
import com.yeejoin.amos.boot.module.jcs.api.dto.OrgMenuDto; import com.yeejoin.amos.boot.module.jcs.api.dto.OrgMenuDto;
...@@ -14,7 +15,6 @@ import com.yeejoin.amos.boot.module.jcs.api.dto.OrgUsrDto; ...@@ -14,7 +15,6 @@ import com.yeejoin.amos.boot.module.jcs.api.dto.OrgUsrDto;
import com.yeejoin.amos.boot.module.jcs.api.dto.OrgUsrFormDto; import com.yeejoin.amos.boot.module.jcs.api.dto.OrgUsrFormDto;
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.vo.FormValue;
......
package com.yeejoin.amos.boot.module.jcs.api.vo;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yeejoin.amos.boot.biz.common.entity.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import java.util.Date;
/**
* 警情接警记录
*
* @author tb
* @date 2021-06-17
*/
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("jc_alert_called")
@ApiModel(value="AlertCalled对象", description="警情接警记录")
public class AlertCalledListVo extends BaseEntity {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "警情状态")
private Boolean alertStatus;
@ApiModelProperty(value = "系统/人工")
private String type;
@ApiModelProperty(value = "警情阶段")
private String alertStage;
@ApiModelProperty(value = "报警类型")
private String alarmType;
@ApiModelProperty(value = "响应级别字典code 为了过滤用(只有航空器故障有)")
private String responseLevelCode;
@ApiModelProperty(value = "报警类型code")
private String alarmTypeCode;
@ApiModelProperty(value = "报警方式")
private String alarmMode;
@ApiModelProperty(value = "报警方式code")
private String alarmModeCode;
@ApiModelProperty(value = "通话记录信息id")
private Integer callRecordId;
@ApiModelProperty(value = "父警情id")
private Long fatherAlert;
@ApiModelProperty(value = "联系人姓名")
private String contactUser;
@ApiModelProperty(value = "联系人电话")
private String contactPhone;
@ApiModelProperty(value = "接警时间")
private Date callTime;
@ApiModelProperty(value = "接警时长")
private Double callTimeNum;
@ApiModelProperty(value = "警情来源")
private String alertSource;
@ApiModelProperty(value = "警情来源code")
private String alertSourceCode;
@ApiModelProperty(value = "警情类型")
private String alertType;
@ApiModelProperty(value = "警情类型code")
private String alertTypeCode;
@ApiModelProperty(value = "事发单位")
private String unitInvolved;
@ApiModelProperty(value = "被困人数")
private Integer trappedNum;
@ApiModelProperty(value = "伤亡人数")
private Integer casualtiesNum;
@ApiModelProperty(value = "地址")
private String address;
@ApiModelProperty(value = "救援方格")
private String rescueGrid;
@ApiModelProperty(value = "坐标x")
private String coordinateX;
@ApiModelProperty(value = "坐标y")
private String coordinateY;
@ApiModelProperty(value = "更新时间")
private Date updateTime;
@ApiModelProperty(value = "发送人名称")
private String recUserName;
@ApiModelProperty(value = "接警时间开始---用于列表过滤")
private Date callTimeStart ;
@ApiModelProperty(value = "接警时间结束---用于列表过滤")
private Date callTimeEnd ;
}
package com.yeejoin.amos.boot.module.jcs.api.vo;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
/**
*
*
* @author tb
* @date 2021-06-17
*/
@Data
@Accessors(chain = true)
@TableName("jc_alert_form_value")
@ApiModel(value="AlertFormValueVo", description="")
public class AlertFormValueVo{
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "表单id")
private Integer alertFormId;
@ApiModelProperty(value = "警情id")
private Long alertCalledId;
@ApiModelProperty(value = "警情类型")
private String alertTypeCode;
@ApiModelProperty(value = "字段名称")
private String fieldName;
@ApiModelProperty(value = "英文名称")
private String fieldCode;
@ApiModelProperty(value = "字段值")
private String fieldValue;
@ApiModelProperty(value = "字段值字典code")
private String fieldValueCode;
@ApiModelProperty(value = "操作人名称")
private String recUserName;
@ApiModelProperty(value = "是否一行显示")
private Boolean block;
@ApiModelProperty(value = "表单类型")
private String fieldType;
}
package com.yeejoin.amos.boot.module.jcs.api.vo;
import io.swagger.annotations.ApiModelProperty;
public class FireTeamListVo{
@ApiModelProperty(value = "单位名称")
private String name;
@ApiModelProperty(value = "机构code")
private String companyCode;
@ApiModelProperty(value = "队伍code")
private String typeCode;
@ApiModelProperty(value = "父级id")
private Long parent;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getCompanyCode() {
return companyCode;
}
public void setCompanyCode(String companyCode) {
this.companyCode = companyCode;
}
public String getTypeCode() {
return typeCode;
}
public void setTypeCode(String typeCode) {
this.typeCode = typeCode;
}
public Long getParent() {
return parent;
}
public void setParent(Long parent) {
this.parent = parent;
}
}
package com.yeejoin.amos.boot.module.jcs.api.vo;
import org.springframework.stereotype.Component;
@Component
public class FormList {
/**
* 数据字典
*
*/
// @Autowired
// DataDictionaryServiceImpl iDataDictionaryService;
// public List<AlertFormVo> getFormlist(List<AlertForm> list) {
//
// List<AlertFormVo> listfrom = new ArrayList<AlertFormVo>();
// // 组装数据
// for (AlertForm alertFrom : list) {
// if(alertFrom.getFieldType().equals("string")||alertFrom.getFieldType().equals("date")||alertFrom.getFieldType().equals("textarea")) {
// AlertFormVo vo = new AlertFormVo(alertFrom.getFieldCode(), alertFrom.getFieldName(), alertFrom.getFieldType(), null,
// new AlertFormValue(alertFrom.getSequenceNbr(),alertFrom.getFieldName(), alertFrom.getFieldCode(),alertFrom.isBlock()));
// listfrom.add(vo);
// }else {
// // 查询数据项
// Map<String, Object> columnMap = new HashMap<>();
// columnMap.put("type", alertFrom.getFieldValueCode());
// Collection<DataDictionary> listDataDictionary = iDataDictionaryService.listByMap(columnMap);
// AlertFormVo vo = new AlertFormVo(alertFrom.getFieldCode(), alertFrom.getFieldName(), alertFrom.getFieldType(),
// new Items(getdata(listDataDictionary)), new AlertFormValue(alertFrom.getSequenceNbr(),alertFrom.getFieldName(), alertFrom.getFieldCode(),alertFrom.isBlock()));
// listfrom.add(vo);
// }
// }
//
// return listfrom;
// }
//
// public List<AlertListvalue> getdata(Collection<DataDictionary> list) {
// List<AlertListvalue> listAlertListvalue = new ArrayList<AlertListvalue>();
// for (DataDictionary dataDictionary : list) {
//
// listAlertListvalue.add(new AlertListvalue(dataDictionary.getSequenceNbr().toString(),
// dataDictionary.getName(),dataDictionary.getCode()));
// }
// return listAlertListvalue;
// }
}
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!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.AlertFormValueMapper"> <mapper namespace="com.yeejoin.amos.boot.module.jcs.api.mapper.AlertFormValueMapper">
<select id="selectListByCalledId" resultType="com.yeejoin.amos.boot.module.jcs.api.vo.AlertFormValueVo"> <select id="selectListByCalledId" resultType="com.yeejoin.amos.boot.module.jcs.api.dto.AlertCalledObjsDto">
SELECT SELECT
v.sequence_nbr sequenceNbr, v.sequence_nbr sequenceNbr,
v.alert_form_id alertFormId, v.alert_form_id alertFormId,
......
...@@ -16,4 +16,22 @@ ...@@ -16,4 +16,22 @@
GROUP BY GROUP BY
ft.sequence_nbr ft.sequence_nbr
</select> </select>
<select id="getFireTeamForPage" resultType="com.yeejoin.amos.boot.module.jcs.api.dto.FireTeamCardDto">
SELECT
a.sequence_nbr sequenceNbr,
a.img,
a.NAME,
a.contact_user contactUser,
a.contact_phone contactPhone,
a.address,
( SELECT count( 1 ) FROM cb_firefighters WHERE fire_team_id = a.sequence_nbr AND is_delete = 0 ) fighterNum
FROM
cb_fire_team a
WHERE
a.is_delete = 0
<if test='par.parent!=null'>and a.parent = #{par.parent}</if>
<if test='par.typeCode!=null'>and a.type_code = #{par.typeCode}</if>
<if test='par.companyCode!=null'>and a.company_code = #{par.companyCode}</if>
<if test='par.name!=null'>and a.name like concat('%', #{par.name}, '%')</if>
</select>
</mapper> </mapper>
package com.yeejoin.amos.boot.module.jcs.biz.controller; package com.yeejoin.amos.boot.module.jcs.biz.controller;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import io.swagger.annotations.ApiOperation; import org.springframework.web.bind.annotation.RequestParam;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import com.yeejoin.amos.boot.biz.common.controller.BaseController; import org.typroject.tyboot.core.foundation.context.RequestContext;
import java.util.List; import org.typroject.tyboot.core.foundation.enumeration.UserType;
import com.yeejoin.amos.boot.module.jcs.biz.service.impl.AircraftServiceImpl; import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import org.typroject.tyboot.core.restful.exception.instance.BadRequest;
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 org.springframework.beans.factory.annotation.Autowired;
import javax.servlet.http.HttpServletRequest;
import org.springframework.web.bind.annotation.*;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import com.yeejoin.amos.boot.module.jcs.api.dto.AircraftDto; import com.yeejoin.amos.boot.module.jcs.api.dto.AircraftDto;
import org.typroject.tyboot.core.restful.doc.TycloudOperation; import com.yeejoin.amos.boot.module.jcs.biz.service.impl.AircraftServiceImpl;
import org.typroject.tyboot.core.restful.exception.instance.BadRequest;
import org.typroject.tyboot.core.foundation.context.RequestContext; import io.swagger.annotations.Api;
import org.typroject.tyboot.core.foundation.enumeration.UserType; import io.swagger.annotations.ApiOperation;
import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
/** /**
......
package com.yeejoin.amos.boot.module.jcs.biz.controller; package com.yeejoin.amos.boot.module.jcs.biz.controller;
import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import org.typroject.tyboot.core.restful.exception.instance.BadRequest;
import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
...@@ -10,36 +37,19 @@ import com.yeejoin.amos.boot.biz.common.controller.BaseController; ...@@ -10,36 +37,19 @@ 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.biz.common.utils.RedisKey; import com.yeejoin.amos.boot.biz.common.utils.RedisKey;
import com.yeejoin.amos.boot.biz.common.utils.RedisUtils; import com.yeejoin.amos.boot.biz.common.utils.RedisUtils;
import com.yeejoin.amos.boot.module.jcs.api.dto.AlertCalledFormDto;
import com.yeejoin.amos.boot.module.jcs.api.dto.AlertCalledObjsDto;
import com.yeejoin.amos.boot.module.jcs.api.dto.ESAlertCalledDto; import com.yeejoin.amos.boot.module.jcs.api.dto.ESAlertCalledDto;
import com.yeejoin.amos.boot.module.jcs.api.dto.ESAlertCalledRequestDto; import com.yeejoin.amos.boot.module.jcs.api.dto.ESAlertCalledRequestDto;
import com.yeejoin.amos.boot.module.jcs.api.dto.FormValue;
import com.yeejoin.amos.boot.module.jcs.api.entity.AlertCalled; import com.yeejoin.amos.boot.module.jcs.api.entity.AlertCalled;
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.vo.AlertCalledFormVo;
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.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 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;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.*;
import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import org.typroject.tyboot.core.restful.exception.instance.BadRequest;
import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.Stream;
/** /**
* 警情接警记录 * 警情接警记录
...@@ -71,21 +81,21 @@ public class AlertCalledController extends BaseController { ...@@ -71,21 +81,21 @@ public class AlertCalledController extends BaseController {
@PostMapping(value = "/save") @PostMapping(value = "/save")
@ApiOperation(httpMethod = "POST", value = "新增警情接警记录", notes = "新增警情接警记录") @ApiOperation(httpMethod = "POST", value = "新增警情接警记录", notes = "新增警情接警记录")
@Transactional @Transactional
public ResponseModel<AlertCalled> saveAlertCalled(@RequestBody AlertCalledVo alertCalledVo) throws Exception{ public ResponseModel<AlertCalled> saveAlertCalled(@RequestBody AlertCalledObjsDto alertCalledObjsDto) throws Exception{
if (ValidationUtil.isEmpty(alertCalledVo) if (ValidationUtil.isEmpty(alertCalledObjsDto)
|| ValidationUtil.isEmpty(alertCalledVo.getAlertCalled())) || ValidationUtil.isEmpty(alertCalledObjsDto.getAlertCalled()))
throw new BadRequest("参数校验失败."); throw new BadRequest("参数校验失败.");
ReginParams reginParams = ReginParams reginParams =
JSONObject.parseObject(null != redisUtils.get(buildKey(getToken())) ? JSONObject.parseObject(null != redisUtils.get(buildKey(getToken())) ?
redisUtils.get(buildKey(getToken())).toString() : null, ReginParams.class); redisUtils.get(buildKey(getToken())).toString() : null, ReginParams.class);
//获取当前登录人公司 //获取当前登录人公司
String name= reginParams.getCompany().getCompanyName(); String name= reginParams.getCompany().getCompanyName();
AlertCalled alertCalled = alertCalledVo.getAlertCalled(); AlertCalled alertCalled = alertCalledObjsDto.getAlertCalled();
alertCalled.setCompanyName(name); alertCalled.setCompanyName(name);
alertCalledVo.setAlertCalled(alertCalled); alertCalledObjsDto.setAlertCalled(alertCalled);
alertCalledVo =iAlertCalledService.createAlertCalled(alertCalledVo); alertCalledObjsDto =iAlertCalledService.createAlertCalled(alertCalledObjsDto);
return ResponseHelper.buildResponse(alertCalledVo.getAlertCalled()); return ResponseHelper.buildResponse(alertCalledObjsDto.getAlertCalled());
} }
/** /**
...@@ -141,7 +151,7 @@ public class AlertCalledController extends BaseController { ...@@ -141,7 +151,7 @@ public class AlertCalledController extends BaseController {
formValue.add(value); formValue.add(value);
} }
} }
AlertCalledFormVo alertCalledFormVo = new AlertCalledFormVo(alertCalled, formValue); AlertCalledFormDto alertCalledFormVo = new AlertCalledFormDto(alertCalled, formValue);
redisUtils.set(RedisKey.ALERTCALLED_ID+id,JSON.toJSON(alertCalledFormVo),time); redisUtils.set(RedisKey.ALERTCALLED_ID+id,JSON.toJSON(alertCalledFormVo),time);
return ResponseHelper.buildResponse(alertCalledFormVo); return ResponseHelper.buildResponse(alertCalledFormVo);
......
...@@ -8,8 +8,8 @@ import com.yeejoin.amos.boot.biz.common.controller.BaseController; ...@@ -8,8 +8,8 @@ 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.biz.common.utils.RedisKey; import com.yeejoin.amos.boot.biz.common.utils.RedisKey;
import com.yeejoin.amos.boot.biz.common.utils.RedisUtils; import com.yeejoin.amos.boot.biz.common.utils.RedisUtils;
import com.yeejoin.amos.boot.module.jcs.api.dto.AlertFormInitDto;
import com.yeejoin.amos.boot.module.jcs.api.entity.AlertForm; import com.yeejoin.amos.boot.module.jcs.api.entity.AlertForm;
import com.yeejoin.amos.boot.module.jcs.api.vo.AlertFormVo;
import com.yeejoin.amos.boot.module.jcs.biz.service.impl.AlertFormServiceImpl; import com.yeejoin.amos.boot.module.jcs.biz.service.impl.AlertFormServiceImpl;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
...@@ -110,7 +110,7 @@ public class AlertFormController extends BaseController { ...@@ -110,7 +110,7 @@ public class AlertFormController extends BaseController {
@RequestMapping(value = "/form/{code}", method = RequestMethod.GET) @RequestMapping(value = "/form/{code}", method = RequestMethod.GET)
@ApiOperation(httpMethod = "GET", value = "根据表态类型code查询表单数据项", notes = "根据表态类型code查询表单数据项") @ApiOperation(httpMethod = "GET", value = "根据表态类型code查询表单数据项", notes = "根据表态类型code查询表单数据项")
public ResponseModel<Object> selectFormdItem(HttpServletRequest request, @PathVariable String code){ public ResponseModel<Object> selectFormdItem(HttpServletRequest request, @PathVariable String code){
List<AlertFormVo> list=new ArrayList<AlertFormVo>(); List<AlertFormInitDto> list=new ArrayList<AlertFormInitDto>();
if(redisUtils.hasKey(RedisKey.FORM_CODE+code)){ if(redisUtils.hasKey(RedisKey.FORM_CODE+code)){
Object obj= redisUtils.get(RedisKey.FORM_CODE+code); Object obj= redisUtils.get(RedisKey.FORM_CODE+code);
return ResponseHelper.buildResponse(obj); return ResponseHelper.buildResponse(obj);
......
package com.yeejoin.amos.boot.module.jcs.biz.controller; package com.yeejoin.amos.boot.module.jcs.biz.controller;
import com.yeejoin.amos.boot.biz.common.controller.BaseController; import java.util.List;
import com.yeejoin.amos.boot.biz.common.utils.MenuFrom;
import com.yeejoin.amos.boot.module.jcs.api.dto.FireSystemDto;
import com.yeejoin.amos.boot.module.jcs.biz.service.impl.EquipmentServiceImpl;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
...@@ -15,7 +11,12 @@ import org.typroject.tyboot.core.restful.doc.TycloudOperation; ...@@ -15,7 +11,12 @@ 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 java.util.List; import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import com.yeejoin.amos.boot.biz.common.utils.MenuFrom;
import com.yeejoin.amos.boot.module.jcs.biz.service.impl.EquipmentServiceImpl;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
/** /**
* 装备服务接口 * 装备服务接口
......
package com.yeejoin.amos.boot.module.jcs.biz.controller; package com.yeejoin.amos.boot.module.jcs.biz.controller;
import org.springframework.web.bind.annotation.RequestMapping;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;
import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import org.apache.commons.beanutils.BeanUtils;
import org.bouncycastle.crypto.RuntimeCryptoException;
import org.springframework.beans.factory.annotation.Autowired;
import java.lang.reflect.InvocationTargetException;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import org.springframework.web.bind.annotation.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;
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 com.yeejoin.amos.boot.biz.common.controller.BaseController;
import com.yeejoin.amos.boot.module.jcs.api.dto.ExcelDto; import com.yeejoin.amos.boot.module.jcs.api.dto.ExcelDto;
import com.yeejoin.amos.boot.module.jcs.api.dto.FireChemicalDto; import com.yeejoin.amos.boot.module.jcs.api.dto.FireChemicalDto;
import com.yeejoin.amos.boot.module.jcs.api.entity.FireChemical; import com.yeejoin.amos.boot.module.jcs.api.entity.FireChemical;
import com.yeejoin.amos.boot.module.jcs.api.excel.ExcelUtil; import com.yeejoin.amos.boot.module.jcs.api.excel.ExcelUtil;
import com.yeejoin.amos.boot.module.jcs.api.mapper.DataDictionaryMapper; import com.yeejoin.amos.boot.module.jcs.api.mapper.DataDictionaryMapper;
import com.yeejoin.amos.boot.module.jcs.biz.service.impl.FireChemicalServiceImpl; import com.yeejoin.amos.boot.module.jcs.biz.service.impl.FireChemicalServiceImpl;
import com.yeejoin.amos.boot.module.jcs.biz.service.impl.FireStationServiceImpl;
import org.typroject.tyboot.core.restful.doc.TycloudOperation; import io.swagger.annotations.Api;
import org.typroject.tyboot.core.foundation.enumeration.UserType; import io.swagger.annotations.ApiOperation;
import org.typroject.tyboot.core.foundation.utils.Bean;
/** /**
...@@ -55,7 +50,7 @@ public class ExcelController extends BaseController { ...@@ -55,7 +50,7 @@ public class ExcelController extends BaseController {
public void template(HttpServletResponse response,ExcelDto excelDto ) { public void template(HttpServletResponse response,ExcelDto excelDto ) {
try { try {
String url=packageUrl+excelDto.getClassUrl(); String url=packageUrl+excelDto.getClassUrl();
Class clz = Class.forName(url); Class<?> clz = Class.forName(url);
ExcelUtil.createTemplate(response, excelDto.getFileName(), excelDto.getSheetName(), null,clz, dataDictionaryMapper,true); ExcelUtil.createTemplate(response, excelDto.getFileName(), excelDto.getSheetName(), null,clz, dataDictionaryMapper,true);
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
......
package com.yeejoin.amos.boot.module.jcs.biz.controller; package com.yeejoin.amos.boot.module.jcs.biz.controller;
import java.util.Arrays;
import java.util.Collection;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
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.restful.doc.TycloudOperation;
import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
...@@ -28,13 +8,31 @@ import com.yeejoin.amos.boot.biz.common.controller.BaseController; ...@@ -28,13 +8,31 @@ import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import com.yeejoin.amos.boot.biz.common.utils.Menu; import com.yeejoin.amos.boot.biz.common.utils.Menu;
import com.yeejoin.amos.boot.biz.common.utils.NameUtils; import com.yeejoin.amos.boot.biz.common.utils.NameUtils;
import com.yeejoin.amos.boot.biz.common.utils.TreeParser; import com.yeejoin.amos.boot.biz.common.utils.TreeParser;
import com.yeejoin.amos.boot.module.jcs.api.dto.FireTeamCardDto;
import com.yeejoin.amos.boot.module.jcs.api.dto.FireTeamListDto;
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.FireTeamVo;
import com.yeejoin.amos.boot.module.jcs.biz.service.impl.FireTeamServiceImpl; import com.yeejoin.amos.boot.module.jcs.biz.service.impl.FireTeamServiceImpl;
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.springframework.beans.factory.annotation.Autowired;
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.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
import javax.servlet.http.HttpServletRequest;
import java.util.Arrays;
import java.util.Collection;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/** /**
...@@ -56,7 +54,7 @@ public class FireTeamController extends BaseController { ...@@ -56,7 +54,7 @@ public class FireTeamController 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> saveFireTeam(HttpServletRequest request, @RequestBody FireTeam fireTeam) { public ResponseModel<Object> saveFireTeam(HttpServletRequest request, @RequestBody FireTeam fireTeam) {
...@@ -70,7 +68,7 @@ public class FireTeamController extends BaseController { ...@@ -70,7 +68,7 @@ public class FireTeamController 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<Object> deleteById(HttpServletRequest request, @PathVariable Long id) { public ResponseModel<Object> deleteById(HttpServletRequest request, @PathVariable Long id) {
...@@ -78,13 +76,12 @@ public class FireTeamController extends BaseController { ...@@ -78,13 +76,12 @@ public class FireTeamController extends BaseController {
return ResponseHelper.buildResponse(null); return ResponseHelper.buildResponse(null);
} }
/** /**
* 修改消防队伍 * 修改消防队伍
* *
* @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<Object> updateByIdFireTeam(HttpServletRequest request, @RequestBody FireTeam fireTeam) { public ResponseModel<Object> updateByIdFireTeam(HttpServletRequest request, @RequestBody FireTeam fireTeam) {
...@@ -93,31 +90,36 @@ public class FireTeamController extends BaseController { ...@@ -93,31 +90,36 @@ public class FireTeamController extends BaseController {
} }
/** /**
* 根据id查询 * 根据id查询
* *
* @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<FireTeam> selectById(HttpServletRequest request, @PathVariable Long id) { public ResponseModel<FireTeam> selectById(HttpServletRequest request, @PathVariable Long id) {
return ResponseHelper.buildResponse(iFireTeamService.getById(id)); return ResponseHelper.buildResponse(iFireTeamService.getById(id));
} }
@TycloudOperation(ApiLevel = UserType.AGENCY)
@TycloudOperation(needAuth = true, ApiLevel = UserType.AGENCY)
@RequestMapping(value = "/getList", method = RequestMethod.GET) @RequestMapping(value = "/getList", method = RequestMethod.GET)
@ApiOperation(httpMethod = "GET", value = "新列表分页查询", notes = "新表分页查询") @ApiOperation(httpMethod = "GET", value = "新列表分页查询", notes = "新列表分页查询")
public ResponseModel<Page<FireTeamVo>> getFirefighters(Integer pageNum, Integer pageSize, FireTeamListVo fireTeamList) { public ResponseModel<IPage<FireTeamCardDto>> getFireTeamByPage(@RequestParam Integer pageNum,
@RequestParam Integer pageSize,
FireTeamListDto fireTeamList) {
//条件分页 //条件分页
List<FireTeamVo> list = iFireTeamService.getFireTeam(pageNum, pageSize, fireTeamList); if (pageNum == null || pageSize == null) {
Map<String, Long> num = iFireTeamService.getFireTeamCount(pageNum, pageSize, fireTeamList); pageNum = 1;
Page<FireTeamVo> pageBean = new Page<>(pageNum, pageSize, num.get("num")); pageSize = 10;
pageBean.setRecords(list); }
return ResponseHelper.buildResponse(pageBean); if (pageSize == -1) {
pageSize = Integer.MAX_VALUE;
}
Page<FireTeamCardDto> pageBean = new Page<>(pageNum, pageSize);
IPage<FireTeamCardDto> page = iFireTeamService.listFireTeamByPage(pageBean, fireTeamList);
return ResponseHelper.buildResponse(page);
} }
...@@ -127,7 +129,7 @@ public class FireTeamController extends BaseController { ...@@ -127,7 +129,7 @@ public class FireTeamController extends BaseController {
* @return * @return
* @throws Exception * @throws Exception
*/ */
@TycloudOperation(needAuth = true, ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@RequestMapping(value = "/listTree", method = RequestMethod.GET) @RequestMapping(value = "/listTree", method = RequestMethod.GET)
@ApiOperation(httpMethod = "GET", value = "队伍树", notes = "队伍树") @ApiOperation(httpMethod = "GET", value = "队伍树", notes = "队伍树")
public ResponseModel<List<Menu>> listTree() throws Exception { public ResponseModel<List<Menu>> listTree() throws Exception {
...@@ -139,7 +141,6 @@ public class FireTeamController extends BaseController { ...@@ -139,7 +141,6 @@ public class FireTeamController extends BaseController {
return ResponseHelper.buildResponse(menus); return ResponseHelper.buildResponse(menus);
} }
/** /**
* 列表分页查询 * 列表分页查询
* *
...@@ -157,7 +158,7 @@ public class FireTeamController extends BaseController { ...@@ -157,7 +158,7 @@ public class FireTeamController extends BaseController {
try { try {
field.setAccessible(true); field.setAccessible(true);
Object o = field.get(fireTeam); Object o = field.get(fireTeam);
if (o != null) { if (o != null && !"serialVersionUID".equals(field)) {
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)) {
...@@ -187,20 +188,4 @@ public class FireTeamController extends BaseController { ...@@ -187,20 +188,4 @@ public class FireTeamController extends BaseController {
page = iFireTeamService.page(pageBean, fireTeamQueryWrapper); page = iFireTeamService.page(pageBean, fireTeamQueryWrapper);
return page; return page;
} }
}
/** \ No newline at end of file
* 查询消防力量信息
*
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@RequestMapping(value = "/list_fire_team", method = RequestMethod.GET)
@ApiOperation(httpMethod = "GET", value = "查询消防力量信息", notes = "查询消防力量信息")
public List<FireTeamVo> list() {
List<FireTeam> list = iFireTeamService.list();
return null;
}
}
package com.yeejoin.amos.boot.module.jcs.biz.controller; package com.yeejoin.amos.boot.module.jcs.biz.controller;
import com.alibaba.fastjson.JSON; import java.util.Arrays;
import javax.servlet.http.HttpServletRequest;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.transaction.annotation.Transactional;
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.restful.doc.TycloudOperation;
import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
...@@ -17,20 +34,9 @@ import com.yeejoin.amos.boot.module.jcs.biz.service.impl.FirefightersContactsSer ...@@ -17,20 +34,9 @@ import com.yeejoin.amos.boot.module.jcs.biz.service.impl.FirefightersContactsSer
import com.yeejoin.amos.boot.module.jcs.biz.service.impl.FirefightersEducationServiceImpl; import com.yeejoin.amos.boot.module.jcs.biz.service.impl.FirefightersEducationServiceImpl;
import com.yeejoin.amos.boot.module.jcs.biz.service.impl.FirefightersPostServiceImpl; import com.yeejoin.amos.boot.module.jcs.biz.service.impl.FirefightersPostServiceImpl;
import com.yeejoin.amos.boot.module.jcs.biz.service.impl.FirefightersWorkexperienceServiceImpl; import com.yeejoin.amos.boot.module.jcs.biz.service.impl.FirefightersWorkexperienceServiceImpl;
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.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.*;
import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
import javax.servlet.http.HttpServletRequest;
import java.util.Arrays;
/** /**
......
package com.yeejoin.amos.boot.module.jcs.biz.controller; package com.yeejoin.amos.boot.module.jcs.biz.controller;
import java.io.UnsupportedEncodingException; import java.io.UnsupportedEncodingException;
import java.text.SimpleDateFormat; import java.util.Collection;
import java.util.ArrayList;
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;
...@@ -25,8 +23,9 @@ import org.typroject.tyboot.core.restful.utils.ResponseModel; ...@@ -25,8 +23,9 @@ import org.typroject.tyboot.core.restful.utils.ResponseModel;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
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.ExcelUtils; import com.yeejoin.amos.boot.module.jcs.api.dto.OrgMenuDto;
import com.yeejoin.amos.boot.module.jcs.api.dto.OrgPersonDto; import com.yeejoin.amos.boot.module.jcs.api.dto.OrgPersonDto;
import com.yeejoin.amos.boot.module.jcs.api.dto.OrgPersonFormDto;
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.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.OrgUsrServiceImpl; import com.yeejoin.amos.boot.module.jcs.biz.service.impl.OrgUsrServiceImpl;
...@@ -55,7 +54,7 @@ public class OrgPersonController { ...@@ -55,7 +54,7 @@ public class OrgPersonController {
@TycloudOperation(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 saveOrgUsr(HttpServletRequest request, @RequestBody OrgPersonDto OrgPersonVo) throws Exception { public ResponseModel<?> saveOrgUsr(HttpServletRequest request, @RequestBody OrgPersonDto OrgPersonVo) throws Exception {
OrgPersonVo.setBizOrgType(CommonConstant.BIZ_ORG_TYPE_PERSON); OrgPersonVo.setBizOrgType(CommonConstant.BIZ_ORG_TYPE_PERSON);
iOrgUsrService.saveOrgPerson(OrgPersonVo); iOrgUsrService.saveOrgPerson(OrgPersonVo);
return ResponseHelper.buildResponse(null); return ResponseHelper.buildResponse(null);
...@@ -70,7 +69,7 @@ public class OrgPersonController { ...@@ -70,7 +69,7 @@ public class OrgPersonController {
@TycloudOperation(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 deleteById(HttpServletRequest request, @PathVariable Long id) { public ResponseModel<?> deleteById(HttpServletRequest request, @PathVariable Long id) {
// 删除时,只作逻辑删除 // 删除时,只作逻辑删除
iOrgUsrService.update(new UpdateWrapper<OrgUsr>().eq("sequence_nbr", id).set("is_delete", CommonConstant.IS_DELETE_01)); iOrgUsrService.update(new UpdateWrapper<OrgUsr>().eq("sequence_nbr", id).set("is_delete", CommonConstant.IS_DELETE_01));
return ResponseHelper.buildResponse(null); return ResponseHelper.buildResponse(null);
...@@ -84,7 +83,7 @@ public class OrgPersonController { ...@@ -84,7 +83,7 @@ public class OrgPersonController {
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(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 OrgPersonDto OrgPersonVo, @PathVariable Long id) throws Exception { public ResponseModel<?> updateByIdOrgUsr(HttpServletRequest request, @RequestBody OrgPersonDto OrgPersonVo, @PathVariable Long id) throws Exception {
OrgPersonVo.setBizOrgType(CommonConstant.BIZ_ORG_TYPE_PERSON); OrgPersonVo.setBizOrgType(CommonConstant.BIZ_ORG_TYPE_PERSON);
iOrgUsrService.updateByIdOrgPerson(OrgPersonVo,id); iOrgUsrService.updateByIdOrgPerson(OrgPersonVo,id);
return ResponseHelper.buildResponse(null); return ResponseHelper.buildResponse(null);
...@@ -102,7 +101,7 @@ public class OrgPersonController { ...@@ -102,7 +101,7 @@ public class OrgPersonController {
@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) throws Exception { public ResponseModel<OrgPersonFormDto> selectById(HttpServletRequest request, @PathVariable Long id) throws Exception {
return ResponseHelper.buildResponse(iOrgUsrService.selectPersonById(id)); return ResponseHelper.buildResponse(iOrgUsrService.selectPersonById(id));
} }
...@@ -116,7 +115,7 @@ public class OrgPersonController { ...@@ -116,7 +115,7 @@ public class OrgPersonController {
@TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY) @TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY)
@RequestMapping(value = "/{id}/detail", method = RequestMethod.GET) @RequestMapping(value = "/{id}/detail", method = RequestMethod.GET)
@ApiOperation(httpMethod = "GET", value = "获取人员详情", notes = "获取人员详情") @ApiOperation(httpMethod = "GET", value = "获取人员详情", notes = "获取人员详情")
public ResponseModel selectByIdDetail(HttpServletRequest request, @PathVariable Long id) throws Exception { public ResponseModel<OrgPersonFormDto> selectByIdDetail(HttpServletRequest request, @PathVariable Long id) throws Exception {
return ResponseHelper.buildResponse(iOrgUsrService.selectPersonByIdDetail(id)); return ResponseHelper.buildResponse(iOrgUsrService.selectPersonByIdDetail(id));
} }
...@@ -129,7 +128,7 @@ public class OrgPersonController { ...@@ -129,7 +128,7 @@ public class OrgPersonController {
@TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY) @TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY)
@RequestMapping(value = "/show/{id}", method = RequestMethod.GET) @RequestMapping(value = "/show/{id}", method = RequestMethod.GET)
@ApiOperation(httpMethod = "GET", value = "获取人员详情(map类型)", notes = "获取人员详情") @ApiOperation(httpMethod = "GET", value = "获取人员详情(map类型)", notes = "获取人员详情")
public ResponseModel selectForShowById(HttpServletRequest request, @PathVariable Long id) throws Exception { public ResponseModel<Map<String, Object>> selectForShowById(HttpServletRequest request, @PathVariable Long id) throws Exception {
OrgUsr orgUsr = iOrgUsrService.getById(id); OrgUsr orgUsr = iOrgUsrService.getById(id);
Map<String, Object> result = iOrgUsrService.selectForShowById(orgUsr, id); Map<String, Object> result = iOrgUsrService.selectForShowById(orgUsr, id);
return ResponseHelper.buildResponse(result); return ResponseHelper.buildResponse(result);
...@@ -145,7 +144,7 @@ public class OrgPersonController { ...@@ -145,7 +144,7 @@ public class OrgPersonController {
@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 selectPersonTree() throws Exception { public ResponseModel<List<OrgMenuDto> > selectPersonTree() throws Exception {
return ResponseHelper.buildResponse(iOrgUsrService.selectPersonTree()); return ResponseHelper.buildResponse(iOrgUsrService.selectPersonTree());
} }
...@@ -170,7 +169,7 @@ public class OrgPersonController { ...@@ -170,7 +169,7 @@ public class OrgPersonController {
@TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY) @TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY)
@RequestMapping(value = "/{orgCode}/users", method = RequestMethod.GET) @RequestMapping(value = "/{orgCode}/users", method = RequestMethod.GET)
@ApiOperation(httpMethod = "GET", value = "根据orgCode查询", notes = "根据orgCode查询") @ApiOperation(httpMethod = "GET", value = "根据orgCode查询", notes = "根据orgCode查询")
public ResponseModel selectUsersByOrgCode(HttpServletRequest request, String pageNum, String pageSize, @PathVariable Long orgCode) { public ResponseModel<Collection<OrgUsr>> selectUsersByOrgCode(HttpServletRequest request, String pageNum, String pageSize, @PathVariable Long orgCode) {
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_code", orgCode); columnMap.put("biz_org_code", orgCode);
...@@ -188,8 +187,8 @@ public class OrgPersonController { ...@@ -188,8 +187,8 @@ 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) throws UnsupportedEncodingException {
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMddhhmmss"); // SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMddhhmmss");
// List<OrgUsrDownloadTemplateVO> OrgUsrDownloadTemplateVO = new ArrayList<OrgUsrDownloadTemplateVO>(); // List<OrgUsrDownloadTemplateVO> OrgUsrDownloadTemplateVO = new ArrayList<OrgUsrDownloadTemplateVO>();
// 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);
...@@ -203,7 +202,7 @@ public class OrgPersonController { ...@@ -203,7 +202,7 @@ public class OrgPersonController {
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@RequestMapping(value = "/savePerson", method = RequestMethod.POST) @RequestMapping(value = "/savePerson", method = RequestMethod.POST)
@ApiOperation(httpMethod = "POST", value = "导入人员信息", notes = "导入人员信息") @ApiOperation(httpMethod = "POST", value = "导入人员信息", notes = "导入人员信息")
public ResponseModel savePerson(HttpServletRequest request, @RequestBody List<OrgPersonDto> OrgPersonVo) throws Exception { public ResponseModel<?> savePerson(HttpServletRequest request, @RequestBody List<OrgPersonDto> OrgPersonVo) throws Exception {
iOrgUsrService.savePersonList(OrgPersonVo); iOrgUsrService.savePersonList(OrgPersonVo);
return ResponseHelper.buildResponse(null); return ResponseHelper.buildResponse(null);
} }
...@@ -217,7 +216,7 @@ public class OrgPersonController { ...@@ -217,7 +216,7 @@ public class OrgPersonController {
@TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY) @TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY)
@RequestMapping(value = "/showPersonList/{ids}", method = RequestMethod.GET) @RequestMapping(value = "/showPersonList/{ids}", method = RequestMethod.GET)
@ApiOperation(httpMethod = "GET", value = "获取人员列表详情(map类型)", notes = "获取人员详情") @ApiOperation(httpMethod = "GET", value = "获取人员列表详情(map类型)", notes = "获取人员详情")
public ResponseModel selectForShowByListId(HttpServletRequest request, @PathVariable List<Long> ids) throws Exception { public ResponseModel<List<Map<String, Object>> > selectForShowByListId(HttpServletRequest request, @PathVariable List<Long> ids) throws Exception {
return ResponseHelper.buildResponse(iOrgUsrService.selectForShowByListId(ids) return ResponseHelper.buildResponse(iOrgUsrService.selectForShowByListId(ids)
); );
} }
......
...@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.module.jcs.biz.controller; ...@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.module.jcs.biz.controller;
import java.util.Arrays; import java.util.Arrays;
import java.util.List; import java.util.List;
import java.util.Map;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
...@@ -28,6 +29,7 @@ import com.yeejoin.amos.boot.biz.common.utils.NameUtils; ...@@ -28,6 +29,7 @@ import com.yeejoin.amos.boot.biz.common.utils.NameUtils;
import com.yeejoin.amos.boot.module.jcs.api.dto.OrgDepartmentDto; import com.yeejoin.amos.boot.module.jcs.api.dto.OrgDepartmentDto;
import com.yeejoin.amos.boot.module.jcs.api.dto.OrgMenuDto; import com.yeejoin.amos.boot.module.jcs.api.dto.OrgMenuDto;
import com.yeejoin.amos.boot.module.jcs.api.dto.OrgUsrDto; import com.yeejoin.amos.boot.module.jcs.api.dto.OrgUsrDto;
import com.yeejoin.amos.boot.module.jcs.api.dto.OrgUsrFormDto;
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.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.OrgUsrServiceImpl; import com.yeejoin.amos.boot.module.jcs.biz.service.impl.OrgUsrServiceImpl;
...@@ -60,7 +62,7 @@ public class OrgUsrController extends BaseController { ...@@ -60,7 +62,7 @@ public class OrgUsrController extends BaseController {
@TycloudOperation(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 saveOrgUsr(HttpServletRequest request, @RequestBody OrgUsrDto OrgUsrVo) throws Exception { public ResponseModel<?> saveOrgUsr(HttpServletRequest request, @RequestBody OrgUsrDto OrgUsrVo) throws Exception {
OrgUsrVo.setBizOrgType(CommonConstant.BIZ_ORG_TYPE_COMPANY); OrgUsrVo.setBizOrgType(CommonConstant.BIZ_ORG_TYPE_COMPANY);
iOrgUsrService.saveOrgUsr(OrgUsrVo); iOrgUsrService.saveOrgUsr(OrgUsrVo);
return ResponseHelper.buildResponse(null); return ResponseHelper.buildResponse(null);
...@@ -75,7 +77,7 @@ public class OrgUsrController extends BaseController { ...@@ -75,7 +77,7 @@ public class OrgUsrController extends BaseController {
@TycloudOperation(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 deleteById(HttpServletRequest request, @PathVariable Long id) { public ResponseModel<?> deleteById(HttpServletRequest request, @PathVariable Long id) {
// 删除时,只作逻辑删除 // 删除时,只作逻辑删除
iOrgUsrService.update(new UpdateWrapper<OrgUsr>().eq("sequence_nbr", id).set("is_delete", CommonConstant.IS_DELETE_01)); iOrgUsrService.update(new UpdateWrapper<OrgUsr>().eq("sequence_nbr", id).set("is_delete", CommonConstant.IS_DELETE_01));
return ResponseHelper.buildResponse(null); return ResponseHelper.buildResponse(null);
...@@ -90,7 +92,7 @@ public class OrgUsrController extends BaseController { ...@@ -90,7 +92,7 @@ public class OrgUsrController extends BaseController {
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(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 OrgUsrDto OrgUsrVo, @PathVariable Long id) throws Exception { public ResponseModel<?> updateByIdOrgUsr(HttpServletRequest request, @RequestBody OrgUsrDto OrgUsrVo, @PathVariable Long id) throws Exception {
OrgUsrVo.setBizOrgType(CommonConstant.BIZ_ORG_TYPE_COMPANY); OrgUsrVo.setBizOrgType(CommonConstant.BIZ_ORG_TYPE_COMPANY);
iOrgUsrService.updateByIdOrgUsr(OrgUsrVo,id); iOrgUsrService.updateByIdOrgUsr(OrgUsrVo,id);
return ResponseHelper.buildResponse(null); return ResponseHelper.buildResponse(null);
...@@ -106,7 +108,7 @@ public class OrgUsrController extends BaseController { ...@@ -106,7 +108,7 @@ 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) throws Exception { public ResponseModel<OrgUsrFormDto> selectById(HttpServletRequest request, @PathVariable Long id) throws Exception {
return ResponseHelper.buildResponse(iOrgUsrService.selectCompanyById(id)); return ResponseHelper.buildResponse(iOrgUsrService.selectCompanyById(id));
} }
...@@ -120,7 +122,7 @@ public class OrgUsrController extends BaseController { ...@@ -120,7 +122,7 @@ public class OrgUsrController extends BaseController {
@TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY) @TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY)
@RequestMapping(value = "/selectByBizOrgType/{bizOrgType}", method = RequestMethod.GET) @RequestMapping(value = "/selectByBizOrgType/{bizOrgType}", method = RequestMethod.GET)
@ApiOperation(httpMethod = "GET", value = "根据bizOrgType分页查询", notes = "根据bizOrgType分页查询") @ApiOperation(httpMethod = "GET", value = "根据bizOrgType分页查询", notes = "根据bizOrgType分页查询")
public ResponseModel bizOrgTypeListPage(String pageNum, String pageSize, @PathVariable String bizOrgType) throws Exception { public ResponseModel<IPage<OrgUsr>> bizOrgTypeListPage(String pageNum, String pageSize, @PathVariable String bizOrgType) throws Exception {
return ResponseHelper.buildResponse(iOrgUsrService.page( iOrgUsrService.bizOrgTypeListPage(pageNum,pageSize,bizOrgType))); return ResponseHelper.buildResponse(iOrgUsrService.page( iOrgUsrService.bizOrgTypeListPage(pageNum,pageSize,bizOrgType)));
} }
...@@ -149,7 +151,7 @@ public class OrgUsrController extends BaseController { ...@@ -149,7 +151,7 @@ public class OrgUsrController extends BaseController {
@RequestMapping(value = "/orgTree", method = RequestMethod.GET) @RequestMapping(value = "/orgTree", method = RequestMethod.GET)
@ApiOperation(httpMethod = "GET", value = "获取单位部门树(bizOrgCode为物理主键)", notes = "获取单位部门树(bizOrgCode为物理主键)\"") @ApiOperation(httpMethod = "GET", value = "获取单位部门树(bizOrgCode为物理主键)", notes = "获取单位部门树(bizOrgCode为物理主键)\"")
public ResponseModel< List<OrgMenuDto>>selectCompanyTreeCode() throws Exception { public ResponseModel< List<OrgMenuDto>>selectCompanyTreeCode() throws Exception {
List<OrgMenuDto> menus = iOrgUsrService.buildTreeParallel(iOrgUsrService.selectCompanyDepartmentMsg()); List<OrgMenuDto> menus = OrgUsrServiceImpl.buildTreeParallel(iOrgUsrService.selectCompanyDepartmentMsg());
return ResponseHelper.buildResponse(menus); return ResponseHelper.buildResponse(menus);
} }
...@@ -209,7 +211,7 @@ public class OrgUsrController extends BaseController { ...@@ -209,7 +211,7 @@ public class OrgUsrController extends BaseController {
@TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY) @TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY)
@RequestMapping(value = "/saveDepartment", method = RequestMethod.POST) @RequestMapping(value = "/saveDepartment", method = RequestMethod.POST)
@ApiOperation(httpMethod = "POST", value = "导入部门信息", notes = "导入部门信息") @ApiOperation(httpMethod = "POST", value = "导入部门信息", notes = "导入部门信息")
public ResponseModel saveDepartment(HttpServletRequest request, @RequestBody List<OrgDepartmentDto> OrgDepartmentVo, @PathVariable Long id) throws Exception { public ResponseModel<?> saveDepartment(HttpServletRequest request, @RequestBody List<OrgDepartmentDto> OrgDepartmentVo, @PathVariable Long id) throws Exception {
iOrgUsrService.saveDepartment(OrgDepartmentVo,id); iOrgUsrService.saveDepartment(OrgDepartmentVo,id);
return ResponseHelper.buildResponse(null); return ResponseHelper.buildResponse(null);
} }
...@@ -222,7 +224,7 @@ public class OrgUsrController extends BaseController { ...@@ -222,7 +224,7 @@ public class OrgUsrController extends BaseController {
@TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY) @TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY)
@RequestMapping(value = "/saveCompany", method = RequestMethod.POST) @RequestMapping(value = "/saveCompany", method = RequestMethod.POST)
@ApiOperation(httpMethod = "POST", value = "导入单位信息", notes = "导入单位信息") @ApiOperation(httpMethod = "POST", value = "导入单位信息", notes = "导入单位信息")
public ResponseModel saveCompany(HttpServletRequest request, @RequestBody List<OrgUsrDto> OrgUsrVo) throws Exception { public ResponseModel<?> saveCompany(HttpServletRequest request, @RequestBody List<OrgUsrDto> OrgUsrVo) throws Exception {
iOrgUsrService.saveCompany(OrgUsrVo); iOrgUsrService.saveCompany(OrgUsrVo);
return ResponseHelper.buildResponse(null); return ResponseHelper.buildResponse(null);
} }
...@@ -236,7 +238,7 @@ public class OrgUsrController extends BaseController { ...@@ -236,7 +238,7 @@ public class OrgUsrController extends BaseController {
@TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY) @TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY)
@RequestMapping(value = "/{ids}/users", method = RequestMethod.GET) @RequestMapping(value = "/{ids}/users", method = RequestMethod.GET)
@ApiOperation(httpMethod = "GET", value = "根据id获取单位人员列表", notes = "根据id获取单位人员列表") @ApiOperation(httpMethod = "GET", value = "根据id获取单位人员列表", notes = "根据id获取单位人员列表")
public ResponseModel selectUsersByOrgCode(HttpServletRequest request, @PathVariable List<Long> ids) throws Exception { public ResponseModel<List<Map<String, Object>> > selectUsersByOrgCode(HttpServletRequest request, @PathVariable List<Long> ids) throws Exception {
return ResponseHelper.buildResponse(iOrgUsrService.returnCompanyPersonMsg(ids)) ; return ResponseHelper.buildResponse(iOrgUsrService.returnCompanyPersonMsg(ids)) ;
} }
} }
\ No newline at end of file
...@@ -3,6 +3,8 @@ package com.yeejoin.amos.boot.module.jcs.biz.service.impl; ...@@ -3,6 +3,8 @@ package com.yeejoin.amos.boot.module.jcs.biz.service.impl;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import javax.annotation.Resource;
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;
...@@ -12,14 +14,12 @@ import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; ...@@ -12,14 +14,12 @@ import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.yeejoin.amos.boot.biz.common.utils.RedisKey; import com.yeejoin.amos.boot.biz.common.utils.RedisKey;
import com.yeejoin.amos.boot.biz.common.utils.RedisUtils; import com.yeejoin.amos.boot.biz.common.utils.RedisUtils;
import com.yeejoin.amos.boot.module.jcs.api.dto.AlertCalledDto; import com.yeejoin.amos.boot.module.jcs.api.dto.AlertCalledDto;
import com.yeejoin.amos.boot.module.jcs.api.dto.AlertCalledObjsDto;
import com.yeejoin.amos.boot.module.jcs.api.entity.AlertCalled; import com.yeejoin.amos.boot.module.jcs.api.entity.AlertCalled;
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.enums.AlertStageEnums; import com.yeejoin.amos.boot.module.jcs.api.enums.AlertStageEnums;
import com.yeejoin.amos.boot.module.jcs.api.mapper.AlertCalledMapper; 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 javax.annotation.Resource;
/** /**
* 警情接警记录 服务实现类 * 警情接警记录 服务实现类
...@@ -53,10 +53,10 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall ...@@ -53,10 +53,10 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall
* @return * @return
*/ */
@Transactional @Transactional
public AlertCalledVo createAlertCalled(AlertCalledVo alertCalledVo) { public AlertCalledObjsDto createAlertCalled(AlertCalledObjsDto alertCalledObjsDto) {
try { try {
// 警情基本信息 // 警情基本信息
AlertCalled alertCalled = alertCalledVo.getAlertCalled(); AlertCalled alertCalled = alertCalledObjsDto.getAlertCalled();
alertCalled.setCallTime(new Date()); alertCalled.setCallTime(new Date());
if(AlertStageEnums.RG.getValue().equals(alertCalled.getAlertSourceCode())|| if(AlertStageEnums.RG.getValue().equals(alertCalled.getAlertSourceCode())||
AlertStageEnums.RG.getValue().equals(alertCalled.getAlertSourceCode())){ AlertStageEnums.RG.getValue().equals(alertCalled.getAlertSourceCode())){
...@@ -74,7 +74,7 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall ...@@ -74,7 +74,7 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall
alertCalled.setAlarmTypeCode(AlertStageEnums.JQGB.getCode()); alertCalled.setAlarmTypeCode(AlertStageEnums.JQGB.getCode());
this.save(alertCalled); this.save(alertCalled);
// 动态表单 // 动态表单
List<AlertFormValue> alertFormValuelist = alertCalledVo.getAlertFormValue(); List<AlertFormValue> alertFormValuelist = alertCalledObjsDto.getAlertFormValue();
// 填充警情主键 // 填充警情主键
alertFormValuelist.stream().forEach(alertFormValue -> { alertFormValuelist.stream().forEach(alertFormValue -> {
alertFormValue.setAlertCalledId(alertCalled.getSequenceNbr()); alertFormValue.setAlertCalledId(alertCalled.getSequenceNbr());
...@@ -93,7 +93,7 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall ...@@ -93,7 +93,7 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall
this.save(alertCalled); this.save(alertCalled);
// 动态表单 // 动态表单
List<AlertFormValue> alertFormValuelist = alertCalledVo.getAlertFormValue(); List<AlertFormValue> alertFormValuelist = alertCalledObjsDto.getAlertFormValue();
// 填充警情主键 // 填充警情主键
alertFormValuelist.stream().forEach(alertFormValue -> { alertFormValuelist.stream().forEach(alertFormValue -> {
alertFormValue.setAlertCalledId(alertCalled.getSequenceNbr()); alertFormValue.setAlertCalledId(alertCalled.getSequenceNbr());
...@@ -101,10 +101,10 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall ...@@ -101,10 +101,10 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall
}); });
// 保存动态表单数据 // 保存动态表单数据
iAlertFormValueService.saveBatch(alertFormValuelist); iAlertFormValueService.saveBatch(alertFormValuelist);
alertCalledVo.setAlertCalled(alertCalled); alertCalledObjsDto.setAlertCalled(alertCalled);
alertCalledVo.setAlertFormValue(alertFormValuelist); alertCalledObjsDto.setAlertFormValue(alertFormValuelist);
//调用规则 //调用规则
ruleAlertCalledService.fireAlertCalledRule(alertCalledVo); ruleAlertCalledService.fireAlertCalledRule(alertCalledObjsDto);
} }
...@@ -113,7 +113,7 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall ...@@ -113,7 +113,7 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall
*/ */
eSAlertCalledService.saveAlertCalledToES(alertCalled); eSAlertCalledService.saveAlertCalledToES(alertCalled);
return alertCalledVo; return alertCalledObjsDto;
} catch (Exception e) { } catch (Exception e) {
throw new RuntimeException("报送失败,系统异常!"); throw new RuntimeException("报送失败,系统异常!");
} }
......
package com.yeejoin.amos.boot.module.jcs.biz.service.impl; 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.yeejoin.amos.boot.module.jcs.api.dto.AlertFromDto; import com.yeejoin.amos.boot.module.jcs.api.dto.AlertFormInitDto;
import com.yeejoin.amos.boot.module.jcs.api.dto.AlertFormDto;
import com.yeejoin.amos.boot.module.jcs.api.dto.AlertListvalue;
import com.yeejoin.amos.boot.module.jcs.api.dto.Items;
import com.yeejoin.amos.boot.module.jcs.api.entity.AlertForm; import com.yeejoin.amos.boot.module.jcs.api.entity.AlertForm;
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.DataDictionary; import com.yeejoin.amos.boot.module.jcs.api.entity.DataDictionary;
import com.yeejoin.amos.boot.module.jcs.api.mapper.AlertFormMapper; import com.yeejoin.amos.boot.module.jcs.api.mapper.AlertFormMapper;
import com.yeejoin.amos.boot.module.jcs.api.service.IAlertFormService; import com.yeejoin.amos.boot.module.jcs.api.service.IAlertFormService;
import com.yeejoin.amos.boot.module.jcs.api.vo.AlertFormVo;
import com.yeejoin.amos.boot.module.jcs.api.vo.AlertListvalue;
import com.yeejoin.amos.boot.module.jcs.api.vo.Items;
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;
...@@ -28,23 +29,23 @@ import java.util.stream.Collectors; ...@@ -28,23 +29,23 @@ import java.util.stream.Collectors;
* @date 2021-06-17 * @date 2021-06-17
*/ */
@Service @Service
public class AlertFormServiceImpl extends BaseService<AlertFromDto,AlertForm,AlertFormMapper> implements IAlertFormService{ public class AlertFormServiceImpl extends BaseService<AlertFormDto,AlertForm,AlertFormMapper> implements IAlertFormService{
@Autowired @Autowired
DataDictionaryServiceImpl iDataDictionaryService; DataDictionaryServiceImpl iDataDictionaryService;
public List<AlertFormVo> getFormlist(String code) { public List<AlertFormInitDto> getFormlist(String code) {
QueryWrapper<AlertForm> queryWrapper = new QueryWrapper<>(); QueryWrapper<AlertForm> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("alert_type_code", code); queryWrapper.eq("alert_type_code", code);
queryWrapper.orderByAsc("sort_num"); queryWrapper.orderByAsc("sort_num");
List<AlertForm> alertFormValue = this.list(queryWrapper); List<AlertForm> alertFormValue = this.list(queryWrapper);
List<AlertFormVo> listfrom = new ArrayList<AlertFormVo>(); List<AlertFormInitDto> listfrom = new ArrayList<AlertFormInitDto>();
// 组装数据 // 组装数据
for (AlertForm alertFrom : alertFormValue) { for (AlertForm alertFrom : alertFormValue) {
if(alertFrom.getFieldType().equals("string")||alertFrom.getFieldType().equals("datetime")||alertFrom.getFieldType().equals("textarea")||alertFrom.getFieldType().equals("inputBitmap")) { if(alertFrom.getFieldType().equals("string")||alertFrom.getFieldType().equals("datetime")||alertFrom.getFieldType().equals("textarea")||alertFrom.getFieldType().equals("inputBitmap")) {
AlertFormVo vo = new AlertFormVo(alertFrom.getFieldCode(), alertFrom.getFieldName(), alertFrom.getFieldType(), null); AlertFormInitDto vo = new AlertFormInitDto(alertFrom.getFieldCode(), alertFrom.getFieldName(), alertFrom.getFieldType(), null);
AlertFormValue alertFormValu= new AlertFormValue(alertFrom.getSequenceNbr(),alertFrom.getFieldName(), alertFrom.getFieldCode(),alertFrom.getBlock(), alertFrom.getAlertTypeCode(),null, null); AlertFormValue alertFormValu= new AlertFormValue(alertFrom.getSequenceNbr(),alertFrom.getFieldName(), alertFrom.getFieldCode(),alertFrom.getBlock(), alertFrom.getAlertTypeCode(),null, null);
if(alertFrom.getFieldType().equals("datetime")) { if(alertFrom.getFieldType().equals("datetime")) {
...@@ -63,7 +64,7 @@ public class AlertFormServiceImpl extends BaseService<AlertFromDto,AlertForm,Ale ...@@ -63,7 +64,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);
List<AlertListvalue> list=getdata(listDataDictionary); List<AlertListvalue> list=getdata(listDataDictionary);
AlertFormVo vo = new AlertFormVo(alertFrom.getFieldCode(), alertFrom.getFieldName(), alertFrom.getFieldType(), new Items(list)); AlertFormInitDto vo = new AlertFormInitDto(alertFrom.getFieldCode(), alertFrom.getFieldName(), alertFrom.getFieldType(), new Items(list));
AlertFormValue alertFormValu= new AlertFormValue(alertFrom.getSequenceNbr(),alertFrom.getFieldName(), alertFrom.getFieldCode(),alertFrom.getBlock(), alertFrom.getAlertTypeCode(),null, null); AlertFormValue alertFormValu= new AlertFormValue(alertFrom.getSequenceNbr(),alertFrom.getFieldName(), alertFrom.getFieldCode(),alertFrom.getBlock(), alertFrom.getAlertTypeCode(),null, null);
...@@ -94,7 +95,7 @@ public class AlertFormServiceImpl extends BaseService<AlertFromDto,AlertForm,Ale ...@@ -94,7 +95,7 @@ public class AlertFormServiceImpl extends BaseService<AlertFromDto,AlertForm,Ale
return this.queryListByTypeCode(typeCode).stream().map(c -> c.getFieldCode()).collect(Collectors.toList()); return this.queryListByTypeCode(typeCode).stream().map(c -> c.getFieldCode()).collect(Collectors.toList());
} }
public List<AlertFromDto> queryListByTypeCode(String alertTypeCode) { public List<AlertFormDto> queryListByTypeCode(String alertTypeCode) {
return this.queryForList(null, false, 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.yeejoin.amos.boot.module.jcs.api.dto.AlertFromTypeDto; import com.yeejoin.amos.boot.module.jcs.api.dto.AlertFormTypeDto;
import com.yeejoin.amos.boot.module.jcs.api.entity.AlertFormType; import com.yeejoin.amos.boot.module.jcs.api.entity.AlertFormType;
import com.yeejoin.amos.boot.module.jcs.api.mapper.AlertFormTypeMapper; import com.yeejoin.amos.boot.module.jcs.api.mapper.AlertFormTypeMapper;
import com.yeejoin.amos.boot.module.jcs.api.service.IAlertFormTypeService; import com.yeejoin.amos.boot.module.jcs.api.service.IAlertFormTypeService;
...@@ -15,6 +15,6 @@ import org.typroject.tyboot.core.rdbms.service.BaseService; ...@@ -15,6 +15,6 @@ import org.typroject.tyboot.core.rdbms.service.BaseService;
* @date 2021-06-17 * @date 2021-06-17
*/ */
@Service @Service
public class AlertFormTypeServiceImpl extends BaseService<AlertFromTypeDto, AlertFormType,AlertFormTypeMapper> implements IAlertFormTypeService { public class AlertFormTypeServiceImpl extends BaseService<AlertFormTypeDto, AlertFormType,AlertFormTypeMapper> implements IAlertFormTypeService {
} }
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.AlertFromValueDto;
import com.yeejoin.amos.boot.module.jcs.api.entity.AlertFormValue;
import com.yeejoin.amos.boot.module.jcs.api.mapper.AlertFormValueMapper;
import com.yeejoin.amos.boot.module.jcs.api.service.IAlertFormValueService;
import com.yeejoin.amos.boot.module.jcs.api.vo.AlertFormValueVo;
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.typroject.tyboot.core.rdbms.service.BaseService; import org.typroject.tyboot.core.rdbms.service.BaseService;
import com.yeejoin.amos.boot.module.jcs.api.dto.AlertFormValueDto;
import com.yeejoin.amos.boot.module.jcs.api.entity.AlertFormValue;
import com.yeejoin.amos.boot.module.jcs.api.mapper.AlertFormValueMapper;
import com.yeejoin.amos.boot.module.jcs.api.service.IAlertFormValueService;
/** /**
* 服务实现类 * 服务实现类
* *
...@@ -19,16 +18,16 @@ import org.typroject.tyboot.core.rdbms.service.BaseService; ...@@ -19,16 +18,16 @@ import org.typroject.tyboot.core.rdbms.service.BaseService;
* @date 2021-06-17 * @date 2021-06-17
*/ */
@Service @Service
public class AlertFormValueServiceImpl extends BaseService<AlertFromValueDto,AlertFormValue,AlertFormValueMapper> implements IAlertFormValueService { public class AlertFormValueServiceImpl extends BaseService<AlertFormValueDto,AlertFormValue,AlertFormValueMapper> implements IAlertFormValueService {
@Autowired @Autowired
private AlertFormValueMapper alertFormValueMapper; private AlertFormValueMapper alertFormValueMapper;
public List<AlertFromValueDto> queryByCalledId(Long alertCalledId) { public List<AlertFormValueDto> queryByCalledId(Long alertCalledId) {
return this.queryForList(null, false, alertCalledId); return this.queryForList(null, false, alertCalledId);
} }
public List<AlertFormValueVo> listByCalledId(Long id) { public List<AlertFormValueDto> listByCalledId(Long id) {
return alertFormValueMapper.selectListByCalledId(id); return alertFormValueMapper.selectListByCalledId(id);
} }
......
...@@ -28,8 +28,10 @@ import com.yeejoin.amos.boot.biz.common.bo.ReginParams; ...@@ -28,8 +28,10 @@ import com.yeejoin.amos.boot.biz.common.bo.ReginParams;
import com.yeejoin.amos.boot.biz.common.utils.EnumsUtils; import com.yeejoin.amos.boot.biz.common.utils.EnumsUtils;
import com.yeejoin.amos.boot.biz.common.utils.RedisKey; import com.yeejoin.amos.boot.biz.common.utils.RedisKey;
import com.yeejoin.amos.boot.biz.common.utils.RedisUtils; import com.yeejoin.amos.boot.biz.common.utils.RedisUtils;
import com.yeejoin.amos.boot.module.jcs.api.dto.AlertCalledObjsDto;
import com.yeejoin.amos.boot.module.jcs.api.dto.AlertCalledRo; import com.yeejoin.amos.boot.module.jcs.api.dto.AlertCalledRo;
import com.yeejoin.amos.boot.module.jcs.api.dto.AlertSubmittedDto; import com.yeejoin.amos.boot.module.jcs.api.dto.AlertSubmittedDto;
import com.yeejoin.amos.boot.module.jcs.api.dto.FormValue;
import com.yeejoin.amos.boot.module.jcs.api.dto.TemplateDto; import com.yeejoin.amos.boot.module.jcs.api.dto.TemplateDto;
import com.yeejoin.amos.boot.module.jcs.api.dto.TemplateExtendDto; import com.yeejoin.amos.boot.module.jcs.api.dto.TemplateExtendDto;
import com.yeejoin.amos.boot.module.jcs.api.entity.AlertCalled; import com.yeejoin.amos.boot.module.jcs.api.entity.AlertCalled;
...@@ -45,10 +47,8 @@ import com.yeejoin.amos.boot.module.jcs.api.enums.SubmissionMethodEnum; ...@@ -45,10 +47,8 @@ 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.AlertCalledVo;
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.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.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.biz.rule.action.AlertCalledAction; import com.yeejoin.amos.boot.module.jcs.biz.rule.action.AlertCalledAction;
...@@ -138,7 +138,7 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al ...@@ -138,7 +138,7 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
Long alertSubmittedId = saveAlertSubmitted(alertSubmittedDto, userName); Long alertSubmittedId = saveAlertSubmitted(alertSubmittedDto, userName);
// 组装规则入参 // 组装规则入参
AlertCalled alertCalled = alertCalledService.getById(alertSubmittedDto.getAlertCalledId()); AlertCalled alertCalled = alertCalledService.getById(alertSubmittedDto.getAlertCalledId());
AlertCalledVo alertCalledVo = new AlertCalledVo(); AlertCalledObjsDto alertCalledVo = new AlertCalledObjsDto();
alertCalledVo.setAlertCalled(alertCalled); alertCalledVo.setAlertCalled(alertCalled);
List<AlertFormValue> alertFormValue = new ArrayList<>(); List<AlertFormValue> alertFormValue = new ArrayList<>();
AlertFormValue formValue = new AlertFormValue(); AlertFormValue formValue = new AlertFormValue();
......
package com.yeejoin.amos.boot.module.jcs.biz.service.impl; package com.yeejoin.amos.boot.module.jcs.biz.service.impl;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.google.common.collect.Maps;
import com.yeejoin.amos.boot.module.jcs.api.dto.FireBrigadeResourceDto; import com.yeejoin.amos.boot.module.jcs.api.dto.FireBrigadeResourceDto;
import com.yeejoin.amos.boot.module.jcs.api.dto.FireTeamCardDto;
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.dto.FireTeamListDto;
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.feign.EquipFeignClient;
import com.yeejoin.amos.boot.module.jcs.api.mapper.FireTeamMapper; import com.yeejoin.amos.boot.module.jcs.api.mapper.FireTeamMapper;
import com.yeejoin.amos.boot.module.jcs.api.service.IFireTeamService; import com.yeejoin.amos.boot.module.jcs.api.service.IFireTeamService;
import com.yeejoin.amos.boot.module.jcs.api.vo.FireTeamListVo;
import com.yeejoin.amos.boot.module.jcs.api.vo.FireTeamVo;
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.foundation.utils.ValidationUtil;
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 java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.stream.Collectors;
/** /**
* 消防队伍 服务实现类 * 消防队伍 服务实现类
...@@ -25,18 +32,9 @@ public class FireTeamServiceImpl extends BaseService<FireTeamDto, FireTeam,FireT ...@@ -25,18 +32,9 @@ public class FireTeamServiceImpl extends BaseService<FireTeamDto, FireTeam,FireT
@Autowired @Autowired
FireTeamMapper fireTeamMapper; FireTeamMapper fireTeamMapper;
@Override
public List<FireTeamVo> getFireTeam(int pageNum, int pageSize, FireTeamListVo par) {
// TODO Auto-generated method stub
return fireTeamMapper.getFireTeam( pageNum, pageSize, par) ;
}
@Override
public Map<String, Long> getFireTeamCount(int pageNum, int pageSize, FireTeamListVo par) {
// TODO Auto-generated method stub
return fireTeamMapper.getFireTeamCount( pageNum, pageSize, par) ;
}
@Autowired
EquipFeignClient equipFeignClient;
/** /**
* 获取监控大队列表 * 获取监控大队列表
...@@ -46,4 +44,35 @@ public class FireTeamServiceImpl extends BaseService<FireTeamDto, FireTeam,FireT ...@@ -46,4 +44,35 @@ public class FireTeamServiceImpl extends BaseService<FireTeamDto, FireTeam,FireT
public List<FireBrigadeResourceDto> listMonitorFireBrigade() { public List<FireBrigadeResourceDto> listMonitorFireBrigade() {
return fireTeamMapper.listMonitorFireBrigade(); return fireTeamMapper.listMonitorFireBrigade();
} }
/**
* 消防队伍分页查询
*
* @param page 分页对象
* @param team 查询参数
* @return
*/
public IPage<FireTeamCardDto> listFireTeamByPage(Page page, FireTeamListDto team) {
// 获取消防车辆列表
ResponseModel<Object> result = equipFeignClient.getFireCarListAll();
Map<Object, Long> teamCarCountMap = Maps.newConcurrentMap();
if (!ValidationUtil.isEmpty(result)) {
List<Map<String, Object>> fireCarListMapList = (List<Map<String, Object>>) result.getResult();
if (!ValidationUtil.isEmpty(fireCarListMapList)) {
teamCarCountMap =
fireCarListMapList.stream().filter(car -> !ValidationUtil.isEmpty(car.get("teamId"))).collect(Collectors.groupingBy(car -> car.get(
"teamId"), Collectors.counting()));
}
}
IPage<FireTeamCardDto> fireTeamListPage = this.baseMapper.getFireTeamForPage(page, team);
List<FireTeamCardDto> fireTeamList = fireTeamListPage.getRecords();
Map<Object, Long> finalTeamCarCountMap = teamCarCountMap;
fireTeamList.forEach(t -> {
if (!ValidationUtil.isEmpty(finalTeamCarCountMap.get(t.getSequenceNbr().toString()))) {
t.setCarNum(finalTeamCarCountMap.get(t.getSequenceNbr().toString()).intValue());
}
});
fireTeamListPage.setRecords(fireTeamList);
return fireTeamListPage;
}
} }
...@@ -24,8 +24,9 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; ...@@ -24,8 +24,9 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; 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.module.jcs.api.dto.AlertFromDto; import com.yeejoin.amos.boot.module.jcs.api.dto.AlertFormDto;
import com.yeejoin.amos.boot.module.jcs.api.dto.AlertFromValueDto; import com.yeejoin.amos.boot.module.jcs.api.dto.AlertFormValueDto;
import com.yeejoin.amos.boot.module.jcs.api.dto.FormValue;
import com.yeejoin.amos.boot.module.jcs.api.dto.OrgDepartmentDto; import com.yeejoin.amos.boot.module.jcs.api.dto.OrgDepartmentDto;
import com.yeejoin.amos.boot.module.jcs.api.dto.OrgDepartmentFormDto; import com.yeejoin.amos.boot.module.jcs.api.dto.OrgDepartmentFormDto;
import com.yeejoin.amos.boot.module.jcs.api.dto.OrgMenuDto; import com.yeejoin.amos.boot.module.jcs.api.dto.OrgMenuDto;
...@@ -39,8 +40,6 @@ import com.yeejoin.amos.boot.module.jcs.api.entity.OrgUsr; ...@@ -39,8 +40,6 @@ import com.yeejoin.amos.boot.module.jcs.api.entity.OrgUsr;
import com.yeejoin.amos.boot.module.jcs.api.enums.OrgPersonEnum; import com.yeejoin.amos.boot.module.jcs.api.enums.OrgPersonEnum;
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.AlertFormValueVo;
import com.yeejoin.amos.boot.module.jcs.api.vo.FormValue;
import com.yeejoin.amos.feign.privilege.Privilege; import com.yeejoin.amos.feign.privilege.Privilege;
import com.yeejoin.amos.feign.privilege.model.AgencyUserModel; import com.yeejoin.amos.feign.privilege.model.AgencyUserModel;
...@@ -315,9 +314,9 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp ...@@ -315,9 +314,9 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
@Override @Override
public List<FormValue> getFormValue(Long id) throws Exception { public List<FormValue> getFormValue(Long id) throws Exception {
// 动态表单数据 // 动态表单数据
List<AlertFormValueVo> list = alertFormValueServiceImpl.listByCalledId(id); List<AlertFormValueDto> list = alertFormValueServiceImpl.listByCalledId(id);
List<FormValue> formValue = new ArrayList<>(); List<FormValue> formValue = new ArrayList<>();
for (AlertFormValueVo alertFormValue : list) { for (AlertFormValueDto alertFormValue : list) {
if (alertFormValue.getFieldValueCode() == null) { if (alertFormValue.getFieldValueCode() == null) {
FormValue value = new FormValue(alertFormValue.getFieldCode(), alertFormValue.getFieldName(), alertFormValue.getFieldType(), FormValue value = new FormValue(alertFormValue.getFieldCode(), alertFormValue.getFieldName(), alertFormValue.getFieldType(),
alertFormValue.getFieldValue(), alertFormValue.getBlock()); alertFormValue.getFieldValue(), alertFormValue.getBlock());
...@@ -333,9 +332,9 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp ...@@ -333,9 +332,9 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
public List<FormValue> getFormValueDetail(Long id) throws Exception { public List<FormValue> getFormValueDetail(Long id) throws Exception {
// 动态表单数据 // 动态表单数据
List<AlertFormValueVo> list = alertFormValueServiceImpl.listByCalledId(id); List<AlertFormValueDto> list = alertFormValueServiceImpl.listByCalledId(id);
List<FormValue> formValue = new ArrayList<>(); List<FormValue> formValue = new ArrayList<>();
for (AlertFormValueVo alertFormValue : list) { for (AlertFormValueDto alertFormValue : list) {
FormValue value = new FormValue(alertFormValue.getFieldCode(), alertFormValue.getFieldName(), alertFormValue.getFieldType(), FormValue value = new FormValue(alertFormValue.getFieldCode(), alertFormValue.getFieldName(), alertFormValue.getFieldType(),
alertFormValue.getFieldValue(), alertFormValue.getBlock()); alertFormValue.getFieldValue(), alertFormValue.getBlock());
formValue.add(value); formValue.add(value);
...@@ -413,10 +412,10 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp ...@@ -413,10 +412,10 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
alertFromValuelist.stream().forEach(alertFromValue -> { alertFromValuelist.stream().forEach(alertFromValue -> {
alertFromValue.setAlertCalledId(orgUsr.getSequenceNbr()); alertFromValue.setAlertCalledId(orgUsr.getSequenceNbr());
}); });
List<AlertFromValueDto> formList = alertFormValueServiceImpl.queryByCalledId(orgUsr.getSequenceNbr()); List<AlertFormValueDto> formList = alertFormValueServiceImpl.queryByCalledId(orgUsr.getSequenceNbr());
if (formList != null && formList.size() > 0) { if (formList != null && formList.size() > 0) {
for (AlertFormValue dis : alertFromValuelist) { for (AlertFormValue dis : alertFromValuelist) {
for (AlertFromValueDto src : formList) { for (AlertFormValueDto src : formList) {
if (dis.getAlertFormId() == src.getAlertFormId()) { if (dis.getAlertFormId() == src.getAlertFormId()) {
dis.setSequenceNbr(src.getSequenceNbr()); dis.setSequenceNbr(src.getSequenceNbr());
dis.setRecDate(new Date()); dis.setRecDate(new Date());
...@@ -432,7 +431,7 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp ...@@ -432,7 +431,7 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
// 保存动态表单数据 // 保存动态表单数据
alertFormValueServiceImpl.updateBatchById(alertFromValuelist); alertFormValueServiceImpl.updateBatchById(alertFromValuelist);
List<AlertFromDto> form = alertFormServiceImpl.queryListByTypeCode(formList.get(0).getAlertTypeCode()); List<AlertFormDto> form = alertFormServiceImpl.queryListByTypeCode(formList.get(0).getAlertTypeCode());
if (form.size() != alertFromValuelist.size()) { if (form.size() != alertFromValuelist.size()) {
...@@ -440,7 +439,7 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp ...@@ -440,7 +439,7 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
for (AlertFormValue dis : alertFromValuelist) { for (AlertFormValue dis : alertFromValuelist) {
boolean exist = false; boolean exist = false;
for (AlertFromValueDto src : formList) { for (AlertFormValueDto src : formList) {
if (dis.getAlertFormId() == src.getSequenceNbr()) { if (dis.getAlertFormId() == src.getSequenceNbr()) {
exist = true; exist = true;
break; break;
...@@ -470,7 +469,7 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp ...@@ -470,7 +469,7 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
queryWrapper.eq("alert_type_code",OrgPersonEnum.人员.getCode()); queryWrapper.eq("alert_type_code",OrgPersonEnum.人员.getCode());
List<AlertForm> alertForms = alertFormServiceImpl.list(queryWrapper); List<AlertForm> alertForms = alertFormServiceImpl.list(queryWrapper);
// 动态表单数据 // 动态表单数据
List<AlertFormValueVo> list = alertFormValueServiceImpl.listByCalledId(id); List<AlertFormValueDto> list = alertFormValueServiceImpl.listByCalledId(id);
Map<String, Object> result = new HashMap<>(); Map<String, Object> result = new HashMap<>();
result = Bean.BeantoMap(orgUsr); result = Bean.BeantoMap(orgUsr);
result.put("parenName",getById(orgUsr.getParentId()).getBizOrgName()); result.put("parenName",getById(orgUsr.getParentId()).getBizOrgName());
...@@ -478,7 +477,7 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp ...@@ -478,7 +477,7 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
for (AlertForm alertForm : alertForms) { for (AlertForm alertForm : alertForms) {
result.put(alertForm.getFieldCode(), null); result.put(alertForm.getFieldCode(), null);
} }
for (AlertFormValueVo alertFormValue : list) { for (AlertFormValueDto alertFormValue : list) {
result.replace(alertFormValue.getFieldCode(), alertFormValue.getFieldValue()); result.replace(alertFormValue.getFieldCode(), alertFormValue.getFieldValue());
} }
return result; return result;
......
...@@ -4,14 +4,13 @@ import java.util.List; ...@@ -4,14 +4,13 @@ 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.typroject.tyboot.core.foundation.context.RequestContext;
import org.typroject.tyboot.core.foundation.utils.ValidationUtil; import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import org.typroject.tyboot.core.restful.exception.instance.BadRequest; import org.typroject.tyboot.core.restful.exception.instance.BadRequest;
import com.yeejoin.amos.boot.module.jcs.api.dto.AlertCalledObjsDto;
import com.yeejoin.amos.boot.module.jcs.api.dto.AlertCalledRo; 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.entity.AlertCalled;
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.vo.AlertCalledVo;
import com.yeejoin.amos.component.rule.RuleTrigger; import com.yeejoin.amos.component.rule.RuleTrigger;
/** /**
...@@ -39,7 +38,7 @@ public class RuleAlertCalledService { ...@@ -39,7 +38,7 @@ public class RuleAlertCalledService {
* @return * @return
* @throws Exception * @throws Exception
*/ */
public Boolean fireAlertCalledRule(AlertCalledVo alertCalledVo) throws Exception public Boolean fireAlertCalledRule(AlertCalledObjsDto alertCalledVo) throws Exception
{ {
AlertCalled alertCalled = alertCalledVo.getAlertCalled(); AlertCalled alertCalled = alertCalledVo.getAlertCalled();
if (ValidationUtil.isEmpty(alertCalled)) if (ValidationUtil.isEmpty(alertCalled))
......
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