29 changed files with 1807 additions and 98 deletions
@ -0,0 +1,28 @@ |
|||
package com.zdxt.common.annotation; |
|||
|
|||
import java.lang.annotation.ElementType; |
|||
import java.lang.annotation.Retention; |
|||
import java.lang.annotation.RetentionPolicy; |
|||
import java.lang.annotation.Target; |
|||
|
|||
/** |
|||
* @author sunnyzyq |
|||
* @date 2021/12/17 |
|||
*/ |
|||
@Target(ElementType.FIELD) |
|||
@Retention(RetentionPolicy.RUNTIME) |
|||
public @interface ExcelExport { |
|||
|
|||
/** 字段名称 */ |
|||
String value(); |
|||
|
|||
/** 导出排序先后: 数字越小越靠前(默认按Java类字段顺序导出) */ |
|||
int sort() default 0; |
|||
|
|||
/** 导出映射,格式如:0-未知;1-男;2-女 */ |
|||
String kv() default ""; |
|||
|
|||
/** 导出模板示例值(有值的话,直接取该值,不做映射) */ |
|||
String example() default ""; |
|||
|
|||
} |
|||
@ -0,0 +1,31 @@ |
|||
package com.zdxt.common.annotation; |
|||
|
|||
import java.lang.annotation.ElementType; |
|||
import java.lang.annotation.Retention; |
|||
import java.lang.annotation.RetentionPolicy; |
|||
import java.lang.annotation.Target; |
|||
|
|||
/** |
|||
* @author sunnyzyq |
|||
* @date 2021/12/17 |
|||
*/ |
|||
@Target(ElementType.FIELD) |
|||
@Retention(RetentionPolicy.RUNTIME) |
|||
public @interface ExcelImport { |
|||
|
|||
/** 字段名称 */ |
|||
String value(); |
|||
|
|||
/** 导出映射,格式如:0-未知;1-男;2-女 */ |
|||
String kv() default ""; |
|||
|
|||
/** 是否为必填字段(默认为非必填) */ |
|||
boolean required() default false; |
|||
|
|||
/** 最大长度(默认255) */ |
|||
int maxLength() default 255; |
|||
|
|||
/** 导入唯一性验证(多个字段则取联合验证) */ |
|||
boolean unique() default false; |
|||
|
|||
} |
|||
@ -0,0 +1,78 @@ |
|||
package com.zdxt.common.domain; |
|||
|
|||
|
|||
import java.util.LinkedHashMap; |
|||
|
|||
/** |
|||
* @author sunnyzyq |
|||
* @date 2021/12/17 |
|||
*/ |
|||
public class ExcelClassField { |
|||
|
|||
/** 字段名称 */ |
|||
private String fieldName; |
|||
|
|||
/** 表头名称 */ |
|||
private String name; |
|||
|
|||
/** 映射关系 */ |
|||
private LinkedHashMap<String, String> kvMap; |
|||
|
|||
/** 示例值 */ |
|||
private Object example; |
|||
|
|||
/** 排序 */ |
|||
private int sort; |
|||
|
|||
/** 是否为注解字段:0-否,1-是 */ |
|||
private int hasAnnotation; |
|||
|
|||
public String getFieldName() { |
|||
return fieldName; |
|||
} |
|||
|
|||
public void setFieldName(String fieldName) { |
|||
this.fieldName = fieldName; |
|||
} |
|||
|
|||
public String getName() { |
|||
return name; |
|||
} |
|||
|
|||
public void setName(String name) { |
|||
this.name = name; |
|||
} |
|||
|
|||
public LinkedHashMap<String, String> getKvMap() { |
|||
return kvMap; |
|||
} |
|||
|
|||
public void setKvMap(LinkedHashMap<String, String> kvMap) { |
|||
this.kvMap = kvMap; |
|||
} |
|||
|
|||
public Object getExample() { |
|||
return example; |
|||
} |
|||
|
|||
public void setExample(Object example) { |
|||
this.example = example; |
|||
} |
|||
|
|||
public int getSort() { |
|||
return sort; |
|||
} |
|||
|
|||
public void setSort(int sort) { |
|||
this.sort = sort; |
|||
} |
|||
|
|||
public int getHasAnnotation() { |
|||
return hasAnnotation; |
|||
} |
|||
|
|||
public void setHasAnnotation(int hasAnnotation) { |
|||
this.hasAnnotation = hasAnnotation; |
|||
} |
|||
|
|||
} |
|||
File diff suppressed because it is too large
@ -0,0 +1,24 @@ |
|||
package com.zdxt.common.util.jasypt; |
|||
|
|||
import org.jasypt.encryption.StringEncryptor; |
|||
import org.springframework.context.annotation.Bean; |
|||
import org.springframework.context.annotation.Configuration; |
|||
|
|||
public class CustomEncryptorConfig implements StringEncryptor { |
|||
|
|||
/** |
|||
* 加密解密的 密钥 |
|||
*/ |
|||
private String crack = "ATPfOhpnAVp6yBas7RU"; |
|||
|
|||
@Override |
|||
public String encrypt(String s) { |
|||
return JasyptUtils.encryptWithMD5(s,crack); |
|||
} |
|||
|
|||
@Override |
|||
public String decrypt(String s) { |
|||
return JasyptUtils.decryptWithMD5(s,crack); |
|||
} |
|||
} |
|||
|
|||
@ -0,0 +1,57 @@ |
|||
package com.zdxt.common.util.jasypt; |
|||
|
|||
|
|||
|
|||
import org.jasypt.encryption.pbe.StandardPBEStringEncryptor; |
|||
import org.jasypt.encryption.pbe.config.EnvironmentStringPBEConfig; |
|||
|
|||
|
|||
/** |
|||
* alibaba druid加解密规则: |
|||
* 明文密码+私钥(privateKey)加密=加密密码 |
|||
* 加密密码+公钥(publicKey)解密=明文密码 |
|||
*/ |
|||
public final class JasyptUtils { |
|||
/** |
|||
* 加密算法 |
|||
*/ |
|||
private static final String PBEWITHMD5ANDDES = "PBEWithMD5AndDES"; |
|||
/** |
|||
* @param text 待加密原文 |
|||
* @param crack 盐值(密钥) |
|||
* @return 加密后的字符串 |
|||
* @Description: Jasypt加密(PBEWithMD5AndDES) |
|||
*/ |
|||
public static String encryptWithMD5(String text, String crack) { |
|||
//1.创建加解密工具实例
|
|||
StandardPBEStringEncryptor encryptor = new StandardPBEStringEncryptor(); |
|||
//2.加解密配置
|
|||
EnvironmentStringPBEConfig config = new EnvironmentStringPBEConfig(); |
|||
config.setAlgorithm(PBEWITHMD5ANDDES); |
|||
config.setPassword(crack); |
|||
encryptor.setConfig(config); |
|||
//3.加密
|
|||
return encryptor.encrypt(text); |
|||
} |
|||
|
|||
/** |
|||
* @param text 待解密原文 |
|||
* @param crack 盐值(密钥) |
|||
* @return 解密后的字符串 |
|||
* @Description: Jasypt解密(PBEWithMD5AndDES) |
|||
*/ |
|||
public static String decryptWithMD5(String text, String crack) { |
|||
StandardPBEStringEncryptor encryptor = new StandardPBEStringEncryptor(); |
|||
EnvironmentStringPBEConfig config = new EnvironmentStringPBEConfig(); |
|||
config.setAlgorithm(PBEWITHMD5ANDDES); |
|||
config.setPassword(crack); |
|||
encryptor.setConfig(config); |
|||
return encryptor.decrypt(text); |
|||
} |
|||
public static void main(String[] args) { |
|||
// String s = encryptWithMD5("明文", "密钥");
|
|||
// System.out.println(s);
|
|||
String channelcs1 = decryptWithMD5("szsf@zfjd", "ATPfOhpnAVp6yBas7RU"); |
|||
System.out.println(channelcs1); |
|||
} |
|||
} |
|||
@ -0,0 +1,16 @@ |
|||
package com.zdxt.auth.framework.config; |
|||
|
|||
import com.zdxt.common.util.jasypt.CustomEncryptorConfig; |
|||
import org.jasypt.encryption.StringEncryptor; |
|||
import org.springframework.context.annotation.Bean; |
|||
import org.springframework.context.annotation.Configuration; |
|||
|
|||
@Configuration |
|||
public class JasyptConfig { |
|||
|
|||
@Bean(name = "jasyptStringEncryptor") |
|||
public StringEncryptor stringEncryptor() { |
|||
return new CustomEncryptorConfig(); |
|||
} |
|||
} |
|||
|
|||
@ -0,0 +1,112 @@ |
|||
# Spring配置 |
|||
spring: |
|||
# redis配置 |
|||
redis: |
|||
database: 0 |
|||
# host: 10.76.108.1 |
|||
# port: 6379 |
|||
# password: zfjd@123 |
|||
host: 43.136.51.161 |
|||
port: 6379 |
|||
password: meiyoumima |
|||
timeout: 6000ms # 连接超时时长(毫秒) |
|||
lettuce: |
|||
pool: |
|||
max-active: 10 # 连接池最大连接数(使用负值表示没有限制) |
|||
max-wait: -1ms # 连接池最大阻塞等待时间(使用负值表示没有限制) |
|||
max-idle: 3 # 连接池中的最大空闲连接 |
|||
min-idle: 2 # 连接池中的最小空闲连接 |
|||
xxl: |
|||
job: |
|||
status: false #启用状态 false 关闭 |
|||
accessToken: default_token |
|||
admin: |
|||
addresses: http://127.0.0.1:8080/xxl-job-admin #注册地址 |
|||
executor: |
|||
address: '' |
|||
appname: zdxt #系统标识名称 |
|||
ip: '' |
|||
logpath: /data/applogs/xxl-job/jobhandler |
|||
logretentiondays: -1 |
|||
port: 9999 |
|||
|
|||
|
|||
|
|||
allowed: |
|||
servernames: 10.76.108.1,10.76.108.3,10.132.108.3,jdm.szssfj.cn,58.250.157.161,127.0.0.1,localhost,192.168.31.146 |
|||
|
|||
excel: |
|||
export: true |
|||
import: true |
|||
|
|||
# 粤政易对接令牌信息 |
|||
yzy: |
|||
yzyUrl: http://50.9.11.153 |
|||
corpid: 123456 |
|||
corpsecret: 88761 |
|||
paasid: 123 |
|||
|
|||
|
|||
#qr_code_url: C:\ruoyi\uploadPath\zfjd_logo.png |
|||
qr_code_url: /usr/local/uploads/zfjd_logo.png |
|||
#qr_code_url: /Users/kylin_stone/Workspaces/uploads/zfjd_logo.png |
|||
|
|||
#深i企对接密钥 测试环境 |
|||
siq: |
|||
#正式 |
|||
# siqUrl: http://10.76.108.3/siqApi |
|||
# code: zfjdm |
|||
# secretKey: SXRpWEhVN3RHM3ZFbzRQcQ== |
|||
#测试 |
|||
siqUrl: http://egbpub.siqhz.com/egb/api/thirdauth |
|||
code: zfjdm |
|||
secretKey: eWIzY3BMRVNEQXhvUUlXMA== |
|||
|
|||
#深圳易平台对接密钥 |
|||
szypt: |
|||
#正式 |
|||
# agentid: 1000015 |
|||
# url: https://zwwx-hlht.sz.gov.cn:30443/ |
|||
# corpid: wwf62d6d16d1182b4f |
|||
# corpsecret: VRJHzFqJpsSZhwnsKTWNspv_GZMxTWl-bgH6DyE9Ty0 |
|||
#测试 |
|||
agentid: 1000067 |
|||
url: https://szytest.sz.gov.cn:30443/ |
|||
corpid: wwefa4043a6b5cf4f3 |
|||
corpsecret: qYf-NIgyRKG-5eybrclvnBogATPfOhpnAVp6yBas7RU |
|||
|
|||
#市认证网关 |
|||
srnwg: |
|||
#正式 |
|||
url: https://smartgate.sz.gov.cn |
|||
systemCode: sfjzfjdm |
|||
integrationKey: erS@rtd34gf! |
|||
paasId: szsfj_zhifajianduma_001 |
|||
paasToken: bb1c6dd37f34545c8f57785c9d8e79f6 |
|||
#市认证数据加密字符 |
|||
secretKey: VRJHzFqJpsSZhwnsKTWNspv_GZMxTWl-bgH6DyE9Ty0 |
|||
# #测试 |
|||
# url: https://smartgate-test.sz.gov.cn |
|||
# systemCode: sfjzfjdm |
|||
# integrationKey: P@ssw0rd |
|||
# paasId: szsfj_zhifajianduma_001 |
|||
# paasToken: e64638a4483e8bcfc33d935c3cbdf546 |
|||
|
|||
|
|||
#mssq: |
|||
# appId: 67a83c8a136346cd98f844359902a23c |
|||
# appkey: NjdhODNjOGExMzYzNDZjZDk4Zjg0NDM1OTkwMmEyM2M6TXNzcTIwMjQ= |
|||
# apiUrl: http://10.224.158.64:8282/proxy/api |
|||
|
|||
|
|||
mssq: |
|||
appId: 67a83c8a136346cd98f844359902a23c |
|||
appKey: NjdhODNjOGExMzYzNDZjZDk4Zjg0NDM1OTkwMmEyM2M6TXNzcTIwMjQ= |
|||
apiUrl: http://10.224.158.64:8282/proxy |
|||
hcpappid: zfjdm |
|||
hcpsign: 04748d31edb4f7076924afbfb7f3b4429a2376b6cff840abb4dc680984d984255058f425f3c9315413efb1c4854149ad1e237c8b97a064b38334a8a27a6dadb21fd8870d35f8640a47fbec8fe86b7d448c4cc2163f1fa7cdd225b5c723381c141824f372033d56e43aaeb7fe710972d6cf8b2380f8c30a4375281d347cab7cb902a092a9b526 |
|||
hcptimestamp: 20240710172956 |
|||
#短信平台 |
|||
sms: |
|||
account: 122 |
|||
pwd: szsfj1800 |
|||
@ -0,0 +1,98 @@ |
|||
# Spring配置 |
|||
spring: |
|||
# redis配置 |
|||
redis: |
|||
database: 0 |
|||
host: 10.76.108.1 |
|||
port: 6379 |
|||
password: zfjd@123 |
|||
# host: 43.136.51.161 |
|||
# port: 6379 |
|||
# password: meiyoumima |
|||
timeout: 6000ms # 连接超时时长(毫秒) |
|||
lettuce: |
|||
pool: |
|||
max-active: 10 # 连接池最大连接数(使用负值表示没有限制) |
|||
max-wait: -1ms # 连接池最大阻塞等待时间(使用负值表示没有限制) |
|||
max-idle: 3 # 连接池中的最大空闲连接 |
|||
min-idle: 2 # 连接池中的最小空闲连接 |
|||
xxl: |
|||
job: |
|||
status: false #启用状态 false 关闭 |
|||
accessToken: default_token |
|||
admin: |
|||
addresses: http://127.0.0.1:8080/xxl-job-admin #注册地址 |
|||
executor: |
|||
address: '' |
|||
appname: zdxt #系统标识名称 |
|||
ip: '' |
|||
logpath: /data/applogs/xxl-job/jobhandler |
|||
logretentiondays: -1 |
|||
port: 9999 |
|||
|
|||
# 信息安全 |
|||
security: |
|||
csrf: |
|||
enable: true |
|||
excludes: |
|||
|
|||
|
|||
allowed: |
|||
servernames: 10.76.108.1,10.76.108.3,10.132.108.3,jdm.szssfj.cn,58.250.157.161,127.0.0.1,localhost,192.168.31.146 |
|||
|
|||
excel: |
|||
export: true |
|||
import: true |
|||
|
|||
# 粤政易对接令牌信息 |
|||
yzy: |
|||
yzyUrl: http://50.9.11.153 |
|||
corpid: 123456 |
|||
corpsecret: 88761 |
|||
paasid: 123 |
|||
|
|||
|
|||
#qr_code_url: C:\ruoyi\uploadPath\zfjd_logo.png |
|||
qr_code_url: /usr/local/uploads/zfjd_logo.png |
|||
#qr_code_url: /Users/kylin_stone/Workspaces/uploads/zfjd_logo.png |
|||
|
|||
#深i企对接密钥 测试环境 |
|||
siq: |
|||
#正式 |
|||
siqUrl: http://10.76.108.3/siqApi |
|||
code: zfjdm |
|||
secretKey: SXRpWEhVN3RHM3ZFbzRQcQ== |
|||
#测试 |
|||
# siqUrl: http://egbpub.siqhz.com/egb/api/thirdauth |
|||
# code: zfjdm |
|||
# secretKey: eWIzY3BMRVNEQXhvUUlXMA== |
|||
|
|||
#深圳易平台对接密钥 |
|||
szypt: |
|||
#正式 |
|||
agentid: 1000015 |
|||
url: https://zwwx-hlht.sz.gov.cn:30443/ |
|||
corpid: wwf62d6d16d1182b4f |
|||
corpsecret: VRJHzFqJpsSZhwnsKTWNspv_GZMxTWl-bgH6DyE9Ty0 |
|||
|
|||
#市认证网关 |
|||
srnwg: |
|||
#正式 |
|||
url: ENC(pHNm/o0+6S+HjrM5nuMiPRfkrHS1tXYD5i25OBtM4dWSi6MvH6iXfw==) |
|||
systemCode: ENC(cHDdxMKpJ/rbuj4PVCxylN+zPd9I2KT0) |
|||
integrationKey: ENC(txSndcPbZK5mYjW7Doa/n9Ips2PLa9NV) |
|||
paasId: szsfj_zhifajianduma_001 |
|||
paasToken: ENC(VfUgR5OXHJcKvBBfq/2ysuNPH6I7tCCeWHYSzXKicGChlMiw9mVPGD51naX9w42E) |
|||
#市认证数据加密字符 |
|||
secretKey: VRJHzFqJpsSZhwnsKTWNspv_GZMxTWl-bgH6DyE9Ty0 |
|||
|
|||
|
|||
mssq: |
|||
appId: 67a83c8a136346cd98f844359902a23c |
|||
appKey: NjdhODNjOGExMzYzNDZjZDk4Zjg0NDM1OTkwMmEyM2M6TXNzcTIwMjQ= |
|||
apiUrl: http://10.224.158.64:8282/proxy |
|||
|
|||
#短信平台 |
|||
sms: |
|||
account: 122 |
|||
pwd: szsfj1800 |
|||
@ -0,0 +1,55 @@ |
|||
<!DOCTYPE html> |
|||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" > |
|||
<head> |
|||
<th:block th:include="zdxtInclude :: header('分析管理模板')" /> |
|||
<th:block th:include="zdxtInclude :: datetimepicker-css" /> |
|||
</head> |
|||
<body class="white-bg"> |
|||
<div class="wrapper wrapper-content animated fadeInRight ibox-content"> |
|||
<form class="form-horizontal m" id="form-information-edit"> |
|||
<input name="id" th:value="${id}" type="hidden"> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">导出模板:</label> |
|||
<div class="col-sm-8"> |
|||
<select name="excelModel" id="excelModel" th:with="type=${@dict.getType('excelModel')}" class="form-control m-b"> |
|||
<!--<option value=""></option>--> |
|||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option> |
|||
</select> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
<th:block th:include="zdxtInclude :: footer" /> |
|||
<th:block th:include="zdxtInclude :: datetimepicker-js" /> |
|||
<script type="text/javascript"> |
|||
var prefix = ctx + "statistical"; |
|||
$("#form-information-edit").validate({ |
|||
focusCleanup: true |
|||
}); |
|||
|
|||
function submitHandler() { |
|||
if ($.validate.form()) { |
|||
var config = { |
|||
url: prefix + "/export", |
|||
type: "GET", |
|||
dataType: "json", |
|||
data: $('#form-information-edit').serialize(), |
|||
beforeSend: function () { |
|||
$.modal.loading("正在处理中,请稍后..."); |
|||
// $.modal.disable(); |
|||
}, |
|||
success: function(result) { |
|||
// if (typeof callback == "function") { |
|||
// callback(result); |
|||
// } |
|||
// $.operate.successCallback(result); |
|||
} |
|||
}; |
|||
$.ajax(config) |
|||
} |
|||
} |
|||
|
|||
|
|||
</script> |
|||
</body> |
|||
</html> |
|||
@ -0,0 +1,39 @@ |
|||
<!DOCTYPE html> |
|||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" > |
|||
<head> |
|||
<th:block th:include="zdxtInclude :: header('修改企业信息')" /> |
|||
<th:block th:include="zdxtInclude :: datetimepicker-css" /> |
|||
</head> |
|||
<body class="white-bg"> |
|||
<div class="wrapper wrapper-content animated fadeInRight ibox-content"> |
|||
<form class="form-horizontal m" id="form-information-edit"> |
|||
<input name="id" th:value="${id}" type="hidden"> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">所属行业:</label> |
|||
<div class="col-sm-8"> |
|||
<select name="industry" id="industryType" th:with="type=${@dict.getType('industryType')}" class="form-control m-b"> |
|||
<!--<option value=""></option>--> |
|||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option> |
|||
</select> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
<th:block th:include="zdxtInclude :: footer" /> |
|||
<th:block th:include="zdxtInclude :: datetimepicker-js" /> |
|||
<script type="text/javascript"> |
|||
var prefix = ctx + "enterpriseInformation"; |
|||
$("#form-information-edit").validate({ |
|||
focusCleanup: true |
|||
}); |
|||
|
|||
function submitHandler() { |
|||
if ($.validate.form()) { |
|||
$.operate.save(prefix + "/editIndustry", $('#form-information-edit').serialize()); |
|||
} |
|||
} |
|||
|
|||
|
|||
</script> |
|||
</body> |
|||
</html> |
|||
@ -0,0 +1,34 @@ |
|||
package com.zdxt.code.domain; |
|||
|
|||
|
|||
import com.zdxt.common.annotation.ExcelExport; |
|||
|
|||
/** |
|||
* 企业排序 |
|||
*/ |
|||
public class EnterpriseRankExcel { |
|||
|
|||
/** |
|||
* 企业名称 |
|||
*/ |
|||
@ExcelExport("企业名称") |
|||
private String enterpriseName; |
|||
@ExcelExport("被执法数量") |
|||
private String total; |
|||
|
|||
public String getEnterpriseName() { |
|||
return enterpriseName; |
|||
} |
|||
|
|||
public void setEnterpriseName(String enterpriseName) { |
|||
this.enterpriseName = enterpriseName; |
|||
} |
|||
|
|||
public String getTotal() { |
|||
return total; |
|||
} |
|||
|
|||
public void setTotal(String total) { |
|||
this.total = total; |
|||
} |
|||
} |
|||
@ -0,0 +1,31 @@ |
|||
package com.zdxt.code.domain; |
|||
|
|||
import com.zdxt.common.annotation.ExcelExport; |
|||
|
|||
/** |
|||
* 执法人员分析导出模板 |
|||
*/ |
|||
public class LawEnforcerExcel { |
|||
|
|||
@ExcelExport("执法人员姓名") |
|||
private String name; |
|||
|
|||
@ExcelExport("执法案件数量") |
|||
private Integer total; |
|||
|
|||
public String getName() { |
|||
return name; |
|||
} |
|||
|
|||
public void setName(String name) { |
|||
this.name = name; |
|||
} |
|||
|
|||
public Integer getTotal() { |
|||
return total; |
|||
} |
|||
|
|||
public void setTotal(Integer total) { |
|||
this.total = total; |
|||
} |
|||
} |
|||
Loading…
Reference in new issue