分析器错误消息:“xxx.xxx.xxx“不扩展 类“System.Web.UI.Page”,因此此处不允许。

本文解决了CityMap应用中出现的服务器错误问题,包括分析器错误及资源未找到的问题,并给出了具体的修改方法。

"/citymap"应用程序中的服务器错误。
分析器错误
说明:在分析向此请求提供服务所需资源时出错。请检查下列特定分析错误
详细信息并适当地修改源文件。
分析器错误消息:“CityMap.page.picupload"不扩展
类"System.Web.UI.Page”,因此此处不允许。
源错误:
行1:<%@Page Language=“C#”
AutoEventWireup=“true”
CodeBehind=“picupload . aspx.cs”
Inherits=“CityMap.page.picupload””%

行2:<! DOCTYPE html>
行3:
源文件:/citymap/page/picupload.aspx行:1
版本信息:Microsoft .NETFramework版本:4.0.30319;ASP.NET版
本:4.7.3650.0
在这里插入图片描述
我的项目结构
在这里插入图片描述

错误原因:在修改了.aspx文件的文件名后,在aspx文件的头部的CodeBehind和Inherits的值没有自动更改,需要手动更改。
即需要将
在这里插入图片描述
在这里插入图片描述

在这里插入图片描述
修改为一样。就行了。

我一开始是在Inherits,将文件夹的名字加上去了,但是运行错误。把page删掉就行了,不知什么原因。
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

"/"应用程序中的服务器错误。
无法找到资源。
说明:HTTP 404。您正在查找的资源(或者它的一个依赖项)可能已被移除,
或其名称已更改,或暂时不可用。请检查以下URL并确保其拼写正确。
请求的URL:/page/picupload.aspx
版本信息:Microsoft .NET Framework版本:4.0.30319;ASP.NET版
本:4.7.3650.0

在这里插入图片描述
这种情况就是window.location.href =
后面的地址没写正确。

