feiyu02
2024-11-19 752e00503f672ddfe2066afb6c235721a3a912b5
2024.11.19 各项修正
已修改26个文件
已删除4个文件
已添加11个文件
已重命名1个文件
6307 ■■■■■ 文件已修改
.smarttomcat/ledger/conf/catalina.policy 257 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
.smarttomcat/ledger/conf/catalina.properties 148 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
.smarttomcat/ledger/conf/context.xml 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
.smarttomcat/ledger/conf/jaspic-providers.xml 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
.smarttomcat/ledger/conf/jaspic-providers.xsd 53 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
.smarttomcat/ledger/conf/logging.properties 70 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
.smarttomcat/ledger/conf/server.xml 169 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
.smarttomcat/ledger/conf/tomcat-users.xml 44 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
.smarttomcat/ledger/conf/tomcat-users.xsd 59 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
.smarttomcat/ledger/conf/web.xml 4685 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/SupervisionApplication.kt 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/bgtask/TaskController.kt 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/common/creditcode/EnvCreditCode.kt 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/common/exception/BizException.kt 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/common/net/FumeHttpService.kt 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/common/risk/RiskAnalysis.kt 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/common/risk/RiskAuthenticated.kt 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/common/wx/ByteGroup.java 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/common/wx/MessageManager.kt 44 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/common/wx/PKCS7Encoder.java 67 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/common/wx/TemplateManager.kt 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/common/wx/WXBizMsgCrypt.java 289 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/common/wx/WxConfig.kt 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/common/wx/XMLParse.java 78 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/domain/entity/SceneType.java 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/domain/enumeration/SceneType.kt 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/domain/repository/PracticalOperationRep.kt 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/lightshare/service/Impl/AuthServiceImpl.kt 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/lightshare/service/Impl/ConfigServiceImpl.kt 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/lightshare/service/Impl/LedgerServiceImpl.kt 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/lightshare/service/Impl/NotificationServiceImpl.kt 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/lightshare/service/Impl/ScheduleServiceImpl.kt 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/lightshare/service/ScheduleService.kt 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/lightshare/vo/ScheduleVo.kt 49 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/lightshare/web/BaseResPack.kt 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/lightshare/web/ScheduleController.kt 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/application-proapp.yml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/generator/generatorConfig.xml 40 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/SceneTypeMapper.xml 19 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/test/kotlin/cn/flightfeather/supervision/bgtask/PushFumeTest.kt 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/test/kotlin/cn/flightfeather/supervision/common/creditcode/EnvCreditCodeTest.kt 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/test/kotlin/cn/flightfeather/supervision/common/risk/RiskAnalysisTest.kt 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
.smarttomcat/ledger/conf/catalina.policy
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,257 @@
// Licensed to the Apache Software Foundation (ASF) under one or more
// contributor license agreements.  See the NOTICE file distributed with
// this work for additional information regarding copyright ownership.
// The ASF licenses this file to You under the Apache License, Version 2.0
// (the "License"); you may not use this file except in compliance with
// the License.  You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// ============================================================================
// catalina.policy - Security Policy Permissions for Tomcat
//
// This file contains a default set of security policies to be enforced (by the
// JVM) when Catalina is executed with the "-security" option.  In addition
// to the permissions granted here, the following additional permissions are
// granted to each web application:
//
// * Read access to the web application's document root directory
// * Read, write and delete access to the web application's working directory
// ============================================================================
// ========== SYSTEM CODE PERMISSIONS =========================================
// These permissions apply to javac
grant codeBase "file:${java.home}/lib/-" {
        permission java.security.AllPermission;
};
// These permissions apply to all shared system extensions
grant codeBase "file:${java.home}/jre/lib/ext/-" {
        permission java.security.AllPermission;
};
// These permissions apply to javac when ${java.home] points at $JAVA_HOME/jre
grant codeBase "file:${java.home}/../lib/-" {
        permission java.security.AllPermission;
};
// These permissions apply to all shared system extensions when
// ${java.home} points at $JAVA_HOME/jre
grant codeBase "file:${java.home}/lib/ext/-" {
        permission java.security.AllPermission;
};
// ========== CATALINA CODE PERMISSIONS =======================================
// These permissions apply to the daemon code
grant codeBase "file:${catalina.home}/bin/commons-daemon.jar" {
        permission java.security.AllPermission;
};
// These permissions apply to the logging API
// Note: If tomcat-juli.jar is in ${catalina.base} and not in ${catalina.home},
// update this section accordingly.
//  grant codeBase "file:${catalina.base}/bin/tomcat-juli.jar" {..}
grant codeBase "file:${catalina.home}/bin/tomcat-juli.jar" {
        permission java.io.FilePermission
         "${java.home}${file.separator}lib${file.separator}logging.properties", "read";
        permission java.io.FilePermission
         "${catalina.base}${file.separator}conf${file.separator}logging.properties", "read";
        permission java.io.FilePermission
         "${catalina.base}${file.separator}logs", "read, write";
        permission java.io.FilePermission
         "${catalina.base}${file.separator}logs${file.separator}*", "read, write";
        permission java.lang.RuntimePermission "shutdownHooks";
        permission java.lang.RuntimePermission "getClassLoader";
        permission java.lang.RuntimePermission "setContextClassLoader";
        permission java.lang.management.ManagementPermission "monitor";
        permission java.util.logging.LoggingPermission "control";
        permission java.util.PropertyPermission "java.util.logging.config.class", "read";
        permission java.util.PropertyPermission "java.util.logging.config.file", "read";
        permission java.util.PropertyPermission "org.apache.juli.AsyncLoggerPollInterval", "read";
        permission java.util.PropertyPermission "org.apache.juli.AsyncMaxRecordCount", "read";
        permission java.util.PropertyPermission "org.apache.juli.AsyncOverflowDropType", "read";
        permission java.util.PropertyPermission "org.apache.juli.ClassLoaderLogManager.debug", "read";
        permission java.util.PropertyPermission "catalina.base", "read";
        // Note: To enable per context logging configuration, permit read access to
        // the appropriate file. Be sure that the logging configuration is
        // secure before enabling such access.
        // E.g. for the examples web application (uncomment and unwrap
        // the following to be on a single line):
        // permission java.io.FilePermission "${catalina.base}${file.separator}
        //  webapps${file.separator}examples${file.separator}WEB-INF
        //  ${file.separator}classes${file.separator}logging.properties", "read";
};
// These permissions apply to the server startup code
grant codeBase "file:${catalina.home}/bin/bootstrap.jar" {
        permission java.security.AllPermission;
};
// These permissions apply to the servlet API classes
// and those that are shared across all class loaders
// located in the "lib" directory
grant codeBase "file:${catalina.home}/lib/-" {
        permission java.security.AllPermission;
};
// If using a per instance lib directory, i.e. ${catalina.base}/lib,
// then the following permission will need to be uncommented
// grant codeBase "file:${catalina.base}/lib/-" {
//         permission java.security.AllPermission;
// };
// ========== WEB APPLICATION PERMISSIONS =====================================
// These permissions are granted by default to all web applications
// In addition, a web application will be given a read FilePermission
// for all files and directories in its document root.
grant {
    // Required for JNDI lookup of named JDBC DataSource's and
    // javamail named MimePart DataSource used to send mail
    permission java.util.PropertyPermission "java.home", "read";
    permission java.util.PropertyPermission "java.naming.*", "read";
    permission java.util.PropertyPermission "javax.sql.*", "read";
    // OS Specific properties to allow read access
    permission java.util.PropertyPermission "os.name", "read";
    permission java.util.PropertyPermission "os.version", "read";
    permission java.util.PropertyPermission "os.arch", "read";
    permission java.util.PropertyPermission "file.separator", "read";
    permission java.util.PropertyPermission "path.separator", "read";
    permission java.util.PropertyPermission "line.separator", "read";
    // JVM properties to allow read access
    permission java.util.PropertyPermission "java.version", "read";
    permission java.util.PropertyPermission "java.vendor", "read";
    permission java.util.PropertyPermission "java.vendor.url", "read";
    permission java.util.PropertyPermission "java.class.version", "read";
    permission java.util.PropertyPermission "java.specification.version", "read";
    permission java.util.PropertyPermission "java.specification.vendor", "read";
    permission java.util.PropertyPermission "java.specification.name", "read";
    permission java.util.PropertyPermission "java.vm.specification.version", "read";
    permission java.util.PropertyPermission "java.vm.specification.vendor", "read";
    permission java.util.PropertyPermission "java.vm.specification.name", "read";
    permission java.util.PropertyPermission "java.vm.version", "read";
    permission java.util.PropertyPermission "java.vm.vendor", "read";
    permission java.util.PropertyPermission "java.vm.name", "read";
    // Required for OpenJMX
    permission java.lang.RuntimePermission "getAttribute";
    // Allow read of JAXP compliant XML parser debug
    permission java.util.PropertyPermission "jaxp.debug", "read";
    // All JSPs need to be able to read this package
    permission java.lang.RuntimePermission "accessClassInPackage.org.apache.tomcat";
    // Precompiled JSPs need access to these packages.
    permission java.lang.RuntimePermission "accessClassInPackage.org.apache.jasper.el";
    permission java.lang.RuntimePermission "accessClassInPackage.org.apache.jasper.runtime";
    permission java.lang.RuntimePermission
     "accessClassInPackage.org.apache.jasper.runtime.*";
    // Precompiled JSPs need access to these system properties.
    permission java.util.PropertyPermission
     "org.apache.jasper.runtime.BodyContentImpl.LIMIT_BUFFER", "read";
    permission java.util.PropertyPermission
     "org.apache.el.parser.COERCE_TO_ZERO", "read";
    // The cookie code needs these.
    permission java.util.PropertyPermission
     "org.apache.catalina.STRICT_SERVLET_COMPLIANCE", "read";
    permission java.util.PropertyPermission
     "org.apache.tomcat.util.http.ServerCookie.STRICT_NAMING", "read";
    permission java.util.PropertyPermission
     "org.apache.tomcat.util.http.ServerCookie.FWD_SLASH_IS_SEPARATOR", "read";
    // Applications using WebSocket need to be able to access these packages
    permission java.lang.RuntimePermission "accessClassInPackage.org.apache.tomcat.websocket";
    permission java.lang.RuntimePermission "accessClassInPackage.org.apache.tomcat.websocket.server";
};
// The Manager application needs access to the following packages to support the
// session display functionality. These settings support the following
// configurations:
// - default CATALINA_HOME == CATALINA_BASE
// - CATALINA_HOME != CATALINA_BASE, per instance Manager in CATALINA_BASE
// - CATALINA_HOME != CATALINA_BASE, shared Manager in CATALINA_HOME
grant codeBase "file:${catalina.base}/webapps/manager/-" {
    permission java.lang.RuntimePermission "accessClassInPackage.org.apache.catalina";
    permission java.lang.RuntimePermission "accessClassInPackage.org.apache.catalina.ha.session";
    permission java.lang.RuntimePermission "accessClassInPackage.org.apache.catalina.manager";
    permission java.lang.RuntimePermission "accessClassInPackage.org.apache.catalina.manager.util";
    permission java.lang.RuntimePermission "accessClassInPackage.org.apache.catalina.util";
};
grant codeBase "file:${catalina.home}/webapps/manager/-" {
    permission java.lang.RuntimePermission "accessClassInPackage.org.apache.catalina";
    permission java.lang.RuntimePermission "accessClassInPackage.org.apache.catalina.ha.session";
    permission java.lang.RuntimePermission "accessClassInPackage.org.apache.catalina.manager";
    permission java.lang.RuntimePermission "accessClassInPackage.org.apache.catalina.manager.util";
    permission java.lang.RuntimePermission "accessClassInPackage.org.apache.catalina.util";
};
// You can assign additional permissions to particular web applications by
// adding additional "grant" entries here, based on the code base for that
// application, /WEB-INF/classes/, or /WEB-INF/lib/ jar files.
//
// Different permissions can be granted to JSP pages, classes loaded from
// the /WEB-INF/classes/ directory, all jar files in the /WEB-INF/lib/
// directory, or even to individual jar files in the /WEB-INF/lib/ directory.
//
// For instance, assume that the standard "examples" application
// included a JDBC driver that needed to establish a network connection to the
// corresponding database and used the scrape taglib to get the weather from
// the NOAA web server.  You might create a "grant" entries like this:
//
// The permissions granted to the context root directory apply to JSP pages.
// grant codeBase "file:${catalina.base}/webapps/examples/-" {
//      permission java.net.SocketPermission "dbhost.mycompany.com:5432", "connect";
//      permission java.net.SocketPermission "*.noaa.gov:80", "connect";
// };
//
// The permissions granted to the context WEB-INF/classes directory
// grant codeBase "file:${catalina.base}/webapps/examples/WEB-INF/classes/-" {
// };
//
// The permission granted to your JDBC driver
// grant codeBase "jar:file:${catalina.base}/webapps/examples/WEB-INF/lib/driver.jar!/-" {
//      permission java.net.SocketPermission "dbhost.mycompany.com:5432", "connect";
// };
// The permission granted to the scrape taglib
// grant codeBase "jar:file:${catalina.base}/webapps/examples/WEB-INF/lib/scrape.jar!/-" {
//      permission java.net.SocketPermission "*.noaa.gov:80", "connect";
// };
// To grant permissions for web applications using packed WAR files, use the
// Tomcat specific WAR url scheme.
//
// The permissions granted to the entire web application
// grant codeBase "war:file:${catalina.base}/webapps/examples.war*/-" {
// };
//
// The permissions granted to a specific JAR
// grant codeBase "war:file:${catalina.base}/webapps/examples.war*/WEB-INF/lib/foo.jar" {
// };
.smarttomcat/ledger/conf/catalina.properties
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,148 @@
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements.  See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License.  You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# List of comma-separated packages that start with or equal this string
# will cause a security exception to be thrown when
# passed to checkPackageAccess unless the
# corresponding RuntimePermission ("accessClassInPackage."+package) has
# been granted.
package.access=sun.,org.apache.catalina.,org.apache.coyote.,org.apache.jasper.,org.apache.tomcat.
#
# List of comma-separated packages that start with or equal this string
# will cause a security exception to be thrown when
# passed to checkPackageDefinition unless the
# corresponding RuntimePermission ("defineClassInPackage."+package) has
# been granted.
#
# by default, no packages are restricted for definition, and none of
# the class loaders supplied with the JDK call checkPackageDefinition.
#
package.definition=sun.,java.,org.apache.catalina.,org.apache.coyote.,\
org.apache.jasper.,org.apache.naming.,org.apache.tomcat.
#
#
# List of comma-separated paths defining the contents of the "common"
# classloader. Prefixes should be used to define what is the repository type.
# Path may be relative to the CATALINA_HOME or CATALINA_BASE path or absolute.
# If left as blank,the JVM system loader will be used as Catalina's "common"
# loader.
# Examples:
#     "foo": Add this folder as a class repository
#     "foo/*.jar": Add all the JARs of the specified folder as class
#                  repositories
#     "foo/bar.jar": Add bar.jar as a class repository
#
# Note: Values are enclosed in double quotes ("...") in case either the
#       ${catalina.base} path or the ${catalina.home} path contains a comma.
#       Because double quotes are used for quoting, the double quote character
#       may not appear in a path.
common.loader="${catalina.base}/lib","${catalina.base}/lib/*.jar","${catalina.home}/lib","${catalina.home}/lib/*.jar"
#
# List of comma-separated paths defining the contents of the "server"
# classloader. Prefixes should be used to define what is the repository type.
# Path may be relative to the CATALINA_HOME or CATALINA_BASE path or absolute.
# If left as blank, the "common" loader will be used as Catalina's "server"
# loader.
# Examples:
#     "foo": Add this folder as a class repository
#     "foo/*.jar": Add all the JARs of the specified folder as class
#                  repositories
#     "foo/bar.jar": Add bar.jar as a class repository
#
# Note: Values may be enclosed in double quotes ("...") in case either the
#       ${catalina.base} path or the ${catalina.home} path contains a comma.
#       Because double quotes are used for quoting, the double quote character
#       may not appear in a path.
server.loader=
#
# List of comma-separated paths defining the contents of the "shared"
# classloader. Prefixes should be used to define what is the repository type.
# Path may be relative to the CATALINA_BASE path or absolute. If left as blank,
# the "common" loader will be used as Catalina's "shared" loader.
# Examples:
#     "foo": Add this folder as a class repository
#     "foo/*.jar": Add all the JARs of the specified folder as class
#                  repositories
#     "foo/bar.jar": Add bar.jar as a class repository
# Please note that for single jars, e.g. bar.jar, you need the URL form
# starting with file:.
#
# Note: Values may be enclosed in double quotes ("...") in case either the
#       ${catalina.base} path or the ${catalina.home} path contains a comma.
#       Because double quotes are used for quoting, the double quote character
#       may not appear in a path.
shared.loader=
# Default list of JAR files that should not be scanned using the JarScanner
# functionality. This is typically used to scan JARs for configuration
# information. JARs that do not contain such information may be excluded from
# the scan to speed up the scanning process. This is the default list. JARs on
# this list are excluded from all scans. The list must be a comma separated list
# of JAR file names.
# The list of JARs to skip may be over-ridden at a Context level for individual
# scan types by configuring a JarScanner with a nested JarScanFilter.
# The JARs listed below include:
# - Tomcat Bootstrap JARs
# - Tomcat API JARs
# - Catalina JARs
# - Jasper JARs
# - Tomcat JARs
# - Common non-Tomcat JARs
# - Test JARs (JUnit, Cobertura and dependencies)
tomcat.util.scan.StandardJarScanFilter.jarsToSkip=\
bootstrap.jar,commons-daemon.jar,tomcat-juli.jar,\
annotations-api.jar,el-api.jar,jsp-api.jar,servlet-api.jar,websocket-api.jar,\
jaspic-api.jar,\
catalina.jar,catalina-ant.jar,catalina-ha.jar,catalina-storeconfig.jar,\
catalina-tribes.jar,\
jasper.jar,jasper-el.jar,ecj-*.jar,\
tomcat-api.jar,tomcat-util.jar,tomcat-util-scan.jar,tomcat-coyote.jar,\
tomcat-dbcp.jar,tomcat-jni.jar,tomcat-websocket.jar,\
tomcat-i18n-en.jar,tomcat-i18n-es.jar,tomcat-i18n-fr.jar,tomcat-i18n-ja.jar,\
tomcat-juli-adapters.jar,catalina-jmx-remote.jar,catalina-ws.jar,\
tomcat-jdbc.jar,\
tools.jar,\
commons-beanutils*.jar,commons-codec*.jar,commons-collections*.jar,\
commons-dbcp*.jar,commons-digester*.jar,commons-fileupload*.jar,\
commons-httpclient*.jar,commons-io*.jar,commons-lang*.jar,commons-logging*.jar,\
commons-math*.jar,commons-pool*.jar,\
jstl.jar,taglibs-standard-spec-*.jar,\
geronimo-spec-jaxrpc*.jar,wsdl4j*.jar,\
ant.jar,ant-junit*.jar,aspectj*.jar,jmx.jar,h2*.jar,hibernate*.jar,httpclient*.jar,\
jmx-tools.jar,jta*.jar,log4j*.jar,mail*.jar,slf4j*.jar,\
xercesImpl.jar,xmlParserAPIs.jar,xml-apis.jar,\
junit.jar,junit-*.jar,hamcrest-*.jar,easymock-*.jar,cglib-*.jar,\
objenesis-*.jar,ant-launcher.jar,\
cobertura-*.jar,asm-*.jar,dom4j-*.jar,icu4j-*.jar,jaxen-*.jar,jdom-*.jar,\
jetty-*.jar,oro-*.jar,servlet-api-*.jar,tagsoup-*.jar,xmlParserAPIs-*.jar,\
xom-*.jar
# Default list of JAR files that should be scanned that overrides the default
# jarsToSkip list above. This is typically used to include a specific JAR that
# has been excluded by a broad file name pattern in the jarsToSkip list.
# The list of JARs to scan may be over-ridden at a Context level for individual
# scan types by configuring a JarScanner with a nested JarScanFilter.
tomcat.util.scan.StandardJarScanFilter.jarsToScan=\
log4j-web*.jar,log4j-taglib*.jar,log4javascript*.jar,slf4j-taglib*.jar
# String cache configuration.
tomcat.util.buf.StringCache.byte.enabled=true
#tomcat.util.buf.StringCache.char.enabled=true
#tomcat.util.buf.StringCache.trainThreshold=500000
#tomcat.util.buf.StringCache.cacheSize=5000
.smarttomcat/ledger/conf/context.xml
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,30 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
  Licensed to the Apache Software Foundation (ASF) under one or more
  contributor license agreements.  See the NOTICE file distributed with
  this work for additional information regarding copyright ownership.
  The ASF licenses this file to You under the Apache License, Version 2.0
  (the "License"); you may not use this file except in compliance with
  the License.  You may obtain a copy of the License at
      http://www.apache.org/licenses/LICENSE-2.0
  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
-->
<!-- The contents of this file will be loaded for each web application -->
<Context>
    <!-- Default set of monitored resources. If one of these changes, the    -->
    <!-- web application will be reloaded.                                   -->
    <WatchedResource>WEB-INF/web.xml</WatchedResource>
    <WatchedResource>${catalina.base}/conf/web.xml</WatchedResource>
    <!-- Uncomment this to disable session persistence across Tomcat restarts -->
    <!--
    <Manager pathname="" />
    -->
</Context>
.smarttomcat/ledger/conf/jaspic-providers.xml
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
  Licensed to the Apache Software Foundation (ASF) under one or more
  contributor license agreements.  See the NOTICE file distributed with
  this work for additional information regarding copyright ownership.
  The ASF licenses this file to You under the Apache License, Version 2.0
  (the "License"); you may not use this file except in compliance with
  the License.  You may obtain a copy of the License at
      http://www.apache.org/licenses/LICENSE-2.0
  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
-->
<jaspic-providers xmlns="http://tomcat.apache.org/xml"
                  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                  xsi:schemaLocation="http://tomcat.apache.org/xml jaspic-providers.xsd"
                  version="1.0">
  <!-- No JASPIC providers configured by default -->
</jaspic-providers>
.smarttomcat/ledger/conf/jaspic-providers.xsd
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,53 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
  Licensed to the Apache Software Foundation (ASF) under one or more
  contributor license agreements.  See the NOTICE file distributed with
  this work for additional information regarding copyright ownership.
  The ASF licenses this file to You under the Apache License, Version 2.0
  (the "License"); you may not use this file except in compliance with
  the License.  You may obtain a copy of the License at
      http://www.apache.org/licenses/LICENSE-2.0
  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
-->
<xs:schema xmlns="http://www.w3.org/2001/XMLSchema"
           targetNamespace="http://tomcat.apache.org/xml"
           xmlns:jaspic="http://tomcat.apache.org/xml"
           xmlns:xs="http://www.w3.org/2001/XMLSchema"
           elementFormDefault="qualified"
           attributeFormDefault="unqualified"
           version="1.0">
  <xs:element name="jaspic-providers">
    <xs:complexType>
      <xs:sequence>
        <xs:element name="provider" minOccurs="0" maxOccurs="unbounded">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="property" minOccurs="0" maxOccurs="unbounded">
                <xs:complexType>
                  <xs:attribute name="name" use="required" type="jaspic:propertyname" />
                  <xs:attribute name="value" use="required" type="xs:string" />
                </xs:complexType>
              </xs:element>
            </xs:sequence>
            <xs:attribute name="className" use="required" type="xs:string" />
            <xs:attribute name="layer" use="required" type="xs:string" />
            <xs:attribute name="appContext" use="required" type="xs:string" />
            <xs:attribute name="description" type="xs:string" />
          </xs:complexType>
        </xs:element>
      </xs:sequence>
      <xs:attribute name="version" type="xs:string" />
    </xs:complexType>
  </xs:element>
  <xs:simpleType name="propertyname">
    <xs:restriction base="xs:string">
      <xs:minLength value="1"/>
    </xs:restriction>
  </xs:simpleType>
</xs:schema>
.smarttomcat/ledger/conf/logging.properties
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,70 @@
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements.  See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License.  You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
handlers = 1catalina.org.apache.juli.AsyncFileHandler, 2localhost.org.apache.juli.AsyncFileHandler, 3manager.org.apache.juli.AsyncFileHandler, 4host-manager.org.apache.juli.AsyncFileHandler, java.util.logging.ConsoleHandler
.handlers = 1catalina.org.apache.juli.AsyncFileHandler, java.util.logging.ConsoleHandler
############################################################
# Handler specific properties.
# Describes specific configuration info for Handlers.
############################################################
1catalina.org.apache.juli.AsyncFileHandler.level = FINE
1catalina.org.apache.juli.AsyncFileHandler.directory = ${catalina.base}/logs
1catalina.org.apache.juli.AsyncFileHandler.prefix = catalina.
2localhost.org.apache.juli.AsyncFileHandler.level = FINE
2localhost.org.apache.juli.AsyncFileHandler.directory = ${catalina.base}/logs
2localhost.org.apache.juli.AsyncFileHandler.prefix = localhost.
3manager.org.apache.juli.AsyncFileHandler.level = FINE
3manager.org.apache.juli.AsyncFileHandler.directory = ${catalina.base}/logs
3manager.org.apache.juli.AsyncFileHandler.prefix = manager.
4host-manager.org.apache.juli.AsyncFileHandler.level = FINE
4host-manager.org.apache.juli.AsyncFileHandler.directory = ${catalina.base}/logs
4host-manager.org.apache.juli.AsyncFileHandler.prefix = host-manager.
java.util.logging.ConsoleHandler.level = FINE
java.util.logging.ConsoleHandler.formatter = org.apache.juli.OneLineFormatter
############################################################
# Facility specific properties.
# Provides extra control for each logger.
############################################################
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].level = INFO
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].handlers = 2localhost.org.apache.juli.AsyncFileHandler
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager].level = INFO
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager].handlers = 3manager.org.apache.juli.AsyncFileHandler
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/host-manager].level = INFO
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/host-manager].handlers = 4host-manager.org.apache.juli.AsyncFileHandler
# For example, set the org.apache.catalina.util.LifecycleBase logger to log
# each component that extends LifecycleBase changing state:
#org.apache.catalina.util.LifecycleBase.level = FINE
# To see debug messages in TldLocationsCache, uncomment the following line:
#org.apache.jasper.compiler.TldLocationsCache.level = FINE
# To see debug messages for HTTP/2 handling, uncomment the following line:
#org.apache.coyote.http2.level = FINE
# To see debug messages for WebSocket handling, uncomment the following line:
#org.apache.tomcat.websocket.level = FINE
.smarttomcat/ledger/conf/server.xml
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,169 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
  Licensed to the Apache Software Foundation (ASF) under one or more
  contributor license agreements.  See the NOTICE file distributed with
  this work for additional information regarding copyright ownership.
  The ASF licenses this file to You under the Apache License, Version 2.0
  (the "License"); you may not use this file except in compliance with
  the License.  You may obtain a copy of the License at
      http://www.apache.org/licenses/LICENSE-2.0
  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
-->
<!-- Note:  A "Server" is not itself a "Container", so you may not
     define subcomponents such as "Valves" at this level.
     Documentation at /docs/config/server.html
 -->
<Server port="8005" shutdown="SHUTDOWN">
  <Listener className="org.apache.catalina.startup.VersionLoggerListener" />
  <!-- Security listener. Documentation at /docs/config/listeners.html
  <Listener className="org.apache.catalina.security.SecurityListener" />
  -->
  <!--APR library loader. Documentation at /docs/apr.html -->
  <Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" />
  <!-- Prevent memory leaks due to use of particular java/javax APIs-->
  <Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener" />
  <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
  <Listener className="org.apache.catalina.core.ThreadLocalLeakPreventionListener" />
  <!-- Global JNDI resources
       Documentation at /docs/jndi-resources-howto.html
  -->
  <GlobalNamingResources>
    <!-- Editable user database that can also be used by
         UserDatabaseRealm to authenticate users
    -->
    <Resource name="UserDatabase" auth="Container"
              type="org.apache.catalina.UserDatabase"
              description="User database that can be updated and saved"
              factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
              pathname="conf/tomcat-users.xml" />
  </GlobalNamingResources>
  <!-- A "Service" is a collection of one or more "Connectors" that share
       a single "Container" Note:  A "Service" is not itself a "Container",
       so you may not define subcomponents such as "Valves" at this level.
       Documentation at /docs/config/service.html
   -->
  <Service name="Catalina">
    <!--The connectors can use a shared executor, you can define one or more named thread pools-->
    <!--
    <Executor name="tomcatThreadPool" namePrefix="catalina-exec-"
        maxThreads="150" minSpareThreads="4"/>
    -->
    <!-- A "Connector" represents an endpoint by which requests are received
         and responses are returned. Documentation at :
         Java HTTP Connector: /docs/config/http.html
         Java AJP  Connector: /docs/config/ajp.html
         APR (HTTP/AJP) Connector: /docs/apr.html
         Define a non-SSL/TLS HTTP/1.1 Connector on port 8080
    -->
    <Connector port="8080" protocol="HTTP/1.1"
               connectionTimeout="20000"
               redirectPort="8443" />
    <!-- A "Connector" using the shared thread pool-->
    <!--
    <Connector executor="tomcatThreadPool"
               port="8080" protocol="HTTP/1.1"
               connectionTimeout="20000"
               redirectPort="8443" />
    -->
    <!-- Define a SSL/TLS HTTP/1.1 Connector on port 8443
         This connector uses the NIO implementation. The default
         SSLImplementation will depend on the presence of the APR/native
         library and the useOpenSSL attribute of the
         AprLifecycleListener.
         Either JSSE or OpenSSL style configuration may be used regardless of
         the SSLImplementation selected. JSSE style configuration is used below.
    -->
    <!--
    <Connector port="8443" protocol="org.apache.coyote.http11.Http11NioProtocol"
               maxThreads="150" SSLEnabled="true">
        <SSLHostConfig>
            <Certificate certificateKeystoreFile="conf/localhost-rsa.jks"
                         type="RSA" />
        </SSLHostConfig>
    </Connector>
    -->
    <!-- Define a SSL/TLS HTTP/1.1 Connector on port 8443 with HTTP/2
         This connector uses the APR/native implementation which always uses
         OpenSSL for TLS.
         Either JSSE or OpenSSL style configuration may be used. OpenSSL style
         configuration is used below.
    -->
    <!--
    <Connector port="8443" protocol="org.apache.coyote.http11.Http11AprProtocol"
               maxThreads="150" SSLEnabled="true" >
        <UpgradeProtocol className="org.apache.coyote.http2.Http2Protocol" />
        <SSLHostConfig>
            <Certificate certificateKeyFile="conf/localhost-rsa-key.pem"
                         certificateFile="conf/localhost-rsa-cert.pem"
                         certificateChainFile="conf/localhost-rsa-chain.pem"
                         type="RSA" />
        </SSLHostConfig>
    </Connector>
    -->
    <!-- Define an AJP 1.3 Connector on port 8009 -->
    <!-- <Connector port="8009" protocol="AJP/1.3" redirectPort="8443" /> -->
    <!-- An Engine represents the entry point (within Catalina) that processes
         every request.  The Engine implementation for Tomcat stand alone
         analyzes the HTTP headers included with the request, and passes them
         on to the appropriate Host (virtual host).
         Documentation at /docs/config/engine.html -->
    <!-- You should set jvmRoute to support load-balancing via AJP ie :
    <Engine name="Catalina" defaultHost="localhost" jvmRoute="jvm1">
    -->
    <Engine name="Catalina" defaultHost="localhost">
      <!--For clustering, please take a look at documentation at:
          /docs/cluster-howto.html  (simple how to)
          /docs/config/cluster.html (reference documentation) -->
      <!--
      <Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"/>
      -->
      <!-- Use the LockOutRealm to prevent attempts to guess user passwords
           via a brute-force attack -->
      <Realm className="org.apache.catalina.realm.LockOutRealm">
        <!-- This Realm uses the UserDatabase configured in the global JNDI
             resources under the key "UserDatabase".  Any edits
             that are performed against this UserDatabase are immediately
             available for use by the Realm.  -->
        <Realm className="org.apache.catalina.realm.UserDatabaseRealm"
               resourceName="UserDatabase"/>
      </Realm>
      <Host name="localhost"  appBase="webapps"
            unpackWARs="true" autoDeploy="true">
        <!-- SingleSignOn valve, share authentication between web applications
             Documentation at: /docs/config/valve.html -->
        <!--
        <Valve className="org.apache.catalina.authenticator.SingleSignOn" />
        -->
        <!-- Access log processes all example.
             Documentation at: /docs/config/valve.html
             Note: The pattern used is equivalent to using pattern="common" -->
        <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
               prefix="localhost_access_log" suffix=".txt"
               pattern="%h %l %u %t &quot;%r&quot; %s %b" />
        <Context reloadable="true" docBase="C:\02product\supervision\images" path="/images"/>
        <Context reloadable="true" docBase="C:\02product\supervision\files" path="/files"/>
      </Host>
    </Engine>
  </Service>
</Server>
.smarttomcat/ledger/conf/tomcat-users.xml
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,44 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
  Licensed to the Apache Software Foundation (ASF) under one or more
  contributor license agreements.  See the NOTICE file distributed with
  this work for additional information regarding copyright ownership.
  The ASF licenses this file to You under the Apache License, Version 2.0
  (the "License"); you may not use this file except in compliance with
  the License.  You may obtain a copy of the License at
      http://www.apache.org/licenses/LICENSE-2.0
  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
-->
<tomcat-users xmlns="http://tomcat.apache.org/xml"
              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
              xsi:schemaLocation="http://tomcat.apache.org/xml tomcat-users.xsd"
              version="1.0">
<!--
  NOTE:  By default, no user is included in the "manager-gui" role required
  to operate the "/manager/html" web application.  If you wish to use this app,
  you must define such a user - the username and password are arbitrary. It is
  strongly recommended that you do NOT use one of the users in the commented out
  section below since they are intended for use with the examples web
  application.
-->
<!--
  NOTE:  The sample user and role entries below are intended for use with the
  examples web application. They are wrapped in a comment and thus are ignored
  when reading this file. If you wish to configure these users for use with the
  examples web application, do not forget to remove the <!.. ..> that surrounds
  them. You will also need to set the passwords to something appropriate.
-->
<!--
  <role rolename="tomcat"/>
  <role rolename="role1"/>
  <user username="tomcat" password="<must-be-changed>" roles="tomcat"/>
  <user username="both" password="<must-be-changed>" roles="tomcat,role1"/>
  <user username="role1" password="<must-be-changed>" roles="role1"/>
