init
commit
352d665680
|
|
@ -0,0 +1 @@
|
|||
.idea/
|
||||
|
|
@ -0,0 +1,69 @@
|
|||
<?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">
|
||||
<parent>
|
||||
<artifactId>hcsq</artifactId>
|
||||
<groupId>com.hcsq</groupId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>big-data</artifactId>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.source>8</maven.compiler.source>
|
||||
<maven.compiler.target>8</maven.compiler.target>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.hcsq</groupId>
|
||||
<artifactId>system</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.hcsq</groupId>
|
||||
<artifactId>event</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.hcsq</groupId>
|
||||
<artifactId>grid</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.hcsq</groupId>
|
||||
<artifactId>work</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.hcsq</groupId>
|
||||
<artifactId>life</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.hcsq</groupId>
|
||||
<artifactId>manage</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.hcsq</groupId>
|
||||
<artifactId>party</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.hcsq</groupId>
|
||||
<artifactId>urban</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,18 @@
|
|||
<?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">
|
||||
<parent>
|
||||
<artifactId>hcsq</artifactId>
|
||||
<groupId>com.hcsq</groupId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>common</artifactId>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.source>8</maven.compiler.source>
|
||||
<maven.compiler.target>8</maven.compiler.target>
|
||||
</properties>
|
||||
</project>
|
||||
|
|
@ -0,0 +1,366 @@
|
|||
package com.hcsq.entity;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelIgnore;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.alibaba.excel.annotation.format.DateTimeFormat;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.models.auth.In;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 事件-事件表
|
||||
* </p>
|
||||
*
|
||||
|
||||
|
||||
*/
|
||||
@Data
|
||||
public class Event extends Model<Event> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@ExcelIgnore
|
||||
@TableId(value="id", type= IdType.AUTO)
|
||||
private Integer id;
|
||||
/**
|
||||
* 编号
|
||||
*/
|
||||
@ExcelProperty("编号")
|
||||
@TableField("event_no")
|
||||
private String eventNo;
|
||||
/**
|
||||
* 所属网格
|
||||
*/
|
||||
@ExcelIgnore
|
||||
@TableField("area_id")
|
||||
private Integer areaId;
|
||||
/**
|
||||
* 所属网格
|
||||
*/
|
||||
@ExcelProperty("所属网格")
|
||||
@TableField(exist = false)
|
||||
private String areaName;
|
||||
/**
|
||||
* 事件名称
|
||||
*/
|
||||
@ExcelProperty("名称")
|
||||
@TableField("event_name")
|
||||
private String eventName;
|
||||
/**
|
||||
* 发生日期
|
||||
*/
|
||||
@ExcelProperty("发生日期")
|
||||
@TableField("occurrence_date")
|
||||
private Date occurrenceDate;
|
||||
/**
|
||||
* 事件类别
|
||||
*/
|
||||
@ExcelIgnore
|
||||
@TableField("event_type_id")
|
||||
private Integer eventTypeId;
|
||||
@ExcelProperty("事件类别")
|
||||
@TableField(exist = false)
|
||||
private String eventTypeStr;
|
||||
|
||||
/**
|
||||
* 来源(1 网格员巡查,2 居民上报,3 上级转办,4 物联网感知,5 12345热线)
|
||||
*/
|
||||
@ExcelIgnore
|
||||
private Integer source;
|
||||
@ExcelProperty("来源")
|
||||
@TableField(exist = false)
|
||||
private String sourceStr;
|
||||
|
||||
/**
|
||||
* 事件规模
|
||||
*/
|
||||
@ExcelIgnore
|
||||
private Integer scale;
|
||||
@ExcelProperty("事件规模")
|
||||
@TableField(exist = false)
|
||||
private String scaleStr;
|
||||
/**
|
||||
* 事件等级 (1 一般;2 紧急)
|
||||
*/
|
||||
@ExcelIgnore
|
||||
private Integer estate;
|
||||
@ExcelProperty("事件等级")
|
||||
@TableField(exist = false)
|
||||
private String estateStr;
|
||||
/**
|
||||
* 涉及人员
|
||||
*/
|
||||
@ExcelIgnore
|
||||
@TableField("involve_people")
|
||||
private String involvePeople;
|
||||
@ExcelProperty("涉及人员")
|
||||
@TableField(exist = false)
|
||||
private String involvePeopleStr;
|
||||
/**
|
||||
* 涉及单位
|
||||
*/
|
||||
@ExcelIgnore
|
||||
@TableField("involved_monad")
|
||||
private String involvedMonad;
|
||||
@ExcelProperty("涉及单位")
|
||||
@TableField(exist = false)
|
||||
private String involvedMonadStr;
|
||||
/**
|
||||
* 事件简述
|
||||
*/
|
||||
@ExcelProperty("事件简述")
|
||||
private String sketch;
|
||||
/**
|
||||
* 位置
|
||||
*/
|
||||
@ExcelIgnore
|
||||
private String position;
|
||||
/**
|
||||
* 位置名
|
||||
*/
|
||||
@ExcelProperty("位置")
|
||||
@TableField("position_name")
|
||||
private String positionName;
|
||||
@ExcelProperty("登记时间")
|
||||
@TableField("add_time")
|
||||
@DateTimeFormat("yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8")
|
||||
private Date addTime;
|
||||
|
||||
@ExcelIgnore
|
||||
@TableField("add_user")
|
||||
private Integer addUser;
|
||||
/**
|
||||
* 上报人
|
||||
*/
|
||||
@ExcelProperty("上报人")
|
||||
@TableField(exist = false)
|
||||
private String addUserName;
|
||||
|
||||
/**
|
||||
* 联系方式
|
||||
*/
|
||||
@ExcelProperty("联系方式")
|
||||
private String phone;
|
||||
/**
|
||||
* 状态 1正常 0删除
|
||||
*/
|
||||
@ExcelIgnore
|
||||
private Integer status;
|
||||
@ExcelProperty("状态")
|
||||
@TableField(exist = false)
|
||||
private String statusStr;
|
||||
/**
|
||||
* 模板id
|
||||
*/
|
||||
@ExcelIgnore
|
||||
@TableField("template_id")
|
||||
private Integer templateId;
|
||||
@ExcelProperty("模板")
|
||||
@TableField(exist = false)
|
||||
private String templateStr;
|
||||
/**
|
||||
* 处理人
|
||||
*/
|
||||
@ExcelIgnore
|
||||
private Integer conductor;
|
||||
/**
|
||||
* 处理人
|
||||
*/
|
||||
@ExcelProperty("处理人姓名")
|
||||
@TableField(exist = false)
|
||||
private String conductorName;
|
||||
/**
|
||||
* 联系人
|
||||
*/
|
||||
@ExcelIgnore
|
||||
private String contact;
|
||||
/**
|
||||
* 图片
|
||||
*/
|
||||
@ExcelIgnore
|
||||
private String photo;
|
||||
/**
|
||||
* 视频
|
||||
*/
|
||||
@ExcelIgnore
|
||||
private String video;
|
||||
/**
|
||||
* 附件
|
||||
*/
|
||||
@ExcelIgnore
|
||||
private String accessory;
|
||||
|
||||
/**
|
||||
* 节点id
|
||||
*/
|
||||
@ExcelIgnore
|
||||
@TableField("node_id")
|
||||
private Integer nodeId;
|
||||
@ExcelIgnore
|
||||
@TableField(exist = false)
|
||||
private String nodeIdStr;
|
||||
@ExcelIgnore
|
||||
@TableField("update_user")
|
||||
private Integer updateUser;
|
||||
@ExcelIgnore
|
||||
@TableField("update_time")
|
||||
private Date updateTime;
|
||||
|
||||
@ExcelIgnore
|
||||
private String memo;
|
||||
/**
|
||||
* 被派遣人
|
||||
*/
|
||||
@ExcelIgnore
|
||||
@TableField("dispatch_to")
|
||||
private String dispatchTo;
|
||||
/**
|
||||
* 处理期限
|
||||
*/
|
||||
@ExcelIgnore
|
||||
@TableField("dispose_deadline")
|
||||
private Date disposeDeadline;
|
||||
/**
|
||||
* 预警次数
|
||||
*/
|
||||
@ExcelIgnore
|
||||
@TableField("warning_number")
|
||||
private String warningNumber;
|
||||
/**
|
||||
* 是否超时
|
||||
*/
|
||||
@ExcelIgnore
|
||||
@TableField("is_timeout")
|
||||
private Integer isTimeout;
|
||||
/**
|
||||
* 是否延期
|
||||
*/
|
||||
@ExcelIgnore
|
||||
@TableField("is_extension")
|
||||
private Integer isExtension;
|
||||
|
||||
/**
|
||||
* 巡查计划ID-限巡查添加的事件带有此参数
|
||||
*/
|
||||
@ExcelIgnore
|
||||
private Integer inspection;
|
||||
/**
|
||||
* 巡查目的地ID-限巡查添加的事件带有此参数
|
||||
*/
|
||||
@ExcelIgnore
|
||||
private String destination;
|
||||
/**
|
||||
* 转办意见
|
||||
*/
|
||||
@ExcelIgnore
|
||||
private String complaint;
|
||||
/**
|
||||
* 承办单位
|
||||
*/
|
||||
@ExcelIgnore
|
||||
private String undertake;
|
||||
|
||||
/**
|
||||
* 是否保密
|
||||
*/
|
||||
@ExcelIgnore
|
||||
private String secret;
|
||||
/**
|
||||
* 是否回复
|
||||
*/
|
||||
@ExcelIgnore
|
||||
private String reply;
|
||||
/**
|
||||
* 回复备注
|
||||
*/
|
||||
@ExcelIgnore
|
||||
@TableField("reply_memo")
|
||||
private String replyMemo;
|
||||
/**
|
||||
* 办理轨迹
|
||||
*/
|
||||
@ExcelIgnore
|
||||
@TableField("transact_path")
|
||||
private String transactPath;
|
||||
/**
|
||||
* 受理员
|
||||
*/
|
||||
@ExcelIgnore
|
||||
private String acceptor;
|
||||
/**
|
||||
* 受理员工号
|
||||
*/
|
||||
@ExcelIgnore
|
||||
@TableField("acceptor_no")
|
||||
private String acceptorNo;
|
||||
/**
|
||||
* 信息来源
|
||||
*/
|
||||
@ExcelIgnore
|
||||
@TableField("information_source")
|
||||
private String informationSource;
|
||||
/**
|
||||
* 来电类别
|
||||
*/
|
||||
@ExcelIgnore
|
||||
@TableField("call_type")
|
||||
private String callType;
|
||||
/**
|
||||
* 类型拼接字符串
|
||||
*/
|
||||
@ExcelIgnore
|
||||
@TableField("type_str")
|
||||
private String typeStr;
|
||||
/**
|
||||
* 工单类型
|
||||
*/
|
||||
@ExcelIgnore
|
||||
@TableField("order_type")
|
||||
private String orderType;
|
||||
|
||||
@ExcelIgnore
|
||||
@TableField(exist = false)
|
||||
private String keyWord;
|
||||
@ExcelIgnore
|
||||
@TableField(exist = false)
|
||||
private String startDisposeDeadline;
|
||||
@TableField(exist = false)
|
||||
@ExcelIgnore
|
||||
private String endDisposeDeadline;
|
||||
@TableField(exist = false)
|
||||
@ExcelIgnore
|
||||
private Integer isArea;
|
||||
@ExcelIgnore
|
||||
// 我上报的事件
|
||||
@TableField(exist = false)
|
||||
private Integer isMine;
|
||||
|
||||
/**
|
||||
* 字段信息
|
||||
*/
|
||||
@ExcelIgnore
|
||||
@TableField("field_information")
|
||||
private String fieldInformation;
|
||||
|
||||
/**
|
||||
* 满意度
|
||||
*/
|
||||
@ExcelIgnore
|
||||
@TableField("evaluation_score")
|
||||
private String evaluationScore;
|
||||
|
||||
@ExcelIgnore
|
||||
@TableField(exist = false)
|
||||
private Integer relationId;
|
||||
}
|
||||
|
|
@ -0,0 +1,113 @@
|
|||
package com.hcsq.entity;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 事件-事件表
|
||||
* </p>
|
||||
*
|
||||
|
||||
|
||||
*/
|
||||
@Data
|
||||
public class EventImport extends Model<EventImport> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 编号
|
||||
*/
|
||||
@ExcelProperty("编号*")
|
||||
private String eventNo;
|
||||
/**
|
||||
* 所属网格
|
||||
*/
|
||||
@ExcelProperty("所属网格*")
|
||||
private String areaName;
|
||||
/**
|
||||
* 事件名称
|
||||
*/
|
||||
@ExcelProperty("名称*")
|
||||
@TableField("event_name")
|
||||
private String eventName;
|
||||
/**
|
||||
* 发生日期
|
||||
*/
|
||||
@ExcelProperty("发生日期*")
|
||||
private Date occurrenceDate;
|
||||
/**
|
||||
* 事件类别
|
||||
*/
|
||||
@ExcelProperty("事件类别*")
|
||||
private String eventTypeStr;
|
||||
|
||||
/**
|
||||
* 来源(1 网格员巡查,2 居民上报,3 上级转办,4 物联网感知,5 12345热线)
|
||||
*/
|
||||
@ExcelProperty("来源*")
|
||||
private String sourceStr;
|
||||
|
||||
/**
|
||||
* 事件规模
|
||||
*/
|
||||
@ExcelProperty("事件规模")
|
||||
private String scaleStr;
|
||||
/**
|
||||
* 事件等级 (1 一般;2 紧急)
|
||||
*/
|
||||
@ExcelProperty("事件等级")
|
||||
private String estateStr;
|
||||
/**
|
||||
* 涉及人员
|
||||
*/
|
||||
@ExcelProperty("涉及人员")
|
||||
private String involvePeople;
|
||||
|
||||
/**
|
||||
* 涉及单位
|
||||
*/
|
||||
@ExcelProperty("涉及单位")
|
||||
private String involvedMonad;
|
||||
|
||||
/**
|
||||
* 事件简述
|
||||
*/
|
||||
@ExcelProperty("事件简述")
|
||||
private String sketch;
|
||||
/**
|
||||
* 位置名
|
||||
*/
|
||||
@ExcelProperty("位置*")
|
||||
private String positionName;
|
||||
@ExcelProperty("登记时间")
|
||||
private Date addTime;
|
||||
|
||||
/**
|
||||
* 上报人
|
||||
*/
|
||||
@ExcelProperty("上报人")
|
||||
private String addUserName;
|
||||
|
||||
/**
|
||||
* 联系方式
|
||||
*/
|
||||
@ExcelProperty("联系方式")
|
||||
private String phone;
|
||||
/**
|
||||
* 状态 1正常 0删除
|
||||
*/
|
||||
@ExcelProperty("状态")
|
||||
private String statusStr;
|
||||
/**
|
||||
* 模板id
|
||||
*/
|
||||
@ExcelProperty("模板")
|
||||
private String templateStr;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,57 @@
|
|||
package com.hcsq.entity;
|
||||
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class EventTypeTree {
|
||||
|
||||
private List<EventTypeTree> children;
|
||||
private Integer id;
|
||||
/**
|
||||
* 事件类型名称
|
||||
*/
|
||||
private String name;
|
||||
/**
|
||||
* 事件类型父id
|
||||
*/
|
||||
private Integer pid;
|
||||
/**
|
||||
* 事件类型编码
|
||||
*/
|
||||
private String code;
|
||||
/**
|
||||
* 事件类型排序
|
||||
*/
|
||||
private String sort;
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
private Integer status;
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
private Date updateTime;
|
||||
/**
|
||||
* 更新人
|
||||
*/
|
||||
private String updateUser;
|
||||
/**
|
||||
* 添加人
|
||||
*/
|
||||
private String addUser;
|
||||
/**
|
||||
* 添加时间
|
||||
*/
|
||||
private Date addTime;
|
||||
|
||||
public void addChildren(EventTypeTree tree) {
|
||||
this.children.add(tree);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,264 @@
|
|||
package com.hcsq.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 网格-网格管理表
|
||||
* </p>
|
||||
*
|
||||
|
||||
|
||||
*/
|
||||
@Data
|
||||
@TableName("grid_area")
|
||||
public class GridArea extends Model<GridArea> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 区域管理表主键
|
||||
*/
|
||||
@TableId(value="id")
|
||||
private Integer id;
|
||||
/**
|
||||
* 编号
|
||||
*/
|
||||
@TableField("area_no")
|
||||
private String areaNo;
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
@TableField("area_name")
|
||||
private String areaName;
|
||||
/**
|
||||
* 网格名简写
|
||||
*/
|
||||
@TableField("area_shortname")
|
||||
private String areaShortname;
|
||||
/**
|
||||
* 地址
|
||||
*/
|
||||
@TableField("area_addr")
|
||||
private String areaAddr;
|
||||
/**
|
||||
* 面积
|
||||
*/
|
||||
@TableField("area_measure")
|
||||
private String areaMeasure;
|
||||
/**
|
||||
* 所属上级
|
||||
*/
|
||||
@TableField("p_id")
|
||||
private String pId;
|
||||
/**
|
||||
* 网格长姓名
|
||||
*/
|
||||
@TableField("arealeader_name")
|
||||
private String arealeaderName;
|
||||
/**
|
||||
* 网格员姓名
|
||||
*/
|
||||
@TableField("areaer_name")
|
||||
private String areaerName;
|
||||
/**
|
||||
* 中心点
|
||||
*/
|
||||
|
||||
@TableField("area_center")
|
||||
private String areaCenter;
|
||||
/**
|
||||
* 网格是否标注
|
||||
*/
|
||||
@TableField("is_tagging")
|
||||
private String isTagging;
|
||||
/**
|
||||
* 网格简介
|
||||
*/
|
||||
@TableField("area_introduction")
|
||||
private String areaIntroduction;
|
||||
/**
|
||||
* 网格图片
|
||||
*/
|
||||
@TableField("area_picture")
|
||||
private String areaPicture;
|
||||
/**
|
||||
* 区域层级
|
||||
*/
|
||||
@TableField("area_level")
|
||||
private Integer areaLevel;
|
||||
/**
|
||||
* 网格类型
|
||||
*/
|
||||
@TableField("area_type")
|
||||
private String areaType;
|
||||
/**
|
||||
* 添加人
|
||||
*/
|
||||
@TableField("add_user")
|
||||
private String addUser;
|
||||
/**
|
||||
* 修改人
|
||||
*/
|
||||
@TableField("update_user")
|
||||
private String updateUser;
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
private Integer status;
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
@TableField("update_time")
|
||||
private Date updateTime;
|
||||
/**
|
||||
* 风采
|
||||
*/
|
||||
@TableField("area_mien")
|
||||
private String areaMien;
|
||||
/**
|
||||
* 介绍
|
||||
*/
|
||||
@TableField("area_introduce")
|
||||
private String areaIntroduce;
|
||||
/**
|
||||
* 添加时间
|
||||
*/
|
||||
@TableField("add_time")
|
||||
private Date addTime;
|
||||
/**
|
||||
* 该区域事件总数
|
||||
*/
|
||||
@TableField("keyevents_count")
|
||||
private Integer keyeventsCount;
|
||||
/**
|
||||
* 该区域人口总数
|
||||
*/
|
||||
@TableField("people_count")
|
||||
private Integer peopleCount;
|
||||
/**
|
||||
* 该区域非公有制经济组织总数
|
||||
*/
|
||||
@TableField("norg_count")
|
||||
private Integer norgCount;
|
||||
/**
|
||||
* 该区域社会组织总数
|
||||
*/
|
||||
@TableField("org_count")
|
||||
private Integer orgCount;
|
||||
/**
|
||||
* 该区域部件总数
|
||||
*/
|
||||
@TableField("attachments_count")
|
||||
private Integer attachmentsCount;
|
||||
/**
|
||||
* 该区域建筑物总数
|
||||
*/
|
||||
@TableField("building_count")
|
||||
private Integer buildingCount;
|
||||
/**
|
||||
* 该区域社情民意总数
|
||||
*/
|
||||
@TableField("poll_count")
|
||||
private Integer pollCount;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String memo;
|
||||
/**
|
||||
* 党组织名称
|
||||
*/
|
||||
@TableField("party_name")
|
||||
private String partyName;
|
||||
/**
|
||||
* 党组织负责人
|
||||
*/
|
||||
@TableField("party_manager")
|
||||
private String partyManager;
|
||||
/**
|
||||
* 党组织风采(图片)
|
||||
*/
|
||||
@TableField("party_propagate")
|
||||
private String partyPropagate;
|
||||
/**
|
||||
* 党组织头像
|
||||
*/
|
||||
@TableField("party_avatar")
|
||||
private String partyAvatar;
|
||||
/**
|
||||
* 党组织分级 关联code表
|
||||
*/
|
||||
@TableField("party_level")
|
||||
private String partyLevel;
|
||||
/**
|
||||
* 党组织坐标
|
||||
*/
|
||||
@TableField("party_map")
|
||||
private String partyMap;
|
||||
/**
|
||||
* 党组织简介
|
||||
*/
|
||||
@TableField("party_abstract")
|
||||
private String partyAbstract;
|
||||
/**
|
||||
* 党组织缩写(四字)
|
||||
*/
|
||||
@TableField("party_acronym")
|
||||
private String partyAcronym;
|
||||
/**
|
||||
* 党组织账号
|
||||
*/
|
||||
@TableField("party_user")
|
||||
private String partyUser;
|
||||
/**
|
||||
* 党组织荣誉,关联type表
|
||||
*/
|
||||
@TableField("party_honor")
|
||||
private String partyHonor;
|
||||
/**
|
||||
* 党组织密码
|
||||
*/
|
||||
@TableField("party_password")
|
||||
private String partyPassword;
|
||||
/**
|
||||
* 有效状态;0.有效1.以停用2.已注销
|
||||
*/
|
||||
@TableField("valid_type")
|
||||
private Integer validType;
|
||||
/**
|
||||
* 合并状态;0.可合并,1不可合并
|
||||
*/
|
||||
@TableField("merge_type")
|
||||
private Integer mergeType;
|
||||
/**
|
||||
* 网格标注颜色
|
||||
*/
|
||||
@TableField("area_color")
|
||||
private String areaColor;
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
private Integer sort;
|
||||
/**
|
||||
* 网格配置引导页
|
||||
*/
|
||||
@TableField("gurid_type")
|
||||
private Integer guridType;
|
||||
/**
|
||||
* 网格队伍
|
||||
*/
|
||||
@TableField("area_team")
|
||||
private String areaTeam;
|
||||
|
||||
/**
|
||||
* 关键字 (前端查询传参使用)
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private String keyWord;
|
||||
}
|
||||
|
|
@ -0,0 +1,206 @@
|
|||
package com.hcsq.entity;
|
||||
|
||||
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
@Data
|
||||
public class GridAreaTree {
|
||||
|
||||
private List<GridAreaTree> children;
|
||||
/**
|
||||
* 区域管理表主键
|
||||
*/
|
||||
private Integer id;
|
||||
/**
|
||||
* 编号
|
||||
*/
|
||||
private String areaNo;
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
private String areaName;
|
||||
/**
|
||||
* 网格名简写
|
||||
*/
|
||||
private String areaShortname;
|
||||
/**
|
||||
* 地址
|
||||
*/
|
||||
private String areaAddr;
|
||||
/**
|
||||
* 面积
|
||||
*/
|
||||
private String areaMeasure;
|
||||
/**
|
||||
* 所属上级
|
||||
*/
|
||||
private String pId;
|
||||
/**
|
||||
* 网格长姓名
|
||||
*/
|
||||
private String arealeaderName;
|
||||
/**
|
||||
* 网格员姓名
|
||||
*/
|
||||
private String areaerName;
|
||||
/**
|
||||
* 中心点
|
||||
*/
|
||||
private String areaCenter;
|
||||
/**
|
||||
* 网格是否标注
|
||||
*/
|
||||
private String isTagging;
|
||||
/**
|
||||
* 网格简介
|
||||
*/
|
||||
private String areaIntroduction;
|
||||
/**
|
||||
* 网格图片
|
||||
*/
|
||||
private String areaPicture;
|
||||
/**
|
||||
* 区域层级
|
||||
*/
|
||||
private Integer areaLevel;
|
||||
/**
|
||||
* 网格类型
|
||||
*/
|
||||
private String areaType;
|
||||
/**
|
||||
* 添加人
|
||||
*/
|
||||
private String addUser;
|
||||
/**
|
||||
* 修改人
|
||||
*/
|
||||
private String updateUser;
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
private Integer status;
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
private Date updateTime;
|
||||
/**
|
||||
* 风采
|
||||
*/
|
||||
private String areaMien;
|
||||
/**
|
||||
* 介绍
|
||||
*/
|
||||
private String areaIntroduce;
|
||||
/**
|
||||
* 添加时间
|
||||
*/
|
||||
private Date addTime;
|
||||
/**
|
||||
* 该区域事件总数
|
||||
*/
|
||||
private Integer keyeventsCount;
|
||||
/**
|
||||
* 该区域人口总数
|
||||
*/
|
||||
private Integer peopleCount;
|
||||
/**
|
||||
* 该区域非公有制经济组织总数
|
||||
*/
|
||||
private Integer norgCount;
|
||||
/**
|
||||
* 该区域社会组织总数
|
||||
*/
|
||||
private Integer orgCount;
|
||||
/**
|
||||
* 该区域部件总数
|
||||
*/
|
||||
private Integer attachmentsCount;
|
||||
/**
|
||||
* 该区域建筑物总数
|
||||
*/
|
||||
private Integer buildingCount;
|
||||
/**
|
||||
* 该区域社情民意总数
|
||||
*/
|
||||
private Integer pollCount;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String memo;
|
||||
/**
|
||||
* 党组织名称
|
||||
*/
|
||||
private String partyName;
|
||||
/**
|
||||
* 党组织负责人
|
||||
*/
|
||||
private String partyManager;
|
||||
/**
|
||||
* 党组织风采(图片)
|
||||
*/
|
||||
private String partyPropagate;
|
||||
/**
|
||||
* 党组织头像
|
||||
*/
|
||||
private String partyAvatar;
|
||||
/**
|
||||
* 党组织分级 关联code表
|
||||
*/
|
||||
private String partyLevel;
|
||||
/**
|
||||
* 党组织坐标
|
||||
*/
|
||||
private String partyMap;
|
||||
/**
|
||||
* 党组织简介
|
||||
*/
|
||||
private String partyAbstract;
|
||||
/**
|
||||
* 党组织缩写(四字)
|
||||
*/
|
||||
private String partyAcronym;
|
||||
/**
|
||||
* 党组织账号
|
||||
*/
|
||||
private String partyUser;
|
||||
/**
|
||||
* 党组织荣誉,关联type表
|
||||
*/
|
||||
private String partyHonor;
|
||||
/**
|
||||
* 党组织密码
|
||||
*/
|
||||
private String partyPassword;
|
||||
/**
|
||||
* 有效状态;0.有效1.以停用2.已注销
|
||||
*/
|
||||
private Integer validType;
|
||||
/**
|
||||
* 合并状态;0.可合并,1不可合并
|
||||
*/
|
||||
private Integer mergeType;
|
||||
/**
|
||||
* 网格标注颜色
|
||||
*/
|
||||
private String areaColor;
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
private Integer sort;
|
||||
/**
|
||||
* 网格配置引导页
|
||||
*/
|
||||
private Integer guridType;
|
||||
/**
|
||||
* 网格队伍
|
||||
*/
|
||||
private String areaTeam;
|
||||
|
||||
public void addChildren(GridAreaTree tree) {
|
||||
this.children.add(tree);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,104 @@
|
|||
package com.hcsq.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 网格-企业经营&资金台账
|
||||
* </p>
|
||||
*
|
||||
|
||||
|
||||
*/
|
||||
@Data
|
||||
@TableName("grid_corp_flow")
|
||||
public class GridCorpFlow extends Model<GridCorpFlow> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 营业台账编号
|
||||
*/
|
||||
@TableId(value="id", type= IdType.AUTO)
|
||||
private Integer id;
|
||||
/**
|
||||
* 营业月份
|
||||
*/
|
||||
@TableField("flow_month")
|
||||
private String flowMonth;
|
||||
/**
|
||||
* 计划年份
|
||||
*/
|
||||
@TableField("plan_year")
|
||||
private String planYear;
|
||||
/**
|
||||
* 所属企业id
|
||||
*/
|
||||
@TableField("corp_id")
|
||||
private Integer corpId;
|
||||
@TableField(exist = false)
|
||||
private String corpName;
|
||||
/**
|
||||
* 实际收入
|
||||
*/
|
||||
@TableField("actual_income")
|
||||
private BigDecimal actualIncome;
|
||||
/**
|
||||
* 实际利润
|
||||
*/
|
||||
@TableField("actual_profit")
|
||||
private BigDecimal actualProfit;
|
||||
/**
|
||||
* 企业剩余资金
|
||||
*/
|
||||
@TableField("company_surplus")
|
||||
private BigDecimal companySurplus;
|
||||
/**
|
||||
* 支出
|
||||
*/
|
||||
@TableField("actual_expend")
|
||||
private BigDecimal actualExpend;
|
||||
/**
|
||||
* 经营台账:1 ; 支出台账:2.
|
||||
*/
|
||||
@TableField("flow_type")
|
||||
private Integer flowType;
|
||||
/**
|
||||
* 添加入
|
||||
*/
|
||||
@TableField("add_user")
|
||||
private Integer addUser;
|
||||
/**
|
||||
* 更新人
|
||||
*/
|
||||
@TableField("update_user")
|
||||
private Integer updateUser;
|
||||
/**
|
||||
* 添加时间
|
||||
*/
|
||||
@TableField("add_time")
|
||||
private Date addTime;
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@TableField("update_time")
|
||||
private Date updateTime;
|
||||
/**
|
||||
* 未删除:1(默认); 已删除:2
|
||||
*/
|
||||
private Integer status;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String memo;
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,375 @@
|
|||
package com.hcsq.entity;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 网格-人员基本信息表
|
||||
* </p>
|
||||
*
|
||||
|
||||
|
||||
*/
|
||||
@Data
|
||||
@TableName("grid_people")
|
||||
@ApiModel(description = "网格人员")
|
||||
|
||||
public class GridPeople extends Model<GridPeople> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@ApiModelProperty(value = "主键ID")
|
||||
@TableId(value="id", type= IdType.AUTO)
|
||||
private Integer id;
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private Integer userId;
|
||||
/**
|
||||
* 网格id
|
||||
*/
|
||||
@ApiModelProperty(value = "网格id")
|
||||
@TableField("area_id")
|
||||
private Integer areaId;
|
||||
|
||||
/**
|
||||
* 人员关系
|
||||
*/
|
||||
@ApiModelProperty(value = "人员关系")
|
||||
@TableField(exist = false)
|
||||
private String relationship;
|
||||
|
||||
/**
|
||||
* 户籍关系
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private Integer registerPeopleId;
|
||||
|
||||
/**
|
||||
* 户籍ID
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private Integer registerId;
|
||||
|
||||
/**
|
||||
* 是否为本房屋
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private Integer isHouse;
|
||||
|
||||
/**
|
||||
* 是否落户
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private Integer isRegister;
|
||||
|
||||
|
||||
/**
|
||||
* 与户主关系
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private String registerShip;
|
||||
|
||||
/**
|
||||
* 关键字 (前端查询传参使用)
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private String keyWord;
|
||||
|
||||
|
||||
/**
|
||||
* 类型
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private String peopleType;
|
||||
|
||||
/**
|
||||
* 卡片信息
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private GridPeopleCardData gridPeopleCardData;
|
||||
|
||||
/**
|
||||
* 网格名
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private String areaName;
|
||||
|
||||
/**
|
||||
* 建筑id
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private Integer buildingId;
|
||||
/**
|
||||
* 单元
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private String part;
|
||||
/**
|
||||
* 门牌号
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private String room;
|
||||
/**
|
||||
* 房屋id
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private Integer houseId;
|
||||
/**
|
||||
* 建筑名
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private String buildingName;
|
||||
/**
|
||||
* 楼名
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private String building;
|
||||
|
||||
/**
|
||||
* 证件类型(1.居民身份证 2.护照)
|
||||
*/
|
||||
@TableField("card_type")
|
||||
private String cardType;
|
||||
/**
|
||||
* 身份证
|
||||
*/
|
||||
@TableField("idcard_no")
|
||||
private String idcardNo;
|
||||
/**
|
||||
* 名字
|
||||
*/
|
||||
private String name;
|
||||
/**
|
||||
* 曾用名
|
||||
*/
|
||||
@TableField("used_name")
|
||||
private String usedName;
|
||||
/**
|
||||
* 性别
|
||||
*/
|
||||
private String sex;
|
||||
/**
|
||||
* 出生年月日
|
||||
*/
|
||||
@TableField("birth_date")
|
||||
private String birthDate;
|
||||
/**
|
||||
* 民族
|
||||
*/
|
||||
private String nation;
|
||||
|
||||
/**
|
||||
* 民族
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private String nationStr;
|
||||
/**
|
||||
* 联系方式
|
||||
*/
|
||||
private String mobile;
|
||||
/**
|
||||
* 籍贯
|
||||
*/
|
||||
@TableField("place_origin")
|
||||
private String placeOrigin;
|
||||
/**
|
||||
* 婚姻状况
|
||||
*/
|
||||
@TableField("marital_status")
|
||||
private String maritalStatus;
|
||||
|
||||
/**
|
||||
* 婚姻状况
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private String maritalStatusStr;
|
||||
/**
|
||||
* 政治面貌
|
||||
*/
|
||||
@TableField("political_outlook")
|
||||
private String politicalOutlook;
|
||||
|
||||
/**
|
||||
* 政治面貌
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private String politicalOutlookStr;
|
||||
/**
|
||||
* 学历
|
||||
*/
|
||||
private String education;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String educationStr;
|
||||
/**
|
||||
* 宗教信仰
|
||||
*/
|
||||
@TableField("religious_belief")
|
||||
private String religiousBelief;
|
||||
/**
|
||||
* 特长技能
|
||||
*/
|
||||
private String specialty;
|
||||
@TableField(exist = false)
|
||||
private String specialtyStr;
|
||||
/**
|
||||
* 兴趣爱好
|
||||
*/
|
||||
private String interest;
|
||||
/**
|
||||
* 微信/qq
|
||||
*/
|
||||
private String wxqq;
|
||||
/**
|
||||
* 电子邮箱
|
||||
*/
|
||||
private String email;
|
||||
/**
|
||||
* 户籍地(已废弃)
|
||||
*/
|
||||
@TableField("domicile_place")
|
||||
private String domicilePlace;
|
||||
/**
|
||||
* 毕业学校
|
||||
*/
|
||||
@TableField("gra_school")
|
||||
private String graSchool;
|
||||
/**
|
||||
* 头像
|
||||
*/
|
||||
@TableField("head_portrait")
|
||||
private String headPortrait;
|
||||
/**
|
||||
* 专业
|
||||
*/
|
||||
private String profession;
|
||||
/**
|
||||
* 职业类别
|
||||
*/
|
||||
@TableField("occupational_category")
|
||||
private String occupationalCategory;
|
||||
@TableField(exist = false)
|
||||
private String occupationalCategoryStr;
|
||||
/**
|
||||
* 职业
|
||||
*/
|
||||
private String occupation;
|
||||
/**
|
||||
* 参加工作时间
|
||||
*/
|
||||
@TableField("working_time")
|
||||
private String workingTime;
|
||||
/**
|
||||
* 退休时间
|
||||
*/
|
||||
@TableField("retire_time")
|
||||
private String retireTime;
|
||||
/**
|
||||
* 是否经商
|
||||
*/
|
||||
@TableField("is_businessman")
|
||||
private String isBusinessman;
|
||||
/**
|
||||
* 车牌号
|
||||
*/
|
||||
@TableField("car_no")
|
||||
private String carNo;
|
||||
/**
|
||||
* 是否有门店
|
||||
*/
|
||||
@TableField("is_havestore")
|
||||
private String isHavestore;
|
||||
/**
|
||||
* 门店名称
|
||||
*/
|
||||
@TableField("store_name")
|
||||
private String storeName;
|
||||
/**
|
||||
* 工作单位(学校)
|
||||
*/
|
||||
@TableField("work_unit")
|
||||
private String workUnit;
|
||||
/**
|
||||
* 人员属性
|
||||
*/
|
||||
private String attribute;
|
||||
/**
|
||||
* 是否重点人员
|
||||
*/
|
||||
@TableField("key_personnel")
|
||||
private String keyPersonnel;
|
||||
/**
|
||||
* 标注
|
||||
*/
|
||||
@TableField("map_tagging")
|
||||
private String mapTagging;
|
||||
/**
|
||||
* 添加人
|
||||
*/
|
||||
@TableField("add_user")
|
||||
private Integer addUser;
|
||||
/**
|
||||
* 更新人
|
||||
*/
|
||||
@TableField("update_user")
|
||||
private Integer updateUser;
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
private Integer status;
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@TableField("update_time")
|
||||
private Date updateTime;
|
||||
/**
|
||||
* 添加时间
|
||||
*/
|
||||
@TableField("add_time")
|
||||
private Date addTime;
|
||||
|
||||
/**
|
||||
* 添加时间月-日
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private String time;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String memo;
|
||||
/**
|
||||
* 用户名
|
||||
*/
|
||||
@TableField("user_name")
|
||||
private String userName;
|
||||
/**
|
||||
* 密码
|
||||
*/
|
||||
@TableField("user_pwd")
|
||||
private String userPwd;
|
||||
/**
|
||||
* 绑定微信openid
|
||||
*/
|
||||
private String openid;
|
||||
/**
|
||||
* 是否首次登陆 0否
|
||||
*/
|
||||
@TableField("is_first")
|
||||
private String isFirst;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,105 @@
|
|||
package com.hcsq.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 网格-人口卡片数据表
|
||||
* </p>
|
||||
*
|
||||
|
||||
|
||||
*/
|
||||
@Data
|
||||
@TableName("grid_people_card_data")
|
||||
public class GridPeopleCardData extends Model<GridPeopleCardData> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(value="id", type= IdType.AUTO)
|
||||
private Long id;
|
||||
/**
|
||||
* 身份证号
|
||||
*/
|
||||
@TableField("idcard_no")
|
||||
private String idcardNo;
|
||||
/**
|
||||
* 所属卡片
|
||||
*/
|
||||
@TableField("template_code")
|
||||
private String templateCode;
|
||||
@TableField(exist = false)
|
||||
private String templateName;
|
||||
/**
|
||||
* 数据内容
|
||||
*/
|
||||
@TableField("data_content")
|
||||
private String dataContent;
|
||||
/**
|
||||
* 数据状态 1有效 0 失效,1为默认
|
||||
*/
|
||||
@TableField("data_state")
|
||||
private Integer dataState;
|
||||
@TableField("add_time")
|
||||
private Date addTime;
|
||||
@TableField("add_user")
|
||||
private Integer addUser;
|
||||
@TableField("update_time")
|
||||
private Date updateTime;
|
||||
@TableField("update_user")
|
||||
private Integer updateUser;
|
||||
/**
|
||||
* 审核状态 0未审核 1审核通过 2审核不通过
|
||||
*/
|
||||
@TableField("audit_status")
|
||||
private String auditStatus;
|
||||
|
||||
/**
|
||||
* 关键字 (前端查询传参使用)
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private String keyWord;
|
||||
@TableField(exist = false)
|
||||
private String areaId;
|
||||
@TableField(exist = false)
|
||||
private String sex;
|
||||
@TableField(exist = false)
|
||||
private Map<String,String> cardMap;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String name;
|
||||
@TableField(exist = false)
|
||||
private String sexName;
|
||||
@TableField(exist = false)
|
||||
private String age;
|
||||
@TableField(exist = false)
|
||||
private String contactPhone;
|
||||
@TableField(exist = false)
|
||||
private String contactName;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String serviceStaff;
|
||||
|
||||
@TableField(exist = false)
|
||||
private int limit;
|
||||
@TableField(exist = false)
|
||||
private int offset;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String nation;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String startTime;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String endTime;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,101 @@
|
|||
package com.hcsq.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* - 政务-微志愿微心愿审核表
|
||||
*
|
||||
|
||||
*/
|
||||
@Data
|
||||
@TableName("life_audit")
|
||||
public class LifeAudit extends Model<LifeAudit> {
|
||||
|
||||
/*
|
||||
{"title": "审核id", "key": "id"},
|
||||
{"title": "审核标识 volunteer志愿者 volunteerOrg志愿者组织 volunteerActivity志愿者活动 volunteerApplyActivity志愿者申请报名活动", "key": "identifying"},
|
||||
{"title": "关联id", "key": "relevanceId"},
|
||||
{"title": "审核意见", "key": "audiOpinion"},
|
||||
{"title": "", "key": "addTime"},
|
||||
{"title": "", "key": "addUser"},
|
||||
{"title": "", "key": "updateTime"},
|
||||
{"title": "", "key": "updateUser"},
|
||||
{"title": "", "key": "memo"},
|
||||
{"title": "1同意 2驳回", "key": "status"},
|
||||
*/
|
||||
|
||||
/**
|
||||
* 审核id
|
||||
*/
|
||||
@TableId(value="id", type= IdType.AUTO)
|
||||
private Integer id;
|
||||
|
||||
/**
|
||||
* 审核标识 volunteer志愿者 volunteerOrg志愿者组织 volunteerActivity志愿者活动 volunteerApplyActivity志愿者申请报名活动
|
||||
* wish 心愿审核 wishClaim心愿认领审核 volunteerApplyOrg 志愿者申请加入组织
|
||||
*/
|
||||
@TableField("identifying")
|
||||
private String identifying;
|
||||
|
||||
/**
|
||||
* 关联id
|
||||
*/
|
||||
@TableField("relevance_id")
|
||||
private String relevanceId;
|
||||
|
||||
/**
|
||||
* 审核意见
|
||||
*/
|
||||
@TableField("audi_opinion")
|
||||
private String audiOpinion;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@TableField("add_time")
|
||||
private Date addTime;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@TableField("add_user")
|
||||
private Integer addUser;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private String addUserName;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@TableField("update_time")
|
||||
private Date updateTime;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@TableField("update_user")
|
||||
private Integer updateUser;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@TableField("memo")
|
||||
private String memo;
|
||||
|
||||
/**
|
||||
* 1同意 2驳回
|
||||
*/
|
||||
@TableField("status")
|
||||
private String status;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,80 @@
|
|||
package com.hcsq.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||
import java.util.Date;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* - 综治-信访类型表
|
||||
*
|
||||
|
||||
*/
|
||||
@Data
|
||||
@TableName("manage_visits_type")
|
||||
public class ManageVisitsType extends Model<ManageVisitsType> {
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@TableId(value="id")
|
||||
private Integer id;
|
||||
|
||||
/**
|
||||
* 信访分类名称
|
||||
*/
|
||||
@TableField("visits_name")
|
||||
private String visitsName;
|
||||
|
||||
/**
|
||||
* 信访分类父id
|
||||
*/
|
||||
@TableField("pid")
|
||||
private Integer pid;
|
||||
|
||||
/**
|
||||
* 信访分类编码
|
||||
*/
|
||||
@TableField("visits_code")
|
||||
private String visitsCode;
|
||||
|
||||
/**
|
||||
* 信访分类排序
|
||||
*/
|
||||
@TableField("visits_sort")
|
||||
private String visitsSort;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@TableField("status")
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@TableField("update_time")
|
||||
private Date updateTime;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@TableField("update_user")
|
||||
private Integer updateUser;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@TableField("add_user")
|
||||
private Integer addUser;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@TableField("add_time")
|
||||
private Date addTime;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,66 @@
|
|||
package com.hcsq.entity;
|
||||
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
@Data
|
||||
public class ManageVisitsTypeTree {
|
||||
|
||||
private List<ManageVisitsTypeTree> children;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private Integer id;
|
||||
|
||||
/**
|
||||
* 信访分类名称
|
||||
*/
|
||||
private String visitsName;
|
||||
|
||||
/**
|
||||
* 信访分类父id
|
||||
*/
|
||||
private Integer pid;
|
||||
|
||||
/**
|
||||
* 信访分类编码
|
||||
*/
|
||||
private String visitsCode;
|
||||
|
||||
/**
|
||||
* 信访分类排序
|
||||
*/
|
||||
private String visitsSort;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private Date updateTime;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private Integer updateUser;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private Integer addUser;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
|
||||
private Date addTime;
|
||||
public void addChildren(ManageVisitsTypeTree tree) {
|
||||
this.children.add(tree);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,214 @@
|
|||
package com.hcsq.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import lombok.Data;
|
||||
import com.hcsq.vo.DataVO;
|
||||
/**
|
||||
* - 党建-党组织表
|
||||
*
|
||||
|
||||
*/
|
||||
@Data
|
||||
@TableName("party")
|
||||
public class Party extends Model<Party> {
|
||||
|
||||
/*
|
||||
{"title": "党组织ID", "key": "id"},
|
||||
{"title": "", "key": "pid"},
|
||||
{"title": "党组织名称", "key": "partyName"},
|
||||
{"title": "书记", "key": "partyManager"},
|
||||
{"title": "党组织管理员", "key": "partyAdmins"},
|
||||
{"title": "委员", "key": "partyCommittee"},
|
||||
{"title": "党组织风采(图片)", "key": "partyPropagate"},
|
||||
{"title": "党组织头像", "key": "partyAvatar"},
|
||||
{"title": "党组织分级 关联code表", "key": "partyLevel"},
|
||||
{"title": "党组织坐标", "key": "partyMap"},
|
||||
{"title": "党组织简介", "key": "partyAbstract"},
|
||||
{"title": "党组织缩写(四字)", "key": "partyAcronym"},
|
||||
{"title": "党组织账号", "key": "partyUser"},
|
||||
{"title": "党组织荣耀", "key": "partyHonor"},
|
||||
{"title": "党组织密码", "key": "partyPassword"},
|
||||
{"title": "", "key": "areaId"},
|
||||
{"title": "编号", "key": "extend"},
|
||||
{"title": "", "key": "addUser"},
|
||||
{"title": "", "key": "updateUser"},
|
||||
{"title": "", "key": "status"},
|
||||
{"title": "", "key": "updateTime"},
|
||||
{"title": "", "key": "addTime"},
|
||||
{"title": "", "key": "memo"},
|
||||
{"title": "党组织帮扶信息", "key": "supportInformation"},
|
||||
*/
|
||||
|
||||
/**
|
||||
* 党组织ID
|
||||
*/
|
||||
@TableId(value="id", type= IdType.AUTO)
|
||||
private Integer id;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@TableField("pid")
|
||||
private Integer pid;
|
||||
|
||||
/**
|
||||
* 党组织名称
|
||||
*/
|
||||
@TableField("party_name")
|
||||
private String partyName;
|
||||
|
||||
/**
|
||||
* 书记
|
||||
*/
|
||||
@TableField("party_manager")
|
||||
private String partyManager;
|
||||
|
||||
/**
|
||||
* 党组织管理员
|
||||
*/
|
||||
@TableField("party_admins")
|
||||
private String partyAdmins;
|
||||
|
||||
/**
|
||||
* 委员
|
||||
*/
|
||||
@TableField("party_committee")
|
||||
private String partyCommittee;
|
||||
|
||||
/**
|
||||
* 党组织风采(图片)
|
||||
*/
|
||||
@TableField("party_propagate")
|
||||
private String partyPropagate;
|
||||
|
||||
/**
|
||||
* 党组织头像
|
||||
*/
|
||||
@TableField("party_avatar")
|
||||
private String partyAvatar;
|
||||
|
||||
/**
|
||||
* 党组织分级 关联code表
|
||||
*/
|
||||
@TableField("party_level")
|
||||
private String partyLevel;
|
||||
|
||||
/**
|
||||
* 党组织坐标
|
||||
*/
|
||||
@TableField("party_map")
|
||||
private String partyMap;
|
||||
|
||||
/**
|
||||
* 党组织简介
|
||||
*/
|
||||
@TableField("party_abstract")
|
||||
private String partyAbstract;
|
||||
|
||||
/**
|
||||
* 党组织缩写(四字)
|
||||
*/
|
||||
@TableField("party_acronym")
|
||||
private String partyAcronym;
|
||||
|
||||
/**
|
||||
* 党组织账号
|
||||
*/
|
||||
@TableField("party_user")
|
||||
private String partyUser;
|
||||
|
||||
/**
|
||||
* 党组织荣耀
|
||||
*/
|
||||
@TableField("party_honor")
|
||||
private String partyHonor;
|
||||
|
||||
/**
|
||||
* 党组织密码
|
||||
*/
|
||||
@TableField("party_password")
|
||||
private String partyPassword;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@TableField("area_id")
|
||||
private Integer areaId;
|
||||
|
||||
/**
|
||||
* 编号
|
||||
*/
|
||||
@TableField("extend")
|
||||
private String extend;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@TableField("add_user")
|
||||
private String addUser;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@TableField("update_user")
|
||||
private Integer updateUser;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@TableField("status")
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@TableField("update_time")
|
||||
private Date updateTime;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@TableField("add_time")
|
||||
private Date addTime;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@TableField("memo")
|
||||
private String memo;
|
||||
|
||||
/**
|
||||
* 党组织帮扶信息
|
||||
*/
|
||||
@TableField("support_information")
|
||||
private String supportInformation;
|
||||
|
||||
@TableField(exist = false)
|
||||
private int partyCommunistNum;
|
||||
@TableField(exist = false)
|
||||
private int meetingNum;
|
||||
@TableField(exist = false)
|
||||
private int monthMeetingNum;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String partyManagerName;
|
||||
@TableField(exist = false)
|
||||
private String partyHonorName;
|
||||
@TableField(exist = false)
|
||||
private String partyLevelName;
|
||||
@TableField(exist = false)
|
||||
private List<DataVO> adminList;
|
||||
@TableField(exist = false)
|
||||
private List<DataVO> committeeList;
|
||||
|
||||
@TableField(exist = false)
|
||||
private DataVO manager;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,68 @@
|
|||
package com.hcsq.entity;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelIgnore;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 事件-事件表
|
||||
* </p>
|
||||
*
|
||||
|
||||
|
||||
*/
|
||||
@Data
|
||||
public class PartyCommunistImport extends Model<PartyCommunistImport> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ExcelProperty("姓名*")
|
||||
private String name;
|
||||
|
||||
@TableField("idcard_no")
|
||||
@ExcelProperty("身份证号*")
|
||||
private String idcardNo;
|
||||
|
||||
@ExcelProperty("性别*")
|
||||
private String sex;
|
||||
|
||||
@ExcelProperty("所属组织*")
|
||||
private String partyName;
|
||||
|
||||
@ExcelProperty("正式入党时间*")
|
||||
private String regulardate;
|
||||
|
||||
@ExcelProperty("出生日期")
|
||||
private String birthDate;
|
||||
|
||||
@ExcelProperty("民族")
|
||||
private String nation;
|
||||
|
||||
@ExcelProperty("联系电话")
|
||||
private String mobile;
|
||||
|
||||
@TableField("communist_no")
|
||||
@ExcelProperty("党员编号")
|
||||
private String communistNo;
|
||||
|
||||
@ExcelProperty("党内职务")
|
||||
private String dutyName;
|
||||
|
||||
@ExcelProperty("党员标签")
|
||||
private String labelName;
|
||||
|
||||
@ExcelProperty("党员荣誉")
|
||||
private String honorName;
|
||||
|
||||
|
||||
@ExcelProperty("党员状态")
|
||||
private String communistStatusName;
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,57 @@
|
|||
package com.hcsq.entity;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelIgnore;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 事件-事件表
|
||||
* </p>
|
||||
*
|
||||
|
||||
|
||||
*/
|
||||
@Data
|
||||
public class PartyDuesImport extends Model<PartyDuesImport> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 应缴月份
|
||||
*/
|
||||
@ExcelProperty("应缴月份*")
|
||||
@TableField("dues_month")
|
||||
private String duesMonth;
|
||||
/**
|
||||
* 缴纳人员
|
||||
*/
|
||||
@TableField("idcard_no")
|
||||
@ExcelProperty("缴纳人员*")
|
||||
private String idcardNo;
|
||||
|
||||
@TableField("dues_amount")
|
||||
@ExcelProperty("党费金额*")
|
||||
private BigDecimal duesAmount;
|
||||
|
||||
/**
|
||||
* 缴纳日期
|
||||
*/
|
||||
@TableField("dues_time")
|
||||
@ExcelProperty("缴纳日期*")
|
||||
private Date duesTime;
|
||||
|
||||
@TableField("status")
|
||||
@ExcelProperty("状态*")
|
||||
private Integer status;
|
||||
|
||||
@TableField("memo")
|
||||
@ExcelProperty("备注")
|
||||
private String memo;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,158 @@
|
|||
package com.hcsq.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
*
|
||||
* </p>
|
||||
*
|
||||
|
||||
|
||||
*/
|
||||
@Data
|
||||
@TableName("permission")
|
||||
public class Permission implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
|
||||
/**
|
||||
* 资源名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 类型 0代表菜单 1代表功能
|
||||
*/
|
||||
private String type;
|
||||
|
||||
/**
|
||||
* 用于区分菜单(gm:后台菜单 bigdata:大数据菜单 guidepage:引导页菜单 people:居民通菜单)
|
||||
*/
|
||||
@TableField("group_code")
|
||||
private String groupCode;
|
||||
|
||||
/**
|
||||
* 编码
|
||||
*/
|
||||
@TableField("function_code")
|
||||
private String functionCode;
|
||||
|
||||
/**
|
||||
* 前端url
|
||||
*/
|
||||
private String path;
|
||||
|
||||
/**
|
||||
* 按钮权限资源标识
|
||||
*/
|
||||
private String permission;
|
||||
|
||||
/**
|
||||
* 颜色
|
||||
*/
|
||||
private String color;
|
||||
|
||||
/**
|
||||
* 父资源id
|
||||
*/
|
||||
@TableField("parent_id")
|
||||
private Integer parentId;
|
||||
|
||||
/**
|
||||
* 图标
|
||||
*/
|
||||
private String icon;
|
||||
|
||||
/**
|
||||
* 组件路径
|
||||
*/
|
||||
private String component;
|
||||
|
||||
/**
|
||||
* 排序权重
|
||||
*/
|
||||
private Integer sort;
|
||||
|
||||
|
||||
/**
|
||||
* 后台请求url
|
||||
*/
|
||||
private String url;
|
||||
|
||||
|
||||
/**
|
||||
* 请求方式
|
||||
*/
|
||||
private String method;
|
||||
|
||||
/**
|
||||
* 新 组件路径
|
||||
*/
|
||||
@TableField("file_path")
|
||||
private String filePath;
|
||||
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
@TableField("add_user")
|
||||
private String addUser;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@TableField("add_time")
|
||||
private Date addTime;
|
||||
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
@TableField("update_time")
|
||||
private Date updateTime;
|
||||
/**
|
||||
* 修改人
|
||||
*/
|
||||
@TableField("update_user")
|
||||
private String updateUser;
|
||||
|
||||
/**
|
||||
* 状态 (0为停用,1为启用,2为删除,默认值为1)
|
||||
*/
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 跳转类型(0.跳转新页面、1.跳转内页)
|
||||
*/
|
||||
@TableField("url_type")
|
||||
private Integer urlType;
|
||||
|
||||
private String photo;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private String redirect;
|
||||
@TableField(exist = false)
|
||||
private List<Permission> children;
|
||||
/**
|
||||
* 最后一级
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private Integer end;
|
||||
}
|
||||
|
|
@ -0,0 +1,103 @@
|
|||
package com.hcsq.entity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Title: SysResourceTree
|
||||
* @Description: 菜单树
|
||||
|
||||
* @date: 2019/8/20 11:03
|
||||
*/
|
||||
@Data
|
||||
public class PermissionTree {
|
||||
|
||||
/**
|
||||
* 子节点
|
||||
*/
|
||||
private List<PermissionTree> children;
|
||||
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
private Integer id;
|
||||
|
||||
/**
|
||||
* 资源名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 资源类型 0-菜单 1-按钮
|
||||
*/
|
||||
private String type;
|
||||
|
||||
/**
|
||||
* 前端url
|
||||
*/
|
||||
private String path;
|
||||
|
||||
/**
|
||||
* 按钮权限资源标识
|
||||
*/
|
||||
private String permission;
|
||||
|
||||
/**
|
||||
* 颜色
|
||||
*/
|
||||
private String color;
|
||||
|
||||
/**
|
||||
* 父资源id
|
||||
*/
|
||||
private Integer parentId;
|
||||
|
||||
/**
|
||||
* 图标
|
||||
*/
|
||||
private String icon;
|
||||
|
||||
/**
|
||||
* 组件路径
|
||||
*/
|
||||
private String component;
|
||||
|
||||
/**
|
||||
* 排序权重
|
||||
*/
|
||||
private Integer sort;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private LocalDateTime createTime;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
private LocalDateTime modifyTime;
|
||||
|
||||
/**
|
||||
* 是否删除 1-删除,0-未删除
|
||||
*/
|
||||
private String delFlag;
|
||||
|
||||
/**
|
||||
* 后台请求url
|
||||
*/
|
||||
private String url;
|
||||
|
||||
|
||||
/**
|
||||
* 请求方式
|
||||
*/
|
||||
private String method;
|
||||
|
||||
public void addChildren(PermissionTree tree) {
|
||||
this.children.add(tree);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,106 @@
|
|||
package com.hcsq.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.Min;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
*
|
||||
* </p>
|
||||
*
|
||||
|
||||
|
||||
*/
|
||||
@Data
|
||||
@TableName("role")
|
||||
public class Role implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
@Min(value = 0,message = "数据格式有误")
|
||||
private Integer id;
|
||||
|
||||
private String name;
|
||||
|
||||
@TableField(exist = false)
|
||||
private List<Permission> permissionList;
|
||||
/**
|
||||
* 所属部门
|
||||
*/
|
||||
@TableField("dept_ids")
|
||||
private String deptIds;
|
||||
|
||||
/**
|
||||
* 所属部门
|
||||
*/
|
||||
@TableField("dept_names")
|
||||
private String deptNames;
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
@TableField("created_user")
|
||||
private String createdUser;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@TableField("created_time")
|
||||
private Date createdTime;
|
||||
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
@TableField("updated_time")
|
||||
private Date updatedTime;
|
||||
/**
|
||||
* 修改人
|
||||
*/
|
||||
@TableField("updated_user")
|
||||
private String updatedUser;
|
||||
|
||||
@TableField("deleted_user")
|
||||
private String deletedUser;
|
||||
|
||||
@TableField("deleted_time")
|
||||
private Date deletedTime;
|
||||
|
||||
private Integer deleted;
|
||||
|
||||
/**
|
||||
* 角色类型(1.党建后台,2.群众,3.智慧街道,4智慧大厅,5部门人员)
|
||||
*/
|
||||
@TableField("role_type")
|
||||
private Integer roleType;
|
||||
|
||||
/**
|
||||
* 状态(1正常,2隐藏)
|
||||
*/
|
||||
@TableField("status")
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@TableField("memo")
|
||||
private String memo;
|
||||
|
||||
/**
|
||||
* 全局角色(智慧平桥:1.是,2.不是)
|
||||
*/
|
||||
@TableField("role_all")
|
||||
private Integer roleAll;
|
||||
|
||||
/**
|
||||
* 角色编码
|
||||
*/
|
||||
@TableField("role_code")
|
||||
private String roleCode;
|
||||
}
|
||||
|
|
@ -0,0 +1,63 @@
|
|||
package com.hcsq.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
*
|
||||
* </p>
|
||||
*
|
||||
|
||||
|
||||
*/
|
||||
@Data
|
||||
@TableName("role_permission")
|
||||
public class RolePermission implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
|
||||
private Integer roleid;
|
||||
|
||||
private Integer permissionid;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
@TableField("created_user")
|
||||
private String createdUser;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@TableField("created_time")
|
||||
private Date createdTime;
|
||||
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
@TableField("updated_time")
|
||||
private Date updatedTime;
|
||||
/**
|
||||
* 修改人
|
||||
*/
|
||||
@TableField("updated_user")
|
||||
private String updatedUser;
|
||||
|
||||
@TableField("deleted_user")
|
||||
private String deletedUser;
|
||||
|
||||
@TableField("deleted_time")
|
||||
private Date deletedTime;
|
||||
|
||||
private Integer deleted;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,166 @@
|
|||
package com.hcsq.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||
import java.util.Date;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* - 城管-部件管理
|
||||
*
|
||||
|
||||
*/
|
||||
@Data
|
||||
@TableName("urban_attachments")
|
||||
public class UrbanAttachments extends Model<UrbanAttachments> {
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId(value="id", type= IdType.AUTO)
|
||||
private Integer id;
|
||||
|
||||
/**
|
||||
* 编号
|
||||
*/
|
||||
@TableField("attachments_no")
|
||||
private String attachmentsNo;
|
||||
|
||||
/**
|
||||
* 所属网格
|
||||
*/
|
||||
@TableField("area_id")
|
||||
private Integer areaId;
|
||||
@TableField(exist = false)
|
||||
private String areaName;
|
||||
/**
|
||||
* 物品名称
|
||||
*/
|
||||
@TableField("item_name")
|
||||
private String itemName;
|
||||
|
||||
/**
|
||||
* 地图标注
|
||||
*/
|
||||
@TableField("map_tagging")
|
||||
private String mapTagging;
|
||||
|
||||
/**
|
||||
* 添加人
|
||||
*/
|
||||
@TableField("add_user")
|
||||
private Integer addUser;
|
||||
|
||||
/**
|
||||
* 更新人
|
||||
*/
|
||||
@TableField("update_user")
|
||||
private Integer updateUser;
|
||||
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
@TableField("status")
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@TableField("update_time")
|
||||
private Date updateTime;
|
||||
|
||||
/**
|
||||
* 添加时间
|
||||
*/
|
||||
@TableField("add_time")
|
||||
private Date addTime;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@TableField("memo")
|
||||
private String memo;
|
||||
|
||||
/**
|
||||
* 部件类型
|
||||
*/
|
||||
@TableField("attachments_type")
|
||||
private String attachmentsType;
|
||||
|
||||
/**
|
||||
* 上传图片
|
||||
*/
|
||||
@TableField("picture")
|
||||
private String picture;
|
||||
|
||||
/**
|
||||
* 简介
|
||||
*/
|
||||
@TableField("summary")
|
||||
private String summary;
|
||||
|
||||
/**
|
||||
* AppKey
|
||||
*/
|
||||
@TableField("appKey")
|
||||
private String appKey;
|
||||
|
||||
/**
|
||||
* Secret
|
||||
*/
|
||||
@TableField("secret")
|
||||
private String secret;
|
||||
|
||||
/**
|
||||
* 设备序列号
|
||||
*/
|
||||
@TableField("attNo")
|
||||
private String attNo;
|
||||
|
||||
/**
|
||||
* 国际移动设备识别码_井盖
|
||||
*/
|
||||
@TableField("IMEI_fixed")
|
||||
private String imeiFixed;
|
||||
|
||||
/**
|
||||
* 监控点编号(通用编号)
|
||||
*/
|
||||
@TableField("monitoring_point_number")
|
||||
private String monitoringPointNumber;
|
||||
|
||||
/**
|
||||
* 国际移动设备识别码_垃圾桶
|
||||
*/
|
||||
@TableField("IMEI_trash")
|
||||
private String imeiTrash;
|
||||
|
||||
/**
|
||||
* 相机的类型1枪机2球机
|
||||
*/
|
||||
@TableField("camera_type")
|
||||
private Integer cameraType;
|
||||
|
||||
/**
|
||||
* 中文地理位置
|
||||
*/
|
||||
@TableField("map_tagging_str")
|
||||
private String mapTaggingStr;
|
||||
|
||||
/**
|
||||
* 父级资源(门禁设备)编号;
|
||||
注释:海康平台门禁架构,门禁设备下级是门禁点。
|
||||
|
||||
*/
|
||||
@TableField("door_parentIndexCode")
|
||||
private String doorParentindexcode;
|
||||
|
||||
/**
|
||||
* 关键字 (前端查询传参使用)
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private String keyWord;
|
||||
}
|
||||
|
|
@ -0,0 +1,148 @@
|
|||
package com.hcsq.entity;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelIgnore;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.Min;
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
*
|
||||
* </p>
|
||||
*
|
||||
|
||||
|
||||
*/
|
||||
@Data
|
||||
@TableName("sys_user")
|
||||
public class User implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
@Min(value = 0,message = "数据格式有误")
|
||||
private Integer id;
|
||||
|
||||
@TableField("user_name")
|
||||
private String userName;
|
||||
@TableField(exist = false)
|
||||
private String name;
|
||||
|
||||
@TableField("user_nickname")
|
||||
private String userNickname;
|
||||
|
||||
@TableField("user_pwd")
|
||||
private String userPwd;
|
||||
|
||||
@ExcelIgnore
|
||||
private String salt;
|
||||
|
||||
@TableField("user_role")
|
||||
private String userRole;
|
||||
|
||||
@TableField("user_relation_no")
|
||||
private String userRelationNo;
|
||||
|
||||
@TableField("user_validity")
|
||||
private Date userValidity;
|
||||
|
||||
@TableField("user_relation_type")
|
||||
private String userRelationType;
|
||||
|
||||
@TableField("last_login_time")
|
||||
private Date lastLoginTime;
|
||||
|
||||
@TableField("add_user")
|
||||
private Integer addUser;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@ExcelIgnore
|
||||
@TableField("add_time")
|
||||
private Date addTime;
|
||||
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
@ExcelIgnore
|
||||
@TableField("update_time")
|
||||
private Date updateTime;
|
||||
/**
|
||||
* 修改人
|
||||
*/
|
||||
@ExcelIgnore
|
||||
@TableField("update_user")
|
||||
private Integer updateUser;
|
||||
|
||||
@TableField("status")
|
||||
private Integer status;
|
||||
|
||||
@TableField("regcode_warn_time")
|
||||
private Date regcodeWarnTime;
|
||||
|
||||
@TableField("memo")
|
||||
private String memo;
|
||||
@TableField("openid")
|
||||
private String openid;
|
||||
|
||||
@TableField("score_value")
|
||||
private BigDecimal scoreValue;
|
||||
|
||||
@TableField("suser_id")
|
||||
private String suserId;
|
||||
@TableField("token")
|
||||
private String token;
|
||||
@TableField("is_realname")
|
||||
private String isRealname;
|
||||
|
||||
@TableField("is_people")
|
||||
private boolean isPeople;
|
||||
|
||||
@TableField("qw_user_id")
|
||||
private String qwUserId;
|
||||
|
||||
@ExcelIgnore
|
||||
@TableField(exist = false)
|
||||
private List<Role> roleList;
|
||||
|
||||
@ExcelIgnore
|
||||
@TableField(exist = false)
|
||||
private List<Permission> permissionList;
|
||||
|
||||
@ExcelIgnore
|
||||
@TableField(exist = false)
|
||||
private String roleName;
|
||||
|
||||
|
||||
@ExcelIgnore
|
||||
@TableField(exist = false)
|
||||
private List<Integer> roleId;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String staffName;
|
||||
|
||||
@ExcelIgnore
|
||||
@TableField(exist = false)
|
||||
private String mobile;
|
||||
/**
|
||||
* 身份证
|
||||
*/
|
||||
@ExcelIgnore
|
||||
@TableField(exist = false)
|
||||
private String staffIdnumber;
|
||||
/**
|
||||
* 部门
|
||||
*/
|
||||
@ExcelIgnore
|
||||
@TableField(exist = false)
|
||||
private String staffDeptNo;
|
||||
}
|
||||
|
|
@ -0,0 +1,203 @@
|
|||
package com.hcsq.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||
import java.util.Date;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* - 工作-文章表
|
||||
*
|
||||
|
||||
*/
|
||||
@Data
|
||||
@TableName("work_article")
|
||||
public class WorkArticle extends Model<WorkArticle> {
|
||||
|
||||
/**
|
||||
* 文字ID
|
||||
*/
|
||||
@TableId(value="id", type= IdType.AUTO)
|
||||
private Integer id;
|
||||
|
||||
/**
|
||||
* 所属网格
|
||||
*/
|
||||
@TableField("area_id")
|
||||
private Integer areaId;
|
||||
|
||||
/**
|
||||
* 文章分类id
|
||||
*/
|
||||
@TableField("article_cat")
|
||||
private Integer articleCat;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String articleCatName;
|
||||
|
||||
/**
|
||||
* 文章模型id
|
||||
*/
|
||||
@TableField("article_model")
|
||||
private Integer articleModel;
|
||||
|
||||
/**
|
||||
* 文章标题
|
||||
*/
|
||||
@TableField("article_title")
|
||||
private String articleTitle;
|
||||
|
||||
/**
|
||||
* 关键词
|
||||
*/
|
||||
@TableField("article_keyword")
|
||||
private String articleKeyword;
|
||||
|
||||
/**
|
||||
* 描述
|
||||
*/
|
||||
@TableField("article_description")
|
||||
private String articleDescription;
|
||||
|
||||
/**
|
||||
* 链接地址
|
||||
*/
|
||||
@TableField("article_exturl")
|
||||
private String articleExturl;
|
||||
|
||||
/**
|
||||
* 文章内容
|
||||
*/
|
||||
@TableField("article_content")
|
||||
private String articleContent;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@TableField("article_flag")
|
||||
private String articleFlag;
|
||||
|
||||
/**
|
||||
* 缩略图
|
||||
*/
|
||||
@TableField("article_thumb")
|
||||
private String articleThumb;
|
||||
|
||||
/**
|
||||
* 自定义文件名
|
||||
*/
|
||||
@TableField("article_filename")
|
||||
private String articleFilename;
|
||||
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
@TableField("article_order")
|
||||
private Integer articleOrder;
|
||||
|
||||
/**
|
||||
* 文章_图片
|
||||
*/
|
||||
@TableField("article_img")
|
||||
private String articleImg;
|
||||
|
||||
/**
|
||||
* 存储json
|
||||
*/
|
||||
@TableField("setting")
|
||||
private String setting;
|
||||
|
||||
/**
|
||||
* 附件
|
||||
*/
|
||||
@TableField("article_attach")
|
||||
private String articleAttach;
|
||||
|
||||
/**
|
||||
* 是否审核过(0:待审核;1:通过;2:驳回;3:废弃)
|
||||
*/
|
||||
@TableField("article_audit")
|
||||
private Integer articleAudit;
|
||||
@TableField(exist = false)
|
||||
private String articleAuditStr;
|
||||
|
||||
/**
|
||||
* 审核人(关联communist表)
|
||||
*/
|
||||
@TableField("article_audit_communist")
|
||||
private String articleAuditCommunist;
|
||||
|
||||
/**
|
||||
* 审核意见
|
||||
*/
|
||||
@TableField("article_audit_content")
|
||||
private String articleAuditContent;
|
||||
|
||||
/**
|
||||
* 审核时间
|
||||
*/
|
||||
@TableField("article_audit_time")
|
||||
private Date articleAuditTime;
|
||||
|
||||
/**
|
||||
* 文稿人员编号(关联communist表)作者
|
||||
*/
|
||||
@TableField("communist_no")
|
||||
private String communistNo;
|
||||
|
||||
/**
|
||||
* 文稿部门编号(关联party表)
|
||||
*/
|
||||
@TableField("party_no")
|
||||
private String partyNo;
|
||||
|
||||
/**
|
||||
* 添加时间
|
||||
*/
|
||||
@TableField("add_time")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8")
|
||||
private Date addTime;
|
||||
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
@TableField("update_time")
|
||||
private Date updateTime;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@TableField("add_user")
|
||||
private Integer addUser;
|
||||
@TableField("update_user")
|
||||
private Integer updateUser;
|
||||
/**
|
||||
* 状态1正常 2删除
|
||||
*/
|
||||
@TableField("status")
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@TableField("memo")
|
||||
private String memo;
|
||||
|
||||
/**
|
||||
* 项目类别(gm为街道大厅)
|
||||
*/
|
||||
@TableField("project_type")
|
||||
private String projectType;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String addUserName;
|
||||
@TableField(exist = false)
|
||||
private String startTime;
|
||||
@TableField(exist = false)
|
||||
private String endTime;
|
||||
}
|
||||
|
|
@ -0,0 +1,88 @@
|
|||
package com.hcsq.entity;
|
||||
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class WorkArticleCategoryTree {
|
||||
|
||||
private List<WorkArticleCategoryTree> children;
|
||||
|
||||
/**
|
||||
* 分类ID
|
||||
*/
|
||||
private Integer id;
|
||||
|
||||
/**
|
||||
* 分类名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 所属父级id
|
||||
*/
|
||||
private Integer pid;
|
||||
|
||||
/**
|
||||
* 类型与文章的标识1为文章标题,2为标题并存在内容,0为禁止只是文章标题
|
||||
*/
|
||||
private Integer catType;
|
||||
|
||||
/**
|
||||
* 文章内容
|
||||
*/
|
||||
private String catContent;
|
||||
|
||||
/**
|
||||
* 文章标题
|
||||
*/
|
||||
private String catTitle;
|
||||
|
||||
/**
|
||||
* 关键字
|
||||
*/
|
||||
private String catKeywords;
|
||||
|
||||
/**
|
||||
* 文章描述
|
||||
*/
|
||||
private String catDescription;
|
||||
|
||||
/**
|
||||
* 文章栏目编码
|
||||
*/
|
||||
private String catCode;
|
||||
|
||||
/**
|
||||
* 项目类别(1为党建 gm为网格综治大厅)
|
||||
*/
|
||||
private String projectType;
|
||||
|
||||
/**
|
||||
* 图片
|
||||
*/
|
||||
private String catImg;
|
||||
|
||||
/**
|
||||
* 状态0停用1启用2删除4为隐藏
|
||||
*/
|
||||
private Integer status;
|
||||
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String memo;
|
||||
|
||||
public void addChildren(WorkArticleCategoryTree tree) {
|
||||
this.children.add(tree);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,147 @@
|
|||
package com.hcsq.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* - 工作-部门(组织结构)表
|
||||
*
|
||||
|
||||
*/
|
||||
@Data
|
||||
@TableName("work_dept")
|
||||
public class WorkDept extends Model<WorkDept> {
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@TableId(value="id", type= IdType.AUTO)
|
||||
private Integer id;
|
||||
|
||||
/**
|
||||
* 部门编号
|
||||
*/
|
||||
@TableField("dept_no")
|
||||
private String deptNo;
|
||||
|
||||
/**
|
||||
* 部门名称
|
||||
*/
|
||||
@TableField("dept_name")
|
||||
private String deptName;
|
||||
|
||||
/**
|
||||
* 上级部门
|
||||
*/
|
||||
@TableField("dept_pno")
|
||||
private String deptPno;
|
||||
|
||||
/**
|
||||
* 上级部门名称
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private String deptPname;
|
||||
|
||||
/**
|
||||
* 类型
|
||||
*/
|
||||
@TableField("dept_type")
|
||||
private String deptType;
|
||||
|
||||
/**
|
||||
* 部门主管
|
||||
*/
|
||||
@TableField("dept_manager")
|
||||
private String deptManager;
|
||||
|
||||
/**
|
||||
* 组成(单位:综治中心)
|
||||
*/
|
||||
@TableField("dept_comprise")
|
||||
private String deptComprise;
|
||||
|
||||
/**
|
||||
* 所在地(综治中心)
|
||||
*/
|
||||
@TableField("dept_area")
|
||||
private String deptArea;
|
||||
|
||||
/**
|
||||
* 所在地详细地址
|
||||
*/
|
||||
@TableField("dept_addr")
|
||||
private String deptAddr;
|
||||
|
||||
/**
|
||||
* 添加人
|
||||
*/
|
||||
@TableField("add_user")
|
||||
private Integer addUser;
|
||||
|
||||
/**
|
||||
* 修改人
|
||||
*/
|
||||
@TableField("update_user")
|
||||
private Integer updateUser;
|
||||
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
@TableField("status")
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
@TableField("update_time")
|
||||
private Date updateTime;
|
||||
|
||||
/**
|
||||
* 添加时间
|
||||
*/
|
||||
@TableField("add_time")
|
||||
private Date addTime;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@TableField("memo")
|
||||
private String memo;
|
||||
|
||||
/**
|
||||
* 部门层级(综治)
|
||||
*/
|
||||
@TableField("dept_level")
|
||||
private String deptLevel;
|
||||
|
||||
/**
|
||||
* 部门联系方式(综治中心)
|
||||
*/
|
||||
@TableField("dept_phone")
|
||||
private String deptPhone;
|
||||
|
||||
/**
|
||||
* 位置
|
||||
*/
|
||||
@TableField("dept_record")
|
||||
private String deptRecord;
|
||||
|
||||
/**
|
||||
* 能否为部门工作人员分配账号
|
||||
*/
|
||||
@TableField("allot")
|
||||
private String allot;
|
||||
|
||||
/**
|
||||
* 主要联系人
|
||||
*/
|
||||
@TableField("dept_linkman")
|
||||
private String deptLinkman;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,101 @@
|
|||
package com.hcsq.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* - 工作-积分历程表
|
||||
*
|
||||
* @author hcsq
|
||||
*/
|
||||
@Data
|
||||
@TableName("work_integral_flow")
|
||||
public class WorkIntegralFlow extends Model<WorkIntegralFlow> {
|
||||
|
||||
/*
|
||||
{"title": "", "key": "id"},
|
||||
{"title": "来源方法", "key": "integralMethods"},
|
||||
{"title": "分值项编码", "key": "integralScoreCore"},
|
||||
{"title": "分值", "key": "integralValue"},
|
||||
{"title": "符号(+-)", "key": "integralSymbol"},
|
||||
{"title": "说明", "key": "integralInstructions"},
|
||||
{"title": "", "key": "addUser"},
|
||||
{"title": "", "key": "addTime"},
|
||||
{"title": "", "key": "updateUser"},
|
||||
{"title": "", "key": "updateTime"},
|
||||
{"title": "", "key": "memo"},
|
||||
*/
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@TableId(value="id", type= IdType.AUTO)
|
||||
private Integer id;
|
||||
|
||||
/**
|
||||
* 来源方法
|
||||
*/
|
||||
@TableField("integral_methods")
|
||||
private String integralMethods;
|
||||
|
||||
/**
|
||||
* 分值项编码
|
||||
*/
|
||||
@TableField("integral_score_core")
|
||||
private String integralScoreCore;
|
||||
|
||||
/**
|
||||
* 分值
|
||||
*/
|
||||
@TableField("integral_value")
|
||||
private BigDecimal integralValue;
|
||||
|
||||
/**
|
||||
* 符号(+-)
|
||||
*/
|
||||
@TableField("integral_symbol")
|
||||
private String integralSymbol;
|
||||
|
||||
/**
|
||||
* 说明
|
||||
*/
|
||||
@TableField("integral_instructions")
|
||||
private String integralInstructions;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@TableField("add_user")
|
||||
private Integer addUser;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@TableField("add_time")
|
||||
private Date addTime;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@TableField("update_user")
|
||||
private Integer updateUser;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@TableField("update_time")
|
||||
private Date updateTime;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@TableField("memo")
|
||||
private String memo;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,108 @@
|
|||
package com.hcsq.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* - 工作-积分项表
|
||||
*
|
||||
* @author hcsq
|
||||
*/
|
||||
@Data
|
||||
@TableName("work_score")
|
||||
public class WorkScore extends Model<WorkScore> {
|
||||
|
||||
/*
|
||||
{"title": "积分项id", "key": "id"},
|
||||
{"title": "积分项名", "key": "scoreName"},
|
||||
{"title": "积分项父id", "key": "pid"},
|
||||
{"title": "积分项编码", "key": "scoreCode"},
|
||||
{"title": "积分项分值", "key": "scoreValue"},
|
||||
{"title": "加减符号(+-)", "key": "scoreSymbol"},
|
||||
{"title": "是否开启(1开启,0停用)", "key": "status"},
|
||||
{"title": "更新时间", "key": "updateTime"},
|
||||
{"title": "更新人", "key": "updateUser"},
|
||||
{"title": "添加人", "key": "addUser"},
|
||||
{"title": "添加时间", "key": "addTime"},
|
||||
{"title": "备注", "key": "memo"},
|
||||
*/
|
||||
|
||||
/**
|
||||
* 积分项id
|
||||
*/
|
||||
@TableId(value="id", type= IdType.AUTO)
|
||||
private Integer id;
|
||||
|
||||
/**
|
||||
* 积分项名
|
||||
*/
|
||||
@TableField("score_name")
|
||||
private String scoreName;
|
||||
|
||||
/**
|
||||
* 积分项父id
|
||||
*/
|
||||
@TableField("pid")
|
||||
private Integer pid;
|
||||
|
||||
/**
|
||||
* 积分项编码
|
||||
*/
|
||||
@TableField("score_code")
|
||||
private String scoreCode;
|
||||
|
||||
/**
|
||||
* 积分项分值
|
||||
*/
|
||||
@TableField("score_value")
|
||||
private BigDecimal scoreValue;
|
||||
|
||||
/**
|
||||
* 加减符号(+-)
|
||||
*/
|
||||
@TableField("score_symbol")
|
||||
private String scoreSymbol;
|
||||
|
||||
/**
|
||||
* 是否开启(1开启,0停用)
|
||||
*/
|
||||
@TableField("status")
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@TableField("update_time")
|
||||
private Date updateTime;
|
||||
|
||||
/**
|
||||
* 更新人
|
||||
*/
|
||||
@TableField("update_user")
|
||||
private Integer updateUser;
|
||||
|
||||
/**
|
||||
* 添加人
|
||||
*/
|
||||
@TableField("add_user")
|
||||
private Integer addUser;
|
||||
|
||||
/**
|
||||
* 添加时间
|
||||
*/
|
||||
@TableField("add_time")
|
||||
private Date addTime;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@TableField("memo")
|
||||
private String memo;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,551 @@
|
|||
package com.hcsq.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||
import lombok.Data;
|
||||
import lombok.NonNull;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* - 工作-员工表
|
||||
*
|
||||
|
||||
*/
|
||||
@Data
|
||||
@TableName("work_staff")
|
||||
public class WorkStaff extends Model<WorkStaff> {
|
||||
|
||||
/**
|
||||
* 自增id
|
||||
*/
|
||||
@TableId(value="id", type= IdType.AUTO)
|
||||
private Integer id;
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private Integer userId;
|
||||
/**
|
||||
* 工号
|
||||
*/
|
||||
@TableField("staff_no")
|
||||
private String staffNo;
|
||||
|
||||
/**
|
||||
* 招聘时岗位
|
||||
*/
|
||||
@TableField("recruit_no")
|
||||
private String recruitNo;
|
||||
|
||||
/**
|
||||
* 试用协议合同号
|
||||
*/
|
||||
@TableField("trialcontract_no")
|
||||
private String trialcontractNo;
|
||||
|
||||
/**
|
||||
* 正式合同编号
|
||||
*/
|
||||
@TableField("contract_no")
|
||||
private String contractNo;
|
||||
|
||||
/**
|
||||
* 姓名
|
||||
*/
|
||||
@TableField("staff_name")
|
||||
private String staffName;
|
||||
|
||||
/**
|
||||
* 部门 存dept_no
|
||||
*/
|
||||
@TableField("staff_dept_no")
|
||||
private String staffDeptNo;
|
||||
|
||||
/**
|
||||
* 职位
|
||||
*/
|
||||
@TableField("staff_post_no")
|
||||
private String staffPostNo;
|
||||
|
||||
/**
|
||||
* 头像
|
||||
*/
|
||||
@TableField("staff_avatar")
|
||||
private String staffAvatar;
|
||||
|
||||
/**
|
||||
* 性别 1男 0女
|
||||
*/
|
||||
@TableField("staff_sex")
|
||||
private String staffSex;
|
||||
|
||||
/**
|
||||
* 生日
|
||||
*/
|
||||
@TableField("staff_birthday")
|
||||
private String staffBirthday;
|
||||
|
||||
/**
|
||||
* 农历
|
||||
*/
|
||||
@TableField("staff_islunar")
|
||||
private String staffIslunar;
|
||||
|
||||
/**
|
||||
* 闰月
|
||||
*/
|
||||
@TableField("staff_leapmonth")
|
||||
private String staffLeapmonth;
|
||||
|
||||
/**
|
||||
* 学历
|
||||
*/
|
||||
@TableField("staff_diploma")
|
||||
private String staffDiploma;
|
||||
|
||||
/**
|
||||
* 在职教育
|
||||
*/
|
||||
@TableField("staff_jobedu")
|
||||
private String staffJobedu;
|
||||
|
||||
/**
|
||||
* 全日制教育
|
||||
*/
|
||||
@TableField("staff_fulledu")
|
||||
private String staffFulledu;
|
||||
|
||||
/**
|
||||
* 院校/专业
|
||||
*/
|
||||
@TableField("staff_school")
|
||||
private String staffSchool;
|
||||
|
||||
/**
|
||||
* 专业
|
||||
*/
|
||||
@TableField("staff_specialty")
|
||||
private String staffSpecialty;
|
||||
|
||||
/**
|
||||
* 民族
|
||||
*/
|
||||
@TableField("staff_nation")
|
||||
private String staffNation;
|
||||
|
||||
/**
|
||||
* 政治面貌
|
||||
*/
|
||||
@TableField("staff_political_status")
|
||||
private String staffPoliticalStatus;
|
||||
|
||||
/**
|
||||
* 身份证
|
||||
*/
|
||||
@NotNull
|
||||
@TableField("staff_idnumber")
|
||||
private String staffIdnumber;
|
||||
|
||||
/**
|
||||
* 电话
|
||||
*/
|
||||
@TableField("staff_tel")
|
||||
private String staffTel;
|
||||
|
||||
/**
|
||||
* 手机号
|
||||
*/
|
||||
@TableField("staff_mobile")
|
||||
private String staffMobile;
|
||||
|
||||
/**
|
||||
* 邮箱
|
||||
*/
|
||||
@TableField("staff_email")
|
||||
private String staffEmail;
|
||||
|
||||
/**
|
||||
* QQ
|
||||
*/
|
||||
@TableField("staff_qq")
|
||||
private String staffQq;
|
||||
|
||||
/**
|
||||
* msn
|
||||
*/
|
||||
@TableField("staff_msn")
|
||||
private String staffMsn;
|
||||
|
||||
/**
|
||||
* 主页
|
||||
*/
|
||||
@TableField("staff_homepage")
|
||||
private String staffHomepage;
|
||||
|
||||
/**
|
||||
* 博客
|
||||
*/
|
||||
@TableField("staff_blog")
|
||||
private String staffBlog;
|
||||
|
||||
/**
|
||||
* 出生地
|
||||
*/
|
||||
@TableField("staff_address")
|
||||
private String staffAddress;
|
||||
|
||||
/**
|
||||
* 家庭住址
|
||||
*/
|
||||
@TableField("staff_home")
|
||||
private String staffHome;
|
||||
|
||||
/**
|
||||
* 籍贯
|
||||
*/
|
||||
@TableField("staff_paddress")
|
||||
private String staffPaddress;
|
||||
|
||||
/**
|
||||
* 联系人1
|
||||
*/
|
||||
@TableField("staff_contact1")
|
||||
private String staffContact1;
|
||||
|
||||
/**
|
||||
* 联系人1与本人关系
|
||||
*/
|
||||
@TableField("staff_relationship1")
|
||||
private String staffRelationship1;
|
||||
|
||||
/**
|
||||
* 联系人1电话
|
||||
*/
|
||||
@TableField("staff_ctel1")
|
||||
private String staffCtel1;
|
||||
|
||||
/**
|
||||
* 联系人1手机
|
||||
*/
|
||||
@TableField("staff_cmobil1")
|
||||
private String staffCmobil1;
|
||||
|
||||
/**
|
||||
* 联系人1地址
|
||||
*/
|
||||
@TableField("staff_caddress1")
|
||||
private String staffCaddress1;
|
||||
|
||||
/**
|
||||
* 联系人2
|
||||
*/
|
||||
@TableField("staff_contact2")
|
||||
private String staffContact2;
|
||||
|
||||
/**
|
||||
* 与本人关系
|
||||
*/
|
||||
@TableField("staff_relationship2")
|
||||
private String staffRelationship2;
|
||||
|
||||
/**
|
||||
* 联系人2电话
|
||||
*/
|
||||
@TableField("staff_ctel2")
|
||||
private String staffCtel2;
|
||||
|
||||
/**
|
||||
* 联系人2手机
|
||||
*/
|
||||
@TableField("staff_cmobil2")
|
||||
private String staffCmobil2;
|
||||
|
||||
/**
|
||||
* 联系人2地址
|
||||
*/
|
||||
@TableField("staff_caddress2")
|
||||
private String staffCaddress2;
|
||||
|
||||
/**
|
||||
* 开户行名称
|
||||
*/
|
||||
@TableField("staff_bank")
|
||||
private String staffBank;
|
||||
|
||||
/**
|
||||
* 开户名
|
||||
*/
|
||||
@TableField("staff_bankname")
|
||||
private String staffBankname;
|
||||
|
||||
/**
|
||||
* 职称(级别)
|
||||
*/
|
||||
@TableField("staff_level")
|
||||
private String staffLevel;
|
||||
|
||||
/**
|
||||
* 技术/职务
|
||||
*/
|
||||
@TableField("staff_duties")
|
||||
private String staffDuties;
|
||||
|
||||
/**
|
||||
* 账号
|
||||
*/
|
||||
@TableField("staff_bankaccount_no")
|
||||
private String staffBankaccountNo;
|
||||
|
||||
/**
|
||||
* gov-党费
|
||||
*/
|
||||
@TableField("staff_fee")
|
||||
private String staffFee;
|
||||
|
||||
/**
|
||||
* 录入日期
|
||||
*/
|
||||
@TableField("staff_into_date")
|
||||
private String staffIntoDate;
|
||||
|
||||
/**
|
||||
* 社会关系json
|
||||
*/
|
||||
@TableField("setting_social")
|
||||
private String settingSocial;
|
||||
|
||||
/**
|
||||
* 学习工作json
|
||||
*/
|
||||
@TableField("setting_work")
|
||||
private String settingWork;
|
||||
|
||||
/**
|
||||
* 用户使用机型 Android / iOS
|
||||
*/
|
||||
@TableField("system_type")
|
||||
private String systemType;
|
||||
|
||||
/**
|
||||
* 隐藏通讯录中的个人资料(0:显示 1:隐藏)
|
||||
*/
|
||||
@TableField("is_hide")
|
||||
private String isHide;
|
||||
|
||||
/**
|
||||
* 融云ID
|
||||
*/
|
||||
@TableField("rong_id")
|
||||
private String rongId;
|
||||
|
||||
/**
|
||||
* 虚拟网号码
|
||||
*/
|
||||
@TableField("staff_vlan")
|
||||
private String staffVlan;
|
||||
|
||||
/**
|
||||
* 其他联系方式
|
||||
*/
|
||||
@TableField("other")
|
||||
private String other;
|
||||
|
||||
/**
|
||||
* 工作时间
|
||||
*/
|
||||
@TableField("staff_entrytime")
|
||||
private String staffEntrytime;
|
||||
|
||||
/**
|
||||
* 转正日期
|
||||
*/
|
||||
@TableField("staff_positivetime")
|
||||
private String staffPositivetime;
|
||||
|
||||
/**
|
||||
* 个人资质
|
||||
*/
|
||||
@TableField("staff_qualification")
|
||||
private String staffQualification;
|
||||
|
||||
/**
|
||||
* 资质附件
|
||||
*/
|
||||
@TableField("staff_attachid")
|
||||
private String staffAttachid;
|
||||
|
||||
/**
|
||||
* 毕业时间
|
||||
*/
|
||||
@TableField("staff_graduationdate")
|
||||
private String staffGraduationdate;
|
||||
|
||||
/**
|
||||
* 是否转岗交接
|
||||
*/
|
||||
@TableField("is_post")
|
||||
private String isPost;
|
||||
|
||||
/**
|
||||
* 是否晋升交接
|
||||
*/
|
||||
@TableField("is_promotion")
|
||||
private String isPromotion;
|
||||
|
||||
/**
|
||||
* 健康状态
|
||||
*/
|
||||
@TableField("staff_health")
|
||||
private String staffHealth;
|
||||
|
||||
/**
|
||||
* 婚姻状况
|
||||
*/
|
||||
@TableField("staff_marriage")
|
||||
private String staffMarriage;
|
||||
|
||||
/**
|
||||
* 入党时间
|
||||
*/
|
||||
@TableField("staff_party")
|
||||
private String staffParty;
|
||||
|
||||
/**
|
||||
* 编制类型
|
||||
*/
|
||||
@TableField("staff_compile")
|
||||
private String staffCompile;
|
||||
|
||||
/**
|
||||
* 分管工作
|
||||
*/
|
||||
@TableField("staff_work")
|
||||
private String staffWork;
|
||||
|
||||
/**
|
||||
* 职务
|
||||
*/
|
||||
@TableField("staff_position")
|
||||
private String staffPosition;
|
||||
|
||||
/**
|
||||
* 在职状态
|
||||
*/
|
||||
@TableField("staff_state")
|
||||
private String staffState;
|
||||
|
||||
/**
|
||||
* 任职时间
|
||||
*/
|
||||
@TableField("staff_work_time")
|
||||
private String staffWorkTime;
|
||||
|
||||
/**
|
||||
* 人大代表
|
||||
*/
|
||||
@TableField("staff_congress")
|
||||
private String staffCongress;
|
||||
|
||||
/**
|
||||
* 政协委员
|
||||
*/
|
||||
@TableField("staff_conference")
|
||||
private String staffConference;
|
||||
|
||||
/**
|
||||
* 出国(境)情况
|
||||
*/
|
||||
@TableField("staff_abroad")
|
||||
private String staffAbroad;
|
||||
|
||||
/**
|
||||
* 重大事项
|
||||
*/
|
||||
@TableField("staff_key")
|
||||
private String staffKey;
|
||||
|
||||
/**
|
||||
* 0 离职 1在职 2非员工
|
||||
*/
|
||||
@TableField("status")
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 添加人
|
||||
*/
|
||||
@TableField("add_user")
|
||||
private Integer addUser;
|
||||
|
||||
/**
|
||||
* 添加时间
|
||||
*/
|
||||
@TableField("add_time")
|
||||
private Date addTime;
|
||||
|
||||
/**
|
||||
* 修改人
|
||||
*/
|
||||
@TableField("update_user")
|
||||
private Integer updateUser;
|
||||
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
@TableField("update_time")
|
||||
private Date updateTime;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@TableField("memo")
|
||||
private String memo;
|
||||
|
||||
/**
|
||||
* 是否扶贫干部(1是;2否)
|
||||
*/
|
||||
@TableField("is_poverty")
|
||||
private Integer isPoverty;
|
||||
|
||||
/**
|
||||
* 扶贫地域
|
||||
*/
|
||||
@TableField("poverty_area")
|
||||
private String povertyArea;
|
||||
|
||||
/**
|
||||
* 企业微信成员UserID
|
||||
*/
|
||||
@TableField("qw_user_id")
|
||||
private String qwUserId;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String manageArea;
|
||||
|
||||
//添加 用户
|
||||
@TableField(exist = false)
|
||||
private Boolean add;
|
||||
|
||||
@TableField(exist = false)
|
||||
private Integer roleId;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String userName;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String userPwd;
|
||||
|
||||
@TableField(exist = false)
|
||||
private Date userValidity;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String userMemo;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String roleName;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,51 @@
|
|||
package com.hcsq.enums;
|
||||
|
||||
/**
|
||||
|
||||
* @date: 2022/11/23 08:22
|
||||
*/
|
||||
public enum BuildingTypeEnum {
|
||||
|
||||
REPORT("住房", 1),
|
||||
CONFIRM("办公楼", 2),
|
||||
ASSIGNMENT("工厂", 3),
|
||||
RECEIVE("公园/景点", 4),
|
||||
HANDLE("公共设施", 5),
|
||||
VERIFY("政府机关", 6),
|
||||
EVALUATE("停车场", 7),
|
||||
WAITFINISH("其他", 99);
|
||||
|
||||
private String desc;
|
||||
private int code;
|
||||
|
||||
BuildingTypeEnum(String desc, int code) {
|
||||
this.desc = desc;
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public static BuildingTypeEnum getDescByCode(int code) {
|
||||
BuildingTypeEnum[] typeEnums = values();
|
||||
for (BuildingTypeEnum value : typeEnums) {
|
||||
if (code == value.getCode()) {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public String getDesc() {
|
||||
return desc;
|
||||
}
|
||||
|
||||
public void setDesc(String desc) {
|
||||
this.desc = desc;
|
||||
}
|
||||
|
||||
public int getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public void setCode(int code) {
|
||||
this.code = code;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
package com.hcsq.enums;
|
||||
|
||||
/**
|
||||
* @Title: DataStatusEnum
|
||||
* @Description: 用户状态枚举
|
||||
|
||||
* @date: 2019/8/20 10:51
|
||||
*/
|
||||
public enum DataStatusEnum {
|
||||
|
||||
NORMAL("0", "正常"),
|
||||
LOCK("1","删除");
|
||||
|
||||
|
||||
private String code;
|
||||
|
||||
private String message;
|
||||
|
||||
DataStatusEnum(String code, String message) {
|
||||
this.code = code;
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public String getMessage() {
|
||||
return message;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,55 @@
|
|||
package com.hcsq.enums;
|
||||
|
||||
/**
|
||||
|
||||
* @date: 2022/11/23 08:22
|
||||
*/
|
||||
public enum EventNodeEnum {
|
||||
|
||||
REPORT("", 1),
|
||||
CONFIRM("待确认", 2),
|
||||
ASSIGNMENT("待派遣", 3),
|
||||
RECEIVE("待接收", 4),
|
||||
HANDLE("待处理", 5),
|
||||
VERIFY("待核查", 6),
|
||||
EVALUATE("待评价", 7),
|
||||
WAITFINISH("待完结", 8),
|
||||
MEN("已完结", 9),
|
||||
APPLYEXTENSION("待延期审核", 10),
|
||||
ABORT("已中止", 11),
|
||||
BACK("已退回",12);
|
||||
|
||||
private String desc;
|
||||
private int code;
|
||||
|
||||
EventNodeEnum(String desc, int code) {
|
||||
this.desc = desc;
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public static EventNodeEnum getDescByCode(int code) {
|
||||
EventNodeEnum[] typeEnums = values();
|
||||
for (EventNodeEnum value : typeEnums) {
|
||||
if (code == value.getCode()) {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public String getDesc() {
|
||||
return desc;
|
||||
}
|
||||
|
||||
public void setDesc(String desc) {
|
||||
this.desc = desc;
|
||||
}
|
||||
|
||||
public int getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public void setCode(int code) {
|
||||
this.code = code;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,45 @@
|
|||
package com.hcsq.enums;
|
||||
|
||||
/**
|
||||
|
||||
* @date: 2022/11/23 08:22
|
||||
*/
|
||||
public enum EventTemplateEnum {
|
||||
|
||||
INTERIOR("内部", 1),
|
||||
CENTER("中心", 2);
|
||||
|
||||
private String desc;
|
||||
private int code;
|
||||
|
||||
EventTemplateEnum(String desc, int code) {
|
||||
this.desc = desc;
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public static EventTemplateEnum getDescByCode(int code) {
|
||||
EventTemplateEnum[] typeEnums = values();
|
||||
for (EventTemplateEnum value : typeEnums) {
|
||||
if (code == value.getCode()) {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public String getDesc() {
|
||||
return desc;
|
||||
}
|
||||
|
||||
public void setDesc(String desc) {
|
||||
this.desc = desc;
|
||||
}
|
||||
|
||||
public int getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public void setCode(int code) {
|
||||
this.code = code;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,42 @@
|
|||
package com.hcsq.enums;
|
||||
|
||||
/**
|
||||
|
||||
*/
|
||||
public enum OperateLogTypeEnum {
|
||||
|
||||
POST("新增", 1),
|
||||
PUT("修改",2),
|
||||
DELETE("删除",3),
|
||||
LOGIN("登录",4),
|
||||
LOGOUT("退出",5);
|
||||
|
||||
private String method;
|
||||
|
||||
private Integer type;
|
||||
|
||||
OperateLogTypeEnum(String method, Integer type) {
|
||||
this.method = method;
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public static String getByMethod(Integer type) {
|
||||
|
||||
for (OperateLogTypeEnum requestMethodEnum : values()) {
|
||||
|
||||
if (requestMethodEnum.getType().equals(type)){
|
||||
|
||||
return requestMethodEnum.getMethod();
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public String getMethod() {
|
||||
return method;
|
||||
}
|
||||
|
||||
public Integer getType() {
|
||||
return type;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,47 @@
|
|||
package com.hcsq.enums;
|
||||
|
||||
/**
|
||||
|
||||
* @date: 2022/11/23 08:22
|
||||
*/
|
||||
public enum RegisterTypeEnum {
|
||||
|
||||
NO_COUNTRY("非农家庭户口", 2),
|
||||
COUNTRY("农业家庭户口", 3),
|
||||
NO_COLLECT("非农集体户口", 4),
|
||||
COLLECT("农业集体户口", 5);
|
||||
|
||||
private String desc;
|
||||
private int code;
|
||||
|
||||
RegisterTypeEnum(String desc, int code) {
|
||||
this.desc = desc;
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public static RegisterTypeEnum getByCode(int code) {
|
||||
RegisterTypeEnum[] typeEnums = values();
|
||||
for (RegisterTypeEnum value : typeEnums) {
|
||||
if (code == value.getCode()) {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public String getDesc() {
|
||||
return desc;
|
||||
}
|
||||
|
||||
public void setDesc(String desc) {
|
||||
this.desc = desc;
|
||||
}
|
||||
|
||||
public int getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public void setCode(int code) {
|
||||
this.code = code;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,53 @@
|
|||
package com.hcsq.enums;
|
||||
|
||||
/**
|
||||
|
||||
*/
|
||||
public enum RelationshipEnum {
|
||||
|
||||
REPORT("本人", 1),
|
||||
CONFIRM("配偶", 2),
|
||||
ASSIGNMENT("子女", 3),
|
||||
RECEIVE("父母", 4),
|
||||
HANDLE("岳父母或公婆", 5),
|
||||
VERIFY("媳婿", 6),
|
||||
EVALUATE("孙子女", 7),
|
||||
WAITFINISH("兄弟姐妹", 8),
|
||||
MEN("祖父母", 9),
|
||||
APPLYEXTENSION("租赁", 10),
|
||||
ABORT("其他", 11);
|
||||
|
||||
private String desc;
|
||||
private int code;
|
||||
|
||||
RelationshipEnum(String desc, int code) {
|
||||
this.desc = desc;
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public static RelationshipEnum getDescByCode(int code) {
|
||||
RelationshipEnum[] typeEnums = values();
|
||||
for (RelationshipEnum value : typeEnums) {
|
||||
if (code == value.getCode()) {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public String getDesc() {
|
||||
return desc;
|
||||
}
|
||||
|
||||
public void setDesc(String desc) {
|
||||
this.desc = desc;
|
||||
}
|
||||
|
||||
public int getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public void setCode(int code) {
|
||||
this.code = code;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,41 @@
|
|||
package com.hcsq.enums;
|
||||
|
||||
/**
|
||||
|
||||
*/
|
||||
public enum RequestMethodEnum {
|
||||
|
||||
POST("POST", 0),
|
||||
GET("GET",1),
|
||||
PUT("PUT",2),
|
||||
DELETE("DELETE",3);
|
||||
|
||||
private String method;
|
||||
|
||||
private Integer type;
|
||||
|
||||
RequestMethodEnum(String method, Integer type) {
|
||||
this.method = method;
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public static RequestMethodEnum getByMethod(String code) {
|
||||
|
||||
for (RequestMethodEnum requestMethodEnum : values()) {
|
||||
|
||||
if (requestMethodEnum.getMethod().equals(code)){
|
||||
|
||||
return requestMethodEnum;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public String getMethod() {
|
||||
return method;
|
||||
}
|
||||
|
||||
public Integer getType() {
|
||||
return type;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
package com.hcsq.enums;
|
||||
|
||||
/**
|
||||
* @Title: ResourceTypeEnum
|
||||
* @Description: 菜单类型枚举
|
||||
|
||||
* @date: 2019/8/20 10:51
|
||||
*/
|
||||
public enum ResourceTypeEnum {
|
||||
MENU("0", "菜单"),
|
||||
BUTTON("1","按钮");
|
||||
|
||||
|
||||
private String code;
|
||||
|
||||
private String message;
|
||||
|
||||
ResourceTypeEnum(String code, String message) {
|
||||
this.code = code;
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public String getMessage() {
|
||||
return message;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,56 @@
|
|||
package com.hcsq.enums;
|
||||
|
||||
/**
|
||||
* Created on 18-6-29 上午10:15.
|
||||
* 作者: shirenyu
|
||||
* 说明:
|
||||
*/
|
||||
public enum ResultENum {
|
||||
|
||||
|
||||
UNKNOW_ERROR(-1,"未知错误"),
|
||||
|
||||
LoginDeath(10025,"用户登录超时"),
|
||||
ACCESS_ERROR(10026,"无删除权限"),
|
||||
ID_DOES_NOT_EXIST_ERROR(10027,"id不存在"),
|
||||
SUCCESS(0,"成功"),
|
||||
NON_EXISTED_USER_ERROR(10050,"用户名不存在或已禁用"),
|
||||
EXISTED_USER_ERROR(10051,"用户名已存在"),
|
||||
XISTED_ROLE_ERROR(10052,"角色名已存在"),
|
||||
USER_DELETE_ERROR(10053,"用户已删除,请勿重复操作"),
|
||||
NOT_LOGIN_ERROR(10054,"未登录"),
|
||||
DEPT_DELETE_ERROR(10055,"该部门不能删除"),
|
||||
NO_DEPT_ERROR(10056,"该用户没有部门"),
|
||||
UNNORMAL_CODE(10070,"数据异常"),
|
||||
EMPTY_CODE(10071,"数据不能为空"),
|
||||
DATA_ALREADY_EXISTS(10083,"数据已存在"),
|
||||
NAME_ALREADY_EXISTS(10084,"该名称已存在"),
|
||||
DATA_EMPTY_ERROR(10082,"数据为空或不存在"),
|
||||
AUDIT_ERROR(10090,"审核失败"),
|
||||
AUDIT_PERMISSION_ERROR(10090,"无审核权限"),
|
||||
UPDATE_ERROR(10091,"编辑失败"),
|
||||
UPDATE_PERMISSION_ERROR(10092,"无编辑权限"),
|
||||
PARAM_ERROR(10095,"传递参数报错"),
|
||||
NO_RESULT_ERROR(100303, "缺失返回数据"),
|
||||
NO_IMPORT_AUTH_ERROR(100403,"无导入权限"),
|
||||
NO_EXPORT_AUTH_ERROR(100404,"无导出权限"),
|
||||
LIST_PERMISSION_ERROR(110403,"无查看列表权限"),
|
||||
ADD_PERMISSION_ERROR(110404,"无添加权限"),
|
||||
SAVE_ERROR(100413,"保存失败,请重试"),
|
||||
DATA_REGISTER_NO_ALREADY_EXISTS(100415,"户号或该房屋或该户主已存在户籍信息"),
|
||||
ADD_USER_IMAGE_ERROR(100414,"上传用户照片失败");
|
||||
private Integer code;
|
||||
private String msg;
|
||||
ResultENum(Integer code, String msg){
|
||||
this.code = code;
|
||||
this.msg = msg;
|
||||
}
|
||||
|
||||
public Integer getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public String getMsg() {
|
||||
return msg;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,45 @@
|
|||
package com.hcsq.enums;
|
||||
|
||||
/**
|
||||
|
||||
* @date: 2022/11/23 08:22
|
||||
*/
|
||||
public enum SexEnum {
|
||||
|
||||
MEN("男", 1),
|
||||
WOMAN("女",2);
|
||||
|
||||
private String desc;
|
||||
private int code;
|
||||
|
||||
SexEnum(String desc, int code) {
|
||||
this.desc = desc;
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public static SexEnum getDescByCode(int code) {
|
||||
SexEnum[] typeEnums = values();
|
||||
for (SexEnum value : typeEnums) {
|
||||
if (code == value.getCode()) {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public String getDesc() {
|
||||
return desc;
|
||||
}
|
||||
|
||||
public void setDesc(String desc) {
|
||||
this.desc = desc;
|
||||
}
|
||||
|
||||
public int getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public void setCode(int code) {
|
||||
this.code = code;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,51 @@
|
|||
package com.hcsq.enums;
|
||||
|
||||
/**
|
||||
|
||||
* @date: 2022/11/23 08:22
|
||||
*/
|
||||
public enum WorkEnum {
|
||||
|
||||
NOT_START("未开始", 30),
|
||||
IN_PROGRESS("正在进行", 21),
|
||||
UNAPPROVED("未审核", 11),
|
||||
STOPPED("已经中止", 51),
|
||||
REJECT("已经驳回", 52),
|
||||
DELAY("申请延期", 71),
|
||||
DENY("驳回申请延期", 72),
|
||||
FINISHED("已完成", 61);
|
||||
|
||||
private String desc;
|
||||
private int code;
|
||||
|
||||
WorkEnum(String desc, int code) {
|
||||
this.desc = desc;
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public static WorkEnum getDescByCode(int code) {
|
||||
WorkEnum[] typeEnums = values();
|
||||
for (WorkEnum value : typeEnums) {
|
||||
if (code == value.getCode()) {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public String getDesc() {
|
||||
return desc;
|
||||
}
|
||||
|
||||
public void setDesc(String desc) {
|
||||
this.desc = desc;
|
||||
}
|
||||
|
||||
public int getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public void setCode(int code) {
|
||||
this.code = code;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,57 @@
|
|||
package com.hcsq.manager;
|
||||
|
||||
import java.util.TimerTask;
|
||||
import java.util.concurrent.ScheduledExecutorService;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import com.hcsq.util.SpringUtils;
|
||||
import com.hcsq.util.Threads;
|
||||
|
||||
|
||||
/**
|
||||
* 异步任务管理器
|
||||
*
|
||||
* @author lym
|
||||
*/
|
||||
public class AsyncManager
|
||||
{
|
||||
/**
|
||||
* 操作延迟10毫秒
|
||||
*/
|
||||
private final int OPERATE_DELAY_TIME = 10;
|
||||
|
||||
/**
|
||||
* 异步操作任务调度线程池
|
||||
*/
|
||||
private ScheduledExecutorService executor = SpringUtils.getBean("scheduledExecutorService");
|
||||
|
||||
/**
|
||||
* 单例模式
|
||||
*/
|
||||
private AsyncManager(){}
|
||||
|
||||
private static AsyncManager me = new AsyncManager();
|
||||
|
||||
public static AsyncManager me()
|
||||
{
|
||||
return me;
|
||||
}
|
||||
|
||||
/**
|
||||
* 执行任务
|
||||
*
|
||||
* @param task 任务
|
||||
*/
|
||||
public void execute(TimerTask task)
|
||||
{
|
||||
executor.schedule(task, OPERATE_DELAY_TIME, TimeUnit.MILLISECONDS);
|
||||
}
|
||||
|
||||
/**
|
||||
* 停止任务线程池
|
||||
*/
|
||||
public void shutdown()
|
||||
{
|
||||
Threads.shutdownAndAwaitTermination(executor);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
package com.hcsq.manager;
|
||||
|
||||
import java.lang.annotation.*;
|
||||
|
||||
@Target({ ElementType.PARAMETER, ElementType.METHOD,ElementType.TYPE })
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Documented
|
||||
public @interface Point {
|
||||
public String scoreName() default "";
|
||||
public String scoreCode() default "";
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,139 @@
|
|||
package com.hcsq.manager;
|
||||
|
||||
import com.auth0.jwt.JWT;
|
||||
import com.auth0.jwt.JWTVerifier;
|
||||
import com.auth0.jwt.algorithms.Algorithm;
|
||||
import com.auth0.jwt.exceptions.JWTVerificationException;
|
||||
import com.auth0.jwt.interfaces.Claim;
|
||||
import com.auth0.jwt.interfaces.DecodedJWT;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.hcsq.entity.GridPeople;
|
||||
import com.hcsq.entity.User;
|
||||
import com.hcsq.entity.WorkIntegralFlow;
|
||||
import com.hcsq.enums.ResultENum;
|
||||
import com.hcsq.manager.factory.AsyncFactory;
|
||||
import com.hcsq.service.GridPeopleService;
|
||||
import com.hcsq.service.WorkIntegralFlowService;
|
||||
import com.hcsq.util.JWTUtil;
|
||||
import com.hcsq.util.ResultUtil;
|
||||
import com.hcsq.util.SpringUtils;
|
||||
import org.aspectj.lang.JoinPoint;
|
||||
import org.aspectj.lang.Signature;
|
||||
import org.aspectj.lang.annotation.AfterReturning;
|
||||
import org.aspectj.lang.annotation.Aspect;
|
||||
import org.aspectj.lang.annotation.Pointcut;
|
||||
import org.aspectj.lang.reflect.MethodSignature;
|
||||
import org.springframework.context.annotation.EnableAspectJAutoProxy;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.web.context.request.RequestContextHolder;
|
||||
import org.springframework.web.context.request.ServletRequestAttributes;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.Date;
|
||||
import java.util.Map;
|
||||
|
||||
@Aspect
|
||||
@Component
|
||||
@EnableAspectJAutoProxy
|
||||
public class PointAop {
|
||||
|
||||
// 配置织入点
|
||||
@Pointcut("@annotation(com.hcsq.manager.Point)")
|
||||
public void pointPointCut()
|
||||
{
|
||||
}
|
||||
/**
|
||||
* 处理完请求后执行
|
||||
*
|
||||
* @param joinPoint 切点
|
||||
*/
|
||||
@AfterReturning(pointcut = "pointPointCut()", returning = "jsonResult")
|
||||
public void doAfterReturning(JoinPoint joinPoint, Object jsonResult)
|
||||
{
|
||||
handlePoint(joinPoint, null);
|
||||
}
|
||||
protected void handlePoint(final JoinPoint joinPoint, final Exception e)
|
||||
{
|
||||
try
|
||||
{
|
||||
// 获得注解
|
||||
Point controllerPoint = getAnnotationPoint(joinPoint);
|
||||
if (controllerPoint == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
// 获取当前的用户
|
||||
ServletRequestAttributes attributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
|
||||
HttpServletRequest request = attributes.getRequest();
|
||||
|
||||
User user = JWTUtil.getUser(request.getHeader("token"));
|
||||
if(user==null){
|
||||
String token = request.getHeader("wx-token");
|
||||
Integer userId = verifyTokenAndGetUserId(token);
|
||||
if(userId!=null){
|
||||
final GridPeople gridPeople = SpringUtils.getBean(GridPeopleService.class).getById(userId);
|
||||
if(gridPeople!=null){
|
||||
user = SpringUtils.getBean(WorkIntegralFlowService.class).getUserByIdcardNo(gridPeople.getIdcardNo());
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
WorkIntegralFlow flow=new WorkIntegralFlow();
|
||||
|
||||
|
||||
|
||||
// 设置方法名称
|
||||
if(user!=null) {
|
||||
String className = joinPoint.getTarget().getClass().getName();
|
||||
String methodName = joinPoint.getSignature().getName();
|
||||
flow.setIntegralMethods(className + "." + methodName);
|
||||
flow.setAddTime(new Date());
|
||||
flow.setAddUser(user.getId());
|
||||
flow.setIntegralScoreCore(controllerPoint.scoreCode());
|
||||
// 处理设置注解上的参数
|
||||
// 保存数据库
|
||||
AsyncManager.me().execute(AsyncFactory.recordUserPoint(flow));
|
||||
}
|
||||
}
|
||||
catch (Exception exp)
|
||||
{
|
||||
exp.printStackTrace();
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 是否存在注解,如果存在就获取
|
||||
*/
|
||||
private Point getAnnotationPoint(JoinPoint joinPoint) throws Exception
|
||||
{
|
||||
Signature signature = joinPoint.getSignature();
|
||||
MethodSignature methodSignature = (MethodSignature) signature;
|
||||
Method method = methodSignature.getMethod();
|
||||
|
||||
if (method != null)
|
||||
{
|
||||
return method.getAnnotation(Point.class);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
public Integer verifyTokenAndGetUserId(String token) {
|
||||
try {
|
||||
final String SECRET = "X-JMT-Token";
|
||||
|
||||
Algorithm algorithm = Algorithm.HMAC256(SECRET);
|
||||
JWTVerifier verifier = JWT.require(algorithm)
|
||||
//.withIssuer(ISSUSER)
|
||||
.build();
|
||||
DecodedJWT jwt = verifier.verify(token);
|
||||
Map<String, Claim> claims = jwt.getClaims();
|
||||
Claim claim = claims.get("userId");
|
||||
return claim.asInt();
|
||||
} catch (JWTVerificationException | UnsupportedEncodingException exception){
|
||||
//exception.printStackTrace();
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
package com.hcsq.manager;
|
||||
|
||||
import org.springframework.stereotype.Component;
|
||||
import javax.annotation.PreDestroy;
|
||||
|
||||
/**
|
||||
* 确保应用退出时能关闭后台线程
|
||||
*
|
||||
* @author lym
|
||||
*/
|
||||
@Component
|
||||
public class ShutdownManager
|
||||
{
|
||||
|
||||
@PreDestroy
|
||||
public void destroy()
|
||||
{
|
||||
shutdownAsyncManager();
|
||||
}
|
||||
|
||||
/**
|
||||
* 停止异步执行任务
|
||||
*/
|
||||
private void shutdownAsyncManager()
|
||||
{
|
||||
try
|
||||
{
|
||||
AsyncManager.me().shutdown();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,63 @@
|
|||
package com.hcsq.manager;
|
||||
|
||||
import java.util.concurrent.ScheduledExecutorService;
|
||||
import java.util.concurrent.ScheduledThreadPoolExecutor;
|
||||
import java.util.concurrent.ThreadPoolExecutor;
|
||||
|
||||
import com.hcsq.util.Threads;
|
||||
import org.apache.commons.lang3.concurrent.BasicThreadFactory;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
|
||||
|
||||
/**
|
||||
* 线程池配置
|
||||
*
|
||||
* @author lym
|
||||
**/
|
||||
@Configuration
|
||||
public class ThreadPoolConfig
|
||||
{
|
||||
// 核心线程池大小
|
||||
private int corePoolSize = 50;
|
||||
|
||||
// 最大可创建的线程数
|
||||
private int maxPoolSize = 200;
|
||||
|
||||
// 队列最大长度
|
||||
private int queueCapacity = 1000;
|
||||
|
||||
// 线程池维护线程所允许的空闲时间
|
||||
private int keepAliveSeconds = 300;
|
||||
|
||||
@Bean(name = "threadPoolTaskExecutor")
|
||||
public ThreadPoolTaskExecutor threadPoolTaskExecutor()
|
||||
{
|
||||
ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
|
||||
executor.setMaxPoolSize(maxPoolSize);
|
||||
executor.setCorePoolSize(corePoolSize);
|
||||
executor.setQueueCapacity(queueCapacity);
|
||||
executor.setKeepAliveSeconds(keepAliveSeconds);
|
||||
// 线程池对拒绝任务(无线程可用)的处理策略
|
||||
executor.setRejectedExecutionHandler(new ThreadPoolExecutor.CallerRunsPolicy());
|
||||
return executor;
|
||||
}
|
||||
|
||||
/**
|
||||
* 执行周期性或定时任务
|
||||
*/
|
||||
@Bean(name = "scheduledExecutorService")
|
||||
protected ScheduledExecutorService scheduledExecutorService()
|
||||
{
|
||||
return new ScheduledThreadPoolExecutor(corePoolSize,
|
||||
new BasicThreadFactory.Builder().namingPattern("schedule-pool-%d").daemon(true).build())
|
||||
{
|
||||
@Override
|
||||
protected void afterExecute(Runnable r, Throwable t)
|
||||
{
|
||||
super.afterExecute(r, t);
|
||||
Threads.printException(r, t);
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,49 @@
|
|||
package com.hcsq.manager.factory;
|
||||
|
||||
import java.util.TimerTask;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
|
||||
import com.hcsq.entity.WorkIntegralFlow;
|
||||
import com.hcsq.entity.WorkScore;
|
||||
import com.hcsq.service.WorkIntegralFlowService;
|
||||
import com.hcsq.service.WorkScoreService;
|
||||
import com.hcsq.util.SpringUtils;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 异步工厂(产生任务用)
|
||||
*
|
||||
* @author lym
|
||||
*/
|
||||
public class AsyncFactory
|
||||
{
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 保存用户记录积分
|
||||
*
|
||||
* @return 任务task
|
||||
*/
|
||||
public static TimerTask recordUserPoint(final WorkIntegralFlow workIntegralFlow)
|
||||
{
|
||||
return new TimerTask()
|
||||
{
|
||||
@Override
|
||||
public void run()
|
||||
{
|
||||
QueryWrapper<WorkScore> workScoreQueryWrapper=new QueryWrapper<>();
|
||||
workScoreQueryWrapper.lambda().eq(WorkScore::getScoreCode,workIntegralFlow.getIntegralScoreCore());
|
||||
workScoreQueryWrapper.last("limit 1");
|
||||
WorkScore workScore=SpringUtils.getBean(WorkScoreService.class).getOne(workScoreQueryWrapper);
|
||||
workIntegralFlow.setIntegralSymbol(workScore.getScoreSymbol());
|
||||
workIntegralFlow.setIntegralValue(workScore.getScoreValue());
|
||||
workIntegralFlow.setIntegralInstructions("添加一条"+workScore.getScoreName()+":"+workScore.getScoreSymbol()+workScore.getScoreValue());
|
||||
SpringUtils.getBean(WorkIntegralFlowService.class).save(workIntegralFlow);
|
||||
SpringUtils.getBean(WorkIntegralFlowService.class).updateUserScore(workIntegralFlow.getAddUser(),workScore.getScoreSymbol(),workScore.getScoreValue());
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
package com.hcsq.service;
|
||||
|
||||
import com.hcsq.entity.Event;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.hcsq.vo.BigData;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 事件-事件表 服务类
|
||||
* </p>
|
||||
*
|
||||
|
||||
|
||||
*/
|
||||
public interface EventService extends IService<Event> {
|
||||
|
||||
List<BigData> eventNodeGroup(Map<String, Object> map);
|
||||
|
||||
List<BigData> eventTypeGroup();
|
||||
|
||||
List<BigData> eventSourceGroup();
|
||||
|
||||
List<BigData> eventAppraiseGroup();
|
||||
|
||||
List<BigData> getCountBySixMonth();
|
||||
|
||||
List<BigData> evaluationScore();
|
||||
|
||||
List<BigData> eventMonthGroup();
|
||||
|
||||
String getJson();
|
||||
|
||||
Integer updateJson(String value);
|
||||
}
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
package com.hcsq.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.hcsq.entity.GridArea;
|
||||
import com.hcsq.entity.GridAreaTree;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 网格-网格管理表 服务类
|
||||
* </p>
|
||||
*
|
||||
|
||||
|
||||
*/
|
||||
public interface GridAreaService extends IService<GridArea> {
|
||||
|
||||
List<GridAreaTree> getTreeBy(Integer pid);
|
||||
|
||||
// 获取网格层级
|
||||
String getPGridArea(Integer areaId);
|
||||
|
||||
String getNewAreaId(Integer areaId);
|
||||
|
||||
Map<Integer,String> getPGridArea(Set<Integer> areaIds);
|
||||
|
||||
List<GridArea> findByAreaLeaderName(Map<String, Object> searchParams);
|
||||
|
||||
List<GridArea> findByAreaLeaderNameList(Map<String, Object> searchParams);
|
||||
|
||||
List<GridArea> findByAreaerName(Map<String, Object> searchParams);
|
||||
}
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
package com.hcsq.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.hcsq.entity.GridPeopleCardData;
|
||||
import com.hcsq.entity.User;
|
||||
import com.hcsq.util.Result;
|
||||
import com.hcsq.vo.BigData;
|
||||
import com.hcsq.vo.GridPeopleCardImportDTO;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 网格-人口卡片数据表 服务类
|
||||
* </p>
|
||||
*
|
||||
|
||||
|
||||
*/
|
||||
public interface GridPeopleCardDataService extends IService<GridPeopleCardData> {
|
||||
|
||||
IPage<GridPeopleCardData> pageList(IPage<GridPeopleCardData> page, Wrapper<GridPeopleCardData> queryWrapper);
|
||||
|
||||
Result importList(List<GridPeopleCardImportDTO> list, User user);
|
||||
|
||||
List<BigData> gridPeopleCardTypeGroup(Map<String, Object> searchParam);
|
||||
List<Map<String,Object>> countData(QueryWrapper<GridPeopleCardData> queryWrapper);
|
||||
|
||||
List<GridPeopleCardData> selectOldPeopleList(GridPeopleCardData gridPeopleCardData);
|
||||
long selectOldPeopleCount(GridPeopleCardData gridPeopleCardData);
|
||||
|
||||
List<GridPeopleCardData> gisData(QueryWrapper<GridPeopleCardData> dataQueryWrapper);
|
||||
List<BigData> gridPeopleCardTemplateCodeGroup(Map<String, Object> searchParam);
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,63 @@
|
|||
package com.hcsq.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.hcsq.entity.GridPeople;
|
||||
import com.hcsq.util.Result;
|
||||
import com.hcsq.vo.BigData;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 网格-人员基本信息表 服务类
|
||||
* </p>
|
||||
*
|
||||
|
||||
|
||||
*/
|
||||
public interface GridPeopleService extends IService<GridPeople> {
|
||||
|
||||
List<GridPeople> selectLivePeople(Map<String, Object> searchParam);
|
||||
|
||||
Integer selectLivePeopleCount(Map<String, Object> searchParam);
|
||||
|
||||
List<GridPeople> registerList(Map<String, Object> searchParam);
|
||||
|
||||
Integer registerListCount(Map<String, Object> searchParam);
|
||||
|
||||
Integer noRegisterListCount(Map<String, Object> searchParam);
|
||||
|
||||
Integer flowPeopleListCount(Map<String, Object> searchParam);
|
||||
|
||||
Integer lifePeopleCount(Map<String, Object> searchParam);
|
||||
List<GridPeople> noRegisterList(Map<String, Object> searchParam);
|
||||
|
||||
List<GridPeople> flowPeopleList(Map<String, Object> searchParam);
|
||||
|
||||
Integer lifePeoPleListCount(Map<String, Object> searchParam);
|
||||
|
||||
Integer lifePeoPleListCount1(Map<String, Object> searchParam);
|
||||
List<GridPeople> lifePeoPleList(Map<String, Object> searchParam);
|
||||
|
||||
List<GridPeople> lifePeoPleList1(Map<String, Object> searchParam);
|
||||
|
||||
Integer getPeoPleListCount(Map<String, Object> searchParam);
|
||||
List<GridPeople> getPeoPleList(Map<String, Object> searchParam);
|
||||
Result deletePeople(GridPeople people);
|
||||
List<BigData> gripPeopeTypeGroup();
|
||||
|
||||
List<BigData> gripPeopeOldAreaGroup();
|
||||
|
||||
List<BigData> gripPeopeServiceMonthGroup();
|
||||
|
||||
List<BigData> gripPeopeNationGroup();
|
||||
|
||||
List<BigData> gripPeopeMaritalGroup();
|
||||
|
||||
List<BigData> gripPeopeSexGroup();
|
||||
|
||||
List<BigData> gripPeopeAttributeGroup();
|
||||
|
||||
List<BigData> gripPeopeEducationGroup();
|
||||
}
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
package com.hcsq.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.hcsq.entity.LifeAudit;
|
||||
|
||||
/**
|
||||
* 政务-微志愿微心愿审核表 服务类
|
||||
*
|
||||
|
||||
*/
|
||||
public interface LifeAuditService extends IService<LifeAudit> {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
package com.hcsq.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.hcsq.entity.Party;
|
||||
import com.hcsq.vo.BigData;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 党建-党组织表 服务类
|
||||
*
|
||||
|
||||
*/
|
||||
public interface PartyService extends IService<Party> {
|
||||
|
||||
List<Party> selectPartyCommunistNumAndMeetingNumList(Party party);
|
||||
|
||||
List<BigData> partyAreaGroup();
|
||||
|
||||
List<Party> findByPartyAdmins(Map<String, Object> searchParams);
|
||||
}
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
package com.hcsq.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.hcsq.entity.UrbanAttachments;
|
||||
import com.hcsq.vo.BigData;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 城管-部件管理 服务类
|
||||
*
|
||||
|
||||
*/
|
||||
public interface UrbanAttachmentsService extends IService<UrbanAttachments> {
|
||||
|
||||
List<BigData> urbanAttachmentsAreaGroup();
|
||||
|
||||
List<BigData> urbanAttachmentsTypeGroup(Map<String, Object> searchParam);
|
||||
}
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
package com.hcsq.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.hcsq.entity.WorkArticle;
|
||||
|
||||
/**
|
||||
* 工作-文章表 服务类
|
||||
*
|
||||
|
||||
*/
|
||||
public interface WorkArticleService extends IService<WorkArticle> {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
package com.hcsq.service;
|
||||
|
||||
import cn.hutool.core.lang.tree.Tree;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.hcsq.entity.WorkDept;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 工作-部门(组织结构)表 服务类
|
||||
*
|
||||
|
||||
*/
|
||||
public interface WorkDeptService extends IService<WorkDept> {
|
||||
|
||||
List<Tree<String>> treeNodes(String type);
|
||||
|
||||
List<Tree<String>> workDeptList(String deptNo);
|
||||
}
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
package com.hcsq.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.hcsq.entity.User;
|
||||
import com.hcsq.entity.WorkIntegralFlow;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 工作-积分历程表 服务类
|
||||
*
|
||||
* @author hcsq
|
||||
*/
|
||||
public interface WorkIntegralFlowService extends IService<WorkIntegralFlow> {
|
||||
int updateUserScore(int id,String symbol,BigDecimal scoreValue);
|
||||
User getUserByIdcardNo(String idcardNo);
|
||||
}
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
package com.hcsq.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.hcsq.entity.User;
|
||||
import com.hcsq.entity.WorkScore;
|
||||
import com.hcsq.vo.BigData;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 工作-积分项表 服务类
|
||||
*
|
||||
* @author hcsq
|
||||
*/
|
||||
public interface WorkScoreService extends IService<WorkScore> {
|
||||
List<User> userScoreList(QueryWrapper<User> queryWrapper);
|
||||
|
||||
Integer userScoreCount( QueryWrapper<User> queryWrapper);
|
||||
|
||||
List<BigData> workScorePersonGroup();
|
||||
}
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
package com.hcsq.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.hcsq.entity.WorkStaff;
|
||||
import com.hcsq.vo.GridWorkStaffVO;
|
||||
|
||||
/**
|
||||
* 工作-员工表 服务类
|
||||
*
|
||||
|
||||
*/
|
||||
public interface WorkStaffService extends IService<WorkStaff> {
|
||||
|
||||
IPage<GridWorkStaffVO> gridList(Page<WorkStaff> page, QueryWrapper<WorkStaff> workStaffWrapper);
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,44 @@
|
|||
package com.hcsq.util;
|
||||
|
||||
import org.apache.commons.codec.binary.Base64;
|
||||
|
||||
import javax.crypto.Cipher;
|
||||
import javax.crypto.spec.IvParameterSpec;
|
||||
import javax.crypto.spec.SecretKeySpec;
|
||||
|
||||
public class AseEncryptionUtil {
|
||||
|
||||
private static final String key = "0lEpFaq64dWQzut6";
|
||||
|
||||
private static final String initVector = "mRRsPVn1o86ho8c9";
|
||||
|
||||
public static String encrypt(String value) {
|
||||
try {
|
||||
IvParameterSpec iv = new IvParameterSpec(initVector.getBytes("UTF-8"));
|
||||
SecretKeySpec skeySpec = new SecretKeySpec(key.getBytes("UTF-8"), "AES");
|
||||
|
||||
Cipher cipher = Cipher.getInstance("AES/CBC/PKCS5PADDING");
|
||||
cipher.init(Cipher.ENCRYPT_MODE, skeySpec, iv);
|
||||
|
||||
byte[] encrypted = cipher.doFinal(value.getBytes());
|
||||
return Base64.encodeBase64String(encrypted);
|
||||
} catch (Exception ex) {
|
||||
ex.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static String decrypt(String encrypted) {
|
||||
try {
|
||||
IvParameterSpec iv = new IvParameterSpec(initVector.getBytes("UTF-8"));
|
||||
SecretKeySpec skeySpec = new SecretKeySpec(key.getBytes("UTF-8"), "AES");
|
||||
Cipher cipher = Cipher.getInstance("AES/CBC/PKCS5PADDING");
|
||||
cipher.init(Cipher.DECRYPT_MODE, skeySpec, iv);
|
||||
byte[] original = cipher.doFinal(Base64.decodeBase64(encrypted));
|
||||
return new String(original);
|
||||
} catch (Exception ex) {
|
||||
ex.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,47 @@
|
|||
package com.hcsq.util;
|
||||
|
||||
import org.springframework.beans.BeanUtils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.function.Supplier;
|
||||
|
||||
/**
|
||||
|
||||
* @date: 2022/11/23 08:19
|
||||
*/
|
||||
public class BeanCopyUtil extends BeanUtils {
|
||||
|
||||
/**
|
||||
* 集合数据的拷贝
|
||||
* @param sources: 数据源类
|
||||
* @param target: 目标类::new(eg: UserVO::new)
|
||||
* @return
|
||||
*/
|
||||
public static <S, T> List<T> copyListProperties(List<S> sources, Supplier<T> target) {
|
||||
return copyListProperties(sources, target, null);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 带回调函数的集合数据的拷贝(可自定义字段拷贝规则)
|
||||
* @param sources: 数据源类
|
||||
* @param target: 目标类::new(eg: UserVO::new)
|
||||
* @param callBack: 回调函数
|
||||
* @return
|
||||
*/
|
||||
public static <S, T> List<T> copyListProperties(List<S> sources, Supplier<T> target, BeanCopyUtilCallBack<S, T> callBack) {
|
||||
List<T> list = new ArrayList<>(sources.size());
|
||||
for (S source : sources) {
|
||||
T t = target.get();
|
||||
copyProperties(source, t);
|
||||
list.add(t);
|
||||
if (callBack != null) {
|
||||
// 回调
|
||||
callBack.callBack(source, t);
|
||||
}
|
||||
}
|
||||
return list;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
package com.hcsq.util;
|
||||
|
||||
/**
|
||||
|
||||
* @date: 2022/11/23 08:20
|
||||
*/
|
||||
@FunctionalInterface
|
||||
public interface BeanCopyUtilCallBack <S, T> {
|
||||
|
||||
/**
|
||||
* 定义默认回调方法
|
||||
* @param t
|
||||
* @param s
|
||||
*/
|
||||
void callBack(S t, T s);
|
||||
}
|
||||
|
|
@ -0,0 +1,78 @@
|
|||
package com.hcsq.util;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.*;
|
||||
|
||||
public class CharUtil {
|
||||
|
||||
public static String getRandomString(Integer num) {
|
||||
String base = "abcdefghijklmnopqrstuvwxyz0123456789";
|
||||
Random random = new Random();
|
||||
StringBuffer sb = new StringBuffer();
|
||||
for (int i = 0; i < num; i++) {
|
||||
int number = random.nextInt(base.length());
|
||||
sb.append(base.charAt(number));
|
||||
}
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
public static String getRandomNum(Integer num) {
|
||||
String base = "0123456789";
|
||||
Random random = new Random();
|
||||
StringBuffer sb = new StringBuffer();
|
||||
for (int i = 0; i < num; i++) {
|
||||
int number = random.nextInt(base.length());
|
||||
sb.append(base.charAt(number));
|
||||
}
|
||||
return sb.toString();
|
||||
}
|
||||
/**
|
||||
* 根据身份证的号码算出当前身份证持有者的年龄
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public static int countAge(String idNumber) {
|
||||
if(idNumber.length() != 18 && idNumber.length() != 15){
|
||||
throw new IllegalArgumentException("身份证号长度错误");
|
||||
}
|
||||
String year;
|
||||
String yue;
|
||||
String day;
|
||||
if(idNumber.length() == 18){
|
||||
year = idNumber.substring(6).substring(0, 4);// 得到年份
|
||||
yue = idNumber.substring(10).substring(0, 2);// 得到月份
|
||||
day = idNumber.substring(12).substring(0,2);//得到日
|
||||
}else{
|
||||
year = "19" + idNumber.substring(6, 8);// 年份
|
||||
yue = idNumber.substring(8, 10);// 月份
|
||||
day = idNumber.substring(10, 12);//日
|
||||
}
|
||||
Date date = new Date();// 得到当前的系统时间
|
||||
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
|
||||
String fyear = format.format(date).substring(0, 4);// 当前年份
|
||||
String fyue = format.format(date).substring(5, 7);// 月份
|
||||
String fday=format.format(date).substring(8,10);//
|
||||
int age = 0;
|
||||
if(Integer.parseInt(yue) == Integer.parseInt(fyue)){//如果月份相同
|
||||
//说明已经过了生日或者今天是生日
|
||||
if (Integer.parseInt(day) <= Integer.parseInt(fday)) {
|
||||
age = Integer.parseInt(fyear) - Integer.parseInt(year);
|
||||
} else {
|
||||
age = Integer.parseInt(fyear) - Integer.parseInt(year) - 1;
|
||||
}
|
||||
}else{
|
||||
|
||||
if(Integer.parseInt(yue) < Integer.parseInt(fyue)){
|
||||
//如果当前月份大于出生月份
|
||||
age = Integer.parseInt(fyear) - Integer.parseInt(year);
|
||||
}else{
|
||||
//如果当前月份小于出生月份,说明生日还没过
|
||||
age = Integer.parseInt(fyear) - Integer.parseInt(year) - 1;
|
||||
}
|
||||
}
|
||||
System.out.println("age = " + age);
|
||||
return age;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,180 @@
|
|||
package com.hcsq.util;
|
||||
|
||||
import org.apache.commons.lang3.time.DateFormatUtils;
|
||||
|
||||
import java.lang.management.ManagementFactory;
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.time.*;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 时间工具类
|
||||
*
|
||||
* @author hckj
|
||||
*/
|
||||
public class DateUtils extends org.apache.commons.lang3.time.DateUtils
|
||||
{
|
||||
public static String YYYY = "yyyy";
|
||||
|
||||
public static String YYYY_MM = "yyyy-MM";
|
||||
|
||||
public static String YYYY_MM_DD = "yyyy-MM-dd";
|
||||
|
||||
public static String YYYYMMDDHHMMSS = "yyyyMMddHHmmss";
|
||||
|
||||
public static String YYYY_MM_DD_HH_MM_SS = "yyyy-MM-dd HH:mm:ss";
|
||||
|
||||
private static String[] parsePatterns = {
|
||||
"yyyy-MM-dd", "yyyy-MM-dd HH:mm:ss", "yyyy-MM-dd HH:mm", "yyyy-MM",
|
||||
"yyyy/MM/dd", "yyyy/MM/dd HH:mm:ss", "yyyy/MM/dd HH:mm", "yyyy/MM",
|
||||
"yyyy.MM.dd", "yyyy.MM.dd HH:mm:ss", "yyyy.MM.dd HH:mm", "yyyy.MM"};
|
||||
|
||||
/**
|
||||
* 获取当前Date型日期
|
||||
*
|
||||
* @return Date() 当前日期
|
||||
*/
|
||||
public static Date getNowDate()
|
||||
{
|
||||
return new Date();
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取当前日期, 默认格式为yyyy-MM-dd
|
||||
*
|
||||
* @return String
|
||||
*/
|
||||
public static String getDate()
|
||||
{
|
||||
return dateTimeNow(YYYY_MM_DD);
|
||||
}
|
||||
|
||||
public static final String getTime()
|
||||
{
|
||||
return dateTimeNow(YYYY_MM_DD_HH_MM_SS);
|
||||
}
|
||||
|
||||
public static final String dateTimeNow()
|
||||
{
|
||||
return dateTimeNow(YYYYMMDDHHMMSS);
|
||||
}
|
||||
|
||||
public static final String dateTimeNow(final String format)
|
||||
{
|
||||
return parseDateToStr(format, new Date());
|
||||
}
|
||||
|
||||
public static final String dateTime(final Date date)
|
||||
{
|
||||
return parseDateToStr(YYYY_MM_DD, date);
|
||||
}
|
||||
|
||||
public static final String parseDateToStr(final String format, final Date date)
|
||||
{
|
||||
return new SimpleDateFormat(format).format(date);
|
||||
}
|
||||
|
||||
public static final Date dateTime(final String format, final String ts)
|
||||
{
|
||||
try
|
||||
{
|
||||
return new SimpleDateFormat(format).parse(ts);
|
||||
}
|
||||
catch (ParseException e)
|
||||
{
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 日期路径 即年/月/日 如2018/08/08
|
||||
*/
|
||||
public static final String datePath()
|
||||
{
|
||||
Date now = new Date();
|
||||
return DateFormatUtils.format(now, "yyyy/MM/dd");
|
||||
}
|
||||
|
||||
/**
|
||||
* 日期路径 即年/月/日 如20180808
|
||||
*/
|
||||
public static final String dateTime()
|
||||
{
|
||||
Date now = new Date();
|
||||
return DateFormatUtils.format(now, "yyyyMMdd");
|
||||
}
|
||||
|
||||
/**
|
||||
* 日期型字符串转化为日期 格式
|
||||
*/
|
||||
public static Date parseDate(Object str)
|
||||
{
|
||||
if (str == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
try
|
||||
{
|
||||
return parseDate(str.toString(), parsePatterns);
|
||||
}
|
||||
catch (ParseException e)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取服务器启动时间
|
||||
*/
|
||||
public static Date getServerStartDate()
|
||||
{
|
||||
long time = ManagementFactory.getRuntimeMXBean().getStartTime();
|
||||
return new Date(time);
|
||||
}
|
||||
|
||||
/**
|
||||
* 计算时间差
|
||||
*
|
||||
* @param endTime 最后时间
|
||||
* @param startTime 开始时间
|
||||
* @return 时间差(天/小时/分钟)
|
||||
*/
|
||||
public static String timeDistance(Date endDate, Date startTime)
|
||||
{
|
||||
long nd = 1000 * 24 * 60 * 60;
|
||||
long nh = 1000 * 60 * 60;
|
||||
long nm = 1000 * 60;
|
||||
// long ns = 1000;
|
||||
// 获得两个时间的毫秒时间差异
|
||||
long diff = endDate.getTime() - startTime.getTime();
|
||||
// 计算差多少天
|
||||
long day = diff / nd;
|
||||
// 计算差多少小时
|
||||
long hour = diff % nd / nh;
|
||||
// 计算差多少分钟
|
||||
long min = diff % nd % nh / nm;
|
||||
// 计算差多少秒//输出结果
|
||||
// long sec = diff % nd % nh % nm / ns;
|
||||
return day + "天" + hour + "小时" + min + "分钟";
|
||||
}
|
||||
|
||||
/**
|
||||
* 增加 LocalDateTime ==> Date
|
||||
*/
|
||||
public static Date toDate(LocalDateTime temporalAccessor)
|
||||
{
|
||||
ZonedDateTime zdt = temporalAccessor.atZone(ZoneId.systemDefault());
|
||||
return Date.from(zdt.toInstant());
|
||||
}
|
||||
|
||||
/**
|
||||
* 增加 LocalDate ==> Date
|
||||
*/
|
||||
public static Date toDate(LocalDate temporalAccessor)
|
||||
{
|
||||
LocalDateTime localDateTime = LocalDateTime.of(temporalAccessor, LocalTime.of(0, 0, 0));
|
||||
ZonedDateTime zdt = localDateTime.atZone(ZoneId.systemDefault());
|
||||
return Date.from(zdt.toInstant());
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,59 @@
|
|||
package com.hcsq.util;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
/**
|
||||
|
||||
* @date: 2022/11/29 14:17
|
||||
*/
|
||||
@Slf4j
|
||||
public class IPUtil {
|
||||
|
||||
/**
|
||||
* 获取IP地址
|
||||
*
|
||||
* 使用Nginx等反向代理软件, 则不能通过request.getRemoteAddr()获取IP地址
|
||||
* 如果使用了多级反向代理的话,X-Forwarded-For的值并不止一个,而是一串IP地址,X-Forwarded-For中第一个非unknown的有效IP字符串,则为真实IP地址
|
||||
*/
|
||||
public static String getIpAddr(HttpServletRequest request) {
|
||||
|
||||
String ip = null;
|
||||
|
||||
String UNKNOWN = "unknown";
|
||||
|
||||
try {
|
||||
ip = request.getHeader("x-forwarded-for");
|
||||
if (StrUtil.isEmpty(ip) || UNKNOWN.equalsIgnoreCase(ip)) {
|
||||
ip = request.getHeader("Proxy-Client-IP");
|
||||
}
|
||||
if (StrUtil.isEmpty(ip) || ip.length() == 0 || UNKNOWN.equalsIgnoreCase(ip)) {
|
||||
ip = request.getHeader("WL-Proxy-Client-IP");
|
||||
}
|
||||
if (StrUtil.isEmpty(ip) || UNKNOWN.equalsIgnoreCase(ip)) {
|
||||
ip = request.getHeader("HTTP_CLIENT_IP");
|
||||
}
|
||||
if (StrUtil.isEmpty(ip) || UNKNOWN.equalsIgnoreCase(ip)) {
|
||||
ip = request.getHeader("HTTP_X_FORWARDED_FOR");
|
||||
}
|
||||
if (StrUtil.isEmpty(ip) || UNKNOWN.equalsIgnoreCase(ip)) {
|
||||
ip = request.getRemoteAddr();
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.error("IPUtils ERROR:",e);
|
||||
}
|
||||
|
||||
//对于通过多个代理的情况,第一个IP为客户端真实IP,多个IP按照','分割
|
||||
if(!StrUtil.isEmpty(ip) && ip.length() > 15) {
|
||||
|
||||
if(ip.indexOf(",") > 0) {
|
||||
|
||||
ip = ip.substring(0, ip.indexOf(","));
|
||||
}
|
||||
}
|
||||
|
||||
return ip;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,138 @@
|
|||
package com.hcsq.util;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import com.auth0.jwt.JWT;
|
||||
import com.auth0.jwt.JWTVerifier;
|
||||
import com.auth0.jwt.algorithms.Algorithm;
|
||||
import com.auth0.jwt.exceptions.JWTDecodeException;
|
||||
import com.auth0.jwt.interfaces.DecodedJWT;
|
||||
import com.hcsq.entity.User;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* Created with IntelliJ IDEA
|
||||
*
|
||||
|
||||
* @Description JWT 工具类
|
||||
* @Date 2018-04-07
|
||||
* @Time 22:48
|
||||
*/
|
||||
public class JWTUtil {
|
||||
// 过期时间 24 小时
|
||||
private static final long EXPIRE_TIME = 60 * 590 * 60 * 1000;
|
||||
// 密钥
|
||||
private static final String SECRET = "SHIRO+JWT";
|
||||
|
||||
/**
|
||||
* 生成 token, 5min后过期
|
||||
*
|
||||
* @param username 用户名
|
||||
* @return 加密的token
|
||||
*/
|
||||
public static String createToken(String username, Integer id) {
|
||||
try {
|
||||
Date date = new Date(System.currentTimeMillis() + EXPIRE_TIME);
|
||||
Algorithm algorithm = Algorithm.HMAC256(SECRET);
|
||||
// 附带username信息
|
||||
return JWT.create()
|
||||
.withClaim("username", username)
|
||||
.withClaim("id", id)
|
||||
//到期时间
|
||||
.withExpiresAt(date)
|
||||
//创建一个新的JWT,并使用给定的算法进行标记
|
||||
.sign(algorithm);
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public static String createToken(User user) {
|
||||
try {
|
||||
Date date = new Date(System.currentTimeMillis() + EXPIRE_TIME);
|
||||
Algorithm algorithm = Algorithm.HMAC256(SECRET);
|
||||
// 附带username信息
|
||||
return JWT.create()
|
||||
.withClaim("username", user.getUserName())
|
||||
.withClaim("id", user.getId())
|
||||
.withClaim("relationNo", user.getUserRelationNo())
|
||||
.withClaim("relationType", user.getUserRelationType())
|
||||
.withClaim("staffIdnumber", user.getStaffIdnumber())
|
||||
.withClaim("staffDeptNo", user.getStaffDeptNo())
|
||||
//到期时间
|
||||
.withExpiresAt(date)
|
||||
//创建一个新的JWT,并使用给定的算法进行标记
|
||||
.sign(algorithm);
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验 token 是否正确
|
||||
*
|
||||
* @param token 密钥
|
||||
* @param username 用户名
|
||||
* @return 是否正确
|
||||
*/
|
||||
public static boolean verify(String token, String username) {
|
||||
try {
|
||||
Algorithm algorithm = Algorithm.HMAC256(SECRET);
|
||||
//在token中附带了username信息
|
||||
JWTVerifier verifier = JWT.require(algorithm)
|
||||
.withClaim("username", username)
|
||||
.build();
|
||||
//验证 token
|
||||
verifier.verify(token);
|
||||
return true;
|
||||
} catch (Exception exception) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获得token中的信息,无需secret解密也能获得
|
||||
*
|
||||
* @return token中包含的用户名
|
||||
*/
|
||||
public static String getUsername(String token) {
|
||||
try {
|
||||
if(StringUtils.isBlank(token)){
|
||||
return null;
|
||||
}
|
||||
DecodedJWT jwt = JWT.decode(token);
|
||||
return jwt.getClaim("username").asString();
|
||||
} catch (JWTDecodeException e) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public static User getUser(String token) {
|
||||
try {
|
||||
if(StringUtils.isBlank(token)){
|
||||
return null;
|
||||
}
|
||||
DecodedJWT jwt = JWT.decode(token);
|
||||
|
||||
User user = new User();
|
||||
|
||||
user.setId(jwt.getClaim("id").asInt());
|
||||
|
||||
user.setUserName(jwt.getClaim("username").asString());
|
||||
|
||||
user.setUserRelationNo(jwt.getClaim("relationNo").asString());
|
||||
|
||||
user.setUserRelationType(jwt.getClaim("relationType").asString());
|
||||
|
||||
user.setStaffIdnumber(jwt.getClaim("staffIdnumber").asString());
|
||||
|
||||
user.setStaffDeptNo(jwt.getClaim("staffDeptNo").asString());
|
||||
|
||||
return user;
|
||||
} catch (JWTDecodeException e) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,99 @@
|
|||
package com.hcsq.util;
|
||||
|
||||
import java.util.Comparator;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/***
|
||||
*
|
||||
* @Description: Map排序工具类
|
||||
* @Param:
|
||||
* @return:
|
||||
* @Author: dengjb
|
||||
* @Date: 2023-01-03
|
||||
*/
|
||||
public class MapSortUtil {
|
||||
|
||||
private static Comparator<Map.Entry> comparatorByKeyAsc = (Map.Entry o1, Map.Entry o2) -> {
|
||||
if (o1.getKey() instanceof Comparable) {
|
||||
return ((Comparable) o1.getKey()).compareTo(o2.getKey());
|
||||
}
|
||||
throw new UnsupportedOperationException("键的类型尚未实现Comparable接口");
|
||||
};
|
||||
|
||||
|
||||
private static Comparator<Map.Entry> comparatorByKeyDesc = (Map.Entry o1, Map.Entry o2) -> {
|
||||
if (o1.getKey() instanceof Comparable) {
|
||||
return ((Comparable) o2.getKey()).compareTo(o1.getKey());
|
||||
}
|
||||
throw new UnsupportedOperationException("键的类型尚未实现Comparable接口");
|
||||
};
|
||||
|
||||
|
||||
private static Comparator<Map.Entry> comparatorByValueAsc = (Map.Entry o1, Map.Entry o2) -> {
|
||||
if (o1.getValue() instanceof Comparable) {
|
||||
return ((Comparable) o1.getValue()).compareTo(o2.getValue());
|
||||
}
|
||||
throw new UnsupportedOperationException("值的类型尚未实现Comparable接口");
|
||||
};
|
||||
|
||||
|
||||
private static Comparator<Map.Entry> comparatorByValueDesc = (Map.Entry o1, Map.Entry o2) -> {
|
||||
if (o1.getValue() instanceof Comparable) {
|
||||
return ((Comparable) o2.getValue()).compareTo(o1.getValue());
|
||||
}
|
||||
throw new UnsupportedOperationException("值的类型尚未实现Comparable接口");
|
||||
};
|
||||
|
||||
/**
|
||||
* 按键升序排列
|
||||
*/
|
||||
public static <K, V> Map<K, V> sortByKeyAsc(Map<K, V> originMap) {
|
||||
if (originMap == null) {
|
||||
return null;
|
||||
}
|
||||
return sort(originMap, comparatorByKeyAsc);
|
||||
}
|
||||
|
||||
/**
|
||||
* 按键降序排列
|
||||
*/
|
||||
public static <K, V> Map<K, V> sortByKeyDesc(Map<K, V> originMap) {
|
||||
if (originMap == null) {
|
||||
return null;
|
||||
}
|
||||
return sort(originMap, comparatorByKeyDesc);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 按值升序排列
|
||||
*/
|
||||
public static <K, V> Map<K, V> sortByValueAsc(Map<K, V> originMap) {
|
||||
if (originMap == null) {
|
||||
return null;
|
||||
}
|
||||
return sort(originMap, comparatorByValueAsc);
|
||||
}
|
||||
|
||||
/**
|
||||
* 按值降序排列
|
||||
*/
|
||||
public static <K, V> Map<K, V> sortByValueDesc(Map<K, V> originMap) {
|
||||
if (originMap == null) {
|
||||
return null;
|
||||
}
|
||||
return sort(originMap, comparatorByValueDesc);
|
||||
}
|
||||
|
||||
private static <K, V> Map<K, V> sort(Map<K, V> originMap, Comparator<Map.Entry> comparator) {
|
||||
return originMap.entrySet()
|
||||
.stream()
|
||||
.sorted(comparator)
|
||||
.collect(
|
||||
Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (e1, e2) -> e2,
|
||||
LinkedHashMap::new));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,45 @@
|
|||
package com.hcsq.util;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
/**
|
||||
* Created on 18-6-29 上午8:55.
|
||||
* 作者: Dengjiabin
|
||||
* 说明:
|
||||
*/
|
||||
@ApiModel("返回结果")
|
||||
public class Result<T> {
|
||||
@ApiModelProperty(value = "状态码")
|
||||
private Integer code;
|
||||
@ApiModelProperty(value = "消息描述")
|
||||
private String msg;
|
||||
@ApiModelProperty(value = "返回实体")
|
||||
private T data;
|
||||
|
||||
public Integer getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public void setCode(Integer code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public String getMsg() {
|
||||
return msg;
|
||||
}
|
||||
|
||||
public void setMsg(String msg) {
|
||||
this.msg = msg;
|
||||
}
|
||||
|
||||
public T getData() {
|
||||
return data;
|
||||
}
|
||||
|
||||
public void setData(T data) {
|
||||
this.data = data;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,42 @@
|
|||
package com.hcsq.util;
|
||||
|
||||
|
||||
import com.hcsq.enums.ResultENum;
|
||||
|
||||
/**
|
||||
* Created on 18-6-29 上午9:09.
|
||||
* 作者: LiuLiHao
|
||||
* 说明:
|
||||
*/
|
||||
|
||||
public class ResultUtil {
|
||||
public static Result success(Object object){
|
||||
Result result = new Result();
|
||||
result.setData(object);
|
||||
result.setMsg("成功");
|
||||
result.setCode(200);
|
||||
return result;
|
||||
}
|
||||
public static Result success(Integer code ,String msg){
|
||||
Result result = new Result();
|
||||
result.setMsg(msg);
|
||||
result.setCode(code);
|
||||
return result;
|
||||
}
|
||||
public static Result error(Integer code ,String msg){
|
||||
Result result = new Result();
|
||||
result.setMsg(msg);
|
||||
result.setCode(code);
|
||||
return result;
|
||||
}
|
||||
public static Result error(ResultENum resultENum){
|
||||
Result result = new Result();
|
||||
result.setMsg(resultENum.getMsg());
|
||||
result.setCode(resultENum.getCode());
|
||||
return result;
|
||||
}
|
||||
public static Result success(){
|
||||
return success(null);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,137 @@
|
|||
package com.hcsq.util;
|
||||
|
||||
import org.springframework.aop.framework.AopContext;
|
||||
import org.springframework.beans.BeansException;
|
||||
import org.springframework.beans.factory.NoSuchBeanDefinitionException;
|
||||
import org.springframework.beans.factory.config.BeanFactoryPostProcessor;
|
||||
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.context.ApplicationContextAware;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* spring工具类 方便在非spring管理环境中获取bean
|
||||
*
|
||||
* @author lym
|
||||
*/
|
||||
@Component
|
||||
public final class SpringUtils implements BeanFactoryPostProcessor, ApplicationContextAware
|
||||
{
|
||||
/** Spring应用上下文环境 */
|
||||
private static ConfigurableListableBeanFactory beanFactory;
|
||||
|
||||
private static ApplicationContext applicationContext;
|
||||
|
||||
@Override
|
||||
public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) throws BeansException
|
||||
{
|
||||
SpringUtils.beanFactory = beanFactory;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setApplicationContext(ApplicationContext applicationContext) throws BeansException
|
||||
{
|
||||
SpringUtils.applicationContext = applicationContext;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取对象
|
||||
*
|
||||
* @param name
|
||||
* @return Object 一个以所给名字注册的bean的实例
|
||||
* @throws BeansException
|
||||
*
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public static <T> T getBean(String name) throws BeansException
|
||||
{
|
||||
return (T) beanFactory.getBean(name);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取类型为requiredType的对象
|
||||
*
|
||||
* @param clz
|
||||
* @return
|
||||
* @throws BeansException
|
||||
*
|
||||
*/
|
||||
public static <T> T getBean(Class<T> clz) throws BeansException
|
||||
{
|
||||
T result = (T) beanFactory.getBean(clz);
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 如果BeanFactory包含一个与所给名称匹配的bean定义,则返回true
|
||||
*
|
||||
* @param name
|
||||
* @return boolean
|
||||
*/
|
||||
public static boolean containsBean(String name)
|
||||
{
|
||||
return beanFactory.containsBean(name);
|
||||
}
|
||||
|
||||
/**
|
||||
* 判断以给定名字注册的bean定义是一个singleton还是一个prototype。 如果与给定名字相应的bean定义没有被找到,将会抛出一个异常(NoSuchBeanDefinitionException)
|
||||
*
|
||||
* @param name
|
||||
* @return boolean
|
||||
* @throws NoSuchBeanDefinitionException
|
||||
*
|
||||
*/
|
||||
public static boolean isSingleton(String name) throws NoSuchBeanDefinitionException
|
||||
{
|
||||
return beanFactory.isSingleton(name);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param name
|
||||
* @return Class 注册对象的类型
|
||||
* @throws NoSuchBeanDefinitionException
|
||||
*
|
||||
*/
|
||||
public static Class<?> getType(String name) throws NoSuchBeanDefinitionException
|
||||
{
|
||||
return beanFactory.getType(name);
|
||||
}
|
||||
|
||||
/**
|
||||
* 如果给定的bean名字在bean定义中有别名,则返回这些别名
|
||||
*
|
||||
* @param name
|
||||
* @return
|
||||
* @throws NoSuchBeanDefinitionException
|
||||
*
|
||||
*/
|
||||
public static String[] getAliases(String name) throws NoSuchBeanDefinitionException
|
||||
{
|
||||
return beanFactory.getAliases(name);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取aop代理对象
|
||||
*
|
||||
* @param invoker
|
||||
* @return
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public static <T> T getAopProxy(T invoker)
|
||||
{
|
||||
return (T) AopContext.currentProxy();
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取当前的环境配置,无配置返回null
|
||||
*
|
||||
* @return 当前的环境配置
|
||||
*/
|
||||
public static String[] getActiveProfiles()
|
||||
{
|
||||
return applicationContext.getEnvironment().getActiveProfiles();
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,99 @@
|
|||
package com.hcsq.util;
|
||||
|
||||
import java.util.concurrent.CancellationException;
|
||||
import java.util.concurrent.ExecutionException;
|
||||
import java.util.concurrent.ExecutorService;
|
||||
import java.util.concurrent.Future;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
* 线程相关工具类.
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
public class Threads
|
||||
{
|
||||
private static final Logger logger = LoggerFactory.getLogger(Threads.class);
|
||||
|
||||
/**
|
||||
* sleep等待,单位为毫秒
|
||||
*/
|
||||
public static void sleep(long milliseconds)
|
||||
{
|
||||
try
|
||||
{
|
||||
Thread.sleep(milliseconds);
|
||||
}
|
||||
catch (InterruptedException e)
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 停止线程池
|
||||
* 先使用shutdown, 停止接收新任务并尝试完成所有已存在任务.
|
||||
* 如果超时, 则调用shutdownNow, 取消在workQueue中Pending的任务,并中断所有阻塞函数.
|
||||
* 如果仍人超時,則強制退出.
|
||||
* 另对在shutdown时线程本身被调用中断做了处理.
|
||||
*/
|
||||
public static void shutdownAndAwaitTermination(ExecutorService pool)
|
||||
{
|
||||
if (pool != null && !pool.isShutdown())
|
||||
{
|
||||
pool.shutdown();
|
||||
try
|
||||
{
|
||||
if (!pool.awaitTermination(120, TimeUnit.SECONDS))
|
||||
{
|
||||
pool.shutdownNow();
|
||||
if (!pool.awaitTermination(120, TimeUnit.SECONDS))
|
||||
{
|
||||
logger.info("Pool did not terminate");
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (InterruptedException ie)
|
||||
{
|
||||
pool.shutdownNow();
|
||||
Thread.currentThread().interrupt();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 打印线程异常信息
|
||||
*/
|
||||
public static void printException(Runnable r, Throwable t)
|
||||
{
|
||||
if (t == null && r instanceof Future<?>)
|
||||
{
|
||||
try
|
||||
{
|
||||
Future<?> future = (Future<?>) r;
|
||||
if (future.isDone())
|
||||
{
|
||||
future.get();
|
||||
}
|
||||
}
|
||||
catch (CancellationException ce)
|
||||
{
|
||||
t = ce;
|
||||
}
|
||||
catch (ExecutionException ee)
|
||||
{
|
||||
t = ee.getCause();
|
||||
}
|
||||
catch (InterruptedException ie)
|
||||
{
|
||||
Thread.currentThread().interrupt();
|
||||
}
|
||||
}
|
||||
if (t != null)
|
||||
{
|
||||
logger.error(t.getMessage(), t);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,71 @@
|
|||
package com.hcsq.util;
|
||||
|
||||
import com.hcsq.entity.GridArea;
|
||||
import com.hcsq.entity.GridAreaTree;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.time.Instant;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalTime;
|
||||
import java.time.ZoneId;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
* @Description:
|
||||
* @Param:
|
||||
* @return:
|
||||
|
||||
* @Date: 2022/11/30
|
||||
*/
|
||||
public class TimeUtils {
|
||||
|
||||
|
||||
// 获得某天最大时间 2020-02-19 23:59:59
|
||||
public static Date getEndOfDay(Date date) {
|
||||
LocalDateTime localDateTime = LocalDateTime.ofInstant(Instant.ofEpochMilli(date.getTime()), ZoneId.systemDefault());;
|
||||
LocalDateTime endOfDay = localDateTime.with(LocalTime.MAX);
|
||||
return Date.from(endOfDay.atZone(ZoneId.systemDefault()).toInstant());
|
||||
}
|
||||
|
||||
// 获得某天最小时间 2020-02-17 00:00:00
|
||||
public static Date getStartOfDay(Date date) {
|
||||
LocalDateTime localDateTime = LocalDateTime.ofInstant(Instant.ofEpochMilli(date.getTime()), ZoneId.systemDefault());
|
||||
LocalDateTime startOfDay = localDateTime.with(LocalTime.MIN);
|
||||
return Date.from(startOfDay.atZone(ZoneId.systemDefault()).toInstant());
|
||||
}
|
||||
|
||||
public static long printDifference(Date startDate, Date endDate){
|
||||
|
||||
//milliseconds
|
||||
long different = endDate.getTime() - startDate.getTime();
|
||||
|
||||
System.out.println("startDate : " + startDate);
|
||||
System.out.println("endDate : "+ endDate);
|
||||
System.out.println("different : " + different);
|
||||
|
||||
long secondsInMilli = 1000;
|
||||
long minutesInMilli = secondsInMilli * 60;
|
||||
long hoursInMilli = minutesInMilli * 60;
|
||||
// long daysInMilli = hoursInMilli * 24;
|
||||
|
||||
// long elapsedDays = different / daysInMilli;
|
||||
// different = different % daysInMilli;
|
||||
|
||||
long elapsedHours = different / hoursInMilli;
|
||||
different = different % hoursInMilli;
|
||||
|
||||
return elapsedHours;
|
||||
|
||||
// long elapsedMinutes = different / minutesInMilli;
|
||||
// different = different % minutesInMilli;
|
||||
//
|
||||
// long elapsedSeconds = different / secondsInMilli;
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,57 @@
|
|||
package com.hcsq.util;
|
||||
|
||||
import com.hcsq.entity.Permission;
|
||||
import com.hcsq.entity.PermissionTree;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @date: 2018/10/17 13:38
|
||||
* @description: 树形工具类
|
||||
*/
|
||||
public class TreeUtil {
|
||||
|
||||
/**
|
||||
* 数组转树形结构
|
||||
* @param permission
|
||||
* @param root
|
||||
* @return
|
||||
*/
|
||||
public static List<PermissionTree> list2Tree(List<Permission> permission, Integer root){
|
||||
// 普通对象转树节点
|
||||
List<PermissionTree> resourceList = buildTree(permission);
|
||||
List<PermissionTree> trees = new ArrayList<>();
|
||||
for (PermissionTree tree: resourceList) {
|
||||
if( root.equals(tree.getParentId())) {
|
||||
trees.add(tree);
|
||||
}
|
||||
|
||||
for (PermissionTree t : resourceList) {
|
||||
if (tree.getId().equals(t.getParentId())) {
|
||||
if (tree.getChildren() == null) {
|
||||
tree.setChildren(new ArrayList<PermissionTree>());
|
||||
}
|
||||
tree.addChildren(t);
|
||||
}
|
||||
}
|
||||
}
|
||||
return trees;
|
||||
}
|
||||
|
||||
/**
|
||||
* 对象转树节点
|
||||
* @param permission
|
||||
* @return
|
||||
*/
|
||||
public static List<PermissionTree> buildTree(List<Permission> permission){
|
||||
List<PermissionTree> trees = new ArrayList<>();
|
||||
permission.forEach( resource->{
|
||||
PermissionTree tree = new PermissionTree();
|
||||
BeanUtils.copyProperties(resource, tree);
|
||||
trees.add(tree);
|
||||
});
|
||||
return trees;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,41 @@
|
|||
package com.hcsq.util;
|
||||
|
||||
import com.deepoove.poi.XWPFTemplate;
|
||||
import com.deepoove.poi.config.Configure;
|
||||
import com.deepoove.poi.config.ConfigureBuilder;
|
||||
|
||||
import freemarker.template.Configuration;
|
||||
import freemarker.template.Template;
|
||||
|
||||
import javax.servlet.ServletOutputStream;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.*;
|
||||
import java.net.URL;
|
||||
import java.net.URLEncoder;
|
||||
import java.util.Map;
|
||||
|
||||
public class WordUtils {
|
||||
private WordUtils() {
|
||||
throw new AssertionError();
|
||||
}
|
||||
|
||||
public static void createWord(String path,Object paramMap,String ftlFile) {
|
||||
|
||||
ConfigureBuilder builder = Configure.newBuilder();
|
||||
builder.setElMode(Configure.ELMode.SPEL_MODE);
|
||||
try {
|
||||
ClassLoader classLoader = WordUtils.class.getClassLoader();
|
||||
URL resource = classLoader.getResource("templates/"+ftlFile);
|
||||
// 读取模板templatePath并将paramMap的内容填充进模板,即编辑模板+渲染数据
|
||||
XWPFTemplate template = XWPFTemplate.compile(resource.openStream(),builder.build()).render(paramMap);
|
||||
|
||||
template.writeToFile(path);
|
||||
template.close();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
package com.hcsq.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
|
||||
*/
|
||||
@Data
|
||||
public class BigData {
|
||||
|
||||
private String label;
|
||||
|
||||
private String value;
|
||||
private String name;
|
||||
private String inNum;
|
||||
private String outNum;
|
||||
}
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
package com.hcsq.vo;
|
||||
|
||||
import com.hcsq.entity.GridCorpFlow;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
|
||||
*/
|
||||
@Data
|
||||
public class CorpVo {
|
||||
|
||||
private String planIncome;
|
||||
|
||||
private String actualIncome;
|
||||
private String actualProfit;
|
||||
private String percentage;
|
||||
|
||||
private List<GridCorpFlow> corpFlows;
|
||||
}
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
package com.hcsq.vo;
|
||||
|
||||
/**
|
||||
|
||||
*/
|
||||
@lombok.Data
|
||||
public class Data {
|
||||
|
||||
private String label;
|
||||
|
||||
private String value;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
package com.hcsq.vo;
|
||||
|
||||
/**
|
||||
|
||||
*/
|
||||
@lombok.Data
|
||||
public class DataVO {
|
||||
|
||||
private String label;
|
||||
|
||||
private String value;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,49 @@
|
|||
package com.hcsq.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 事件-事件表
|
||||
* </p>
|
||||
*
|
||||
|
||||
|
||||
*/
|
||||
@Data
|
||||
public class EventListVO {
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
private Integer id;
|
||||
|
||||
/**
|
||||
* 事件名称
|
||||
*/
|
||||
private String eventName;
|
||||
|
||||
/**
|
||||
* 事件类别
|
||||
*/
|
||||
private Integer eventTypeId;
|
||||
private String eventTypeStr;
|
||||
/**
|
||||
* 位置名
|
||||
*/
|
||||
private String positionName;
|
||||
private Date addTime;
|
||||
|
||||
/**
|
||||
* 模板id
|
||||
*/
|
||||
private Integer templateId;
|
||||
private String templateStr;
|
||||
/**
|
||||
* 节点id
|
||||
*/
|
||||
private Integer nodeId;
|
||||
private String nodeIdStr;
|
||||
}
|
||||
|
|
@ -0,0 +1,145 @@
|
|||
package com.hcsq.vo;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelIgnore;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.alibaba.excel.annotation.format.DateTimeFormat;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 事件-事件表
|
||||
* </p>
|
||||
*/
|
||||
@Data
|
||||
public class EventVO {
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
private Integer id;
|
||||
/**
|
||||
* 编号
|
||||
*/
|
||||
private String eventNo;
|
||||
/**
|
||||
* 模板id
|
||||
*/
|
||||
private Integer templateId;
|
||||
private String templateStr;
|
||||
@DateTimeFormat("yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8")
|
||||
private Date addTime;
|
||||
/**
|
||||
* 上报人
|
||||
*/
|
||||
private String addUserName;
|
||||
|
||||
/**
|
||||
* 事件类别
|
||||
*/
|
||||
private Integer eventTypeId;
|
||||
private String eventTypeStr;
|
||||
|
||||
/**
|
||||
* 来源(1 网格员巡查,2 居民上报,3 上级转办,4 物联网感知,5 12345热线)
|
||||
*/
|
||||
private Integer source;
|
||||
private String sourceStr;
|
||||
|
||||
/**
|
||||
* 涉及人员
|
||||
*/
|
||||
private String involvePeople;
|
||||
private String involvePeopleStr;
|
||||
/**
|
||||
* 发生日期
|
||||
*/
|
||||
private Date occurrenceDate;
|
||||
/**
|
||||
* 位置名
|
||||
*/
|
||||
private String positionName;
|
||||
|
||||
/**
|
||||
* 事件简述
|
||||
*/
|
||||
private String sketch;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 图片
|
||||
*/
|
||||
private String photo;
|
||||
/**
|
||||
* 视频
|
||||
*/
|
||||
private String video;
|
||||
/**
|
||||
* 附件
|
||||
*/
|
||||
private String accessory;
|
||||
/**
|
||||
* 联系人
|
||||
*/
|
||||
private String contact;
|
||||
private String contactStr;
|
||||
/**
|
||||
* 联系方式
|
||||
*/
|
||||
private String phone;
|
||||
|
||||
/**
|
||||
* 所属网格
|
||||
*/
|
||||
private Integer areaId;
|
||||
/**
|
||||
* 所属网格
|
||||
*/
|
||||
private String areaName;
|
||||
/**
|
||||
* 事件名称
|
||||
*/
|
||||
private String eventName;
|
||||
|
||||
/**
|
||||
* 节点id
|
||||
*/
|
||||
private Integer nodeId;
|
||||
private String nodeIdStr;
|
||||
|
||||
/**
|
||||
* 是否超时
|
||||
*/
|
||||
private Integer isTimeout;
|
||||
/**
|
||||
* 处理期限
|
||||
*/
|
||||
private Date disposeDeadline;
|
||||
/**
|
||||
* 来电类别
|
||||
*/
|
||||
private String callType;
|
||||
/**
|
||||
* 是否回复
|
||||
*/
|
||||
private String reply;
|
||||
/**
|
||||
* 事件规模
|
||||
*/
|
||||
private Integer scale;
|
||||
private String scaleStr;
|
||||
/**
|
||||
* 事件等级 (1 一般;2 紧急)
|
||||
*/
|
||||
private Integer estate;
|
||||
private String estateStr;
|
||||
private String involvedMonad;
|
||||
}
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
package com.hcsq.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
|
||||
*/
|
||||
@Data
|
||||
public class Feature {
|
||||
|
||||
private String type;
|
||||
private String id;
|
||||
|
||||
private Geometry geometry;
|
||||
private Properties properties;
|
||||
}
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
package com.hcsq.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
|
||||
*/
|
||||
@Data
|
||||
public class FeatureCollection {
|
||||
|
||||
private String type;
|
||||
|
||||
private List<Feature> features;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
package com.hcsq.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
|
||||
*/
|
||||
@Data
|
||||
public class Geometry {
|
||||
|
||||
private String type;
|
||||
|
||||
private List<List<List<BigDecimal[]>>> coordinates;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,53 @@
|
|||
package com.hcsq.vo;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
public class GridPeopleCardImportDTO implements Serializable {
|
||||
|
||||
/**
|
||||
* 所属卡片
|
||||
*/
|
||||
private String templateCode;
|
||||
|
||||
/**
|
||||
* 身份证号
|
||||
*/
|
||||
@ExcelProperty("身份证号*")
|
||||
private String idcardNo;
|
||||
|
||||
/**
|
||||
* 数据内容
|
||||
*/
|
||||
private String dataContent;
|
||||
/**
|
||||
* 数据状态 1有效 0 失效,1为默认
|
||||
*/
|
||||
private Integer dataState;
|
||||
private Date addTime;
|
||||
private Integer addUser;
|
||||
private Date updateTime;
|
||||
private Integer updateUser;
|
||||
/**
|
||||
* 审核状态 0未审核 1审核通过 2审核不通过
|
||||
*/
|
||||
private String auditStatus;
|
||||
|
||||
/**
|
||||
* 关键字 (前端查询传参使用)
|
||||
*/
|
||||
private String keyWord;
|
||||
|
||||
@ExcelProperty("姓名*")
|
||||
private String name;
|
||||
|
||||
private String sex;
|
||||
private String birthDate;
|
||||
private String mobile;
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
package com.hcsq.vo;
|
||||
|
||||
import com.hcsq.entity.WorkStaff;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
|
||||
* @date: 2022/11/22 16:41
|
||||
*/
|
||||
@Data
|
||||
public class GridWorkStaffVO {
|
||||
|
||||
private Integer id;
|
||||
|
||||
private String staffNo;
|
||||
|
||||
private String staffMobile;
|
||||
|
||||
private String staffIdnumber;
|
||||
|
||||
private String staffSex;
|
||||
|
||||
private String staffName;
|
||||
|
||||
private String staffDiploma;
|
||||
|
||||
private String staffDeptNo;
|
||||
|
||||
private String staffPoliticalStatus;
|
||||
|
||||
private String staffLocation;
|
||||
}
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
package com.hcsq.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
|
||||
*/
|
||||
@Data
|
||||
public class Properties {
|
||||
|
||||
private String areaName;
|
||||
private String areaAddr;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
<?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">
|
||||
<parent>
|
||||
<artifactId>hcsq</artifactId>
|
||||
<groupId>com.hcsq</groupId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>event</artifactId>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.source>8</maven.compiler.source>
|
||||
<maven.compiler.target>8</maven.compiler.target>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.hcsq</groupId>
|
||||
<artifactId>system</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
|
|
@ -0,0 +1,170 @@
|
|||
package Listener;
|
||||
|
||||
import com.alibaba.excel.context.AnalysisContext;
|
||||
import com.alibaba.excel.event.AnalysisEventListener;
|
||||
import com.alibaba.excel.exception.ExcelDataConvertException;
|
||||
import com.hcsq.entity.EventImport;
|
||||
import com.hcsq.entity.User;
|
||||
import com.hcsq.service.EventImportService;
|
||||
import com.hcsq.service.impl.EventImportServiceImpl;
|
||||
import com.hcsq.util.Result;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
* @Description:
|
||||
* @Param:
|
||||
* @return:
|
||||
|
||||
* @Date: 2022/12/2
|
||||
*/
|
||||
@Slf4j
|
||||
public class EventDataListener extends AnalysisEventListener<EventImport> {
|
||||
|
||||
private static final int BATCH_COUNT = 5000;
|
||||
|
||||
List<EventImport> list = new ArrayList<>();
|
||||
/**
|
||||
* 假设这个是一个DAO,当然有业务逻辑这个也可以是一个service。当然如果不用存储这个对象没用。
|
||||
*/
|
||||
private EventImportService dataService;
|
||||
|
||||
private Result result;
|
||||
|
||||
private User user;
|
||||
|
||||
public EventDataListener() {
|
||||
// 这里是demo,所以随便new一个。实际使用如果到了spring,请使用下面的有参构造函数
|
||||
dataService = new EventImportServiceImpl();
|
||||
|
||||
result = new Result();
|
||||
|
||||
user = new User();
|
||||
}
|
||||
|
||||
/**
|
||||
* 如果使用了spring,请使用这个构造方法。每次创建Listener的时候需要把spring管理的类传进来
|
||||
*
|
||||
* @param dataService
|
||||
*/
|
||||
public EventDataListener(EventImportService dataService, Result result,User user) {
|
||||
this.dataService = dataService;
|
||||
this.result = result;
|
||||
this.user = user;
|
||||
}
|
||||
|
||||
/**
|
||||
* 这个每一条数据解析都会来调用
|
||||
*
|
||||
@param context
|
||||
*/
|
||||
@Override
|
||||
public void invoke(EventImport data, AnalysisContext context) {
|
||||
if (StringUtils.isBlank(data.getEventNo())) {
|
||||
result.setMsg("【编号】为必填项");
|
||||
result.setCode(-1);
|
||||
return;
|
||||
}
|
||||
|
||||
if (StringUtils.isBlank(data.getAreaName())) {
|
||||
result.setMsg("【网格】为必填项");
|
||||
result.setCode(-1);
|
||||
return;
|
||||
}
|
||||
if (StringUtils.isBlank(data.getEventName())) {
|
||||
result.setMsg("【名称】为必填项");
|
||||
result.setCode(-1);
|
||||
return;
|
||||
}
|
||||
if (data.getOccurrenceDate()==null) {
|
||||
result.setMsg("【发生时间】为必填项");
|
||||
result.setCode(-1);
|
||||
return;
|
||||
}
|
||||
if (StringUtils.isBlank(data.getEventTypeStr())) {
|
||||
result.setMsg("【事件类别】为必填项");
|
||||
result.setCode(-1);
|
||||
return;
|
||||
}
|
||||
if (StringUtils.isBlank(data.getSourceStr())) {
|
||||
result.setMsg("【来源】为必填项");
|
||||
result.setCode(-1);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if (result.getCode()!=null) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.list.add(data);
|
||||
|
||||
// 达到BATCH_COUNT了,需要去存储一次数据库,防止数据几万条数据在内存,容易OOM
|
||||
if (this.list.size() >= BATCH_COUNT) {
|
||||
saveData();
|
||||
// 存储完成清理 list
|
||||
// this.list.clear();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 所有数据解析完成了 都会来调用
|
||||
*
|
||||
* @param context
|
||||
*/
|
||||
@Override
|
||||
public void doAfterAllAnalysed(AnalysisContext context) {
|
||||
// 这里也要保存数据,确保最后遗留的数据也存储到数据库
|
||||
saveData();
|
||||
// result = ResultUtil.success();
|
||||
if (result.getCode()==200) {
|
||||
result.setMsg("成功");
|
||||
result.setCode(200);
|
||||
log.info("所有数据解析完成!");
|
||||
}else{
|
||||
log.info("数据解析异常!");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 加上存储数据库
|
||||
*/
|
||||
@Transactional
|
||||
public void saveData() {
|
||||
log.info("{}条数据,开始存储数据库!", list.size());
|
||||
|
||||
Result saveResult = dataService.importList(list,user);
|
||||
// this.result.setCode(saveResult.getCode());
|
||||
BeanUtils.copyProperties(saveResult,result);
|
||||
//插入最新数据
|
||||
if (result.getCode()==200){
|
||||
log.info("存储数据库成功!");
|
||||
}else{
|
||||
log.info("存储数据异常!");
|
||||
}
|
||||
// dataService.saveBatch(list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onException(Exception exception, AnalysisContext context) {
|
||||
|
||||
log.error("解析失败,但是继续解析下一行:{}", exception.getMessage());
|
||||
// 如果是某一个单元格的转换异常 能获取到具体行号
|
||||
// 如果要获取头的信息 配合invokeHeadMap使用
|
||||
exception.printStackTrace();
|
||||
if (exception instanceof ExcelDataConvertException) {
|
||||
ExcelDataConvertException excelDataConvertException = (ExcelDataConvertException)exception;
|
||||
log.error("第{}行,第{}列解析异常", excelDataConvertException.getRowIndex(),
|
||||
excelDataConvertException.getColumnIndex());
|
||||
result.setCode(500);
|
||||
result.setMsg("解析失败:第"+excelDataConvertException.getRowIndex()+"行,第"+excelDataConvertException.getColumnIndex()+"列解析异常");
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,182 @@
|
|||
package com.hcsq.controller;
|
||||
|
||||
import com.alibaba.excel.EasyExcel;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.hcsq.entity.EventCourse;
|
||||
import com.hcsq.entity.User;
|
||||
import com.hcsq.enums.ResultENum;
|
||||
import com.hcsq.service.EventCourseService;
|
||||
import com.hcsq.service.UserService;
|
||||
import com.hcsq.util.JWTUtil;
|
||||
import com.hcsq.util.Result;
|
||||
import com.hcsq.util.ResultUtil;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.shiro.authz.annotation.RequiresAuthentication;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import springfox.documentation.annotations.ApiIgnore;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 事件-历程表 前端控制器
|
||||
* </p>
|
||||
*
|
||||
|
||||
|
||||
*/
|
||||
|
||||
@Api(description = "事件历程")
|
||||
@RestController
|
||||
@RequestMapping("/eventCourse")
|
||||
public class EventCourseController {
|
||||
@Resource
|
||||
private EventCourseService eventCourseService;
|
||||
|
||||
@Resource
|
||||
private UserService userService;
|
||||
@ApiOperation("获取事件历程列表")
|
||||
@RequiresAuthentication
|
||||
@GetMapping("/list")
|
||||
public Result list(HttpServletRequest request,
|
||||
EventCourse eventCourse,
|
||||
@RequestParam(name = "isAsc", required = false) boolean isAsc,
|
||||
@RequestParam(name = "column", required = false) String column,
|
||||
@RequestParam(name = "size", defaultValue = "10") Integer size,
|
||||
@RequestParam(name = "current", defaultValue = "1") Integer current) {
|
||||
String username = JWTUtil.getUsername(request.getHeader("token"));
|
||||
if (StringUtils.isBlank(username)) {
|
||||
return ResultUtil.error(ResultENum.NOT_LOGIN_ERROR);
|
||||
}
|
||||
|
||||
//查询条件
|
||||
QueryWrapper<EventCourse> eventCourseWrapper = new QueryWrapper<>();
|
||||
|
||||
queryWrapper(eventCourse,isAsc,column, eventCourseWrapper);
|
||||
Page<EventCourse> page = new Page<>(current, size);
|
||||
IPage<EventCourse> resultPage = eventCourseService.page(page, eventCourseWrapper);
|
||||
return ResultUtil.success(resultPage);
|
||||
}
|
||||
|
||||
public void queryWrapper(
|
||||
EventCourse eventCourse,boolean isAsc,String column,
|
||||
QueryWrapper<EventCourse> eventCourseWrapper) {
|
||||
|
||||
if (eventCourse.getId() != null) {
|
||||
eventCourseWrapper.eq("id", eventCourse.getId());
|
||||
}
|
||||
if (eventCourse.getEventId() != null) {
|
||||
eventCourseWrapper.eq("event_id", eventCourse.getEventId());
|
||||
}
|
||||
if (eventCourse.getTemplateId() != null) {
|
||||
eventCourseWrapper.eq("template_id", eventCourse.getTemplateId());
|
||||
}
|
||||
if (eventCourse.getNodeId() != null) {
|
||||
eventCourseWrapper.eq("node_id", eventCourse.getNodeId());
|
||||
}
|
||||
if(StringUtils.isBlank(column)){
|
||||
eventCourseWrapper.orderByAsc("id");
|
||||
}else{
|
||||
eventCourseWrapper.orderBy(true,isAsc,column);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation("导出事件历程列表")
|
||||
@GetMapping("/export")
|
||||
public void export(HttpServletResponse response,
|
||||
@RequestParam(name = "isAsc", required = false) boolean isAsc,
|
||||
@RequestParam(name = "column", required = false) String column,
|
||||
@RequestParam(name = "currentUser", required = true) String currentUser,
|
||||
EventCourse eventCourse) {
|
||||
if (StringUtils.isBlank(currentUser)) {
|
||||
return;
|
||||
}
|
||||
|
||||
//查询条件
|
||||
QueryWrapper<EventCourse> eventCourseWrapper = new QueryWrapper<>();
|
||||
|
||||
|
||||
queryWrapper(eventCourse,isAsc,column, eventCourseWrapper);
|
||||
|
||||
List<EventCourse> list = eventCourseService.list(eventCourseWrapper);
|
||||
|
||||
response.addHeader("Access-Control-Allow-Origin", "*");
|
||||
response.setHeader("content-Type", "application/vnd.ms-excel");
|
||||
// 下载文件的默认名称(设置下载文件的默认名称)
|
||||
response.setHeader("Content-Disposition", "attachment;filename=eventCourse.xlsx");
|
||||
//导出操作
|
||||
try {
|
||||
EasyExcel.write(response.getOutputStream(), EventCourse.class).sheet("事件历程").doWrite(list);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ApiOperation("新增事件历程")
|
||||
@RequiresAuthentication
|
||||
@PostMapping("/create")
|
||||
public Result create(HttpServletRequest request, @RequestBody EventCourse eventCourse) {
|
||||
User user = JWTUtil.getUser(request.getHeader("token"));
|
||||
if (user == null) {
|
||||
return ResultUtil.error(ResultENum.NOT_LOGIN_ERROR);
|
||||
}
|
||||
eventCourse.setAddUser(user.getId());
|
||||
eventCourseService.save(eventCourse);
|
||||
|
||||
return ResultUtil.success(eventCourse);
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation("修改事件历程")
|
||||
@RequiresAuthentication
|
||||
@PutMapping("/update")
|
||||
public Result update(HttpServletRequest request, @RequestBody EventCourse eventCourse) {
|
||||
|
||||
User user = JWTUtil.getUser(request.getHeader("token"));
|
||||
if (user == null) {
|
||||
return ResultUtil.error(ResultENum.NOT_LOGIN_ERROR);
|
||||
}
|
||||
|
||||
if (eventCourse.getId() == null) {
|
||||
return ResultUtil.error(ResultENum.PARAM_ERROR);
|
||||
}
|
||||
EventCourse local = eventCourseService.getById(eventCourse.getId());
|
||||
if (local == null) {
|
||||
return ResultUtil.error(ResultENum.DATA_EMPTY_ERROR);
|
||||
}
|
||||
eventCourse.setUpdateUser(user.getId());
|
||||
eventCourse.setUpdateTime(new Date());
|
||||
eventCourseService.updateById(eventCourse);
|
||||
return ResultUtil.success(eventCourse);
|
||||
}
|
||||
|
||||
@ApiOperation("删除事件历程")
|
||||
@RequiresAuthentication
|
||||
@DeleteMapping("/delete/{id}")
|
||||
public Result delete(HttpServletRequest request, @PathVariable(value = "id",required = true) Long id) {
|
||||
String username = JWTUtil.getUsername(request.getHeader("token"));
|
||||
if (StringUtils.isBlank(username)) {
|
||||
return ResultUtil.error(ResultENum.NOT_LOGIN_ERROR);
|
||||
}
|
||||
|
||||
EventCourse local = eventCourseService.getById(id);
|
||||
if (local == null) {
|
||||
return ResultUtil.error(ResultENum.DATA_EMPTY_ERROR);
|
||||
}
|
||||
|
||||
eventCourseService.removeById(id);
|
||||
return ResultUtil.success();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,166 @@
|
|||
package com.hcsq.controller;
|
||||
|
||||
import com.alibaba.excel.EasyExcel;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.hcsq.entity.EventField;
|
||||
import com.hcsq.enums.ResultENum;
|
||||
import com.hcsq.service.EventFieldService;
|
||||
import com.hcsq.service.UserService;
|
||||
import com.hcsq.util.JWTUtil;
|
||||
import com.hcsq.util.Result;
|
||||
import com.hcsq.util.ResultUtil;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.shiro.authz.annotation.RequiresAuthentication;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import springfox.documentation.annotations.ApiIgnore;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 事件-字段表 前端控制器
|
||||
* </p>
|
||||
*
|
||||
|
||||
|
||||
*/
|
||||
|
||||
@Api(description = "事件字段")
|
||||
@RestController
|
||||
@RequestMapping("/eventField")
|
||||
public class EventFieldController {
|
||||
@Resource
|
||||
private EventFieldService eventFieldService;
|
||||
|
||||
@Resource
|
||||
private UserService userService;
|
||||
@ApiOperation("获取事件字段列表")
|
||||
@RequiresAuthentication
|
||||
@GetMapping("/list")
|
||||
public Result list(HttpServletRequest request,
|
||||
EventField eventField,
|
||||
@RequestParam(name = "size", defaultValue = "10") Integer size,
|
||||
@RequestParam(name = "current", defaultValue = "1") Integer current) {
|
||||
String username = JWTUtil.getUsername(request.getHeader("token"));
|
||||
if (StringUtils.isBlank(username)) {
|
||||
return ResultUtil.error(ResultENum.NOT_LOGIN_ERROR);
|
||||
}
|
||||
|
||||
//查询条件
|
||||
QueryWrapper<EventField> eventFieldWrapper = new QueryWrapper<>();
|
||||
|
||||
queryWrapper(eventField, eventFieldWrapper);
|
||||
Page<EventField> page = new Page<>(current, size);
|
||||
IPage<EventField> resultPage = eventFieldService.page(page, eventFieldWrapper);
|
||||
return ResultUtil.success(resultPage);
|
||||
}
|
||||
|
||||
public void queryWrapper(
|
||||
EventField eventField,
|
||||
QueryWrapper<EventField> eventFieldWrapper) {
|
||||
|
||||
if (eventField.getId() != null) {
|
||||
eventFieldWrapper.eq("id", eventField.getId());
|
||||
}
|
||||
if (eventField.getNodeId() != null) {
|
||||
eventFieldWrapper.eq("node_id", eventField.getNodeId());
|
||||
}
|
||||
eventFieldWrapper.orderByDesc("add_time");
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation("导出事件字段列表")
|
||||
@GetMapping("/export")
|
||||
public void export(HttpServletResponse response,
|
||||
@RequestParam(name = "currentUser", required = true) String currentUser,
|
||||
EventField eventField) {
|
||||
if (StringUtils.isBlank(currentUser)) {
|
||||
return;
|
||||
}
|
||||
|
||||
//查询条件
|
||||
QueryWrapper<EventField> eventFieldWrapper = new QueryWrapper<>();
|
||||
|
||||
|
||||
queryWrapper(eventField, eventFieldWrapper);
|
||||
|
||||
List<EventField> list = eventFieldService.list(eventFieldWrapper);
|
||||
|
||||
response.addHeader("Access-Control-Allow-Origin", "*");
|
||||
response.setHeader("content-Type", "application/vnd.ms-excel");
|
||||
// 下载文件的默认名称(设置下载文件的默认名称)
|
||||
response.setHeader("Content-Disposition", "attachment;filename=eventField.xlsx");
|
||||
//导出操作
|
||||
try {
|
||||
EasyExcel.write(response.getOutputStream(), EventField.class).sheet("事件字段").doWrite(list);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ApiOperation("新增事件字段")
|
||||
@RequiresAuthentication
|
||||
@PostMapping("/create")
|
||||
public Result create(HttpServletRequest request, @RequestBody EventField eventField) {
|
||||
String username = JWTUtil.getUsername(request.getHeader("token"));
|
||||
if (StringUtils.isBlank(username)) {
|
||||
return ResultUtil.error(ResultENum.NOT_LOGIN_ERROR);
|
||||
}
|
||||
eventField.setAddUser(username);
|
||||
eventFieldService.save(eventField);
|
||||
|
||||
return ResultUtil.success(eventField);
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation("修改事件字段")
|
||||
@RequiresAuthentication
|
||||
@PutMapping("/update")
|
||||
public Result update(HttpServletRequest request, @RequestBody EventField eventField) {
|
||||
|
||||
String username = JWTUtil.getUsername(request.getHeader("token"));
|
||||
if (StringUtils.isBlank(username)) {
|
||||
return ResultUtil.error(ResultENum.NOT_LOGIN_ERROR);
|
||||
}
|
||||
if (eventField.getId() == null) {
|
||||
return ResultUtil.error(ResultENum.PARAM_ERROR);
|
||||
}
|
||||
EventField local = eventFieldService.getById(eventField.getId());
|
||||
if (local == null) {
|
||||
return ResultUtil.error(ResultENum.DATA_EMPTY_ERROR);
|
||||
}
|
||||
eventField.setUpdateUser(username);
|
||||
eventField.setUpdateTime(new Date());
|
||||
eventFieldService.updateById(eventField);
|
||||
return ResultUtil.success(eventField);
|
||||
}
|
||||
|
||||
@ApiOperation("删除事件字段")
|
||||
@RequiresAuthentication
|
||||
@DeleteMapping("/delete/{id}")
|
||||
public Result delete(HttpServletRequest request, @PathVariable(value = "id",required = true) Long id) {
|
||||
String username = JWTUtil.getUsername(request.getHeader("token"));
|
||||
if (StringUtils.isBlank(username)) {
|
||||
return ResultUtil.error(ResultENum.NOT_LOGIN_ERROR);
|
||||
}
|
||||
|
||||
EventField local = eventFieldService.getById(id);
|
||||
if (local == null) {
|
||||
return ResultUtil.error(ResultENum.DATA_EMPTY_ERROR);
|
||||
}
|
||||
|
||||
eventFieldService.removeById(id);
|
||||
return ResultUtil.success();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,210 @@
|
|||
package com.hcsq.controller;
|
||||
|
||||
import com.alibaba.excel.EasyExcel;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.hcsq.dto.EventNodeDTO;
|
||||
import com.hcsq.dto.EventTypeDTO;
|
||||
import com.hcsq.entity.Event;
|
||||
import com.hcsq.entity.EventNode;
|
||||
import com.hcsq.entity.EventType;
|
||||
import com.hcsq.enums.ResultENum;
|
||||
import com.hcsq.service.EventNodeService;
|
||||
import com.hcsq.service.EventService;
|
||||
import com.hcsq.service.UserService;
|
||||
import com.hcsq.util.BeanCopyUtil;
|
||||
import com.hcsq.util.JWTUtil;
|
||||
import com.hcsq.util.Result;
|
||||
import com.hcsq.util.ResultUtil;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.shiro.authz.annotation.RequiresAuthentication;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import springfox.documentation.annotations.ApiIgnore;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 事件_节点表 前端控制器
|
||||
* </p>
|
||||
*
|
||||
|
||||
|
||||
*/
|
||||
|
||||
@Api(description = "事件节点")
|
||||
@RestController
|
||||
@RequestMapping("/eventNode")
|
||||
public class EventNodeController {
|
||||
@Resource
|
||||
private EventNodeService eventNodeService;
|
||||
@Resource
|
||||
private EventService eventService;
|
||||
@Resource
|
||||
private UserService userService;
|
||||
@ApiOperation("获取事件节点列表")
|
||||
@RequiresAuthentication
|
||||
@GetMapping("/list")
|
||||
public Result list(HttpServletRequest request,
|
||||
EventNode eventNode,
|
||||
@RequestParam(name = "size", defaultValue = "10") Integer size,
|
||||
@RequestParam(name = "current", defaultValue = "1") Integer current) {
|
||||
String username = JWTUtil.getUsername(request.getHeader("token"));
|
||||
if (StringUtils.isBlank(username)) {
|
||||
return ResultUtil.error(ResultENum.NOT_LOGIN_ERROR);
|
||||
}
|
||||
|
||||
//查询条件
|
||||
QueryWrapper<EventNode> eventNodeWrapper = new QueryWrapper<>();
|
||||
|
||||
queryWrapper(eventNode, eventNodeWrapper);
|
||||
Page<EventNode> page = new Page<>(current, size);
|
||||
IPage<EventNode> resultPage = eventNodeService.page(page, eventNodeWrapper);
|
||||
return ResultUtil.success(resultPage);
|
||||
}
|
||||
|
||||
public void queryWrapper(
|
||||
EventNode eventNode,
|
||||
QueryWrapper<EventNode> eventNodeWrapper) {
|
||||
|
||||
if (eventNode.getId() != null) {
|
||||
eventNodeWrapper.eq("id", eventNode.getId());
|
||||
}
|
||||
if (eventNode.getIsNodeStatus()!=null && eventNode.getIsNodeStatus() == 1) {
|
||||
eventNodeWrapper.isNotNull("node_status");
|
||||
}
|
||||
eventNodeWrapper.orderByDesc("add_time");
|
||||
}
|
||||
|
||||
@ApiOperation("获取事件状态列表")
|
||||
@RequiresAuthentication
|
||||
@GetMapping("/listStatus")
|
||||
public Result listType(HttpServletRequest request,
|
||||
EventNode eventNode,
|
||||
@RequestParam(name = "size", defaultValue = "20") Integer size,
|
||||
@RequestParam(name = "current", defaultValue = "1") Integer current) {
|
||||
String username = JWTUtil.getUsername(request.getHeader("token"));
|
||||
if (StringUtils.isBlank(username)) {
|
||||
return ResultUtil.error(ResultENum.NOT_LOGIN_ERROR);
|
||||
}
|
||||
|
||||
//查询条件
|
||||
QueryWrapper<EventNode> eventNodeWrapper = new QueryWrapper<>();
|
||||
|
||||
queryWrapper(eventNode, eventNodeWrapper);
|
||||
Page<EventNode> page = new Page<>(current, size);
|
||||
IPage<EventNode> resultPage = eventNodeService.page(page, eventNodeWrapper);
|
||||
List<EventNode> records = resultPage.getRecords();
|
||||
List<EventNodeDTO> eventNodeDTOS = new ArrayList<>();
|
||||
Integer total =0;
|
||||
for (int i = 0; i < records.size(); i++) {
|
||||
EventNodeDTO eventNodeDTO = new EventNodeDTO();
|
||||
Integer id = records.get(i).getId();
|
||||
QueryWrapper<Event> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("node_id",id);
|
||||
int count = eventService.count(queryWrapper);
|
||||
BeanCopyUtil.copyProperties(records.get(i),eventNodeDTO);
|
||||
eventNodeDTO.setCount(count);
|
||||
total = total+count;
|
||||
eventNodeDTOS.add(eventNodeDTO);
|
||||
}
|
||||
Map map = new HashMap();
|
||||
map.put("records",eventNodeDTOS);
|
||||
map.put("total",total);
|
||||
return ResultUtil.success(map);
|
||||
}
|
||||
|
||||
@ApiOperation("导出事件节点列表")
|
||||
@GetMapping("/export")
|
||||
public void export(HttpServletResponse response,
|
||||
@RequestParam(name = "currentUser", required = true) String currentUser,
|
||||
EventNode eventNode) {
|
||||
if (StringUtils.isBlank(currentUser)) {
|
||||
return;
|
||||
}
|
||||
|
||||
//查询条件
|
||||
QueryWrapper<EventNode> eventNodeWrapper = new QueryWrapper<>();
|
||||
|
||||
|
||||
queryWrapper(eventNode, eventNodeWrapper);
|
||||
|
||||
List<EventNode> list = eventNodeService.list(eventNodeWrapper);
|
||||
|
||||
response.addHeader("Access-Control-Allow-Origin", "*");
|
||||
response.setHeader("content-Type", "application/vnd.ms-excel");
|
||||
// 下载文件的默认名称(设置下载文件的默认名称)
|
||||
response.setHeader("Content-Disposition", "attachment;filename=eventNode.xlsx");
|
||||
//导出操作
|
||||
try {
|
||||
EasyExcel.write(response.getOutputStream(), EventNode.class).sheet("事件节点").doWrite(list);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ApiOperation("新增事件节点")
|
||||
@RequiresAuthentication
|
||||
@PostMapping("/create")
|
||||
public Result create(HttpServletRequest request, @RequestBody EventNode eventNode) {
|
||||
String username = JWTUtil.getUsername(request.getHeader("token"));
|
||||
if (StringUtils.isBlank(username)) {
|
||||
return ResultUtil.error(ResultENum.NOT_LOGIN_ERROR);
|
||||
}
|
||||
eventNode.setAddUser(username);
|
||||
eventNodeService.save(eventNode);
|
||||
|
||||
return ResultUtil.success(eventNode);
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation("修改事件节点")
|
||||
@RequiresAuthentication
|
||||
@PutMapping("/update")
|
||||
public Result update(HttpServletRequest request, @RequestBody EventNode eventNode) {
|
||||
|
||||
String username = JWTUtil.getUsername(request.getHeader("token"));
|
||||
if (StringUtils.isBlank(username)) {
|
||||
return ResultUtil.error(ResultENum.NOT_LOGIN_ERROR);
|
||||
}
|
||||
if (eventNode.getId() == null) {
|
||||
return ResultUtil.error(ResultENum.PARAM_ERROR);
|
||||
}
|
||||
EventNode local = eventNodeService.getById(eventNode.getId());
|
||||
if (local == null) {
|
||||
return ResultUtil.error(ResultENum.DATA_EMPTY_ERROR);
|
||||
}
|
||||
eventNode.setUpdateUser(username);
|
||||
eventNode.setUpdateTime(new Date());
|
||||
eventNodeService.updateById(eventNode);
|
||||
return ResultUtil.success(eventNode);
|
||||
}
|
||||
|
||||
@ApiOperation("删除事件节点")
|
||||
@RequiresAuthentication
|
||||
@DeleteMapping("/delete/{id}")
|
||||
public Result delete(HttpServletRequest request, @PathVariable(value = "id",required = true) Long id) {
|
||||
String username = JWTUtil.getUsername(request.getHeader("token"));
|
||||
if (StringUtils.isBlank(username)) {
|
||||
return ResultUtil.error(ResultENum.NOT_LOGIN_ERROR);
|
||||
}
|
||||
|
||||
EventNode local = eventNodeService.getById(id);
|
||||
if (local == null) {
|
||||
return ResultUtil.error(ResultENum.DATA_EMPTY_ERROR);
|
||||
}
|
||||
|
||||
eventNodeService.removeById(id);
|
||||
return ResultUtil.success();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,168 @@
|
|||
package com.hcsq.controller;
|
||||
|
||||
import com.alibaba.excel.EasyExcel;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.hcsq.entity.EventRelation;
|
||||
import com.hcsq.enums.ResultENum;
|
||||
import com.hcsq.service.EventRelationService;
|
||||
import com.hcsq.service.UserService;
|
||||
import com.hcsq.util.JWTUtil;
|
||||
import com.hcsq.util.Result;
|
||||
import com.hcsq.util.ResultUtil;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.shiro.authz.annotation.RequiresAuthentication;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import springfox.documentation.annotations.ApiIgnore;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 事件-节点关系表 前端控制器
|
||||
* </p>
|
||||
*
|
||||
|
||||
|
||||
*/
|
||||
@Api(description = "事件节点关系")
|
||||
@RestController
|
||||
@RequestMapping("/eventRelation")
|
||||
public class EventRelationController {
|
||||
@Resource
|
||||
private EventRelationService eventRelationService;
|
||||
|
||||
@Resource
|
||||
private UserService userService;
|
||||
@ApiOperation("获取事件节点关系列表")
|
||||
@RequiresAuthentication
|
||||
@GetMapping("/list")
|
||||
public Result list(HttpServletRequest request,
|
||||
EventRelation eventRelation,
|
||||
@RequestParam(name = "size", defaultValue = "10") Integer size,
|
||||
@RequestParam(name = "current", defaultValue = "1") Integer current) {
|
||||
String username = JWTUtil.getUsername(request.getHeader("token"));
|
||||
if (StringUtils.isBlank(username)) {
|
||||
return ResultUtil.error(ResultENum.NOT_LOGIN_ERROR);
|
||||
}
|
||||
|
||||
//查询条件
|
||||
QueryWrapper<EventRelation> eventRelationWrapper = new QueryWrapper<>();
|
||||
|
||||
queryWrapper(eventRelation, eventRelationWrapper);
|
||||
Page<EventRelation> page = new Page<>(current, size);
|
||||
IPage<EventRelation> resultPage = eventRelationService.page(page, eventRelationWrapper);
|
||||
return ResultUtil.success(resultPage);
|
||||
}
|
||||
|
||||
public void queryWrapper(
|
||||
EventRelation eventRelation,
|
||||
QueryWrapper<EventRelation> eventRelationWrapper) {
|
||||
|
||||
if (eventRelation.getId() != null) {
|
||||
eventRelationWrapper.eq("id", eventRelation.getId());
|
||||
}
|
||||
if (eventRelation.getNodeId() != null) {
|
||||
eventRelationWrapper.eq("node_id", eventRelation.getNodeId());
|
||||
}
|
||||
if (eventRelation.getTemplateId() != null) {
|
||||
eventRelationWrapper.eq("template_id", eventRelation.getTemplateId());
|
||||
}
|
||||
eventRelationWrapper.orderByDesc("add_time");
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation("导出事件节点关系列表")
|
||||
@GetMapping("/export")
|
||||
public void export(HttpServletResponse response,
|
||||
@RequestParam(name = "currentUser", required = true) String currentUser,
|
||||
EventRelation eventRelation) {
|
||||
if (StringUtils.isBlank(currentUser)) {
|
||||
return;
|
||||
}
|
||||
|
||||
//查询条件
|
||||
QueryWrapper<EventRelation> eventRelationWrapper = new QueryWrapper<>();
|
||||
|
||||
|
||||
queryWrapper(eventRelation, eventRelationWrapper);
|
||||
|
||||
List<EventRelation> list = eventRelationService.list(eventRelationWrapper);
|
||||
|
||||
response.addHeader("Access-Control-Allow-Origin", "*");
|
||||
response.setHeader("content-Type", "application/vnd.ms-excel");
|
||||
// 下载文件的默认名称(设置下载文件的默认名称)
|
||||
response.setHeader("Content-Disposition", "attachment;filename=eventRelation.xlsx");
|
||||
//导出操作
|
||||
try {
|
||||
EasyExcel.write(response.getOutputStream(), EventRelation.class).sheet("事件节点关系").doWrite(list);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ApiOperation("新增事件节点关系")
|
||||
@RequiresAuthentication
|
||||
@PostMapping("/create")
|
||||
public Result create(HttpServletRequest request, @RequestBody EventRelation eventRelation) {
|
||||
String username = JWTUtil.getUsername(request.getHeader("token"));
|
||||
if (StringUtils.isBlank(username)) {
|
||||
return ResultUtil.error(ResultENum.NOT_LOGIN_ERROR);
|
||||
}
|
||||
eventRelation.setAddUser(username);
|
||||
eventRelationService.save(eventRelation);
|
||||
|
||||
return ResultUtil.success(eventRelation);
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation("修改事件节点关系")
|
||||
@RequiresAuthentication
|
||||
@PutMapping("/update")
|
||||
public Result update(HttpServletRequest request, @RequestBody EventRelation eventRelation) {
|
||||
|
||||
String username = JWTUtil.getUsername(request.getHeader("token"));
|
||||
if (StringUtils.isBlank(username)) {
|
||||
return ResultUtil.error(ResultENum.NOT_LOGIN_ERROR);
|
||||
}
|
||||
if (eventRelation.getId() == null) {
|
||||
return ResultUtil.error(ResultENum.PARAM_ERROR);
|
||||
}
|
||||
EventRelation local = eventRelationService.getById(eventRelation.getId());
|
||||
if (local == null) {
|
||||
return ResultUtil.error(ResultENum.DATA_EMPTY_ERROR);
|
||||
}
|
||||
eventRelation.setUpdateUser(username);
|
||||
eventRelation.setUpdateTime(new Date());
|
||||
eventRelationService.updateById(eventRelation);
|
||||
return ResultUtil.success(eventRelation);
|
||||
}
|
||||
|
||||
@ApiOperation("删除事件节点关系")
|
||||
@RequiresAuthentication
|
||||
@DeleteMapping("/delete/{id}")
|
||||
public Result delete(HttpServletRequest request, @PathVariable(value = "id",required = true) Long id) {
|
||||
String username = JWTUtil.getUsername(request.getHeader("token"));
|
||||
if (StringUtils.isBlank(username)) {
|
||||
return ResultUtil.error(ResultENum.NOT_LOGIN_ERROR);
|
||||
}
|
||||
|
||||
EventRelation local = eventRelationService.getById(id);
|
||||
if (local == null) {
|
||||
return ResultUtil.error(ResultENum.DATA_EMPTY_ERROR);
|
||||
}
|
||||
|
||||
eventRelationService.removeById(id);
|
||||
return ResultUtil.success();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,163 @@
|
|||
package com.hcsq.controller;
|
||||
|
||||
import com.alibaba.excel.EasyExcel;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.hcsq.entity.EventTemplate;
|
||||
import com.hcsq.enums.ResultENum;
|
||||
import com.hcsq.service.EventTemplateService;
|
||||
import com.hcsq.service.UserService;
|
||||
import com.hcsq.util.JWTUtil;
|
||||
import com.hcsq.util.Result;
|
||||
import com.hcsq.util.ResultUtil;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.shiro.authz.annotation.RequiresAuthentication;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import springfox.documentation.annotations.ApiIgnore;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 事件_模板表 前端控制器
|
||||
* </p>
|
||||
*
|
||||
|
||||
|
||||
*/
|
||||
|
||||
@Api(description = "事件模板")
|
||||
@RestController
|
||||
@RequestMapping("/eventTemplate")
|
||||
public class EventTemplateController {
|
||||
@Resource
|
||||
private EventTemplateService eventTemplateService;
|
||||
|
||||
@Resource
|
||||
private UserService userService;
|
||||
@ApiOperation("获取事件模板列表")
|
||||
@RequiresAuthentication
|
||||
@GetMapping("/list")
|
||||
public Result list(HttpServletRequest request,
|
||||
EventTemplate eventTemplate,
|
||||
@RequestParam(name = "size", defaultValue = "10") Integer size,
|
||||
@RequestParam(name = "current", defaultValue = "1") Integer current) {
|
||||
String username = JWTUtil.getUsername(request.getHeader("token"));
|
||||
if (StringUtils.isBlank(username)) {
|
||||
return ResultUtil.error(ResultENum.NOT_LOGIN_ERROR);
|
||||
}
|
||||
|
||||
//查询条件
|
||||
QueryWrapper<EventTemplate> eventTemplateWrapper = new QueryWrapper<>();
|
||||
|
||||
queryWrapper(eventTemplate, eventTemplateWrapper);
|
||||
Page<EventTemplate> page = new Page<>(current, size);
|
||||
IPage<EventTemplate> resultPage = eventTemplateService.page(page, eventTemplateWrapper);
|
||||
return ResultUtil.success(resultPage);
|
||||
}
|
||||
|
||||
public void queryWrapper(
|
||||
EventTemplate eventTemplate,
|
||||
QueryWrapper<EventTemplate> eventTemplateWrapper) {
|
||||
|
||||
if (eventTemplate.getId() != null) {
|
||||
eventTemplateWrapper.eq("id", eventTemplate.getId());
|
||||
}
|
||||
eventTemplateWrapper.orderByDesc("add_time");
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation("导出事件模板列表")
|
||||
@GetMapping("/export")
|
||||
public void export(HttpServletResponse response,
|
||||
@RequestParam(name = "currentUser", required = true) String currentUser,
|
||||
EventTemplate eventTemplate) {
|
||||
if (StringUtils.isBlank(currentUser)) {
|
||||
return;
|
||||
}
|
||||
|
||||
//查询条件
|
||||
QueryWrapper<EventTemplate> eventTemplateWrapper = new QueryWrapper<>();
|
||||
|
||||
|
||||
queryWrapper(eventTemplate, eventTemplateWrapper);
|
||||
|
||||
List<EventTemplate> list = eventTemplateService.list(eventTemplateWrapper);
|
||||
|
||||
response.addHeader("Access-Control-Allow-Origin", "*");
|
||||
response.setHeader("content-Type", "application/vnd.ms-excel");
|
||||
// 下载文件的默认名称(设置下载文件的默认名称)
|
||||
response.setHeader("Content-Disposition", "attachment;filename=eventTemplate.xlsx");
|
||||
//导出操作
|
||||
try {
|
||||
EasyExcel.write(response.getOutputStream(), EventTemplate.class).sheet("事件模板").doWrite(list);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ApiOperation("新增事件模板")
|
||||
@RequiresAuthentication
|
||||
@PostMapping("/create")
|
||||
public Result create(HttpServletRequest request, @RequestBody EventTemplate eventTemplate) {
|
||||
String username = JWTUtil.getUsername(request.getHeader("token"));
|
||||
if (StringUtils.isBlank(username)) {
|
||||
return ResultUtil.error(ResultENum.NOT_LOGIN_ERROR);
|
||||
}
|
||||
eventTemplate.setAddUser(username);
|
||||
eventTemplateService.save(eventTemplate);
|
||||
|
||||
return ResultUtil.success(eventTemplate);
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation("修改事件模板")
|
||||
@RequiresAuthentication
|
||||
@PutMapping("/update")
|
||||
public Result update(HttpServletRequest request, @RequestBody EventTemplate eventTemplate) {
|
||||
|
||||
String username = JWTUtil.getUsername(request.getHeader("token"));
|
||||
if (StringUtils.isBlank(username)) {
|
||||
return ResultUtil.error(ResultENum.NOT_LOGIN_ERROR);
|
||||
}
|
||||
if (eventTemplate.getId() == null) {
|
||||
return ResultUtil.error(ResultENum.PARAM_ERROR);
|
||||
}
|
||||
EventTemplate local = eventTemplateService.getById(eventTemplate.getId());
|
||||
if (local == null) {
|
||||
return ResultUtil.error(ResultENum.DATA_EMPTY_ERROR);
|
||||
}
|
||||
eventTemplate.setUpdateUser(username);
|
||||
eventTemplate.setUpdateTime(new Date());
|
||||
eventTemplateService.updateById(eventTemplate);
|
||||
return ResultUtil.success(eventTemplate);
|
||||
}
|
||||
|
||||
@ApiOperation("删除事件模板")
|
||||
@RequiresAuthentication
|
||||
@DeleteMapping("/delete/{id}")
|
||||
public Result delete(HttpServletRequest request, @PathVariable(value = "id",required = true) Long id) {
|
||||
String username = JWTUtil.getUsername(request.getHeader("token"));
|
||||
if (StringUtils.isBlank(username)) {
|
||||
return ResultUtil.error(ResultENum.NOT_LOGIN_ERROR);
|
||||
}
|
||||
|
||||
EventTemplate local = eventTemplateService.getById(id);
|
||||
if (local == null) {
|
||||
return ResultUtil.error(ResultENum.DATA_EMPTY_ERROR);
|
||||
}
|
||||
|
||||
eventTemplateService.removeById(id);
|
||||
return ResultUtil.success();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,223 @@
|
|||
package com.hcsq.controller;
|
||||
|
||||
import com.alibaba.excel.EasyExcel;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.hcsq.dto.EventTypeDTO;
|
||||
import com.hcsq.entity.*;
|
||||
import com.hcsq.enums.ResultENum;
|
||||
import com.hcsq.service.EventService;
|
||||
import com.hcsq.service.EventTypeService;
|
||||
import com.hcsq.service.UserService;
|
||||
import com.hcsq.util.BeanCopyUtil;
|
||||
import com.hcsq.util.JWTUtil;
|
||||
import com.hcsq.util.Result;
|
||||
import com.hcsq.util.ResultUtil;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.shiro.authz.annotation.RequiresAuthentication;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import springfox.documentation.annotations.ApiIgnore;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 事件-事件类型表 前端控制器
|
||||
* </p>
|
||||
*/
|
||||
|
||||
@Api(description = "事件类型")
|
||||
@RestController
|
||||
@RequestMapping("/eventType")
|
||||
public class EventTypeController {
|
||||
@Resource
|
||||
private EventTypeService eventTypeService;
|
||||
@Resource
|
||||
private EventService eventService;
|
||||
@Resource
|
||||
private UserService userService;
|
||||
@ApiOperation("获取事件类型列表")
|
||||
@RequiresAuthentication
|
||||
@GetMapping("/list")
|
||||
public Result list(HttpServletRequest request,
|
||||
EventType eventType,
|
||||
@RequestParam(name = "size", defaultValue = "10") Integer size,
|
||||
@RequestParam(name = "current", defaultValue = "1") Integer current) {
|
||||
String username = JWTUtil.getUsername(request.getHeader("token"));
|
||||
if (StringUtils.isBlank(username)) {
|
||||
return ResultUtil.error(ResultENum.NOT_LOGIN_ERROR);
|
||||
}
|
||||
|
||||
//查询条件
|
||||
QueryWrapper<EventType> eventTypeWrapper = new QueryWrapper<>();
|
||||
|
||||
queryWrapper(eventType, eventTypeWrapper);
|
||||
Page<EventType> page = new Page<>(current, size);
|
||||
IPage<EventType> resultPage = eventTypeService.page(page, eventTypeWrapper);
|
||||
return ResultUtil.success(resultPage);
|
||||
}
|
||||
|
||||
public void queryWrapper(
|
||||
EventType eventType,
|
||||
QueryWrapper<EventType> eventTypeWrapper) {
|
||||
|
||||
eventTypeWrapper.eq("status", 1);
|
||||
if (eventType.getId() != null) {
|
||||
eventTypeWrapper.eq("id", eventType.getId());
|
||||
}
|
||||
if (eventType.getPid() != null) {
|
||||
eventTypeWrapper.eq("pid", eventType.getPid());
|
||||
}
|
||||
eventTypeWrapper.orderByAsc("id");
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation("获取事件类型列表和总数")
|
||||
@RequiresAuthentication
|
||||
@GetMapping("/listType")
|
||||
public Result listType(HttpServletRequest request,
|
||||
EventType eventType,
|
||||
@RequestParam(name = "size", defaultValue = "10") Integer size,
|
||||
@RequestParam(name = "current", defaultValue = "1") Integer current) {
|
||||
String username = JWTUtil.getUsername(request.getHeader("token"));
|
||||
if (StringUtils.isBlank(username)) {
|
||||
return ResultUtil.error(ResultENum.NOT_LOGIN_ERROR);
|
||||
}
|
||||
|
||||
//查询条件
|
||||
QueryWrapper<EventType> eventTypeWrapper = new QueryWrapper<>();
|
||||
eventType.setPid(0);
|
||||
queryWrapper(eventType, eventTypeWrapper);
|
||||
Page<EventType> page = new Page<>(current, size);
|
||||
IPage<EventType> resultPage = eventTypeService.page(page, eventTypeWrapper);
|
||||
List<EventType> records = resultPage.getRecords();
|
||||
List<EventTypeDTO> eventTypeDTOS = new ArrayList<>();
|
||||
Integer total =0;
|
||||
for (int i = 0; i < records.size(); i++) {
|
||||
EventTypeDTO eventTypeDTO = new EventTypeDTO();
|
||||
QueryWrapper<EventType> eventTypeWrapper1 = new QueryWrapper<>();
|
||||
eventTypeWrapper1.eq("pid",records.get(i).getId());
|
||||
List<EventType> list = eventTypeService.list(eventTypeWrapper1);
|
||||
QueryWrapper<Event> eventQueryWrapper = new QueryWrapper<>();
|
||||
Set<Integer> integers = list.stream().map(EventType::getId).collect(Collectors.toSet());
|
||||
integers.add(records.get(i).getId());
|
||||
eventQueryWrapper.in("event_type_id",integers);
|
||||
int count = eventService.count(eventQueryWrapper);
|
||||
BeanCopyUtil.copyProperties(records.get(i),eventTypeDTO);
|
||||
eventTypeDTO.setCount(count);
|
||||
total = total+count;
|
||||
eventTypeDTOS.add(eventTypeDTO);
|
||||
}
|
||||
Map map = new HashMap();
|
||||
map.put("records",eventTypeDTOS);
|
||||
map.put("total",total);
|
||||
return ResultUtil.success(map);
|
||||
}
|
||||
|
||||
@ApiOperation("导出事件类型列表")
|
||||
@GetMapping("/export")
|
||||
public void export(HttpServletResponse response,
|
||||
@RequestParam(name = "currentUser", required = true) String currentUser,
|
||||
EventType eventType) {
|
||||
if (StringUtils.isBlank(currentUser)) {
|
||||
return;
|
||||
}
|
||||
|
||||
//查询条件
|
||||
QueryWrapper<EventType> eventTypeWrapper = new QueryWrapper<>();
|
||||
|
||||
|
||||
queryWrapper(eventType, eventTypeWrapper);
|
||||
|
||||
List<EventType> list = eventTypeService.list(eventTypeWrapper);
|
||||
|
||||
response.addHeader("Access-Control-Allow-Origin", "*");
|
||||
response.setHeader("content-Type", "application/vnd.ms-excel");
|
||||
// 下载文件的默认名称(设置下载文件的默认名称)
|
||||
response.setHeader("Content-Disposition", "attachment;filename=eventType.xlsx");
|
||||
//导出操作
|
||||
try {
|
||||
EasyExcel.write(response.getOutputStream(), EventType.class).sheet("事件类型").doWrite(list);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ApiOperation("新增事件类型")
|
||||
@RequiresAuthentication
|
||||
@PostMapping("/create")
|
||||
public Result create(HttpServletRequest request, @RequestBody EventType eventType) {
|
||||
String username = JWTUtil.getUsername(request.getHeader("token"));
|
||||
if (StringUtils.isBlank(username)) {
|
||||
return ResultUtil.error(ResultENum.NOT_LOGIN_ERROR);
|
||||
}
|
||||
eventType.setAddUser(username);
|
||||
eventTypeService.save(eventType);
|
||||
|
||||
return ResultUtil.success(eventType);
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation("修改事件类型")
|
||||
@RequiresAuthentication
|
||||
@PutMapping("/update")
|
||||
public Result update(HttpServletRequest request, @RequestBody EventType eventType) {
|
||||
|
||||
String username = JWTUtil.getUsername(request.getHeader("token"));
|
||||
if (StringUtils.isBlank(username)) {
|
||||
return ResultUtil.error(ResultENum.NOT_LOGIN_ERROR);
|
||||
}
|
||||
if (eventType.getId() == null) {
|
||||
return ResultUtil.error(ResultENum.PARAM_ERROR);
|
||||
}
|
||||
EventType local = eventTypeService.getById(eventType.getId());
|
||||
if (local == null) {
|
||||
return ResultUtil.error(ResultENum.DATA_EMPTY_ERROR);
|
||||
}
|
||||
eventType.setUpdateUser(username);
|
||||
eventType.setUpdateTime(new Date());
|
||||
eventTypeService.updateById(eventType);
|
||||
return ResultUtil.success(eventType);
|
||||
}
|
||||
|
||||
@ApiOperation("删除事件类型")
|
||||
@RequiresAuthentication
|
||||
@DeleteMapping("/delete/{id}")
|
||||
public Result delete(HttpServletRequest request, @PathVariable(value = "id",required = true) Long id) {
|
||||
String username = JWTUtil.getUsername(request.getHeader("token"));
|
||||
if (StringUtils.isBlank(username)) {
|
||||
return ResultUtil.error(ResultENum.NOT_LOGIN_ERROR);
|
||||
}
|
||||
|
||||
EventType local = eventTypeService.getById(id);
|
||||
if (local == null) {
|
||||
return ResultUtil.error(ResultENum.DATA_EMPTY_ERROR);
|
||||
}
|
||||
|
||||
eventTypeService.removeById(id);
|
||||
return ResultUtil.success();
|
||||
}
|
||||
|
||||
@ApiOperation("获取事件类型树状数据")
|
||||
@RequiresAuthentication
|
||||
@GetMapping("/tree")
|
||||
public Result tree(HttpServletRequest request, Integer pid,
|
||||
EventType eventType) {
|
||||
String username = JWTUtil.getUsername(request.getHeader("token"));
|
||||
if (StringUtils.isBlank(username)) {
|
||||
return ResultUtil.error(ResultENum.NOT_LOGIN_ERROR);
|
||||
}
|
||||
|
||||
List<EventTypeTree> resultPage = eventTypeService.getTreeBy(pid);
|
||||
return ResultUtil.success(resultPage);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
package com.hcsq.dto;
|
||||
|
||||
import com.hcsq.entity.Event;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class EventDTO extends Event {
|
||||
private String areaName;
|
||||
}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
package com.hcsq.dto;
|
||||
|
||||
|
||||
import com.hcsq.entity.EventNode;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class EventNodeDTO extends EventNode {
|
||||
|
||||
private Integer count;
|
||||
}
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
package com.hcsq.dto;
|
||||
|
||||
import com.hcsq.entity.EventType;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class EventTypeDTO extends EventType {
|
||||
|
||||
private Integer count;
|
||||
}
|
||||
|
|
@ -0,0 +1,89 @@
|
|||
package com.hcsq.entity;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelIgnore;
|
||||
import com.alibaba.excel.annotation.format.DateTimeFormat;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.Min;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 事件-历程表
|
||||
* </p>
|
||||
*
|
||||
|
||||
|
||||
*/
|
||||
@TableName("event_course")
|
||||
@Data
|
||||
public class EventCourse extends Model<EventCourse> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId(value="id", type= IdType.AUTO)
|
||||
@ExcelIgnore
|
||||
private Integer id;
|
||||
/**
|
||||
* 事件id
|
||||
*/
|
||||
@ExcelIgnore
|
||||
@TableField("event_id")
|
||||
private Integer eventId;
|
||||
/**
|
||||
* 模板id
|
||||
*/
|
||||
@ExcelIgnore
|
||||
@TableField("template_id")
|
||||
private Integer templateId;
|
||||
/**
|
||||
* 节点id
|
||||
*/
|
||||
@ExcelIgnore
|
||||
@TableField("node_id")
|
||||
private Integer nodeId;
|
||||
/**
|
||||
* 节点关系id
|
||||
*/
|
||||
@TableField("relation_id")
|
||||
private Integer relationId;
|
||||
/**
|
||||
* 历程提示语
|
||||
*/
|
||||
private String prompt;
|
||||
/**
|
||||
* 字段信息
|
||||
*/
|
||||
@TableField("field_information")
|
||||
private String fieldInformation;
|
||||
@TableField("add_user")
|
||||
private Integer addUser;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone="GMT+8")
|
||||
@DateTimeFormat("yyyy-MM-dd HH:mm:ss")
|
||||
@TableField("add_time")
|
||||
private Date addTime;
|
||||
@TableField("update_user")
|
||||
private Integer updateUser;
|
||||
@TableField("update_time")
|
||||
private Date updateTime;
|
||||
/**
|
||||
* 状态 1正常 0删除
|
||||
*/
|
||||
private Integer status;
|
||||
private String memo;
|
||||
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue