This commit is contained in:
yzy 2024-03-14 15:15:07 +08:00
parent 583ca60498
commit 6ae2d0d53d
661 changed files with 49875 additions and 381 deletions

View File

@ -2,10 +2,10 @@
spring:
redis:
##redis 单机环境配置
host: http://127.0.0.1/
port: 6379
host: 197.52.29.131
port: 16379
timeout: 10000
password: P@ssw0rd_redis
password:
database: 0
ssl: false
##redis 集群环境配置
@ -13,12 +13,12 @@ spring:
# nodes: 47.108.70.243:7001,47.108.70.243:7002,47.108.70.243:7003
# commandTimeout: 5000
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
driver-class-name: com.alipay.oceanbase.jdbc.Driver
druid:
validation-query: select 1
url: jdbc:mysql://36.147.33.60:13306/security?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&tinyInt1isBit=false&allowMultiQueries=true&serverTimezone=GMT%2B8&allowPublicKeyRetrieval=true
username: root
password: P@ssw0rd_mysql
url: jdbc:oceanbase://oceanbase.test.htb.srv:2883/sisdev?useUnicode=true&characterEncoding=utf-8&mode=mysql&rewriteBatchedStatements=true&socketTimeout=6000000&connectTimeout=60000&allowMultiQueries=true&useLocalSessionState=true
username: htb_test_obcluster:secretiy:secretiydev
password: secretiydev
#项目模块集中配置
blade:
@ -32,7 +32,7 @@ blade:
ribbon:
rule:
#开启配置
enabled: false
enabled: true
#负载均衡优先调用的ip段
prior-ip-pattern:
- 192.168.0.*
@ -40,9 +40,9 @@ blade:
#通用开发生产环境数据库地址(特殊情况可在对应的子工程里配置覆盖)
datasource:
dev:
url: jdbc:mysql://36.147.33.60:13306/security?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&tinyInt1isBit=false&allowMultiQueries=true&serverTimezone=GMT%2B8&allowPublicKeyRetrieval=true
username: root
password: P@ssw0rd_mysql
url: jdbc:oceanbase://oceanbase.test.htb.srv:2883/sisdev?useUnicode=true&characterEncoding=utf-8&mode=mysql&rewriteBatchedStatements=true&socketTimeout=6000000&connectTimeout=60000&allowMultiQueries=true&useLocalSessionState=true
username: htb_test_obcluster:secretiy:secretiydev
password: secretiydev
#
# Emb(消息总线请求参数)配置 -sit
@ -100,11 +100,11 @@ single:
chnl-tp: 41022
#secutity-yml配置文件
#ht-secutity-yml配置文件
#导出文件的存储路径
export:
excel:
path: D:\安全管理信息化平台\excel导出测试\
path: D:\云南红塔银行安保项目\excel导出测试\
#swagger包扫描路径
swagger:
@ -117,3 +117,28 @@ common:
payPlanRemindKeyName: payPlanRemindDay #付款计划提醒提前天数字典配置键值
concatDeadlineRemindKeyName: concatDeadlineRemindDay #合同到期提醒提前天数字典配置键值
service_path: /home/test/apps/file/ # 服务器存放文件路径-用于附件删除
#定时任务参数配置
schedule:
#【定时任务】自动生成设备检查任务
deviceInspectionCron: 0 0 1 * * ?
#【定时任务】设备类型变更关联设备检查对应字段变更
deviceCatgChangeCron: 0 0 3 * * ?
#【定时任务】设备检查是否超时
deviceInspOvertimeCron: 0 1 0 * * ?
#【定时任务】检查设备是否超维保期限使用
deviceOvertimeCron: 0 0 1 * * ?
#【定时任务】检测提报任务是否超时
taskOvertimeCron: 0 1 0 * * ?
#【定时任务】任务发布
taskPublishCron: 0 0 1 * * ?
#【定时任务】任务到期终止
taskExpireCron: 0 1 0 * * ?
#【定时任务】检查禁用后重启用的员工并重启用
reEnableEmplyeeCron: 0 0 0 * * ?
#【定时任务】检查禁用后重启用的机构并重启用
reEnableDeptCron: 0 0 0 * * ?
#【定时任务】检查工作提醒是否超过提醒结束日期
remindNoteOvertimeCron: 0 1 0 * * ?
#【定时任务】触发同步机构员工
syncEmpDeptCron: 0 0 1 * * ?

View File

@ -48,7 +48,7 @@ blade:
username: htb_ap_obcluster:sis:secretiy
password: SECRETIY_P@ssw0rd@123
#security-busi-yml配置
#ht-security-yml配置
#通用配置参数
common:
projectRoleName: 安全员 #项目预算管理-项目结项后可以对结项项目进行操作的指属上一级机构的角色名称
@ -123,3 +123,28 @@ single:
scvcd: 30430034 #上esb获取用户信息的服务码
user-url: http://197.32.39.34:8000/security-auth/oauth/token #应用系统获取token地址
chnl-tp: 41022
#定时任务参数配置
schedule:
#【定时任务】自动生成设备检查任务
deviceInspectionCron: 0 0 1 * * ?
#【定时任务】设备类型变更关联设备检查对应字段变更
deviceCatgChangeCron: 0 0 3 * * ?
#【定时任务】设备检查是否超时
deviceInspOvertimeCron: 0 1 0 * * ?
#【定时任务】检查设备是否超维保期限使用
deviceOvertimeCron: 0 0 1 * * ?
#【定时任务】检测提报任务是否超时
taskOvertimeCron: 0 1 0 * * ?
#【定时任务】任务发布
taskPublishCron: 0 0 1 * * ?
#【定时任务】任务到期终止
taskExpireCron: 0 1 0 * * ?
#【定时任务】检查禁用后重启用的员工并重启用
reEnableEmplyeeCron: 0 0 0 * * ?
#【定时任务】检查禁用后重启用的机构并重启用
reEnableDeptCron: 0 0 0 * * ?
#【定时任务】检查工作提醒是否超过提醒结束日期
remindNoteOvertimeCron: 0 1 0 * * ?
#【定时任务】触发同步机构员工
syncEmpDeptCron: 0 0 1 * * ?

View File

@ -125,3 +125,28 @@ common:
securityRoleName: 安全员 #安保指挥中心非现场检查整改通知书通知机构的角色
payPlanRemindKeyName: payPlanRemindDay #付款计划提醒提前天数字典配置键值
concatDeadlineRemindKeyName: concatDeadlineRemindDay #合同到期提醒提前天数字典配置键值
#定时任务参数配置
schedule:
#【定时任务】自动生成设备检查任务
deviceInspectionCron: 0 0 1 * * ?
#【定时任务】设备类型变更关联设备检查对应字段变更
deviceCatgChangeCron: 0 0 3 * * ?
#【定时任务】设备检查是否超时
deviceInspOvertimeCron: 0 1 0 * * ?
#【定时任务】检查设备是否超维保期限使用
deviceOvertimeCron: 0 0 1 * * ?
#【定时任务】检测提报任务是否超时
taskOvertimeCron: 0 1 0 * * ?
#【定时任务】任务发布
taskPublishCron: 0 0 1 * * ?
#【定时任务】任务到期终止
taskExpireCron: 0 1 0 * * ?
#【定时任务】检查禁用后重启用的员工并重启用
reEnableEmplyeeCron: 0 0 0 * * ?
#【定时任务】检查禁用后重启用的机构并重启用
reEnableDeptCron: 0 0 0 * * ?
#【定时任务】检查工作提醒是否超过提醒结束日期
remindNoteOvertimeCron: 0 1 0 * * ?
#【定时任务】触发同步机构员工
syncEmpDeptCron: 0 0 1 * * ?

View File

@ -82,15 +82,15 @@ http {
listen 8887;
server_name web-test;
location ^~ /sis/ {
proxy_pass http://127.0.0.1:8889;
proxy_pass http://127.0.0.1:8889;
}
}
server {
listen 8888;
server_name web;
#root /home/test/apps/security-manage/security/dist;
#root /home/test/apps/ht-security-manage/security/dist;
##location /file/ {
## root /home/test/apps;
## autoindex on;
@ -141,7 +141,7 @@ http {
index index.html;
try_files $uri $uri/ /@router;
}
location @router {
rewrite ^.*$ /index.html last;
}

View File

@ -82,7 +82,7 @@ http {
server {
listen 8888;
server_name web;
#root /home/test/apps/security-manage/security/dist;
#root /home/test/apps/ht-security-manage/security/dist;
#location /file/ {
# root /home/test/apps;

View File

@ -51,7 +51,7 @@ delete from act_ru_execution;
-- 考核评价
update t_assessment set process_definition_id = null, process_instance_id = null, state = '0';
-- 设备检查/整改/持续整改
update t_device_inspection set process_definition_id = null, process_instance_id = null, ins_process_definition_id = null, ins_process_instance_id = null, rec_process_definition_id = null, rec_process_instance_id = null, state = '0';
update t_device_inspection set process_definition_id = null, process_instance_id = null, ins_process_definition_id = null, ins_process_instance_id = null, rec_process_definition_id = null, rec_process_instance_id = null,state = '0';-- 设备检查明细
-- 设备检查明细
update t_device_inspection_line set process_definition_id = null, process_instance_id = null, state = '0';
-- 值班备勤

14
pom.xml
View File

@ -139,13 +139,13 @@
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>com.spotify</groupId>
<artifactId>dockerfile-maven-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
<!-- <plugin>-->
<!-- <groupId>com.spotify</groupId>-->
<!-- <artifactId>dockerfile-maven-plugin</artifactId>-->
<!-- <configuration>-->
<!-- <skip>true</skip>-->
<!-- </configuration>-->
<!-- </plugin>-->
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>

View File

@ -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>security-service-api</artifactId>
<groupId>org.security</groupId>
<version>2.8.1.RELEASE</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>ht-security-api</artifactId>
<name>${project.artifactId}</name>
<version>${bladex.project.version}</version>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-openfeign-core</artifactId>
<version>2.2.8.RELEASE</version>
<scope>compile</scope>
</dependency>
</dependencies>
<packaging>jar</packaging>
</project>

View File

@ -0,0 +1,256 @@
/*
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the dreamlu.net developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: Chill 庄骞 (smallchill@163.com)
*/
package org.security.ht.entity.basic;
import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* 基础信息-组织机构实体类
*
* @author BladeX
* @since 2022-03-07
*/
@Data
@TableName("T_DEPARTMENT")
@ApiModel(value = "Department对象", description = "基础信息-组织机构")
public class Department implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 创建人
*/
// @ExcelIgnore
@ApiModelProperty(value = "创建人")
@TableField(fill = FieldFill.INSERT)
private String createdBy;
/**
* 创建时间
*/
// @ExcelIgnore
@ApiModelProperty(value = "创建时间")
@TableField(fill = FieldFill.INSERT)
private Date createdTime;
/**
* 更新人
*/
// @ExcelIgnore
@ApiModelProperty(value = "更新人")
@TableField(fill = FieldFill.INSERT_UPDATE)
private String updatedBy;
/**
* 更新时间
*/
// @ExcelIgnore
@ApiModelProperty(value = "更新时间")
@TableField(fill = FieldFill.INSERT_UPDATE)
private Date updatedTime;
/**
* ID
*/
@ApiModelProperty(value = "ID")
@TableId("ID")
private Long id;
/**
* 上级机构id
*/
@ApiModelProperty(value = "上级机构id")
@TableField("PARENT_ID")
private Long parentId;
/**
* 名称
*/
@ApiModelProperty(value = "名称")
@TableField("DEPT_NAME")
private String deptName;
/**
* 机构全称
*/
@ApiModelProperty(value = "机构全称")
@TableField("FULL_NAME")
private String fullName;
/**
* 祖级机构主键
*/
@ApiModelProperty(value = "祖级机构主键")
@TableField("ANCESTORS")
private String ancestors;
/**
* 机构层级
*/
@ApiModelProperty(value = "层级")
@TableField("DEPT_LEVEL")
private String deptLevel;
/**
* 机构简介
*/
@ApiModelProperty(value = "机构简介")
@TableField("SUMMARY")
private String summary;
/**
* 地址
*/
@ApiModelProperty(value = "地址")
@TableField("ADDRESS")
private String address;
/**
* 毗邻单位东
*/
@ApiModelProperty(value = "毗邻单位")
@TableField("NEIGHBOR_DEPT")
private String neighborDept;
/**
* 建设时间
*/
@ApiModelProperty(value = "建设时间")
@TableField("CONSTRUCTION_DATE")
private String constructionDate;
/**
* 开业时间
*/
@ApiModelProperty(value = "开业时间")
@TableField("OPEN_DATE")
private String openDate;
/**
* 主要负责人
*/
@ApiModelProperty(value = "主要负责人")
@TableField("LEADER")
private String leader;
/**
* 安全员
*/
@ApiModelProperty(value = "安全员")
@TableField("SAFETY_OFFICER")
private String safetyOfficer;
/**
* 分管领导
*/
@ApiModelProperty(value = "分管领导")
@TableField("LEADER_IN_CHARGE")
private String leaderInCharge;
/**
* 人数
*/
@ApiModelProperty(value = "人数")
@TableField("PEOPLE_NUMBER")
private Integer peopleNumber;
/**
* 逻辑删除标识符;1-删除0-正常
*/
@ApiModelProperty(value = "逻辑删除标识符;0-正常1-删除")
@TableField("DEL_FLAG")
@TableLogic
private String delFlag;
/**
* 机构号
*/
@ApiModelProperty(value = "机构号")
@TableField("DEPT_NO")
private String deptNo;
/**
* 设计资料文件地址
*/
@ApiModelProperty(value = "设计资料文件地址")
@TableField("DESIGN_DATA")
private String designData;
/**
* 建设资料文件地址
*/
@ApiModelProperty(value = "建设资料文件地址")
@TableField("CONSTRUCTION_DATA")
private String constructionData;
/**
* 验收资料文件地址
*/
@ApiModelProperty(value = "验收资料文件地址")
@TableField("ACCEPTANCE_DATA")
private String acceptanceData;
/**
* 自助银行类型1-行内2-离行
*/
@ApiModelProperty(value = "自助银行类型1-行内、2-离行")
@TableField("SELF_BANK_TYPE")
private String selfBankType;
/**
* 机构类型1-总行2-分行3-支行4-自助银行
*/
@ApiModelProperty(value = "机构类型1-总行、2-分行、3-支行、4-自助银行")
@TableField("DEPT_CATEGORY")
private String deptCategory;
/**
* 机构经度
*/
@ApiModelProperty(value = "机构经度")
@TableField("LONGITUDE")
private String longitude;
/**
* 机构纬度
*/
@ApiModelProperty(value = "机构纬度")
@TableField("LATITUDE")
private String latitude;
/**
* 机构照片groupName
*/
@ApiModelProperty(value = "机构照片groupName")
@TableField("GROUP_NAME")
private String groupName;
/**
* 机构证照groupName
*/
@ApiModelProperty(value = "机构证照groupName")
@TableField("QUA_GROUP_NAME")
private String quaGroupName;
/**
* 成立时间
*/
@ApiModelProperty(value = "成立时间")
@TableField("ESTABLISH_DATE")
private String establishDate;
/**
* 改建/扩建时间
*/
@ApiModelProperty(value = "改建/扩建时间")
@TableField("REBUILD_DATE")
private String rebuildDate;
/**
* 场所面积
*/
@ApiModelProperty(value = "场所面积")
@TableField("AREA")
private String area;
/**
* 其他
*/
@ApiModelProperty(value = "其他")
@TableField("OTHER")
private String other;
}

View File

@ -0,0 +1,267 @@
/*
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the dreamlu.net developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: Chill 庄骞 (smallchill@163.com)
*/
package org.security.ht.entity.basic;
import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* 基础信息-设备信息实体类
*
* @author BladeX
* @since 2022-03-16
*/
@Data
@TableName("T_DEVICE")
@ApiModel(value = "Device对象", description = "基础信息-设备信息")
public class Device implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 创建人
*/
// @ExcelIgnore
@ApiModelProperty(value = "创建人")
@TableField(fill = FieldFill.INSERT)
private String createdBy;
/**
* 创建时间
*/
// @ExcelIgnore
@ApiModelProperty(value = "创建时间")
@TableField(fill = FieldFill.INSERT)
private Date createdTime;
/**
* 更新人
*/
// @ExcelIgnore
@ApiModelProperty(value = "更新人")
@TableField(fill = FieldFill.INSERT_UPDATE)
private String updatedBy;
/**
* 更新时间
*/
// @ExcelIgnore
@ApiModelProperty(value = "更新时间")
@TableField(fill = FieldFill.INSERT_UPDATE)
private Date updatedTime;
/**
* ID
*/
@ApiModelProperty(value = "ID")
@TableId("ID")
private String id;
/**
* 名称
*/
@ApiModelProperty(value = "名称")
@TableField("NAME")
private String name;
/**
* 设备编号
*/
@ApiModelProperty(value = "设备编号")
@TableField("DEVICE_NUM")
private String deviceNum;
/**
* 二维码
*/
@ApiModelProperty(value = "二维码")
@TableField("QR_CODE")
private String qrCode;
/**
* 设备类型
*/
@ApiModelProperty(value = "设备类型")
@TableField("TYPE_ID")
private String typeId;
/**
* 设备类型
*/
@ApiModelProperty(value = "类型层级")
@TableField("TYPE_RANK")
private String typeRank;
/**
* 所属机构
*/
@ApiModelProperty(value = "所属机构")
@TableField("DEP_ID")
private String depId;
/**
* 所属机构名称
*/
@ApiModelProperty(value = "所属机构名称")
@TableField("DEPT_NAME")
private String deptName;
/**
* 放置地址
*/
@ApiModelProperty(value = "放置地址")
@TableField("ADDRESS")
private String address;
/**
* 购买时间
*/
@ApiModelProperty(value = "购买时间")
@TableField("BUY_DATE")
private String buyDate;
/**
* 安装时间
*/
@ApiModelProperty(value = "安装时间")
@TableField("INSTALL_DATE")
private String installDate;
/**
* 设备处置时间原到期时间
*/
@ApiModelProperty(value = "设备处置时间")
@TableField("END_DATE")
private String endDate;
/**
* 维保期限
*/
@ApiModelProperty(value = "维保期限")
@TableField("MAINTENANCE_DATE")
@JsonFormat(pattern = "yyyy-MM-dd")
private Date maintenanceDate;
/**
* 设备厂商
*/
@ApiModelProperty(value = "设备厂商")
@TableField("COMPANY")
private String company;
/**
* 设备型号
*/
@ApiModelProperty(value = "设备型号")
@TableField("MODEL_NUM")
private String modelNum;
/**
* 设备照片
*/
@ApiModelProperty(value = "设备照片")
@TableField("PIC_IDS")
private String picIds;
/**
* 备注
*/
@ApiModelProperty(value = "备注")
@TableField("REMARK")
private String remark;
/**
* 设备使用状态;0-未使用 1-正常使用中 2-超期使用中 3-已处置
*/
@ApiModelProperty(value = "设备使用状态;0-未使用 1-正常使用中 2-超期使用中 3-已处置")
@TableField("USAGE_STATE")
private String usageState;
/**
* 设备检查状态;4-检查中5-检查完成6-待整改7-整改完成8-超期未检查
*/
@ApiModelProperty(value = "设备检查状态;4-检查中5-检查完成6-待整改7-整改完成8-超期未检查")
@TableField("STATE")
private String state;
/**
* 原设备使用状态;0-未使用 1-正常使用中 2-超期使用中 3-超期未使用
*/
@ApiModelProperty(value = "原设备使用状态")
@TableField("ORG_STATE")
private String orgState;
/**
*检查频次
*/
@ApiModelProperty(value = "检查频次")
@TableField("FREQUENCY")
private String frequency;
/**
* 逻辑删除标识符;1-删除0-正常
*/
@ApiModelProperty(value = "逻辑删除标识符;0-正常1-删除")
@TableField("DEL_FLAG")
@TableLogic
private String delFlag;
/**
* 像素
*/
@ApiModelProperty(value = "像素")
@TableField("PIXEL")
private String pixel;
/**
* 满足标准
*/
@ApiModelProperty(value = "满足标准")
@TableField("STANDARD")
private String standard;
/**
* 最近检查时间
*/
@ApiModelProperty(value = "最近检查时间")
@TableField("LATEST_INSPECTION_TIME")
private Date latestInspectionTime;
/**
* 设备状态0-故障1-正常
*/
@ApiModelProperty(value = "设备状态0-故障1-正常)")
@TableField("DEVICE_STATE")
private String deviceState;
/**
* 附件groupName
*/
@ApiModelProperty(value = "附件groupName")
@TableField("GROUP_NAME")
private String groupName;
@ApiModelProperty(value = "角色ID")
private String roleId;
@ApiModelProperty(value = "检查人ID")
private String dutyUserId;
@ApiModelProperty(value = "检查人姓名")
private String dutyUserName;
/**
* 安装方
*/
@ApiModelProperty(value = "安装方")
@TableField("INSTALLER")
private String installer;
/**
* 是否自动检查维保到期情况0- 1-
*/
@ApiModelProperty(value = "是否自动检查维保到期情况0-否 1-是)")
@TableField("AUTO_CHECK")
private String autoCheck;
/**
* 不自动检查维保到期的原因
*/
@ApiModelProperty(value = "不自动检查维保到期的原因")
@TableField("AUTO_REASON")
private String autoReason;
/**
* 检查时必须先扫码0- 1-
*/
@ApiModelProperty(value = "检查时必须先扫码0-否 1-是)")
@TableField("NEED_SCAN")
private String needScan;
}

View File

@ -0,0 +1,218 @@
/*
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the dreamlu.net developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: Chill 庄骞 (smallchill@163.com)
*/
package org.security.ht.entity.basic;
import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.*;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.security.ht.entity.common.BaseEntity;
/**
* 基础信息-员工实体类
*
* @author BladeX
* @since 2022-03-07
*/
@Data
@TableName("T_EMPLOYEE")
@ApiModel(value = "Employee对象", description = "基础信息-员工")
public class Employee extends BaseEntity implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 部门ID
*/
@ApiModelProperty(value = "部门ID")
@TableField("DEPT_ID")
private String deptId;
/**
* 是否借调 0- 1-
*/
@ApiModelProperty(value = "是否借调 0-否 1-是)")
@TableField("IS_SECONDED")
private String isSeconded;
/**
* 被借调前原部门ID
*/
@ApiModelProperty(value = "原部门ID")
@TableField("SECOND_DEPT_ID")
private String secondDeptId;
/**
* 姓名
*/
@ApiModelProperty(value = "姓名")
@TableField("NAME")
private String name;
/**
* 性别
*/
@ApiModelProperty(value = "性别")
@TableField("GENDER")
private String gender;
/**
* 年龄
*/
@ApiModelProperty(value = "年龄")
@TableField("AGE")
private String age;
/**
* 出生日期
*/
@ApiModelProperty(value = "出生日期")
@TableField("BIRTHDAY")
private String birthday;
/**
* 身份证号
*/
@ApiModelProperty(value = "身份证号")
@TableField("ID_CARD")
private String idCard;
/**
* 民族
*/
@ApiModelProperty(value = "民族")
@TableField("NATION")
private String nation;
/**
* 政治面貌
*/
@ApiModelProperty(value = "政治面貌")
@TableField("POLITICS")
private String politics;
/**
* 参加工作时间
*/
@ApiModelProperty(value = "参加工作时间")
@TableField("WORK_BEGIN_DATE")
private String workBeginDate;
/**
* 专业技术职称
*/
@ApiModelProperty(value = "专业技术职称")
@TableField("JOB_TITLE")
private String jobTitle;
/**
* 岗位
*/
@ApiModelProperty(value = "岗位")
@TableField("JOB")
private String job;
/**
* 联系电话
*/
@ApiModelProperty(value = "联系电话")
@TableField("PHONE")
private String phone;
/**
* 通讯地址
*/
@ApiModelProperty(value = "通讯地址")
@TableField("ADDRESS")
private String address;
/**
* 毕业院校
*/
@ApiModelProperty(value = "毕业院校")
@TableField("SCHOOL")
private String school;
/**
* 最高学历
*/
@ApiModelProperty(value = "最高学历")
@TableField("EDUCATION")
private String education;
/**
* 身份证正面
*/
@ApiModelProperty(value = "身份证正面")
@TableField("ID_CARD_FRONT")
private String idCardFront;
/**
* 身份证反面
*/
@ApiModelProperty(value = "身份证反面")
@TableField("ID_CARD_BACK")
private String idCardBack;
/**
* 证件照
*/
@ApiModelProperty(value = "证件照")
@TableField("PIC")
private String pic;
/**
* 状态;1-正常 2-异常
*/
@ApiModelProperty(value = "状态;1-正常 2-异常")
@TableField("STATE")
private BigDecimal state;
/**
* 逻辑删除标识符;1-删除0-正常
*/
@ApiModelProperty(value ="逻辑删除标识符;0-正常1-删除")
@TableField("DEL_FLAG")
@TableLogic
private String delFlag;
/**
* 入职日期
*/
@ApiModelProperty(value = "入职日期")
@TableField("JOB_DATE")
private String jobDate;
/**
* 岗位类型 1-机构负责人2-安全部门负责人3-安全员4-义务消防员5-其他
*/
@ApiModelProperty(value = "岗位类型 1-机构负责人2-安全部门负责人3-安全员4-义务消防员5-其他)")
@TableField("CIVILAIR_DEFENSE_TYPE")
private String civilAirDefenseType;
/**
* 员工号
*/
@ApiModelProperty(value = "员工号")
@TableField("EMPLOYEE_NO")
private String employeeNo;
/**
* 分管领导ID
*/
@ApiModelProperty(value = "分管领导")
@TableField("LEADER")
private String leader;
@ApiModelProperty(value = "证件照groupname")
@TableField("GROUP_NAME_head")
private String groupNameHead;
@ApiModelProperty(value = "身份证正面照groupname")
@TableField("GROUP_NAME_FRONT")
private String groupNameFront;
@ApiModelProperty(value = "身份证背面照groupname")
@TableField("GROUP_NAME_BACK")
private String groupNameBack;
@ApiModelProperty(value = "附件groupname")
@TableField("GROUP_NAME")
private String groupName;
}