-->
</tomcat-users>
.smarttomcat/ledger/conf/tomcat-users.xsd
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,59 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
  Licensed to the Apache Software Foundation (ASF) under one or more
  contributor license agreements.  See the NOTICE file distributed with
  this work for additional information regarding copyright ownership.
  The ASF licenses this file to You under the Apache License, Version 2.0
  (the "License"); you may not use this file except in compliance with
  the License.  You may obtain a copy of the License at
      http://www.apache.org/licenses/LICENSE-2.0
  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
-->
<xs:schema xmlns="http://www.w3.org/2001/XMLSchema"
           targetNamespace="http://tomcat.apache.org/xml"
           xmlns:users="http://tomcat.apache.org/xml"
           xmlns:xs="http://www.w3.org/2001/XMLSchema"
           elementFormDefault="qualified"
           attributeFormDefault="unqualified"
           version="1.0">
  <xs:element name="tomcat-users">
    <xs:complexType>
      <xs:sequence>
        <xs:element name="role" minOccurs="0" maxOccurs="unbounded">
          <xs:complexType>
            <xs:attribute name="rolename" use="required" type="users:entityname" />
            <xs:attribute name="description" type="xs:string" />
          </xs:complexType>
        </xs:element>
        <xs:element name="group" minOccurs="0" maxOccurs="unbounded">
          <xs:complexType>
            <xs:attribute name="groupname" use="required" type="users:entityname" />
            <xs:attribute name="description" type="xs:string" />
            <xs:attribute name="roles" type="xs:string" />
          </xs:complexType>
        </xs:element>
        <xs:element name="user" minOccurs="0" maxOccurs="unbounded">
          <xs:complexType>
            <xs:attribute name="username" use="required" type="users:entityname" />
            <xs:attribute name="fullname" type="xs:string" />
            <xs:attribute name="password" type="xs:string" />
            <xs:attribute name="roles" type="xs:string" />
            <xs:attribute name="groups" type="xs:string" />
          </xs:complexType>
        </xs:element>
      </xs:sequence>
      <xs:attribute name="version" type="xs:string" />
    </xs:complexType>
  </xs:element>
  <xs:simpleType name="entityname">
    <xs:restriction base="xs:string">
      <xs:minLength value="1"/>
    </xs:restriction>
  </xs:simpleType>
