Commit 2dacbcb0 authored by 高建强's avatar 高建强

Merge remote-tracking branch 'origin/developer' into developer

parents 8f63b9c7 e8d929a6
...@@ -10,18 +10,61 @@ import java.io.Serializable; ...@@ -10,18 +10,61 @@ import java.io.Serializable;
* @author Dell * @author Dell
* **/ * **/
public class ReginParams implements Serializable { public class ReginParams implements Serializable {
/**
*
*/
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
private CompanyBo company; private CompanyBo company;
private RoleBo role; private RoleBo role;
private DepartmentBo department; private DepartmentBo department;
//用户基本信息
private AgencyUserModel userModel; private AgencyUserModel userModel;
private PersonIdentity personIdentity;
public static class PersonIdentity {
private String identityType;
private String personName;
private String companyId;
public PersonIdentity(String identityType,String personName,String companyId){
this.identityType = identityType;
this.personName = personName;
this.companyId = companyId;
}
public String getIdentityType() {
return identityType;
}
public void setIdentityType(String identityType) {
this.identityType = identityType;
}
public String getPersonName() {
return personName;
}
public void setPersonName(String personName) {
this.personName = personName;
}
public String getCompanyId() {
return companyId;
}
public void setCompanyId(String companyId) {
this.companyId = companyId;
}
}
public PersonIdentity getPersonIdentity() {
return personIdentity;
}
public void setPersonIdentity(PersonIdentity personIdentity) {
this.personIdentity = personIdentity;
}
@Deprecated @Deprecated
private String token; private String token;
public CompanyBo getCompany() { public CompanyBo getCompany() {
return company; return company;
} }
...@@ -46,19 +89,21 @@ public class ReginParams implements Serializable { ...@@ -46,19 +89,21 @@ public class ReginParams implements Serializable {
this.department = department; this.department = department;
} }
public AgencyUserModel getUserModel() { public AgencyUserModel getUserModel() {
return userModel; return userModel;
} }
public void setUserModel(AgencyUserModel userModel) {
this.userModel = userModel;
}
public void setUserModel(AgencyUserModel userModel) {
this.userModel = userModel;
}
@Deprecated @Deprecated
public String getToken() { public String getToken() {
return token; return token;
} }
@Deprecated @Deprecated
public void setToken(String token) { public void setToken(String token) {
this.token = token; this.token = token;
} }
} }
package com.yeejoin.amos.boot.biz.common.dao.mapper; //package com.yeejoin.amos.boot.biz.common.dao.mapper;
//
import org.apache.ibatis.annotations.Mapper; //import org.apache.ibatis.annotations.Mapper;
//
/** ///**
* MyBatis BaseMapper // * MyBatis BaseMapper
* @author DELL // * @author DELL
*/ // */
@Mapper //@Mapper
public interface BaseMapper { //public interface BaseMapper {
} //}
package com.yeejoin.amos.boot.biz.common.dao.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yeejoin.amos.boot.biz.common.entity.DataDictionary;
/**
* 数据字典 Mapper 接口
*
* @author tb
* @date 2021-06-07
*/
public interface DataDictionaryMapper extends BaseMapper<DataDictionary> {
}
...@@ -5,6 +5,8 @@ import java.util.Date; ...@@ -5,6 +5,8 @@ import java.util.Date;
import com.alibaba.excel.annotation.ExcelIgnore; import com.alibaba.excel.annotation.ExcelIgnore;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
...@@ -30,8 +32,12 @@ public class BaseDto implements Serializable{ ...@@ -30,8 +32,12 @@ public class BaseDto implements Serializable{
protected Date recDate; protected Date recDate;
@ExcelIgnore @ExcelIgnore
@ApiModelProperty(value = "更新人") @ApiModelProperty(value = "更新人id")
protected String recUserId; protected String recUserId;
@ExcelIgnore
@ApiModelProperty(value = "更新人")
protected String recUserName;
@ExcelIgnore @ExcelIgnore
@ApiModelProperty(value = "是否删除") @ApiModelProperty(value = "是否删除")
......
package com.yeejoin.amos.boot.biz.common.dto;
import com.yeejoin.amos.boot.biz.common.dto.BaseDto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* 数据字典
*
* @author tb
* @date 2021-06-07
*/
@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel(value="DataDictionaryDto", description="数据字典")
public class DataDictionaryDto extends BaseDto {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "code")
private String code;
@ApiModelProperty(value = "名称")
private String name;
@ApiModelProperty(value = "类型")
private String type;
@ApiModelProperty(value = "父级")
private Long parent;
@ApiModelProperty(value = "操作人名称")
private String recUserName;
}
package com.yeejoin.amos.boot.biz.common.entity;
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;
/**
* 数据字典
*
* @author tb
* @date 2021-06-07
*/
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("cb_data_dictionary")
@ApiModel(value="DataDictionary对象", description="数据字典")
public class DataDictionary extends BaseEntity {
/**
*
*/
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "code")
private String code;
@ApiModelProperty(value = "名称")
private String name;
@ApiModelProperty(value = "类型")
private String type;
@ApiModelProperty(value = "父级")
private Long parent;
//新加排序字段
@ApiModelProperty(value = "排序字段")
private int sortNum;
}
package com.yeejoin.amos.boot.biz.common.service;
import com.yeejoin.amos.boot.biz.common.utils.MenuFrom;
import java.util.List;
/**
* 数据字典 服务类
*
* @author tb
* @date 2021-06-07
*/
public interface IDataDictionaryService {
Object getFireChemical(String type) throws Exception;
Object gwmcDataDictionary(String type) throws Exception;
List<MenuFrom> getGWMCDataDictionary(String type) throws Exception;
}
package com.yeejoin.amos.boot.biz.common.service.impl;
import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.yeejoin.amos.boot.biz.common.dao.mapper.DataDictionaryMapper;
import com.yeejoin.amos.boot.biz.common.dto.DataDictionaryDto;
import com.yeejoin.amos.boot.biz.common.entity.DataDictionary;
import com.yeejoin.amos.boot.biz.common.service.IDataDictionaryService;
import com.yeejoin.amos.boot.biz.common.utils.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import org.typroject.tyboot.core.rdbms.service.BaseService;
import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import java.util.Collection;
import java.util.List;
/**
* 数据字典 服务实现类
*
* @author tb
* @date 2021-06-07
*/
@Service
public class DataDictionaryServiceImpl extends BaseService<DataDictionaryDto, DataDictionary, DataDictionaryMapper> implements IDataDictionaryService {
@Autowired
RedisUtils redisUtils;
@Value("${redis.cache.failure.time}")
private long time;
@Override
public Object getFireChemical(String type) throws Exception {
QueryWrapper<DataDictionary> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("type", type);
queryWrapper.orderByAsc("sort_num");
if (redisUtils.hasKey(RedisKey.DATA_DICTIONARY_CODE + type)) {
Object obj = redisUtils.get(RedisKey.DATA_DICTIONARY_CODE + type);
return obj;
} else {
Collection<DataDictionary> list = this.list(queryWrapper);
List<MenuFrom> menus = TreeParser.getTreexin(null, list, DataDictionary.class.getName(), "getCode", 0,
"getName", "getParent", null);
MenuFrom Me = new MenuFrom("-1", "-1", "-1", "危化品库", "危化品库", "危化品库", "-1", null);
Me.setIsLeaf(false);
Me.setChildren(menus);
redisUtils.set(RedisKey.DATA_DICTIONARY_CODE + type, JSON.toJSON(Me), time);
return Me;
}
}
@Override
public Object gwmcDataDictionary(String type) throws Exception {
QueryWrapper<DataDictionary> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("type", type);
queryWrapper.orderByAsc("sort_num");
if (redisUtils.hasKey(RedisKey.DATA_DICTIONARY_CODE + type)) {
Object obj = redisUtils.get(RedisKey.DATA_DICTIONARY_CODE + type);
return obj;
} else {
Collection<DataDictionary> list = this.list(queryWrapper);
List<Menu> menus = TreeParser.getTree(null, list, DataDictionary.class.getName(), "getCode", 0, "getName"
, "getParent", null);
redisUtils.set(RedisKey.DATA_DICTIONARY_CODE + type, JSON.toJSON(menus), time);
return menus;
}
}
public List<MenuFrom> getGWMCDataDictionary(String type) throws Exception {
QueryWrapper<DataDictionary> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("type", type);
queryWrapper.orderByAsc("sort_num");
Collection<DataDictionary> list = this.list(queryWrapper);
List<MenuFrom> menus = TreeParser.getTreexin(null, list, DataDictionary.class.getName(), "getCode", 0, "getName"
, "getParent", null);
return menus;
}
}
...@@ -5,6 +5,7 @@ import org.apache.commons.lang3.StringUtils; ...@@ -5,6 +5,7 @@ import org.apache.commons.lang3.StringUtils;
import java.text.ParseException; import java.text.ParseException;
import java.text.ParsePosition; import java.text.ParsePosition;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.time.LocalDate;
import java.util.*; import java.util.*;
/** /**
...@@ -663,4 +664,27 @@ public class DateUtils { ...@@ -663,4 +664,27 @@ public class DateUtils {
return date.after(begin) && date.before(end); return date.after(begin) && date.before(end);
} }
/**
* 由出生日期获得年龄
*
* @param birthDay 出生日期
*/
public static int getAge(Date birthDay) {
if (birthDay == null) {
return 0;
}
LocalDate now = LocalDate.now();
Calendar cal = Calendar.getInstance();
cal.setTime(birthDay);
int yearBirth = cal.get(Calendar.YEAR);
int monthBirth = cal.get(Calendar.MONTH) + 1;
int dayOfMonthBirth = cal.get(Calendar.DAY_OF_MONTH);
LocalDate birth = LocalDate.of(yearBirth, monthBirth, dayOfMonthBirth);
if (birth.isAfter(now)) {
return 0;
}
int age = birth.until(now).getYears();
return age;
}
} }
...@@ -26,6 +26,8 @@ public class RedisKey { ...@@ -26,6 +26,8 @@ public class RedisKey {
public static final String THOUGHT_ID="thought_id_"; public static final String THOUGHT_ID="thought_id_";
/**根据警情id查询警情详情记录*/ /**根据警情id查询警情详情记录*/
public static final String ALERTCALLED_ID="alertcalled_id_"; public static final String ALERTCALLED_ID="alertcalled_id_";
/**特种设备根据警情id查询警情详情记录*/
public static final String TZS_ALERTCALLED_ID="tzs_alertcalled_id_";
/** 驼峰转下划线(简单写法,效率低于{@link #humpToLine2(String)}) */ /** 驼峰转下划线(简单写法,效率低于{@link #humpToLine2(String)}) */
public static String humpToLine(String str) { public static String humpToLine(String str) {
......
...@@ -11,12 +11,16 @@ import java.util.Random; ...@@ -11,12 +11,16 @@ import java.util.Random;
/** /**
* 生成树工具类 * 生成树工具类
* *
* @author DELL
* @return <PRE> * @return <PRE>
* author tw * author tw
* date 2021/6/10 * date 2021/6/10
* </PRE> * </PRE>
*/ */
public class TreeParser { public class TreeParser {
public static final Integer CODE_LENGTH = 6;
/** /**
* @param topId 父id * @param topId 父id
* @param entityList 数据集合 * @param entityList 数据集合
...@@ -330,7 +334,7 @@ public class TreeParser { ...@@ -330,7 +334,7 @@ public class TreeParser {
} }
public static String genTreeCode() { public static String genTreeCode() {
int length = 6; int length = CODE_LENGTH;
String str = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; String str = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
Random random = new Random(); Random random = new Random();
StringBuffer sb = new StringBuffer(); StringBuffer sb = new StringBuffer();
......
package com.yeejoin.amos.boot.biz.common.workflow.enums;
public enum WorkFlowUriEnum {
启动流程("启动流程", "/workflow/task/startTask", ""),
流程详情("流程详情", "/workflow/task/{taskId}", "taskId"),
合并启动流程("合并启动流程", "/workflow/task/startProcess", ""),
所有已执行任务详情("所有已执行任务详情","/workflow/activitiHistory/task/detail/{taskId}","taskId"),
流程任务("流程任务", "/workflow/task?processInstanceId={processInstanceId}", "processInstanceId"),
我的代办("我的代办", "/workflow/task/all-list?processDefinitionKey={processDefinitionKey}", "processDefinitionKey"),
我的代办有ID("我的代办有ID", "/workflow/task/all-list?processDefinitionKey={processDefinitionKey}&userId={userId}", "processDefinitionKey,userId"),
已执行任务("已执行任务", "/workflow/activitiHistory/all-historytasks?processDefinitionKey={processDefinitionKey}", "processDefinitionKey"),
已执行任务有ID("已执行任务有ID", "/workflow/activitiHistory/all-historytasks?processDefinitionKey={processDefinitionKey}&userId={userId}", "processDefinitionKey,userId"),
启动免登录流程("启动免登录流程", "/processes/{appKey}", "appKey"),
当前节点("当前节点", "/wf/taskstodo?processInstanceId={processInstanceId}", "processInstanceId"),
执行流程("执行流程", "/workflow/task/pickupAndCompleteTask/{taskId}", "taskId"),
终止流程("终止流程", "/wf/processes/{processInstanceId}?deleteReason={deleteReason}", "processInstanceId,deleteReason"),
当前子节点("当前子节点", "/wf/processes/{processInstanceId}/tasks?taskDefinitionKey={taskDefinitionKey}", "processInstanceId,taskDefinitionKey"),
工作流流水("工作流流水","/wf/processes/{processInstanceId}/tasks", "processInstanceId"),
子节点信息("子节点信息","/workflow/task/list/all/{instanceId}", "instanceId"),
所有已执行任务集合("所有已执行任务集合","/workflow/activitiHistory/tasks/{processInstanceId}", "processInstanceId");
private String desc;
private String uri;
private String params;
WorkFlowUriEnum(String desc, String uri, String params) {
this.desc = desc;
this.uri = uri;
this.params = params;
}
public String getDesc() {
return desc;
}
public void setDesc(String desc) {
this.desc = desc;
}
public String getUri() {
return uri;
}
public void setUri(String uri) {
this.uri = uri;
}
public String getParams() {
return params;
}
public void setParams(String params) {
this.params = params;
}
}
package com.yeejoin.amos.boot.biz.common.workflow.enums;
/**
* 是否枚举
* @author WJK
*
*/
public enum YesOrNoEnum {
NO("否","0"),
YES("是","1" );
/**
* 名称,描述
*/
private String name;
/**
* 编码
*/
private String code;
private YesOrNoEnum(String name, String code){
this.name = name;
this.code = code;
}
public static YesOrNoEnum getEnum(String code) {
YesOrNoEnum jPushTypeEnum = null;
for(YesOrNoEnum type: YesOrNoEnum.values()) {
if (type.getCode().equals(code)) {
jPushTypeEnum = type;
break;
}
}
return jPushTypeEnum;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
}
...@@ -43,14 +43,13 @@ public class SeismometeorologyDtoDao { ...@@ -43,14 +43,13 @@ public class SeismometeorologyDtoDao {
* *
* **/ * **/
public List<SeismometeorologyDto> findCarStateByWatchSn(){ public List<SeismometeorologyDto> findCarStateByWatchSn(){
Calendar calendar = Calendar.getInstance(); //创建Calendar 的实例 System.out.println(new Date().getTime());
calendar.add(Calendar.DAY_OF_MONTH,-1); Query query = new Query(Criteria.where("releaseTime").gte(getStartTime())
System.out.println(new Date().getTime()); .lte(getEndTime()));
Query query = new Query(Criteria.where("releaseTime").gte(calendar.getTimeInMillis())); Sort sort= Sort.by(Sort.Direction.DESC, "releaseTime");
Sort sort= Sort.by(Sort.Direction.DESC, "releaseTime"); query.with(sort);
query.with(sort); List<SeismometeorologyDto> gpsList = mongoTemplate.find(query, SeismometeorologyDto.class);
List<SeismometeorologyDto> gpsList = mongoTemplate.find(query, SeismometeorologyDto.class); return gpsList;
return gpsList;
} }
/** /**
...@@ -61,8 +60,8 @@ public class SeismometeorologyDtoDao { ...@@ -61,8 +60,8 @@ public class SeismometeorologyDtoDao {
public List<SeismometeorologyDto> findDutyCarStateBy(){ public List<SeismometeorologyDto> findDutyCarStateBy(){
System.out.println(new Date().getTime()); System.out.println(new Date().getTime());
Query query = new Query(Criteria.where("releaseTime").gte(getStartTime().getTime()) Query query = new Query(Criteria.where("releaseTime").gte(getStartTime())
.lte(getEndTime().getTime())); .lte(getEndTime()));
Sort sort= Sort.by(Sort.Direction.DESC, "releaseTime"); Sort sort= Sort.by(Sort.Direction.DESC, "releaseTime");
query.with(sort); query.with(sort);
List<SeismometeorologyDto> gpsList = mongoTemplate.find(query, SeismometeorologyDto.class); List<SeismometeorologyDto> gpsList = mongoTemplate.find(query, SeismometeorologyDto.class);
......
...@@ -41,7 +41,7 @@ public class SeismometeorologyDto { ...@@ -41,7 +41,7 @@ public class SeismometeorologyDto {
@ApiModelProperty(value = "发布时间") @ApiModelProperty(value = "发布时间")
@Field("releaseTime") @Field("releaseTime")
private Long releaseTime; private Date releaseTime;
@ApiModelProperty(value = "发布单位") @ApiModelProperty(value = "发布单位")
@Field("releaseCompany") @Field("releaseCompany")
...@@ -50,9 +50,12 @@ public class SeismometeorologyDto { ...@@ -50,9 +50,12 @@ public class SeismometeorologyDto {
@ApiModelProperty(value = "发布内容") @ApiModelProperty(value = "发布内容")
@Field("content") @Field("content")
private String content; private String content;
public SeismometeorologyDto(Long sequenceNbr, String type, String typeName, String grade, Long releaseTime, String releaseCompany, String content) {
public SeismometeorologyDto(Long sequenceNbr, String type, String typeName, String grade, Date releaseTime, String releaseCompany, String content) {
this.sequenceNbr = sequenceNbr; this.sequenceNbr = sequenceNbr;
this.type = type; this.type = type;
this.typeName = typeName; this.typeName = typeName;
......
package com.yeejoin.amos.boot.module.command.api.dto;
public class videoDataDto {
private String code;
private String msg;
private String data;
}
...@@ -13,5 +13,9 @@ ...@@ -13,5 +13,9 @@
<artifactId>amos-boot-biz-common</artifactId> <artifactId>amos-boot-biz-common</artifactId>
<version>${amos-biz-boot.version}</version> <version>${amos-biz-boot.version}</version>
</dependency> </dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-elasticsearch</artifactId>
</dependency>
</dependencies> </dependencies>
</project> </project>
...@@ -14,7 +14,7 @@ import lombok.EqualsAndHashCode; ...@@ -14,7 +14,7 @@ import lombok.EqualsAndHashCode;
@ApiModel(value="CompanyDto", description="重点单位资源") @ApiModel(value="CompanyDto", description="重点单位资源")
public class CompanyDto { public class CompanyDto {
@ApiModelProperty(value = "主键ID") @ApiModelProperty(value = "主键ID")
protected Long id; protected Long sequenceNbr;
@ApiModelProperty(value = "经度") @ApiModelProperty(value = "经度")
private Double longitude; private Double longitude;
......
package com.yeejoin.amos.boot.module.common.api.dto; //package com.yeejoin.amos.boot.module.common.api.dto;
//
import com.yeejoin.amos.boot.biz.common.dto.BaseDto; //import com.yeejoin.amos.boot.biz.common.dto.BaseDto;
import io.swagger.annotations.ApiModel; //import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; //import io.swagger.annotations.ApiModelProperty;
import lombok.Data; //import lombok.Data;
import lombok.EqualsAndHashCode; //import lombok.EqualsAndHashCode;
/** ///**
* 数据字典 //* 数据字典
* //*
* @author tb //* @author tb
* @date 2021-06-07 //* @date 2021-06-07
*/ //*/
@Data //@Data
@EqualsAndHashCode(callSuper = true) //@EqualsAndHashCode(callSuper = true)
@ApiModel(value="DataDictionaryDto", description="数据字典") //@ApiModel(value="DataDictionaryDto", description="数据字典")
public class DataDictionaryDto extends BaseDto { //public class DataDictionaryDto extends BaseDto {
private static final long serialVersionUID = 1L; // private static final long serialVersionUID = 1L;
//
//
@ApiModelProperty(value = "code") // @ApiModelProperty(value = "code")
private String code; // private String code;
//
@ApiModelProperty(value = "名称") // @ApiModelProperty(value = "名称")
private String name; // private String name;
//
@ApiModelProperty(value = "类型") // @ApiModelProperty(value = "类型")
private String type; // private String type;
//
@ApiModelProperty(value = "父级") // @ApiModelProperty(value = "父级")
private Long parent; // private Long parent;
//
@ApiModelProperty(value = "操作人名称") // @ApiModelProperty(value = "操作人名称")
private String recUserName; // private String recUserName;
//
} //}
package com.yeejoin.amos.boot.module.common.api.dto;
import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;
import org.springframework.data.elasticsearch.annotations.Mapping;
/**
*
* <pre>
* 单位
* </pre>
*
*/
@Data
@Document(indexName = "org", type = "_doc", shards = 1, replicas = 0)
public class ESOrgUsrDto {
/**部门主键 */
@Id
private Long sequenceNbr;
@Field(type = FieldType.Text,analyzer="ik_max_word",searchAnalyzer="ik_max_word")
private String bizOrgName;
}
package com.yeejoin.amos.boot.module.common.api.dto; package com.yeejoin.amos.boot.module.common.api.dto;
import com.yeejoin.amos.boot.biz.common.utils.DateUtils;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import org.springframework.util.StringUtils;
import java.util.Date;
@Data @Data
public class ExcelDto { public class ExcelDto {
@ApiModelProperty(value = "文件名称") @ApiModelProperty(value = "文件名称")
private String fileName; private String fileName;
@ApiModelProperty(value = "sheet页名称") @ApiModelProperty(value = "sheet页名称")
private String sheetName; private String sheetName;
@ApiModelProperty(value = "类包全路径") @ApiModelProperty(value = "类包全路径")
private String classUrl; private String classUrl;
@ApiModelProperty(value = "导出类型 来源于ExcelEnums常量") @ApiModelProperty(value = "导出类型 来源于ExcelEnums常量")
private String type; private String type;
public ExcelDto(String fileName, String sheetName, String classUrl, String type) {
super();
this.fileName = fileName;
this.sheetName = sheetName;
this.classUrl = classUrl;
this.type = type;
}
public ExcelDto(String fileName, String sheetName, String type) {
this.fileName = fileName;
this.sheetName = sheetName;
this.type = type;
}
public ExcelDto() {
}
public String getFileName() {
return StringUtils.isEmpty(fileName) ? DateUtils.convertDateToString(new Date(), "yyyyMMddHHmmss") : fileName;
}
public String getSheetName() {
return StringUtils.isEmpty(sheetName) ? "Sheet1" : sheetName;
}
} }
package com.yeejoin.amos.boot.module.common.api.dto;
import com.yeejoin.amos.boot.biz.common.dto.BaseDto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
/**
* @author system_generator
* @date 2021-08-04
*/
@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "FailureAuditDto", description = "")
public class FailureAuditDto extends BaseDto {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "审核人")
private String auditor;
@ApiModelProperty(value = "审核部门")
private String auditDepartment;
@ApiModelProperty(value = "审核部门")
private Long auditDepartmentId;
@ApiModelProperty(value = "审核时间")
private Date auditTime;
@ApiModelProperty(value = "审核意见")
private String auditOpinion;
@ApiModelProperty(value = "审核结果")
private Integer auditResult;
@ApiModelProperty(value = "设备故障报修单id")
private Long faultId;
@ApiModelProperty(value = "审核结果条件判断,0同意,1拒绝,2驳回")
private String condition;
}
package com.yeejoin.amos.boot.module.common.api.dto;
import com.yeejoin.amos.boot.biz.common.dto.BaseDto;
import com.yeejoin.amos.boot.module.common.api.entity.SourceFile;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
import java.util.List;
/**
* @author system_generator
* @date 2021-08-04
*/
@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "FailureDetailsDto", description = "")
public class FailureDetailsDto extends BaseDto {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "当前状态")
private Integer currentStatus;
@ApiModelProperty(value = "故障单号")
private String failureCode;
@ApiModelProperty(value = "故障设备ID")
private Integer failureEquipmentId;
@ApiModelProperty(value = "故障设备")
private String failureEquipment;
@ApiModelProperty(value = "故障时间")
private Date faultTime;
@ApiModelProperty(value = "故障现象")
private String faultPhenomenon;
@ApiModelProperty(value = "报送人")
private String submissionName;
@ApiModelProperty(value = "报送人ID")
private Integer submissionPid;
@ApiModelProperty(value = "组织code")
private String bizCode;
@ApiModelProperty(value = "报送时间")
private Date submissionTime;
@ApiModelProperty(value = "送达部门")
private String submissionBranch;
@ApiModelProperty(value = "送达部门ID")
private Long submissionBranchId;
@ApiModelProperty(value = "流程ID")
private String processId;
@ApiModelProperty(value = "附件")
private List<SourceFile> attachment;
}
package com.yeejoin.amos.boot.module.common.api.dto;
import com.yeejoin.amos.boot.biz.common.dto.BaseDto;
import com.yeejoin.amos.boot.module.common.api.entity.SourceFile;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
import java.util.List;
/**
* @author system_generator
* @date 2021-08-04
*/
@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "FailureMaintainDto", description = "")
public class FailureMaintainDto extends BaseDto {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "维修人")
private String maintainMan;
@ApiModelProperty(value = "维修时间")
private Date maintainTime;
@ApiModelProperty(value = "维修人手机号")
private Long maintainPhone;
@ApiModelProperty(value = "所属部门ID")
private String bizId;
@ApiModelProperty(value = "所属部门")
private String department;
@ApiModelProperty(value = "维修内容")
private String maintainContent;
@ApiModelProperty(value = "记录类型")
private String recoreType;
@ApiModelProperty(value = "验收意见")
private String acceptanceOpinion;
@ApiModelProperty(value = "设备故障报修主表ID")
private Long faultId;
@ApiModelProperty(value = "附件")
private List<SourceFile> attachment;
@ApiModelProperty(value = "审核结果条件判断,0同意,1拒绝,2驳回")
private String condition;
}
package com.yeejoin.amos.boot.module.common.api.dto; package com.yeejoin.amos.boot.module.common.api.dto;
import java.io.Serializable;
import java.util.List;
import java.util.Map;
import com.yeejoin.amos.boot.biz.common.dto.BaseDto;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import com.yeejoin.amos.boot.biz.common.dto.BaseDto;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import java.util.Date;
/** /**
* 重点部位 * 重点部位
...@@ -16,7 +20,7 @@ import java.util.Date; ...@@ -16,7 +20,7 @@ import java.util.Date;
@Data @Data
@EqualsAndHashCode(callSuper = true) @EqualsAndHashCode(callSuper = true)
@ApiModel(value="KeySiteDto", description="重点部位") @ApiModel(value="KeySiteDto", description="重点部位")
public class KeySiteDto extends BaseDto { public class KeySiteDto extends BaseDto implements Serializable{
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
...@@ -26,9 +30,15 @@ public class KeySiteDto extends BaseDto { ...@@ -26,9 +30,15 @@ public class KeySiteDto extends BaseDto {
@ApiModelProperty(value = "所属单位/部门id") @ApiModelProperty(value = "所属单位/部门id")
private Long belongId; private Long belongId;
@ApiModelProperty(value = "所属单位/部门名称")
private String belongName;
@ApiModelProperty(value = "所属建筑id") @ApiModelProperty(value = "所属建筑id")
private Long buildingId; private Long buildingId;
@ApiModelProperty(value = "所属建筑名称")
private String buildingName;
@ApiModelProperty(value = "位置描述") @ApiModelProperty(value = "位置描述")
private String addressDesc; private String addressDesc;
...@@ -58,7 +68,7 @@ public class KeySiteDto extends BaseDto { ...@@ -58,7 +68,7 @@ public class KeySiteDto extends BaseDto {
private String fireFacilitiesInfo; private String fireFacilitiesInfo;
@ApiModelProperty(value = "防火标志设立情况") @ApiModelProperty(value = "防火标志设立情况")
private String firePreventionFlag; private Boolean firePreventionFlag;
@ApiModelProperty(value = "危险源") @ApiModelProperty(value = "危险源")
private String hazard; private String hazard;
...@@ -69,7 +79,19 @@ public class KeySiteDto extends BaseDto { ...@@ -69,7 +79,19 @@ public class KeySiteDto extends BaseDto {
@ApiModelProperty(value = "防范手段措施") @ApiModelProperty(value = "防范手段措施")
private String preventiveMeasures; private String preventiveMeasures;
@ApiModelProperty(value = "耐火等级名称")
private String fireEnduranceRateName;
@ApiModelProperty(value = "使用性质名称")
private String useNatureName;
@ApiModelProperty(value = "备注") @ApiModelProperty(value = "备注")
private String remark; private String remark;
@ApiModelProperty(value = "附件")
private Map<String, List<AttachmentDto>> attachments;
@ApiModelProperty(value = "数组形式附件")
private List<String> attachmentsList;
} }
package com.yeejoin.amos.boot.module.common.api.dto;
import java.io.Serializable;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.yeejoin.amos.boot.module.common.api.excel.ExplicitConstraint;
import com.yeejoin.amos.boot.module.common.api.excel.RoleNameExplicitConstraint;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
@ApiModel(value = "KeySite", description = "重点部位")
public class KeySiteExcleDto implements Serializable {
/**
*
*/
@ExcelIgnore
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "序号")
@ExcelIgnore
private Integer number;
@ExcelProperty(value = "重点部位名称", index = 0)
@ApiModelProperty(value = "重点部位名称")
private String name;
@ExcelProperty(value = "所属单位/部门id", index = 1)
@ExplicitConstraint(indexNum = 1, sourceClass = RoleNameExplicitConstraint.class, method = "getCompanyDetailTree") //固定下拉内容
@ApiModelProperty(value = "所属单位/部门id")
private String belongName;
@ExcelIgnore
private Long belongId;
@ExcelProperty(value = "所属建筑id", index = 2)
@ExplicitConstraint(indexNum = 2, sourceClass = RoleNameExplicitConstraint.class, method = "getBuildTree") //固定下拉内容
@ApiModelProperty(value = "所属建筑id")
private String buildingName;
@ExcelIgnore
private Long buildingId;
@ExcelProperty(value = "位置描述", index = 3)
@ApiModelProperty(value = "位置描述")
private String addressDesc;
@ExcelProperty(value = "建筑面积(㎡)", index = 4)
@ApiModelProperty(value = "建筑面积(㎡)")
private String buildingArea;
@ExcelProperty(value = "建筑高度(m)", index = 5)
@ApiModelProperty(value = "建筑高度(m)")
private String buildingHeight;
@ExplicitConstraint(type = "NHDJ", indexNum =6, sourceClass = RoleNameExplicitConstraint.class) //动态下拉内容
@ExcelProperty(value = "耐火等级", index = 6)
@ApiModelProperty(value = "耐火等级")
private String fireEnduranceRate;
@ExplicitConstraint(type = "JZWSYXZ", indexNum =7, sourceClass = RoleNameExplicitConstraint.class) //动态下拉内容
@ExcelProperty(value = "使用性质", index = 7)
@ApiModelProperty(value = "使用性质")
private String useNature;
@ExcelProperty(value = "责任人", index = 8)
@ApiModelProperty(value = "责任人")
private String chargePerson;
@ExcelProperty(value = "责任人身份证", index = 9)
@ApiModelProperty(value = "责任人身份证")
private String chargePersonId;
@ExcelProperty(value = "确定重点防火部位的原因", index = 10)
@ApiModelProperty(value = "确定重点防火部位的原因")
private String keyPreventionReason;
@ExcelProperty(value = "消防设施情况", index = 11)
@ExplicitConstraint(indexNum=11,source = {"有","无"})
@ApiModelProperty(value = "消防设施情况")
private String fireFacilitiesInfo;
@ExcelProperty(value = "防火标志设立情况", index = 12)
@ApiModelProperty(value = "防火标志设立情况")
private String firePreventionFlagName;
@ExcelProperty(value = "危险源", index = 13)
@ApiModelProperty(value = "危险源")
private String hazard;
@ExcelProperty(value = "消防安全管理措施", index = 14)
@ApiModelProperty(value = "消防安全管理措施")
private String safetyManagementMeasures;
@ExcelProperty(value = "防范手段措施", index = 15)
@ApiModelProperty(value = "防范手段措施")
private String preventiveMeasures;
@ExcelProperty(value = "备注", index = 16)
@ApiModelProperty(value = "备注")
private String remark;
}
package com.yeejoin.amos.boot.module.common.api.dto; package com.yeejoin.amos.boot.module.common.api.dto;
import com.yeejoin.amos.boot.biz.common.dto.BaseDto;
import com.yeejoin.amos.boot.module.common.api.entity.SourceFile; import com.yeejoin.amos.boot.module.common.api.entity.SourceFile;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import com.yeejoin.amos.boot.biz.common.dto.BaseDto;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
...@@ -98,5 +98,10 @@ public class LinkageUnitDto extends BaseDto { ...@@ -98,5 +98,10 @@ public class LinkageUnitDto extends BaseDto {
@ApiModelProperty(value = "联动单位图片") @ApiModelProperty(value = "联动单位图片")
private List<SourceFile> image; private List<SourceFile> image;
@ApiModelProperty(value = "车辆数量")
private String vehicleNumber;
@ApiModelProperty(value = "特岗人数")
private String personNumber;
} }
...@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.module.common.api.dto; ...@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.module.common.api.dto;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import lombok.Data; import lombok.Data;
import lombok.experimental.Accessors; import lombok.experimental.Accessors;
import net.bytebuddy.implementation.bind.annotation.Super;
import java.util.List; import java.util.List;
...@@ -52,7 +53,6 @@ public class OrgMenuDto { ...@@ -52,7 +53,6 @@ public class OrgMenuDto {
this.leaf = leaf; this.leaf = leaf;
this.bizOrgCode = bizOrgCode; this.bizOrgCode = bizOrgCode;
} }
public OrgMenuDto(Long key, String title, Long parentId, String bizOrgType, boolean leaf) { public OrgMenuDto(Long key, String title, Long parentId, String bizOrgType, boolean leaf) {
super(); super();
this.key = key; this.key = key;
...@@ -69,4 +69,7 @@ public class OrgMenuDto { ...@@ -69,4 +69,7 @@ public class OrgMenuDto {
this.bizOrgType = bizOrgType; this.bizOrgType = bizOrgType;
} }
public OrgMenuDto() {
// TODO Auto-generated constructor stub
}
} }
...@@ -8,7 +8,9 @@ import lombok.Data; ...@@ -8,7 +8,9 @@ import lombok.Data;
import lombok.experimental.Accessors; import lombok.experimental.Accessors;
import java.io.Serializable; import java.io.Serializable;
import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map;
/** /**
* 机构/部门/人员表 * 机构/部门/人员表
...@@ -64,6 +66,35 @@ public class OrgUsrFormDto implements Serializable { ...@@ -64,6 +66,35 @@ public class OrgUsrFormDto implements Serializable {
@ApiModelProperty(value = "单位人员信息值") @ApiModelProperty(value = "单位人员信息值")
private List<OrgPersonFormDto> children; private List<OrgPersonFormDto> children;
public OrgUsrFormDto() {
public List<FormValue> getDynamicFormAlert() {
return dynamicFormAlert;
}
@ApiModelProperty(value = "转换动态表单")
private Map<String,Object> map=new HashMap<>();;
public void setDynamicFormAlert(List<FormValue> dynamicFormAlert) {
if(dynamicFormAlert!=null) {
dynamicFormAlert.forEach(formValue->{
this.map.put(formValue.getKey(), formValue.getValue());
});
}
this.dynamicFormAlert=dynamicFormAlert;
}
public OrgUsrFormDto() {
} }
} }
package com.yeejoin.amos.boot.module.common.api.dto;
import java.io.Serializable;
import com.yeejoin.amos.boot.biz.common.dto.BaseDto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@ApiModel(value = "OrgUsr", description = "机构/部门/人员表")
public class OrgUsrTreeDto extends BaseDto implements Serializable{
/**
*
*/
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "机构名称")
private String bizOrgName;
@ApiModelProperty(value = "机构编码")
private String bizOrgCode;
@ApiModelProperty(value = "机构类型(部门:DEPARTMENT,单位:COMPANY,人员:PERSON)")
private String bizOrgType;
@ApiModelProperty(value = "归属机构")
private String parentId;
@ApiModelProperty(value = "部门数量")
private int num;
}
package com.yeejoin.amos.boot.module.common.api.dto;
import lombok.Data;
/**
* @description:
* @author: tw
* @createDate: 2021/8/9
*/
@Data
public class PageDto {
private int current;
private int size;
public PageDto(int current, int size) {
this.current = current;
this.size = size;
}
}
...@@ -33,4 +33,7 @@ public class RequestData { ...@@ -33,4 +33,7 @@ public class RequestData {
@ApiModelProperty(value = "灾情地址模糊匹配") @ApiModelProperty(value = "灾情地址模糊匹配")
private String address; private String address;
@ApiModelProperty(value = "灾情状态")
private int status =0;
} }
package com.yeejoin.amos.boot.module.common.api.entity; //package com.yeejoin.amos.boot.module.common.api.entity;
//
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 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;
import lombok.EqualsAndHashCode; //import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors; //import lombok.experimental.Accessors;
/** ///**
* 数据字典 //* 数据字典
* //*
* @author tb //* @author tb
* @date 2021-06-07 //* @date 2021-06-07
*/ //*/
@Data //@Data
@EqualsAndHashCode(callSuper = true) //@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true) //@Accessors(chain = true)
@TableName("cb_data_dictionary") //@TableName("cb_data_dictionary")
@ApiModel(value="DataDictionary对象", description="数据字典") //@ApiModel(value="DataDictionary对象", description="数据字典")
public class DataDictionary extends BaseEntity { //public class DataDictionary extends BaseEntity {
/** // /**
* // *
*/ // */
private static final long serialVersionUID = 1L; // private static final long serialVersionUID = 1L;
//
@ApiModelProperty(value = "code") // @ApiModelProperty(value = "code")
private String code; // private String code;
//
@ApiModelProperty(value = "名称") // @ApiModelProperty(value = "名称")
private String name; // private String name;
//
@ApiModelProperty(value = "类型") // @ApiModelProperty(value = "类型")
private String type; // private String type;
//
@ApiModelProperty(value = "父级") // @ApiModelProperty(value = "父级")
private Long parent; // private Long parent;
//
//新加排序字段 // //新加排序字段
@ApiModelProperty(value = "排序字段") // @ApiModelProperty(value = "排序字段")
private int sortNum; // private int sortNum;
//
} //}
package com.yeejoin.amos.boot.module.common.api.entity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yeejoin.amos.boot.biz.common.entity.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import java.util.Date;
/**
*
*
* @author system_generator
* @date 2021-08-04
*/
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("cb_failure_audit")
public class FailureAudit extends BaseEntity {
private static final long serialVersionUID = 1L;
/**
* 审核人
*/
@TableField("auditor")
private String auditor;
/**
* 审核部门
*/
@TableField("audit_department")
private String auditDepartment;
@TableField("audit_department_id")
private Long auditDepartmentId;
/**
* 审核时间
*/
@TableField("audit_time")
private Date auditTime;
/**
* 审核意见
*/
@TableField("audit_opinion")
private String auditOpinion;
/**
* 设备故障报修单id
*/
@TableField("fault_id")
private Long faultId;
}
package com.yeejoin.amos.boot.module.common.api.entity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yeejoin.amos.boot.biz.common.entity.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import java.util.Date;
/**
*
*
* @author system_generator
* @date 2021-08-04
*/
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("cb_failure_details")
public class FailureDetails extends BaseEntity {
private static final long serialVersionUID = 1L;
/**
* 当前状态
*/
@TableField("current_status")
private Integer currentStatus;
/**
* 故障单号
*/
@TableField("failure_code")
private String failureCode;
/**
* 故障设备ID
*/
@TableField("failure_equipment_id")
private Integer failureEquipmentId;
/**
* 故障设备
*/
@TableField("failure_equipment")
private String failureEquipment;
/**
* 故障时间
*/
@TableField("fault_time")
private Date faultTime;
/**
* 故障现象
*/
@TableField("fault_phenomenon")
private String faultPhenomenon;
/**
* 报送人
*/
@TableField("submission_name")
private String submissionName;
/**
* 报送人ID
*/
@TableField("submission_pid")
private Integer submissionPid;
/**
* 组织code
*/
@TableField("biz_code")
private String bizCode;
/**
* 报送时间
*/
@TableField("submission_time")
private Date submissionTime;
/**
* 送达部门
*/
@TableField("submission_branch")
private String submissionBranch;
/**
* 送达部门ID
*/
@TableField("submission_branch_id")
private Long submissionBranchId;
/**
* 流程ID
*/
@TableField("process_id")
private String processId;
}
package com.yeejoin.amos.boot.module.common.api.entity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yeejoin.amos.boot.biz.common.entity.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import java.util.Date;
/**
*
*
* @author system_generator
* @date 2021-08-04
*/
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("cb_failure_maintain")
public class FailureMaintain extends BaseEntity {
private static final long serialVersionUID = 1L;
/**
* 维修人
*/
@TableField("maintain_man")
private String maintainMan;
/**
* 维修时间
*/
@TableField("maintain_time")
private Date maintainTime;
/**
* 维修人手机号
*/
@TableField("maintain_phone")
private Long maintainPhone;
/**
* 所属部门ID
*/
@TableField("biz_id")
private String bizId;
/**
* 所属部门
*/
@TableField("department")
private String department;
/**
* 维修内容
*/
@TableField("maintain_content")
private String maintainContent;
/**
* 记录类型
*/
@TableField("recore_type")
private String recoreType;
/**
* 验收意见
*/
@TableField("acceptance_opinion")
private String acceptanceOpinion;
/**
* 设备故障报修主表ID
*/
@TableField("fault_id")
private Long faultId;
}
...@@ -3,10 +3,10 @@ package com.yeejoin.amos.boot.module.common.api.entity; ...@@ -3,10 +3,10 @@ package com.yeejoin.amos.boot.module.common.api.entity;
import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableField;
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 lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors; import lombok.experimental.Accessors;
import java.util.Date;
/** /**
* 重点部位 * 重点部位
...@@ -39,6 +39,9 @@ public class KeySite extends BaseEntity { ...@@ -39,6 +39,9 @@ public class KeySite extends BaseEntity {
*/ */
@TableField("building_id") @TableField("building_id")
private Long buildingId; private Long buildingId;
@TableField("building_name")
private String buildingName;
/** /**
* 位置描述 * 位置描述
...@@ -63,12 +66,22 @@ public class KeySite extends BaseEntity { ...@@ -63,12 +66,22 @@ public class KeySite extends BaseEntity {
*/ */
@TableField("fire_endurance_rate") @TableField("fire_endurance_rate")
private String fireEnduranceRate; private String fireEnduranceRate;
/**
* 耐火等级名称
*/
@TableField("fire_endurance_rate_name")
private String fireEnduranceRateName;
/** /**
* 使用性质 * 使用性质
*/ */
@TableField("use_nature") @TableField("use_nature")
private String useNature; private String useNature;
/**
* 使用性质名称
*/
@TableField("use_nature_name")
private String useNatureName;
/** /**
* 责任人 * 责任人
...@@ -98,7 +111,7 @@ public class KeySite extends BaseEntity { ...@@ -98,7 +111,7 @@ public class KeySite extends BaseEntity {
* 防火标志设立情况 * 防火标志设立情况
*/ */
@TableField("fire_prevention_flag") @TableField("fire_prevention_flag")
private String firePreventionFlag; private Boolean firePreventionFlag;
/** /**
* 危险源 * 危险源
......
package com.yeejoin.amos.boot.module.common.api.entity; package com.yeejoin.amos.boot.module.common.api.entity;
import java.util.List;
import java.util.Map;
import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableField;
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.common.api.dto.AttachmentDto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import com.yeejoin.amos.boot.module.common.api.dto.AttachmentDto; import java.util.List;
import io.swagger.annotations.ApiModelProperty; import java.util.Map;
/** /**
......
package com.yeejoin.amos.boot.module.common.api.enums;
public enum AuditResultEnum {
SEND_BACK(2,"退回"),
AGREE(0,"同意"),
REFUSE(1,"拒绝");
private AuditResultEnum(int code,String name){
this.code=code;
this.name=name;
}
private int code;
private String name;
public int getCode() {
return code;
}
public String getName() {
return name;
}
}
package com.yeejoin.amos.boot.module.common.api.enums;
public enum FailureStatuEnum {
WAITING_AUDIT(0,"待审核"),
WAITING_SUBMIT(1,"待提交"),
WAITING_MAINTAIN(2,"待维修"),
WAITING_ACCEPTANCE(3,"待验收"),
REFUSE(4,"已拒绝"),
FINISH(5,"已完结");
private FailureStatuEnum(Integer code, String name){
this.code=code;
this.name=name;
}
private Integer code;
private String name;
public Integer getCode() {
return code;
}
public String getName() {
return name;
}
}
package com.yeejoin.amos.boot.module.common.api.feign;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.module.common.api.dto.PageDto;
import com.yeejoin.amos.component.feign.config.InnerInvokException;
import org.springframework.cloud.openfeign.FeignClient;
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.typroject.tyboot.core.restful.utils.ResponseModel;
import java.util.List;
import java.util.Map;
/**
* 装备服务feign
*
* @author Dell
*/
@FeignClient(name = "${equip.fegin.name}", path = "equip", configuration = {MultipartSupportConfig.class})
public interface EquipFeignClient {
/**
* 获取未列装人员装备列表数据
*
* @return
*/
@RequestMapping(value = "/equipSpecific/getAirEquipSpecificPage", method = RequestMethod.POST)
ResponseModel<Page<Object>> getAirEquipSpecificPage(@RequestBody Object var1) throws InnerInvokException;
/**
* 人员装备列装
*
* @return
*/
@RequestMapping(value = "/stock-detail/airport/person/bind", method = RequestMethod.POST)
ResponseModel<List<Object>> stockBindEquip(@RequestBody List<Long> ids) throws InnerInvokException;
/**
* 人员装备退装
*
* @return
*/
@RequestMapping(value = "/scrap/airport/person", method = RequestMethod.POST)
ResponseModel<Object> scrapEquip(@RequestBody String id) throws InnerInvokException;
/**
* 人员装备回库
*
* @return
*/
@RequestMapping(value = "/stock-detail/airport/person", method = RequestMethod.POST)
ResponseModel<Object> stockEquip(@RequestBody Map<String, Object> map) throws InnerInvokException;
/**
* 装备详情
*
* @return
*/
@RequestMapping(value = "/equipSpecific/getAirEquipSpecificDetail", method = RequestMethod.GET)
ResponseModel<Object> getAirEquipSpecificDetail(@RequestParam Long stockDetailId) throws InnerInvokException;
/**
* 获取车辆列表
*
* @return
*/
@RequestMapping(value = "/car/list-all", method = RequestMethod.GET)
ResponseModel<Object> getFireCarListAll();
/**
* 获取个队伍下车辆统计
*
* @return
*/
@RequestMapping(value = "/car/list-info", method = RequestMethod.GET)
ResponseModel<List<Map<String, Object>>> getFireCarListAllcount();
/**
* 获取消防系统列表
*
* @return
*/
@RequestMapping(value = "/fire-fighting-system/list", method = RequestMethod.GET)
ResponseModel<Object> getFireSystemListAll();
/**
* 获取消防系统列表
*
* @return
*/
@RequestMapping(value = "/building/tree", method = RequestMethod.GET)
ResponseModel<Object> getBuildingTree();
/**
* 更新车辆状态
*
* @param carStatusInfo 车辆状态信息
* @return
*/
@RequestMapping(value = "/car/status", method = RequestMethod.POST)
ResponseModel<Object> updateCarStatus(@RequestBody List<Object> carStatusInfo);
/**
* 获取装备平面图
*
* @return
*/
@RequestMapping(value = "/sourceFile/findImgByFileCategory", method = RequestMethod.GET)
ResponseModel<List<Map<String, Object>>> findImgByFileCategory(@RequestParam String id, @RequestParam String fileCategory);
/**
* 车辆信息
**/
@RequestMapping(value = "/car/getTeamCarList", method = RequestMethod.GET)
ResponseModel<List<Map<String, Object>>> getTeamCarList(@RequestParam Double longitude, @RequestParam Double latitude);
/**
* 车辆信息详情
**/
@RequestMapping(value = "/car/getCarDetailById/{id}", method = RequestMethod.GET)
ResponseModel<Map<String, Object>> getCarDetailById(@PathVariable Long id);
/**
* 获取消防建筑树
*
* @return
*/
@RequestMapping(value = "/building/BuildingtreeAndEquip", method = RequestMethod.GET)
ResponseModel<Object> getBuildingTreeAndEquip();
/**
*
*获取视频信息
* @param
* @return
*/
@RequestMapping(value = "//building/video/page", method = RequestMethod.GET)
ResponseModel<Page<Map<String, Object>>> getVideo( @RequestParam Page page, @RequestParam Long buildingId);
}
package com.yeejoin.amos.boot.module.common.api.feign;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
import java.util.List;
import java.util.Map;
/**
* iot feign
*
* @author Dell
*/
@FeignClient(name ="${iot.fegin.name}", path = "iot", configuration = {MultipartSupportConfig.class})
public interface IotFeignClient {
/**
* 根据航班号查询航班信息
**/
@RequestMapping(value = "/v1/iot/DynamicFlightInfo/{flightNo}", method = RequestMethod.GET)
ResponseModel<Map<String, Object>> getDynamicFlightInfo(@PathVariable String flightNo);
@RequestMapping(value = "/v1/iot/DynamicFlightInfo/list", method = RequestMethod.GET)
ResponseModel<List<Map<String, Object>>> findImgByFileCategory();
}
package com.yeejoin.amos.boot.module.common.api.feign;
import feign.codec.Encoder;
import feign.form.spring.SpringFormEncoder;
import org.springframework.beans.factory.ObjectFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.http.HttpMessageConverters;
import org.springframework.cloud.openfeign.support.SpringEncoder;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
/**
* @Author: xl
* @Description:
* @Date: 2020/3/30 16:26
*/
@Configuration
public class MultipartSupportConfig {
@Autowired
private ObjectFactory<HttpMessageConverters> messageConverters;
@Bean
public Encoder feignFormEncoder() {
return new SpringFormEncoder(new SpringEncoder(messageConverters));
}
}
package com.yeejoin.amos.boot.module.common.api.mapper; //package com.yeejoin.amos.boot.module.common.api.mapper;
//
import com.baomidou.mybatisplus.core.mapper.BaseMapper; //import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yeejoin.amos.boot.module.common.api.entity.DataDictionary; //import com.yeejoin.amos.boot.module.common.api.entity.DataDictionary;
//
/** ///**
* 数据字典 Mapper 接口 //* 数据字典 Mapper 接口
* //*
* @author tb //* @author tb
* @date 2021-06-07 //* @date 2021-06-07
*/ //*/
public interface DataDictionaryMapper extends BaseMapper<DataDictionary> { //public interface DataDictionaryMapper extends BaseMapper<DataDictionary> {
//
} //}
package com.yeejoin.amos.boot.module.common.api.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yeejoin.amos.boot.module.common.api.entity.FailureAudit;
/**
* Mapper 接口
*
* @author system_generator
* @date 2021-08-04
*/
public interface FailureAuditMapper extends BaseMapper<FailureAudit> {
}
package com.yeejoin.amos.boot.module.common.api.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yeejoin.amos.boot.module.common.api.entity.FailureDetails;
/**
* Mapper 接口
*
* @author system_generator
* @date 2021-08-04
*/
public interface FailureDetailsMapper extends BaseMapper<FailureDetails> {
}
package com.yeejoin.amos.boot.module.common.api.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yeejoin.amos.boot.module.common.api.entity.FailureMaintain;
/**
* Mapper 接口
*
* @author system_generator
* @date 2021-08-04
*/
public interface FailureMaintainMapper extends BaseMapper<FailureMaintain> {
}
package com.yeejoin.amos.boot.module.common.api.mapper; package com.yeejoin.amos.boot.module.common.api.mapper;
import com.yeejoin.amos.boot.module.common.api.entity.KeySite; import java.util.List;
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.common.api.dto.KeySiteDto;
import com.yeejoin.amos.boot.module.common.api.entity.KeySite;
/** /**
* 重点部位 Mapper 接口 * 重点部位 Mapper 接口
...@@ -10,5 +15,22 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; ...@@ -10,5 +15,22 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
* @date 2021-07-26 * @date 2021-07-26
*/ */
public interface KeySiteMapper extends BaseMapper<KeySite> { public interface KeySiteMapper extends BaseMapper<KeySite> {
/**
* 分页查询
*/
public IPage<KeySiteDto> getPageList(Page<KeySiteDto> page, String name, Long buildingId, String fireEnduranceRate,
String useNature, String fireFacilitiesInfo, Long belongId);
/**
* 获取所有的重点部位数据
* @return
*/
public List<KeySiteDto> getKeySiteList();
/**
* 根据id查找
* @param sequenceNbr
* @return
*/
public KeySiteDto getSequenceNbr(Long sequenceNbr);
} }
package com.yeejoin.amos.boot.module.common.api.mapper; package com.yeejoin.amos.boot.module.common.api.mapper;
import java.util.List;
import java.util.Map;
import org.apache.ibatis.annotations.Param;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yeejoin.amos.boot.module.common.api.dto.CompanyDto; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.module.common.api.dto.LinkageUnitDto; import com.yeejoin.amos.boot.module.common.api.dto.LinkageUnitDto;
import com.yeejoin.amos.boot.module.common.api.dto.LinkageUnitZhDto; import com.yeejoin.amos.boot.module.common.api.dto.LinkageUnitZhDto;
import com.yeejoin.amos.boot.module.common.api.dto.RequestData; import com.yeejoin.amos.boot.module.common.api.dto.RequestData;
import com.yeejoin.amos.boot.module.common.api.entity.LinkageUnit; import com.yeejoin.amos.boot.module.common.api.entity.LinkageUnit;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Map;
/** /**
* 联动单位 Mapper 接口 * 联动单位 Mapper 接口
...@@ -43,4 +45,22 @@ public interface LinkageUnitMapper extends BaseMapper<LinkageUnit> { ...@@ -43,4 +45,22 @@ public interface LinkageUnitMapper extends BaseMapper<LinkageUnit> {
List<LinkageUnitZhDto> listLinkageUnitZhDto(@Param("pageNum")int pageNum, @Param("pageSize")int pageSize, @Param("par") RequestData par); List<LinkageUnitZhDto> listLinkageUnitZhDto(@Param("pageNum")int pageNum, @Param("pageSize")int pageSize, @Param("par") RequestData par);
Integer listLinkageUnitZhDtoCount(@Param("par")RequestData par); Integer listLinkageUnitZhDtoCount(@Param("par")RequestData par);
/**
* 查询当前存在的联动单位及统计
* @param isDelete
* @param emergencyLinkageUnitCode
* @return
*/
List<Map<String, Object>> getEmergencyLinkageUnitCodeGroupByAndCount();
/**
* 查询包含特岗人数及的具体信息
* @return
*/
Page<List<LinkageUnitDto>> getEmergencyLinkageUnitList(IPage<LinkageUnitDto> page,String unitName,
String linkageUnitTypeCode, String emergencyLinkageUnitCode);
} }
...@@ -51,6 +51,12 @@ public interface OrgUsrMapper extends BaseMapper<OrgUsr> { ...@@ -51,6 +51,12 @@ public interface OrgUsrMapper extends BaseMapper<OrgUsr> {
List<CompanyDto> listContractDto(@Param("pageNum")int pageNum, @Param("pageSize")int pageSize, @Param("par") RequestData par); List<CompanyDto> listContractDto(@Param("pageNum")int pageNum, @Param("pageSize")int pageSize, @Param("par") RequestData par);
Integer listContractDtoCount(@Param("par")RequestData par); Integer listContractDtoCount(@Param("par")RequestData par);
/**
* 获取机场单位树,包含对应单位下部门的数量
* @return
*/
List<OrgUsrTreeDto> getCompanyAndCountDepartment();
OrgUsrzhDto getOrgUsrzhDto(@Param("id")Long id); List< OrgUsrzhDto> getOrgUsrzhDto(@Param("bizOrgName")String bizOrgName);
} }
...@@ -13,5 +13,5 @@ import java.util.List; ...@@ -13,5 +13,5 @@ import java.util.List;
*/ */
public interface RescueEquipmentMapper extends BaseMapper<RescueEquipment> { public interface RescueEquipmentMapper extends BaseMapper<RescueEquipment> {
List<Long> getVehicleCodeCodeList(boolean isDelete); List<Long> getVehicleCodeCodeList(boolean isDelete,Long companyId);
} }
...@@ -16,5 +16,5 @@ public interface SpecialPositionStaffMapper extends BaseMapper<SpecialPositionSt ...@@ -16,5 +16,5 @@ public interface SpecialPositionStaffMapper extends BaseMapper<SpecialPositionSt
List<SpecialPositionStaff> getPositionStaffList(boolean isDelete); List<SpecialPositionStaff> getPositionStaffList(boolean isDelete);
List<Long> getPositionStaffCodeList(boolean isDelete); List<Long> getPositionStaffCodeList(boolean isDelete,Long companyId);
} }
package com.yeejoin.amos.boot.module.common.api.mapper; package com.yeejoin.amos.boot.module.common.api.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.biz.common.utils.MenuFrom; import com.yeejoin.amos.boot.biz.common.utils.MenuFrom;
import com.yeejoin.amos.boot.module.common.api.dto.RequestData; import com.yeejoin.amos.boot.module.common.api.dto.RequestData;
import com.yeejoin.amos.boot.module.common.api.dto.WaterResourceDto; import com.yeejoin.amos.boot.module.common.api.dto.WaterResourceDto;
...@@ -8,6 +9,8 @@ import com.yeejoin.amos.boot.module.common.api.dto.WaterResourceTypeDto; ...@@ -8,6 +9,8 @@ import com.yeejoin.amos.boot.module.common.api.dto.WaterResourceTypeDto;
import com.yeejoin.amos.boot.module.common.api.dto.WaterResourceZhDto; import com.yeejoin.amos.boot.module.common.api.dto.WaterResourceZhDto;
import com.yeejoin.amos.boot.module.common.api.entity.WaterResource; import com.yeejoin.amos.boot.module.common.api.entity.WaterResource;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import java.util.ArrayList;
import java.util.List; import java.util.List;
/** /**
...@@ -37,4 +40,10 @@ public interface WaterResourceMapper extends BaseMapper<WaterResource> { ...@@ -37,4 +40,10 @@ public interface WaterResourceMapper extends BaseMapper<WaterResource> {
List<WaterResourceTypeDto> getWaterResourceTypeList(Boolean isDelete); List<WaterResourceTypeDto> getWaterResourceTypeList(Boolean isDelete);
/**
* 根据参数查询
*
*/
Page<WaterResourceDto> getWaterResourcePageByParams(Page<WaterResourceDto> page, String name, String resourceType, ArrayList<Long> belongBuildingId, Long belongFightingSystemId, Long sequenceNbr);
} }
package com.yeejoin.amos.boot.module.common.api.service; //package com.yeejoin.amos.boot.module.common.api.service;
//
import com.yeejoin.amos.boot.biz.common.utils.MenuFrom; //import com.yeejoin.amos.boot.biz.common.utils.MenuFrom;
//
import java.util.List; //import java.util.List;
//
/** ///**
* 数据字典 服务类 // * 数据字典 服务类
* // *
* @author tb // * @author tb
* @date 2021-06-07 // * @date 2021-06-07
*/ // */
public interface IDataDictionaryService { //public interface IDataDictionaryService {
//
//
Object getFireChemical(String type) throws Exception; // Object getFireChemical(String type) throws Exception;
//
Object gwmcDataDictionary(String type) throws Exception; // Object gwmcDataDictionary(String type) throws Exception;
//
List<MenuFrom> getGWMCDataDictionary(String type) throws Exception; // List<MenuFrom> getGWMCDataDictionary(String type) throws Exception;
} //}
package com.yeejoin.amos.boot.module.common.api.service;
import com.yeejoin.amos.boot.module.common.api.entity.FailureAudit;
/**
* 接口类
*
* @author system_generator
* @date 2021-08-04
*/
public interface IFailureAuditService {
public FailureAudit findByFaultId(Long faultId) ;
}
package com.yeejoin.amos.boot.module.common.api.service;
/**
* 接口类
*
* @author system_generator
* @date 2021-08-04
*/
public interface IFailureDetailsService {
}
package com.yeejoin.amos.boot.module.common.api.service;
/**
* 接口类
*
* @author system_generator
* @date 2021-08-04
*/
public interface IFailureMaintainService {
}
package com.yeejoin.amos.boot.module.common.api.service; package com.yeejoin.amos.boot.module.common.api.service;
import com.yeejoin.amos.boot.module.common.api.dto.KeySiteDto;
import com.yeejoin.amos.boot.module.common.api.dto.KeySiteExcleDto;
import com.yeejoin.amos.boot.module.common.api.dto.OrgMenuDto;
import com.yeejoin.amos.feign.privilege.model.AgencyUserModel;
import java.util.List;
/** /**
* 重点部位接口类 * 重点部位接口类
...@@ -8,5 +14,54 @@ package com.yeejoin.amos.boot.module.common.api.service; ...@@ -8,5 +14,54 @@ package com.yeejoin.amos.boot.module.common.api.service;
* @date 2021-07-26 * @date 2021-07-26
*/ */
public interface IKeySiteService { public interface IKeySiteService {
/**
* 根据主键做逻辑假删除
* @param id
* @return
*/
public boolean deleteById(List<Long> sequenceNbrList);
/**
* 保存
* @param model
* @return
*/
public KeySiteDto save(KeySiteDto model);
/**
* 修改
* @param keySite
* @return
*/
public boolean update(KeySiteDto keySite, AgencyUserModel userInfo) ;
/**
* 获取机场单位部位树,包含单位下所包含的部位的统计
* @return
*/
public List<OrgMenuDto> getOrguserTree();
/**
*
* @return
*/
public List<KeySiteDto> queryForKeySiteList() ;
/**根据id查找
*
* @param sequenceNbr
* @return
*/
public KeySiteDto getSequenceNbr(Long sequenceNbr);
public List<KeySiteExcleDto> exportToExcel();
/**获取所在建筑的树结构信息
*
* @return
*/
public List<Object> getBuildTree() ;
public boolean saveExcel(List<KeySiteExcleDto> excelDtoList);
/**
* 获取所在建筑的建筑部位树
* @param sequenceNbr 所在建筑的id
* @return
*/
public List<OrgMenuDto> getBuildAndKeyTree(Long sequenceNbr);
} }
package com.yeejoin.amos.boot.module.common.api.service; package com.yeejoin.amos.boot.module.common.api.service;
import java.util.List;
import org.typroject.tyboot.core.rdbms.annotation.Condition;
import org.typroject.tyboot.core.rdbms.annotation.Operator;
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.utils.Menu;
import com.yeejoin.amos.boot.module.common.api.dto.LinkageUnitDto; import com.yeejoin.amos.boot.module.common.api.dto.LinkageUnitDto;
import com.yeejoin.amos.boot.module.common.api.dto.LinkageUnitZhDto; import com.yeejoin.amos.boot.module.common.api.dto.LinkageUnitZhDto;
import com.yeejoin.amos.boot.module.common.api.dto.RequestData; import com.yeejoin.amos.boot.module.common.api.dto.RequestData;
import org.typroject.tyboot.core.rdbms.annotation.Condition; import com.yeejoin.amos.boot.module.common.api.entity.LinkageUnit;
import org.typroject.tyboot.core.rdbms.annotation.Operator;
import java.util.List;
/** /**
* 联动单位接口类 * 联动单位接口类
* *
* @author system_generator * @author system_generator
* @date 2021-07-16 * @date 2021-07-16
*/ */
public interface ILinkageUnitService { public interface ILinkageUnitService {
List<LinkageUnitZhDto> listLinkageUnitZhDto(Integer pageNum, Integer pageSize, RequestData par);
List<LinkageUnitZhDto> listLinkageUnitZhDto(Integer pageNum, Integer pageSize, RequestData par);
Integer listLinkageUnitZhDtoCount(RequestData par);
Integer listLinkageUnitZhDtoCount(RequestData par);
LinkageUnitDto queryOne(Long sequenceNbr);
LinkageUnitDto queryOne(Long sequenceNbr);
/**
public Page<LinkageUnitDto> queryForLinkageUnitPage(Page<LinkageUnitDto> page, * 联动单位分页查询
@Condition(Operator.eq) Boolean isDelete, *
@Condition(Operator.like) String unitName, * @param page
@Condition(Operator.eq) String linkageUnitType); * @param isDelete
* @param unitName 单位名称
* @param linkageUnitType 联动单位类型
* @param emergencyLinkageUnitCode 紧急联动单位类型code
* @return
*/
Page<LinkageUnitDto> queryForLinkageUnitPage(IPage<LinkageUnitDto> page,
@Condition(Operator.eq) Boolean isDelete,
@Condition(Operator.like) String unitName,
@Condition(Operator.eq) String linkageUnitTypeCode,
@Condition(Operator.eq) String emergencyLinkageUnitCode,
String inAgreement);
/**
* 获取当前存在的联动单位的类型组code
* @return
*/
public List<Menu> getEmergencyLinkageUnitCodeGroupBy(String type, String rootName) ;
} }
...@@ -160,6 +160,5 @@ public interface IMaintenanceCompanyService { ...@@ -160,6 +160,5 @@ public interface IMaintenanceCompanyService {
* 将所有的维保人员导入到excle中 * 将所有的维保人员导入到excle中
* @return * @return
*/ */
public List<MaintenancePersonExcleDto> exportToMaintenancePersonExcel(); public List<MaintenancePersonExcleDto> exportToMaintenancePersonExcel();
} }
...@@ -169,5 +169,8 @@ public interface IOrgUsrService { ...@@ -169,5 +169,8 @@ public interface IOrgUsrService {
* </PRE> * </PRE>
*/ */
OrgUsrzhDto getOrgUsrzhDto(Long id); List<OrgUsrzhDto> getOrgUsrzhDto(String name);
List<ESOrgUsrDto> selectByIddata(String name);
} }
package com.yeejoin.amos.boot.module.common.api.service; package com.yeejoin.amos.boot.module.common.api.service;
import com.yeejoin.amos.boot.module.common.api.dto.AttachmentDto;
import com.yeejoin.amos.boot.module.common.api.entity.SourceFile;
import java.util.List;
import java.util.Map;
/** /**
* 公共附件接口类 * 公共附件接口类
* *
...@@ -8,5 +14,14 @@ package com.yeejoin.amos.boot.module.common.api.service; ...@@ -8,5 +14,14 @@ package com.yeejoin.amos.boot.module.common.api.service;
* @date 2021-07-16 * @date 2021-07-16
*/ */
public interface ISourceFileService { public interface ISourceFileService {
Map<String, List<AttachmentDto>> getAttachments(Long sourceId);
/**
* 批量保存附件
*
* @param sequenceNbr sourceId
* @param attachmentMap
* @return
*/
void saveAttachments(Long sequenceNbr, Map<String, List<AttachmentDto>> attachmentMap);
} }
...@@ -82,7 +82,7 @@ ...@@ -82,7 +82,7 @@
and i.APP_KEY = #{appKey} and i.APP_KEY = #{appKey}
</if> </if>
<foreach collection="params" index="key" item="value" separator=""> <foreach collection="params" index="key" item="value" separator="">
<if test="key != null and key = 'instanceIds' "> <if test="key != null and key == 'instanceIds' ">
and find_in_set(i.instance_id, #{value}) > 0 and find_in_set(i.instance_id, #{value}) > 0
</if> </if>
</foreach> </foreach>
......
<?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">
<mapper namespace="com.yeejoin.amos.boot.module.common.api.mapper.FailureAuditMapper">
</mapper>
<?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">
<mapper namespace="com.yeejoin.amos.boot.module.common.api.mapper.FailureDetailsMapper">
</mapper>
<?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">
<mapper namespace="com.yeejoin.amos.boot.module.common.api.mapper.FailureMaintainMapper">
</mapper>
...@@ -127,6 +127,7 @@ ...@@ -127,6 +127,7 @@
SELECT SELECT
a.name , a.name ,
a.sequence_nbr sequenceNbr,
( SELECT count( 1 ) FROM cb_firefighters WHERE fire_team_id = a.sequence_nbr AND is_delete = 0 ) userNum ( SELECT count( 1 ) FROM cb_firefighters WHERE fire_team_id = a.sequence_nbr AND is_delete = 0 ) userNum
FROM cb_fire_team a FROM cb_fire_team a
where a.is_delete=0 where a.is_delete=0
......
<?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.common.api.mapper.KeySiteMapper"> <mapper
namespace="com.yeejoin.amos.boot.module.common.api.mapper.KeySiteMapper">
<select id="getPageList" resultType="com.yeejoin.amos.boot.module.common.api.dto.KeySiteDto">
SELECT
c.`name` as name,
c.belong_id as belongId,
cou.biz_org_name as belongName,
c.building_id as buildingId,
c.building_name as buildingName,
c.address_desc as addressDesc,
c.building_area as buildingArea,
c.building_height as buildingHeight,
c.fire_endurance_rate as fireEnduranceRate,
c.use_nature as useNature,
c.charge_person AS chargePerson,
c.sequence_nbr AS sequenceNbr,
c.charge_person_id AS chargePersonId,
c.key_prevention_reason AS keyPreventionReason,
c.fire_facilities_info AS fireFacilitiesInfo,
c.fire_prevention_flag AS firePreventionFlag,
c.hazard AS hazard,
c.safety_management_measures AS safetyManagementMeasures,
c.preventive_measures AS preventiveMeasures,
c.remark AS remark,
c.is_delete AS isDelete,
c.rec_user_id AS recUserId,
c.rec_user_name AS recUserName,
c.rec_date AS recDate,
c.fire_endurance_rate_name as fireEnduranceRateName,
c.use_nature_name as useNatureName
FROM
cb_key_site c
left join cb_org_usr cou on c.belong_id =cou.sequence_nbr
where c.is_delete=FALSE
<if test="name != null and name != ''">
AND c.`name` like concat(#{name}, '%')
</if>
<if test="buildingId != null and buildingId != -1">
AND c.`building_id`= #{buildingId}
</if>
<if test="fireEnduranceRate != null and fireEnduranceRate != ''">
AND c.`fire_endurance_rate`= #{fireEnduranceRate}
</if>
<if test="useNature != null and useNature != ''">
AND c.`use_nature`= #{useNature}
</if>
<if test="fireFacilitiesInfo != null and fireFacilitiesInfo != ''">
AND c.`fire_facilities_info`= #{fireFacilitiesInfo}
</if>
<if test="belongId != null and belongId!='-1' and belongId != -1">
AND c.`belong_id`= #{belongId}
</if>
</select>
<select id="getSequenceNbr" resultType="com.yeejoin.amos.boot.module.common.api.dto.KeySiteDto">
SELECT
c.`name` as name,
c.belong_id as belongId,
cou.biz_org_name as belongName,
c.building_id as buildingId,
c.building_name as buildingName,
c.address_desc as addressDesc,
c.building_area as buildingArea,
c.building_height as buildingHeight,
c.fire_endurance_rate as fireEnduranceRate,
c.use_nature as useNature,
c.charge_person AS chargePerson,
c.sequence_nbr AS sequenceNbr,
c.charge_person_id AS chargePersonId,
c.key_prevention_reason AS keyPreventionReason,
c.fire_facilities_info AS fireFacilitiesInfo,
c.fire_prevention_flag AS firePreventionFlag,
c.hazard AS hazard,
c.safety_management_measures AS safetyManagementMeasures,
c.preventive_measures AS preventiveMeasures,
c.remark AS remark,
c.is_delete AS isDelete,
c.rec_user_id AS recUserId,
c.rec_user_name AS recUserName,
c.rec_date AS recDate,
c.fire_endurance_rate_name as fireEnduranceRateName,
c.use_nature_name as useNatureName
FROM
cb_key_site c
left join cb_org_usr cou on c.belong_id =cou.sequence_nbr
where c.sequence_nbr=#{sequenceNbr} and c.is_delete=FALSE;
</select>
<select id="getKeySiteList" resultType="com.yeejoin.amos.boot.module.common.api.dto.KeySiteDto">
SELECT
c.`name` as name,
c.belong_id as belongId,
cou.biz_org_name as belongName,
c.building_id as buildingId,
c.building_name as buildingName,
c.address_desc as addressDesc,
c.building_area as buildingArea,
c.building_height as buildingHeight,
c.fire_endurance_rate as fireEnduranceRate,
c.use_nature as useNature,
c.charge_person AS chargePerson,
c.sequence_nbr AS sequenceNbr,
c.charge_person_id AS chargePersonId,
c.key_prevention_reason AS keyPreventionReason,
c.fire_facilities_info AS fireFacilitiesInfo,
c.fire_prevention_flag AS firePreventionFlag,
c.hazard AS hazard,
c.safety_management_measures AS safetyManagementMeasures,
c.preventive_measures AS preventiveMeasures,
c.remark AS remark,
c.is_delete AS isDelete,
c.rec_user_id AS recUserId,
c.rec_user_name AS recUserName,
c.rec_date AS recDate,
c.fire_endurance_rate_name as fireEnduranceRateName,
c.use_nature_name as useNatureName
FROM
cb_key_site c
left join cb_org_usr cou on c.belong_id =cou.sequence_nbr
where c.is_delete=FALSE;
</select>
</mapper> </mapper>
<?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.common.api.mapper.LinkageUnitMapper"> <mapper
<select id="selectOne" resultType="com.yeejoin.amos.boot.module.common.api.dto.LinkageUnitDto"> namespace="com.yeejoin.amos.boot.module.common.api.mapper.LinkageUnitMapper">
select <select id="selectOne"
d.*, resultType="com.yeejoin.amos.boot.module.common.api.dto.LinkageUnitDto">
lu.* select
from d.*,
( lu.*
select from
i.INSTANCE_ID instanceId, (
i.GROUP_CODE groupCode, select
<foreach collection="fieldCodes" item="value" index="key" separator=","> i.INSTANCE_ID instanceId,
MAX(CASE WHEN i.FIELD_CODE = #{key} THEN i.FIELD_VALUE END) as ${key} i.GROUP_CODE
</foreach> groupCode,
from <foreach collection="fieldCodes" item="value" index="key"
cb_dynamic_form_instance i separator=",">
where i.GROUP_CODE = #{groupCode} MAX(CASE WHEN i.FIELD_CODE = #{key} THEN i.FIELD_VALUE END)
and is_delete = #{isDelete} as ${key}
GROUP by </foreach>
i.INSTANCE_ID ) d, from
cb_linkage_unit lu cb_dynamic_form_instance i
where where i.GROUP_CODE = #{groupCode}
d.instanceId = lu.instance_id and
and lu.sequence_nbr = #{sequenceNbr} is_delete = #{isDelete}
and is_delete = #{isDelete} GROUP by
</select> i.INSTANCE_ID ) d,
cb_linkage_unit lu
where
d.instanceId = lu.instance_id
and lu.sequence_nbr = #{sequenceNbr}
<select id="listLinkageUnitZhDto" resultType="com.yeejoin.amos.boot.module.common.api.dto.LinkageUnitZhDto"> and is_delete = #{isDelete}
</select>
select
a.sequence_nbr sequenceNbr,
a.unit_name unitName,
a.address,
a.latitude, <select id="listLinkageUnitZhDto"
a.longitude, resultType="com.yeejoin.amos.boot.module.common.api.dto.LinkageUnitZhDto">
Round(st_distance(point(a.longitude,a.latitude),point(#{par.longitude},#{par.latitude}))*111195,1) AS distance
FROM cb_linkage_unit a select
where a.longitude is not null and a.latitude is not null a.sequence_nbr sequenceNbr,
<if test='par.distance!=null'> a.unit_name unitName,
and Round(st_distance(point(a.longitude,a.latitude),point(#{par.longitude},#{par.latitude}))*111195,1) &lt;= a.address,
#{par.distance} a.latitude,
</if> a.longitude,
ORDER BY distance limit #{pageNum},#{pageSize} Round(st_distance(point(a.longitude,a.latitude),point(#{par.longitude},#{par.latitude}))*111195,1)
</select> AS distance
FROM cb_linkage_unit a
<select id="listLinkageUnitZhDtoCount" resultType="Integer"> where a.longitude is not null and
select a.latitude is not null
COUNT(a.sequence_nbr) num <if test='par.distance!=null'>
FROM cb_linkage_unit a and
where a.longitude is not null and a.latitude is not null Round(st_distance(point(a.longitude,a.latitude),point(#{par.longitude},#{par.latitude}))*111195,1)
<if test='par.distance!=null'> &lt;=
and Round(st_distance(point(a.longitude,a.latitude),point(#{par.longitude},#{par.latitude}))*111195,1) &lt;= #{par.distance}
#{par.distance} </if>
</if> ORDER BY distance limit #{pageNum},#{pageSize}
</select> </select>
<select id="listLinkageUnitZhDtoCount" resultType="Integer">
select
COUNT(a.sequence_nbr) num
FROM cb_linkage_unit a
where a.longitude
is not null and a.latitude is not null
<if test='par.distance!=null'>
and
Round(st_distance(point(a.longitude,a.latitude),point(#{par.longitude},#{par.latitude}))*111195,1)
&lt;=
#{par.distance}
</if>
</select>
<select id="getEmergencyLinkageUnitCodeGroupByAndCount"
resultType="java.util.Map">
SELECT
emergency_linkage_unit_code as
emergencyLinkageUnitCode,
COUNT(unit_code) AS count
FROM
cb_linkage_unit
WHERE
is_delete = 0
GROUP BY
emergency_linkage_unit_code
</select>
<select id="getEmergencyLinkageUnitList"
resultType="java.util.Map">
SELECT
clu.sequence_nbr as sequenceNbr,
clu.unit_name as unitName,
clu.unit_code AS unitCode,
clu.parent_id AS parentId,
clu.linkage_unit_type AS linkageUnitType,
clu.linkage_unit_type_code AS linkageUnitTypeCode,
clu.administrative_divisions AS administrativeDivisions,
clu.administrative_divisions_code AS administrativeDivisionsCode,
clu.address AS address,
clu.longitude AS longitude,
clu.latitude AS latitude,
clu.agreement_start_date AS agreementStartDate,
clu.agreement_end_date AS agreementEndDate,
clu.emergency_linkage_unit AS emergencyLinkageUnit,
clu.emergency_linkage_unit_code AS emergencyLinkageUnitCode,
clu.contact_user AS contactUser,
clu.contact_phone AS contactPhone,
clu.instance_id AS instanceId,
clu.org_code AS orgCode,
clu.rec_user_name AS recUserName,
clu.rec_user_id AS recUserId,
clu.rec_date AS recDate,
clu.is_delete AS isDelete,
cre.vehicle_number AS vehicleNumber,
csps.person_number AS personNumber
FROM
cb_linkage_unit clu
LEFT JOIN cb_rescue_equipment cre ON clu.sequence_nbr = cre.company_id
LEFT JOIN cb_special_position_staff csps ON clu.sequence_nbr =
csps.company_id
WHERE clu.is_delete=0
<if test="unitName != null and unitName != ''">
AND clu.unit_name LIKE concat(#{unitName}, '%')
</if>
<if test="linkageUnitTypeCode != null and linkageUnitTypeCode != ''">
AND clu.linkage_unit_type_code =#{linkageUnitTypeCode}
</if>
<if test="emergencyLinkageUnitCode != null and emergencyLinkageUnitCode != ''">
AND clu.emergency_linkage_unit_code =#{emergencyLinkageUnitCode}
</if>
</select>
</mapper> </mapper>
...@@ -213,7 +213,7 @@ ...@@ -213,7 +213,7 @@
<select id="listContractDto" resultType="com.yeejoin.amos.boot.module.common.api.dto.CompanyDto"> <select id="listContractDto" resultType="com.yeejoin.amos.boot.module.common.api.dto.CompanyDto">
SELECT SELECT
a.id, a.id sequenceNbr,
a.name, a.name,
a.longitude, a.longitude,
a.latitude, a.latitude,
...@@ -259,7 +259,42 @@ FROM ...@@ -259,7 +259,42 @@ FROM
cb_org_usr a cb_org_usr a
LEFT JOIN cb_dynamic_form_instance b ON a.sequence_nbr = b.instance_id LEFT JOIN cb_dynamic_form_instance b ON a.sequence_nbr = b.instance_id
WHERE WHERE
a.sequence_nbr = #{id} a.biz_org_name = #{bizOrgName}
</select> </select>
<select id="getCompanyAndCountDepartment" resultType="com.yeejoin.amos.boot.module.common.api.dto.OrgUsrTreeDto">
SELECT
company_sur.sequence_nbr as sequenceNbr,
company_sur.biz_org_name as bizOrgName ,
company_sur.parent_id as parentId,
CASE
WHEN keysite_sur.num IS NULL THEN
0
ELSE
keysite_sur.num
END AS num
FROM
(
SELECT
company.sequence_nbr,
company.parent_id,
company.biz_org_name
FROM
cb_org_usr company
WHERE
company.biz_org_type = 'COMPANY'
AND company.is_delete = FALSE
) company_sur
LEFT JOIN (
SELECT
keysite.belong_id,
COUNT(keysite.belong_id) as num
FROM
cb_key_site keysite
WHERE
keysite.is_delete = FALSE
GROUP BY
keysite.belong_id
) keysite_sur ON company_sur.sequence_nbr = keysite_sur.belong_id
</select>
</mapper> </mapper>
...@@ -5,6 +5,6 @@ ...@@ -5,6 +5,6 @@
<select id="getVehicleCodeCodeList" resultType="java.lang.Long"> <select id="getVehicleCodeCodeList" resultType="java.lang.Long">
select distinct vehicle_type_code select distinct vehicle_type_code
from cb_rescue_equipment from cb_rescue_equipment
where is_delete = #{isDelete} where is_delete = #{isDelete} and company_id = #{companyId}
</select> </select>
</mapper> </mapper>
...@@ -11,6 +11,6 @@ ...@@ -11,6 +11,6 @@
<select id="getPositionStaffCodeList" resultType="java.lang.Long"> <select id="getPositionStaffCodeList" resultType="java.lang.Long">
select distinct position_name_code select distinct position_name_code
from cb_special_position_staff from cb_special_position_staff
where is_delete = #{isDelete} where is_delete = #{isDelete} and company_id = #{companyId}
</select> </select>
</mapper> </mapper>
...@@ -77,13 +77,13 @@ ...@@ -77,13 +77,13 @@
a.maintenance_unit maintenanceUnit, a.maintenance_unit maintenanceUnit,
Round(st_distance(point(a.longitude,a.latitude),point(#{par.longitude},#{par.latitude}))*111195,1) AS distance Round(st_distance(point(a.longitude,a.latitude),point(#{par.longitude},#{par.latitude}))*111195,1) AS distance
FROM cb_water_resource a FROM cb_water_resource a
where a.is_delete=0 and a.longitude is not null and a.latitude is not null where a.is_delete=1 and a.longitude is not null and a.latitude is not null
<if test='par.resourceType!=null and par.resourceType!=""'> <if test='par.resourceType!=null and par.resourceType!=""'>
and a.resource_type= #{par.resourceType} and a.resource_type= #{par.resourceType}
</if> </if>
<if test='par.distance!=null'> <if test='par.distance!=null'>
and Round(st_distance(point(a.longitude,a.latitude),point(#{par.longitude},#{par.latitude}))*111195,1) &lt;= <!-- and Round(st_distance(point(a.longitude,a.latitude),point(#{par.longitude},#{par.latitude}))*111195,1) &lt;=
#{par.distance} #{par.distance} -->
</if> </if>
ORDER BY distance limit #{pageNum},#{pageSize} ORDER BY distance limit #{pageNum},#{pageSize}
</select> </select>
...@@ -92,13 +92,13 @@ ...@@ -92,13 +92,13 @@
SELECT SELECT
COUNT(a.sequence_nbr) num COUNT(a.sequence_nbr) num
FROM cb_water_resource a FROM cb_water_resource a
where a.is_delete=0 and a.longitude is not null and a.latitude is not null where a.is_delete=1 and a.longitude is not null and a.latitude is not null
<if test='par.resourceType!=null and par.resourceType!=""'> <if test='par.resourceType!=null and par.resourceType!=""'>
and a.resource_type= #{par.resourceType} and a.resource_type= #{par.resourceType}
</if> </if>
<if test='par.distance!=null'> <if test='par.distance!=null'>
and Round(st_distance(point(a.longitude,a.latitude),point(#{par.longitude},#{par.latitude}))*111195,1) &lt;= <!-- and Round(st_distance(point(a.longitude,a.latitude),point(#{par.longitude},#{par.latitude}))*111195,1) &lt;=
#{par.distance} #{par.distance} -->
</if> </if>
</select> </select>
<select id="getWaterResourceTypeList" resultType="com.yeejoin.amos.boot.module.common.api.dto.WaterResourceTypeDto"> <select id="getWaterResourceTypeList" resultType="com.yeejoin.amos.boot.module.common.api.dto.WaterResourceTypeDto">
...@@ -115,6 +115,24 @@ ...@@ -115,6 +115,24 @@
from cb_water_resource from cb_water_resource
where is_delete = #{isDelete} where is_delete = #{isDelete}
</select> </select>
<select id="getWaterResourcePageByParams"
resultType="com.yeejoin.amos.boot.module.common.api.dto.WaterResourceDto">
select * from cb_water_resource where is_delete = 1
<if test="sequenceNbr != null and sequenceNbr != ''">and sequence_nbr = #{sequenceNbr}</if>
<if test="resourceType != null and resourceType != ''">and resource_type = #{resourceType}</if>
<if test="name != null and name != ''">and name like concat('%', #{name}, '%')</if>
<if test="belongFightingSystemId != null">
<if test="belongFightingSystemId > -1">
and belong_fighting_system_id = #{belongFightingSystemId}
</if>
<if test="belongFightingSystemId == -1">
and belong_fighting_system_id is null
</if>
</if>
<if test="belongBuildingId != null and belongBuildingId.size() > 0">
and find_in_set(belong_building_id, #{belongBuildingId}) > 0
</if>
</select>
</mapper> </mapper>
...@@ -21,10 +21,7 @@ ...@@ -21,10 +21,7 @@
<artifactId>amos-boot-module-common-api</artifactId> <artifactId>amos-boot-module-common-api</artifactId>
<version>${amos-biz-boot.version}</version> <version>${amos-biz-boot.version}</version>
</dependency> </dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-elasticsearch</artifactId>
</dependency>
</dependencies> </dependencies>
</project> </project>
package com.yeejoin.amos.boot.module.jcs.api.dto;
import lombok.Data;
@Data
public class AircraftListTreeDto {
private String id;
private String name;
}
...@@ -14,4 +14,5 @@ public class ExcelEnums { ...@@ -14,4 +14,5 @@ public class ExcelEnums {
public static final String CLZQ = "CLZQ";//("CLZQ","车辆执勤") public static final String CLZQ = "CLZQ";//("CLZQ","车辆执勤")
public static final String RYZB = "RYZB";//("RYZB","人员值班") public static final String RYZB = "RYZB";//("RYZB","人员值班")
public static final String WBRY = "WBRY";//("WBRY",维保人员) public static final String WBRY = "WBRY";//("WBRY",维保人员)
public static final String KEYSITE = "KEYSITE";//{"KEYSITE":重點部位}
} }
package com.yeejoin.amos.boot.module.jcs.api.feign; //package com.yeejoin.amos.boot.module.jcs.api.feign;
//
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; //import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.module.jcs.api.dto.CarStatusInfoDto; //import com.yeejoin.amos.boot.module.jcs.api.dto.CarStatusInfoDto;
import com.yeejoin.amos.boot.module.jcs.api.dto.EquipSpecificDto; //import com.yeejoin.amos.boot.module.jcs.api.dto.EquipSpecificDto;
import com.yeejoin.amos.boot.module.jcs.api.dto.EquipmentOnCarDto; //import com.yeejoin.amos.boot.module.jcs.api.dto.EquipmentOnCarDto;
import com.yeejoin.amos.component.feign.config.InnerInvokException; //import com.yeejoin.amos.component.feign.config.InnerInvokException;
import org.springframework.cloud.openfeign.FeignClient; //import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody; //import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; //import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod; //import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam; //import org.springframework.web.bind.annotation.RequestParam;
import org.typroject.tyboot.core.restful.utils.ResponseModel; //import org.typroject.tyboot.core.restful.utils.ResponseModel;
//
import java.util.List; //import java.util.List;
import java.util.Map; //import java.util.Map;
//
///**
/** // * 装备服务feign
* 装备服务feign // *
* // * @author Dell
* @author Dell // */
*/ //@FeignClient(name = "AMOS-EQUIPMANAGE-tb", path = "equip", configuration = {MultipartSupportConfig.class})
@FeignClient(name = "AMOS-EQUIPMANAGE", path = "equip", configuration = {MultipartSupportConfig.class}) //public interface EquipFeignClient {
public interface EquipFeignClient { //
// /**
/** // * 获取未列装人员装备列表数据
* 获取未列装人员装备列表数据 // *
* // * @return
* @return // */
*/ // @RequestMapping(value = "/equipSpecific/getAirEquipSpecificPage", method = RequestMethod.POST)
@RequestMapping(value = "/equipSpecific/getAirEquipSpecificPage", method = RequestMethod.POST) // ResponseModel<Page<Object>> getAirEquipSpecificPage(@RequestBody Object var1) throws InnerInvokException;
ResponseModel<Page<EquipmentOnCarDto>> getAirEquipSpecificPage(@RequestBody EquipSpecificDto var1) throws InnerInvokException; //
/** // /**
* 人员装备列装 // * 人员装备列装
* // *
* @return // * @return
*/ // */
@RequestMapping(value = "/stock-detail/airport/person/bind", method = RequestMethod.POST) // @RequestMapping(value = "/stock-detail/airport/person/bind", method = RequestMethod.POST)
ResponseModel<List<Object>> stockBindEquip(@RequestBody List<Long> ids) throws InnerInvokException; // ResponseModel<List<Object>> stockBindEquip(@RequestBody List<Long> ids) throws InnerInvokException;
/** //
* 人员装备退装 // /**
* // * 人员装备退装
* @return // *
*/ // * @return
@RequestMapping(value = "/scrap/airport/person", method = RequestMethod.POST) // */
ResponseModel<Object> scrapEquip(@RequestBody String id) throws InnerInvokException; // @RequestMapping(value = "/scrap/airport/person", method = RequestMethod.POST)
/** // ResponseModel<Object> scrapEquip(@RequestBody String id) throws InnerInvokException;
* 人员装备回库 //
* // /**
* @return // * 人员装备回库
*/ // *
@RequestMapping(value = "/stock-detail/airport/person", method = RequestMethod.POST) // * @return
ResponseModel<Object> stockEquip(@RequestBody Map<String, Object> map) throws InnerInvokException; // */
/** // @RequestMapping(value = "/stock-detail/airport/person", method = RequestMethod.POST)
* 装备详情 // ResponseModel<Object> stockEquip(@RequestBody Map<String, Object> map) throws InnerInvokException;
* //
* @return // /**
*/ // * 装备详情
@RequestMapping(value = "/equipSpecific/getAirEquipSpecificDetail", method = RequestMethod.GET) // *
ResponseModel<Object> getAirEquipSpecificDetail(@RequestParam Long stockDetailId) throws InnerInvokException; // * @return
// */
/** // @RequestMapping(value = "/equipSpecific/getAirEquipSpecificDetail", method = RequestMethod.GET)
* 获取车辆列表 // ResponseModel<Object> getAirEquipSpecificDetail(@RequestParam Long stockDetailId) throws InnerInvokException;
* //
* @return // /**
*/ // * 获取车辆列表
@RequestMapping(value = "/car/list-all", method = RequestMethod.GET) // *
ResponseModel<Object> getFireCarListAll(); // * @return
// */
// @RequestMapping(value = "/car/list-all", method = RequestMethod.GET)
/** // ResponseModel<Object> getFireCarListAll();
* 获取个队伍下车辆统计 //
* // /**
* @return // * 获取个队伍下车辆统计
*/ // *
@RequestMapping(value = "/car/list-info", method = RequestMethod.GET) // * @return
ResponseModel<List<Map<String,Object>>> getFireCarListAllcount(); // */
// @RequestMapping(value = "/car/list-info", method = RequestMethod.GET)
// ResponseModel<List<Map<String,Object>>> getFireCarListAllcount();
/** //
* 获取消防系统列表 // /**
* // * 获取消防系统列表
* @return // *
*/ // * @return
@RequestMapping(value = "/fire-fighting-system/list", method = RequestMethod.GET) // */
ResponseModel<Object> getFireSystemListAll(); // @RequestMapping(value = "/fire-fighting-system/list", method = RequestMethod.GET)
// ResponseModel<Object> getFireSystemListAll();
/** //
* 获取消防系统列表 // /**
* // * 获取消防系统列表
* @return // *
*/ // * @return
@RequestMapping(value = "/building/tree", method = RequestMethod.GET) // */
ResponseModel<Object> getBuildingTree(); // @RequestMapping(value = "/building/tree", method = RequestMethod.GET)
// ResponseModel<Object> getBuildingTree();
/** //
* 更新车辆状态 // /**
* @param carStatusInfo 车辆状态信息 // * 更新车辆状态
* @return // * @param carStatusInfo 车辆状态信息
*/ // * @return
@RequestMapping(value = "/car/status", method = RequestMethod.POST) // */
ResponseModel<Object> updateCarStatus(@RequestBody List<CarStatusInfoDto> carStatusInfo); // @RequestMapping(value = "/car/status", method = RequestMethod.POST)
// ResponseModel<Object> updateCarStatus(@RequestBody List<Object> carStatusInfo);
//
// /**
/** // * 获取装备平面图
* 获取装备平面图 // *
* // * @return
* @return // */
*/ // @RequestMapping(value = "/sourceFile/findImgByFileCategory", method = RequestMethod.GET)
@RequestMapping(value = "/sourceFile/findImgByFileCategory", method = RequestMethod.GET) // ResponseModel<List<Map<String,Object>>> findImgByFileCategory(@RequestParam String id,@RequestParam String fileCategory);
ResponseModel<List<Map<String,Object>>> findImgByFileCategory(@RequestParam String id,@RequestParam String fileCategory); //
// /**
// * 车辆信息
/** // *
* 车辆信息 // * **/
* // @RequestMapping(value = "/car/getTeamCarList", method = RequestMethod.GET)
* **/ // ResponseModel<List<Map<String,Object>>> getTeamCarList(@RequestParam Double longitude,@RequestParam Double latitude);
@RequestMapping(value = "/car/getTeamCarList", method = RequestMethod.GET) //}
ResponseModel<List<Map<String,Object>>> getTeamCarList();
}
package com.yeejoin.amos.boot.module.jcs.api.feign; //package com.yeejoin.amos.boot.module.jcs.api.feign;
//
import feign.codec.Encoder; //import feign.codec.Encoder;
import feign.form.spring.SpringFormEncoder; //import feign.form.spring.SpringFormEncoder;
import org.springframework.beans.factory.ObjectFactory; //import org.springframework.beans.factory.ObjectFactory;
import org.springframework.beans.factory.annotation.Autowired; //import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.http.HttpMessageConverters; //import org.springframework.boot.autoconfigure.http.HttpMessageConverters;
import org.springframework.cloud.openfeign.support.SpringEncoder; //import org.springframework.cloud.openfeign.support.SpringEncoder;
import org.springframework.context.annotation.Bean; //import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration; //import org.springframework.context.annotation.Configuration;
//
/** ///**
* @Author: xl // * @Author: xl
* @Description: // * @Description:
* @Date: 2020/3/30 16:26 // * @Date: 2020/3/30 16:26
*/ // */
@Configuration //@Configuration
public class MultipartSupportConfig { //public class MultipartSupportConfig {
//
@Autowired // @Autowired
private ObjectFactory<HttpMessageConverters> messageConverters; // private ObjectFactory<HttpMessageConverters> messageConverters;
//
@Bean // @Bean
public Encoder feignFormEncoder() { // public Encoder feignFormEncoder() {
return new SpringFormEncoder(new SpringEncoder(messageConverters)); // return new SpringFormEncoder(new SpringEncoder(messageConverters));
} // }
} //}
package com.yeejoin.amos.boot.module.jcs.api.mapper; package com.yeejoin.amos.boot.module.jcs.api.mapper;
import com.yeejoin.amos.boot.module.jcs.api.dto.AircraftListTreeDto;
import com.yeejoin.amos.boot.module.jcs.api.entity.Aircraft; import com.yeejoin.amos.boot.module.jcs.api.entity.Aircraft;
import java.util.List;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/** /**
...@@ -10,5 +14,5 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; ...@@ -10,5 +14,5 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
* @date 2021-06-29 * @date 2021-06-29
*/ */
public interface AircraftMapper extends BaseMapper<Aircraft> { public interface AircraftMapper extends BaseMapper<Aircraft> {
List<AircraftListTreeDto> getAircraft();
} }
...@@ -27,7 +27,9 @@ public interface AlertCalledMapper extends BaseMapper<AlertCalled> { ...@@ -27,7 +27,9 @@ public interface AlertCalledMapper extends BaseMapper<AlertCalled> {
*/ */
Map<String, Integer> queryAlertStatusCount(@Param("beginDate") String beginDate, @Param("endDate") String endDate); Map<String, Integer> queryAlertStatusCount(@Param("beginDate") String beginDate, @Param("endDate") String endDate);
List<AlertCalledZhDto> alertCalledListByAlertStatus(@Param("par")RequestData par); List<AlertCalledZhDto> alertCalledListByAlertStatus(@Param("pageNum")Integer pageNum, @Param("pageSize")Integer pageSize,@Param("par")RequestData par);
int alertCalledListByAlertStatusCount(@Param("par")RequestData par);
Integer AlertCalledcountTime(@Param("type")int type); Integer AlertCalledcountTime(@Param("type")int type);
......
package com.yeejoin.amos.boot.module.jcs.api.service; package com.yeejoin.amos.boot.module.jcs.api.service;
import java.util.List;
import java.util.Map;
import com.yeejoin.amos.boot.module.jcs.api.dto.AircraftDto; import com.yeejoin.amos.boot.module.jcs.api.dto.AircraftDto;
import com.yeejoin.amos.boot.module.jcs.api.dto.AircraftListTreeDto;
import com.yeejoin.amos.boot.module.jcs.api.entity.Aircraft;
/** /**
* 航空器信息接口类 * 航空器信息接口类
...@@ -11,4 +16,8 @@ import com.yeejoin.amos.boot.module.jcs.api.dto.AircraftDto; ...@@ -11,4 +16,8 @@ import com.yeejoin.amos.boot.module.jcs.api.dto.AircraftDto;
*/ */
public interface IAircraftService { public interface IAircraftService {
AircraftDto queryByAircraftSeq(String agencyCode, Long seq); AircraftDto queryByAircraftSeq(String agencyCode, Long seq);
Aircraft queryByaircraftModel(String seq);
List<AircraftListTreeDto> getAircraft();
} }
...@@ -30,7 +30,9 @@ public interface IAlertCalledService { ...@@ -30,7 +30,9 @@ public interface IAlertCalledService {
* *
* **/ * **/
List<AlertCalledZhDto> alertCalledListByAlertStatus(RequestData par); List<AlertCalledZhDto> alertCalledListByAlertStatus(Integer pageNum, Integer pageSize,RequestData par);
int alertCalledListByAlertStatusCount(RequestData par);
/** /**
* *
......
...@@ -16,7 +16,7 @@ import java.util.List; ...@@ -16,7 +16,7 @@ import java.util.List;
*/ */
public interface IFirefightersJacketService { public interface IFirefightersJacketService {
ResponseModel<Page<EquipmentOnCarDto>> getAirEquipSpecificPage(EquipSpecificDto equipSpecificDto, int current, int size); ResponseModel<Page<Object>> getAirEquipSpecificPage(EquipSpecificDto equipSpecificDto, int current, int size);
boolean saveOrUpdateBatch(Long firefightersId, List<EquipmentOnCarDto> equipmentOnCarDtos); boolean saveOrUpdateBatch(Long firefightersId, List<EquipmentOnCarDto> equipmentOnCarDtos);
......
<?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.AircraftMapper"> <mapper namespace="com.yeejoin.amos.boot.module.jcs.api.mapper.AircraftMapper">
<select id="getAircraft" resultType="com.yeejoin.amos.boot.module.jcs.api.dto.AircraftListTreeDto">
select jc_aircraft.aircraft_model id,jc_aircraft.aircraft_model name
from jc_aircraft where is_delete=0
</select>
</mapper> </mapper>
...@@ -39,21 +39,50 @@ ...@@ -39,21 +39,50 @@
WHEN '245' THEN '三级' WHEN '245' THEN '三级'
ELSE '' END responseLevelCode ELSE '' END responseLevelCode
FROM jc_alert_called a FROM jc_alert_called a
where a.alert_status =0 where a.is_delete=0
AND a.is_delete=0
AND a.coordinate_x IS NOT NULL AND a.coordinate_x IS NOT NULL
AND a.coordinate_y IS NOT NULL AND a.coordinate_y IS NOT NULL
<if test='par.address!=null'> <if test='par.status==0'>
and a.alert_status =0
</if>
<if test='par.status==1'>
and a.alert_status =1
</if>
<if test='par.address!=null and par.address!="" '>
and a.address like CONCAT('%',#{par.address},'%') and a.address like CONCAT('%',#{par.address},'%')
</if> </if>
<if test='par.whether24!=false'> <if test='par.whether24!=false'>
and a.call_time &gt;= (NOW() - interval 24 hour) and a.call_time &gt;= (NOW() - interval 24 hour)
</if> </if>
ORDER BY ORDER BY a.call_time DESC
a.call_time DESC <if test='pageNum!=null and pageSize !=null'>
limit #{pageNum},#{pageSize}
</if>
</select> </select>
<select id="alertCalledListByAlertStatusCount" resultType="Integer">
SELECT
COUNT(*)
FROM jc_alert_called a
where a.is_delete=0
AND a.coordinate_x IS NOT NULL
AND a.coordinate_y IS NOT NULL
<if test='par.status==0'>
and a.alert_status =0
</if>
<if test='par.status==1'>
and a.alert_status =1
</if>
<if test='par.address!=null and par.address!="" '>
and a.address like CONCAT('%',#{par.address},'%')
</if>
<if test='par.whether24!=false'>
and a.call_time &gt;= (NOW() - interval 24 hour)
</if>
</select>
<select id="AlertCalledcountTime" resultType="Integer"> <select id="AlertCalledcountTime" resultType="Integer">
......
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>amos-boot-module-api</artifactId>
<groupId>com.amosframework.boot</groupId>
<version>1.0.0</version>
</parent>
<artifactId>amos-boot-module-maintenance-api</artifactId>
<dependencies>
<dependency>
<groupId>com.amosframework.boot</groupId>
<artifactId>amos-boot-biz-common</artifactId>
<version>${amos-biz-boot.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
<exclusions>
<exclusion>
<groupId>org.apache.tomcat</groupId>
<artifactId>tomcat-jdbc</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>cn.afterturn</groupId>
<artifactId>easypoi-base</artifactId>
<version>3.0.3</version>
</dependency>
<dependency>
<groupId>cn.afterturn</groupId>
<artifactId>easypoi-web</artifactId>
<version>3.0.3</version>
</dependency>
<dependency>
<groupId>cn.afterturn</groupId>
<artifactId>easypoi-annotation</artifactId>
<version>3.0.3</version>
</dependency>
<dependency>
<groupId>org.jsoup</groupId>
<artifactId>jsoup</artifactId>
<version>1.11.2</version>
</dependency>
</dependencies>
</project>
package com.yeejoin.amos.maintenance.common.enums;
public enum BooleanEnum {
YES("真", 1),
NO("假", 0);
/**
* 名称,描述
*/
private String name;
/**
* 编码
*/
private Integer code;
BooleanEnum(String name, Integer code) {
this.name = name;
this.code = code;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public Integer getCode() {
return code;
}
public void setCode(Integer code) {
this.code = code;
}
}
package com.yeejoin.amos.maintenance.common.enums;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public enum CheckEmailEnum {
ALL("checkEmail","all", "有上报就推送"),
LEAK("checkEmail","leak", "漏检上报"),
ERROR("checkEmail","error", "不合格上报"),
NOT("checkEmail","not", "全部不推送");
private String ower;
private String code;
private String message;
private CheckEmailEnum(String ower, String code, String message) {
this.ower = ower;
this.code = code;
this.message = message;
}
public String getCode() {
return code;
}
public String getMessage() {
return message;
}
public String getOwer() {
return ower;
}
public static List<Map<String, Object>> getEnumList() {
List<Map<String, Object>> list = new ArrayList<>();
for(CheckEmailEnum e : CheckEmailEnum.values()) {
Map<String, Object> map = new HashMap<String, Object>();
map.put("ower", e.getOwer());
map.put("code", e.getCode());
map.put("message", e.getMessage());
list.add(map);
}
return list;
}
}
package com.yeejoin.amos.maintenance.common.enums;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public enum CheckModeEnum {
QR("QR", "二维码巡检"),
MOBILE("MOBILE", "移动点巡检"),
NFC("NFC", "NFC巡检"),
WEB("WEB", "录入检查点巡检"),
WEB_OUT("WEB_OUT", "外来检查");
private String code;
private String message;
private CheckModeEnum(String code, String message) {
this.code = code;
this.message = message;
}
public String getCode() {
return code;
}
public String getMessage() {
return message;
}
public static List<Map<String, Object>> getEnumList() {
List<Map<String, Object>> list = new ArrayList<>();
for(CheckEmailEnum e : CheckEmailEnum.values()) {
Map<String, Object> map = new HashMap<String, Object>();
map.put("ower", e.getOwer());
map.put("code", e.getCode());
list.add(map);
}
return list;
}
}
package com.yeejoin.amos.maintenance.common.enums;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public enum CheckStatisticsTypeEnum {
PLAN("巡检计划",0),
ROUTE("巡检路线",1),
POINT("巡检点",2),
DEPARTMENT("巡检部门",3),
INSPECTORS("巡检人员",4),
TASKMONTH("任务日期",5),
TASTTIME("任务月份",6);
/**
* 名称
*/
private String name;
/**
* 值
*/
private int value;
private CheckStatisticsTypeEnum(String name, int value) {
this.name = name;
this.value = value;
}
public static String getName(int value) {
for (CheckStatisticsTypeEnum c : CheckStatisticsTypeEnum.values()) {
if (c.getValue() == value) {
return c.name;
}
}
return null;
}
public static int getValue(String name) {
for (CheckStatisticsTypeEnum c : CheckStatisticsTypeEnum.values()) {
if (c.getName().equals(name)) {
return c.value;
}
}
return -1;
}
public static CheckStatisticsTypeEnum getEnum(int value) {
for (CheckStatisticsTypeEnum c : CheckStatisticsTypeEnum.values()) {
if (c.getValue() == value) {
return c;
}
}
return null;
}
public static CheckStatisticsTypeEnum getEnum(String name) {
for (CheckStatisticsTypeEnum c : CheckStatisticsTypeEnum.values()) {
if (c.getName().equals(name)) {
return c;
}
}
return null;
}
public static List<Map<String,String>> getEnumList() {
List<Map<String,String>> nameList = new ArrayList<>();
for (CheckStatisticsTypeEnum c: CheckStatisticsTypeEnum.values()) {
Map<String, String> map = new HashMap<String, String>();
map.put("name", c.getName());
map.put("value", c.getValue() +"");
nameList.add(map);
}
return nameList;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public int getValue() {
return value;
}
public void setValue(int value) {
this.value = value;
}
}
package com.yeejoin.amos.maintenance.common.enums;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public enum CheckStatusEnum {
QUALIFIED("合格","1",""),
UNQUALIFIED("不合格","2","#DF7400"),
OMISSION("漏检", "3","#FF0000");
/**
* 名称,描述
*/
private String name;
/**
* 编码
*/
private String code;
/**
* 颜色
*/
private String color;
private CheckStatusEnum(String name, String code,String color){
this.name = name;
this.code = code;
this.color = color;
}
public static CheckStatusEnum getEnum(String code) {
CheckStatusEnum checkStatusEnum = null;
for(CheckStatusEnum type: CheckStatusEnum.values()) {
if (type.getCode().equals(code)) {
checkStatusEnum = type;
break;
}
}
return checkStatusEnum;
}
public static List<Map<String,String>> getEnumList() {
List<Map<String,String>> nameList = new ArrayList<>();
for (CheckStatusEnum c: CheckStatusEnum.values()) {
Map<String, String> map = new HashMap<String, String>();
map.put("name", c.getName());
map.put("code", c.getCode());
map.put("color", c.getColor());
nameList.add(map);
}
return nameList;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getColor() {
return color;
}
public void setColor(String color) {
this.color = color;
}
}
package com.yeejoin.amos.maintenance.common.enums;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public enum CheckTypeEnum {
ALL("checkType","all", "有上报就推送"),
LEAK("checkType","leak", "漏检上报"),
ERROR("checkType","error", "不合格上报"),
NOT("checkType","not", "全部不推送");
private String ower;
private String code;
private String message;
private CheckTypeEnum(String ower, String code, String message) {
this.ower = ower;
this.code = code;
this.message = message;
}
public String getCode() {
return code;
}
public String getMessage() {
return message;
}
public String getOwer() {
return ower;
}
public static List<Map<String, Object>> getEnumList() {
List<Map<String, Object>> list = new ArrayList<>();
for(CheckTypeEnum e : CheckTypeEnum.values()) {
Map<String, Object> map = new HashMap<String, Object>();
map.put("ower", e.getOwer());
map.put("code", e.getCode());
map.put("message", e.getMessage());
list.add(map);
}
return list;
}
}
package com.yeejoin.amos.maintenance.common.enums;
import lombok.AllArgsConstructor;
import lombok.Getter;
@Getter
@AllArgsConstructor
public enum DangerHandleStateEnum {
HANDLE("隐患治理中", 0),
COMPLETED("隐患治理完成", 1);
/**
* 名称,描述
*/
private String name;
/**
* 编码
*/
private Integer code;
}
package com.yeejoin.amos.maintenance.common.enums;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* 字典枚举对象
* @author maoying
*
*/
public enum DictTypeEnum {
controlMeasuresCategory("管控措施类别","CM_CATEGORY"),
controlMeasuresType("管控措施类型","CM_TYPE"),
TASKWORKTYPE("作业活动类型", "TASKWORK_TYPE"),
EQUIPTYPE("设备类型","EQUIP_TYPE"),
DANGERLEVEL("隐患等级", "DANGER_LEVEL"),
OUTERPOINTTYPE("导入外部安全检查表分类", "OUTER_POINT_TYPE"),
MAINTENANCE_CLASSIFY("维保项分类","MAINTENANCE_CLASSIFY");
/**
* 名称,描述
*/
private String name;
/**
* 编码
*/
private String code;
private DictTypeEnum(String name, String code){
this.name = name;
this.code = code;
}
public static DictTypeEnum getEnum(String code) {
DictTypeEnum instance = null;
for(DictTypeEnum type: DictTypeEnum.values()) {
if (type.getCode().equals(code)) {
instance = type;
break;
}
}
return instance;
}
public static List<Map<String,String>> getEnumList() {
List<Map<String,String>> list = new ArrayList<>();
for(DictTypeEnum e : DictTypeEnum.values()) {
Map<String, String> map = new HashMap<String, String>();
map.put("code", e.getCode());
map.put("name", e.getName());
list.add(map);
}
return list;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
}
package com.yeejoin.amos.maintenance.common.enums;
public enum ExecuteStateEnum {
未执行("未执行", 1, ""),
通过("通过", 2, "{\"action\": \"complete\",\"variables\": [{\"name\": \"rejected\",\"value\": false}]}"),
驳回("驳回", 3, "{\"action\": \"complete\",\"variables\": [{\"name\": \"rejected\",\"value\": true}]}"),
已确认("已确认", 4, ""),
停止执行("停止执行", 5, ""),
作业开始执行("作业开始执行", 6, ""),
作业完成("作业完成", 7, "");
/**
* 名称,描述
*/
private String name;
/**
* 编码
*/
private Integer code;
private String requestBody;
ExecuteStateEnum(String name, Integer code, String requestBody) {
this.name = name;
this.code = code;
this.requestBody = requestBody;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public Integer getCode() {
return code;
}
public void setCode(Integer code) {
this.code = code;
}
public String getRequestBody() {
return requestBody;
}
public void setRequestBody(String requestBody) {
this.requestBody = requestBody;
}
public static ExecuteStateEnum getByCode(Integer code) {
for (ExecuteStateEnum e : ExecuteStateEnum.values()) {
if (code.equals(e.getCode())) {
return e;
}
}
return null;
}
}
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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