View File

@ -0,0 +1,162 @@
/*
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the dreamlu.net developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: Chill 庄骞 (smallchill@163.com)
*/
package org.security.ht.entity.basic;
import com.baomidou.mybatisplus.annotation.*;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
* 基础信息-员工家庭成员实体类
*
* @author BladeX
* @since 2022-03-08
*/
@Data
@TableName("T_FAMILY")
@ApiModel(value = "Family对象", description = "基础信息-员工家庭成员")
public class Family implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 创建人
*/
// @ExcelIgnore
@ApiModelProperty(value = "创建人")
@TableField(fill = FieldFill.INSERT)
private String createdBy;
/**
* 创建时间
*/
// @ExcelIgnore
@ApiModelProperty(value = "创建时间")
@TableField(fill = FieldFill.INSERT)
private Date createdTime;
/**
* 更新人
*/
// @ExcelIgnore
@ApiModelProperty(value = "更新人")
@TableField(fill = FieldFill.INSERT_UPDATE)
private String updatedBy;
/**
* 更新时间
*/
// @ExcelIgnore
@ApiModelProperty(value = "更新时间")
@TableField(fill = FieldFill.INSERT_UPDATE)
private Date updatedTime;
/**
* ID
*/
@ApiModelProperty(value = "ID")
@TableId("ID")
private String id;
/**
* 员工ID
*/
@ApiModelProperty(value = "员工ID")
@TableField("EMPLOYEE_ID")
private String employeeId;
/**
* 姓名
*/
@ApiModelProperty(value = "姓名")
@TableField("NAME")
private String name;
/**
* 与本人关系
*/
@ApiModelProperty(value = "与本人关系")
@TableField("RELATIONSHIP")
private String relationship;
/**
* 出生年月
*/
@ApiModelProperty(value = "出生年月")
@TableField("BIRTH")
private String birth;
/**
* 性别
*/
@ApiModelProperty(value = "性别")
@TableField("GENDER")
private String gender;
/**
* 身份证号
*/
@ApiModelProperty(value = "身份证号")
@TableField("ID_CARD")
private String idCard;
/**
* 工作单位
*/
@ApiModelProperty(value = "工作单位")
@TableField("WORK_PLACE")
private String workPlace;
/**
* 联系电话
*/
@ApiModelProperty(value = "联系电话")
@TableField("PHONE")
private String phone;
/**
* 逻辑删除标识符;1-删除0-正常
*/
@ApiModelProperty(value = "逻辑删除标识符;0-正常1-删除")
@TableField("DEL_FLAG")
@TableLogic
private String delFlag;
/**
* 备用字段1
*/
@ApiModelProperty(value = "备用字段1")
@TableField("RESERVE1")
private String reserve1;
/**
* 备用字段2
*/
@ApiModelProperty(value = "备用字段2")
@TableField("RESERVE2")
private String reserve2;
/**
* 备用字段3
*/
@ApiModelProperty(value = "备用字段3")
@TableField("RESERVE3")
private String reserve3;
/**
* 备用字段4
*/
@ApiModelProperty(value = "备用字段4")
@TableField("RESERVE4")
private String reserve4;
/**
* 备用字段5
*/
@ApiModelProperty(value = "备用字段5")
@TableField("RESERVE5")
private String reserve5;
}

View File

@ -0,0 +1,144 @@
/*
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the dreamlu.net developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: Chill 庄骞 (smallchill@163.com)
*/
package org.security.ht.entity.basic;
import com.baomidou.mybatisplus.annotation.*;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
* 基础信息-员工工作履历实体类
*
* @author BladeX
* @since 2022-03-08
*/
@Data
@TableName("T_JOB_RECORD")
@ApiModel(value = "JobRecord对象", description = "基础信息-员工工作履历")
public class JobRecord implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 创建人
*/
// @ExcelIgnore
@ApiModelProperty(value = "创建人")
@TableField(fill = FieldFill.INSERT)
private String createdBy;
/**
* 创建时间
*/
// @ExcelIgnore
@ApiModelProperty(value = "创建时间")
@TableField(fill = FieldFill.INSERT)
private Date createdTime;
/**
* 更新人
*/
// @ExcelIgnore
@ApiModelProperty(value = "更新人")
@TableField(fill = FieldFill.INSERT_UPDATE)
private String updatedBy;
/**
* 更新时间
*/
// @ExcelIgnore
@ApiModelProperty(value = "更新时间")
@TableField(fill = FieldFill.INSERT_UPDATE)
private Date updatedTime;
/**
* ID
*/
@ApiModelProperty(value = "ID")
@TableId("ID")
private String id;
/**
* 员工ID
*/
@ApiModelProperty(value = "员工ID")
@TableField("EMPLOYEE_ID")
private String employeeId;
/**
* 工作单位
*/
@ApiModelProperty(value = "工作单位")
@TableField("PLACE")
private String place;
/**
* 起始时间
*/
@ApiModelProperty(value = "起始时间")
@TableField("BEGIN_DATE")
private String beginDate;
/**
* 截止时间
*/
@ApiModelProperty(value = "截止时间")
@TableField("END_DATE")
private String endDate;
/**
* 岗位或工作
*/
@ApiModelProperty(value = "岗位或工作")
@TableField("JOB")
private String job;
/**
* 逻辑删除标识符;1-删除0-正常
*/
@ApiModelProperty(value = "逻辑删除标识符;0-正常1-删除")
@TableField("DEL_FLAG")
@TableLogic
private String delFlag;
/**
* 备用字段1
*/
@ApiModelProperty(value = "备用字段1")
@TableField("RESERVE1")
private String reserve1;
/**
* 备用字段2
*/
@ApiModelProperty(value = "备用字段2")
@TableField("RESERVE2")
private String reserve2;
/**
* 备用字段3
*/
@ApiModelProperty(value = "备用字段3")
@TableField("RESERVE3")
private String reserve3;
/**
* 备用字段4
*/
@ApiModelProperty(value = "备用字段4")
@TableField("RESERVE4")
private String reserve4;
/**
* 备用字段5
*/
@ApiModelProperty(value = "备用字段5")
@TableField("RESERVE5")
private String reserve5;
}

View File

@ -0,0 +1,97 @@
/*
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the dreamlu.net developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: Chill 庄骞 (smallchill@163.com)
*/
package org.security.ht.entity.basic;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.security.ht.entity.common.BaseEntity;
/**
* 实体类
*
* @author BladeX
* @since 2022-05-30
*/
@Data
@TableName("T_LAW")
@ApiModel(value = "Law对象", description = "Law对象")
public class Law extends BaseEntity implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 名称
*/
@ApiModelProperty(value = "名称")
@TableField("NAME")
private String name;
/**
* 类型 1-内部规章制度 2-外部法律法规
*/
@ApiModelProperty(value = "类型 1-内部规章制度 2-外部法律法规")
@TableField("TYPE")
private String type;
/**
* 上传机构
*/
@ApiModelProperty(value = "上传机构")
@TableField("DEPT_ID")
private String deptId;
/**
* 状态;1-可用 0-停用
*/
@ApiModelProperty(value = "状态;1-可用 0-停用")
@TableField("STATE")
private String state;
/**
* 逻辑删除标识符;1-删除0-正常
*/
@ApiModelProperty(value = "逻辑删除标识符;1-删除0-正常")
@TableField("DEL_FLAG")
@TableLogic
private String delFlag;
/**
* 法律法规类型1-安防类2-其他类
*/
@ApiModelProperty(value = "法律法规类型1-安防类2-其他类)")
@TableField("LAW_TYPE")
private String lawType;
/**
* 附件groupname
*/
@ApiModelProperty(value = "附件groupname")
@TableField("GROUP_NAME")
private String groupName;
/**
* 启用时间
*/
@ApiModelProperty(value = "启用时间")
private Date openTime;
/**
* 停用时间
*/
@ApiModelProperty(value = "停用时间")
private Date closeTime;
}

View File

@ -0,0 +1,133 @@
/*
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the dreamlu.net developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: Chill 庄骞 (smallchill@163.com)
*/
package org.security.ht.entity.basic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import lombok.Data;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
* 基础信息-联系信息表实体类
*
* @author BladeX
* @since 2022-05-18
*/
@Data
@TableName("T_MAIL_LIST")
@ApiModel(value = "MailList对象", description = "基础信息-联系信息表")
public class MailList implements Serializable {
private static final long serialVersionUID = 1L;
/**
* ID
*/
@ApiModelProperty(value = "ID")
@TableId("ID")
private String id;
/**
* 机构办公室电话
*/
@ApiModelProperty(value = "机构办公室电话")
@TableField("OFFICE_TEL")
private String officeTel;
/**
* 分管领导
*/
@ApiModelProperty(value = "分管领导")
@TableField("LEADER_IN_CHARGE")
private String leaderInCharge;
/**
* 安保负责人
*/
@ApiModelProperty(value = "安保负责人")
@TableField("HEAD_OF_SECURITY")
private String headOfSecurity;
/**
* 安保负责人电话
*/
@ApiModelProperty(value = "安保负责人电话")
@TableField("HEAD_OF_SECURITY_TEL")
private String headOfSecurityTel;
/**
* 安全员
*/
@ApiModelProperty(value = "安全员")
@TableField("SAFETY_OFFICER")
private String safetyOfficer;
/**
* 安全员电话
*/
@ApiModelProperty(value = "安全员电话")
@TableField("SAFETY_OFFICER_TEL")
private String safetyOfficerTel;
/**
* 辖区派出所
*/
@ApiModelProperty(value = "辖区派出所")
@TableField("LOCAL_POLICE_STATION")
private String localPoliceStation;
/**
* 辖区派出所电话
*/
@ApiModelProperty(value = "辖区派出所电话")
@TableField("LOCAL_POLICE_STATION_TEL")
private String localPoliceStationTel;
/**
* 片区警员
*/
@ApiModelProperty(value = "片区警员")
@TableField("DISTRICT_POLICE_OFFICER")
private String districtPoliceOfficer;
/**
* 片区警员电话
*/
@ApiModelProperty(value = "片区警员电话")
@TableField("DISTRICT_POLICE_OFFICER_TEL")
private String districtPoliceOfficerTel;
/**
* 创建人
*/
@ApiModelProperty(value = "创建人")
@TableField("CREATED_BY")
private String createdBy;
/**
* 创建时间
*/
@ApiModelProperty(value = "创建时间")
@TableField("CREATED_TIME")
private LocalDateTime createdTime;
/**
* 更新人
*/
@ApiModelProperty(value = "更新人")
@TableField("UPDATED_BY")
private String updatedBy;
/**
* 更新时间
*/
@ApiModelProperty(value = "更新时间")
@TableField("UPDATED_TIME")
private LocalDateTime updatedTime;
}

View File

@ -0,0 +1,138 @@
/*
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the dreamlu.net developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: Chill 庄骞 (smallchill@163.com)
*/
package org.security.ht.entity.basic;
import com.baomidou.mybatisplus.annotation.*;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
* 基础信息-自助银行实体类
*
* @author BladeX
* @since 2022-03-16
*/
@Data
@TableName("T_SELF_HELP_BANK")
@ApiModel(value = "SelfHelpBank对象", description = "基础信息-自助银行")
public class SelfHelpBank implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 创建人
*/
// @ExcelIgnore
@ApiModelProperty(value = "创建人")
@TableField(fill = FieldFill.INSERT)
private String createdBy;
/**
* 创建时间
*/
// @ExcelIgnore
@ApiModelProperty(value = "创建时间")
@TableField(fill = FieldFill.INSERT)
private Date createdTime;
/**
* 更新人
*/
// @ExcelIgnore
@ApiModelProperty(value = "更新人")
@TableField(fill = FieldFill.INSERT_UPDATE)
private String updatedBy;
/**
* 更新时间
*/
// @ExcelIgnore
@ApiModelProperty(value = "更新时间")
@TableField(fill = FieldFill.INSERT_UPDATE)
private Date updatedTime;
/**
* ID
*/
@ApiModelProperty(value = "ID")
@TableId("ID")
private String id;
/**
* 名称
*/
@ApiModelProperty(value = "名称")
@TableField("NAME")
private String name;
/**
* 所属网点
*/
@ApiModelProperty(value = "所属网点")
@TableField("DEPT_ID")
private String deptId;
/**
* 类型;1-行内 2-离行
*/
@ApiModelProperty(value = "类型;1-行内 2-离行")
@TableField("TYPE")
private String type;
/**
* 概述
*/
@ApiModelProperty(value = "概述")
@TableField("SUMMARY")
private String summary;
/**
* 逻辑删除标识符;1-删除0-正常
*/
@ApiModelProperty(value = "逻辑删除标识符;0-正常1-删除")
@TableField("DEL_FLAG")
@TableLogic
private String delFlag;
/**
* 地址
*/
@ApiModelProperty(value = "地址")
@TableField("ADDRESS")
private String address;
/**
* 备用字段2
*/
@ApiModelProperty(value = "备用字段2")
@TableField("RESERVE2")
private String reserve2;
/**
* 备用字段3
*/
@ApiModelProperty(value = "备用字段3")
@TableField("RESERVE3")
private String reserve3;
/**
* 备用字段4
*/
@ApiModelProperty(value = "备用字段4")
@TableField("RESERVE4")
private String reserve4;
/**
* 备用字段5
*/
@ApiModelProperty(value = "备用字段5")
@TableField("RESERVE5")
private String reserve5;
}

View File

@ -0,0 +1,58 @@
package org.security.ht.entity.common;
//import com.alibaba.excel.annotation.ExcelIgnore;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
/**
* 自动填充创建时间创建人更新时间更新人
* @author Create by wzf
* @date 2022/4/15 16:22
*/
@Data
public class BaseEntity {
/**
* ID
*/
@ApiModelProperty(value = "ID")
@TableId("ID")
private String id;
/**
* 创建人
*/
// @ExcelIgnore
@ApiModelProperty(value = "创建人")
@TableField(fill = FieldFill.INSERT)
private String createdBy;
/**
* 创建时间
*/
// @ExcelIgnore
@ApiModelProperty(value = "创建时间")
@TableField(fill = FieldFill.INSERT)
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date createdTime;
/**
* 更新人
*/
// @ExcelIgnore
@ApiModelProperty(value = "更新人")
@TableField(fill = FieldFill.INSERT_UPDATE)
private String updatedBy;
/**
* 更新时间
*/
// @ExcelIgnore
@ApiModelProperty(value = "更新时间")
@TableField(fill = FieldFill.INSERT_UPDATE)
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date updatedTime;
}

View File

@ -0,0 +1,94 @@
/*
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the dreamlu.net developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: Chill 庄骞 (smallchill@163.com)
*/
package org.security.ht.entity.common;
import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* 公共-附件表实体类
*
* @author BladeX
* @since 2022-07-04
*/
@Data
@TableName("T_FILE")
@ApiModel(value = "File对象", description = "公共-附件表")
public class File extends BaseEntity implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 文件名称
*/
@ApiModelProperty(value = "文件名称")
@TableField("FILE_NAME")
private String fileName;
/**
* 上送影像平台附件标识id
*/
@ApiModelProperty(value = "上送影像平台附件标识id")
@TableField("content_id")
private String contentId;
/**
* 格式
*/
@ApiModelProperty(value = "格式")
@TableField("FORMAT")
private String format;
/**
* 部门id
*/
@ApiModelProperty(value = "部门id")
@TableField("DEPT_ID")
private String deptId;
/**
* 逻辑删除标识符;0-正常1-删除
*/
@ApiModelProperty(value = "逻辑删除标识符;0-正常1-删除")
@TableField("DEL_FLAG")
@TableLogic
private String delFlag;
/**
* 关联ID
*/
@ApiModelProperty(value = "关联ID")
@TableField("LINK_ID")
private String linkId;
@ApiModelProperty(value = "业务开始时间")
@TableField("busi_begin_date")
private String busiBeginDate;
@ApiModelProperty(value = "分组名称")
@TableField("GROUP_NAME")
private String groupName;
@ApiModelProperty(value = "本地文件路径")
@TableField("local_url")
private String localUrl;
@ApiModelProperty(value = "是否是加密文件")
@TableField("encrypt")
private Boolean encrypt;
}

View File

@ -0,0 +1,35 @@
package org.security.ht.entity.common;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @Author: qxqx
* @Create: 2022/9/6
* @Description: 审批流实体
*/
@Data
public class FlowEntity extends BaseEntity {
/**
* 状态 (0-任务未审批状态,1-任务审批中状态,2-任务审批完成状态已审批完毕或无需审批的任务自行进行确认,3-任务审批驳回状态)
*/
@ApiModelProperty(value = "状态")
@TableField("STATE")
private String state;
/**
* 流程定义id
*/
@ApiModelProperty(value = "流程定义id")
@TableField("PROCESS_DEFINITION_ID")
private String processDefinitionId;
/**
* 流程实例id
*/
@ApiModelProperty(value = "流程实例id")
@TableField("PROCESS_INSTANCE_ID")
private String processInstanceId;
}

View File

@ -0,0 +1,64 @@
package org.security.ht.feign;
import org.security.common.constant.CommonConstant;
import org.springblade.core.tool.api.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import java.util.Map;
@FeignClient(
value = CommonConstant.APPLICATION_SECURITY
)
public interface IHtClient {
String API_PREFIX = "/client";
String UPDATE_STATE_BY_ID = API_PREFIX + "/update-state-by-id";
String SEND_ALARM_NOTICE = API_PREFIX + "/send-alarm-notice";
String SEND_SCC_CHECK_NOTICE = API_PREFIX + "/send-scc-check-notice";
String AFTER_FLOW_FINISHED = API_PREFIX + "/after-flow-finished";
/**
* 根据id修改状态
*
* @param serviceBeanName serviceBean名称
* @param id 主键
* @param state 状态
* @return
*/
@GetMapping(UPDATE_STATE_BY_ID)
R updateStateById(@RequestParam("serviceBeanName") String serviceBeanName, @RequestParam("id") String id, @RequestParam("state") String state);
/**
* 根据id修改状态
*
* @param serviceBeanName serviceBean名称
* @param id 主键
* @param pass 是否通过
* @param variables service需要用到的参数
* @return
*/
@PostMapping(AFTER_FLOW_FINISHED)
R afterFlowFinished(@RequestParam("serviceBeanName") String serviceBeanName, @RequestParam("id") String id, @RequestParam(value = "pass", required = false) Boolean pass, @RequestBody Map<String, Object> variables);
/**
* 警情推送
*
* @param answerAlarmId 接警记录id
* @return
*/
@GetMapping(SEND_ALARM_NOTICE)
R sendAlarmNotice(@RequestParam("answerAlarmId") String answerAlarmId);
/**
* 下发整改通知书
*
* @param sccCheckId 接警记录id
* @return
*/
@GetMapping(SEND_SCC_CHECK_NOTICE)
R sendSccCheckNotice(@RequestParam("sccCheckId") String sccCheckId);
}