</xs:schema>
.smarttomcat/ledger/conf/web.xml
¶Ô±ÈÐÂÎļþ
ÎļþÌ«´ó
src/main/kotlin/cn/flightfeather/supervision/SupervisionApplication.kt
@@ -15,7 +15,6 @@
@SpringBootApplication
@EnableScheduling
class SupervisionApplication(
    @Value("\${systemIsApp}") var systemIsApp: Boolean,
    @Value("\${mode}") var mode: String,
) {
@@ -30,13 +29,14 @@
    @Bean
    fun runner() = ApplicationRunner {
        if (systemIsApp) {
            webSocketServer.start()
        } else {
            wxTokenManager.run()
        }
        taskController.run()
        // 2023.8.20 åº”用于安卓app后台,后续应该合并于小程序后台
        if (mode == "proapp") {
            taskController.run()
            webSocketServer.start()
        }
        // åº”用于微信小程序后台
        else if (mode == "pro") {
            wxTokenManager.run()
        }
        println("mode: $mode")
    }
src/main/kotlin/cn/flightfeather/supervision/bgtask/TaskController.kt
@@ -25,8 +25,7 @@
    taskJinAnHourlyDustData: TaskJinAnHourlyDustData,
    taskAutoLedger:TaskAutoLedger,
    // æ ¹æ®app不同,切换不同的定时任务
    @Value("\${systemIsApp}")
    systemIsApp: Boolean,
    @Value("\${mode}") mode: String,
) {
    companion object {
@@ -45,10 +44,10 @@
        LOGGER.info("添加定时任务")
        timeTask.clear()
        //飞羽环境,获取voc数据、推送油烟数据
        if (systemIsApp) {
        if (mode == "proapp") {
            timeTask.add(fetchVOC)
            timeTask.add(pushFume)
        } else {
        } else if (mode == "pro") {
            //微信小程序(中小企业守法自助),台账复制、定时任务推送等
//        timeTask.add(ledgerCopy)
            timeTask.add(ledgerRemind)
src/main/kotlin/cn/flightfeather/supervision/common/creditcode/EnvCreditCode.kt
@@ -70,10 +70,10 @@
        // ç»˜åˆ¶æ”¯æŒæä¾›æ–¹
        val s = supply ?: ""
        graphics2D.font = Font("微软雅黑", Font.PLAIN, 30)
        graphics2D.font = Font("微软雅黑", Font.BOLD, 32)
        val w4 = graphics2D.fontMetrics.stringWidth(s)
        val x4 = (bgWidth - w4) / 2
        graphics2D.drawString(s, x4, 753 + graphics2D.fontMetrics.ascent)
        graphics2D.drawString(s, x4, 901 + graphics2D.fontMetrics.ascent)
        val a = ImageIO.getImageWritersByFormatName("png")
        while (a.hasNext()) {
src/main/kotlin/cn/flightfeather/supervision/common/exception/BizException.kt
ÎļþÃû´Ó src/main/kotlin/cn/flightfeather/supervision/common/exception/ResponseErrorException.kt ÐÞ¸Ä
@@ -3,7 +3,7 @@
/**
 * å…è®¸æŽ¥å£è¿”回的业务层面的错误
 */
class ResponseErrorException : Exception {
class BizException : Exception {
    constructor():super()
    constructor(message: String) : super(message)
    constructor(message: String, cause: Throwable) : super(message, cause)
src/main/kotlin/cn/flightfeather/supervision/common/net/FumeHttpService.kt
@@ -13,7 +13,7 @@
 */
object FumeHttpService {
    private val httpMethod = HttpMethod("xhhb-yy.senzly.top", 80)
    private val httpMethod = HttpMethod("xhhb.xh.sh.cn", 443, isHttps = true)
    class PostData private constructor(
        val apiKey: String,
src/main/kotlin/cn/flightfeather/supervision/common/risk/RiskAnalysis.kt
@@ -114,9 +114,11 @@
            else -> {
                // é«˜é£Žé™©
                if (
                // FIXME: 2024/9/29 ä¸´æ—¶è°ƒæ•´é«˜é£Žé™©è§„则
                    (r1.rate2 == .0 || r2.rate2 == .0)
                    ||
                    (r1.rate2 < 0.6 || r2.rate2 < 0.6) && !r3
//                    (r1.rate2 == .0 && r2.rate2 == .0) && !r3
                ) {
                    return 2
                }
@@ -125,6 +127,7 @@
                    r1.rate2 >= .6
                    && r2.rate2 >= .6
                    && r3
                    // FIXME: 2024/9/29 ä¸´æ—¶è°ƒæ•´é«˜é£Žé™©è§„则
                    && r4.finished1
                ) {
                    return 0
src/main/kotlin/cn/flightfeather/supervision/common/risk/RiskAuthenticated.kt
@@ -62,7 +62,7 @@
        val baseInfo = dbMapper.baseInfoMapper.selectByPrimaryKey(user.guid)
        result.baseInfo = baseInfo
        val company = dbMapper.companyMapper.selectByPrimaryKey(baseInfo?.ciGuid)
        val createTime = if (baseInfo.biCreateTime != null) {
        val createTime = if (baseInfo?.biCreateTime != null) {
            LocalDateTime.ofInstant(baseInfo.biCreateTime.toInstant(), ZoneId.systemDefault())
                .withDayOfMonth(1).withHour(0).withMinute(0).withSecond(0).plusSeconds(1)
        } else {
src/main/kotlin/cn/flightfeather/supervision/common/wx/ByteGroup.java
ÎļþÒÑɾ³ý
src/main/kotlin/cn/flightfeather/supervision/common/wx/MessageManager.kt
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,44 @@
package cn.flightfeather.supervision.common.wx
import org.springframework.stereotype.Component
import java.time.LocalDateTime
import java.time.format.DateTimeFormatter
/**
 * å¾®ä¿¡æ¶ˆæ¯æŽ¨é€
 * @date 2024/9/10
 * @author feiyu02
 */
@Component
class MessageManager(private val templateManager: TemplateManager) {
    private val formatter = DateTimeFormatter.ofPattern("YYYY-MM-DD HH:mm:ss")
    /********************环保日程提醒*****************************/
    // å°è´¦
    fun sendLedger(openId: String, time: LocalDateTime, leftDay: Int) {
        templateManager.sendMsg(0, openId, listOf(
            "台账上传", time.format(formatter), leftDay.toString(),
            "请重点关注现场自巡查部分"))
    }
    // è‡ªè¯„
    fun sendAssessment(openId: String, time: LocalDateTime, leftDay: Int) {
        templateManager.sendMsg(0, openId, listOf(
            "自测智评", time.format(formatter), leftDay.toString(),
            ""))
    }
    // æ‰¿è¯º
    fun sendCommitment(openId: String, time: LocalDateTime, leftDay: Int) {
        templateManager.sendMsg(0, openId, listOf(
            "守法承诺", time.format(formatter), leftDay.toString(),
            ""))
    }
    /********************用户关键操作提醒*****************************/
    // ä¿®æ”¹å¯†ç 
    // è®¤è¯
    /********************发送通知同步推送*****************************/
}
src/main/kotlin/cn/flightfeather/supervision/common/wx/PKCS7Encoder.java
ÎļþÒÑɾ³ý
src/main/kotlin/cn/flightfeather/supervision/common/wx/TemplateManager.kt
@@ -25,6 +25,7 @@
        private const val PROGRAM_STATE_3 = "formal"//正式版
        const val TEMPLATE_1 = "6JQFOJ12yBvKfRg_duSdwKiH5_J3LpICmz3Li-L1Cr8"//倒计时到期提醒,台账
        // åˆ é™¤
        const val TEMPLATE_2 = "zPNMzF5WsshniJyl83DD-lDZtNvx7JyqLbKgqDl0qvU"//代办事项提醒,自测智评
        const val TEMPLATE_3 = "zPNMzF5WsshniJyl83DD-u7MyVoUozOc2kjK8dGZcSA"//代办事项提醒,重要通知,如会议、政府公告(暂定)
        const val TEMPLATE_4 = "dqREi7vAd03OOirTgBGcm5aCihZJKBjVpiA8Kbu4B8w"//备忘事项提醒,未认证提醒或其他
src/main/kotlin/cn/flightfeather/supervision/common/wx/WXBizMsgCrypt.java
ÎļþÒÑɾ³ý
src/main/kotlin/cn/flightfeather/supervision/common/wx/WxConfig.kt
@@ -1,7 +1,7 @@
package cn.flightfeather.supervision.common.wx
object WxConfig {
    /**小程序申请了两个公众号,选择其中一种*************************************************************/
    /**小程序申请了两个公众号,选择其中一种。2024.9.4:小白咨询已弃用*************************************************************/
    //小白咨询
//    const val APP_ID="wxffd1438dd373fcf6"
//    const val SECRET = "83c5ecfb9b2ae882b577a5c04ff7c3bd"
src/main/kotlin/cn/flightfeather/supervision/common/wx/XMLParse.java
ÎļþÒÑɾ³ý
src/main/kotlin/cn/flightfeather/supervision/domain/entity/SceneType.java
@@ -15,6 +15,12 @@
    private String scTag;
    /**
     * æŽ’序编号
     */
    @Column(name = "SC_Index")
    private Integer scIndex;
    /**
     * @return SC_Id
     */
    public Integer getScId() {
@@ -55,4 +61,22 @@
    public void setScTag(String scTag) {
        this.scTag = scTag == null ? null : scTag.trim();
    }
    /**
     * èŽ·å–æŽ’åºç¼–å·
     *
     * @return SC_Index - æŽ’序编号
     */
    public Integer getScIndex() {
        return scIndex;
    }
    /**
     * è®¾ç½®æŽ’序编号
     *
     * @param scIndex æŽ’序编号
     */
    public void setScIndex(Integer scIndex) {
        this.scIndex = scIndex;
    }
}
src/main/kotlin/cn/flightfeather/supervision/domain/enumeration/SceneType.kt
@@ -28,11 +28,11 @@
        }
        fun toPairList() = listOf(
            Pair(Restaurant.value.toString(), Restaurant.des),
            Pair(Construction.value.toString(), Construction.des),
            Pair(Wharf.value.toString(), Wharf.des),
            Pair(StorageYard.value.toString(), StorageYard.des),
            Pair(MixingPlant.value.toString(), MixingPlant.des),
            Pair(Restaurant.value.toString(), Restaurant.des),
            Pair(Industrial.value.toString(), Industrial.des),
            Pair(VehicleRepair.value.toString(), VehicleRepair.des),
            Pair(Laboratory.value.toString(), Laboratory.des),
src/main/kotlin/cn/flightfeather/supervision/domain/repository/PracticalOperationRep.kt
@@ -1,6 +1,6 @@
package cn.flightfeather.supervision.domain.repository
import cn.flightfeather.supervision.common.exception.ResponseErrorException
import cn.flightfeather.supervision.common.exception.BizException
import cn.flightfeather.supervision.domain.entity.PracticalOperation
import cn.flightfeather.supervision.domain.entity.PracticalOperationRecord
import cn.flightfeather.supervision.domain.mapper.PracticalOperationMapper
@@ -45,14 +45,14 @@
     * @param stateId äº‹åŠ¡çš„ç»“æžœçŠ¶æ€id(根据每个事务的定义决定)
     */
    fun executeOperation(userId: String, operationId: Int, stateId: String): PracticalOperationRecord? {
        val userInfo = userInfoRep.getUser(userId) ?: throw ResponseErrorException("用户不存在,无法操作")
        val userInfo = userInfoRep.getUser(userId) ?: throw BizException("用户不存在,无法操作")
        val operation =
            practicalOperationMapper.selectByPrimaryKey(operationId) ?: throw ResponseErrorException("该实操事务不存在")
            practicalOperationMapper.selectByPrimaryKey(operationId) ?: throw BizException("该实操事务不存在")
        val stateRangeIds = operation.poStateRangeId.split(";")
        val stateRangeNames = operation.poStateRange.split(";")
        if (stateRangeIds.size != stateRangeNames.size) throw ResponseErrorException("事务执行结果的可选状态配置错误!")
        if (stateRangeIds.size != stateRangeNames.size) throw BizException("事务执行结果的可选状态配置错误!")
        val index = stateRangeIds.indexOf(stateId)
        if (index == -1) throw ResponseErrorException("事务执行的状态无效")
        if (index == -1) throw BizException("事务执行的状态无效")
        val record = PracticalOperationRecord().apply {
            poId = operationId
            poTitle = operation.poTitle
src/main/kotlin/cn/flightfeather/supervision/lightshare/service/Impl/AuthServiceImpl.kt
@@ -47,7 +47,7 @@
            bInfo.ciGuid = company.ciGuid
            bInfo.ciName = company.ciName
            baseInfoMapper.updateByPrimaryKeySelective(bInfo)
        } else {
        } else if (bInfo == null) {
            val userInfo = userinfoMapper.selectByPrimaryKey(wxUser.uiGuid)
            val baseInfo = BaseInfo().apply {
                biGuid = wxUser.uiGuid
src/main/kotlin/cn/flightfeather/supervision/lightshare/service/Impl/ConfigServiceImpl.kt
@@ -1,6 +1,6 @@
package cn.flightfeather.supervision.lightshare.service.Impl
import cn.flightfeather.supervision.common.exception.ResponseErrorException
import cn.flightfeather.supervision.common.exception.BizException
import cn.flightfeather.supervision.domain.entity.CommitmentTemplate
import cn.flightfeather.supervision.domain.entity.SceneType
import cn.flightfeather.supervision.domain.entity.UserConfig
@@ -27,6 +27,7 @@
        val result = if (config == null || config.ucSceneRange == null) {
            val types = sceneTypeMapper.selectByExample(Example(SceneType::class.java).apply {
                createCriteria().andIsNull("scTag")
                orderBy("scIndex")
            })
            if (types.isNotEmpty()) {
                types.map { Pair(it?.scId.toString(), it?.scName) }
@@ -37,6 +38,7 @@
            config.ucSceneRange?.split(";")?.let {sr ->
                sceneTypeMapper.selectByExample(Example(SceneType::class.java).apply {
                    createCriteria().andIn("scId", sr)
                    orderBy("scIndex")
                }).map { Pair(it?.scId.toString(), it?.scName) }
            }
        }
@@ -56,7 +58,7 @@
                .andIn("ctSceneTypeId", condition.sceneTypes)
        }).let {
            if (it.isEmpty()) {
                throw ResponseErrorException("无相关承诺书模板")
                throw BizException("无相关承诺书模板")
            }
            return it[0]
        }
src/main/kotlin/cn/flightfeather/supervision/lightshare/service/Impl/LedgerServiceImpl.kt
@@ -231,13 +231,14 @@
                        .andEqualTo("mfFiletype", it.lrEasubmitkind)
                    orderBy("mfSavetime").desc()
                }
            )
            )?.takeIf { it.isNotEmpty() }?.get(0)
            val type = ledgerSubTypeMapper.selectByExample(
                Example(LedgerSubType::class.java).apply {
                    createCriteria().andEqualTo("lsSubtypeid", it.lsSubtypeid)
                }
            )
            result.add(LedgerVo().apply {
                id = it.lrGuid
                this.ledgerSubTypeId = it.lsSubtypeid
                ledgerName = it.lsSubtypename
@@ -248,10 +249,10 @@
                updateDate = it.lrSubmitdate
                updateType = it.lrUpdatetype
                fileType = it.lrEasubmitkind.toInt()
                path1 = media?.get(0)?.mfPath1
                remark1 = media?.get(0)?.mfDescription1
                path2 = media?.get(0)?.mfPath2
                remark2 = media?.get(0)?.mfDescription2
                path1 = media?.mfPath1
                remark1 = media?.mfDescription1
                path2 = media?.mfPath2
                remark2 = media?.mfDescription2
                this.sceneType = if (it.lrExtension1 == null) SceneType.Restaurant.value else it.lrExtension1.toInt()
            })
        }
src/main/kotlin/cn/flightfeather/supervision/lightshare/service/Impl/NotificationServiceImpl.kt
@@ -32,6 +32,7 @@
    val noticeReadStateMapper: NoticeReadStateMapper,
    val noticeTemplateMapper: NoticeTemplateMapper,
    val userinfoMapper: UserinfoMapper,
    val baseInfoMapper: BaseInfoMapper,
    val meetingParticipantRepository: MeetingParticipantRepository,
    val templateManager: TemplateManager,
) : NotificationService {
@@ -65,9 +66,10 @@
        response: HttpServletResponse,
    ): List<NotificationVo> {
        val userInfo = userinfoMapper.selectByPrimaryKey(userId) ?: return emptyList()
        val baseInfo = baseInfoMapper.selectByPrimaryKey(userId)
        val userTypeId = userInfo.usertypeid
        val district = userInfo.extension1
        var districtCode = DistrictType.getCode(district)
        var districtCode = DistrictType.getCode(district) ?: baseInfo?.biDistrictCode
        var sceneTypeId = userInfo.extension2
        when (userTypeId?.toInt()) {
@@ -162,9 +164,10 @@
    override fun getUnReadNoticeNum(userId: String): Int {
        val userInfo = userinfoMapper.selectByPrimaryKey(userId) ?: return 0
        val baseInfo = baseInfoMapper.selectByPrimaryKey(userId)
        val userTypeId = userInfo.usertypeid
        val district = userInfo.extension1
        var districtCode = DistrictType.getCode(district)
        var districtCode = DistrictType.getCode(district) ?: baseInfo?.biDistrictCode
        var sceneTypeId = userInfo.extension2
        when (userTypeId?.toInt()) {
src/main/kotlin/cn/flightfeather/supervision/lightshare/service/Impl/ScheduleServiceImpl.kt
@@ -1,5 +1,6 @@
package cn.flightfeather.supervision.lightshare.service.Impl
import cn.flightfeather.supervision.common.exception.BizException
import cn.flightfeather.supervision.domain.entity.ScheduleSignRecord
import cn.flightfeather.supervision.domain.mapper.BaseInfoMapper
import cn.flightfeather.supervision.domain.mapper.EnvironmentalScheduleMapper
@@ -41,6 +42,7 @@
                res.addAll(ScheduleVo.toScheduleVoList(it, option))
            }
        }
        res.sortBy { it.time }
        res.forEach {
            val millisecond = it.time?.time!! + 1000 * 60 * 60 * 24
@@ -55,6 +57,32 @@
        return BaseResponse(true, data = res)
    }
//    override fun getYearSchedules(option: ScheduleOption): List<ScheduleVo> {
//        option.userId ?: throw BizException("用户id不能为空")
//        val userInfo = userinfoMapper.selectByPrimaryKey(option.userId) ?: throw BizException("用户不存在")
//        val baseInfo = baseInfoMapper.selectByPrimaryKey(option.userId)
//        val config = userConfigRep.getUserConfig(userInfo, baseInfo)
//        val res = mutableListOf<ScheduleVo>()
//        scheduleRepository.getSchedules(userInfo, config, option).forEach{
//            it?.let {
//
//                res.addAll(ScheduleVo.toScheduleVoList(it, option))
//            }
//        }
//
//        // æŸ¥è¯¢ç­¾æ”¶è®°å½•
//        res.forEach {
//            if (!it.needSign) return@forEach
//            val millisecond = it.time?.time!! + 1000 * 60 * 60 * 24
//            val eTime = Date(millisecond)
//            val r = scheduleSignRecordRepository.getRecord(option.userId, it.id, it.time, eTime)
//            if (r.isNotEmpty()) {
//                it.recordId = r[0]?.srId
//                it.finished = r[0]?.srSignStatus ?: false
//            }
//        }
//    }
    override fun completeSchedule(userId: String, id: Int): BaseResponse<ScheduleSignRecord> {
        val now = LocalDate.now().atTime(0,0,0)
        val sTime = Date.from(now.atZone(ZoneId.systemDefault()).toInstant())
src/main/kotlin/cn/flightfeather/supervision/lightshare/service/ScheduleService.kt
@@ -9,6 +9,8 @@
    fun getSchedules(option: ScheduleOption): BaseResponse<List<ScheduleVo>>
//    fun getYearSchedules(option: ScheduleOption): List<ScheduleVo>
    fun completeSchedule(userId: String, id: Int): BaseResponse<ScheduleSignRecord>
    fun revokeSchedule(userId: String, recordId: Int): BaseResponse<Boolean>
src/main/kotlin/cn/flightfeather/supervision/lightshare/vo/ScheduleVo.kt
@@ -77,16 +77,17 @@
        }
        fun toScheduleVoList(schedule: EnvironmentalSchedule, option: ScheduleOption): List<ScheduleVo> {
            val sT = LocalDateTime.ofInstant(option.startTime.toInstant(), ZoneId.systemDefault()).toLocalDate()
            var sT = LocalDateTime.ofInstant(option.startTime.toInstant(), ZoneId.systemDefault()).toLocalDate()
            val eT = LocalDateTime.ofInstant(option.endTime.toInstant(), ZoneId.systemDefault()).toLocalDate()
                .plusDays(1)
            val dateList = mutableListOf<Date>()
            when (schedule.scPeriodType.toInt()) {
                // æ¯æ—¥
                0 -> {
                    do {
                        dateList.add(Date.from(sT.atTime(0, 0, 0).atZone(ZoneId.systemDefault()).toInstant()))
                        sT.plusDays(1)
                    } while (sT.isAfter(eT))
                        sT = sT.plusDays(1)
                    } while (sT.isBefore(eT))
                }
                // æ¯å‘¨
                1 -> {
@@ -95,30 +96,30 @@
                        if (weekList.contains(sT.dayOfWeek.value.toString())) {
                            dateList.add(Date.from(sT.atTime(0, 0, 0).atZone(ZoneId.systemDefault()).toInstant()))
                        }
                        sT.plusDays(1)
                    } while (sT.isAfter(eT))
                        sT = sT.plusDays(1)
                    } while (sT.isBefore(eT))
                }
                // æ¯æœˆ
                2 -> {
                    val dayList = schedule.scEveryMonth.split(";")
//                    do {
//                        if (dayList.contains(sT.dayOfMonth.toString())) {
//                            dateList.add(Date.from(sT.atTime(0, 0, 0).atZone(ZoneId.systemDefault()).toInstant()))
//                        }
//                        sT.plusDays(1)
//                    } while (sT.isAfter(eT))
                    var diffDays: Int? = null
                    var mostRecentSchedule: Date? = null
                    dayList.forEach {
                        val diff = abs(it.toInt() - sT.dayOfMonth)
                        if (diffDays == null || diff < diffDays!!) {
                            mostRecentSchedule = Date.from(sT.withDayOfMonth(it.toInt()).atTime(0, 0, 0).atZone(ZoneId
                                .systemDefault())
                                .toInstant())
                            diffDays = diff
                    do {
                        if (dayList.contains(sT.dayOfMonth.toString())) {
                            dateList.add(Date.from(sT.atTime(0, 0, 0).atZone(ZoneId.systemDefault()).toInstant()))
                        }
                    }
                    mostRecentSchedule?.let { dateList.add(it) }
                        sT = sT.plusDays(1)
                    } while (sT.isBefore(eT))
//                    var diffDays: Int? = null
//                    var mostRecentSchedule: Date? = null
//                    dayList.forEach {
//                        val diff = abs(it.toInt() - sT.dayOfMonth)
//                        if (diffDays == null || diff < diffDays!!) {
//                            mostRecentSchedule = Date.from(sT.withDayOfMonth(it.toInt()).atTime(0, 0, 0).atZone(ZoneId
//                                .systemDefault())
//                                .toInstant())
//                            diffDays = diff
//                        }
//                    }
//                    mostRecentSchedule?.let { dateList.add(it) }
                }
                // æ¯å¹´
                3 -> {
@@ -128,8 +129,8 @@
                        if (dayList.contains(timeFormat)) {
                            dateList.add(Date.from(sT.atTime(0, 0, 0).atZone(ZoneId.systemDefault()).toInstant()))
                        }
                        sT.plusDays(1)
                    } while (sT.isAfter(eT))
                        sT = sT.plusDays(1)
                    } while (sT.isBefore(eT))
                }
                // å›ºå®šæ—¥æœŸ
                4 -> {
src/main/kotlin/cn/flightfeather/supervision/lightshare/web/BaseResPack.kt
@@ -1,6 +1,6 @@
package cn.flightfeather.supervision.lightshare.web
import cn.flightfeather.supervision.common.exception.ResponseErrorException
import cn.flightfeather.supervision.common.exception.BizException
import cn.flightfeather.supervision.lightshare.vo.BaseResponse
import cn.flightfeather.supervision.lightshare.vo.DataHead
@@ -20,7 +20,7 @@
        } else {
            BaseResponse(true, data = res)
        }
    } catch (e: ResponseErrorException) {
    } catch (e: BizException) {
        BaseResponse(false, message = e.message ?: "")
    }
}
src/main/kotlin/cn/flightfeather/supervision/lightshare/web/ScheduleController.kt
@@ -18,6 +18,12 @@
        @ApiParam("日程查询参数") @RequestBody option: ScheduleOption,
    ) = scheduleService.getSchedules(option)
//    @ApiOperation(value = "获取用户整个年度的日程")
//    @PostMapping("/get/year")
//    fun getYearSchedules(
//        @ApiParam("日程查询参数") @RequestBody option: ScheduleOption,
//    ) = resPack { scheduleService.getYearSchedules(option) }
    @ApiOperation(value = "用户完成某项日程")
    @PostMapping("/complete")
    fun completeSchedule(
src/main/resources/application-proapp.yml
@@ -9,5 +9,5 @@
filePath: D:/02product/05ledger/files/
#针对微信小程序和安卓app两种前端,目前有部分区别,true:表示app,false:表示小程序
systemIsApp: true
#systemIsApp: true
mode: proapp
src/main/resources/generator/generatorConfig.xml
@@ -151,10 +151,10 @@
<!--               enableCountByExample="false"-->
<!--               enableUpdateByExample="false" enableDeleteByExample="false"-->
<!--               enableSelectByExample="false" selectByExampleQueryId="false" />-->
<!--        <table tableName="ea_t_scene_type" domainObjectName="SceneType"-->
<!--               enableCountByExample="false"-->
<!--               enableUpdateByExample="false" enableDeleteByExample="false"-->
<!--               enableSelectByExample="false" selectByExampleQueryId="false" />-->
        <table tableName="ea_t_scene_type" domainObjectName="SceneType"
               enableCountByExample="false"
               enableUpdateByExample="false" enableDeleteByExample="false"
               enableSelectByExample="false" selectByExampleQueryId="false" />
<!--        <table tableName="ja_t_dust_site_map" domainObjectName="DustSiteMap"-->
<!--               enableCountByExample="false"-->
<!--               enableUpdateByExample="false" enableDeleteByExample="false"-->
@@ -167,21 +167,21 @@
<!--               enableCountByExample="false"-->
<!--               enableUpdateByExample="false" enableDeleteByExample="false"-->
<!--               enableSelectByExample="false" selectByExampleQueryId="false" />-->
        <table tableName="sm_t_province" domainObjectName="Province"
               enableCountByExample="false"
               enableUpdateByExample="false" enableDeleteByExample="false"
               enableSelectByExample="false" selectByExampleQueryId="false" />
        <table tableName="sm_t_city" domainObjectName="City"
               enableCountByExample="false"
               enableUpdateByExample="false" enableDeleteByExample="false"
               enableSelectByExample="false" selectByExampleQueryId="false" />
        <table tableName="sm_t_district" domainObjectName="District"
               enableCountByExample="false"
               enableUpdateByExample="false" enableDeleteByExample="false"
               enableSelectByExample="false" selectByExampleQueryId="false" />
        <table tableName="sm_t_town" domainObjectName="Town"
               enableCountByExample="false"
               enableUpdateByExample="false" enableDeleteByExample="false"
               enableSelectByExample="false" selectByExampleQueryId="false" />
<!--        <table tableName="sm_t_province" domainObjectName="Province"-->
<!--               enableCountByExample="false"-->
<!--               enableUpdateByExample="false" enableDeleteByExample="false"-->
<!--               enableSelectByExample="false" selectByExampleQueryId="false" />-->
<!--        <table tableName="sm_t_city" domainObjectName="City"-->
<!--               enableCountByExample="false"-->
<!--               enableUpdateByExample="false" enableDeleteByExample="false"-->
<!--               enableSelectByExample="false" selectByExampleQueryId="false" />-->
<!--        <table tableName="sm_t_district" domainObjectName="District"-->
<!--               enableCountByExample="false"-->
<!--               enableUpdateByExample="false" enableDeleteByExample="false"-->
<!--               enableSelectByExample="false" selectByExampleQueryId="false" />-->
<!--        <table tableName="sm_t_town" domainObjectName="Town"-->
<!--               enableCountByExample="false"-->
<!--               enableUpdateByExample="false" enableDeleteByExample="false"-->
<!--               enableSelectByExample="false" selectByExampleQueryId="false" />-->
    </context>
</generatorConfiguration>
src/main/resources/mapper/SceneTypeMapper.xml
@@ -1,18 +1,19 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="cn.flightfeather.supervision.domain.mapper.SceneTypeMapper" >
  <resultMap id="BaseResultMap" type="cn.flightfeather.supervision.domain.entity.SceneType" >
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="cn.flightfeather.supervision.domain.mapper.SceneTypeMapper">
  <resultMap id="BaseResultMap" type="cn.flightfeather.supervision.domain.entity.SceneType">
    <!--
      WARNING - @mbg.generated
    -->
    <id column="SC_Id" property="scId" jdbcType="INTEGER" />
    <result column="SC_Name" property="scName" jdbcType="VARCHAR" />
    <result column="SC_Tag" property="scTag" jdbcType="VARCHAR" />
    <id column="SC_Id" jdbcType="INTEGER" property="scId" />
    <result column="SC_Name" jdbcType="VARCHAR" property="scName" />
    <result column="SC_Tag" jdbcType="VARCHAR" property="scTag" />
    <result column="SC_Index" jdbcType="INTEGER" property="scIndex" />
  </resultMap>
  <sql id="Base_Column_List" >
  <sql id="Base_Column_List">
    <!--
      WARNING - @mbg.generated
    -->
    SC_Id, SC_Name, SC_Tag
    SC_Id, SC_Name, SC_Tag, SC_Index
  </sql>
</mapper>
src/test/kotlin/cn/flightfeather/supervision/bgtask/PushFumeTest.kt
@@ -32,9 +32,8 @@
    @Test
    fun doTask() {
        val end = LocalDateTime.of(2024, 4, 25, 12, 40)
        var startTime = LocalDateTime.of(2024, 1, 3, 0, 0, 0)
        var endTime = LocalDateTime.of(2024, 1, 3, 23, 59, 59)
        val startTime = LocalDateTime.of(2024, 9, 24, 0, 0, 0)
        val endTime = LocalDateTime.of(2024, 9, 24, 23, 59, 59)
        pushFume.doTask(TaskPushFume.ZQ, mutableListOf(), startTime, endTime)
    }
src/test/kotlin/cn/flightfeather/supervision/common/creditcode/EnvCreditCodeTest.kt
@@ -10,6 +10,7 @@
import org.springframework.test.context.junit.jupiter.SpringExtension
import org.springframework.test.context.junit4.SpringRunner
import java.io.File
import java.io.FileOutputStream
@RunWith(SpringRunner::class)
@ExtendWith(SpringExtension::class)
@@ -23,7 +24,7 @@
    fun createQRCode() {
        val info = baseInfoMapper.selectByPrimaryKey("1Qo1GHlHK3tHbcFK")
        val supply = "${info.biCityName}${info.biDistrictName}生态环境局"
        val file = File("C:/default.png")
        EnvCreditCode.createImage(info.biGuid, info.biName, info.ciName, supply, file.outputStream())
        val file = FileOutputStream("target/default.png")
        EnvCreditCode.createImage(info.biGuid, info.biName, info.ciName, supply, file)
    }
}
src/test/kotlin/cn/flightfeather/supervision/common/risk/RiskAnalysisTest.kt
@@ -64,8 +64,8 @@
    @Test
    fun riskAnalysis() {
        var startDate = LocalDate.of(2024, 6, 1)
        val endDate = LocalDate.of(2024, 6, 1)
        var startDate = LocalDate.of(2024, 8, 1)
        val endDate = LocalDate.of(2024, 9, 1)
        while (!startDate.isAfter(endDate)) {
            val year = startDate.year
            val month = startDate.monthValue
@@ -100,7 +100,7 @@
//                add(DataSource(DataSource.Config("长宁区", "2", year, month, 19), dbMapper))
            }
            list.forEach {
                val riskAnalysis = RiskAnalysis(it, toDatabase = true, toFile = true)
                val riskAnalysis = RiskAnalysis(it, toDatabase = true, toFile = false)
                riskAnalysis.execute()
            }
            startDate = startDate.plusMonths(1)