Merge branch 'master' of http://8.140.179.55:20000/r/pipIrr-SV
1 文件已重命名
3个文件已添加
35个文件已修改
3个文件已删除
New file |
| | |
| | | # 数据源配置 |
| | | spring: |
| | | datasource: #配置数据源 |
| | | pj: |
| | | #name: pj |
| | | type: com.alibaba.druid.pool.DruidDataSource |
| | | driverClassName: com.mysql.cj.jdbc.Driver |
| | | url: jdbc:mysql://192.168.40.166:3306/pipIrr_pj?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&useSSL=false&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull |
| | | # url: jdbc:mysql://8.130.130.233:3306/pipIrr_pj?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&useSSL=false&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull |
| | | # url: jdbc:mysql://127.0.0.1:3306/pipIrr_pj?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&useSSL=false&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull |
| | | # url: jdbc:mysql://8.140.179.55:3306/pipIrr_pj?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&useSSL=false&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull |
| | | username: root |
| | | password: dysql,;.abc!@# |
| | | druid: |
| | | # 数据源名称:当存在多个数据源时,设置名字可以很方便的来进行区分,默认自动生成名称,格式是:"DataSource-" + System.identityHashCode(this) |
| | | name: druid-mysql-pj |
| | | #配置初始化大小、最小、最大 |
| | | initialSize: 10 |
| | | minIdle: 10 |
| | | maxActive: 100 |
| | | # 获取连接时最大等待时间,单位毫秒。配置了maxWait之后,缺省启用公平锁,并发效率会有所下降,如果需要可以通过配置useUnfairLock属性为true使用非公平锁 |
| | | maxWait: 6000 |
| | | #配置间隔多久进行一次检测,检测需要关闭的空闲连接,单位毫秒。 默认是60s,太长可能会导致无法及时检测到连接中断 |
| | | timeBetweenEvictionRunsMillis: 60000 |
| | | #配置一个连接在连接池中的最小生存时间、最大生存时间,超过最大生存时间会被移除,单位毫秒。 |
| | | minEvictableIdleTimeMillis: 300000 |
| | | maxEvictableIdleTimeMillis: 900000 |
| | | #探活、验证链接有效性的查询,新版本默认使用mysqlPing代替 |
| | | #validation-query: select 1 #注释掉,采用默认的mysqlPing |
| | | #配置从连接池获取连接时,当连接空闲时间大于timeBetweenEvictionRunsMillis时是否检查连接有效性,true每次都检查;false不检查。 |
| | | testWhileIdle: true |
| | | #配置从连接池获取连接时和向连接池归还连接时,是否检查连接有效性 |
| | | #每次获取或归还连接都检测太频繁,除非特别重要或网络特别不可靠等情况,建议用testWhileIdle + timeBetweenEvictionRunsMillis代替。--> |
| | | testOnBorrow: false |
| | | testOnReturn: false |
| | | #配置是否定期探活、探活间隔, 默认120s |
| | | keepAlive: true |
| | | #keepAliveBetweenTimeMillis must be greater than timeBetweenEvictionRunsMillis |
| | | keepAliveBetweenTimeMillis: 1200000 |
| | | #配置一个连接最大使用次数,避免长时间使用相同连接造成服务器端负载不均衡。 |
| | | phyMaxUseCount: 1000 |
| | | #是否缓存preparedStatement,也就是PSCache。PSCache对支持游标的数据库性能提升巨大,比如说oracle。在mysql下建议关闭。 |
| | | poolPreparedStatements: false |
| | | #要启用PSCache,必须配置大于0,当大于0时,poolPreparedStatements自动触发修改为true。在Druid中,不会存在Oracle下PSCache占用内存过多的问题,可以把这个数值配置大一些,比如说100 |
| | | maxOpenPreparedStatements: -1 |
| | | #指定每个连接上PSCache的大小 |
| | | maxPoolPreparedStatementPerConnectionSize: 20 |
| | | #属性类型是字符串,通过别名的方式配置扩展插件,常用的插件有: |
| | | #监控统计用的filter:stat,日志用的filter:log4j,防御sql注入的filter:wall |
| | | #弃用filter:stat,见https://blog.csdn.net/K_520_W/article/details/132382812 |
| | | filters: stat,wall,config |
| | | webStatFilter: |
| | | # 添加过滤规则 |
| | | urlPattern: /* |
| | | # 忽略过滤格式 |
| | | exclusions: "*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*" |
| | | statViewServlet: |
| | | # 设置ip白名单 |
| | | # allow: 127.0.0.1 |
| | | # 设置ip黑名单,优先级高于白名单 |
| | | deny: |
| | | # 设置控制台管理用户 |
| | | # loginUsername: root |
| | | # loginPassword: root |
| | | # 是否可以重置数据 |
| | | resetEnable: false |
| | | # 开启druid监控页面 |
| | | enabled: true |
New file |
| | |
| | | # 数据源配置 |
| | | spring: |
| | | datasource: #配置数据源 |
| | | ym: |
| | | #name: ym |
| | | type: com.alibaba.druid.pool.DruidDataSource |
| | | driverClassName: com.mysql.cj.jdbc.Driver |
| | | url: jdbc:mysql://192.168.40.166:3306/pipIrr_ym?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&useSSL=false&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull |
| | | # url: jdbc:mysql://8.130.130.233:3306/pipIrr_ym?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&useSSL=false&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull |
| | | # url: jdbc:mysql://127.0.0.1:3306/pipIrr_ym?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&useSSL=false&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull |
| | | # url: jdbc:mysql://8.140.179.55:3306/pipIrr_ym?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&useSSL=false&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull |
| | | username: root |
| | | password: dysql,;.abc!@# |
| | | druid: |
| | | # 数据源名称:当存在多个数据源时,设置名字可以很方便的来进行区分,默认自动生成名称,格式是:"DataSource-" + System.identityHashCode(this) |
| | | name: druid-mysql-ym |
| | | #配置初始化大小、最小、最大 |
| | | initialSize: 10 |
| | | minIdle: 10 |
| | | maxActive: 100 |
| | | # 获取连接时最大等待时间,单位毫秒。配置了maxWait之后,缺省启用公平锁,并发效率会有所下降,如果需要可以通过配置useUnfairLock属性为true使用非公平锁 |
| | | maxWait: 60000 |
| | | #配置间隔多久进行一次检测,检测需要关闭的空闲连接,单位毫秒。 默认是60s,太长可能会导致无法及时检测到连接中断 |
| | | timeBetweenEvictionRunsMillis: 60000 |
| | | #配置一个连接在连接池中的最小生存时间、最大生存时间,超过最大生存时间会被移除,单位毫秒。 |
| | | minEvictableIdleTimeMillis: 300000 |
| | | maxEvictableIdleTimeMillis: 900000 |
| | | #探活、验证链接有效性的查询,新版本默认使用mysqlPing代替 |
| | | #validation-query: select 1 #注释掉,采用默认的mysqlPing |
| | | #配置从连接池获取连接时,当连接空闲时间大于timeBetweenEvictionRunsMillis时是否检查连接有效性,true每次都检查;false不检查。 |
| | | testWhileIdle: true |
| | | #配置从连接池获取连接时和向连接池归还连接时,是否检查连接有效性 |
| | | #每次获取或归还连接都检测太频繁,除非特别重要或网络特别不可靠等情况,建议用testWhileIdle + timeBetweenEvictionRunsMillis代替。--> |
| | | testOnBorrow: false |
| | | testOnReturn: false |
| | | #配置是否定期探活、探活间隔, 默认120s |
| | | keepAlive: true |
| | | #keepAliveBetweenTimeMillis must be greater than timeBetweenEvictionRunsMillis |
| | | keepAliveBetweenTimeMillis: 1200000 |
| | | #配置一个连接最大使用次数,避免长时间使用相同连接造成服务器端负载不均衡。 |
| | | phyMaxUseCount: 1000 |
| | | #是否缓存preparedStatement,也就是PSCache。PSCache对支持游标的数据库性能提升巨大,比如说oracle。在mysql下建议关闭。 |
| | | poolPreparedStatements: false |
| | | #要启用PSCache,必须配置大于0,当大于0时,poolPreparedStatements自动触发修改为true。在Druid中,不会存在Oracle下PSCache占用内存过多的问题,可以把这个数值配置大一些,比如说100 |
| | | maxOpenPreparedStatements: -1 |
| | | #指定每个连接上PSCache的大小 |
| | | maxPoolPreparedStatementPerConnectionSize: 20 |
| | | #属性类型是字符串,通过别名的方式配置扩展插件,常用的插件有: |
| | | #监控统计用的filter:stat,日志用的filter:log4j,防御sql注入的filter:wall |
| | | filters: stat,wall,config |
| | | webStatFilter: |
| | | # 添加过滤规则 |
| | | urlPattern: /* |
| | | # 忽略过滤格式 |
| | | exclusions: "*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*" |
| | | statViewServlet: |
| | | # 设置ip白名单 |
| | | # allow: 127.0.0.1 |
| | | # 设置ip黑名单,优先级高于白名单 |
| | | deny: |
| | | # 设置控制台管理用户 |
| | | # loginUsername: root |
| | | # loginPassword: root |
| | | # 是否可以重置数据 |
| | | resetEnable: false |
| | | # 开启druid监控页面 |
| | | enabled: true |
| | | |
New file |
| | |
| | | # 数据源配置 |
| | | spring: |
| | | #多数据源需要配置 |
| | | main: |
| | | allow-bean-definition-overriding: true #设置为true时,后定义的bean会覆盖之前定义的相同名称的bean |
| | | datasource: #配置数据源 |
| | | #多个数据源名称在此配置,要求与spring。datasource。[ym][pj]中的一致 |
| | | names: ym, pj, sp |
| | |
| | | * 密码,密码的MD5加密 |
| | | */ |
| | | @Schema(description = "密码", requiredMode = Schema.RequiredMode.REQUIRED) |
| | | @Length(message = "密码必须{max}位数据", min = 6, max = 6) |
| | | @Length(message = "密码必须{max}位数据", min = 5, max = 20) |
| | | public String password; |
| | | |
| | | /** |
| | |
| | | package com.dy.pipIrrGlobal.util; |
| | | |
| | | import com.dy.common.util.ConfigXml; |
| | | import com.dy.common.webListener.ConfigListener; |
| | | import org.jdom2.Document; |
| | | import org.springframework.boot.context.event.ApplicationReadyEvent; |
| | | |
| | |
| | | @SuppressWarnings("unused ") |
| | | protected void init(ApplicationReadyEvent event) { |
| | | try { |
| | | URL configFileURL = ConfigListener.class.getResource("/init-config.xml"); |
| | | URL configFileURL = OrgListenerSupport.class.getResource("/init-config.xml"); |
| | | ConfigXml configXml = new ConfigXml(); |
| | | Document doc = configXml.createDom(configFileURL); |
| | | this.doInit(configXml, doc); |
| | |
| | | #name: pj |
| | | type: com.alibaba.druid.pool.DruidDataSource |
| | | driverClassName: com.mysql.cj.jdbc.Driver |
| | | url: jdbc:mysql://192.168.40.166:3306/pipIrr_pj?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&useSSL=false&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull |
| | | # url: jdbc:mysql://8.130.130.233:3306/pipIrr_pj?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&useSSL=false&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull |
| | | # url: jdbc:mysql://127.0.0.1:3306/pipIrr_pj?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&useSSL=false&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull |
| | | # url: jdbc:mysql://8.140.179.55:3306/pipIrr_pj?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&useSSL=false&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull |
| | | #url: jdbc:mysql://192.168.40.166:3306/pipIrr_pj?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&useSSL=false&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull |
| | | #url: jdbc:mysql://8.130.130.233:3306/pipIrr_pj?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&useSSL=false&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull |
| | | #url: jdbc:mysql://8.140.179.55:3306/pipIrr_pj?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&useSSL=false&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull |
| | | url: jdbc:mysql://127.0.0.1:3306/pipIrr_pj?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&useSSL=false&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull |
| | | username: root |
| | | password: dysql,;.abc!@# |
| | | druid: |
| | |
| | | #属性类型是字符串,通过别名的方式配置扩展插件,常用的插件有: |
| | | #监控统计用的filter:stat,日志用的filter:log4j,防御sql注入的filter:wall |
| | | #弃用filter:stat,见https://blog.csdn.net/K_520_W/article/details/132382812 |
| | | filters: stat,wall,config |
| | | #filters: stat,wall,config |
| | | filters: wall,config |
| | | webStatFilter: |
| | | # 添加过滤规则 |
| | | urlPattern: /* |
| | |
| | | # 是否可以重置数据 |
| | | resetEnable: false |
| | | # 开启druid监控页面 |
| | | enabled: true |
| | | #enabled: true |
| | | enabled: false |
| | |
| | | #name: ym |
| | | type: com.alibaba.druid.pool.DruidDataSource |
| | | driverClassName: com.mysql.cj.jdbc.Driver |
| | | url: jdbc:mysql://192.168.40.166:3306/pipIrr_ym?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&useSSL=false&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull |
| | | # url: jdbc:mysql://8.130.130.233:3306/pipIrr_ym?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&useSSL=false&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull |
| | | # url: jdbc:mysql://127.0.0.1:3306/pipIrr_ym?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&useSSL=false&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull |
| | | # url: jdbc:mysql://8.140.179.55:3306/pipIrr_ym?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&useSSL=false&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull |
| | | #url: jdbc:mysql://192.168.40.166:3306/pipIrr_ym?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&useSSL=false&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull |
| | | #url: jdbc:mysql://8.130.130.233:3306/pipIrr_ym?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&useSSL=false&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull |
| | | #url: jdbc:mysql://8.140.179.55:3306/pipIrr_ym?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&useSSL=false&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull |
| | | url: jdbc:mysql://127.0.0.1:3306/pipIrr_ym?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&useSSL=false&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull |
| | | username: root |
| | | password: dysql,;.abc!@# |
| | | druid: |
| | |
| | | maxPoolPreparedStatementPerConnectionSize: 20 |
| | | #属性类型是字符串,通过别名的方式配置扩展插件,常用的插件有: |
| | | #监控统计用的filter:stat,日志用的filter:log4j,防御sql注入的filter:wall |
| | | filters: stat,wall,config |
| | | #filters: stat,wall,config |
| | | filters: wall,config |
| | | webStatFilter: |
| | | # 添加过滤规则 |
| | | urlPattern: /* |
| | |
| | | # 是否可以重置数据 |
| | | resetEnable: false |
| | | # 开启druid监控页面 |
| | | enabled: true |
| | | #enabled: true |
| | | enabled: false |
| | | |
| | |
| | | allow-bean-definition-overriding: true #设置为true时,后定义的bean会覆盖之前定义的相同名称的bean |
| | | datasource: #配置数据源 |
| | | #多个数据源名称在此配置,要求与spring。datasource。[ym][pj]中的一致 |
| | | names: ym, pj, sp |
| | | names: ym, pj |
| | |
| | | #命令发送地址(中缀是机构tag,其也是数据源后缀名称) |
| | | ym: |
| | | comSendUrl: "http://127.0.0.1:8070/rtuMw/com/send" |
| | | sp: |
| | | pj: |
| | | comSendUrl: "http://127.0.0.1:8071/rtuMw/com/send" |
| | | #监测控制模块回调地址 |
| | | rtuCallbackUrl_rm: "http://127.0.0.1:8081/remote/comRes/receive" |
| | |
| | | - /wx/comRes/receive |
| | | #自动统计配置,自动统计定时任务会每天定时进行 |
| | | auto-statistics: |
| | | startHour: 17 #开始小时 0 |
| | | startMinute: 19 #开始分钟 5 |
| | | startHour: 0 #开始小时 0 |
| | | startMinute: 5 #开始分钟 5 |
| | | |
| | | #钉钉消息推送 |
| | | dingtalk: |
| | |
| | | <item5 typeName="绿化用水"/> |
| | | </waterTypes> |
| | | </org1> |
| | | <org2 tag="sp" name="沙盘"> |
| | | <org2 tag="pj" name="片角"> |
| | | <districts> |
| | | <province name="天津" num="53" level="1"> |
| | | <city name="天津市" num="23" level="2"> |
| | | <country name="武清区" num="28" level="3" /> |
| | | <province name="云南省" num="53" level="0"> |
| | | <city name="丽江市" num="23" level="1"> |
| | | <country name="永胜县" num="28" level="2" /> |
| | | </city> |
| | | </province> |
| | | </districts> |
| | |
| | | datasource: #配置数据源 |
| | | type: com.alibaba.druid.pool.DruidDataSource |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | url: jdbc:mysql://192.168.40.166:3306/pipIrr_ym?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&useSSL=false&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull |
| | | # url: jdbc:mysql://8.130.130.233:3306/pipIrr_ym?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&useSSL=false&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull |
| | | # url: jdbc:mysql://127.0.0.1:3306/pipIrr_ym?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&useSSL=false&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull |
| | | # url: jdbc:mysql://8.140.179.55:3306/pipIrr_ym?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&useSSL=false&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull |
| | | #url: jdbc:mysql://192.168.40.166:3306/pipIrr_ym?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&useSSL=false&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull |
| | | #url: jdbc:mysql://8.130.130.233:3306/pipIrr_ym?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&useSSL=false&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull |
| | | #url: jdbc:mysql://8.140.179.55:3306/pipIrr_ym?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&useSSL=false&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull |
| | | url: jdbc:mysql://127.0.0.1:3306/pipIrr_ym?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&useSSL=false&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull |
| | | username: root |
| | | password: dysql,;.abc!@# |
| | | druid: |
| | |
| | | context-parameters: |
| | | #GenerateIdSetSuffixListener中应用,取值范围是0-99 |
| | | idSuffix: ${pipIrr.mw.idSuffix} |
| | | #ConfigListener中应用 |
| | | #configFileNames: config-global.xml,config-demo.xml |
| | |
| | | /** |
| | | * 启动顺序 |
| | | */ |
| | | //private static final int order_config = 0 ; |
| | | private static final int order_idSetSuffix = 1 ; |
| | | //private static final int order_init = 2 ; |
| | | |
| | | /* |
| | | * 解析各种***.config配置的ConfigListener,暂时不采用此种配置方式 |
| | | * |
| | | @Bean |
| | | public ConfigListener getGlConfigListener(){ |
| | | return new ConfigListener() ; |
| | | } |
| | | /** |
| | | * 外部提供Listener |
| | | * @param listener 外部提供Listener |
| | | * @return 注册Bean |
| | | @Bean |
| | | public ServletListenerRegistrationBean<? extends ServletContextListener> regConfigListener(ConfigListener listener) { |
| | | ServletListenerRegistrationBean<ConfigListener> listenerRegistrationBean = new ServletListenerRegistrationBean<>(); |
| | | listenerRegistrationBean.setListener(listener); |
| | | listenerRegistrationBean.setOrder(order_config); |
| | | return listenerRegistrationBean; |
| | | } |
| | | */ |
| | | |
| | | /** |
| | | * 内部提供listener,该listener在系统启动时,根据配置 设置ID产生器的后缀 |
| | |
| | | context-parameters: |
| | | #GenerateIdSetSuffixListener中应用,取值范围是0-99 |
| | | idSuffix: ${pipIrr.app.idSuffix} |
| | | #ConfigListener中应用 |
| | | #configFileNames: config-global.xml,config-demo.xml |
| | |
| | | package com.dy.pipIrrBase.config; |
| | | |
| | | import com.dy.common.webListener.GenerateIdSetSuffixListener; |
| | | import com.dy.pipIrrBase.util.InitListener; |
| | | import jakarta.servlet.ServletContextListener; |
| | | import org.springframework.boot.web.servlet.ServletListenerRegistrationBean; |
| | | import org.springframework.context.annotation.Bean; |
| | |
| | | /** |
| | | * 启动顺序 |
| | | */ |
| | | //private static final int order_config = 0 ; |
| | | private static final int order_idSetSuffix = 1 ; |
| | | //private static final int order_init = 2 ; |
| | | |
| | | /* |
| | | * 解析各种***.config配置的ConfigListener,暂时不采用此种配置方式 |
| | | * |
| | | @Bean |
| | | public ConfigListener getGlConfigListener(){ |
| | | return new ConfigListener() ; |
| | | } |
| | | /** |
| | | * 外部提供Listener |
| | | * @param listener 外部提供Listener |
| | | * @return 注册Bean |
| | | @Bean |
| | | public ServletListenerRegistrationBean<? extends ServletContextListener> regConfigListener(ConfigListener listener) { |
| | | ServletListenerRegistrationBean<ConfigListener> listenerRegistrationBean = new ServletListenerRegistrationBean<>(); |
| | | listenerRegistrationBean.setListener(listener); |
| | | listenerRegistrationBean.setOrder(order_config); |
| | | return listenerRegistrationBean; |
| | | } |
| | | */ |
| | | |
| | | /** |
| | | * 内部提供listener,该listener在系统启动时,根据配置 设置ID产生器的后缀 |
| | |
| | | import com.dy.common.mybatis.envm.Disabled; |
| | | import com.dy.common.util.ConfigXml; |
| | | import com.dy.common.util.MD5; |
| | | import com.dy.common.webListener.ConfigListener; |
| | | import com.dy.pipIrrGlobal.daoBa.BaDistrictMapper; |
| | | import com.dy.pipIrrGlobal.daoBa.BaSettingsMapper; |
| | | import com.dy.pipIrrGlobal.daoBa.BaUserMapper; |
| | |
| | | @SuppressWarnings("unused ") |
| | | private void init(ApplicationReadyEvent event){ |
| | | try { |
| | | URL configFileURL = ConfigListener.class.getResource("/init-config.xml" ); |
| | | URL configFileURL = InitListener.class.getResource("/init-config.xml" ); |
| | | ConfigXml configXml = new ConfigXml() ; |
| | | Document doc = configXml.createDom(configFileURL) ; |
| | | this.doInit(configXml, doc); |
| | |
| | | if(configXml.existElement(doc, "config.orgs.org" + num + ".districts.province")){ |
| | | String distriName = configXml.getSetAttrTxt(doc, "config.orgs.org" + num + ".districts.province","name", null, false, null) ; |
| | | String distriNum = configXml.getSetAttrTxt(doc, "config.orgs.org" + num + ".districts.province","num", null, false, null) ; |
| | | Integer distriLevel = configXml.getSetAttrPlusInt(doc, "config.orgs.org" + num + ".districts.province","level", null, 1, 99,null) ; |
| | | Integer distriLevel = configXml.getSetAttrPlusInt(doc, "config.orgs.org" + num + ".districts.province","level", null, 0, 99,null) ; |
| | | Long supperId = this.saveDistrict(null, distriName, distriNum, distriLevel); |
| | | if(supperId != null && configXml.existElement(doc, "config.orgs.org" + num + ".districts.province.city")){ |
| | | distriName = configXml.getSetAttrTxt(doc, "config.orgs.org" + num + ".districts.province.city","name", null, false, null) ; |
| | |
| | | spring: |
| | | profiles: |
| | | include: global, database, database-ym, database-pj, database-sp |
| | | include: global, database, database-ym, database-pj |
| | | user: |
| | | defaultTrueRandomFalsePassword: true #true:采用默认密码,false:系统产生随机密码 |
| | | defaultPassword: "abc_123" |
| | |
| | | context-parameters: |
| | | #GenerateIdSetSuffixListener中应用,取值范围是0-99 |
| | | idSuffix: ${pipIrr.base.idSuffix} |
| | | #ConfigListener中应用 |
| | | #configFileNames: config-global.xml,config-demo.xml |
| | |
| | | context-parameters: |
| | | #GenerateIdSetSuffixListener中应用,取值范围是0-99 |
| | | idSuffix: ${pipIrr.gis.idSuffix} |
| | | #ConfigListener中应用 |
| | | #configFileNames: config-global.xml,config-demo.xml |
| | |
| | | /** |
| | | * 启动顺序 |
| | | */ |
| | | //private static final int order_config = 0 ; |
| | | private static final int order_idSetSuffix = 1 ; |
| | | //private static final int order_init = 2 ; |
| | | |
| | | /* |
| | | * 解析各种***.config配置的ConfigListener,暂时不采用此种配置方式 |
| | | * |
| | | @Bean |
| | | public ConfigListener getGlConfigListener(){ |
| | | return new ConfigListener() ; |
| | | } |
| | | /** |
| | | * 外部提供Listener |
| | | * @param listener 外部提供Listener |
| | | * @return 注册Bean |
| | | @Bean |
| | | public ServletListenerRegistrationBean<? extends ServletContextListener> regConfigListener(ConfigListener listener) { |
| | | ServletListenerRegistrationBean<ConfigListener> listenerRegistrationBean = new ServletListenerRegistrationBean<>(); |
| | | listenerRegistrationBean.setListener(listener); |
| | | listenerRegistrationBean.setOrder(order_config); |
| | | return listenerRegistrationBean; |
| | | } |
| | | */ |
| | | |
| | | /** |
| | | * 内部提供listener,该listener在系统启动时,根据配置 设置ID产生器的后缀 |
| | |
| | | context-parameters: |
| | | #GenerateIdSetSuffixListener中应用,取值范围是0-99 |
| | | idSuffix: ${pipIrr.irrigate.idSuffix} |
| | | #ConfigListener中应用 |
| | | #configFileNames: config-global.xml,config-demo.xml |
| | |
| | | /** |
| | | * 启动顺序 |
| | | */ |
| | | //private static final int order_config = 0 ; |
| | | private static final int order_idSetSuffix = 1 ; |
| | | //private static final int order_init = 2 ; |
| | | |
| | | /* |
| | | * 解析各种***.config配置的ConfigListener,暂时不采用此种配置方式 |
| | | * |
| | | @Bean |
| | | public ConfigListener getGlConfigListener(){ |
| | | return new ConfigListener() ; |
| | | } |
| | | /** |
| | | * 外部提供Listener |
| | | * @param listener 外部提供Listener |
| | | * @return 注册Bean |
| | | @Bean |
| | | public ServletListenerRegistrationBean<? extends ServletContextListener> regConfigListener(ConfigListener listener) { |
| | | ServletListenerRegistrationBean<ConfigListener> listenerRegistrationBean = new ServletListenerRegistrationBean<>(); |
| | | listenerRegistrationBean.setListener(listener); |
| | | listenerRegistrationBean.setOrder(order_config); |
| | | return listenerRegistrationBean; |
| | | } |
| | | */ |
| | | |
| | | |
| | | /** |
| | | * 内部提供listener,该listener在系统启动时,根据配置 设置ID产生器的后缀 |
| | |
| | | context-parameters: |
| | | #GenerateIdSetSuffixListener中应用,取值范围是0-99 |
| | | idSuffix: ${pipIrr.operation.idSuffix} |
| | | #ConfigListener中应用 |
| | | #configFileNames: config-global.xml,config-demo.xml |
| | |
| | | /** |
| | | * 启动顺序 |
| | | */ |
| | | //private static final int order_config = 0 ; |
| | | private static final int order_idSetSuffix = 1 ; |
| | | //private static final int order_init = 2 ; |
| | | |
| | | /* |
| | | * 解析各种***.config配置的ConfigListener,暂时不采用此种配置方式 |
| | | * |
| | | @Bean |
| | | public ConfigListener getGlConfigListener(){ |
| | | return new ConfigListener() ; |
| | | } |
| | | /** |
| | | * 外部提供Listener |
| | | * @param listener 外部提供Listener |
| | | * @return 注册Bean |
| | | @Bean |
| | | public ServletListenerRegistrationBean<? extends ServletContextListener> regConfigListener(ConfigListener listener) { |
| | | ServletListenerRegistrationBean<ConfigListener> listenerRegistrationBean = new ServletListenerRegistrationBean<>(); |
| | | listenerRegistrationBean.setListener(listener); |
| | | listenerRegistrationBean.setOrder(order_config); |
| | | return listenerRegistrationBean; |
| | | } |
| | | */ |
| | | |
| | | /** |
| | | * 内部提供listener,该listener在系统启动时,根据配置 设置ID产生器的后缀 |
| | |
| | | context-parameters: |
| | | #GenerateIdSetSuffixListener中应用,取值范围是0-99 |
| | | idSuffix: ${pipIrr.project.idSuffix} |
| | | #ConfigListener中应用 |
| | | #configFileNames: config-global.xml,config-demo.xml |
| | |
| | | /** |
| | | * 启动顺序 |
| | | */ |
| | | //private static final int order_config = 0 ; |
| | | private static final int order_idSetSuffix = 1 ; |
| | | //private static final int order_init = 2 ; |
| | | |
| | | /* |
| | | * 解析各种***.config配置的ConfigListener,暂时不采用此种配置方式 |
| | | * |
| | | @Bean |
| | | public ConfigListener getGlConfigListener(){ |
| | | return new ConfigListener() ; |
| | | } |
| | | /** |
| | | * 外部提供Listener |
| | | * @param listener 外部提供Listener |
| | | * @return 注册Bean |
| | | @Bean |
| | | public ServletListenerRegistrationBean<? extends ServletContextListener> regConfigListener(ConfigListener listener) { |
| | | ServletListenerRegistrationBean<ConfigListener> listenerRegistrationBean = new ServletListenerRegistrationBean<>(); |
| | | listenerRegistrationBean.setListener(listener); |
| | | listenerRegistrationBean.setOrder(order_config); |
| | | return listenerRegistrationBean; |
| | | } |
| | | */ |
| | | |
| | | /** |
| | | * 内部提供listener,该listener在系统启动时,根据配置 设置ID产生器的后缀 |
| | |
| | | context-parameters: |
| | | #GenerateIdSetSuffixListener中应用,取值范围是0-99 |
| | | idSuffix: ${pipIrr.remote.idSuffix} |
| | | #ConfigListener中应用 |
| | | #configFileNames: config-global.xml,config-demo.xml |
| | |
| | | |
| | | @Value("${project.divisionCode}") |
| | | private String divisionCode; |
| | | |
| | | @Value("${project.projectNo}") |
| | | private Integer projectNo; |
| | | /** |
| | | * 开卡 |
| | | * @param po 开卡传入对象 |
| | |
| | | } |
| | | |
| | | Map map = new HashMap(); |
| | | map.put("projectNo", String.format("%02x", Integer.parseInt(cardOperateSv.getProjectNo()))); |
| | | // map.put("projectNo", String.format("%02x", Integer.parseInt(cardOperateSv.getProjectNo()))); |
| | | map.put("projectNo", String.format("%02x", projectNo)); |
| | | map.put("orderNumber", rec); |
| | | map.put("cardNum", cardNum); |
| | | return BaseResponseUtils.buildSuccess(map) ; |
| | |
| | | } |
| | | |
| | | Map map_response = new HashMap(); |
| | | map_response.put("projectNo", String.format("%02x", Integer.parseInt(cardOperateSv.getProjectNo()))); |
| | | map_response.put("projectNo", String.format("%02x", projectNo)); |
| | | map_response.put("orderNumber", rec); |
| | | map_response.put("cardNum", cardNum); |
| | | return BaseResponseUtils.buildSuccess(map_response) ; |
| | |
| | | } |
| | | |
| | | Map map_response = new HashMap(); |
| | | map_response.put("projectNo", String.format("%02x", Integer.parseInt(cardOperateSv.getProjectNo()))); |
| | | map_response.put("projectNo", String.format("%02x", projectNo)); |
| | | map_response.put("orderNumber", rec); |
| | | map_response.put("cardNum", cardNum); |
| | | return BaseResponseUtils.buildSuccess(map_response) ; |
| | |
| | | } |
| | | |
| | | Map map_response = new HashMap(); |
| | | map_response.put("projectNo", String.format("%02x", Integer.parseInt(cardOperateSv.getProjectNo()))); |
| | | map_response.put("projectNo", String.format("%02x", projectNo)); |
| | | map_response.put("orderNumber", rec); |
| | | map_response.put("cardNum", cardNum); |
| | | return BaseResponseUtils.buildSuccess(map_response) ; |
| | |
| | | } |
| | | |
| | | Map map_response = new HashMap(); |
| | | map_response.put("projectNo", String.format("%02x", Integer.parseInt(cardOperateSv.getProjectNo()))); |
| | | map_response.put("projectNo", String.format("%02x", projectNo)); |
| | | map_response.put("orderNumber", rec); |
| | | map_response.put("cardNum", cardNum); |
| | | return BaseResponseUtils.buildSuccess(map_response) ; |
| | |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.dubbo.common.utils.PojoUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.text.DecimalFormat; |
| | |
| | | @Autowired |
| | | private SeManagerCardMapper seManagerCardMapper; |
| | | |
| | | @Value("${project.projectNo}") |
| | | private Integer projectNo; |
| | | |
| | | /** |
| | | * 添加开卡记录 |
| | |
| | | } |
| | | |
| | | Map map_response = new HashMap(); |
| | | map_response.put("projectNo", String.format("%02x", Integer.parseInt(getProjectNo()))); |
| | | // map_response.put("projectNo", String.format("%02x", Integer.parseInt(getProjectNo()))); |
| | | map_response.put("projectNo", String.format("%02x", projectNo)); |
| | | map_response.put("orderNumber", rec); |
| | | map_response.put("cardNum", cardNum); |
| | | return BaseResponseUtils.buildSuccess(map_response) ; |
| | |
| | | import jakarta.validation.constraints.NotNull; |
| | | import lombok.RequiredArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.http.MediaType; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.validation.BindingResult; |
| | |
| | | public class ClientCtrl { |
| | | private final ClientSv clientSv; |
| | | //private final RedisUtils redisUtils; |
| | | @Value("${project.projectNo}") |
| | | private Integer projectNo; |
| | | |
| | | /** |
| | | * 获取农户列表 |
| | |
| | | // 生成12位5级行政区划编码串及名称串 |
| | | Long districtNum = Long.parseLong(provinceNum + cityNum + countyNum + townNum + villageNum); |
| | | //获取项目编码 |
| | | String projectNo = clientSv.getItemValue("projectNo"); |
| | | //转为int |
| | | Integer projectNo1 = Integer.valueOf(projectNo); |
| | | //转为16进制 |
| | | // String projectNo2 = Integer.toHexString(projectNo1); |
| | | // log.info(projectNo2); |
| | | String projectNo3 = String.format("%02x", projectNo1); |
| | | // String projectNo = clientSv.getItemValue("projectNo"); |
| | | // //转为int |
| | | // Integer projectNo1 = Integer.valueOf(projectNo); |
| | | // //转为16进制 |
| | | //// String projectNo2 = Integer.toHexString(projectNo1); |
| | | //// log.info(projectNo2); |
| | | String projectNo3 = String.format("%02x", projectNo); |
| | | log.info(projectNo3); |
| | | |
| | | Map map = new HashMap(); |
| | |
| | | /** |
| | | * 启动顺序 |
| | | */ |
| | | //private static final int order_config = 0 ; |
| | | private static final int order_idSetSuffix = 1 ; |
| | | //private static final int order_init = 2 ; |
| | | |
| | | /* |
| | | * 解析各种***.config配置的ConfigListener,暂时不采用此种配置方式 |
| | | * |
| | | @Bean |
| | | public ConfigListener getGlConfigListener(){ |
| | | return new ConfigListener() ; |
| | | } |
| | | /** |
| | | * 外部提供Listener |
| | | * @param listener 外部提供Listener |
| | | * @return 注册Bean |
| | | @Bean |
| | | public ServletListenerRegistrationBean<? extends ServletContextListener> regConfigListener(ConfigListener listener) { |
| | | ServletListenerRegistrationBean<ConfigListener> listenerRegistrationBean = new ServletListenerRegistrationBean<>(); |
| | | listenerRegistrationBean.setListener(listener); |
| | | listenerRegistrationBean.setOrder(order_config); |
| | | return listenerRegistrationBean; |
| | | } |
| | | */ |
| | | |
| | | /** |
| | | * 内部提供listener,该listener在系统启动时,根据配置 设置ID产生器的后缀 |
| | |
| | | context-parameters: |
| | | #GenerateIdSetSuffixListener中应用,取值范围是0-99 |
| | | idSuffix: ${pipIrr.sell.idSuffix} |
| | | #ConfigListener中应用 |
| | | #configFileNames: config-global.xml,config-demo.xml |
| | | |
| | | #阿里短信服务 |
| | | aliyun: |
| | | sms: |
| | |
| | | |
| | | @Schema(description = "密码", requiredMode = Schema.RequiredMode.REQUIRED) |
| | | @NotEmpty(message = "密码不能为空") //不能为空也不能为null |
| | | @Length(message = "密码必须{min}位", min = 5, max = 6) |
| | | @Length(message = "密码必须{min}位", min = 5, max = 20) |
| | | public String password ; |
| | | |
| | | @Schema(description = "组织单位", requiredMode = Schema.RequiredMode.REQUIRED) |
| | |
| | | } catch (InterruptedException e) { |
| | | e.printStackTrace(); |
| | | } finally { |
| | | //初始化机构 |
| | | super.init(); |
| | | } |
| | | } |
| | |
| | | context-parameters: |
| | | #GenerateIdSetSuffixListener中应用,取值范围是0-99 |
| | | IdSuffix: ${pipIrr.sso.IdSuffix} |
| | | #ConfigListener中应用 |
| | | configFileNames: config-global.xml,config-sso.xml |
| | |
| | | /** |
| | | * 启动顺序 |
| | | */ |
| | | //private static final int order_config = 0 ; |
| | | private static final int order_idSetSuffix = 1 ; |
| | | //private static final int order_init = 2 ; |
| | | |
| | | /* |
| | | * 解析各种***.config配置的ConfigListener,暂时不采用此种配置方式 |
| | | * |
| | | @Bean |
| | | public ConfigListener getGlConfigListener(){ |
| | | return new ConfigListener() ; |
| | | } |
| | | /** |
| | | * 外部提供Listener |
| | | * @param listener 外部提供Listener |
| | | * @return 注册Bean |
| | | @Bean |
| | | public ServletListenerRegistrationBean<? extends ServletContextListener> regConfigListener(ConfigListener listener) { |
| | | ServletListenerRegistrationBean<ConfigListener> listenerRegistrationBean = new ServletListenerRegistrationBean<>(); |
| | | listenerRegistrationBean.setListener(listener); |
| | | listenerRegistrationBean.setOrder(order_config); |
| | | return listenerRegistrationBean; |
| | | } |
| | | */ |
| | | |
| | | /** |
| | | * 内部提供listener,该listener在系统启动时,根据配置 设置ID产生器的后缀 |
| | |
| | | context-parameters: |
| | | #GenerateIdSetSuffixListener中应用,取值范围是0-99 |
| | | IdSuffix: ${pipIrr.statistics.IdSuffix} |
| | | #ConfigListener中应用 |
| | | configFileNames: config-global.xml |
| | |
| | | /** |
| | | * 启动顺序 |
| | | */ |
| | | //private static final int order_config = 0 ; |
| | | private static final int order_idSetSuffix = 1 ; |
| | | |
| | | /* |
| | | * 解析各种***.config配置的ConfigListener,暂时不采用此种配置方式 |
| | | * |
| | | @Bean |
| | | public ConfigListener getGlConfigListener(){ |
| | | return new ConfigListener() ; |
| | | } |
| | | /** |
| | | * 外部提供Listener |
| | | * @param listener 外部提供Listener |
| | | * @return 注册Bean |
| | | @Bean |
| | | public ServletListenerRegistrationBean<? extends ServletContextListener> regConfigListener(ConfigListener listener) { |
| | | ServletListenerRegistrationBean<ConfigListener> listenerRegistrationBean = new ServletListenerRegistrationBean<>(); |
| | | listenerRegistrationBean.setListener(listener); |
| | | listenerRegistrationBean.setOrder(order_config); |
| | | return listenerRegistrationBean; |
| | | } |
| | | */ |
| | | |
| | | /** |
| | | * 内部提供listener,该listener在系统启动时,根据配置 设置ID产生器的后缀 |
| | |
| | | context-parameters: |
| | | #GenerateIdSetSuffixListener中应用,取值范围是0-99 |
| | | idSuffix: ${pipIrr.wechat.idSuffix} |
| | | #ConfigListener中应用 |
| | | #configFileNames: config-global.xml,config-demo.xml |
| | | |
| | | #阿里短信服务 |
| | | aliyun: |
| | | sms: |