View File

@ -0,0 +1,39 @@
package org.security.ht.feign;
import org.springblade.core.tool.api.R;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import java.util.Map;
/**
* @Author: qxqx
* @Create: 2022/8/26
* @Description:
*/
@Component
public class IHtClientFallback implements IHtClient {
@Override
@GetMapping(UPDATE_STATE_BY_ID)
public R updateStateById(String serviceBeanName, String id, String state) {
return R.fail("远程调用失败");
}
@Override
@GetMapping(SEND_ALARM_NOTICE)
public R sendAlarmNotice(String answerAlarmId) {
return R.fail("远程调用失败");
}
@Override
@GetMapping(SEND_SCC_CHECK_NOTICE)
public R sendSccCheckNotice(String sccCheckId) {
return R.fail("远程调用失败");
}
@Override
public R afterFlowFinished(String serviceBeanName, String id, Boolean pass, Map<String, Object> variables) {
return R.fail("远程调用失败");
}
}

View File

@ -0,0 +1,28 @@
package org.security.ht.feign.basic;
import org.security.ht.entity.basic.Department;
import org.springblade.core.tool.api.R;
import org.springframework.stereotype.Component;
import java.util.List;
/**
* @author wzf
* @apiNote Department 微服务掉用服务熔断
* @since Created in 2022/9/19 11:41
*/
@Component
public class DepartmentClientFallback implements IDepartmentClient{
@Override
public R saveData(List<Department> departmentList) {
return R.fail("保存Department-机构信息服务远程调用失败");
}
@Override
public R removeData(String ids) {
return R.fail("删除Department-机构信息服务远程调用失败");
}
@Override
public R<Department> deptInfoById(String deptId) {
return R.fail("查询机构详情失败远程调用失败");
}
}

View File

@ -0,0 +1,30 @@
package org.security.ht.feign.basic;
import org.security.ht.entity.basic.Employee;
import org.springblade.core.tool.api.R;
import org.springframework.stereotype.Component;
import java.util.List;
/**
* @author wzf
* @apiNote Employee 微服务掉用服务熔断
* @since Created in 2022/9/19 14:11
*/
@Component
public class EmployeeClientFallback implements IEmployeeClient{
@Override
public R<Employee> getEmployeeAndFamiliesAndJobRecords(Long id) {
return R.fail("获取Employee-员工信息服务远程调用失败");
}
@Override
public R synData(List<Employee> employees) {
return R.fail("同步Employee-员工信息远程调用失败");
}
@Override
public R removeData(String id) {
return R.fail("删除Employee-员工信息远程调用失败");
}
}

View File

@ -0,0 +1,48 @@
package org.security.ht.feign.basic;
import org.security.common.constant.CommonConstant;
import org.security.ht.entity.basic.Department;
import org.springblade.core.tool.api.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import java.util.List;
/**
* @author wzf
* @apiNote Department Feign接口类
* @since Created in 2022/9/19 11:26
*/
@FeignClient(
value = CommonConstant.APPLICATION_SECURITY,
fallback = DepartmentClientFallback.class
)
public interface IDepartmentClient {
String API_PREFIX = "/client";
String SYN_SAVE_DATA = API_PREFIX + "/syn/save/department";
String SYN_REMOVE_DATA = API_PREFIX + "/syn/remove/department";
String DEPT_INFO_BY_ID = API_PREFIX + "/deptInfoById";
/**
*消息总线信息同步更新机构信息
*/
@PostMapping(SYN_SAVE_DATA)
R saveData(@RequestBody List<Department> departmentList);
/**
*消息总线信息同步删除未启用机构
*/
@PostMapping(SYN_REMOVE_DATA)
R removeData(@RequestBody String ids);
/**
* 获取机构信息
*
* @param deptId 部门id
* @return
*/
@GetMapping(DEPT_INFO_BY_ID)
R<Department> deptInfoById(@RequestParam("deptId") String deptId);
}

View File

@ -0,0 +1,45 @@
package org.security.ht.feign.basic;
import org.security.common.constant.CommonConstant;
import org.security.ht.entity.basic.Employee;
import org.springblade.core.tool.api.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import java.util.List;
/**
* @author wzf
* @apiNote Employee Feign接口类
* @since Created in 2022/9/7 11:09
*/
@FeignClient(
value = CommonConstant.APPLICATION_SECURITY,
fallback = EmployeeClientFallback.class
)
public interface IEmployeeClient {
String API_PREFIX = "/client";
String EMPLOYEE_INFO = API_PREFIX + "/detail";
String SYS_EMPLOYEE_DATA = API_PREFIX + "/syn/employee";
String SYN_REMOVE_DATA = API_PREFIX + "/syn/remove-employee";
@GetMapping(EMPLOYEE_INFO)
R<Employee> getEmployeeAndFamiliesAndJobRecords(Long id);
@PostMapping(SYS_EMPLOYEE_DATA)
R synData(@RequestBody List<Employee> employees);
/**
*消息总线信息同步删除未启用员工
*/
@PostMapping(SYN_REMOVE_DATA)
R removeData(@RequestBody String id);
}

View File

@ -0,0 +1,78 @@
/*
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the dreamlu.net developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: Chill 庄骞 (smallchill@163.com)
*/
package org.security.ht.vo.basic;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import org.security.ht.entity.basic.Department;
import lombok.Data;
import lombok.EqualsAndHashCode;
import io.swagger.annotations.ApiModel;
import org.springblade.core.tool.node.INode;
import java.util.ArrayList;
import java.util.List;
/**
* 基础信息-组织机构视图实体类
*
* @author BladeX
* @since 2022-03-07
*/
@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "DepartmentVO对象", description = "基础信息-组织机构")
public class DepartmentVO extends Department implements INode<DepartmentVO> {
private static final long serialVersionUID = 1L;
/**
* 主键ID
*/
@JsonSerialize(using = ToStringSerializer.class)
private Long id;
/**
* 父节点ID
*/
@JsonSerialize(using = ToStringSerializer.class)
private Long parentId;
/**
* 子孙节点
*/
@JsonInclude(JsonInclude.Include.NON_EMPTY)
private List<DepartmentVO> children;
/**
* 是否有子孙节点
*/
@JsonInclude(JsonInclude.Include.NON_EMPTY)
private Boolean hasChildren;
@Override
public List<DepartmentVO> getChildren() {
if (this.children == null) {
this.children = new ArrayList<>();
}
return this.children;
}
/**
* 层级
*/
private String deptLevel;
}

View File

@ -0,0 +1,28 @@
package org.security.ht.vo.basic;
import lombok.Data;
import org.security.ht.entity.basic.Department;
import org.security.ht.vo.common.UploadVO;
import java.io.Serializable;
import java.util.List;
/**
* @author Create by wzf
* @date 2022/7/4 11:13
*/
@Data
public class DeptDataVO extends Department implements Serializable {
/**
* 机构相关照片
*/
private List<UploadVO> deptDisList;
/**
* 机构证照
*/
private List<UploadVO> deptLicenseList;
/**
* 上级机构名称
*/
private String parentName;
}

View File

@ -0,0 +1,45 @@
/*
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the dreamlu.net developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: Chill 庄骞 (smallchill@163.com)
*/
package org.security.ht.vo.basic;
import org.security.ht.entity.basic.Device;
import lombok.Data;
import lombok.EqualsAndHashCode;
import io.swagger.annotations.ApiModel;
import org.security.ht.vo.common.UploadVO;
import java.util.List;
/**
* 基础信息-设备信息视图实体类
*
* @author BladeX
* @since 2022-03-16
*/
@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "DeviceVO对象", description = "基础信息-设备信息")
public class DeviceVO extends Device {
private static final long serialVersionUID = 1L;
String typeName;
List<String> typeRankList;
List<Long> deptIdList;
/**
* 设备图片
*/
private List<UploadVO> picList;
}

View File

@ -0,0 +1,78 @@
/*
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the dreamlu.net developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: Chill 庄骞 (smallchill@163.com)
*/
package org.security.ht.vo.basic;
import org.security.ht.entity.basic.Employee;
import lombok.Data;
import lombok.EqualsAndHashCode;
import io.swagger.annotations.ApiModel;
import org.security.ht.entity.basic.Family;
import org.security.ht.entity.basic.JobRecord;
import org.security.ht.vo.common.UploadVO;
import java.util.List;
import java.util.Map;
/**
* 基础信息-员工视图实体类
*
* @author BladeX
* @since 2022-03-07
*/
@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "EmployeeVO对象", description = "基础信息-员工")
public class EmployeeVO extends Employee {
private static final long serialVersionUID = 1L;
private String department;//返回前端-所属部门名称
private String secondDepartment;//返回前端-借调部门名称
private List<Family> families;
private List<JobRecord> jobRecords;
private List<String> deptList;//返回前端-所属部门级联id
private List<String> secondDeptList;//返回前端-借调部门级联id
private List<Map<String,String>> leaderList;//机构负责人
private List<Map<String,String>> safetyOfficerList;//安全员
private List<Map<String,String>> leaderInChargeList;//分管领导
/**
* 企业工龄
*/
private Integer seniorityInEnterprise;
/**
* 行内工龄
*/
private Integer professionalLengthOfService;
/**
* 相关附件
*/
private List<UploadVO> relevantAttachments;
/**
* 证件照附件
*/
private List<UploadVO> picList;
/**
* 身份证正面照附件
*/
private List<UploadVO> idCardFrontList;
/**
* 身份证反面照附件
*/
private List<UploadVO> idCardBackList;
}

View File

@ -0,0 +1,36 @@
/*
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the dreamlu.net developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: Chill 庄骞 (smallchill@163.com)
*/
package org.security.ht.vo.basic;
import org.security.ht.entity.basic.Family;
import lombok.Data;
import lombok.EqualsAndHashCode;
import io.swagger.annotations.ApiModel;
/**
* 基础信息-员工家庭成员视图实体类
*
* @author BladeX
* @since 2022-03-08
*/
@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "FamilyVO对象", description = "基础信息-员工家庭成员")
public class FamilyVO extends Family {
private static final long serialVersionUID = 1L;
}

View File

@ -0,0 +1,36 @@
/*
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the dreamlu.net developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: Chill 庄骞 (smallchill@163.com)
*/
package org.security.ht.vo.basic;
import org.security.ht.entity.basic.JobRecord;
import lombok.Data;
import lombok.EqualsAndHashCode;
import io.swagger.annotations.ApiModel;
/**
* 基础信息-员工工作履历视图实体类
*
* @author BladeX
* @since 2022-03-08
*/
@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "JobRecordVO对象", description = "基础信息-员工工作履历")
public class JobRecordVO extends JobRecord {
private static final long serialVersionUID = 1L;
}

View File

@ -0,0 +1,43 @@
/*
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the dreamlu.net developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: Chill 庄骞 (smallchill@163.com)
*/
package org.security.ht.vo.basic;
import org.security.ht.entity.basic.Law;
import lombok.Data;
import lombok.EqualsAndHashCode;
import io.swagger.annotations.ApiModel;
import org.security.ht.vo.common.UploadVO;
import java.util.List;
/**
* 视图实体类
*
* @author BladeX
* @since 2022-05-30
*/
@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "LawVO对象", description = "LawVO对象")
public class LawVO extends Law {
private static final long serialVersionUID = 1L;
private String deptName;
/**
* 法律法规附件
*/
private List<UploadVO> fileList;
}

View File

@ -0,0 +1,36 @@
/*
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the dreamlu.net developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: Chill 庄骞 (smallchill@163.com)
*/
package org.security.ht.vo.basic;
import org.security.ht.entity.basic.MailList;
import lombok.Data;
import lombok.EqualsAndHashCode;
import io.swagger.annotations.ApiModel;
/**
* 基础信息-联系信息表视图实体类
*
* @author BladeX
* @since 2022-05-18
*/
@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "MailListVO对象", description = "基础信息-联系信息表")
public class MailListVO extends MailList {
private static final long serialVersionUID = 1L;
}

View File

@ -0,0 +1,38 @@
package org.security.ht.vo.basic;
import lombok.Data;
/**
* @author Create by wzf
* @date 2022/7/29 10:54
*/
@Data
public class MapDeptDataVO {
/**
* 机构id
*/
private String id;
/**
* 机构经纬度坐标
*/
private String coordinate;
/**
* 机构经度坐标
*/
private String longitude;
/**
* 机构纬度坐标
*/
private String latitude;
/**
* 机构名称
*/
private String deptName;
/**
* 机构类别 总行 分行 支行 自助行
*/
private String category;
}

View File

@ -0,0 +1,13 @@
package org.security.ht.vo.basic;
import lombok.Data;
/**
* @author Create by wzf
* @date 2022/7/18 10:50
*/
@Data
public class RoleDataVO {
private Long id;
private String roleName;
}

View File

@ -0,0 +1,37 @@
/*
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the dreamlu.net developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: Chill 庄骞 (smallchill@163.com)
*/
package org.security.ht.vo.basic;
import org.security.ht.entity.basic.SelfHelpBank;
import lombok.Data;
import lombok.EqualsAndHashCode;
import io.swagger.annotations.ApiModel;
/**
* 基础信息-自助银行视图实体类
*
* @author BladeX
* @since 2022-03-16
*/
@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "SelfHelpBankVO对象", description = "基础信息-自助银行")
public class SelfHelpBankVO extends SelfHelpBank {
private static final long serialVersionUID = 1L;
private String deptName;
}

View File

@ -0,0 +1,36 @@
/*
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the dreamlu.net developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: Chill 庄骞 (smallchill@163.com)
*/
package org.security.ht.vo.common;
import org.security.ht.entity.common.File;
import lombok.Data;
import lombok.EqualsAndHashCode;
import io.swagger.annotations.ApiModel;
/**
* 公共-附件表视图实体类
*
* @author BladeX
* @since 2022-07-04
*/
@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "FileVO对象", description = "公共-附件表")
public class FileVO extends File {
private static final long serialVersionUID = 1L;
}

View File

@ -0,0 +1,55 @@
package org.security.ht.vo.common;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
/**
* @author zj 2022/5/11
*/
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class UploadVO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 用于表示存附件表是的标识符id
*/
private String id;
/**
* 文件名称
*/
private String name;
/**
* 文件类型
*/
private String fileType;
/**
* 文件地址路由
*/
private String url;
private String groupType;
private String groupName;
/**
* 影像平台文件标识id
*/
private String contentId;
/**
* 业务开始时间
*/
private String busiBeginDate;
private Boolean encrypt;
}

View File

@ -0,0 +1,19 @@
package org.security.ht.workHandOverUsers.dto;
import lombok.Data;
import org.security.ht.vo.common.UploadVO;
import org.security.ht.workHandOverUsers.entity.HandoverHistory;
import java.util.List;
/**
* @author wzf
* @since Created in 2022/10/27 11:11
*/
@Data
public class HandoverHistoryDTO extends HandoverHistory {
/**
* 交接照片
*/
private List<UploadVO> imgUrl;
}

View File

@ -0,0 +1,12 @@
package org.security.ht.workHandOverUsers.dto;
import lombok.Data;
import org.security.ht.workHandOverUsers.entity.WorkHandoverUsers;
/**
* @author wzf
* @since Created in 2022/9/2 16:41
*/
@Data
public class WorkHandoverUsersDTO extends WorkHandoverUsers {
}

View File

@ -0,0 +1,58 @@
package org.security.ht.workHandOverUsers.entity;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.security.ht.entity.common.BaseEntity;
import java.io.Serializable;
import java.util.Date;
/**
* @author zj 2022/9/7
*/
/**
* 交接流水表;
* @author : zj
* @date : 2022-9-7
*/
@Data
@ApiModel(value = "工作交接记录表",description = "")
@TableName("T_HANDOVER_HISTORY")
public class HandoverHistory extends BaseEntity implements Serializable,Cloneable{
/** 主键 */
@ApiModelProperty(name = "主键",notes = "")
@TableId
private String id ;
/** 交接人 */
@ApiModelProperty(name = "交接人",notes = "")
private String handoverFrom ;
/** 交接人身份证 */
@ApiModelProperty(name = "交接人身份证",notes = "")
private String handoverFromIdCard ;
/** 被交接人 */
@ApiModelProperty(name = "被交接人",notes = "")
private String handoverTo ;
/** 被交接人身份证 */
@ApiModelProperty(name = "被交接人身份证",notes = "")
private String handoverToIdCard ;
/** 交接时间 */
@ApiModelProperty(name = "交接时间",notes = "")
private Date handoverTime ;
/** 交接内容 */
@ApiModelProperty(name = "交接内容",notes = "")
private String content ;
/** 交接数量 */
@ApiModelProperty(name = "交接数量")
private String handoverCount ;
/** 交接详情 */
@ApiModelProperty(name = "交接详情")
private String handoverDetail ;
/** 附件groupname */
@ApiModelProperty(name = "附件groupname")
private String groupName;
}

View File

@ -0,0 +1,66 @@
package org.security.ht.workHandOverUsers.entity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import org.security.ht.entity.common.BaseEntity;
import java.io.Serializable;
/**
* @author wzf
* @apiNote 工作交接用户信息
* @since Created in 2022/9/2 16:34
*/
@Data
@TableName("T_WORK_HANDOVER_USERS")
public class WorkHandoverUsers extends BaseEntity implements Serializable {
/**ID*/
@TableField("id")
private String id;
/**用户类型;1-行内用户2-外包人员*/
@TableField("user_type")
private int userType;
/**工作类型编码*/
@TableField("work_type_code")
private String workTypeCode;
/**工作类型名称*/
@TableField("work_type_name")
private String workTypeName;
/**工作交接用户名称*/
@TableField("user_name")
private String userName;
/**工作交接用户身份证号*/
@TableField("ID_card")
private String IDCard;
/**
* 工作交接员工工号当用户类型为行内用户时保存次字段
* */
@TableField("account")
private String account;
/**机构编码*/
@TableField("dept_id")
private String deptId;
/**机构名称*/
@TableField("dept_name")
private String deptName;
/**是否存在人脸信息;0-否1-是*/
@TableField("face_state")
private int faceState;
/**删除标识符;1-删除;0-正常*/
@TableField("del_flag")
@TableLogic
private String delFlag;
}

View File

@ -0,0 +1,23 @@
package org.security.ht.workHandOverUsers.vo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.security.ht.vo.common.UploadVO;
import org.security.ht.workHandOverUsers.entity.HandoverHistory;
import java.util.List;
/**
* @author zj 2022/9/7
*/
@Data
public class HandoverHistoryVO extends HandoverHistory {
/**
* 交接照片
*/
private List<UploadVO> imgUrl;
@ApiModelProperty(value = "创建人名称")
private String createdByName;
@ApiModelProperty(value = "更新人名称")
private String updatedByName;
}

View File

@ -0,0 +1,27 @@
package org.security.ht.workHandOverUsers.vo;
import lombok.Data;
import javax.validation.constraints.NotNull;
/**
* @author zj 2022/9/6
*/
@Data
public class WorkHandoverCheckVO {
// 以下验证请传空字符串
@NotNull
private String handoverFrom; //交接人
@NotNull
private String handoverFromIdCard; //交接人身份证
@NotNull
private String handoverFromAcc;
private int handoverFromType;
@NotNull
private String handoverTo; //被交接人
@NotNull
private String handoverToIdCard; //被交接人身份证
private int handoverToType;
@NotNull
private String handoverToAcc;
}

View File

@ -0,0 +1,17 @@
package org.security.ht.workHandOverUsers.vo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.security.ht.workHandOverUsers.entity.WorkHandoverUsers;
/**
* @author wzf
* @since Created in 2022/9/2 16:41
*/
@Data
public class WorkHandoverUsersVO extends WorkHandoverUsers {
@ApiModelProperty(value = "创建人名称")
private String createdByName;
@ApiModelProperty(value = "更新人名称")
private String updatedByName;
}

View File

@ -0,0 +1,18 @@
package org.security.ht.workHandOverUsers.vo;
import lombok.Data;
import java.io.Serializable;
/**
* @author wzf
* @apiNote 获取相关机构id和名称
* @since Created in 2022/10/27 14:19
*/
@Data
public class deptDataVO implements Serializable {
private String deptId;
private String deptName;
}

View File

@ -20,7 +20,7 @@
<module>security-scope-api</module>
<module>security-system-api</module>
<module>security-user-api</module>
<module>security-busi-api</module>
<module>ht-security-api</module>
</modules>
<dependencies>

View File