"D:\Program Files\Java\jdk1.8.0_152\bin\java.exe" -XX:TieredStopAtLevel=1 -noverify -Dspring.output.ansi.enabled=always -Dcom.sun.management.jmxremote -Dspring.jmx.enabled=true -Dspring.liveBeansView.mbeanDomain -Dspring.application.admin.enabled=true "-Dmanagement.endpoints.jmx.exposure.include=*" "-javaagent:D:\202508software\IDEA\IntelliJ IDEA 2025.2\lib\idea_rt.jar=52723" -Dfile.encoding=UTF-8 -classpath "D:\Program Files\Java\jdk1.8.0_152\jre\lib\charsets.jar;D:\Program Files\Java\jdk1.8.0_152\jre\lib\deploy.jar;D:\Program Files\Java\jdk1.8.0_152\jre\lib\ext\access-bridge-64.jar;D:\Program Files\Java\jdk1.8.0_152\jre\lib\ext\cldrdata.jar;D:\Program Files\Java\jdk1.8.0_152\jre\lib\ext\dnsns.jar;D:\Program Files\Java\jdk1.8.0_152\jre\lib\ext\jaccess.jar;D:\Program Files\Java\jdk1.8.0_152\jre\lib\ext\jfxrt.jar;D:\Program Files\Java\jdk1.8.0_152\jre\lib\ext\localedata.jar;D:\Program Files\Java\jdk1.8.0_152\jre\lib\ext\nashorn.jar;D:\Program Files\Java\jdk1.8.0_152\jre\lib\ext\sunec.jar;D:\Program Files\Java\jdk1.8.0_152\jre\lib\ext\sunjce_provider.jar;D:\Program Files\Java\jdk1.8.0_152\jre\lib\ext\sunmscapi.jar;D:\Program Files\Java\jdk1.8.0_152\jre\lib\ext\sunpkcs11.jar;D:\Program Files\Java\jdk1.8.0_152\jre\lib\ext\zipfs.jar;D:\Program Files\Java\jdk1.8.0_152\jre\lib\javaws.jar;D:\Program Files\Java\jdk1.8.0_152\jre\lib\jce.jar;D:\Program Files\Java\jdk1.8.0_152\jre\lib\jfr.jar;D:\Program Files\Java\jdk1.8.0_152\jre\lib\jfxswt.jar;D:\Program Files\Java\jdk1.8.0_152\jre\lib\jsse.jar;D:\Program Files\Java\jdk1.8.0_152\jre\lib\management-agent.jar;D:\Program Files\Java\jdk1.8.0_152\jre\lib\plugin.jar;D:\Program Files\Java\jdk1.8.0_152\jre\lib\resources.jar;D:\Program Files\Java\jdk1.8.0_152\jre\lib\rt.jar;D:\projects1\sdatrp-web\target\classes;D:\Users\86138\.m2\repository\org\springframework\boot\spring-boot-devtools\2.2.6.RELEASE\spring-boot-devtools-2.2.6.RELEASE.jar;D:\Users\86138\.m2\repository\org\springframework\boot\spring-boot\2.2.6.RELEASE\spring-boot-2.2.6.RELEASE.jar;D:\Users\86138\.m2\repository\org\springframework\boot\spring-boot-autoconfigure\2.2.6.RELEASE\spring-boot-autoconfigure-2.2.6.RELEASE.jar;D:\Users\86138\.m2\repository\mysql\mysql-connector-java\8.0.19\mysql-connector-java-8.0.19.jar;D:\Users\86138\.m2\repository\org\springframework\spring-context-support\5.2.5.RELEASE\spring-context-support-5.2.5.RELEASE.jar;D:\Users\86138\.m2\repository\org\springframework\spring-beans\5.2.5.RELEASE\spring-beans-5.2.5.RELEASE.jar;D:\Users\86138\.m2\repository\org\springframework\spring-context\5.2.5.RELEASE\spring-context-5.2.5.RELEASE.jar;D:\Users\86138\.m2\repository\org\springframework\spring-expression\5.2.5.RELEASE\spring-expression-5.2.5.RELEASE.jar;D:\Users\86138\.m2\repository\org\springframework\spring-core\5.2.5.RELEASE\spring-core-5.2.5.RELEASE.jar;D:\Users\86138\.m2\repository\org\springframework\spring-jcl\5.2.5.RELEASE\spring-jcl-5.2.5.RELEASE.jar;D:\Users\86138\.m2\repository\org\springframework\spring-web\5.2.5.RELEASE\spring-web-5.2.5.RELEASE.jar;D:\Users\86138\.m2\repository\org\springframework\boot\spring-boot-starter-security\2.2.6.RELEASE\spring-boot-starter-security-2.2.6.RELEASE.jar;D:\Users\86138\.m2\repository\org\springframework\boot\spring-boot-starter\2.2.6.RELEASE\spring-boot-starter-2.2.6.RELEASE.jar;D:\Users\86138\.m2\repository\org\springframework\boot\spring-boot-starter-logging\2.2.6.RELEASE\spring-boot-starter-logging-2.2.6.RELEASE.jar;D:\Users\86138\.m2\repository\ch\qos\logback\logback-classic\1.2.3\logback-classic-1.2.3.jar;D:\Users\86138\.m2\repository\ch\qos\logback\logback-core\1.2.3\logback-core-1.2.3.jar;D:\Users\86138\.m2\repository\org\apache\logging\log4j\log4j-to-slf4j\2.12.1\log4j-to-slf4j-2.12.1.jar;D:\Users\86138\.m2\repository\org\apache\logging\log4j\log4j-api\2.12.1\log4j-api-2.12.1.jar;D:\Users\86138\.m2\repository\org\slf4j\jul-to-slf4j\1.7.30\jul-to-slf4j-1.7.30.jar;D:\Users\86138\.m2\repository\jakarta\annotation\jakarta.annotation-api\1.3.5\jakarta.annotation-api-1.3.5.jar;D:\Users\86138\.m2\repository\org\springframework\spring-aop\5.2.5.RELEASE\spring-aop-5.2.5.RELEASE.jar;D:\Users\86138\.m2\repository\org\springframework\security\spring-security-config\5.2.2.RELEASE\spring-security-config-5.2.2.RELEASE.jar;D:\Users\86138\.m2\repository\org\springframework\security\spring-security-core\5.2.2.RELEASE\spring-security-core-5.2.2.RELEASE.jar;D:\Users\86138\.m2\repository\org\springframework\security\spring-security-web\5.2.2.RELEASE\spring-security-web-5.2.2.RELEASE.jar;D:\Users\86138\.m2\repository\org\springframework\boot\spring-boot-starter-validation\2.2.6.RELEASE\spring-boot-starter-validation-2.2.6.RELEASE.jar;D:\Users\86138\.m2\repository\jakarta\validation\jakarta.validation-api\2.0.2\jakarta.validation-api-2.0.2.jar;D:\Users\86138\.m2\repository\org\apache\tomcat\embed\tomcat-embed-el\9.0.33\tomcat-embed-el-9.0.33.jar;D:\Users\86138\.m2\repository\org\hibernate\validator\hibernate-validator\6.0.18.Final\hibernate-validator-6.0.18.Final.jar;D:\Users\86138\.m2\repository\org\jboss\logging\jboss-logging\3.4.1.Final\jboss-logging-3.4.1.Final.jar;D:\Users\86138\.m2\repository\com\fasterxml\classmate\1.5.1\classmate-1.5.1.jar;D:\Users\86138\.m2\repository\org\apache\commons\commons-lang3\3.9\commons-lang3-3.9.jar;D:\Users\86138\.m2\repository\com\fasterxml\jackson\core\jackson-databind\2.10.3\jackson-databind-2.10.3.jar;D:\Users\86138\.m2\repository\com\fasterxml\jackson\core\jackson-annotations\2.10.3\jackson-annotations-2.10.3.jar;D:\Users\86138\.m2\repository\com\fasterxml\jackson\core\jackson-core\2.10.3\jackson-core-2.10.3.jar;D:\Users\86138\.m2\repository\org\yaml\snakeyaml\1.25\snakeyaml-1.25.jar;D:\Users\86138\.m2\repository\javax\xml\bind\jaxb-api\2.3.1\jaxb-api-2.3.1.jar;D:\Users\86138\.m2\repository\javax\activation\javax.activation-api\1.2.0\javax.activation-api-1.2.0.jar;D:\Users\86138\.m2\repository\org\springframework\boot\spring-boot-starter-data-redis\2.2.6.RELEASE\spring-boot-starter-data-redis-2.2.6.RELEASE.jar;D:\Users\86138\.m2\repository\org\springframework\data\spring-data-redis\2.2.6.RELEASE\spring-data-redis-2.2.6.RELEASE.jar;D:\Users\86138\.m2\repository\org\springframework\data\spring-data-keyvalue\2.2.6.RELEASE\spring-data-keyvalue-2.2.6.RELEASE.jar;D:\Users\86138\.m2\repository\org\springframework\data\spring-data-commons\2.2.6.RELEASE\spring-data-commons-2.2.6.RELEASE.jar;D:\Users\86138\.m2\repository\org\springframework\spring-tx\5.2.5.RELEASE\spring-tx-5.2.5.RELEASE.jar;D:\Users\86138\.m2\repository\org\springframework\spring-oxm\5.2.5.RELEASE\spring-oxm-5.2.5.RELEASE.jar;D:\Users\86138\.m2\repository\io\lettuce\lettuce-core\5.2.2.RELEASE\lettuce-core-5.2.2.RELEASE.jar;D:\Users\86138\.m2\repository\io\netty\netty-common\4.1.48.Final\netty-common-4.1.48.Final.jar;D:\Users\86138\.m2\repository\io\netty\netty-handler\4.1.48.Final\netty-handler-4.1.48.Final.jar;D:\Users\86138\.m2\repository\io\netty\netty-resolver\4.1.48.Final\netty-resolver-4.1.48.Final.jar;D:\Users\86138\.m2\repository\io\netty\netty-buffer\4.1.48.Final\netty-buffer-4.1.48.Final.jar;D:\Users\86138\.m2\repository\io\netty\netty-codec\4.1.48.Final\netty-codec-4.1.48.Final.jar;D:\Users\86138\.m2\repository\io\netty\netty-transport\4.1.48.Final\netty-transport-4.1.48.Final.jar;D:\Users\86138\.m2\repository\io\projectreactor\reactor-core\3.3.4.RELEASE\reactor-core-3.3.4.RELEASE.jar;D:\Users\86138\.m2\repository\org\reactivestreams\reactive-streams\1.0.3\reactive-streams-1.0.3.jar;D:\Users\86138\.m2\repository\org\apache\commons\commons-pool2\2.7.0\commons-pool2-2.7.0.jar;D:\Users\86138\.m2\repository\javax\servlet\javax.servlet-api\4.0.1\javax.servlet-api-4.0.1.jar;D:\Users\86138\.m2\repository\org\springframework\boot\spring-boot-starter-web\2.2.6.RELEASE\spring-boot-starter-web-2.2.6.RELEASE.jar;D:\Users\86138\.m2\repository\org\springframework\boot\spring-boot-starter-json\2.2.6.RELEASE\spring-boot-starter-json-2.2.6.RELEASE.jar;D:\Users\86138\.m2\repository\com\fasterxml\jackson\datatype\jackson-datatype-jdk8\2.10.3\jackson-datatype-jdk8-2.10.3.jar;D:\Users\86138\.m2\repository\com\fasterxml\jackson\datatype\jackson-datatype-jsr310\2.10.3\jackson-datatype-jsr310-2.10.3.jar;D:\Users\86138\.m2\repository\com\fasterxml\jackson\module\jackson-module-parameter-names\2.10.3\jackson-module-parameter-names-2.10.3.jar;D:\Users\86138\.m2\repository\org\springframework\boot\spring-boot-starter-tomcat\2.2.6.RELEASE\spring-boot-starter-tomcat-2.2.6.RELEASE.jar;D:\Users\86138\.m2\repository\org\apache\tomcat\embed\tomcat-embed-core\9.0.33\tomcat-embed-core-9.0.33.jar;D:\Users\86138\.m2\repository\org\apache\tomcat\embed\tomcat-embed-websocket\9.0.33\tomcat-embed-websocket-9.0.33.jar;D:\Users\86138\.m2\repository\org\springframework\spring-webmvc\5.2.5.RELEASE\spring-webmvc-5.2.5.RELEASE.jar;D:\Users\86138\.m2\repository\org\springframework\boot\spring-boot-starter-aop\2.2.6.RELEASE\spring-boot-starter-aop-2.2.6.RELEASE.jar;D:\Users\86138\.m2\repository\org\aspectj\aspectjweaver\1.9.5\aspectjweaver-1.9.5.jar;D:\Users\86138\.m2\repository\com\alibaba\druid-spring-boot-starter\1.2.11\druid-spring-boot-starter-1.2.11.jar;D:\Users\86138\.m2\repository\com\alibaba\druid\1.2.11\druid-1.2.11.jar;D:\Users\86138\.m2\repository\org\slf4j\slf4j-api\1.7.30\slf4j-api-1.7.30.jar;D:\Users\86138\.m2\repository\eu\bitwalker\UserAgentUtils\1.21\UserAgentUtils-1.21.jar;D:\Users\86138\.m2\repository\com\baomidou\mybatis-plus-boot-starter\3.4.1\mybatis-plus-boot-starter-3.4.1.jar;D:\Users\86138\.m2\repository\com\baomidou\mybatis-plus\3.4.1\mybatis-plus-3.4.1.jar;D:\Users\86138\.m2\repository\com\baomidou\mybatis-plus-extension\3.4.1\mybatis-plus-extension-3.4.1.jar;D:\Users\86138\.m2\repository\com\baomidou\mybatis-plus-core\3.4.1\mybatis-plus-core-3.4.1.jar;D:\Users\86138\.m2\repository\com\baomidou\mybatis-plus-annotation\3.4.1\mybatis-plus-annotation-3.4.1.jar;D:\Users\86138\.m2\repository\org\springframework\boot\spring-boot-starter-jdbc\2.2.6.RELEASE\spring-boot-starter-jdbc-2.2.6.RELEASE.jar;D:\Users\86138\.m2\repository\com\zaxxer\HikariCP\3.4.2\HikariCP-3.4.2.jar;D:\Users\86138\.m2\repository\org\springframework\spring-jdbc\5.2.5.RELEASE\spring-jdbc-5.2.5.RELEASE.jar;D:\Users\86138\.m2\repository\com\github\pagehelper\pagehelper-spring-boot-starter\1.4.3\pagehelper-spring-boot-starter-1.4.3.jar;D:\Users\86138\.m2\repository\org\mybatis\spring\boot\mybatis-spring-boot-starter\2.2.2\mybatis-spring-boot-starter-2.2.2.jar;D:\Users\86138\.m2\repository\org\mybatis\spring\boot\mybatis-spring-boot-autoconfigure\2.2.2\mybatis-spring-boot-autoconfigure-2.2.2.jar;D:\Users\86138\.m2\repository\org\mybatis\mybatis\3.5.9\mybatis-3.5.9.jar;D:\Users\86138\.m2\repository\org\mybatis\mybatis-spring\2.0.7\mybatis-spring-2.0.7.jar;D:\Users\86138\.m2\repository\com\github\pagehelper\pagehelper-spring-boot-autoconfigure\1.4.3\pagehelper-spring-boot-autoconfigure-1.4.3.jar;D:\Users\86138\.m2\repository\com\github\pagehelper\pagehelper\5.3.1\pagehelper-5.3.1.jar;D:\Users\86138\.m2\repository\com\github\jsqlparser\jsqlparser\4.2\jsqlparser-4.2.jar;D:\Users\86138\.m2\repository\com\github\oshi\oshi-core\6.2.2\oshi-core-6.2.2.jar;D:\Users\86138\.m2\repository\net\java\dev\jna\jna\4.5.2\jna-4.5.2.jar;D:\Users\86138\.m2\repository\net\java\dev\jna\jna-platform\4.5.2\jna-platform-4.5.2.jar;D:\Users\86138\.m2\repository\com\github\xiaoymin\knife4j-spring-boot-starter\2.0.7\knife4j-spring-boot-starter-2.0.7.jar;D:\Users\86138\.m2\repository\com\github\xiaoymin\knife4j-spring-boot-autoconfigure\2.0.7\knife4j-spring-boot-autoconfigure-2.0.7.jar;D:\Users\86138\.m2\repository\com\github\xiaoymin\knife4j-spring\2.0.7\knife4j-spring-2.0.7.jar;D:\Users\86138\.m2\repository\com\github\xiaoymin\knife4j-annotations\2.0.7\knife4j-annotations-2.0.7.jar;D:\Users\86138\.m2\repository\com\github\xiaoymin\knife4j-core\2.0.7\knife4j-core-2.0.7.jar;D:\Users\86138\.m2\repository\org\javassist\javassist\3.25.0-GA\javassist-3.25.0-GA.jar;D:\Users\86138\.m2\repository\io\swagger\swagger-models\1.5.22\swagger-models-1.5.22.jar;D:\Users\86138\.m2\repository\io\swagger\swagger-annotations\1.5.22\swagger-annotations-1.5.22.jar;D:\Users\86138\.m2\repository\io\springfox\springfox-swagger2\2.10.5\springfox-swagger2-2.10.5.jar;D:\Users\86138\.m2\repository\io\springfox\springfox-spi\2.10.5\springfox-spi-2.10.5.jar;D:\Users\86138\.m2\repository\io\springfox\springfox-core\2.10.5\springfox-core-2.10.5.jar;D:\Users\86138\.m2\repository\net\bytebuddy\byte-buddy\1.10.8\byte-buddy-1.10.8.jar;D:\Users\86138\.m2\repository\io\springfox\springfox-schema\2.10.5\springfox-schema-2.10.5.jar;D:\Users\86138\.m2\repository\io\springfox\springfox-swagger-common\2.10.5\springfox-swagger-common-2.10.5.jar;D:\Users\86138\.m2\repository\io\springfox\springfox-spring-web\2.10.5\springfox-spring-web-2.10.5.jar;D:\Users\86138\.m2\repository\io\github\classgraph\classgraph\4.1.7\classgraph-4.1.7.jar;D:\Users\86138\.m2\repository\org\springframework\plugin\spring-plugin-core\2.0.0.RELEASE\spring-plugin-core-2.0.0.RELEASE.jar;D:\Users\86138\.m2\repository\org\springframework\plugin\spring-plugin-metadata\2.0.0.RELEASE\spring-plugin-metadata-2.0.0.RELEASE.jar;D:\Users\86138\.m2\repository\org\mapstruct\mapstruct\1.3.1.Final\mapstruct-1.3.1.Final.jar;D:\Users\86138\.m2\repository\io\springfox\springfox-bean-validators\2.10.5\springfox-bean-validators-2.10.5.jar;D:\Users\86138\.m2\repository\io\springfox\springfox-spring-webmvc\2.10.5\springfox-spring-webmvc-2.10.5.jar;D:\Users\86138\.m2\repository\com\github\xiaoymin\knife4j-spring-ui\2.0.7\knife4j-spring-ui-2.0.7.jar;D:\Users\86138\.m2\repository\org\projectlombok\lombok\1.18.12\lombok-1.18.12.jar;D:\Users\86138\.m2\repository\commons-io\commons-io\2.11.0\commons-io-2.11.0.jar;D:\Users\86138\.m2\repository\commons-fileupload\commons-fileupload\1.4\commons-fileupload-1.4.jar;D:\Users\86138\.m2\repository\org\apache\poi\poi-ooxml\4.1.2\poi-ooxml-4.1.2.jar;D:\Users\86138\.m2\repository\org\apache\poi\poi\4.1.2\poi-4.1.2.jar;D:\Users\86138\.m2\repository\commons-codec\commons-codec\1.13\commons-codec-1.13.jar;D:\Users\86138\.m2\repository\org\apache\commons\commons-collections4\4.4\commons-collections4-4.4.jar;D:\Users\86138\.m2\repository\org\apache\commons\commons-math3\3.6.1\commons-math3-3.6.1.jar;D:\Users\86138\.m2\repository\com\zaxxer\SparseBitSet\1.2\SparseBitSet-1.2.jar;D:\Users\86138\.m2\repository\org\apache\poi\poi-ooxml-schemas\4.1.2\poi-ooxml-schemas-4.1.2.jar;D:\Users\86138\.m2\repository\org\apache\xmlbeans\xmlbeans\3.1.0\xmlbeans-3.1.0.jar;D:\Users\86138\.m2\repository\org\apache\commons\commons-compress\1.19\commons-compress-1.19.jar;D:\Users\86138\.m2\repository\com\github\virtuald\curvesapi\1.06\curvesapi-1.06.jar;D:\Users\86138\.m2\repository\commons-collections\commons-collections\3.2.2\commons-collections-3.2.2.jar;D:\Users\86138\.m2\repository\com\alibaba\fastjson2\fastjson2\2.0.14\fastjson2-2.0.14.jar;D:\Users\86138\.m2\repository\io\jsonwebtoken\jjwt\0.9.1\jjwt-0.9.1.jar;D:\Users\86138\.m2\repository\com\aliyun\oss\aliyun-sdk-oss\3.15.1\aliyun-sdk-oss-3.15.1.jar;D:\Users\86138\.m2\repository\org\apache\httpcomponents\httpclient\4.5.12\httpclient-4.5.12.jar;D:\Users\86138\.m2\repository\org\apache\httpcomponents\httpcore\4.4.13\httpcore-4.4.13.jar;D:\Users\86138\.m2\repository\org\jdom\jdom2\2.0.6\jdom2-2.0.6.jar;D:\Users\86138\.m2\repository\org\codehaus\jettison\jettison\1.1\jettison-1.1.jar;D:\Users\86138\.m2\repository\stax\stax-api\1.0.1\stax-api-1.0.1.jar;D:\Users\86138\.m2\repository\com\aliyun\aliyun-java-sdk-core\4.5.10\aliyun-java-sdk-core-4.5.10.jar;D:\Users\86138\.m2\repository\com\google\code\gson\gson\2.8.6\gson-2.8.6.jar;D:\Users\86138\.m2\repository\commons-logging\commons-logging\1.2\commons-logging-1.2.jar;D:\Users\86138\.m2\repository\org\jacoco\org.jacoco.agent\0.8.5\org.jacoco.agent-0.8.5-runtime.jar;D:\Users\86138\.m2\repository\org\ini4j\ini4j\0.5.4\ini4j-0.5.4.jar;D:\Users\86138\.m2\repository\io\opentracing\opentracing-api\0.33.0\opentracing-api-0.33.0.jar;D:\Users\86138\.m2\repository\io\opentracing\opentracing-util\0.33.0\opentracing-util-0.33.0.jar;D:\Users\86138\.m2\repository\io\opentracing\opentracing-noop\0.33.0\opentracing-noop-0.33.0.jar;D:\Users\86138\.m2\repository\com\aliyun\aliyun-java-sdk-ram\3.1.0\aliyun-java-sdk-ram-3.1.0.jar;D:\Users\86138\.m2\repository\com\aliyun\aliyun-java-sdk-kms\2.11.0\aliyun-java-sdk-kms-2.11.0.jar;D:\Users\86138\.m2\repository\com\belerweb\pinyin4j\2.5.1\pinyin4j-2.5.1.jar" com.zilber.boot.ZilberbootApplication . ____ _ __ _ _ /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \ ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \ \\/ ___)| |_)| | | | | || (_| | ) ) ) ) ' |____| .__|_| |_|_| |_\__, | / / / / =========|_|==============|___/=/_/_/_/ :: Spring Boot :: (v2.2.6.RELEASE) 15:50:03.738 [restartedMain] INFO c.z.b.ZilberbootApplication - [logStarting,55] - Starting ZilberbootApplication on LAPTOP-UVJ0K95H with PID 14748 (D:\projects1\sdatrp-web\target\classes started by 86138 in D:\projects1\sdatrp-web) 15:50:03.741 [restartedMain] DEBUG c.z.b.ZilberbootApplication - [logStarting,56] - Running with Spring Boot v2.2.6.RELEASE, Spring v5.2.5.RELEASE 15:50:03.741 [restartedMain] INFO c.z.b.ZilberbootApplication - [logStartupProfileInfo,655] - The following profiles are active: druid 15:50:06.100 [restartedMain] INFO o.a.c.h.Http11NioProtocol - [log,173] - Initializing ProtocolHandler ["http-nio-8080"] 15:50:06.100 [restartedMain] INFO o.a.c.c.StandardService - [log,173] - Starting service [Tomcat] 15:50:06.100 [restartedMain] INFO o.a.c.c.StandardEngine - [log,173] - Starting Servlet engine: [Apache Tomcat/9.0.33] 15:50:06.209 [restartedMain] INFO o.a.c.c.C.[.[.[/] - [log,173] - Initializing Spring embedded WebApplicationContext 15:50:06.508 [restartedMain] DEBUG c.z.b.f.s.f.JwtAuthenticationTokenFilter - [init,242] - Filter 'jwtAuthenticationTokenFilter' configured for use 15:50:07.512 [restartedMain] WARN c.b.m.c.m.TableInfoHelper - [initTableFields,327] - Can not find table primary key in Class: "com.zilber.boot.system.pojo.SysUser". _ _ |_ _ _|_. ___ _ | _ | | |\/|_)(_| | |_\ |_)||_|_\ / | 3.4.1 15:50:09.237 [restartedMain] INFO s.d.s.w.WebMvcPropertySourcedRequestMappingHandlerMapping - [initHandlerMethods,69] - Mapped URL path [/v2/api-docs] onto method [springfox.documentation.swagger2.web.Swagger2ControllerWebMvc#getDocumentation(String, HttpServletRequest)] 15:50:10.123 [restartedMain] INFO s.d.s.w.p.DocumentationPluginsBootstrapper - [start,93] - Documentation plugins bootstrapped 15:50:10.125 [restartedMain] INFO s.d.s.w.p.DocumentationPluginsBootstrapper - [bootstrapDocumentationPlugins,79] - Found 1 custom documentation plugin(s) 15:50:10.170 [restartedMain] INFO s.d.s.w.s.ApiListingReferenceScanner - [scan,44] - Scanning for api listing references 15:50:10.478 [restartedMain] INFO s.d.s.w.r.o.CachingOperationNameGenerator - [startingWith,41] - Generating unique operation named: getByIdUsingGET_1 15:50:10.528 [restartedMain] INFO s.d.s.w.r.o.CachingOperationNameGenerator - [startingWith,41] - Generating unique operation named: composeUsingPOST_1 15:50:10.531 [restartedMain] INFO s.d.s.w.r.o.CachingOperationNameGenerator - [startingWith,41] - Generating unique operation named: sliceUploadsUsingPOST_1 15:50:10.545 [restartedMain] INFO s.d.s.w.r.o.CachingOperationNameGenerator - [startingWith,41] - Generating unique operation named: uploadFileUsingPOST_1 15:50:10.562 [restartedMain] INFO s.d.s.w.r.o.CachingOperationNameGenerator - [startingWith,41] - Generating unique operation named: addUsingPOST_1 15:50:10.597 [restartedMain] INFO s.d.s.w.r.o.CachingOperationNameGenerator - [startingWith,41] - Generating unique operation named: getByIdUsingGET_2 15:50:10.606 [restartedMain] INFO s.d.s.w.r.o.CachingOperationNameGenerator - [startingWith,41] - Generating unique operation named: pageUsingGET_1 15:50:10.608 [restartedMain] INFO s.d.s.w.r.o.CachingOperationNameGenerator - [startingWith,41] - Generating unique operation named: updateUsingPUT_1 15:50:10.616 [restartedMain] INFO s.d.s.w.r.o.CachingOperationNameGenerator - [startingWith,41] - Generating unique operation named: getMessageByIdUsingGET_1 15:50:10.619 [restartedMain] INFO s.d.s.w.r.o.CachingOperationNameGenerator - [startingWith,41] - Generating unique operation named: getPageUsingGET_1 15:50:10.625 [restartedMain] INFO s.d.s.w.r.o.CachingOperationNameGenerator - [startingWith,41] - Generating unique operation named: getPageUsingGET_2 15:50:10.634 [restartedMain] INFO s.d.s.w.r.o.CachingOperationNameGenerator - [startingWith,41] - Generating unique operation named: getMessageByIdUsingGET_2 15:50:10.638 [restartedMain] INFO s.d.s.w.r.o.CachingOperationNameGenerator - [startingWith,41] - Generating unique operation named: getPageUsingGET_3 15:50:10.639 [restartedMain] INFO s.d.s.w.r.o.CachingOperationNameGenerator - [startingWith,41] - Generating unique operation named: updatePatriarchMessageUsingPUT_1 15:50:10.642 [restartedMain] INFO s.d.s.w.r.o.CachingOperationNameGenerator - [startingWith,41] - Generating unique operation named: addPatriarchMessageUsingPOST_1 15:50:10.645 [restartedMain] INFO s.d.s.w.r.o.CachingOperationNameGenerator - [startingWith,41] - Generating unique operation named: getMessageByIdUsingGET_3 15:50:10.647 [restartedMain] INFO s.d.s.w.r.o.CachingOperationNameGenerator - [startingWith,41] - Generating unique operation named: getPageUsingGET_4 15:50:10.649 [restartedMain] INFO s.d.s.w.r.o.CachingOperationNameGenerator - [startingWith,41] - Generating unique operation named: updatePatriarchMessageUsingPUT_2 15:50:10.655 [restartedMain] INFO s.d.s.w.r.o.CachingOperationNameGenerator - [startingWith,41] - Generating unique operation named: getMessageByIdUsingGET_4 15:50:10.658 [restartedMain] INFO s.d.s.w.r.o.CachingOperationNameGenerator - [startingWith,41] - Generating unique operation named: getPageUsingGET_5 15:50:10.663 [restartedMain] INFO s.d.s.w.r.o.CachingOperationNameGenerator - [startingWith,41] - Generating unique operation named: addUsingPOST_2 15:50:10.664 [restartedMain] INFO s.d.s.w.r.o.CachingOperationNameGenerator - [startingWith,41] - Generating unique operation named: deleteUsingDELETE_1 15:50:10.674 [restartedMain] INFO s.d.s.w.r.o.CachingOperationNameGenerator - [startingWith,41] - Generating unique operation named: updateUsingPUT_2 15:50:10.680 [restartedMain] INFO s.d.s.w.r.o.CachingOperationNameGenerator - [startingWith,41] - Generating unique operation named: getMessageByIdUsingGET_5 15:50:10.683 [restartedMain] INFO s.d.s.w.r.o.CachingOperationNameGenerator - [startingWith,41] - Generating unique operation named: getPageUsingGET_6 15:50:10.691 [restartedMain] INFO s.d.s.w.r.o.CachingOperationNameGenerator - [startingWith,41] - Generating unique operation named: getPageUsingGET_7 15:50:10.709 [restartedMain] INFO s.d.s.w.r.o.CachingOperationNameGenerator - [startingWith,41] - Generating unique operation named: pageUsingGET_2 15:50:10.712 [restartedMain] INFO s.d.s.w.r.o.CachingOperationNameGenerator - [startingWith,41] - Generating unique operation named: addUsingPOST_3 15:50:10.721 [restartedMain] INFO s.d.s.w.r.o.CachingOperationNameGenerator - [startingWith,41] - Generating unique operation named: listUsingGET_1 15:50:10.728 [restartedMain] INFO s.d.s.w.r.o.CachingOperationNameGenerator - [startingWith,41] - Generating unique operation named: addUsingPOST_4 15:50:10.728 [restartedMain] INFO s.d.s.w.r.o.CachingOperationNameGenerator - [startingWith,41] - Generating unique operation named: deleteUsingDELETE_2 15:50:10.729 [restartedMain] INFO s.d.s.w.r.o.CachingOperationNameGenerator - [startingWith,41] - Generating unique operation named: getByIdUsingGET_3 15:50:10.733 [restartedMain] INFO s.d.s.w.r.o.CachingOperationNameGenerator - [startingWith,41] - Generating unique operation named: listUsingGET_2 15:50:10.734 [restartedMain] INFO s.d.s.w.r.o.CachingOperationNameGenerator - [startingWith,41] - Generating unique operation named: updateUsingPUT_3 15:50:10.736 [restartedMain] INFO s.d.s.w.r.o.CachingOperationNameGenerator - [startingWith,41] - Generating unique operation named: getInfoUsingGET_1 15:50:10.744 [restartedMain] INFO s.d.s.w.r.o.CachingOperationNameGenerator - [startingWith,41] - Generating unique operation named: listUsingGET_3 15:50:10.744 [restartedMain] WARN s.d.s.w.r.p.ParameterDataTypeReader - [apply,102] - Trying to infer dataType java.lang.Long[] 15:50:10.745 [restartedMain] INFO s.d.s.w.r.o.CachingOperationNameGenerator - [startingWith,41] - Generating unique operation named: removeUsingDELETE_1 15:50:10.751 [restartedMain] INFO s.d.s.w.r.o.CachingOperationNameGenerator - [startingWith,41] - Generating unique operation named: addUsingPOST_5 15:50:10.752 [restartedMain] INFO s.d.s.w.r.o.CachingOperationNameGenerator - [startingWith,41] - Generating unique operation named: editUsingPUT_1 15:50:10.752 [restartedMain] INFO s.d.s.w.r.o.CachingOperationNameGenerator - [startingWith,41] - Generating unique operation named: getInfoUsingGET_2 15:50:10.757 [restartedMain] INFO s.d.s.w.r.o.CachingOperationNameGenerator - [startingWith,41] - Generating unique operation named: listUsingGET_4 15:50:10.757 [restartedMain] INFO s.d.s.w.r.o.CachingOperationNameGenerator - [startingWith,41] - Generating unique operation named: removeUsingDELETE_2 15:50:10.760 [restartedMain] INFO s.d.s.w.r.o.CachingOperationNameGenerator - [startingWith,41] - Generating unique operation named: cleanUsingDELETE_1 15:50:10.763 [restartedMain] INFO s.d.s.w.r.o.CachingOperationNameGenerator - [startingWith,41] - Generating unique operation named: listUsingGET_5 15:50:10.764 [restartedMain] WARN s.d.s.w.r.p.ParameterDataTypeReader - [apply,102] - Trying to infer dataType java.lang.Long[] 15:50:10.765 [restartedMain] INFO s.d.s.w.r.o.CachingOperationNameGenerator - [startingWith,41] - Generating unique operation named: removeUsingDELETE_3 15:50:10.769 [restartedMain] INFO s.d.s.w.r.o.CachingOperationNameGenerator - [startingWith,41] - Generating unique operation named: addUsingPOST_6 15:50:10.770 [restartedMain] INFO s.d.s.w.r.o.CachingOperationNameGenerator - [startingWith,41] - Generating unique operation named: editUsingPUT_2 15:50:10.772 [restartedMain] INFO s.d.s.w.r.o.CachingOperationNameGenerator - [startingWith,41] - Generating unique operation named: getInfoUsingGET_3 15:50:10.775 [restartedMain] INFO s.d.s.w.r.o.CachingOperationNameGenerator - [startingWith,41] - Generating unique operation named: listUsingGET_6 15:50:10.776 [restartedMain] WARN s.d.s.w.r.p.ParameterDataTypeReader - [apply,102] - Trying to infer dataType java.lang.Long[] 15:50:10.777 [restartedMain] INFO s.d.s.w.r.o.CachingOperationNameGenerator - [startingWith,41] - Generating unique operation named: removeUsingDELETE_4 15:50:10.783 [restartedMain] INFO s.d.s.w.r.o.CachingOperationNameGenerator - [startingWith,41] - Generating unique operation named: addUsingPOST_7 15:50:10.794 [restartedMain] WARN s.d.s.w.r.p.ParameterDataTypeReader - [apply,102] - Trying to infer dataType java.lang.Long[] 15:50:10.798 [restartedMain] INFO s.d.s.w.r.o.CachingOperationNameGenerator - [startingWith,41] - Generating unique operation named: editUsingPUT_3 15:50:10.799 [restartedMain] INFO s.d.s.w.r.o.CachingOperationNameGenerator - [startingWith,41] - Generating unique operation named: getInfoUsingGET_4 15:50:10.801 [restartedMain] INFO s.d.s.w.r.o.CachingOperationNameGenerator - [startingWith,41] - Generating unique operation named: listUsingGET_7 15:50:10.802 [restartedMain] INFO s.d.s.w.r.o.CachingOperationNameGenerator - [startingWith,41] - Generating unique operation named: optionselectUsingGET_1 15:50:10.803 [restartedMain] WARN s.d.s.w.r.p.ParameterDataTypeReader - [apply,102] - Trying to infer dataType java.lang.Long[] 15:50:10.803 [restartedMain] INFO s.d.s.w.r.o.CachingOperationNameGenerator - [startingWith,41] - Generating unique operation named: removeUsingDELETE_5 15:50:10.804 [restartedMain] WARN s.d.s.w.r.p.ParameterDataTypeReader - [apply,102] - Trying to infer dataType java.lang.Long[] 15:50:10.810 [restartedMain] INFO s.d.s.w.r.o.CachingOperationNameGenerator - [startingWith,41] - Generating unique operation named: addUsingPOST_8 15:50:10.812 [restartedMain] INFO s.d.s.w.r.o.CachingOperationNameGenerator - [startingWith,41] - Generating unique operation named: changeStatusUsingPUT_1 15:50:10.813 [restartedMain] INFO s.d.s.w.r.o.CachingOperationNameGenerator - [startingWith,41] - Generating unique operation named: deptTreeUsingGET_1 15:50:10.814 [restartedMain] INFO s.d.s.w.r.o.CachingOperationNameGenerator - [startingWith,41] - Generating unique operation named: editUsingPUT_4 15:50:10.815 [restartedMain] INFO s.d.s.w.r.o.CachingOperationNameGenerator - [startingWith,41] - Generating unique operation named: getInfoUsingGET_5 15:50:10.815 [restartedMain] WARN s.d.s.w.r.p.ParameterDataTypeReader - [apply,102] - Trying to infer dataType java.lang.Long[] 15:50:10.818 [restartedMain] INFO s.d.s.w.r.o.CachingOperationNameGenerator - [startingWith,41] - Generating unique operation named: listUsingGET_8 15:50:10.819 [restartedMain] WARN s.d.s.w.r.p.ParameterDataTypeReader - [apply,102] - Trying to infer dataType java.lang.Long[] 15:50:10.819 [restartedMain] INFO s.d.s.w.r.o.CachingOperationNameGenerator - [startingWith,41] - Generating unique operation named: removeUsingDELETE_6 15:50:10.823 [restartedMain] INFO s.d.s.w.r.o.CachingOperationNameGenerator - [startingWith,41] - Generating unique operation named: addUsingPOST_9 15:50:10.824 [restartedMain] INFO s.d.s.w.r.o.CachingOperationNameGenerator - [startingWith,41] - Generating unique operation named: authRoleUsingGET_1 15:50:10.825 [restartedMain] INFO s.d.s.w.r.o.CachingOperationNameGenerator - [startingWith,41] - Generating unique operation named: changeStatusUsingPUT_2 15:50:10.826 [restartedMain] INFO s.d.s.w.r.o.CachingOperationNameGenerator - [startingWith,41] - Generating unique operation named: deptTreeUsingGET_2 15:50:10.828 [restartedMain] INFO s.d.s.w.r.o.CachingOperationNameGenerator - [startingWith,41] - Generating unique operation named: editUsingPUT_5 15:50:10.830 [restartedMain] INFO s.d.s.w.r.o.CachingOperationNameGenerator - [startingWith,41] - Generating unique operation named: getInfoUsingGET_6 15:50:10.831 [restartedMain] WARN s.d.s.w.r.p.ParameterDataTypeReader - [apply,102] - Trying to infer dataType java.lang.Long[] 15:50:10.831 [restartedMain] INFO s.d.s.w.r.o.CachingOperationNameGenerator - [startingWith,41] - Generating unique operation named: insertAuthRoleUsingPUT_1 15:50:10.834 [restartedMain] INFO s.d.s.w.r.o.CachingOperationNameGenerator - [startingWith,41] - Generating unique operation named: listUsingGET_9 15:50:10.835 [restartedMain] WARN s.d.s.w.r.p.ParameterDataTypeReader - [apply,102] - Trying to infer dataType java.lang.Long[] 15:50:10.835 [restartedMain] INFO s.d.s.w.r.o.CachingOperationNameGenerator - [startingWith,41] - Generating unique operation named: removeUsingDELETE_7 15:50:10.836 [restartedMain] INFO s.d.s.w.r.o.CachingOperationNameGenerator - [startingWith,41] - Generating unique operation named: resetPwdUsingPUT_1 15:50:10.839 [restartedMain] INFO s.d.s.w.r.o.CachingOperationNameGenerator - [startingWith,41] - Generating unique operation named: listUsingGET_10 15:50:10.842 [restartedMain] INFO s.d.s.w.r.o.CachingOperationNameGenerator - [startingWith,41] - Generating unique operation named: addTechnicalMessageUsingPOST_1 15:50:10.845 [restartedMain] INFO s.d.s.w.r.o.CachingOperationNameGenerator - [startingWith,41] - Generating unique operation named: getMessageByIdUsingGET_6 15:50:10.849 [restartedMain] INFO s.d.s.w.r.o.CachingOperationNameGenerator - [startingWith,41] - Generating unique operation named: getPageUsingGET_8 15:50:10.850 [restartedMain] INFO s.d.s.w.r.o.CachingOperationNameGenerator - [startingWith,41] - Generating unique operation named: updateTechnicalMessageUsingPUT_1 15:50:10.852 [restartedMain] INFO s.d.s.w.r.o.CachingOperationNameGenerator - [startingWith,41] - Generating unique operation named: addPatriarchMessageUsingPOST_2 15:50:10.856 [restartedMain] INFO s.d.s.w.r.o.CachingOperationNameGenerator - [startingWith,41] - Generating unique operation named: getMessageByIdUsingGET_7 15:50:10.859 [restartedMain] INFO s.d.s.w.r.o.CachingOperationNameGenerator - [startingWith,41] - Generating unique operation named: getPageUsingGET_9 15:50:10.861 [restartedMain] INFO s.d.s.w.r.o.CachingOperationNameGenerator - [startingWith,41] - Generating unique operation named: updatePatriarchMessageUsingPUT_3 15:50:10.871 [restartedMain] INFO o.a.c.h.Http11NioProtocol - [log,173] - Starting ProtocolHandler ["http-nio-8080"] 15:50:10.896 [restartedMain] INFO c.z.b.ZilberbootApplication - [logStarted,61] - Started ZilberbootApplication in 7.466 seconds (JVM running for 8.658) (♥◠‿◠)ノ゙ 启动成功 ლ(´ڡ`ლ)゙ _ _ _ (_) | | _____ | |__ ___ _ __ |_ / | | |_ } / _ { |__| / /| | | |_) | ___/ | /___|_|_|_.__/ ___|_| 15:50:46.687 [http-nio-8080-exec-1] INFO o.a.c.c.C.[.[.[/] - [log,173] - Initializing Spring DispatcherServlet 'dispatcherServlet' 登录地址在哪
08-28
页面 <div class="app-container"> <!-- 查询表单 --> <div class="filter-container"> <el-date-picker v-model="dateRange" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd" style="width: 280px; margin-right: 10px" /> <el-input v-model="queryParams.userName" placeholder="员工姓名/账号" clearable style="width: 180px; margin-right: 10px" /> <el-select v-model="queryParams.deptId" placeholder="所属部门" clearable style="width: 160px" > <el-option v-for="dept in deptOptions" :key="dept.deptId" :label="dept.deptName" :value="dept.deptId" /> </el-select> <el-button type="primary" icon="el-icon-search" @click="getList" >搜索</el-button > <el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button> </div> <!-- 操作按钮 --> <el-row :gutter="10" class="mb8"> <el-col :span="1.5"> <el-button type="primary" plain icon="el-icon-plus" @click="openAddDialog" v-hasPermi="['system:schedule:add']" > 新增排班 </el-button> </el-col> <el-col :span="1.5"> <el-button type="danger" plain icon="el-icon-delete" :disabled="selectedSchedules.length === 0" @click="handleDelete(null)" v-hasPermi="['system:schedule:remove']" > 批量删除 </el-button> </el-col> </el-row> <!-- 排班列表 --> <el-table ref="scheduleTable" v-loading="loading" :data="list" @selection-change="handleSelectionChange" border > <el-table-column type="selection" width="50" align="center" /> <el-table-column label="员工" width="200"> <template slot-scope="scope"> <div style="display: flex; align-items: center"> <el-avatar size="small" :src="getAvatar(scope.row)" style="margin-right: 8px" fit="cover" ></el-avatar> <div> <div> <strong>{{ scope.row.nickName }}</strong> </div> <div style="font-size: 12px; color: #999"> {{ scope.row.userName }} </div> </div> </div> </template> </el-table-column> <el-table-column label="部门" prop="deptName" width="150" /> <el-table-column label="排班日期" width="120"> <template slot-scope="scope"> {{ parseTime(scope.row.scheduleDate, "{y}-{m}-{d}") }} </template> </el-table-column> <el-table-column label="班次" width="100"> <template slot-scope="scope"> <el-tag :type="getShiftType(scope.row.shiftType)"> {{ getShiftText(scope.row.shiftType) }} </el-tag> </template> </el-table-column> <el-table-column label="备注" prop="remark" min-width="120" show-overflow-tooltip /> <el-table-column label="操作" fixed="right" align="center" width="250px"> <template slot-scope="scope"> <el-button size="mini" type="text" icon="el-icon-edit" @click="handleEdit(scope.row)" v-hasPermi="['system:schedule:edit']" > 修改 </el-button> <el-button size="mini" type="text" icon="el-icon-view" @click="handleViewDetail(scope.row)" > 详情 </el-button> <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" v-hasPermi="['system:schedule:remove']" > 删除 </el-button> </template> </el-table-column> </el-table> <!-- 分页 --> <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" /> <!-- 主表单:新增/编辑排班 --> <el-dialog :title="dialogTitle" :visible.sync="open" width="800px" append-to-body destroy-on-close @closed="resetDialogForm" > <el-form :model="tempSchedule" label-width="100px"> <!-- 员工选择 --> <el-form-item label="选择员工" required> <el-button type="primary" size="small" @click="openUserSelector"> + 选择员工 </el-button> <div v-if="selectedUsers.length > 0" style="margin-top: 10px; color: #666" > 已选 {{ selectedUsers.length }} 人: <el-tag v-for="user in selectedUsers" :key="user.userId" size="mini" closable @close="removeSelectedUser(user)" style="margin-right: 5px" > {{ user.nickName }} </el-tag> </div> </el-form-item> <!-- 排班时间 --> <el-form-item label="排班时间" required> <el-date-picker v-model="tempSchedule.dates" type="daterange" start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd" style="width: 100%" /> </el-form-item> <!-- 班次型 --> <el-form-item label="班次型" required> <el-radio-group v-model="tempSchedule.shiftType"> <el-radio label="morning">早班 08:00-16:00</el-radio> <el-radio label="afternoon">晚班 16:00-24:00</el-radio> <el-radio label="night">夜班 00:00-08:00</el-radio> <el-radio label="off">休息</el-radio> </el-radio-group> </el-form-item> <!-- 备注 --> <el-form-item label="备注"> <el-input v-model="tempSchedule.remark" type="textarea" rows="2" /> </el-form-item> </el-form> <div slot="footer" class="dialog-footer"> <el-button @click="open = false">取 消</el-button> <el-button type="primary" :loading="submitLoading" @click="submitSchedule" > 确 定 </el-button> </div> </el-dialog> <!-- 用户选择弹窗 --> <el-dialog title="选择员工" :visible.sync="userSelectorVisible" width="800px" append-to-body destroy-on-close > <div class="filter-container" style="margin-bottom: 15px"> <el-input v-model="userQueryParams.userName" placeholder="姓名/账号" clearable style="width: 180px; margin-right: 10px" /> <el-select v-model="userQueryParams.deptId" placeholder="所属部门" clearable style="width: 160px" > <el-option v-for="dept in deptOptions" :key="dept.deptId" :label="dept.deptName" :value="dept.deptId" /> </el-select> <el-button type="primary" icon="el-icon-search" @click="getUserList" >查询</el-button > <el-button icon="el-icon-refresh" @click="resetUserQuery" >重置</el-button > </div> <el-table v-loading="loading" :data="userList" @selection-change="handleSelectionChange" > <el-table-column type="selection" width="50" align="center" /> <el-table-column label="用户名称" align="center" key="userName" prop="userName" :show-overflow-tooltip="true" /> <el-table-column label="用户昵称" align="center" key="nickName" prop="nickName" :show-overflow-tooltip="true" /> <el-table-column label="部门" align="center" key="deptName" prop="dept.deptName" :show-overflow-tooltip="true" /> <el-table-column label="手机号码" align="center" key="phonenumber" prop="phonenumber" width="120" /> </el-table> <pagination v-show="userTotal > 0" :total="userTotal" :page.sync="userQueryParams.pageNum" :limit.sync="userQueryParams.pageSize" @pagination="getUserList" /> <div slot="footer" class="dialog-footer"> <el-button @click="userSelectorVisible = false">取 消</el-button> <el-button type="primary" @click="confirmSelectUsers">确 定</el-button> </div> </el-dialog> <!-- 详情弹窗 --> <el-dialog title="排班详情" :visible.sync="detailOpen" width="600px" append-to-body destroy-on-close > <div style="line-height: 2" v-if="currentRow"> <p> <b>员工:</b>{{ currentRow.nickName }} ({{ currentRow.userName }}) </p> <p><b>部门:</b>{{ currentRow.deptName }}</p> <p><b>排班日期:</b>{{ currentRow.scheduleDate }}</p> <p> <b>班次:</b> <el-tag :type="getShiftType(currentRow.shiftType)"> {{ getShiftText(currentRow.shiftType) }} </el-tag> </p> <p><b>备注:</b>{{ currentRow.remark || "-" }}</p> <p><b>创建人:</b>{{ currentRow.createBy }}</p> <p><b>创建时间:</b>{{ currentRow.createTime }}</p> </div> <div v-else> <el-empty description="暂无数据"></el-empty> </div> </el-dialog> </div> </template> <script> import { listUser } from "@/api/system/user"; import { listDept } from "@/api/system/dept"; import { listSchedule, addSchedule, updateSchedule, delSchedule, } from "@/api/system/schedule"; import { parseTime } from "@/utils"; export default { name: "ScheduleManagement", data() { return { loading: false, submitLoading: false, list: [], total: 0, queryParams: { pageNum: 1, pageSize: 10, userName: undefined, deptId: undefined, }, dateRange: [], selectedSchedules: [], currentRow: null, // 弹窗控制 open: false, detailOpen: false, dialogTitle: "", // 临时排班数据 tempSchedule: { userIds: [], dates: [], shiftType: "morning", remark: "", }, // 用户选择相关 userSelectorVisible: false, userList: [], userTotal: 0, userQueryParams: { pageNum: 1, pageSize: 10, userName: undefined, deptId: undefined, }, selectedUserIds: [], selectedUsers: [], allUserList: [], // 缓存所有用户信息 deptOptions: [], }; }, computed: { isSuperAdmin() { return this.$store.getters.roles.includes("admin"); }, }, created() { this.getDepts(); this.getAllUsers(); // ✅ 预加载所有用户 this.getList(); }, methods: { // ✅ 注册 parseTime 到 methods getDepts() { listDept().then((res) => { this.deptOptions = res.data || []; }); }, getAllUsers() { listUser({ pageSize: 1000 }).then((res) => { this.allUserList = res.rows || []; }); }, getList() { this.loading = true; const params = { ...this.queryParams, startTime: this.dateRange?.[0], endTime: this.dateRange?.[1], }; listSchedule(params) .then((res) => { this.list = res.rows || []; this.total = res.total || 0; }) .finally(() => { this.loading = false; }); }, resetQuery() { this.dateRange = []; this.queryParams = { pageNum: 1, pageSize: 10, userName: undefined, deptId: undefined, }; this.getList(); }, handleSelectionChange(selection) { this.selectedSchedules = selection; }, openAddDialog() { this.dialogTitle = "新增排班"; this.open = true; }, handleEdit(row) { this.dialogTitle = "修改排班"; this.tempSchedule = { userIds: [row.userId], dates: [row.scheduleDate, row.scheduleDate], shiftType: row.shiftType, remark: row.remark, }; const user = this.allUserList.find((u) => u.userId === row.userId); this.selectedUsers = user ? [user] : []; this.open = true; }, handleViewDetail(row) { this.currentRow = row; this.detailOpen = true; }, openUserSelector() { this.userSelectorVisible = true; this.getUserList(); }, getUserList() { const params = { ...this.userQueryParams }; listUser(params).then((res) => { this.userList = res.rows || []; this.userTotal = res.total || 0; }); }, resetUserQuery() { this.userQueryParams = { pageNum: 1, pageSize: 10, userName: undefined, deptId: undefined, }; this.getUserList(); }, handleUserSelectionChange(selection) { this.selectedUserIds = selection.map((u) => u.userId); }, confirmSelectUsers() { const selected = this.userList.filter((u) => this.selectedUserIds.includes(u.userId) ); const existIds = new Set(this.selectedUsers.map((u) => u.userId)); const newUsers = selected.filter((u) => !existIds.has(u.userId)); this.selectedUsers.push(...newUsers); this.tempSchedule.userIds = this.selectedUsers.map((u) => u.userId); this.userSelectorVisible = false; this.$message.success(`已选择 ${newUsers.length} 名员工`); }, removeSelectedUser(user) { this.selectedUsers = this.selectedUsers.filter( (u) => u.userId !== user.userId ); this.tempSchedule.userIds = this.selectedUsers.map((u) => u.userId); }, submitSchedule() { if (!this.tempSchedule.userIds.length) { this.$message.warning("请至少选择一名员工"); return; } if (!this.tempSchedule.dates || this.tempSchedule.dates.length !== 2) { this.$message.warning("请选择完整的日期范围"); return; } this.submitLoading = true; const [start, end] = this.tempSchedule.dates; const scheduleData = []; const currentDate = new Date(start); const endDate = new Date(end); while (currentDate <= endDate) { const dateStr = this.formatDate(currentDate); this.tempSchedule.userIds.forEach((userId) => { const userData = this.allUserList.find((u) => u.userId === userId); if (!userData) return; // ✅ 转换为下划线命名以匹配后端字段 scheduleData.push({ userId: userId, deptId: userData.deptId, scheduleDate: dateStr, shiftType: this.tempSchedule.shiftType, remark: this.tempSchedule.remark, }); }); currentDate.setDate(currentDate.getDate() + 1); } // ❌ 错误写法:scheduleData.deptId → 应为数组元素的属性 console.log("提交数据:", scheduleData); // ✅ 正确打印 addSchedule(scheduleData) .then(() => { this.$message.success("排班创建成功"); this.open = false; this.getList(); }) .catch((err) => { console.error("排班创建失败", err); this.$message.error("保存失败,请检查网络或数据"); }) .finally(() => { this.submitLoading = false; }); }, handleDelete(row) { const ids = row ? [row.id] : this.selectedSchedules.map((s) => s.id); this.$confirm(`确认删除 ${ids.length} 条排班记录?`, "警告", { type: "warning", }).then(() => { delSchedule(ids).then(() => { this.$message.success("删除成功"); this.getList(); }); }); }, formatDate(date) { const d = new Date(date); const year = d.getFullYear(); const month = String(d.getMonth() + 1).padStart(2, "0"); const day = String(d.getDate()).padStart(2, "0"); return `${year}-${month}-${day}`; }, getShiftText(type) { return ( { morning: "早班", afternoon: "晚班", night: "夜班", off: "休息" }[ type ] || "未知" ); }, getShiftType(type) { return ( { morning: "success", afternoon: "warning", night: "danger", off: "info", }[type] || "" ); }, getAvatar(user) { if (user.avatar) return user.avatar; return `https://ui-avatars.com/api/?name=${encodeURIComponent( user.nickName || "用户" )}&background=5f67e8&color=fff&size=32`; }, resetDialogForm() { this.tempSchedule = { userIds: [], dates: [], shiftType: "morning", remark: "", }; this.selectedUsers = []; this.selectedUserIds = []; }, }, }; </script> <style scoped> ::v-deep .el-table th { background-color: #f5f7fa; font-weight: bold; } .mb8 { margin-bottom: 15px; } .dialog-footer { text-align: right; } .custom-avatar { width: 32px; height: 32px; line-height: 32px; font-size: 14px; } </style> 接口package com.ruoyi.web.controller.system; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.ruoyi.common.annotation.Log; import com.ruoyi.common.core.controller.BaseController; import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.common.core.domain.entity.SysDept; import com.ruoyi.common.core.domain.entity.SysUser; import com.ruoyi.common.core.page.TableDataInfo; import com.ruoyi.common.enums.BusinessType; import com.ruoyi.common.utils.StringUtils; import com.ruoyi.common.utils.poi.ExcelUtil; import com.ruoyi.system.domain.IncidentRecords; import com.ruoyi.system.domain.ScheduleRecord; import com.ruoyi.system.mapper.ScheduleRecordMapper; import com.ruoyi.system.mapper.SysDeptMapper; import com.ruoyi.system.mapper.SysUserMapper; import com.ruoyi.system.service.ISysUserService; import com.ruoyi.system.service.ScheduleRecordService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.web.bind.annotation.*; import java.util.List; import java.util.Map; /** 员工排班记录控制器 */ @RestController @RequestMapping(“/system/schedule”) public class ScheduleRecordController extends BaseController { @Autowired private ScheduleRecordMapper scheduleRecordMapper; @Autowired private ScheduleRecordService scheduleRecordService; @Autowired SysUserMapper userMapper; @Autowired SysDeptMapper deptMapper; /** 查询排班列表(分页) */ @GetMapping(“/list”) public TableDataInfo list(ScheduleRecord record) { QueryWrapper queryWrapper = new QueryWrapper<>(); if (StringUtils.isNotBlank(record.getUserName())) { // 关联查询用户表字段需自行处理,此处仅支持数据库字段模糊匹配 List userIdList =userMapper.selectUserIdByName(record.getUserName()); queryWrapper.in(“user_id”, userIdList); } if (record.getUserId() != null) { queryWrapper.eq(“user_id”, record.getUserId()); } if (record.getDeptId() != null) { queryWrapper.eq(“dept_id”, record.getDeptId()); } if (record.getShiftType() != null && !“”.equals(record.getShiftType())) { queryWrapper.eq(“shift_type”, record.getShiftType()); } if (record.getScheduleDate() != null) { // 精确到天的查询(可扩展为范围) queryWrapper.ge(“schedule_date”, record.getScheduleDate()); } Page page = new Page<>(record.getPageNum(), record.getPageSize()); Page resultPage = scheduleRecordMapper.selectPage(page, queryWrapper); for (ScheduleRecord userRecord : resultPage.getRecords()) { SysUser sysUser = userMapper.selectUserById(userRecord.getUserId()); userRecord.setUserName(sysUser.getNickName()); SysDept sysDept = deptMapper.selectDeptById(userRecord.getDeptId()); userRecord.setDeptName(sysDept.getDeptName()); } TableDataInfo tableDataInfo = new TableDataInfo(); tableDataInfo.setRows(resultPage.getRecords()); tableDataInfo.setTotal(resultPage.getTotal()); return tableDataInfo; } /** 获取所有排班数据(用于导出或下拉框) */ @GetMapping(“/all”) @PreAuthorize(“@ss.hasPermi(‘schedule:list’)”) public AjaxResult getAll(ScheduleRecord record) { QueryWrapper wrapper = new QueryWrapper<>(record); List list = scheduleRecordMapper.selectList(wrapper); return AjaxResult.success(list); } /** 根据ID获取排班详情 */ @GetMapping(“/{id}”) @PreAuthorize(“@ss.hasPermi(‘schedule:query’)”) public AjaxResult getInfo(@PathVariable Long id) { ScheduleRecord record = scheduleRecordMapper.selectById(id); if (record == null) { return AjaxResult.error(“排班记录存在”); } return AjaxResult.success(record); } /** 新增排班 */ @PostMapping @PreAuthorize(“@ss.hasPermi(‘schedule:add’)”) public AjaxResult add(@RequestBody List records) { if (records == null || records.isEmpty()) { return AjaxResult.error(“提交数据为空”); } records.forEach(r -> { r.setCreateTime(new java.util.Date()); r.setCreateBy(getUsername()); r.setUpdateTime(null); r.setUpdateBy(null); }); boolean success = scheduleRecordService.saveBatch(records); return success ? AjaxResult.success(“新增成功”) : AjaxResult.error(“新增失败”); } /** 修改排班 */ @PutMapping @PreAuthorize(“@ss.hasPermi(‘schedule:edit’)”) public AjaxResult edit(@RequestBody ScheduleRecord record) { if (record.getId() == null) { return AjaxResult.error(“ID能为空”); } ScheduleRecord old = scheduleRecordMapper.selectById(record.getId()); if (old == null) { return AjaxResult.error(“记录存在,无法修改”); } record.setUpdateBy(getUsername()); record.setUpdateTime(new java.util.Date()); int result = scheduleRecordMapper.updateById(record); return result > 0 ? AjaxResult.success(“修改成功”) : AjaxResult.error(“修改失败”); } /** 删除排班记录 */ @DeleteMapping(“/{ids}”) @PreAuthorize(“@ss.hasPermi(‘schedule:remove’)”) public AjaxResult remove(@PathVariable Long[] ids) { if (ids == null || ids.length == 0) { return AjaxResult.error(“请选择要删除的数据”); } int count = 0; for (Long id : ids) { int del = scheduleRecordMapper.deleteById(id); if (del > 0) count++; } return count > 0 ? AjaxResult.success(“删除成功,共删除 " + count + " 条记录”) : AjaxResult.error(“删除失败”); } /** 导出排班数据 */ @GetMapping(“/export”) @PreAuthorize(“@ss.hasPermi(‘schedule:export’)”) public AjaxResult export(ScheduleRecord record) { QueryWrapper queryWrapper = new QueryWrapper<>(record); List list = scheduleRecordMapper.selectList(queryWrapper); ExcelUtil util = new ExcelUtil<>(ScheduleRecord.class); return util.exportExcel(list, “排班数据”); } } js文件import request from ‘@/utils/request’ export function listSchedule(params) { return request({ url: ‘/system/schedule/list’, method: ‘get’, params }) } export function addSchedule(data) { return request({ url: ‘/system/schedule’, method: ‘post’, data }) } export function updateSchedule(data) { return request({ url: ‘/system/schedule’, method: ‘put’, data }) } export function delSchedule(id) { return request({ url: /system/schedule/${id}, method: ‘delete’ }) } 路由import Vue from ‘vue’ import Router from ‘vue-router’ Vue.use(Router) /* Layout */ import Layout from ‘@/layout’ /** 注意:路由配置说明 hidden: true // 设为 true 则在侧边栏显示(如登录页、404) alwaysShow: true // 子路由数量 >= 2 时默认嵌套展示;设为 true 强制显示根菜单 redirect: noRedirect // 面包屑可点击 name: ‘router-name’ // 必须唯一,用于 缓存 meta: { title: ‘标题’, // 菜单和面包屑显示的文字 icon: ‘svg-icon-name’, // 图标名(对应 src/assets/icons/svg 下的 SVG 文件) noCache: true, // 设为 true 会被 keep-alive 缓存 breadcrumb: false // 设为 false 在面包屑中显示 activeMenu: ‘/path/to/menu’ // 当前页面高亮指定菜单 } */ // 公共路由 export const constantRoutes = [ { path: ‘/redirect’, component: Layout, hidden: true, children: [ { path: ‘/redirect/:path(.*)’, component: () => import(‘@/views/redirect’) } ] }, { path: ‘/login’, component: () => import(‘@/views/login’), hidden: true }, { path: ‘/register’, component: () => import(‘@/views/register’), hidden: true }, { path: ‘/404’, component: () => import(‘@/views/error/404’), hidden: true }, { path: ‘/401’, component: () => import(‘@/views/error/401’), hidden: true }, { path: ‘’, component: Layout, redirect: ‘index’, children: [ { path: ‘index’, component: () => import(‘@/views/index’), name: ‘Index’, meta: { title: ‘首页’, icon: ‘dashboard’, affix: true } } ] }, { path: ‘/user’, component: Layout, hidden: true, redirect: ‘noredirect’, children: [ { path: ‘profile’, component: () => import(‘@/views/system/user/profile/index’), name: ‘Profile’, meta: { title: ‘个人中心’, icon: ‘user’ } } ] }, { path: ‘/system/elderly’, component: Layout, hidden: true, children: [ { path: ‘index’, component: () => import(‘@/views/system/elderly/index’), name: ‘elderly’, meta: { title: ‘收费管理’, activeMenu: ‘/system/elderly’ } } ] }, { path: ‘/system/bed’, component: Layout, hidden: true, children: [ { path: ‘index’, component: () => import(‘@/views/system/bed/index’), name: ‘bed’, meta: { title: ‘收费管理’, activeMenu: ‘/system/bed’ } } ] }, { path: ‘/system/bill’, component: Layout, hidden: true, children: [ { path: ‘index’, component: () => import(‘@/views/system/bill/index’), name: ‘bill’, meta: { title: ‘收费管理’, activeMenu: ‘/system/bill’ } } ] }, { path: ‘/system/feeItem’, component: Layout, hidden: true, children: [ { path: ‘index’, component: () => import(‘@/views/system/feeItem/index’), name: ‘feeItem’, meta: { title: ‘收费管理’, activeMenu: ‘/system/feeItem’ } } ] }, { path: ‘/system/health’, component: Layout, hidden: true, children: [ { path: ‘index’, component: () => import(‘@/views/system/health/index’), name: ‘health’, meta: { title: ‘健康记录管理’, activeMenu: ‘/system/health’ } } ] }, { path: ‘/system/care’, component: Layout, hidden: true, children: [ { path: ‘index’, component: () => import(‘@/views/system/care/index’), name: ‘care’, meta: { title: ‘事故记录管理’, activeMenu: ‘/system/care’ } } ] }, { path: ‘/system/incident’, component: Layout, hidden: true, children: [ { path: ‘index’, component: () => import(‘@/views/system/incident/index’), name: ‘incident’, meta: { title: ‘事故记录管理’, activeMenu: ‘/system/incident’ } } ] }, { path: ‘/system/schedule’, component: Layout, hidden: true, children: [ { path: ‘index’, component: () => import(‘@/views/system/schedule/index’), name: ‘schedule’, meta: { title: ‘排班管理’, activeMenu: ‘/system/schedule’ } } ] }, // 可继续添加其他模块… ] // 动态路由(权限相关) export const dynamicRoutes = [ { path: ‘/system/user-auth’, component: Layout, hidden: true, permissions: [‘system:user:edit’], children: [ { path: ‘role/:userId(\d+)’, component: () => import(‘@/views/system/user/authRole’), name: ‘AuthRole’, meta: { title: ‘分配角色’, activeMenu: ‘/system/user’ } } ] }, { path: ‘/system/role-auth’, component: Layout, hidden: true, permissions: [‘system:role:edit’], children: [ { path: ‘user/:roleId(\d+)’, component: () => import(‘@/views/system/role/authUser’), name: ‘AuthUser’, meta: { title: ‘分配用户’, activeMenu: ‘/system/role’ } } ] }, { path: ‘/system/dict-data’, component: Layout, hidden: true, permissions: [‘system:dict:list’], children: [ { path: ‘index/:dictId(\d+)’, component: () => import(‘@/views/system/dict/data’), name: ‘Data’, meta: { title: ‘字典数据’, activeMenu: ‘/system/dict’ } } ] } ] // 解决重复点击相同路由报错的问题 let routerPush = Router.prototype.push let routerReplace = Router.prototype.replace Router.prototype.push = function push(location) { return routerPush.call(this, location).catch(err => err) } Router.prototype.replace = function replace(location) { return routerReplace.call(this, location).catch(err => err) } export default new Router({ mode: ‘history’, // 去掉 URL 中的 # scrollBehavior: () => ({ y: 0 }), routes: constantRoutes }) 设置权限字符,要求这个页面所有人可访问可操作,但提示无权限
09-29
import json from pathlib import Path import time from utils.window_handler import WindowHandler from kaitu import Kaitu from qinghuo import Qinghuo from zhonghe import Zhonghe from caiji import Caiji from datetime import datetime import os # 添加这行导入os模块 from PyQt6.QtWidgets import QTextEdit # 添加这行导入QTextEdit from logger import Logger from delay_system import DelaySystem from assist import Assist from utils.window_handler import WindowHandler from logic.assist import Assist from modules.kaitu import Kaitu from modules.qinghuo import Qinghuo from modules.zhonghe import Zhonghe from modules.caiji import Caiji from core.delay_system import DelaySystem import sys class BusinessLogic: def __init__(self, 日志=None, settings_file="settings.json"): self.日志输出 = 日志 self.settings_file = Path(settings_file) self.delay_system = DelaySystem() # 创建延时系统实例 self.settings = { 'kaitusetting': None, 'qinghuosetting': None, 'zonghesetting': None, 'caijisetting': None, 'duilie': [{},{},{},{},{},{},{}] # 改为7个空字典 } self.kaitudata = { 'kaitu': None, #开图功能 'tandong': None,#探洞 } self.设置页面 ={ 'duanxinchonglian': None, #断线重连是否开启 'chongliantime': None, #断线重连时间 'gameaddress': None, #游戏地址 } self.zhonghedata ={ 'bangzhu': None, 'bangzhutime': None, 'caijizengchan': None, 'suiji': None, 'zhaomu': None, 'shouhuo': None, 'jiance': None, #检测 'jiancetime': None, #检测时间 'lianmengliwu': None, #联盟礼物 } self.qinghuodata ={ 'openzhaizi': None, #开启打寨子功能功能 'followzhaizi': None, #开启寨子跟车功能 'duoduiyeren': None, #开启多队快速清活力功能 'yangyerenlaye': None, #开启养野人拉野1-17级功能 'ditulaye': [], #开启地图寻找野怪密集地方拉野 } self.caijidata ={ 'BasicSettings': { 'caiji_tiandengji': None, 'caiji_beisaotiantime': None, 'Findhuadong': None, 'cundang': None, 'bszhuzha': None, #是否开启宝石驻扎 #读取morenwj 'morenwj': None, #是否开启默认武器 }, 'duilie': [ { # 第1队 'zhu': None, 'fu': None, 'tian': None, 'kj': None }, { # 第2队 'zhu': None, 'fu': None, 'tian': None, 'kj': None }, { # 第3队 'zhu': None, 'fu': None, 'tian': None, 'kj': None }, { # 第4队 'zhu': None, 'fu': None, 'tian': None, 'kj': None }, { # 第5队 'zhu': None, 'fu': None, 'tian': None, 'kj': None }, { # 第6队 'zhu': None, 'fu': None, 'tian': None, 'kj': None }, { # 第7队 'zhu': None, 'fu': None, 'tian': None, 'kj': None } ] } def load_settings(self): """从settings.json文件加载设置""" try: if not self.settings_file.exists(): #print(f"设置文件 {self.settings_file} 存在") self.日志输出.info(f"设置文件 {self.settings_file} 存在") return False with open(self.settings_file, 'r', encoding='utf-8') as f: data = json.load(f) # 读取设置参数 self.settings['kaitusetting'] = data.get('kaitusetting', False) self.settings['qinghuosetting'] = data.get('qinghuosetting', False) self.settings['zonghesetting'] = data.get('zonghesetting', False) self.settings['caijisetting'] = data.get('caijisetting', False) # 读取并设置延时系统参数 yanshi = data.get('yanshi', 60) # 默认为60 liucangdu = data.get('liucangdu', 20) # 默认为20 suiji = data.get('suiji', 30) # 默认为30 # 转换参数并应用到延时系统 yanshi_value = yanshi / 100 # 转换为0.00-1.00范围 self.delay_system.set_base_delay(yanshi_value) # 计算并设置帧率 fps = 5 + 55 * (liucangdu / 100) ** 1.5 self.delay_system.set_target_fps(int(round(fps))) # 设置随机因子 suiji_value = suiji / 100 self.delay_system.set_random_factor(min(5.0, max(0.0, suiji_value))) # 确保caijidata字段存在,如果存在则初始化 if self.settings['kaitusetting'] == False and self.settings['qinghuosetting'] == False and self.settings['zonghesetting'] == False and self.settings['caijisetting'] == False: #print("请至少开启一个功能") self.日志输出.info("请至少开启一个功能") return False if self.settings['kaitusetting'] == True: #print("开图功能已开启") self.日志输出.info("开图功能已开启") self.kaitudata['kaitu'] = data.get('kaitu', False) self.kaitudata['tandong'] = data.get('tandong', False) if self.kaitudata['kaitu'] == False and self.kaitudata['tandong'] == False: #print("开图和探洞功能都未开启,请至少开启一个功能") self.日志输出.info("开图和探洞功能都未开启,请至少开启一个功能") return False #判断是否开启了综合 if self.settings['zonghesetting'] == True: #print("综合功能已开启") self.日志输出.info("综合功能已开启") #读取综合里面帮助是否开启 self.zhonghedata['bangzhu'] = data.get('bangzhu', False) #读取综合里面采集提升是否开启 self.zhonghedata['caijizengchan'] = data.get('caijizengchan', False) #读取综合里面随机是否开启 self.zhonghedata['suiji'] = data.get('suiji', False) #读取综合里面开图时间是否开启 self.zhonghedata['bangzhutime'] = data.get('bangzhutime', False) #读取综合里面采集是否开启 self.zhonghedata['zhaomu'] = data.get('zhaomu', False) #读取综合里面采集是否开启 self.zhonghedata['shouhuo'] = data.get('shouhuo', False) #读取综合里面采集是否开启 self.zhonghedata['jiance'] = data.get('jiance', False) #读取综合里面检测时间是否开启 self.zhonghedata['jiancetime'] = data.get('jiancetime', '15') #读取综合里面采集是否开启 self.zhonghedata['zhaomu'] = data.get('zhaomu', False) self.zhonghedata['lianmengliwu'] = data.get('lianmengliwu', False) self.设置页面['duanxinchonglian'] = data.get('duanxinchonglian', False) #断线重连是否开启 self.设置页面['chongliantime'] = data.get('chongliantime', 0) #断线重连时间 self.设置页面['gameaddress'] = data.get('gameaddress','') #游戏地址 #读取采集设置 self.get_caijidata(data) #读取主页队列设置 self.get_index_duilie(data) self.日志输出.info(self.settings['duilie']) return True except Exception as e: #print(f"加载设置文件失败: {str(e)}") self.日志输出.info(f"加载设置文件失败: {str(e)}") return False def get_caijidata(self,data=None): """获取采集设置参数""" if data == None: return False if self.settings['caijisetting'] == False: #print("采集功能未开启") self.日志输出.info("采集功能未开启") return False #print("读取采集设置参数") self.日志输出.info("读取采集设置参数") if self.settings['caijisetting'] == True: #print("采集功能已开启") self.日志输出.info("采集功能已开启") #随机因子 # 确保BasicSettings字典已初始化 if 'BasicSettings' not in self.caijidata: self.caijidata['BasicSettings'] = {} self.caijidata['BasicSettings']['随机因子'] = data.get('suiji', 0) # 默认值设为0而非False,更适合数值型 self.caijidata['BasicSettings']['caiji_beisaotiantime'] = data.get('caiji_beisaotiantime', False) self.caijidata['BasicSettings']['Findhuadong'] = data.get('Findhuadong', 40)/100 #读取huncundang 和bszhuzha self.caijidata['BasicSettings']['cundang'] = data.get('cundang', False) self.caijidata['BasicSettings']['bszhuzha'] = data.get('bszhuzha', False) #读取morenwj self.caijidata['BasicSettings']['morenwj'] = data.get('morenwj', False) #self.caijidata['BasicSettings']['kuaijiecz'] = data.get('kuaijiecz', False) for i in range(7): self.caijidata['duilie'][i]['zhu'] = data.get(f'caijidl{i+1}zhu', False) # 根据您的json文件 self.caijidata['duilie'][i]['fu'] = data.get(f'caijidl{i+1}fu', False) # 根据您的json文件 self.caijidata['duilie'][i]['tian'] = data.get(f'caijidl{i+1}tian', False) # 根据您的json文件 self.caijidata['duilie'][i]['kj'] = data.get(f'caijidl{i+1}kj', False) # 根据您的json文件 return True #获取主页队列设置 def get_index_duilie(self,data=None): """获取主页队列设置""" #如果采集或者清活开启任意一个 则读取队列设置 if self.settings['caijisetting'] == False and self.settings['qinghuosetting'] == False: #print("采集或者清活未开启") self.日志输出.info("采集或者清活未开启") return False #print("采集或者清活开启任意一个 开始读取队列设置") self.日志输出.info("采集或者清活开启任意一个 开始读取队列设置") # 初始化duilie为包含5个空字典的列表 for i in range(7): self.settings['duilie'][i] = data.get(f'index_duilie{i+1}', False) # 根据您的json文件 return True def get_setting(self, name): """获取指定设置的值""" return self.settings.get(name) def execute(self): """执行业务逻辑""" # 创建WindowHandler实例 #return True if self.日志输出 is None: print("错误: 未找到findPicLog控件") return False if not self.load_settings(): return False self.日志输出.info(f"[{datetime.now().strftime('%Y-%m-%d %H:%M:%S')}] 当前设置状态:") self.日志输出.info(f"开图设置: {'已启用' if self.settings['kaitusetting'] else '未启用'}") self.日志输出.info(f"清货设置: {'已启用' if self.settings['qinghuosetting'] else '未启用'}") self.日志输出.info(f"综合设置: {'已启用' if self.settings['zonghesetting'] else '未启用'}") self.日志输出.info(f"采集设置: {'已启用' if self.settings['caijisetting'] else '未启用'}") self.日志输出.info(f"准备查找窗口") #hwnd = window_handler.find_window() #window_handler.启动游戏() #self.日志输出.info(f"窗口已经找到") timen =time.time() #self.日志输出.info(f"定时器已经开启,时间戳: {timen}") #self.日志输出.info(f"找到窗口句柄: {hwnd}") # 🔥 初始化前检查停止信号 if hasattr(self, 'should_stop') and self.should_stop: print("[ULTIMATE] business_logic 在创建assist前收到停止信号") self.日志输出.info("🛑 程序执行已终止") return True assist = Assist(设置页面 =self.设置页面,日志输出=self.日志输出,延时=self.delay_system) # 🔥 设置assist的主线程关闭函数回调(最重要!让assist能够真正关闭线程) if hasattr(self, 'main_thread_closer') and callable(self.main_thread_closer): assist.main_thread_closer = self.main_thread_closer #self.日志输出.info("已设置assist主线程关闭函数回调") # 🔥 窗口查找前检查停止信号 if hasattr(self, 'should_stop') and self.should_stop: print("[ULTIMATE] business_logic 在查找窗口前收到停止信号") self.日志输出.info("🛑 程序执行已终止") return True assist.window_handler.find_window() assist.hwnd = assist.window_handler.hwnd # 🔥 游戏检测前检查停止信号 if hasattr(self, 'should_stop') and self.should_stop: print("[ULTIMATE] business_logic 在游戏检测前收到停止信号") self.日志输出.info("🛑 程序执行已终止") return True #检测是否开启短线重连 assist.检测游戏是否掉线() # 🔥 创建子前检查停止信号 if hasattr(self, 'should_stop') and self.should_stop: print("[ULTIMATE] business_logic 在创建子前收到停止信号") self.日志输出.info("🛑 程序执行已终止") return True zhonghe_instance = Zhonghe(assist, self.日志输出, self.zhonghedata,延时=self.delay_system) # 修改变量名 # 传递停止信号引用 zhonghe_instance.should_stop_ref = lambda: hasattr(self, 'should_stop') and self.should_stop self.日志输出.info(f"综合任务已经创建") kaitu = Kaitu(assist,self.日志输出, settings =self.kaitudata,延时=self.delay_system) # 传递停止信号引用 kaitu.should_stop_ref = lambda: hasattr(self, 'should_stop') and self.should_stop self.日志输出.info(f"开图任务已经创建") qinghuo = Qinghuo(assist, settings =self.qinghuodata,延时=self.delay_system) # 传递停止信号引用 qinghuo.should_stop_ref = lambda: hasattr(self, 'should_stop') and self.should_stop self.日志输出.info(f"清货任务已经创建") caiji = Caiji(assist, settings =self.caijidata,duilie=self.settings['duilie'],日志输出=self.日志输出,延时=self.delay_system) # 传递停止信号引用 caiji.should_stop_ref = lambda: hasattr(self, 'should_stop') and self.should_stop self.日志输出.info(f"采集任务已经创建") #return True while True: # 🔥 EMERGENCY PATCH: 终极停止检查 - 最高优先级 🔥 if hasattr(self, 'should_stop') and self.should_stop: print("[ULTIMATE] business_logic 主循环收到终极停止信号") self.日志输出.info("🛑 程序执行已终止") break # 调试断点支持 - 在循环开始处添加断点支持 import sys if hasattr(sys, 'gettrace') and sys.gettrace() is not None: # 调试模式下,允许断点中断 pass # UI事件处理 - 确保界面控件响应 try: from PyQt6.QtWidgets import QApplication app = QApplication.instance() if app: app.processEvents() # 处理UI事件,让界面保持响应 except Exception as e: pass # 忽略UI处理错误 # 检查线程是否应该终止 - 优先级最高 if hasattr(self, 'should_stop') and self.should_stop: print("[DEBUG] business_logic 收到停止信号") self.日志输出.info("📋 任务执行已终止") break # 检查是否应该暂停 - 增强版暂停逻辑,包含网络状态监控 if hasattr(self, 'pause_event') and self.pause_event: # 如果pause_event被清除(网络断开时会清除),线程会在这里等待 if not self.pause_event.is_set(): # 显示详细的暂停消息,避免刷屏 # 记录暂停开始时间 pause_start_time = time.time() last_log_time = pause_start_time log_interval = 60 # 每60秒记录一次状态,减少日志频率 while not self.pause_event.is_set(): # 在暂停等待期间也要检查终止信号 if hasattr(self, 'should_stop') and self.should_stop: self.日志输出.info("📋 任务执行已终止") return True # 优雅退出 # UI事件处理 - 确保在暂停期间界面依然响应 try: from PyQt6.QtWidgets import QApplication app = QApplication.instance() if app: app.processEvents() # 处理UI事件 except Exception as e: pass # 忽略UI处理错误 # 等待网络恢复信号,每5秒检查一次 if self.pause_event.wait(timeout=5): break # 定期记录暂停状态 current_time = time.time() if current_time - last_log_time >= log_interval: pause_duration = int(current_time - pause_start_time) self.日志输出.info(f"⏳ 等待网络连接中... (已等待 {pause_duration // 60} 分钟)") last_log_time = current_time # 记录恢复信息(如果是因为终止信号退出) if not (hasattr(self, 'should_stop') and self.should_stop): # 显示恢复消息,避免与心跳日志重复 pass # 再次检查终止信号 if hasattr(self, 'should_stop') and self.should_stop: print("[DEBUG] business_logic 在主循环中收到停止信号") self.日志输出.info("📋 任务执行已终止") break # 原有循环内容 #清理对话框 assist.清理对话框() # 更新所有实例的窗口句柄 self.日志输出.info("进入循环",show_in_ui=False) # 调试断点支持 - 在任务执行前添加断点支持 # 添加短暂休眠,避免CPU占用过高 time.sleep(1) #self.日志输出.info(f"循环执行中,时间戳: {time.time()}") #判断kaitusetting qinghuosetting zonghesetting caijisetting 是否为True 如果为True 则执行 if self.settings['zonghesetting']: #print("执行综合") self.日志输出.info("执行综合任务") # 调试断点支持 - 在综合任务执行前 import sys if hasattr(sys, 'gettrace') and sys.gettrace() is not None: pass # 设置任务超时检查 import threading task_start_time = time.time() try: zhonghe_instance.execute() except Exception as e: print(f"[ERROR] 综合任务执行异常: {e}") self.日志输出.error(f"综合任务执行异常: {e}") # 检查任务是否被停止信号中断 if hasattr(self, 'should_stop') and self.should_stop: print("[DEBUG] 综合任务被停止信号中断") break # UI事件处理 - 在任务执行后处理UI事件 try: from PyQt6.QtWidgets import QApplication app = QApplication.instance() if app: app.processEvents() except: pass if self.settings['kaitusetting']: #print("进入开图") self.日志输出.info("进入开图") # 调试断点支持 - 在开图任务执行前 import sys if hasattr(sys, 'gettrace') and sys.gettrace() is not None: pass try: kaitu.execute() except Exception as e: print(f"[ERROR] 开图任务执行异常: {e}") self.日志输出.error(f"开图任务执行异常: {e}") # 检查任务是否被停止信号中断 if hasattr(self, 'should_stop') and self.should_stop: print("[DEBUG] 开图任务被停止信号中断") break # UI事件处理 - 在任务执行后处理UI事件 try: from PyQt6.QtWidgets import QApplication app = QApplication.instance() if app: app.processEvents() except: pass if self.settings['qinghuosetting']: #print("执行清活力") self.日志输出.info("执行清活力") # 调试断点支持 - 在清活力任务执行前 import sys if hasattr(sys, 'gettrace') and sys.gettrace() is not None: pass try: qinghuo.execute() except Exception as e: print(f"[ERROR] 清活力任务执行异常: {e}") self.日志输出.error(f"清活力任务执行异常: {e}") # 检查任务是否被停止信号中断 if hasattr(self, 'should_stop') and self.should_stop: print("[DEBUG] 清活力任务被停止信号中断") break # UI事件处理 - 在任务执行后处理UI事件 try: from PyQt6.QtWidgets import QApplication app = QApplication.instance() if app: app.processEvents() except: pass if self.settings['caijisetting']: #print("执行采集") self.日志输出.info("执行采集") # 调试断点支持 - 在采集任务执行前 if hasattr(sys, 'gettrace') and sys.gettrace() is not None: pass try: caiji.execute() except Exception as e: print(f"[ERROR] 采集任务执行异常: {e}") self.日志输出.error(f"采集任务执行异常: {e}") # 检查任务是否被停止信号中断 if hasattr(self, 'should_stop') and self.should_stop: print("[DEBUG] 采集任务被停止信号中断") break # UI事件处理 - 在任务执行后处理UI事件 try: from PyQt6.QtWidgets import QApplication app = QApplication.instance() if app: app.processEvents() except: pass # 等待1秒 time.sleep(1) # UI事件处理 - 在循环末尾再次处理UI事件 try: from PyQt6.QtWidgets import QApplication app = QApplication.instance() if app: app.processEvents() except: pass #判断是否到5分钟, 5分钟清除一下日志 if time.time() - timen > 300: #print("清空print打印的内容") self.日志输出.info("清空日志的内容") #清空日志 self.日志输出.clear() timen =time.time() # 循环结束,说明收到了终止信号 self.日志输出.info("✅ 所有任务已停止") return True 这是这个文件
最新发布
11-01
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值