@ -0,0 +1,124 @@
<?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>security-service</artifactId>
<groupId>org.security</groupId>
<version>2.8.1.RELEASE</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>ht-security</artifactId>
<properties>
<mybatis.plus.version>3.5.1</mybatis.plus.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springblade</groupId>
<artifactId>blade-core-boot</artifactId>
<exclusions>
<exclusion>
<groupId>com.alibaba</groupId>
<artifactId>druid-spring-boot-starter</artifactId>
</exclusion>
<exclusion>
<groupId>com.oracle.database.jdbc</groupId>
<artifactId>ojdbc7</artifactId>
</exclusion>
<exclusion>
<artifactId>ojdbc7</artifactId>
<groupId>com.oracle</groupId>
</exclusion>
<exclusion>
<artifactId>druid</artifactId>
<groupId>com.alibaba</groupId>
</exclusion>
</exclusions>
</dependency>
<!-- 引入swagger -->
<dependency>
<groupId>org.springblade</groupId>
<artifactId>blade-starter-swagger</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
</dependency>
<dependency>
<groupId>org.security</groupId>
<artifactId>security-system-api</artifactId>
<version>2.8.1.RELEASE</version>
<scope>compile</scope>
</dependency>
<!--EasyExcel相关依赖-->
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>easyexcel</artifactId>
<version>3.0.5</version>
</dependency>
<dependency>
<groupId>org.springblade</groupId>
<artifactId>blade-starter-excel</artifactId>
</dependency>
<dependency>
<groupId>cn.hutool</groupId>
<artifactId>hutool-all</artifactId>
<version>5.4.1</version>
</dependency>
<dependency>
<groupId>org.security</groupId>
<artifactId>security-user-api</artifactId>
<version>2.8.1.RELEASE</version>
</dependency>
<dependency>
<groupId>org.security</groupId>
<artifactId>security-desk-api</artifactId>
<version>2.8.1.RELEASE</version>
</dependency>
<dependency>
<groupId>org.jsoup</groupId>
<artifactId>jsoup</artifactId>
<version>1.11.3</version>
</dependency>
<dependency>
<groupId>org.owasp.esapi</groupId>
<artifactId>esapi</artifactId>
<version>2.1.0.1</version>
</dependency>
<!-- 生成二维码 -->
<dependency>
<groupId>com.google.zxing</groupId>
<artifactId>javase</artifactId>
<version>3.0.0</version>
</dependency>
<dependency>
<groupId>com.google.zxing</groupId>
<artifactId>core</artifactId>
<version>3.3.0</version>
</dependency>
<dependency>
<groupId>org.security</groupId>
<artifactId>security-flow-api</artifactId>
<version>2.8.1.RELEASE</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.security</groupId>
<artifactId>ht-security-api</artifactId>
<version>${bladex.project.version}</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>

View File

@ -0,0 +1,19 @@
package org.security;
import org.mybatis.spring.annotation.MapperScan;
import org.security.common.constant.CommonConstant;
import org.springblade.core.launch.BladeApplication;
import org.springframework.cloud.client.SpringCloudApplication;
import org.springframework.cloud.openfeign.EnableFeignClients;
/**
* @author zj 2022/2/11
*/
@EnableFeignClients({"org.security","org.springblade"})
@SpringCloudApplication
@MapperScan("org.security.trans.*.mapper")
public class Application {
public static void main(String[] args) {
BladeApplication.run(CommonConstant.APPLICATION_SECURITY, Application.class, args);
}
}

View File

@ -0,0 +1,196 @@
package org.security.common;
/**
* @author zj 2022/2/23
* 常量类
*/
public class Constant {
public static final String FALI_MESSAGE = "系统异常,请联系管理人员";
public static final String DELETE_FLAG_0="0";//正常
public static final String DELETE_FLAG_1="1";//删除
//任务下发角度
public static final String TASK_STATE_DRAFT="0";//任务待下发状态(初始默认状态
public static final String TASK_STATE_PUBLISH="1";//任务已发布状态
public static final String TASK_STATE_END="2";//任务已终止状态
public static final String TASK_PREFIX="TASK";//任务编号前缀
public static final String HANDIN_TYPE_SINGLE="single";//任务提报类型-单次
public static final String HANDIN_TYPE_FREQ="freq";//任务提报类型-按频次
public static final String TASK_FLAG_USUAL="usual";//任务类型-日常任务
public static final String TASK_FLAG_UNUSUAL="unusual";//任务类型-专项任务
// 提报流程状态-------
public static final String HANDIN_STATE_DRAFT="0";//任务未提交审批状态
public static final String HANDIN_STATE_AUDIT="1";//任务审批中状态
public static final String HANDIN_STATE_FINISH="2";//任务审批完成状态已审批完毕或无需审批的任务自行进行确认
public static final String HANDIN_STATE_REFUSE="3";//任务审批驳回状态
// 任务执行状态
public static final String TASK_HANDIN_STATE_DRAFT="0";//待执行
public static final String TASK_HANDIN_STATE_DRAFT_OVERTIME="1";//超时待执行
public static final String TASK_HANDIN_STATE_SUBMIT="2";//按时已执行
public static final String TASK_HANDIN_STATE_OVERTIME_SUBMIT="3";//超时已执行
public static final String TASK_STOP="4";//教育培训应急演练案件防控任务终止
//检查整改begin-----------
public static final String INSPECTION_TYPE_SELF ="1";//自检自查检查机构=被检查机构都是内部机构
public static final String INSPECTION_TYPE_IN ="2";//内部检查检查机构被检查机构都是内部机构
public static final String INSPECTION_TYPE_OUT ="3";//外部检查检查机构为外部单位被检查机构为内部机构
public static final String PROBLEM_STATE_DRAFT="0";//待检查
public static final String PROBLEM_STATE_DRAFT_OVERTIME="1";//超时待检查
public static final String PROBLEM_STATE_WAIT_RECTIFY="2";//待整改检查已提报有问题
public static final String PROBLEM_STATE_SUBMIT="3";//按时已整改
public static final String PROBLEM_STATE_OVERTIME="4";//超时待整改
public static final String PROBLEM_STATE_OVERTIME_SUBMIT="5";//超时已整改
public static final String PROBLEM_STATE_NO_PROBLEM="6";//检查正常检查已提报没有问题,无需整改
public static final String TASK_STOP_INSPECTION="7";//检查整改任务终止
//检查整改end-----------
// 设备使用状态begin-------
public static final String DEVICE_STATE_DUSE="0"; //未投入使用
public static final String DEVICE_STATE_USE="1"; //正常使用
public static final String DEVICE_STATE_OVERTIME_USE="2"; //超期使用
public static final String DEVICE_STATE_DISPOSED="3"; //已处置
// 设备使用状态end-------
// 设备检查状态begin-------
public static final String DEVICE_STATE_INSPECTION="4"; //检查中
public static final String DEVICE_STATE_INSPECTION_OVER="5"; //检查完成
public static final String DEVICE_STATE_RECTIFY="6"; //待整改
public static final String DEVICE_STATE_RECTIFY_OVER="7"; //整改完成
public static final String DEVICE_STATE_OVERTIME_INSPECTION="8"; //超期未检查
public static final String DEVICE_STATE_LEADER_CONFIRM="9"; //待领导确认
public static final String DEVICE_LINE_STATE_0="0"; //待检
public static final String DEVICE_LINE_STATE_2="2"; //已检
// 设备检查状态end-------
public static final String PARENT_ID="0"; //父级id 机构树根节点
public static final String RECTIFICATION_STATE_FAIL="0";//未整改
public static final String RECTIFICATION_STATE_SUCCESS="1";//已整改
public static final String SEX_BOY="1";//
public static final String SEX_GIRL="2";//
public static final String DEVICE_PROBLEM_NORMAL="1"; //正常
public static final String DEVICE_PROBLEM_WARN="2"; //告警
public static final String APP_BACKLOG_TYPE_1 = "1";//教育培训待办信息
public static final String APP_BACKLOG_TYPE_2 = "2";//应急演练待办信息
public static final String APP_BACKLOG_TYPE_3 = "3";//设备检查待办信息
public static final String APP_BACKLOG_TYPE_4 = "4";//设备整改待办信息
public static final String APP_BACKLOG_TYPE_5 = "5";//设备持续整改代办信息
public static final String USUAL_STATE_FALSE="0"; //
public static final String USUAL_STATE_TURE="1"; //
public static final String SUBMIT_TYPE_ZERO="0"; //暂存
public static final String SUBMIT_TYPE_ONE="1"; //提报/警情推送
public static final String BUTTON_STATE_ZERO="0"; //按钮状态0
public static final String BUTTON_STATE_ONE="1"; //按钮状态1
public static final String BUTTON_STATE_TOW="2"; //按钮状态2
public static final String BUTTON_STATE_THREE="3"; //按钮状态3
public static final String CHECK_TYPE_OUTLETS="1"; //营业网点检查
public static final String CHECK_TYPE_SELF_BANK="2"; //自助银行检查
public static final String CHECK_STATUS_ZERO="0"; //营业网点或自助银行检查结果状态-异常
public static final String CHECK_STATUS_ONE="1"; //营业网点或自助银行检查结果状态-正常
public static final String CHECK_STATUS_TWO="2"; //营业网点或自助银行检查结果状态-已整改
public static final String NOTICE_TYPE_ONE="1"; //营业网点检查整改通知书
public static final String NOTICE_TYPE_TWO="2"; //自助银行检查整改通知书
public static final String NOTICE_TYPE_THREE="3"; //其他检查整改通知书
public static final String LEADER = "leader";//机构负责人
public static final String LEADER_IN_CHARGE="leaderInCharge";//分管领导
public static final String SAFER = "safer";//安全员
public static final String PUSH_STATE_ZERO="0"; //待推送
public static final String PUSH_STATE_ONE="1"; //已推送
public static final String PUSH_STATE_TWO="2"; //已办结/已提报
public static final String PUSH_STATUS_ZERO="0"; //未提报
public static final String PUSH_STATUS_ONE="1"; //按时提报
public static final String PUSH_STATUS_TWO="2"; //超时提报
public static final String PUSH_STATUS_THREE="3"; //超时未提报
public static final String ALARM_TYPE_PERSON="1"; //外侵事件
public static final String ALARM_TYPE_DEVICE="2"; //设备报警
public static final String ALARM_TYPE_OTHER="3"; //其他
public static final String MENU_TYPE_ZERO="0"; //推送警情
public static final String MENU_TYPE_ONE="1"; //接收警情信息
public static final String PROJECT_NODE_START="0"; //项目节点-开始
public static final String PROJECT_NODE_ESTABLISHMENT="1"; //项目节点-立项
public static final String PROJECT_NODE_PURCHASE="2"; //项目节点-采购
public static final String PROJECT_NODE_CONTRACT="3"; //项目节点-合同
public static final String PROJECT_NODE_IMPLEMENTATION="4"; //项目节点-实施
public static final String PROJECT_NODE_CHECK="5"; //项目节点-验收
public static final String PROJECT_NODE_OVER="6"; //项目节点-结项
public static final String PROJECT_NODE_REVIEW="7"; //项目节点-审阅通过
public static final String REMINDER_STATE_DRAFT="0"; //便签提醒-未提交初始状态
public static final String REMINDER_STATE_SUBMIT="1"; //便签提醒-已提交提交之后在提醒期内被提醒人可见
public static final String REMINDER_STATE_DONE="2"; //便签提醒-已关闭被提醒人主动关闭提醒
public static final String REMINDER_STATE_END="3"; //便签提醒-已结束提醒到期自动结束
public static final Integer PROJECT_OVER = 1; //项目结项
public static final Integer PROJECT_OVER_REJECT = 2; //结项驳回
public static final Integer PROJECT_OVER_AGREE = 3; //同意结项
public static final String PROJECT_PAY_PLAN_ONE = "1"; //项目付款计划-质保金付款
public static final String PROJECT_PAY_PLAN_TWO = "2"; //项目付款计划-其他付款
public static final String PROJECT_PAY_PLAN_THREE = "3"; //项目付款计划-合同第X期
public static final String PROJECT_OVER_ONE = "1"; //有权限进行项目结项驳回和同意操作
public static final String PROJECT_OVER_TWO = "2"; //无权限进行项目结项驳回和同意操作
public static final String PROBLEM_STATE_ZORE="0";//暂存
public static final String PROBLEM_STATE_DRAFT_ONE="1";//待整改
public static final String PROBLEM_STATE_WAIT_TWO="2";//按时整改
public static final String PROBLEM_STATE_THREE="3";//超时整改
public static final String PROBLEM_STATE_FOURE="4";//超时未整改
public static final String PROBLEM_STATE_CONTIUE="5";//持续整改
public static final String PROBLEM_STATE_SIX="6";//6-待安全员确认
public static final String PROBLEM_STATE_USUUAL="1";//普通一次性整改记录
public static final String PROBLEM_STATE_CONTINUED="2";//持续整改后续补充整改记录
public static final String FORM_STATE_DRAFT="0"; //表单或信息状态-草稿
public static final String FORM_STATE_VALID="1"; //表单或信息状态-正式启用
public static final String FORM_STATE_END="2"; //表单或信息状态-停用
public static final int WORK_HANDOVER_USER_TYPE_BANK=1; //行内用户
public static final int WORK_HANDOVER_USER_TYPE_OUT=2; //外包用户
public static final String INCLUDE_CHILDREN_TYPE_ZERO = "0"; //统计机构不包含子级机构数据
public static final String INCLUDE_CHILDREN_TYPE_ONE = "1"; //统计机构包含子级机构数据
public static final String EDU_DATA_TYPE = "1"; //教育培训和应急演练数据统计类型标识符-教育培训
public static final String DRILL_DATA_TYPE = "2"; //教育培训和应急演练数据统计类型标识符-应急演练
public static final String ASSESSMENT_TYPE_ONE = "1"; //考核评价类型标识符-机构自评
public static final String ASSESSMENT_TYPE_TWO = "2"; //考核评价类型标识符-行内考核
public static final String ASSESSMENT_TYPE_THREE = "3"; //考核评价类型标识符-外部考核
public static final String ASSESSMENT_TYPE_FOUR = "4"; //考核评价类型标识符-外包公司考核
public static final String ASSESSMENT_TYPE_FIVE = "5"; //考核评价类型标识符-项目考核
public static final String STATISTICS_ASSESSMENT_TYPE_ONE = "1"; //考核评价数据统计类型标识符-机构考核统计
public static final String STATISTICS_ASSESSMENT_TYPE_TWO = "2"; //考核评价数据统计类型标识符-相关方考核统计
public static final String STATISTICS_ASSESSMENT_TYPE_THREE = "3"; //考核评价数据统计类型标识符-项目考核统计
}

View File

@ -0,0 +1,39 @@
package org.security.common.business;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import org.security.trans.projectBudgetManagement.service.IBudgetItemService;
import org.security.trans.projectBudgetManagement.vo.DictDataVO;
import org.springblade.core.tool.api.R;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
/**
* @author Create by wzf
* @date 2022/3/15 15:55
* 公共业务接口
*/
@RestController
@AllArgsConstructor
@RequestMapping("/business")
public class BusinessController {
private final IBudgetItemService budgetItemService;
/**
* 根据字典主键获取字典信息
*/
@GetMapping("/dict")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "获取相关字典信息", notes = "传入字典编码keyName")
public R<List<DictDataVO>> getDictData (@RequestParam String keyName){
return R.data(budgetItemService.getDictData(keyName));
}
}

View File

@ -0,0 +1,20 @@
package org.security.common.config;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;
/**
* @author zj 2022/6/27
*/
@Data
@Component
@ConfigurationProperties(prefix = "app-oauth")
public class AppOauth2Propertis {
private String accessTokenUrl;
private String userContextUrl;
private String appIndexUrl;
private String appId;
private String secret;
}

View File

@ -0,0 +1,22 @@
package org.security.common.config;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;
/**
* @author wzf
* @apiNote 公共配置参数
* @since Created in 2022/9/20 9:13
*/
@Data
@Component
@ConfigurationProperties(prefix = "common")
public class CommonProperties {
private String projectRoleName;
private String securityRoleName;
private String payPlanRemindKeyName;
private String concatDeadlineRemindKeyName;
private String servicePath;
}

View File

@ -0,0 +1,13 @@
package org.security.common.config;
import feign.RequestInterceptor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@Configuration
public class FeignConfiguration {
@Bean
public RequestInterceptor requestInterceptor() {
return new FeignClientRequestInterceptor();
}
}

View File

@ -0,0 +1,64 @@
package org.security.common.config;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;
/**
* 定时任务相关参数
* @author nantian.yangzhengyu
* @date 2024/1/11 14:59
*/
@Data
@Component
@ConfigurationProperties(prefix = "schedule")
public class ScheduledTaskProperties {
/**
*测试
*/
public String testCron;
/**
*定时任务自动生成设备检查任务
*/
private String deviceInspectionCron;
/**
*定时任务设备类型变更关联设备检查对应字段变更
*/
private String deviceCatgChangeCron;
/**
*定时任务设备检查是否超时
*/
private String deviceInspOvertimeCron;
/**
*定时任务检查设备是否超维保期限使用
*/
private String deviceOvertimeCron;
/**
*定时任务检测提报任务是否超时
*/
private String taskOvertimeCron;
/**
*定时任务任务发布
*/
private String taskPublishCron;
/**
*定时任务任务到期终止
*/
private String taskExpireCron;
/**
*定时任务检查禁用后重启用的员工并重启用
*/
private String reEnableEmplyeeCron;
/**
*定时任务检查禁用后重启用的机构并重启用
*/
private String reEnableDeptCron;
/**
*定时任务检查工作提醒是否超过提醒结束日期
*/
private String remindNoteOvertimeCron;
/**
*定时任务触发手动同步机构员工
*/
private String syncEmpDeptCron;
}

View File

@ -0,0 +1,26 @@
package org.security.common.config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
import java.util.concurrent.ThreadPoolExecutor;
/**
* @author zj 2022/4/27
* 业务线程池配置
*/
@Configuration
public class ThreadPoolConfig {
@Bean
public ThreadPoolTaskExecutor securityThreadPool() {
ThreadPoolTaskExecutor poolTaskExecutor = new ThreadPoolTaskExecutor();
poolTaskExecutor.setCorePoolSize(Runtime.getRuntime().availableProcessors());
poolTaskExecutor.setMaxPoolSize(1000);
poolTaskExecutor.setKeepAliveSeconds(60 * 3);
poolTaskExecutor.setRejectedExecutionHandler(new ThreadPoolExecutor.CallerRunsPolicy());
poolTaskExecutor.setThreadNamePrefix("security-htread-");
return poolTaskExecutor;
}
}

View File

@ -0,0 +1,65 @@
package org.security.common.eum;
/**
* @author Create by wzf
* @date 2022/3/25 10:11
* 考核年度枚举
*/
public enum AssessmentYearEnum {
/**
* 考核年度枚举
*/
ONE("1","年度"),
TWO("2","半年"),
THREE("3","季度"),
FOUR("4","月份"),
UNKNOWN("-1","unknown");
private String code;
private String label;
AssessmentYearEnum(String code, String label) {
this.code = code;
this.label = label;
}
public String getCode() {
return code;
}
public String getLabel() {
return label;
}
/**
*
* @param code
* @return
*/
public static AssessmentYearEnum parseByCode(String code) {
AssessmentYearEnum[] items = AssessmentYearEnum.values();
for (AssessmentYearEnum item : items) {
if (item.code.equals(code)) {
return item;
}
}
return UNKNOWN;
}
/**
*
* @param label
* @return
*/
public static AssessmentYearEnum parseByLabel(String label) {
AssessmentYearEnum[] items = AssessmentYearEnum.values();
for (AssessmentYearEnum item : items) {
if (item.label.equalsIgnoreCase(label)) {
return item;
}
}
return UNKNOWN;
}
}

View File

@ -0,0 +1,84 @@
package org.security.common.eum;
/**
* @author Create by wzf
* @date 2022/5/23 15:46
*/
public enum EducationEnum {
/**
* 员工学历岗位类型政治面貌枚举
*/
ONE("specialty","专科"),
TWO("undergraduate","本科"),
THREE("master","硕士研究生"),
FOUR("doctor","博士研究生"),
FIVE("post-doctoral","博士后"),
SIX("other","其他"),
SEVEN("leader","机构负责人"),
EIGHT("safeLeader","安全部门负责人"),
NINE("leaderInCharge","分管领导"),
TEN("safer","安全员"),
ELEVEN("fireman","义务消防员"),
UNKNOWN("-1","未知"),
POLITICS_ONE("01","中共党员"),
POLITICS_TWO("02","中共预备党员"),
POLITICS_THREE("03","共青团团员"),
POLITICS_FOUR("04","民革党员"),
POLITICS_FIVE("05","民盟盟员"),
POLITICS_SIX("06","民建会员"),
POLITICS_SEVEN("07","民进会员"),
POLITICS_EIGHT("08","农工党党员"),
POLITICS_NINE("09","致公党党员"),
POLITICS_TEN("10","九三学社社员"),
POLITICS_ELEVEN("11","台盟盟员"),
POLITICS_TWELVE("12","无党派人士"),
POLITICS_THIRTEEN("13","群众");
private String code;
private String label;
EducationEnum(String code, String label) {
this.code = code;
this.label = label;
}
public String getCode() {
return code;
}
public String getLabel() {
return label;
}
/**
*
* @param code
* @return
*/
public static EducationEnum parseByCode(String code) {
EducationEnum[] items = EducationEnum.values();
for (EducationEnum item : items) {
if (item.code.equals(code)) {
return item;
}
}
return UNKNOWN;
}
/**
*
* @param label
* @return
*/
public static EducationEnum parseByLabel(String label) {
EducationEnum[] items = EducationEnum.values();
for (EducationEnum item : items) {
if (item.label.equalsIgnoreCase(label)) {
return item;
}
}
return UNKNOWN;
}
}

View File

@ -0,0 +1,60 @@
package org.security.common.eum;
/**
* @author zj 2022/4/11
* 检查类型枚举
*/
public enum FrequencyEnum {
/**
* 按天
*/
BY_DAY("byDay"),
/**
* 按周
*/
BY_WEEK("byWeek"),
/**
* 按月
*/
BY_MONTH("byMonth"),
/**
* 按季度
*/
BY_QUARTER("byQuarter"),
/**
* 按半年
*/
BY_HALFYEAR("byHalfYear"),
/**
* 按年
*/
BY_YEAR("byYear"),
/**
* 未知
*/
UNKNOW("");
private String type;
FrequencyEnum(String type) {
this.type = type;
}
public static FrequencyEnum wrapper(String type) {
FrequencyEnum[] values = FrequencyEnum.values();
for (FrequencyEnum frequencyEnum : values) {
if (frequencyEnum.type.equals(type)) {
return frequencyEnum;
}
}
return UNKNOW;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
}

View File

@ -0,0 +1,63 @@
package org.security.common.eum;
/**
* @author Create by wzf
* @date 2022/6/10 16:10
*/
public enum OtherDataEnum {
/**
* 是否存在问题
*/
ZERO("0",""),
ONE("1",""),
UNKNOWN("-1","unknown");
private String code;
private String label;
OtherDataEnum(String code, String label) {
this.code = code;
this.label = label;
}
public String getCode() {
return code;
}
public String getLabel() {
return label;
}
/**
*
* @param code
* @return
*/
public static OtherDataEnum parseByCode(String code) {
OtherDataEnum[] items = OtherDataEnum.values();
for (OtherDataEnum item : items) {
if (item.code.equals(code)) {
return item;
}
}
return UNKNOWN;
}
/**
*
* @param label
* @return
*/
public static OtherDataEnum parseByLabel(String label) {
OtherDataEnum[] items = OtherDataEnum.values();
for (OtherDataEnum item : items) {
if (item.label.equalsIgnoreCase(label)) {
return item;
}
}
return UNKNOWN;
}
}

View File

@ -0,0 +1,69 @@
package org.security.common.eum;
/**
* @author wzf
* @apiNote 项目节点枚举
* @since Created in 2022/12/2 17:40
*/
public enum ProjectNodeEnum {
/**
* 项目节点 0-开始1-立项2-采购3-合同4-实施5-验收,6-结项,7-审阅通过
*/
ZERO(0,"项目开始"),
ONE(1,"项目立项"),
TWO(2,"项目采购"),
THREE(3,"项目合同"),
FOUR(4,"项目实施"),
FIVE(5,"项目验收"),
SIX(6,"项目结项"),
SEVEN(7,"项目审阅通过"),
UNKNOWN(-1,"UNKNOWN");
private int code;
private String label;
ProjectNodeEnum(int code, String label) {
this.code = code;
this.label = label;
}
public int getCode() {
return code;
}
public String getLabel() {
return label;
}
/**
*
* @param code
* @return
*/
public static ProjectNodeEnum parseByCode(int code) {
ProjectNodeEnum[] items = ProjectNodeEnum.values();
for (ProjectNodeEnum item : items) {
if (item.code == code) {
return item;
}
}
return UNKNOWN;
}
/**
*
* @param label
* @return
*/
public static ProjectNodeEnum parseByLabel(String label) {
ProjectNodeEnum[] items = ProjectNodeEnum.values();
for (ProjectNodeEnum item : items) {
if (item.label.equalsIgnoreCase(label)) {
return item;
}
}
return UNKNOWN;
}
}

View File

@ -0,0 +1,92 @@
package org.security.common.eum;
/**
* @author zj 2022/4/13
*/
public enum TaskBusinessTypeEnum {
/**
* 检查整改
*/
DAILY_SAFE_INSPECTION("daily_safe_inspection", "日常安全检查"),
DAILY_FIRE_PATROL("daily_fire_patrol", "每日防火巡查记录表"),
MONTH_FIREPROOF_INSPECTION_RECORD("month_fireproof_inspection_record", "每月防火检查记录表"),
WARNING_TEST_RECORD("warning_test_record", "报警系统测试情况"),
SELF_HELP_DEVICE_CHECK("self_help_device_check", "自助设备检查"),
DAILY_SPECIAL("daily_special", "检查整改专项工作"),
/**
* 安保指挥中心
*/
SAFE_SELF_CHECK("off_site_inspection_records", "非现场检查整改通知书"),
BUSINESS_OUTLET_INSPECTION_RECORD("business_outlet_inspection_record", "营业网点检查日志"),
SELF_BANK_INSPECTION_RECORD("self_bank_inspection_record", "自助银行检查日志"),
CONTACT_ALARM_RECORD("contact_alarm_record", "联系(接警)记录"),
ALARM_PUSH("alarm_push", "警情推送"),
/**
* 申请及报备
*/
DUTY("duty", "值班备勤"),
WORK_OVERTIME("work_overtime", "加班报备"),
/**
* 教育培训
*/
SAFE_MEETING("safe_meeting", "安全防范学习会议记录"),
SAFE_KNOWLEDGE("safe_knowledge", "安全知识培训情况记录"),
EDU_SPECIAL("edu_special", "教育培训专项工作"),
FIRE_PREVENTION_RECORD("fire_prevention_record", "消防宣传教育记录表"),
/**
* 应急演练
*/
DRILL_FILE_CONTROL("drill_fire_control", "消防演练"),
DRILL_SAFETY("drill_safety", "安防演练"),
DIRLL_SPECIAL("dirll_special", "应急演练专项任务"),
/**
* 案件防控
*/
ABNORMAL_EVENT("abnormal_event", "异常事件上报"),
PREVENT_SPECIAL("prevent_special", "处置情况上报"),
BIG_ISSUE("big_issue", "重大事项报告"),
RISK_REMINDER("risk_reminder", "风险提示"),
/**
* 设备检查
*/
DEVICE_CHECK("device_check","设备检查"),
DEVICE_RECTIFY("device_rectify","设备整改"),
DEVICE_CONTINUED_RECTIFY("device_continued_rectify","设备持续整改"),
UNKONOW("", "未知");
private String type;
private String name;
TaskBusinessTypeEnum(String type, String name) {
this.type = type;
this.name = name;
}
public static String convertToName(String type) {
TaskBusinessTypeEnum[] taskBusinessTypeEnums = TaskBusinessTypeEnum.values();
for (TaskBusinessTypeEnum typeEnum : taskBusinessTypeEnums) {
if (typeEnum.getType().equals(type)) {
return typeEnum.getName();
}
}
return UNKONOW.getName();
}
public String getType() {
return type;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public void setType(String type) {
this.type = type;
}
}

View File

@ -0,0 +1,38 @@
package org.security.common.eum;
/**
* @author zj 2022/4/12
* 任务提报状态
*/
public enum TaskHandInEnum {
/**
* 未填报
*/
NO_SUBMIT("0"),
/**
* 按时填报
*/
SUBMIT("1"),
/**
* 超时填报
*/
TIME_OUT_SUBMIT("2"),
/**
* 超时未报
*/
TIME_OUT_NO_SUBMIT("3");
private String type;
TaskHandInEnum(String type) {
this.type = type;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
}

View File

@ -0,0 +1,81 @@
package org.security.common.eum;
/**
* @author Create by wzf
* @date 2022/3/25 10:37
* 考核时段枚举
*/
public enum evaluationTimeIntervalEnum {
/**
* 考核年度枚举
*/
ONE("13","上半年"),
TWO("14","下半年"),
THREE("15","第一季度"),
FOUR("16","第二季度"),
FIVE("17","第三季度"),
SIX("18","第四季度"),
SEVEN("01","1月"),
EIGHT("02","2月"),
NIGHT("03","3月"),
TEN("04","4月"),
ELEVEN("05","5月"),
TWELVE("06","6月"),
THIRTEEN("07","7月"),
FOURTEEN("08","8月"),
FIFTEEN("09","8月"),
SIXTEEN("10","10月"),
SEVENTEEN("11","11月"),
EIGHTEEN("12","12月"),
NINETEEN("19","年度考核"),
UNKNOWN("-1","年度考核");
private String code;
private String label;
evaluationTimeIntervalEnum(String code, String label) {
this.code = code;
this.label = label;
}
public String getCode() {
return code;
}
public String getLabel() {
return label;
}
/**
*
* @param code
* @return
*/
public static evaluationTimeIntervalEnum parseByCode(String code) {
evaluationTimeIntervalEnum[] items = evaluationTimeIntervalEnum.values();
for (evaluationTimeIntervalEnum item : items) {
if (item.code.equals(code)) {
return item;
}
}
return UNKNOWN;
}
/**
*
* @param label
* @return
*/
public static evaluationTimeIntervalEnum parseByLabel(String label) {
evaluationTimeIntervalEnum[] items = evaluationTimeIntervalEnum.values();
for (evaluationTimeIntervalEnum item : items) {
if (item.label.equalsIgnoreCase(label)) {
return item;
}
}
return UNKNOWN;
}
}

View File

@ -0,0 +1,59 @@
/**
* Copyright (c) cn-fanya All rights reserved.
*
*
*
*
*/
package org.security.common.exception;
/**
* 错误编码由5位数字组成前2位为模块编码后3位为业务编码
* <p>
* 1000110代表系统模块001代表业务代码
* </p>
*
* @author zj
* @since 1.0.0
*/
public interface ErrorCode {
int INTERNAL_SERVER_ERROR = 500;
int UNAUTHORIZED = 401;
int FORBIDDEN = 403;
int NOT_NULL = 10001;
int DB_RECORD_EXISTS = 10002;
int PARAMS_GET_ERROR = 10003;
int ACCOUNT_PASSWORD_ERROR = 10004;
int ACCOUNT_DISABLE = 10005;
int IDENTIFIER_NOT_NULL = 10006;
int CAPTCHA_ERROR = 10007;
int SUB_MENU_EXIST = 10008;
int PASSWORD_ERROR = 10009;
int ACCOUNT_NOT_EXIST = 10010;
int SUPERIOR_DEPT_ERROR = 10011;
int SUPERIOR_MENU_ERROR = 10012;
int DATA_SCOPE_PARAMS_ERROR = 10013;
int DEPT_SUB_DELETE_ERROR = 10014;
int DEPT_USER_DELETE_ERROR = 10015;
int ACT_DEPLOY_ERROR = 10016;
int ACT_MODEL_IMG_ERROR = 10017;
int ACT_MODEL_EXPORT_ERROR = 10018;
int UPLOAD_FILE_EMPTY = 10019;
int TOKEN_NOT_EMPTY = 10020;
int TOKEN_INVALID = 10021;
int ACCOUNT_LOCK = 10022;
int ACT_DEPLOY_FORMAT_ERROR = 10023;
int OSS_UPLOAD_FILE_ERROR = 10024;
int SEND_SMS_ERROR = 10025;
int MAIL_TEMPLATE_NOT_EXISTS = 10026;
int REDIS_ERROR = 10027;
int JOB_ERROR = 10028;
int INVALID_SYMBOL = 10029;
int JSON_FORMAT_ERROR = 10030;
int SMS_CONFIG = 10031;
int MSG_GET_VERIFY_CODE = 10032;
int MENU_TYPE_NOT_EXIST = 10033;//菜单类型不存在
}

View File

@ -0,0 +1,53 @@
/**
* Copyright (c) cn-fanya All rights reserved.
*
*
*
*
*/
package org.security.common.exception;
import java.io.IOException;
import java.io.PrintWriter;
import java.io.StringWriter;
/**
* Exception工具类
*
* @author zj
*/
public class ExceptionUtils {
/**
* 获取异常信息
* @param ex 异常
* @return 返回异常信息
*/
public static String getErrorStackTrace(Exception ex){
StringWriter sw = null;
PrintWriter pw = null;
try {
sw = new StringWriter();
pw = new PrintWriter(sw, true);
ex.printStackTrace(pw);
}finally {
try {
if(pw != null) {
pw.close();
}
} catch (Exception e) {
}
try {
if(sw != null) {
sw.close();
}
} catch (IOException e) {
}
}
return sw.toString();
}
}

View File

@ -0,0 +1,49 @@
package org.security.common.exception;
/**
* 自定义异常
*
* @author zj
*/
public class RenException extends RuntimeException {
private static final long serialVersionUID = 1L;
private int code;
private String msg;
public RenException(int code, String msg) {
super(msg);
this.code = code;
this.msg = msg;
}
public RenException(String msg) {
super(msg);
this.code = ErrorCode.INTERNAL_SERVER_ERROR;
this.msg = msg;
}
public RenException(String msg, Throwable e) {
super(msg, e);
this.code = ErrorCode.INTERNAL_SERVER_ERROR;
this.msg = msg;
}
public String getMsg() {
return msg;
}
public void setMsg(String msg) {
this.msg = msg;
}
public int getCode() {
return code;
}
public void setCode(int code) {
this.code = code;
}
}

View File

@ -0,0 +1,46 @@
/*
* Copyright (c) cn-fanya All rights reserved.
*/
package org.security.common.exception;
import org.security.common.Constant;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springblade.core.tool.api.R;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;
/**
* 异常处理器
*
* @author
* @since 1.0.0
*/
@RestControllerAdvice
public class RenExceptionHandler {
private static final Logger logger = LoggerFactory.getLogger(RenExceptionHandler.class);
/**
* 处理自定义异常
*/
@ExceptionHandler(RenException.class)
public R handleRenException(RenException ex) {
logger.error(ex.getMsg());
return R.fail(ex.getCode(), ex.getMsg());
}
/**
* 避免异常信息返回前端
* 22-12-28 异常传回前端以便定位问题
* @param e
* @return
*/
@ExceptionHandler(Exception.class)
public R hendleException(Exception e) {
logger.error("系统异常:", e);
return R.fail("系统异常:" + e.getMessage());
}
}

View File

@ -0,0 +1,101 @@
package org.security.common.handler;
import com.alibaba.excel.metadata.Head;
import com.alibaba.excel.write.handler.CellWriteHandler;
import com.alibaba.excel.write.handler.context.CellWriteHandlerContext;
import com.alibaba.excel.write.metadata.holder.WriteSheetHolder;
import com.alibaba.excel.write.metadata.holder.WriteTableHolder;
import org.apache.poi.common.usermodel.HyperlinkType;
import org.apache.poi.ss.usermodel.*;
import java.util.HashMap;
import java.util.List;
/**
* @author Create by wzf
* @date 2022/5/30 14:46
* 实现CellWriteHandler接口, 实现对单元格样式的精确控制
*/
public class CustomCellWriteHandler implements CellWriteHandler {
/**
* 在创建单元格之前调用
*/
@Override
public void beforeCellCreate(WriteSheetHolder writeSheetHolder, WriteTableHolder writeTableHolder, Row row,
Head head, Integer columnIndex, Integer relativeRowIndex, Boolean isHead) {
}
/**
* 单元格创建之后(没有写入值)
*
* @param writeSheetHolder
* @param writeTableHolder
* @param cell
* @param head
* @param relativeRowIndex
* @param isHead
*/
@Override
public void afterCellCreate(WriteSheetHolder writeSheetHolder, WriteTableHolder writeTableHolder, Cell cell,
Head head, Integer relativeRowIndex, Boolean isHead) {
}
@Override
public void afterCellDataConverted(CellWriteHandlerContext context) {
}
/**
* 单元格处理后(已写入值): 设置第一行第一列的头超链接到EasyExcel的官网(本系统的导出的excel 0,1两行都是头,所以只设置第一行的超链接)
* 这里再进行拦截的单元格样式设置的话,前面该样式将全部失效
*
* @param context
*/
@Override
public void afterCellDispose(CellWriteHandlerContext context) {
// 设置超链接
if (Boolean.TRUE.equals(context.getHead() && context.getCell().getRowIndex() == 0) && context.getCell().getColumnIndex() == 0) {
CreationHelper helper = context.getWriteSheetHolder().getSheet().getWorkbook().getCreationHelper();
Hyperlink hyperlink = helper.createHyperlink(HyperlinkType.URL);
hyperlink.setAddress("https://github.com/alibaba/easyexcel");
context.getCell().setHyperlink(hyperlink);
}
// 精确设置单元格格式
boolean bool = context.getHead() && context.getCell().getRowIndex() == 1 &&
("请求参数".equals(context.getCell().getStringCellValue()) || "请求Body".equals(context.getCell().getStringCellValue()));
if (bool) {
// 获取工作簿
Workbook workbook = context.getWriteSheetHolder().getSheet().getWorkbook();
CellStyle cellStyle = workbook.createCellStyle();
Font cellFont = workbook.createFont();
cellFont.setBold(Boolean.TRUE);
cellFont.setFontHeightInPoints((short) 14);
cellFont.setColor(IndexedColors.SEA_GREEN.getIndex());
cellStyle.setFont(cellFont);
context.getCell().setCellStyle(cellStyle);
}
}
/** * map
* key第i行
* value第i行中单元格索引集合
*/
private HashMap<Integer, List<Integer>> map;
/**
* 颜色
*/
private Short colorIndex;
/**
* 有参构造
*/
public CustomCellWriteHandler(HashMap<Integer, List<Integer>> map, Short colorIndex) { this.map = map; this.colorIndex = colorIndex; }
/**
* 无参构造
*/
public CustomCellWriteHandler() { }
}

View File

@ -0,0 +1,34 @@
package org.security.common.handler;
import com.baomidou.mybatisplus.core.handlers.MetaObjectHandler;
import lombok.extern.slf4j.Slf4j;
import org.apache.ibatis.reflection.MetaObject;
import org.springblade.core.secure.utils.AuthUtil;
import org.springframework.stereotype.Component;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Optional;
@Slf4j
@Component
public class SecurityMetaObjectHandler implements MetaObjectHandler {
//插入时的填充策略
@Override
public void insertFill(MetaObject metaObject) {
this.setFieldValByName("createdBy", Optional.ofNullable(String.valueOf(AuthUtil.getUserId())).orElse(""), metaObject);
this.setFieldValByName("updatedBy", Optional.ofNullable(String.valueOf(AuthUtil.getUserId())).orElse(""), metaObject);
this.setFieldValByName("createdTime", new Date(), metaObject);
this.setFieldValByName("updatedTime", new Date(), metaObject);
}
//更新时的填充策略
@Override
public void updateFill(MetaObject metaObject) {
this.setFieldValByName("updatedTime", new Date(), metaObject);
this.setFieldValByName("updatedBy", Optional.ofNullable(String.valueOf(AuthUtil.getUserId())).orElse(""), metaObject);
}
}

View File

@ -0,0 +1,27 @@
package org.security.common.util;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
/**
* @author Create by wzf
* @date 2022/3/7 14:04
*/
public class DataFormatUtil {
public static Date getNowDate() throws ParseException {
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
return dateFormat.parse(dateFormat.format(new Date()));
}
public static String getDate(){
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
return dateFormat.format(new Date());
}
public static Date getLocalDate() throws ParseException {
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
return dateFormat.parse(dateFormat.format(new Date()));
}
}

View File

@ -0,0 +1,122 @@
package org.security.common.util;
import org.apache.commons.lang.time.DateFormatUtils;
import org.springblade.core.tool.utils.DateUtil;
import org.springblade.core.tool.utils.Func;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
/**
* @author Created by yzy
* @date 2022/3/21 11:50
*/
public class DeadlineUtil {
public static String getDDLByFreq(String freq, Date endDate) {
//当前日期
Calendar c = Calendar.getInstance();
int year = c.get(Calendar.YEAR);
int month = c.get(Calendar.MONTH);
int day = c.get(Calendar.DATE);
int weekday = c.get(Calendar.DAY_OF_WEEK);
// 按天取当日日期
if ("byDay".equals(freq)) {
SimpleDateFormat ft = new SimpleDateFormat("yyyy-MM-dd");
String date = ft.format(new Date());
return date;
}
// 按周获取当周最后一天
else if ("byWeek".equals(freq)) {
Calendar c1 = Calendar.getInstance();
// 如果日历每周第一天是周天需要改为每周第一天是周一的逻辑
boolean isFirstSunday = (c.getFirstDayOfWeek() == Calendar.SUNDAY);
if(isFirstSunday){
weekday=weekday-1;
}
int count = 7 - weekday;
c1.add(Calendar.DATE, count);
String date = DateFormatUtils.format(c1.getTimeInMillis(), "yyyy-MM-dd");
return date;
}
// 按月获取当月最后一天
else if ("byMonth".equals(freq)) {
Calendar c2 = Calendar.getInstance();
c2.set(Calendar.YEAR, year);
c2.set(Calendar.MONTH, month + 1);
int maxDay = c2.getActualMaximum(Calendar.DAY_OF_MONTH);
c2.set(Calendar.DAY_OF_MONTH, maxDay);
String date = DateFormatUtils.format(c2.getTimeInMillis(), "yyyy-MM-dd");
return date;
}
// 按季度获取该季度最后一天
else if ("byQuarter".equals(freq)) {
Calendar c3 = getQuarterEnd(c);
String date = DateFormatUtils.format(c3.getTimeInMillis(), "yyyy-MM-dd");
return date;
}
// 按半年获取所处上/下半年的最后一天
else if ("byHalfYear".equals(freq)) {
Calendar c4 = getHalfYearEnd(c);
String date = DateFormatUtils.format(c4.getTimeInMillis(), "yyyy-MM-dd");
return date;
}
// 按年,取当前年度最后一天
else if ("byYear".equals(freq)) {
Calendar c5 = Calendar.getInstance();
c5.set(Calendar.YEAR, year);
c5.set(Calendar.MONTH, 11);
c5.set(Calendar.DAY_OF_MONTH, 31);
String date = DateFormatUtils.format(c5.getTimeInMillis(), "yyyy-MM-dd");
return date;
}
// 单次提报直接返回endDate
return Func.isNotEmpty(endDate) ? DateUtil.formatDate(endDate) : null;
}
//传入日期判断属于第几季度并返回该季度最后一天
public static Calendar getQuarterEnd(Calendar c) {
Calendar c1 = Calendar.getInstance();
c1.set(c.get(Calendar.YEAR), Calendar.JANUARY, 1);
Calendar c3 = Calendar.getInstance();
c3.set(c.get(Calendar.YEAR), Calendar.MARCH, 31);
Calendar c4 = Calendar.getInstance();
c4.set(c.get(Calendar.YEAR), Calendar.APRIL, 1);
Calendar c6 = Calendar.getInstance();
c6.set(c.get(Calendar.YEAR), Calendar.JUNE, 30);
Calendar c7 = Calendar.getInstance();
c7.set(c.get(Calendar.YEAR), Calendar.JULY, 1);
Calendar c9 = Calendar.getInstance();
c9.set(c.get(Calendar.YEAR), Calendar.SEPTEMBER, 30);
Calendar c10 = Calendar.getInstance();
c10.set(c.get(Calendar.YEAR), Calendar.OCTOBER, 1);
Calendar c12 = Calendar.getInstance();
c12.set(c.get(Calendar.YEAR), Calendar.DECEMBER, 31);
if (c.compareTo(c1) >= 0 && c.compareTo(c3) <= 0) {//一季度
return c3;
} else if (c.compareTo(c4) >= 0 && c.compareTo(c6) <= 0) {//二季度
return c6;
} else if (c.compareTo(c7) >= 0 && c.compareTo(c9) <= 0) {//三季度
return c9;
} else {//四季度
return c12;
}
}
//传入日期判断属于上半年或下半年并返回该半年度最后一天
public static Calendar getHalfYearEnd(Calendar c) {
Calendar c1 = Calendar.getInstance();
c1.set(c.get(Calendar.YEAR), Calendar.JANUARY, 1);
Calendar c6 = Calendar.getInstance();
c6.set(c.get(Calendar.YEAR), Calendar.JUNE, 30);
Calendar c7 = Calendar.getInstance();
c7.set(c.get(Calendar.YEAR), Calendar.JULY, 1);
Calendar c12 = Calendar.getInstance();
c12.set(c.get(Calendar.YEAR), Calendar.DECEMBER, 31);
if (c.compareTo(c1) >= 0 && c.compareTo(c6) <= 0) {//上半年
return c6;
} else {//下半年
return c12;
}
}
}

View File

@ -0,0 +1,21 @@
package org.security.common.util;
import org.springblade.core.tool.utils.DateUtil;
import org.springblade.core.tool.utils.Func;
import java.text.SimpleDateFormat;
import java.util.Date;
/**
* @author Create by wzf
* @date 2022/7/8 17:03
* 生成非现场检查整改通知书文号
*/
public class DocumentNumberUtil {
public static String createdDocumentNumber(){
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMddHHmmssSSS");
String format = dateFormat.format(new Date());
return "FXCJCZGTZS".concat(format);
}
}

View File

@ -0,0 +1,146 @@
package org.security.common.util;
import com.alibaba.cloud.commons.io.Charsets;
import com.alibaba.excel.EasyExcel;
import com.alibaba.excel.read.builder.ExcelReaderBuilder;
import com.alibaba.excel.read.listener.ReadListener;
import com.alibaba.excel.util.DateUtils;
import com.alibaba.excel.util.StringUtils;
import lombok.SneakyThrows;
import org.springblade.core.excel.listener.DataListener;
import org.springblade.core.excel.listener.ImportListener;
import org.springblade.core.excel.support.ExcelException;
import org.springblade.core.excel.support.ExcelImporter;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletResponse;
import java.io.BufferedInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.net.URLEncoder;
import java.util.Date;
import java.util.List;
/**
* @author Create by wzf
* @date 2022/3/30 10:51
*/
public class ExcelUtil {
/**
* 读取excel的所有sheet数据
*
* @param excel excel文件
* @return List<Object>
*/
public static <T> List<T> read(MultipartFile excel, Class<T> clazz) {
DataListener<T> dataListener = new DataListener<>();
ExcelReaderBuilder builder = getReaderBuilder(excel, dataListener, clazz);
if (builder == null) {
return null;
}
builder.doReadAll();
return dataListener.getDataList();
}
/**
* 读取excel的指定sheet数据
*
* @param excel excel文件
* @param sheetNo sheet序号(从0开始)
* @return List<Object>
*/
public static <T> List<T> read(MultipartFile excel, int sheetNo, Class<T> clazz) {
return read(excel, sheetNo, 1, clazz);
}
/**
* 读取excel的指定sheet数据
*
* @param excel excel文件
* @param sheetNo sheet序号(从0开始)
* @param headRowNumber 表头行数
* @return List<Object>
*/
public static <T> List<T> read(MultipartFile excel, int sheetNo, int headRowNumber, Class<T> clazz) {
DataListener<T> dataListener = new DataListener<>();
ExcelReaderBuilder builder = getReaderBuilder(excel, dataListener, clazz);
if (builder == null) {
return null;
}
builder.sheet(sheetNo).headRowNumber(headRowNumber).doRead();
return dataListener.getDataList();
}
/**
* 读取并导入数据
*
* @param excel excel文件
* @param importer 导入逻辑类
* @param <T> 泛型
*/
public static <T> void save(MultipartFile excel, ExcelImporter<T> importer, Class<T> clazz) {
ImportListener<T> importListener = new ImportListener<>(importer);
ExcelReaderBuilder builder = getReaderBuilder(excel, importListener, clazz);
if (builder != null) {
builder.doReadAll();
}
}
/**
* 导出excel
*
* @param response 响应类
* @param dataList 数据列表
* @param clazz class类
* @param <T> 泛型
*/
@SneakyThrows
public static <T> void export(HttpServletResponse response, List<T> dataList, Class<T> clazz) {
export(response, DateUtils.format(new Date(), DateUtils.DATE_FORMAT_14), "导出数据", dataList, clazz);
}
/**
* 导出excel
*
* @param response 响应类
* @param fileName 文件名
* @param sheetName sheet名
* @param dataList 数据列表
* @param clazz class类
* @param <T> 泛型
*/
@SneakyThrows
public static <T> void export(HttpServletResponse response, String fileName, String sheetName, List<T> dataList, Class<T> clazz) {
response.setContentType("application/vnd.ms-excel");
response.setCharacterEncoding("UTF-8");
fileName = URLEncoder.encode(fileName, "GBK");
response.setHeader("Content-disposition", "attachment;filename=" + fileName + ".xlsx");
EasyExcel.write(response.getOutputStream(), clazz).sheet(sheetName).doWrite(dataList);
}
/**
* 获取构建类
*
* @param excel excel文件
* @param readListener excel监听类
* @return ExcelReaderBuilder
*/
public static <T> ExcelReaderBuilder getReaderBuilder(MultipartFile excel, ReadListener<T> readListener, Class<T> clazz) {
String filename = excel.getOriginalFilename();
if (StringUtils.isEmpty(filename)) {
throw new ExcelException("请上传文件!");
}
// if ((!StringUtils.endsWithIgnoreCase(filename, ".xls") && !StringUtils.endsWithIgnoreCase(filename, ".xlsx"))) {
if (!filename.endsWith(".xls") && !filename.endsWith(".xlsx")) {
throw new ExcelException("请上传正确的excel文件!");
}
InputStream inputStream;
try {
inputStream = new BufferedInputStream(excel.getInputStream());
return EasyExcel.read(inputStream, clazz, readListener);
} catch (IOException e) {
e.printStackTrace();
}
return null;
}
}

View File

@ -0,0 +1,65 @@
package org.security.common.util;
import com.alibaba.excel.metadata.data.DataFormatData;
import com.alibaba.excel.write.metadata.style.WriteCellStyle;
import com.alibaba.excel.write.metadata.style.WriteFont;
import com.alibaba.excel.write.style.HorizontalCellStyleStrategy;
import org.apache.poi.ss.usermodel.BorderStyle;
import org.apache.poi.ss.usermodel.FillPatternType;
import org.apache.poi.ss.usermodel.HorizontalAlignment;
import org.apache.poi.ss.usermodel.IndexedColors;
/**
* @author Create by wzf
* @date 2022/5/30 14:37
*
*/
public class MyCellStyleStrategyUtil {
/**
*
* @return
*/
public static HorizontalCellStyleStrategy getHorizontalCellStyleStrategy(){
// 表头策略
WriteCellStyle headerCellStyle = new WriteCellStyle();
// 表头水平对齐居中
headerCellStyle.setHorizontalAlignment(HorizontalAlignment.CENTER);
// 背景色
headerCellStyle.setFillForegroundColor(IndexedColors.WHITE1.getIndex());
WriteFont headerFont = new WriteFont();
headerFont.setFontHeightInPoints((short) 14);
headerCellStyle.setWriteFont(headerFont);
// 自动换行
headerCellStyle.setWrapped(Boolean.FALSE);
// 内容策略
WriteCellStyle contentCellStyle = new WriteCellStyle();
// 设置数据允许的数据格式,这里49代表所有可以都允许设置
DataFormatData dataFormatData = new DataFormatData();
dataFormatData.setIndex((short)49);
contentCellStyle.setDataFormatData(dataFormatData);
// 设置背景色: 需要指定 FillPatternType 为FillPatternType.SOLID_FOREGROUND 不然无法显示背景颜色.头默认了 FillPatternType所以可以不指定
contentCellStyle.setFillPatternType(FillPatternType.NO_FILL);
contentCellStyle.setFillForegroundColor(IndexedColors.GREY_40_PERCENT.getIndex());
// 设置内容靠左对齐
contentCellStyle.setHorizontalAlignment(HorizontalAlignment.LEFT);
// 设置字体
WriteFont contentFont = new WriteFont();
contentFont.setFontHeightInPoints((short) 12);
contentCellStyle.setWriteFont(contentFont);
// 设置自动换行
contentCellStyle.setWrapped(Boolean.FALSE);
// 设置边框样式和颜色
contentCellStyle.setBorderLeft(BorderStyle.MEDIUM);
contentCellStyle.setBorderTop(BorderStyle.MEDIUM);
contentCellStyle.setBorderRight(BorderStyle.MEDIUM);
contentCellStyle.setBorderBottom(BorderStyle.MEDIUM);
contentCellStyle.setTopBorderColor(IndexedColors.BLACK1.getIndex());
contentCellStyle.setBottomBorderColor(IndexedColors.BLACK1.getIndex());
contentCellStyle.setLeftBorderColor(IndexedColors.BLACK1.getIndex());
contentCellStyle.setRightBorderColor(IndexedColors.BLACK1.getIndex());
// 将格式加入单元格样式策略
return new HorizontalCellStyleStrategy(headerCellStyle, contentCellStyle);
}
}

View File

@ -0,0 +1,67 @@
package org.security.common.util;
import cn.hutool.core.codec.Base64;
import com.google.zxing.BarcodeFormat;
import com.google.zxing.EncodeHintType;
import com.google.zxing.MultiFormatWriter;
import com.google.zxing.common.BitMatrix;
import org.springblade.core.tool.utils.Func;
import javax.imageio.ImageIO;
import java.awt.image.BufferedImage;
import java.io.ByteArrayOutputStream;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
/**
* @author Create by wzf
* @date 2022/5/7 16:35
* 二维码生成工具
*/
public class QrCodeUtil {
/**
* 生成二维码
* @param qrCodeId 设备id
* @return
*/
public static String createQrCode(String qrCodeId){
// 二维码需要使用到的颜色
final int BLACK = 0xFF000000;
final int WHITE = 0xFFFFFFFF;
String base64 = "";
// 需要生成的二维码的文字地址
String qrCodeStr = qrCodeId.concat("-").concat(Func.formatDateTime(new Date()));
// 创建二维码
try {
Map<EncodeHintType, String> charcter = new HashMap<>();
// 设置字符集
charcter.put(EncodeHintType.CHARACTER_SET, "UTF-8");
// 设置二维码的四个参数 需要生成的字符串类型设置为二维码二维码宽度二维码高度字符串字符集
BitMatrix bitMatrix = new MultiFormatWriter()
.encode(qrCodeStr, BarcodeFormat.QR_CODE, 500, 500, charcter);
// 二维码像素也就是上面设置的 500
int width = bitMatrix.getWidth();
int height = bitMatrix.getHeight();
// 创建二维码对象
BufferedImage image = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);
for (int x = 0; x < width; x++) {
for (int y = 0; y < height; y++) {
// 按照上面定义好的二维码颜色编码生成二维码
image.setRGB(x, y, bitMatrix.get(x, y) ? BLACK : WHITE);
}
}
// 1第一种方式
// 生成的二维码图片对象转 base64
ByteArrayOutputStream stream = new ByteArrayOutputStream();
// 设置图片的格式
ImageIO.write(image, "png", stream);
// 生成的二维码base64
base64 = Base64.encode(stream.toByteArray());
} catch (Exception e) {
e.printStackTrace();
}
return base64;
}
}

View File

@ -0,0 +1,45 @@
package org.security.common.util;
import cn.hutool.core.date.DatePattern;
import cn.hutool.core.date.DateTime;
import cn.hutool.core.date.DateUtil;
import java.util.Date;
/**
* @author zj 2022/4/27
*/
public class TaskCehckUtil {
/**
* 判断当前时间属于上半年/下半年
* 返回上半年/下半年结束时间
*
* @return
*/
public static Date getHalfYearEnd() {
DateTime date = DateUtil.date();
int month = DateUtil.month(date);
if (month <= 6) {
String start = DateUtil.year(DateUtil.date()) + "-06-30 23:59:59";
return DateUtil.parse(start, DatePattern.NORM_DATETIME_PATTERN);
}
return DateUtil.endOfYear(date);
}
/**
* 判断当前时间属于上半年/下半年
* 返回上半年/下半年开始时间
*
* @return
*/
public static Date getHalfYearStart() {
DateTime date = DateUtil.date();
int month = DateUtil.month(date);
if (month <= 6) {
return DateUtil.beginOfYear(date);
}
String start = DateUtil.year(DateUtil.date()) + "-07-01";
return DateUtil.parse(start, DatePattern.NORM_DATE_FORMAT);
}
}

View File

@ -0,0 +1,65 @@
package org.security.common.util;
import org.jsoup.Jsoup;
import org.jsoup.safety.Whitelist;
/**
* XSS过滤工具类
*
* @author
* @since 1.0.0
*/
public class XssUtils extends Whitelist {
/**
* XSS过滤
*/
public static String filter(String html){
return Jsoup.clean(html, xssWhitelist());
}
/**
* XSS过滤白名单
*/
private static Whitelist xssWhitelist(){
return new Whitelist()
//支持的标签
.addTags("a", "b", "blockquote", "br", "caption", "cite", "code", "col", "colgroup", "dd", "div", "dl",
"dt", "em", "h1", "h2", "h3", "h4", "h5", "h6", "i", "img", "li", "ol", "p", "pre", "q", "small",
"strike", "strong","sub", "sup", "table", "tbody", "td","tfoot", "th", "thead", "tr", "u","ul",
"embed","object","param","span")
//支持的标签属性
.addAttributes("a", "href", "class", "style", "target", "rel", "nofollow")
.addAttributes("blockquote", "cite")
.addAttributes("code", "class", "style")
.addAttributes("col", "span", "width")
.addAttributes("colgroup", "span", "width")
.addAttributes("img", "align", "alt", "height", "src", "title", "width", "class", "style")
.addAttributes("ol", "start", "type")
.addAttributes("q", "cite")
.addAttributes("table", "summary", "width", "class", "style")
.addAttributes("tr", "abbr", "axis", "colspan", "rowspan", "width", "style")
.addAttributes("td", "abbr", "axis", "colspan", "rowspan", "width", "style")
.addAttributes("th", "abbr", "axis", "colspan", "rowspan", "scope","width", "style")
.addAttributes("ul", "type", "style")
.addAttributes("pre", "class", "style")
.addAttributes("div", "class", "id", "style")
.addAttributes("embed", "src", "wmode", "flashvars", "pluginspage", "allowFullScreen", "allowfullscreen",
"quality", "width", "height", "align", "allowScriptAccess", "allowscriptaccess", "allownetworking", "type")
.addAttributes("object", "type", "id", "name", "data", "width", "height", "style", "classid", "codebase")
.addAttributes("param", "name", "value")
.addAttributes("span", "class", "style")
//标签属性对应的协议
.addProtocols("a", "href", "ftp", "http", "https", "mailto")
.addProtocols("img", "src", "http", "https")
.addProtocols("blockquote", "cite", "http", "https")
.addProtocols("cite", "cite", "http", "https")
.addProtocols("q", "cite", "http", "https")
.addProtocols("embed", "src", "http", "https");
}
}

View File

@ -0,0 +1,37 @@
/**
* Copyright (c) cn-fanya All rights reserved.
*/
package org.security.common.validator;
import org.security.common.exception.RenException;
import javax.validation.ConstraintViolation;
import javax.validation.Validation;
import javax.validation.Validator;
import java.util.Set;
/**
* hibernate-validator校验工具类
* 参考文档http://docs.jboss.org/hibernate/validator/6.0/reference/en-US/html_single/
*
* @author zj
* @since 1.0.0
*/
public class ValidatorUtils {
private static final Validator validator = Validation.buildDefaultValidatorFactory().getValidator();
/**
* 校验对象
* @param object 待校验对象
* @param groups 待校验的组
*/
public static void validateEntity(Object object, Class<?>... groups)
throws RenException {
Set<ConstraintViolation<Object>> constraintViolations = validator.validate(object, groups);
if (!constraintViolations.isEmpty()) {
ConstraintViolation<Object> constraint = constraintViolations.iterator().next();
throw new RenException(constraint.getMessage());
}
}
}

View File

@ -0,0 +1,19 @@
/**
* Copyright (c) cn-fanya All rights reserved.
*
*
*
*
*/
package org.security.common.validator.group;
/**
* 新增 Group
*
* @author zj
* @since 1.0.0
*/
public interface AddGroup {
}

View File

@ -0,0 +1,19 @@
/**
* Copyright (c) cn-fanya All rights reserved.
*
*
*
*
*/
package org.security.common.validator.group;
/**
* 默认 Group
*
* @author zj
* @since 1.0.0
*/
public interface DefaultGroup {
}

View File

@ -0,0 +1,22 @@
/**
* Copyright (c) cn-fanya All rights reserved.
*
*
*
*
*/
package org.security.common.validator.group;
import javax.validation.GroupSequence;
/**
* 定义校验顺序如果AddGroup组失败则UpdateGroup组不会再校验
*
* @author zj
* @since 1.0.0
*/
@GroupSequence({AddGroup.class, UpdateGroup.class})
public interface Group {
}

View File

@ -0,0 +1,19 @@
/**
* Copyright (c) cn-fanya All rights reserved.
*
*
*
*
*/
package org.security.common.validator.group;
/**
* 修改 Group
*
* @author zj
* @since 1.0.0
*/
public interface UpdateGroup {
}

View File

@ -0,0 +1,117 @@
package org.security.trans.app.controller;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import org.security.trans.app.dto.AppDeviceCheckDTO;
import org.security.trans.app.service.IAppDeviceService;
import org.security.trans.app.service.IAppService;
import org.security.trans.app.service.IAppEducateService;
import org.security.trans.app.vo.AppDeviceCheckItemVO;
import org.security.trans.app.vo.BacklogVO;
import org.security.trans.app.vo.AppDeviceVO;
import org.security.trans.app.vo.TaskHandInVO;
import org.springblade.core.boot.ctrl.BladeController;
import org.springblade.core.tool.api.R;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import javax.validation.Valid;
import java.text.ParseException;
import java.util.List;
/**
* @author Create by wzf
* @date 2022/4/20 9:47
*/
@RestController
@AllArgsConstructor
@RequestMapping("/app")
@Api(value = "app端接口", tags = "app端接口")
public class AppController extends BladeController {
private final IAppService appService;
private final IAppDeviceService appDeviceService;
private final IAppEducateService appEducateService;
@ApiOperation(value = "根据当前用户查询待办")
@ApiOperationSupport(order = 0)
@ApiImplicitParams({
@ApiImplicitParam(name = "type", value = "默认为空查询前十条all-查询全部", paramType = "query", dataType = "string"),
@ApiImplicitParam(name = "dataType", value = "默认为空查询应急演练、教育培训、设备检查、设备整改的待办信息1-教育培训待办信息、2-应急演练待办信息、" +
"3-设备检查待办信息、4-设备整改待办信息、5-设备持续整改代办信息", paramType = "query", dataType = "string")
})
@GetMapping("/backlog")
public R<List<BacklogVO>> backlog(@RequestParam(required = false) String type,@RequestParam(required = false) String dataType) {
return R.data(appService.backlog(type,dataType));
}
@ApiOperation(value = "获取设备检查代办事项详情")
@ApiOperationSupport(order = 2)
@GetMapping("/device/{id}")
public R<AppDeviceVO> getDeviceDetail(@PathVariable String id) {
return R.data(appDeviceService.getDetail(id));
}
@ApiOperation(value = "获取教育培训和应急演练代办事项详情")
@ApiOperationSupport(order = 3)
@GetMapping("/{id}")
public R<TaskHandInVO> getDetail(@PathVariable String id) {
return R.data(appEducateService.getOtherDetail(id));
}
@ApiOperation(value = "教育培训和应急演练代办事项提报")
@ApiOperationSupport(order = 4)
@PostMapping("/handIn")
public R handInDetail(String id, List<MultipartFile> imgUrl) throws ParseException {
return R.status(appEducateService.handInDetail(id,imgUrl));
}
@ApiOperation(value = "获取设备检查/整改明细项详情")
@ApiOperationSupport(order = 5)
@ApiImplicitParams({
@ApiImplicitParam(name = "id", value = "id", paramType = "query", dataType = "string"),
@ApiImplicitParam(name = "type", value = "请求数据类型1-设备检查待办数据2-设备整改待办数据3-设备持续整改数据", paramType = "query", dataType = "string")
})
@GetMapping("/device/item")
public R<List<AppDeviceCheckItemVO>> getDeviceItemDetail(@RequestParam String id,@RequestParam String type) {
return R.data(appDeviceService.getDeviceItemDetail(id,type));
}
@ApiOperation(value = "设备检查提报")
@ApiOperationSupport(order = 6)
@PostMapping("/device/handIn")
public R handInDevice(@Valid @RequestBody AppDeviceCheckDTO appDeviceCheckDTO){
return R.status(appDeviceService.handInDevice(appDeviceCheckDTO));
}
@ApiOperation(value = "获取设备整改待办详情")
@ApiOperationSupport(order = 7)
@GetMapping("/device/rectify/{id}")
public R<AppDeviceVO> getDeviceRectifyDetail(@PathVariable String id) {
return R.data(appDeviceService.getDeviceRectifyDetail(id));
}
@ApiOperation(value = "设备整改提报")
@ApiOperationSupport(order = 8)
@PostMapping("/device/rectify")
public R rectifyDevice(@Valid @RequestBody AppDeviceCheckDTO appDeviceCheckDTO){
return R.status(appDeviceService.rectifyDevice(appDeviceCheckDTO));
}
@ApiOperation(value = "获取设备持续整改待办详情")
@ApiOperationSupport(order = 9)
@GetMapping("/continued/rectify/{id}")
public R<AppDeviceVO> getContinuedRectifyDetail(@PathVariable String id) {
return R.data(appDeviceService.getContinuedRectifyDetail(id));
}
@ApiOperation(value = "设备持续整改提报")
@ApiOperationSupport(order = 10)
@PostMapping("/continued/rectify/handIn")
public R continuedRectifyHandIn(@Valid @RequestBody AppDeviceCheckDTO appDeviceCheckDTO){
return R.status(appDeviceService.continuedRectifyHandIn(appDeviceCheckDTO));
}
}

View File

@ -0,0 +1,31 @@
package org.security.trans.app.dto;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
/**
* @author Create by wzf
* @date 2022/4/25 14:39
*/
@Data
public class AppDeviceCheckDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* id
*/
private String id;
/**
* 设备检查项明细
*/
private List<AppDeviceDTO> appDeviceDTOList;
/**
* 备注
*/
private String remark;
}

View File

@ -0,0 +1,39 @@
package org.security.trans.app.dto;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.security.ht.vo.common.UploadVO;
import org.security.trans.dailyDuties.entity.DeviceInspectionLine;
import org.springframework.web.multipart.MultipartFile;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
/**
* @author Create by wzf
* @date 2022/4/25 11:27
*/
@Data
public class AppDeviceDTO extends DeviceInspectionLine implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 可持续整改标识(1-普通整改2-持续整改)
*/
private String recordFlag;
/**
* 持续整改期限
*/
@ApiModelProperty(value = "持续整改期限")
@JsonFormat(pattern = "yyyy-MM-dd")
private Date rectificationDeadline;
/**
* 照片
*/
private List<UploadVO> imgUrl;
}

View File

@ -0,0 +1,24 @@
package org.security.trans.app.dto;
import lombok.Data;
import org.security.trans.app.vo.TaskHandInVO;
import org.springframework.web.multipart.MultipartFile;
import java.util.List;
/**
* @author Create by wzf
* @date 2022/4/25 10:33
*/
@Data
public class TaskHandInDTO extends TaskHandInVO {
/**
* id
*/
private String id;
/**
* 照片url
*/
private List<MultipartFile> imgUrl;
}

View File

@ -0,0 +1,8 @@
package org.security.trans.app.mapper;
/**
* @author Create by wzf
* @date 2022/4/20 9:55
*/
public interface AppMapper {
}

View File

@ -0,0 +1,63 @@
package org.security.trans.app.service;
import org.security.trans.app.dto.AppDeviceCheckDTO;
import org.security.trans.app.vo.AppDeviceCheckItemVO;
import org.security.trans.app.vo.AppDeviceVO;
import java.util.List;
/**
* @author Create by wzf
* @date 2022/4/28 11:27
*/
public interface IAppDeviceService {
/**
*获取设备代办事项详情
* @param id
* @return
*/
AppDeviceVO getDetail(String id);
/**
* 获取设备检查项详情
* @param id 设备检查id
* @return
*/
List<AppDeviceCheckItemVO> getDeviceItemDetail(String id,String type);
/**
* 设备检查提报
* @param appDeviceCheckDTO 设备检查项
* @return
*/
boolean handInDevice(AppDeviceCheckDTO appDeviceCheckDTO);
/**
* 获取设备整改项详情
* @param id
* @return
*/
AppDeviceVO getDeviceRectifyDetail(String id);
/**
* 设备整改提报
* @param appDeviceCheckDTO 设备整改项明细信息
* @return
*/
boolean rectifyDevice(AppDeviceCheckDTO appDeviceCheckDTO);
/**
* 获取设备持续整改待办详情
* @param id
* @return
*/
AppDeviceVO getContinuedRectifyDetail(String id);
/**
* 设备持续整改提报
* @param appDeviceCheckDTO 设备持续整改信息
* @return
*/
boolean continuedRectifyHandIn(AppDeviceCheckDTO appDeviceCheckDTO);
}

View File

@ -0,0 +1,31 @@
package org.security.trans.app.service;
import org.security.trans.app.dto.TaskHandInDTO;
import org.security.trans.app.vo.TaskHandInVO;
import org.springframework.web.multipart.MultipartFile;
import java.text.ParseException;
import java.util.List;
/**
* @author Create by wzf
* @date 2022/4/28 11:39
*/
public interface IAppEducateService {
/**
* 获取教育培训和应急演练代办事项详情
* @param id
* @return
*/
TaskHandInVO getOtherDetail(String id);
/**
* 教育培训和应急演练代办事项提报
* @param imgUrl 教育培训和应急演练代办事项
* @return
* @throws ParseException
*/
boolean handInDetail(String id, List<MultipartFile> imgUrl) throws ParseException;
}

View File

@ -0,0 +1,21 @@
package org.security.trans.app.service;
import org.security.trans.app.dto.AppDeviceCheckDTO;
import org.security.trans.app.dto.TaskHandInDTO;
import org.security.trans.app.vo.AppDeviceCheckItemVO;
import org.security.trans.app.vo.BacklogVO;
import org.security.trans.app.vo.AppDeviceVO;
import org.security.trans.app.vo.TaskHandInVO;
import java.text.ParseException;
import java.util.List;
/**
* @author Create by wzf
* @date 2022/4/20 9:51
*/
public interface IAppService{
List<BacklogVO> backlog(String type,String dataType);
}

View File

@ -0,0 +1,321 @@
package org.security.trans.app.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import lombok.AllArgsConstructor;
import org.security.common.Constant;
import org.security.flow.core.constant.ProcessConstant;
import org.security.flow.core.entity.BladeFlow;
import org.security.flow.core.entity.BladeFlowDef;
import org.security.flow.core.feign.IFlowClient;
import org.security.flow.core.utils.FlowUtil;
import org.security.system.feign.ISysClient;
import org.security.trans.app.dto.AppDeviceCheckDTO;
import org.security.trans.app.dto.AppDeviceDTO;
import org.security.trans.app.service.IAppDeviceService;
import org.security.trans.app.vo.AppDeviceCheckItemVO;
import org.security.trans.app.vo.AppDeviceVO;
import org.security.ht.entity.basic.Device;
import org.security.trans.basic.service.IDepartmentService;
import org.security.trans.basic.service.IDeviceService;
import org.security.trans.common.service.IFileService;
import org.security.trans.dailyDuties.entity.DeviceInspection;
import org.security.trans.dailyDuties.entity.DeviceInspectionLine;
import org.security.trans.dailyDuties.service.IDeviceInspectionLineService;
import org.security.trans.dailyDuties.service.IDeviceInspectionService;
import org.security.trans.settings.service.IDeviceCategorySettingsService;
import org.springblade.core.log.exception.ServiceException;
import org.springblade.core.secure.utils.AuthUtil;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.support.Kv;
import org.springblade.core.tool.utils.Func;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.stream.Collectors;
/**
* @author Create by wzf
* @date 2022/4/28 11:27
*/
@AllArgsConstructor
@Service
public class AppDeviceServiceImpl implements IAppDeviceService {
private final IDepartmentService departmentService;
private final IDeviceService deviceService;
private final IDeviceCategorySettingsService deviceCategorySettingsService;
private final IDeviceInspectionService deviceInspectionService;
private final IDeviceInspectionLineService deviceInspectionLineService;
private final IFileService fileService;
private final IFlowClient flowClient;
private final ISysClient sysClient;
@Override
public AppDeviceVO getDetail(String id) {
//获取待检设备的设备id
DeviceInspection deviceInspection = deviceInspectionService.getOne(new QueryWrapper<DeviceInspection>().lambda()
.eq(Func.isNotBlank(id), DeviceInspection::getId, id)
.and(item -> item.eq(DeviceInspection::getStatus, Constant.DEVICE_STATE_INSPECTION)
.or().eq(DeviceInspection::getStatus, Constant.DEVICE_STATE_OVERTIME_INSPECTION)
.or().eq(DeviceInspection::getState,Constant.HANDIN_STATE_REFUSE)
.or().eq(DeviceInspection::getState,ProcessConstant.CANCEL_STATE)));
//获取设备信息
AppDeviceVO deviceVO = getAppDeviceDetail(deviceInspection);
deviceVO.setState(Constant.DEVICE_STATE_INSPECTION.equals(deviceInspection.getStatus()) ? "待检查" : "超期未检查");
return deviceVO;
}
/**
* 获取设备详情
*/
private AppDeviceVO getAppDeviceDetail(DeviceInspection deviceInspection) {
Device device = deviceService.getById(deviceInspection.getDeviceId());
AppDeviceVO deviceVO = Func.copy(device, AppDeviceVO.class);
deviceVO.setDepName(departmentService.getById(device.getDepId()).getFullName());
deviceVO.setTypeName(deviceCategorySettingsService.getById(device.getTypeId()).getName());
return deviceVO;
}
@Override
public List<AppDeviceCheckItemVO> getDeviceItemDetail(String id,String type) {
//设备检查待办明细数据
List<DeviceInspectionLine> deviceInspectionLineList = new ArrayList<>();
if ("1".equals(type)){
deviceInspectionLineList = deviceInspectionLineService.list(new QueryWrapper<DeviceInspectionLine>().lambda()
.eq(Func.isNotBlank(id),DeviceInspectionLine::getFormId, id));
}
//设备整改待办明细数据
if ("2".equals(type)){
deviceInspectionLineList = deviceInspectionLineService.list(new QueryWrapper<DeviceInspectionLine>().lambda()
.eq(Func.isNotBlank(id),DeviceInspectionLine::getFormId, id)
.eq(DeviceInspectionLine::getProblemLevel,Constant.DEVICE_PROBLEM_WARN)
// .eq(DeviceInspectionLine::getStatus,Constant.DEVICE_STATE_RECTIFY)
.eq(DeviceInspectionLine::getRecFlag,Constant.PROBLEM_STATE_USUUAL));
}
//设备持续整改待办明细数据
if ("3".equals(type)){
deviceInspectionLineList = deviceInspectionLineService.list(new QueryWrapper<DeviceInspectionLine>().lambda()
.eq(Func.isNotBlank(id),DeviceInspectionLine::getId, id)
.eq(DeviceInspectionLine::getProblemLevel,Constant.DEVICE_PROBLEM_WARN)
// .eq(DeviceInspectionLine::getStatus,Constant.DEVICE_STATE_RECTIFY)
.eq(DeviceInspectionLine::getRecFlag,Constant.PROBLEM_STATE_CONTINUED));
}
return setAppDeviceCheckItemVOS(deviceInspectionLineList);
}
/**
* 给设备检查或整改项返回值赋值
*/
private ArrayList<AppDeviceCheckItemVO> setAppDeviceCheckItemVOS(List<DeviceInspectionLine> deviceInspectionLineList) {
ArrayList<AppDeviceCheckItemVO> list = new ArrayList<>();
if (Func.isNotEmpty(deviceInspectionLineList)) {
deviceInspectionLineList.forEach(item -> {
AppDeviceCheckItemVO itemVO = Func.copy(item, AppDeviceCheckItemVO.class);
itemVO.setBeforeImages(fileService.getAttachments(item.getId(),item.getBeforePicIds()));
itemVO.setAfterImages(fileService.getAttachments(item.getId(),item.getAfterPicIds()));
list.add(itemVO);
});
}
return list;
}
@Override
@Transactional(rollbackFor = Exception.class)
public boolean handInDevice(AppDeviceCheckDTO appDeviceCheckDTO) {
//筛选出检查结果状态为告警的数据
List<AppDeviceDTO> collect = appDeviceCheckDTO.getAppDeviceDTOList().stream().filter(item -> Constant.DEVICE_PROBLEM_WARN.equals(item.getProblemLevel())).collect(Collectors.toList());
//更新设备检查主表状态
DeviceInspection deviceInspection = deviceInspectionService.getById(appDeviceCheckDTO.getId());
deviceInspection.setStatus(Func.isNotEmpty(collect) ? Constant.DEVICE_STATE_RECTIFY : Constant.DEVICE_STATE_INSPECTION_OVER);
deviceInspection.setRemark(Func.isNotEmpty(appDeviceCheckDTO.getRemark()) ? appDeviceCheckDTO.getRemark() : "");
deviceInspection.setInspectUser(String.valueOf(AuthUtil.getUser().getUserId()));
deviceInspection.setInspectTime(new Date());//检查时间
//更新基础信息设备状态及最新检查时间
Device device = deviceService.getById(deviceInspection.getDeviceId());
device.setState(device.getOrgState());
device.setOrgState("");
device.setLatestInspectionTime(new Date());
if (Func.isNotEmpty(appDeviceCheckDTO.getAppDeviceDTOList())) {
//更新设备检查明细信息
appDeviceCheckDTO.getAppDeviceDTOList().forEach(this::updateDeviceItem);
}
//如果检查明细不存在异常明细项则提报给领导确认
if (Func.isEmpty(collect)) {
deviceInspection.setFinishTime(new Date());//无异常则检查提交时间就是办结时间有异常需要等待完成整改
deviceInspection.setState(Constant.HANDIN_STATE_AUDIT);
R<BladeFlowDef> definitionRes = flowClient.getLatestProcessDefinitionByKey(ProcessConstant.DEVICE_INSPECTION_KEY);
if (definitionRes.isSuccess()) {
deviceInspection.setProcessDefinitionId(definitionRes.getData().getId());
deviceInspection.setInsProcessDefinitionId(definitionRes.getData().getId());
} else {
throw new ServiceException("开启流程失败");
}
R<Integer> deptCategory = sysClient.getDeptCategory(Long.valueOf(AuthUtil.getUser().getDeptId()));
if (!deptCategory.isSuccess()) {
throw new ServiceException("查询部门类型失败,请检查后再试!");
}
String businessTable = FlowUtil.getBusinessTable(DeviceInspection.class);
Kv variables = Kv.create()
.set("deptCategory", deptCategory.getData())
.set(ProcessConstant.BUSINESS_ID_KEY, deviceInspection.getId());
R<BladeFlow> result = flowClient.startProcessInstanceById(deviceInspection.getProcessDefinitionId(), FlowUtil.getBusinessKey(businessTable, String.valueOf(deviceInspection.getId())), variables);
if (!result.isSuccess()) {
throw new ServiceException("开启流程失败");
}
deviceInspection.setProcessInstanceId(result.getData().getProcessInstanceId());
deviceInspection.setInsProcessInstanceId(result.getData().getProcessInstanceId());
}
return deviceInspectionService.updateById(deviceInspection) && deviceService.updateById(device);
}
/**
* 更新设备检查项
*/
private void updateDeviceItem(AppDeviceDTO item) {
DeviceInspectionLine deviceInspectionLine = deviceInspectionLineService.getById(item.getId());
deviceInspectionLine.setDeviceState(Constant.DEVICE_LINE_STATE_2);
deviceInspectionLine.setProblemLevel(item.getProblemLevel());
deviceInspectionLine.setRectificationStatus(Constant.DEVICE_PROBLEM_NORMAL);//提交检查时默认整改结果状态为1-正常
deviceInspectionLine.setBeforePicIds(item.getBeforePicIds());
deviceInspectionLine.setStatus(Constant.DEVICE_PROBLEM_NORMAL.equals(item.getProblemLevel()) ? Constant.DEVICE_STATE_INSPECTION_OVER : Constant.DEVICE_STATE_RECTIFY);
deviceInspectionLine.setRecFlag(Constant.DEVICE_PROBLEM_NORMAL.equals(item.getProblemLevel()) ? null : Constant.PROBLEM_STATE_USUUAL);
//保存整改前图片
fileService.saveAttachments(item.getImgUrl(), item.getId());
deviceInspectionLine.setResult(item.getResult());
deviceInspectionLineService.updateById(deviceInspectionLine);
}
@Override
public AppDeviceVO getDeviceRectifyDetail(String id) {
//获取待整改设备的设备id
DeviceInspection deviceInspection = deviceInspectionService.getOne(new QueryWrapper<DeviceInspection>().lambda().eq(Func.isNotBlank(id), DeviceInspection::getId, id));
// .eq(DeviceInspection::getStatus, Constant.DEVICE_STATE_RECTIFY)); //注释于20230711 id唯一不用再加状态
//获取设备信息
AppDeviceVO deviceVO = getAppDeviceDetail(deviceInspection);
deviceVO.setState("待整改");
return deviceVO;
}
@Override
@Transactional(rollbackFor = Exception.class)
public boolean rectifyDevice(AppDeviceCheckDTO appDeviceCheckDTO) {
//更新设备整改主表状态
DeviceInspection deviceInspection = deviceInspectionService.getById(appDeviceCheckDTO.getId());
deviceInspection.setStatus(Constant.DEVICE_STATE_RECTIFY_OVER);
deviceInspection.setFinishTime(new Date());//提交整改时间为办结时间
deviceInspection.setRectifyUser(String.valueOf(AuthUtil.getUser().getUserId()));//提交人为整改人
deviceInspection.setState(Constant.HANDIN_STATE_AUDIT);
//更新设备整改明细信息
if (Func.isNotEmpty(appDeviceCheckDTO.getAppDeviceDTOList())) {
appDeviceCheckDTO.getAppDeviceDTOList().forEach(item -> {
DeviceInspectionLine deviceInspectionLine = deviceInspectionLineService.getById(item.getId());
deviceInspectionLine.setRectificationStatus(item.getRectificationStatus());
deviceInspectionLine.setRectifyResult(item.getRectifyResult());
deviceInspectionLine.setAfterPicIds(item.getAfterPicIds());
deviceInspectionLine.setRecFlag(Constant.PROBLEM_STATE_USUUAL);
deviceInspectionLine.setStatus(Constant.DEVICE_STATE_RECTIFY_OVER);
deviceInspectionLine.setState(Constant.HANDIN_STATE_AUDIT);
//存储原纪录id
deviceInspectionLineService.updateById(deviceInspectionLine);
//保存整改后相关图片
fileService.saveAttachments(item.getImgUrl(), item.getId());
//判断该设备检查是否需要持续整改
setContinuedRectify(item, deviceInspectionLine);
});
}
//设备整改完成进入领导确认流程
R<BladeFlowDef> definitionRes = flowClient.getLatestProcessDefinitionByKey(ProcessConstant.DEVICE_INSPECTION_REC_KEY);
if (definitionRes.isSuccess()) {
deviceInspection.setProcessDefinitionId(definitionRes.getData().getId());
deviceInspection.setRecProcessDefinitionId(definitionRes.getData().getId());
} else {
throw new ServiceException("开启流程失败");
}
R<Integer> deptCategory = sysClient.getDeptCategory(Long.valueOf(AuthUtil.getUser().getDeptId()));
if (!deptCategory.isSuccess()) {
throw new ServiceException("查询部门类型失败,请检查后再试!");
}
String businessTable = FlowUtil.getBusinessTable(DeviceInspection.class);
Kv variables = Kv.create()
.set("deptCategory", deptCategory.getData())
.set(ProcessConstant.BUSINESS_ID_KEY, deviceInspection.getId());
R<BladeFlow> result = flowClient.startProcessInstanceById(deviceInspection.getProcessDefinitionId(), FlowUtil.getBusinessKey(businessTable, String.valueOf(deviceInspection.getId())), variables);
if (!result.isSuccess()) {
throw new ServiceException("开启流程失败");
}
deviceInspection.setProcessInstanceId(result.getData().getProcessInstanceId());
deviceInspection.setRecProcessInstanceId(result.getData().getProcessInstanceId());
return deviceInspectionService.updateById(deviceInspection);
}
private void setContinuedRectify(AppDeviceDTO item, DeviceInspectionLine deviceInspectionLine) {
if (Func.isNotEmpty(item.getRecordFlag()) && Constant.PROBLEM_STATE_CONTINUED.equals(item.getRecordFlag())){
deviceInspectionLine.setId(null);
deviceInspectionLine.setRecFlag(Constant.PROBLEM_STATE_CONTINUED);
deviceInspectionLine.setRectificationDeadline(item.getRectificationDeadline());
deviceInspectionLine.setStatus(Constant.DEVICE_STATE_LEADER_CONFIRM);
deviceInspectionLine.setDeptId(AuthUtil.getDeptId());
deviceInspectionLine.setState(Constant.HANDIN_STATE_DRAFT);
deviceInspectionLine.setRectificationStatus(Constant.DEVICE_PROBLEM_NORMAL);//创建的持续整改默认整改结果为1-正常
deviceInspectionLine.setRectifyResult("");
deviceInspectionLineService.save(deviceInspectionLine);
//保存相关附件
fileService.saveAttachments(item.getImgUrl(),deviceInspectionLine.getId());
}
}
@Override
public AppDeviceVO getContinuedRectifyDetail(String id) {
//获取设备整改明细信息
DeviceInspectionLine deviceInspectionLine = deviceInspectionLineService.getById(id);
DeviceInspection deviceInspection = deviceInspectionService.getById(deviceInspectionLine.getFormId());
AppDeviceVO appDeviceVO = getAppDeviceDetail(deviceInspection);
appDeviceVO.setState("持续整改");
return appDeviceVO;
}
@Override
public boolean continuedRectifyHandIn(AppDeviceCheckDTO appDeviceCheckDTO) {
//判断持续整改明细是否需要再次申请持续整改
if (Func.isNotEmpty(appDeviceCheckDTO.getAppDeviceDTOList())){
appDeviceCheckDTO.getAppDeviceDTOList().forEach(item -> {
DeviceInspectionLine deviceInspectionLine = deviceInspectionLineService.getById(item.getId());
deviceInspectionLine.setState(Constant.HANDIN_STATE_AUDIT);
deviceInspectionLine.setStatus(Constant.DEVICE_STATE_RECTIFY_OVER);
deviceInspectionLine.setRectificationStatus(item.getRectificationStatus());
deviceInspectionLine.setRectifyResult(item.getRectifyResult());
deviceInspectionLine.setAfterPicIds(item.getAfterPicIds());
//存储原纪录id
deviceInspectionLineService.updateById(deviceInspectionLine);
//保存整改后相关图片
fileService.saveAttachments(item.getImgUrl(), item.getId());
R<BladeFlowDef> definitionRes = flowClient.getLatestProcessDefinitionByKey(ProcessConstant.DEVICE_INS_REC_CON_KEY);
if (definitionRes.isSuccess()) {
deviceInspectionLine.setProcessDefinitionId(definitionRes.getData().getId());
} else {
throw new ServiceException("开启流程失败");
}
R<Integer> deptCategory = sysClient.getDeptCategory(Long.valueOf(AuthUtil.getUser().getDeptId()));
if (!deptCategory.isSuccess()) {
throw new ServiceException("查询部门类型失败,请检查后再试!");
}
String businessTable = FlowUtil.getBusinessTable(DeviceInspectionLine.class);
Kv variables = Kv.create()
.set("deptCategory", deptCategory.getData())
.set(ProcessConstant.BUSINESS_ID_KEY, deviceInspectionLine.getId());
R<BladeFlow> result = flowClient.startProcessInstanceById(deviceInspectionLine.getProcessDefinitionId(), FlowUtil.getBusinessKey(businessTable, String.valueOf(deviceInspectionLine.getId())), variables);
if (!result.isSuccess()) {
throw new ServiceException("开启流程失败");
}
//再次发起持续整改
setContinuedRectify(item,deviceInspectionLine);
});
}
return true;
}
}

View File

@ -0,0 +1,71 @@
package org.security.trans.app.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import lombok.AllArgsConstructor;
import org.security.common.Constant;
import org.security.common.util.DataFormatUtil;
import org.security.trans.app.service.IAppEducateService;
import org.security.trans.app.vo.TaskHandInVO;
import org.security.trans.basic.service.IDepartmentService;
import org.security.trans.flow.dto.FlowStartDTO;
import org.security.trans.flow.service.IFlowHistoryService;
import org.security.trans.task.entity.Task;
import org.security.trans.task.entity.TaskHandin;
import org.security.trans.task.service.ITaskHandinService;
import org.security.trans.task.service.ITaskService;
import org.springblade.core.tool.utils.Func;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.multipart.MultipartFile;
import java.text.ParseException;
import java.util.List;
/**
* @author Create by wzf
* @date 2022/4/28 11:39
*/
@AllArgsConstructor
@Service
public class AppEducateServiceImpl implements IAppEducateService {
private final ITaskHandinService taskHandinService;
private final ITaskService taskService;
private final IDepartmentService departmentService;
private final IFlowHistoryService flowHistoryService;
@Override
public TaskHandInVO getOtherDetail(String id) {
TaskHandInVO taskHandInVO = new TaskHandInVO();
TaskHandin taskHandin = taskHandinService.getOne(new QueryWrapper<TaskHandin>().lambda().eq(Func.isNotBlank(id), TaskHandin::getId, id)
.and(item -> item.eq(TaskHandin::getState, Constant.HANDIN_STATE_DRAFT).or().eq(TaskHandin::getState, Constant.HANDIN_STATE_DRAFT)));
if (Func.isNotEmpty(taskHandin)){
//获取参加人数
taskHandInVO.setJoinNumber(Func.isNotEmpty(taskHandin.getPeopleNumber())?Integer.parseInt(String.valueOf(taskHandin.getPeopleNumber())):0);
//获取当前机构
taskHandInVO.setDeptName(departmentService.getById(taskHandin.getDeptId()).getFullName());
//获取待办标题和描述
Task task = taskService.getById(taskHandin.getTaskId());
taskHandInVO.setTitle(task.getName());
taskHandInVO.setScript(task.getSummary());
}
return taskHandInVO;
}
@Override
@Transactional(rollbackFor = Exception.class)
public boolean handInDetail(String id, List<MultipartFile> imgUrl) throws ParseException {
//获取提报期限
TaskHandin taskHandin = taskHandinService.getById(id);
taskHandin.setState(Constant.HANDIN_STATE_AUDIT);
//判断提报是否超期
// taskHandin.setStatus(taskHandin.getDeadline().before(DataFormatUtil.getLocalDate())?Constant.HANDIN_STATE_OVERTIME_SUBMIT:Constant.HANDIN_STATE_SUBMIT);
// taskHandin.setPicIds(taskHandInDTO.getImgUrl());
//加入流程
FlowStartDTO flowStartDTO = new FlowStartDTO();
flowStartDTO.setFlowBusinessCode(taskHandin.getBusinessType());
flowStartDTO.setBusinessLinkId(taskHandin.getId());
return taskHandinService.saveOrUpdate(taskHandin) && flowHistoryService.startFlow(flowStartDTO);
}
}

View File

@ -0,0 +1,194 @@
package org.security.trans.app.service.impl;
import lombok.AllArgsConstructor;
import org.security.common.Constant;
import org.security.common.eum.TaskBusinessTypeEnum;
import org.security.trans.app.service.IAppService;
import org.security.trans.app.vo.BacklogVO;
import org.security.trans.basic.service.IDeviceService;
import org.security.trans.common.service.IFileService;
import org.security.trans.dailyDuties.service.IDeviceInspectionLineService;
import org.security.trans.dailyDuties.service.IDeviceInspectionService;
import org.security.trans.task.service.ITaskHandinService;
import org.springblade.core.secure.BladeUser;
import org.springblade.core.secure.utils.AuthUtil;
import org.springblade.core.tool.utils.Func;
import org.springblade.core.tool.utils.DateUtil;
import org.springblade.core.tool.utils.StringUtil;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
/**
* @author Create by wzf
* @date 2022/4/20 9:52
*/
@AllArgsConstructor
@Service
public class AppServiceImpl implements IAppService {
private final ITaskHandinService taskHandinService;
private final IDeviceInspectionService deviceInspectionService;
private final IDeviceInspectionLineService deviceInspectionLineService;
private final IDeviceService deviceService;
private final IFileService fileService;
@Override
public List<BacklogVO> backlog(String type,String dataType) {
BladeUser user = AuthUtil.getUser();
//模块标识符
String moduleType = "";
//设备待办状态值list
ArrayList<String> list = new ArrayList<>();
//获取教育培训待办信息
if(Constant.APP_BACKLOG_TYPE_1.equals(dataType)){
moduleType = "edu";
List<BacklogVO> taskHandinBacklog = taskHandinService.getAppBacklog(user,moduleType);
return setBacklogVOS(type, taskHandinBacklog);
}
//获取应急演练待办信息
if(Constant.APP_BACKLOG_TYPE_2.equals(dataType)){
moduleType = "drill";
List<BacklogVO> taskHandinBacklog = taskHandinService.getAppBacklog(user,moduleType);
return setBacklogVOS(type, taskHandinBacklog);
}
//获取设备检查待办信息
if (Constant.APP_BACKLOG_TYPE_3.equals(dataType)){
List<BacklogVO> deviceCheckBacklogs = getDeviceCheckData(user, list);
return setBacklogVOS(type, deviceCheckBacklogs);
}
//获取设备整改待办信息
if (Constant.APP_BACKLOG_TYPE_4.equals(dataType)){
List<BacklogVO> deviceCheckBacklogs = getDeviceRectifyData(user, list);
return setBacklogVOS(type, deviceCheckBacklogs);
}
//获取设备持续整改代办信息
if (Constant.APP_BACKLOG_TYPE_5.equals(dataType)){
List<BacklogVO> deviceContinuedBacklogs = getDeviceContinuedRectifyData(user,list);
return setBacklogVOS(type, deviceContinuedBacklogs);
}
//获取所有待办数据:设备检查设备整改设备持续整改
if (!Func.isNotBlank(dataType)){
ArrayList<String> list1 = new ArrayList<>();
ArrayList<String> list2 = new ArrayList<>();
ArrayList<String> list3 = new ArrayList<>();
List<BacklogVO> taskHandInBacklog = new ArrayList<>();
List<BacklogVO> deviceCheckBacklogs = getDeviceCheckData(user, list1);
taskHandInBacklog.addAll(deviceCheckBacklogs);
List<BacklogVO> deviceRectifyBacklogs = getDeviceRectifyData(user, list2);
taskHandInBacklog.addAll(deviceRectifyBacklogs);
List<BacklogVO> deviceContinuedBacklogs = getDeviceContinuedRectifyData(user,list3);
taskHandInBacklog.addAll(deviceContinuedBacklogs);
// List<BacklogVO> taskHandInBacklog = getAllBacklogData(user, moduleType, list);
return setBacklogVOS(type, taskHandInBacklog);
}
return null;
}
/**
*获取设备持续整改信息
* @return
*/
private List<BacklogVO> getDeviceContinuedRectifyData(BladeUser user,List<String> list) {
list.add(Constant.DEVICE_STATE_RECTIFY);
list.add(Constant.DEVICE_STATE_RECTIFY_OVER);//ADD at 20230712:持续整改被驳回后也要查出待办
List<BacklogVO> deviceContinuedData = deviceInspectionLineService.getData(user,list,Constant.PROBLEM_STATE_CONTINUED);
if (Func.isNotEmpty(deviceContinuedData)){
deviceContinuedData.forEach(item ->{
item.setInspectUserName(fileService.getUserNameById(item.getInspectUser()));
item.setRectifyUserName(fileService.getUserNameById(item.getRectifyUser()));
item.setBusinessType("device_continued_rectify");
item.setModule("deviceContinuedRectify");
});
}
return deviceContinuedData;
}
/**
*获取app端设备整改待办数据
*/
private List<BacklogVO> getDeviceRectifyData(BladeUser user, ArrayList<String> list) {
list.add(Constant.DEVICE_STATE_RECTIFY);
list.add(Constant.DEVICE_STATE_RECTIFY_OVER);//20230711add状态为7-已整改但审批驳回的
List<BacklogVO> deviceCheckBacklogs = deviceInspectionService.getAppBacklog(user,list);
if (Func.isNotEmpty(deviceCheckBacklogs)){
deviceCheckBacklogs.forEach(item->{
item.setInspectUserName(fileService.getUserNameById(item.getInspectUser()));
item.setRectifyUserName(fileService.getUserNameById(item.getRectifyUser()));
item.setBusinessType("device_rectify");
item.setModule("deviceRectify");
});
}
return deviceCheckBacklogs;
}
/**
*获取app端所有待办数据
*/
private List<BacklogVO> getAllBacklogData(BladeUser user, String moduleType, ArrayList<String> list) {
list.add(Constant.DEVICE_STATE_INSPECTION);
list.add(Constant.DEVICE_STATE_OVERTIME_INSPECTION);
list.add(Constant.DEVICE_STATE_RECTIFY);
// List<BacklogVO> taskHandInBacklog = taskHandinService.getAppBacklog(user, moduleType);
List<BacklogVO> deviceCheckBacklogs = deviceInspectionService.getAppBacklog(user, list);
if (Func.isNotEmpty(deviceCheckBacklogs)){
deviceCheckBacklogs.forEach(item->{
item.setDeviceNum(deviceService.getById(item.getDeviceId()).getDeviceNum());
if (Constant.DEVICE_STATE_INSPECTION.equals(item.getStatus()) || Constant.DEVICE_STATE_OVERTIME_INSPECTION.equals(item.getStatus())){
item.setBusinessType("device_check");
item.setModule("deviceCheck");
}
if (Constant.DEVICE_STATE_RECTIFY.equals(item.getStatus())){
item.setBusinessType("device_rectify");
item.setModule("deviceRectify");
}
});
}
return deviceCheckBacklogs;
}
/**
*获取设备检查待办数据
*/
private List<BacklogVO> getDeviceCheckData(BladeUser user, ArrayList<String> list) {
list.add(Constant.DEVICE_STATE_INSPECTION);
list.add(Constant.DEVICE_STATE_OVERTIME_INSPECTION);
list.add(Constant.DEVICE_STATE_INSPECTION_OVER);//20230711add:已检查完成但处于未审批审批驳回的也是待办
List<BacklogVO> deviceCheckBacklogs = deviceInspectionService.getAppBacklog(user, list);
if (Func.isNotEmpty(deviceCheckBacklogs)){
deviceCheckBacklogs.forEach(item->{
item.setInspectUserName(fileService.getUserNameById(item.getInspectUser()));
item.setRectifyUserName(fileService.getUserNameById(item.getRectifyUser()));
item.setBusinessType("device_check");
item.setModule("deviceCheck");
});
}
return deviceCheckBacklogs;
}
/**
*设置app待办返回值
*/
private List<BacklogVO> setBacklogVOS(String type, List<BacklogVO> taskHandInBacklog) {
for (BacklogVO vo : taskHandInBacklog) {
if(!Func.isNull(vo.getDeadline()) && Func.isNotEmpty(vo.getDeadline()) ){
vo.setOverTime(String.valueOf(vo.getDeadline().getTime() - DateUtil.now().getTime()));
}
vo.setBusinessType(TaskBusinessTypeEnum.convertToName(vo.getBusinessType()));
}
if (StringUtil.equals("all", type)) {
return taskHandInBacklog;
}
return taskHandInBacklog.stream().limit(10).collect(Collectors.toList());
}
}

View File

@ -0,0 +1,43 @@
package org.security.trans.app.vo;
import lombok.Data;
import org.security.ht.vo.common.UploadVO;
import org.security.trans.dailyDuties.entity.DeviceInspectionLine;
import java.io.Serializable;
import java.util.List;
/**
* @author Create by wzf
* @date 2022/4/25 14:44
*/
@Data
public class AppDeviceCheckItemVO extends DeviceInspectionLine implements Serializable {
/**
* id
*/
private String id;
/**
* 检查项名称
*/
private String name;
/**
* 检查结果
*/
private String result;
/**
* 检查结果状态
*/
private String problemLevel;
/**
* 整改前图片
*/
private List<UploadVO> beforeImages;
/**
* 整改后图片
*/
private List<UploadVO> afterImages;
}

View File

@ -0,0 +1,88 @@
package org.security.trans.app.vo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.security.ht.vo.common.UploadVO;
import java.io.Serializable;
import java.util.List;
/**
* @author Create by wzf
* @date 2022/4/24 14:18
*/
@Data
public class AppDeviceVO implements Serializable {
private static final long serialVersionUID = 1L;
private String id;
/**
* 名称
*/
@ApiModelProperty(value = "名称")
private String name;
/**
* 设备编号
*/
@ApiModelProperty(value = "设备编号")
private String deviceNum;
/**
* 设备厂商
*/
@ApiModelProperty(value = "设备厂商")
private String company;
/**
* 设备型号
*/
@ApiModelProperty(value = "设备型号")
private String modelNum;
/**
* 设备类型
*/
@ApiModelProperty(value = "设备类型")
private String typeName;
/**
* 所属机构
*/
@ApiModelProperty(value = "所属机构")
private String depName;
/**
* 维保到期时间
*/
@ApiModelProperty(value = "维保到期时间")
private String maintenanceDate;
/**
* 放置地址
*/
@ApiModelProperty(value = "放置地址")
private String address;
/**
* 4-检查中5-检查完成6-待整改7-整改完成8-超期未检查
*/
@ApiModelProperty(value = "4-检查中5-检查完成6-待整改7-整改完成8-超期未检查")
private String state;
/**
* 整改前图片附件
*/
private List<UploadVO> beforeAttachments;
/**
* 整改后图片附件
*/
private List<UploadVO> afterAttachments;
/**
* 检查时必须先扫码0- 1-
*/
private String needScan;
}

View File

@ -0,0 +1,68 @@
package org.security.trans.app.vo;
import cn.hutool.core.date.DatePattern;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
/**
* @author zj 2022/4/21
*/
@Data
public class BacklogVO {
@ApiModelProperty("业务数据id")
private String id;
@ApiModelProperty("业务类型")
private String businessType;
@ApiModelProperty("截至时间")
@JsonFormat(pattern = DatePattern.NORM_DATETIME_PATTERN)
private Date deadline;
@ApiModelProperty("设备编号")
private String deviceNum;
@ApiModelProperty("任务名称")
private String taskName;
@ApiModelProperty("剩余时间")
private String overTime;
@ApiModelProperty("模块")
private String module;
@ApiModelProperty("状态")
private String status;
@ApiModelProperty("设备id")
private String deviceId;
@ApiModelProperty("设备放置位置")
private String address;
@ApiModelProperty("设备检查是否需扫码")
private String needScan;
@ApiModelProperty("审批状态")
private String state;
@ApiModelProperty(value = "检查人")
private String inspectUser;
@ApiModelProperty(value = "检查人名称")
private String inspectUserName;
@ApiModelProperty(value = "整改人")
private String rectifyUser;
@ApiModelProperty(value = "整改人名称")
private String rectifyUserName;
@ApiModelProperty(value = "检查时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date inspectTime;
}

View File

@ -0,0 +1,34 @@
package org.security.trans.app.vo;
import lombok.Data;
import java.io.Serializable;
/**
* @author Create by wzf
* @date 2022/4/24 15:05
*/
@Data
public class TaskHandInVO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 提报机构
*/
private String deptName;
/**
* 标题
*/
private String title;
/**
* 描述
*/
private String script;
/**
* 参加人数
*/
private Integer joinNumber;
}

View File

@ -0,0 +1,129 @@
/*
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the dreamlu.net developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: Chill 庄骞 (smallchill@163.com)
*/
package org.security.trans.applyAndReport.controller;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import lombok.AllArgsConstructor;
import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid;
import org.security.trans.applyAndReport.dto.DutyRecordsDTO;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.Func;
import org.springframework.web.bind.annotation.*;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.security.trans.applyAndReport.entity.DutyRecords;
import org.security.trans.applyAndReport.vo.DutyRecordsVO;
import org.security.trans.applyAndReport.service.IDutyRecordsService;
import org.springblade.core.boot.ctrl.BladeController;
/**
* 值班备勤表 控制器
*
* @author BladeX
* @since 2022-07-13
*/
@RestController
@AllArgsConstructor
@RequestMapping("/dutyrecords")
@Api(value = "值班备勤表", tags = "值班备勤表接口")
public class DutyRecordsController extends BladeController {
private final IDutyRecordsService dutyRecordsService;
/**
* 详情
*/
@GetMapping("/detail/{id}")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "详情", notes = "传入dutyRecords")
public R<DutyRecords> detail(@PathVariable String id) {
return R.data(dutyRecordsService.getDetailById(id));
}
/**
* 分页 值班备勤表
*/
@GetMapping("/list")
@ApiOperationSupport(order = 2)
@ApiOperation(value = "分页", notes = "传入dutyRecords")
public R<IPage<DutyRecords>> list(DutyRecords dutyRecords, Query query) {
IPage<DutyRecords> pages = dutyRecordsService.page(Condition.getPage(query), Condition.getQueryWrapper(dutyRecords));
return R.data(pages);
}
/**
* 自定义分页 值班备勤表
*/
@GetMapping("/page")
@ApiOperationSupport(order = 3)
@ApiOperation(value = "分页", notes = "传入dutyRecords")
public R<IPage<DutyRecordsVO>> page(DutyRecordsDTO dutyRecordsDTO, Query query) {
return R.data(dutyRecordsService.selectDutyRecordsPage(dutyRecordsDTO, query));
}
/**
* 新增或修改 值班备勤表
*/
@PostMapping("/save")
@ApiOperationSupport(order = 4)
@ApiOperation(value = "新增或修改", notes = "传入dutyRecords")
public R save(@Valid @RequestBody DutyRecordsDTO dutyRecords) {
return R.status(dutyRecordsService.saveOrUpdateDutyRecords(dutyRecords));
}
/**
* 提交 值班备勤表
*/
@PostMapping("/handin")
@ApiOperationSupport(order = 4)
@ApiOperation(value = "提交", notes = "传入dutyRecords")
public R handin(@Valid @RequestBody DutyRecordsDTO dutyRecords) {
return R.status(dutyRecordsService.handin(dutyRecords));
}
/**
* 删除 值班备勤表
*/
@PostMapping("/remove")
@ApiOperationSupport(order = 8)
@ApiOperation(value = "删除", notes = "传入ids")
public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
return R.status(dutyRecordsService.removeByIds(Func.toLongList(ids)));
}
/**
* 导出值班表
*/
@PostMapping("/export")
@ApiOperationSupport(order = 9)
@ApiOperation(value = "导出值班表", notes = "传入ids")
public void exportData(HttpServletResponse httpServletResponse, @RequestParam String ids) {
dutyRecordsService.exportData(httpServletResponse,Func.toStrList(ids));
}
}

View File

@ -0,0 +1,126 @@
/*
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the dreamlu.net developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: Chill 庄骞 (smallchill@163.com)
*/
package org.security.trans.applyAndReport.controller;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import lombok.AllArgsConstructor;
import javax.validation.Valid;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.Func;
import org.springframework.web.bind.annotation.*;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.security.trans.applyAndReport.entity.DutyRecordsLines;
import org.security.trans.applyAndReport.vo.DutyRecordsLinesVO;
import org.security.trans.applyAndReport.service.IDutyRecordsLinesService;
import org.springblade.core.boot.ctrl.BladeController;
/**
* 控制器
*
* @author BladeX
* @since 2022-07-13
*/
@RestController
@AllArgsConstructor
@RequestMapping("/dutyrecordslines")
@Api(value = "", tags = "接口")
public class DutyRecordsLinesController extends BladeController {
private final IDutyRecordsLinesService dutyRecordsLinesService;
/**
* 详情
*/
@GetMapping("/detail/{id}")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "详情", notes = "传入dutyRecordsLines")
public R<DutyRecordsLines> detail(@PathVariable Long id) {
DutyRecordsLines detail = dutyRecordsLinesService.getById(id);
return R.data(detail);
}
/**
* 分页
*/
@GetMapping("/list")
@ApiOperationSupport(order = 2)
@ApiOperation(value = "分页", notes = "传入dutyRecordsLines")
public R<IPage<DutyRecordsLines>> list(DutyRecordsLines dutyRecordsLines, Query query) {
IPage<DutyRecordsLines> pages = dutyRecordsLinesService.page(Condition.getPage(query), Condition.getQueryWrapper(dutyRecordsLines));
return R.data(pages);
}
/**
* 自定义分页
*/
@GetMapping("/page")
@ApiOperationSupport(order = 3)
@ApiOperation(value = "分页", notes = "传入dutyRecordsLines")
public R<IPage<DutyRecordsLinesVO>> page(DutyRecordsLinesVO dutyRecordsLines, Query query) {
IPage<DutyRecordsLinesVO> pages = dutyRecordsLinesService.selectDutyRecordsLinesPage(Condition.getPage(query), dutyRecordsLines);
return R.data(pages);
}
/**
* 新增
*/
@PostMapping("/save")
@ApiOperationSupport(order = 4)
@ApiOperation(value = "新增", notes = "传入dutyRecordsLines")
public R save(@Valid @RequestBody DutyRecordsLines dutyRecordsLines) {
return R.status(dutyRecordsLinesService.save(dutyRecordsLines));
}
/**
* 修改
*/
@PostMapping("/update")
@ApiOperationSupport(order = 5)
@ApiOperation(value = "修改", notes = "传入dutyRecordsLines")
public R update(@Valid @RequestBody DutyRecordsLines dutyRecordsLines) {
return R.status(dutyRecordsLinesService.updateById(dutyRecordsLines));
}
/**
* 新增或修改
*/
@PostMapping("/submit")
@ApiOperationSupport(order = 6)
@ApiOperation(value = "新增或修改", notes = "传入dutyRecordsLines")
public R submit(@Valid @RequestBody DutyRecordsLines dutyRecordsLines) {
return R.status(dutyRecordsLinesService.saveOrUpdate(dutyRecordsLines));
}
/**
* 删除
*/
@PostMapping("/remove")
@ApiOperationSupport(order = 8)
@ApiOperation(value = "删除", notes = "传入ids")
public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
return R.status(dutyRecordsLinesService.removeByIds(Func.toLongList(ids)));
}
}

Some files were not shown because too many files have changed in this diff Show More