Commit 9157ffd3 authored by 刘林's avatar 刘林

Merge remote-tracking branch 'origin/develop_dl' into develop_dl

# Conflicts: # amos-boot-utils/amos-boot-utils-message/src/main/java/com/yeejoin/amos/message/kafka/KafkaConsumerService.java
parents a721a7ea 6d62636e
<?xml version="1.0" encoding="UTF-8"?>
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
<output url="file://$MODULE_DIR$/target/classes" />
<output-test url="file://$MODULE_DIR$/target/test-classes" />
<content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/target" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-api:2.13.3" level="project" />
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-netflix-eureka-server:2.2.5.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter:2.2.5.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-context:2.2.5.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.security:spring-security-crypto:5.3.9.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-commons:2.2.5.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.security:spring-security-rsa:1.0.9.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.bouncycastle:bcpkix-jdk15on:1.64" level="project" />
<orderEntry type="library" name="Maven: org.bouncycastle:bcprov-jdk15on:1.64" level="project" />
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-netflix-eureka-server:2.2.5.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-actuator:2.3.11.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-actuator-autoconfigure:2.3.11.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-actuator:2.3.11.RELEASE" level="project" />
<orderEntry type="library" name="Maven: io.micrometer:micrometer-core:1.5.14" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: org.latencyutils:LatencyUtils:2.0.3" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-freemarker:2.3.11.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-context-support:5.2.15.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-netflix-hystrix:2.2.5.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-aop:2.3.11.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-netflix-eureka-client:2.2.5.RELEASE" level="project" />
<orderEntry type="library" name="Maven: com.netflix.eureka:eureka-client:1.9.25" level="project" />
<orderEntry type="library" name="Maven: org.codehaus.jettison:jettison:1.3.7" level="project" />
<orderEntry type="library" name="Maven: stax:stax-api:1.0.1" level="project" />
<orderEntry type="library" name="Maven: com.netflix.netflix-commons:netflix-eventbus:0.3.0" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: com.netflix.netflix-commons:netflix-infix:0.3.0" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: commons-jxpath:commons-jxpath:1.3" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: org.antlr:antlr-runtime:3.4" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: org.antlr:stringtemplate:3.2.1" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: antlr:antlr:2.7.7" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: com.google.code.gson:gson:2.8.6" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: org.apache.commons:commons-math:2.2" level="project" />
<orderEntry type="library" name="Maven: javax.ws.rs:jsr311-api:1.1.1" level="project" />
<orderEntry type="library" name="Maven: com.netflix.servo:servo-core:0.12.21" level="project" />
<orderEntry type="library" name="Maven: com.sun.jersey:jersey-core:1.19.1" level="project" />
<orderEntry type="library" name="Maven: com.sun.jersey.contribs:jersey-apache-client4:1.19.1" level="project" />
<orderEntry type="library" name="Maven: org.apache.httpcomponents:httpclient:4.5.13" level="project" />
<orderEntry type="library" name="Maven: org.apache.httpcomponents:httpcore:4.4.14" level="project" />
<orderEntry type="library" name="Maven: commons-codec:commons-codec:1.14" level="project" />
<orderEntry type="library" name="Maven: com.google.inject:guice:4.1.0" level="project" />
<orderEntry type="library" name="Maven: aopalliance:aopalliance:1.0" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-annotations:2.11.4" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-core:2.11.4" level="project" />
<orderEntry type="library" name="Maven: com.sun.jersey:jersey-servlet:1.19.1" level="project" />
<orderEntry type="library" name="Maven: com.sun.jersey:jersey-server:1.19.1" level="project" />
<orderEntry type="library" name="Maven: com.sun.jersey:jersey-client:1.19.1" level="project" />
<orderEntry type="library" name="Maven: com.netflix.eureka:eureka-core:1.9.25" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml.woodstox:woodstox-core:5.3.0" level="project" />
<orderEntry type="library" name="Maven: com.netflix.archaius:archaius-core:0.7.6" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: com.google.code.findbugs:jsr305:3.0.1" level="project" />
<orderEntry type="library" name="Maven: javax.inject:javax.inject:1" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml.jackson.dataformat:jackson-dataformat-xml:2.11.4" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml.jackson.module:jackson-module-jaxb-annotations:2.11.4" level="project" />
<orderEntry type="library" name="Maven: jakarta.activation:jakarta.activation-api:1.2.2" level="project" />
<orderEntry type="library" name="Maven: org.codehaus.woodstox:stax2-api:4.2.1" level="project" />
<orderEntry type="library" name="Maven: com.thoughtworks.xstream:xstream:1.4.11.1" level="project" />
<orderEntry type="library" name="Maven: xmlpull:xmlpull:1.1.3.1" level="project" />
<orderEntry type="library" name="Maven: xpp3:xpp3_min:1.1.4c" level="project" />
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-netflix-archaius:2.2.5.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-netflix-ribbon:2.2.5.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-netflix-archaius:2.2.5.RELEASE" level="project" />
<orderEntry type="library" name="Maven: commons-configuration:commons-configuration:1.8" level="project" />
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-netflix-ribbon:2.2.5.RELEASE" level="project" />
<orderEntry type="library" name="Maven: com.netflix.ribbon:ribbon:2.3.0" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: com.netflix.ribbon:ribbon-transport:2.3.0" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: io.reactivex:rxnetty-contexts:0.4.9" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: io.reactivex:rxnetty-servo:0.4.9" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: io.reactivex:rxnetty:0.4.9" level="project" />
<orderEntry type="library" name="Maven: com.netflix.ribbon:ribbon-core:2.3.0" level="project" />
<orderEntry type="library" name="Maven: com.netflix.ribbon:ribbon-httpclient:2.3.0" level="project" />
<orderEntry type="library" name="Maven: commons-collections:commons-collections:3.2.2" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: com.netflix.netflix-commons:netflix-commons-util:0.3.0" level="project" />
<orderEntry type="library" name="Maven: com.netflix.ribbon:ribbon-loadbalancer:2.3.0" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: com.netflix.netflix-commons:netflix-statistics:0.1.1" level="project" />
<orderEntry type="library" name="Maven: io.reactivex:rxjava:1.3.8" level="project" />
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-loadbalancer:2.2.5.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-loadbalancer:2.2.5.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-validation:2.3.11.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.hibernate.validator:hibernate-validator:6.1.7.Final" level="project" />
<orderEntry type="library" name="Maven: jakarta.validation:jakarta.validation-api:2.0.2" level="project" />
<orderEntry type="library" name="Maven: org.jboss.logging:jboss-logging:3.4.1.Final" level="project" />
<orderEntry type="library" name="Maven: io.projectreactor.addons:reactor-extra:3.3.6.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-cache:2.3.11.RELEASE" level="project" />
<orderEntry type="library" name="Maven: com.stoyanr:evictor:1.0.0" level="project" />
<orderEntry type="library" name="Maven: com.netflix.ribbon:ribbon-eureka:2.3.0" level="project" />
<orderEntry type="library" name="Maven: org.glassfish.jaxb:jaxb-runtime:2.3.4" level="project" />
<orderEntry type="library" name="Maven: jakarta.xml.bind:jakarta.xml.bind-api:2.3.3" level="project" />
<orderEntry type="library" name="Maven: org.glassfish.jaxb:txw2:2.3.4" level="project" />
<orderEntry type="library" name="Maven: com.sun.istack:istack-commons-runtime:3.0.12" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: com.sun.activation:jakarta.activation:1.2.2" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-web:2.3.11.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter:2.3.11.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot:2.3.11.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-autoconfigure:2.3.11.RELEASE" level="project" />
<orderEntry type="library" name="Maven: jakarta.annotation:jakarta.annotation-api:1.3.5" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-core:5.2.15.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-jcl:5.2.15.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.yaml:snakeyaml:1.26" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-json:2.3.11.RELEASE" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-databind:2.11.4" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.11.4" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.11.4" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml.jackson.module:jackson-module-parameter-names:2.11.4" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-tomcat:2.3.11.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-core:9.0.46" level="project" />
<orderEntry type="library" name="Maven: org.glassfish:jakarta.el:3.0.3" level="project" />
<orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-websocket:9.0.46" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-web:5.2.15.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-beans:5.2.15.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-webmvc:5.2.15.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-aop:5.2.15.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-context:5.2.15.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-expression:5.2.15.RELEASE" level="project" />
<orderEntry type="library" name="Maven: com.netflix.hystrix:hystrix-javanica:1.5.18" level="project" />
<orderEntry type="library" name="Maven: org.ow2.asm:asm:5.0.4" level="project" />
<orderEntry type="library" name="Maven: com.netflix.hystrix:hystrix-core:1.5.18" level="project" />
<orderEntry type="library" name="Maven: org.hdrhistogram:HdrHistogram:2.1.9" level="project" />
<orderEntry type="library" name="Maven: org.aspectj:aspectjweaver:1.9.6" level="project" />
<orderEntry type="library" name="Maven: com.google.guava:guava:29.0-jre" level="project" />
<orderEntry type="library" name="Maven: com.google.guava:failureaccess:1.0.1" level="project" />
<orderEntry type="library" name="Maven: com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava" level="project" />
<orderEntry type="library" name="Maven: org.checkerframework:checker-qual:2.11.1" level="project" />
<orderEntry type="library" name="Maven: com.google.errorprone:error_prone_annotations:2.3.4" level="project" />
<orderEntry type="library" name="Maven: com.google.j2objc:j2objc-annotations:1.3" level="project" />
<orderEntry type="library" name="Maven: com.alibaba:fastjson:1.2.83" level="project" />
<orderEntry type="library" name="Maven: com.yeejoin:amos-feign-privilege:1.7.8" level="project" />
<orderEntry type="library" name="Maven: org.typroject:tyboot-core-foundation:1.1.21" level="project" />
<orderEntry type="library" name="Maven: com.belerweb:pinyin4j:2.5.0" level="project" />
<orderEntry type="library" name="Maven: commons-beanutils:commons-beanutils:1.9.2" level="project" />
<orderEntry type="library" name="Maven: com.esotericsoftware.reflectasm:reflectasm:1.09" level="project" />
<orderEntry type="library" name="Maven: com.github.axet:kaptcha:0.0.9" level="project" />
<orderEntry type="library" name="Maven: com.jhlabs:filters:2.0.235" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-logging:2.3.11.RELEASE" level="project" />
<orderEntry type="library" name="Maven: ch.qos.logback:logback-classic:1.2.3" level="project" />
<orderEntry type="library" name="Maven: ch.qos.logback:logback-core:1.2.3" level="project" />
<orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-to-slf4j:2.13.3" level="project" />
<orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-api:2.17.0" level="project" />
<orderEntry type="library" name="Maven: org.slf4j:jul-to-slf4j:1.7.30" level="project" />
<orderEntry type="library" name="Maven: com.yeejoin:amos-component-feign:1.7.8" level="project" />
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-openfeign:2.2.5.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-openfeign-core:2.2.5.RELEASE" level="project" />
<orderEntry type="library" name="Maven: io.github.openfeign.form:feign-form-spring:3.8.0" level="project" />
<orderEntry type="library" name="Maven: io.github.openfeign.form:feign-form:3.8.0" level="project" />
<orderEntry type="library" name="Maven: commons-fileupload:commons-fileupload:1.4" level="project" />
<orderEntry type="library" name="Maven: commons-io:commons-io:2.2" level="project" />
<orderEntry type="library" name="Maven: io.github.openfeign:feign-core:10.10.1" level="project" />
<orderEntry type="library" name="Maven: io.github.openfeign:feign-slf4j:10.10.1" level="project" />
<orderEntry type="library" name="Maven: io.github.openfeign:feign-hystrix:10.10.1" level="project" />
<orderEntry type="library" name="Maven: javax.servlet:javax.servlet-api:4.0.1" level="project" />
<orderEntry type="library" name="Maven: org.typroject:tyboot-component-cache:1.1.21" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-redis:1.4.5.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.data:spring-data-redis:2.3.9.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.data:spring-data-keyvalue:2.3.9.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.data:spring-data-commons:2.3.9.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-oxm:5.2.15.RELEASE" level="project" />
<orderEntry type="library" name="Maven: redis.clients:jedis:3.3.0" level="project" />
<orderEntry type="library" name="Maven: org.apache.commons:commons-pool2:2.8.1" level="project" />
<orderEntry type="library" name="Maven: io.zipkin.brave:brave:5.12.3" level="project" />
<orderEntry type="library" name="Maven: io.zipkin.reporter2:zipkin-reporter-brave:2.15.0" level="project" />
<orderEntry type="library" name="Maven: io.zipkin.reporter2:zipkin-reporter:2.15.0" level="project" />
<orderEntry type="library" name="Maven: io.zipkin.zipkin2:zipkin:2.21.1" level="project" />
<orderEntry type="library" name="Maven: com.alibaba:easyexcel:2.0.5" level="project" />
<orderEntry type="library" name="Maven: cglib:cglib:3.1" level="project" />
<orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.30" level="project" />
<orderEntry type="library" name="Maven: org.ehcache:ehcache:3.8.1" level="project" />
<orderEntry type="library" name="Maven: commons-lang:commons-lang:2.4" level="project" />
<orderEntry type="library" name="Maven: org.apache.commons:commons-compress:1.18" level="project" />
<orderEntry type="library" name="Maven: org.apache.poi:poi-scratchpad:4.0.1" level="project" />
<orderEntry type="library" name="Maven: org.apache.poi:poi-ooxml:4.0.1" level="project" />
<orderEntry type="library" name="Maven: com.github.virtuald:curvesapi:1.05" level="project" />
<orderEntry type="library" name="Maven: fr.opensagres.xdocreport:xdocreport:1.0.6" level="project" />
<orderEntry type="library" name="Maven: org.apache.poi:poi-ooxml-schemas:4.0.1" level="project" />
<orderEntry type="library" name="Maven: org.apache.xmlbeans:xmlbeans:3.0.2" level="project" />
<orderEntry type="library" name="Maven: org.apache.poi:ooxml-schemas:1.3" level="project" />
<orderEntry type="library" name="Maven: org.jsoup:jsoup:1.11.3" level="project" />
<orderEntry type="library" name="Maven: joda-time:joda-time:2.10.4" level="project" />
<orderEntry type="library" name="Maven: org.apache.commons:commons-lang3:3.10" level="project" />
<orderEntry type="library" name="Maven: org.apache.velocity:velocity-engine-core:2.1" level="project" />
<orderEntry type="library" name="Maven: org.freemarker:freemarker:2.3.31" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-websocket:2.3.11.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-messaging:5.2.15.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-websocket:5.2.15.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.apache.commons:commons-jexl:2.1.1" level="project" />
<orderEntry type="library" name="Maven: commons-logging:commons-logging:1.1.1" level="project" />
<orderEntry type="library" name="Maven: org.springframework.integration:spring-integration-stream:5.3.7.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.integration:spring-integration-core:5.3.7.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-tx:5.2.15.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.retry:spring-retry:1.2.5.RELEASE" level="project" />
<orderEntry type="library" name="Maven: io.projectreactor:reactor-core:3.3.17.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.reactivestreams:reactive-streams:1.0.3" level="project" />
<orderEntry type="library" name="Maven: org.springframework.integration:spring-integration-mqtt:5.3.7.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.paho:org.eclipse.paho.client.mqttv3:1.2.4" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: org.projectlombok:lombok:1.18.20" level="project" />
<orderEntry type="library" name="Maven: com.github.xiaoymin:knife4j-spring-boot-starter:2.0.7" level="project" />
<orderEntry type="library" name="Maven: com.github.xiaoymin:knife4j-spring-boot-autoconfigure:2.0.7" level="project" />
<orderEntry type="library" name="Maven: com.github.xiaoymin:knife4j-spring:2.0.7" level="project" />
<orderEntry type="library" name="Maven: com.github.xiaoymin:knife4j-annotations:2.0.7" level="project" />
<orderEntry type="library" name="Maven: com.github.xiaoymin:knife4j-core:2.0.7" level="project" />
<orderEntry type="library" name="Maven: io.swagger:swagger-models:1.5.22" level="project" />
<orderEntry type="library" name="Maven: io.springfox:springfox-swagger2:2.10.5" level="project" />
<orderEntry type="library" name="Maven: io.springfox:springfox-spi:2.10.5" level="project" />
<orderEntry type="library" name="Maven: io.springfox:springfox-core:2.10.5" level="project" />
<orderEntry type="library" name="Maven: net.bytebuddy:byte-buddy:1.10.22" level="project" />
<orderEntry type="library" name="Maven: io.springfox:springfox-schema:2.10.5" level="project" />
<orderEntry type="library" name="Maven: io.springfox:springfox-swagger-common:2.10.5" level="project" />
<orderEntry type="library" name="Maven: io.springfox:springfox-spring-web:2.10.5" level="project" />
<orderEntry type="library" name="Maven: io.github.classgraph:classgraph:4.1.7" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml:classmate:1.5.1" level="project" />
<orderEntry type="library" name="Maven: org.springframework.plugin:spring-plugin-core:2.0.0.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.plugin:spring-plugin-metadata:2.0.0.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.mapstruct:mapstruct:1.3.1.Final" level="project" />
<orderEntry type="library" name="Maven: io.springfox:springfox-bean-validators:2.10.5" level="project" />
<orderEntry type="library" name="Maven: io.springfox:springfox-spring-webmvc:2.10.5" level="project" />
<orderEntry type="library" name="Maven: com.github.xiaoymin:knife4j-spring-ui:2.0.7" level="project" />
<orderEntry type="library" name="Maven: com.yeejoin:amos-feign-systemctl:1.7.8" level="project" />
<orderEntry type="library" name="Maven: io.swagger:swagger-annotations:1.5.13" level="project" />
<module version="4">
<component name="SonarLintModuleSettings">
<option name="uniqueId" value="7a05731a-6025-4af2-9526-300ce965342a" />
</component>
</module>
\ No newline at end of file
......@@ -45,6 +45,8 @@ public class EquipDataApplication {
ConfigurableApplicationContext context = SpringApplication.run(EquipDataApplication.class, args);
GlobalExceptionHandler.setAlwaysOk(true);
Environment env = context.getEnvironment();
String ip = InetAddress.getLocalHost().getHostAddress();
String port = env.getProperty("server.port");
......
......@@ -161,4 +161,6 @@ public interface OrgUsrMapper extends BaseMapper<OrgUsr> {
List<Map<String, Object>> getFireProtectionAndMaintenance();
Map<String, Object> getPersonType(@Param("typeCode") String typeCode);
List<Map<String, Object>> reportResult(String startTime, String endTime, String bizOrgCode);
}
......@@ -402,4 +402,6 @@ public interface IOrgUsrService {
void updatePersonStatus(String status, String id);
String reportResult(String startTime, String endTime, String bizOrgCode);
}
......@@ -1433,4 +1433,30 @@ LEFT JOIN (
AND dfi.field_code = 'peopleType'
limit 1
</select>
<select id="reportResult" resultType="java.util.Map">
SELECT
*
FROM
(
SELECT
*
FROM
(
SELECT
person.biz_org_name AS NAME,
person.biz_org_code AS bizOrgCode,
person.parent_id AS parentId,
cdf.field_value AS peopleType
FROM
( SELECT sequence_nbr, biz_org_name, biz_org_code, parent_id FROM cb_org_usr WHERE biz_org_type = 'PERSON' AND is_delete = 0 AND biz_org_code LIKE concat(#{bizOrgCode}, '%')
AND rec_date >= #{startTime} AND #{endTime} >= rec_date ) person
LEFT JOIN ( SELECT field_value, instance_id FROM cb_dynamic_form_instance WHERE group_code = '246' AND field_code = 'peopleType' ) cdf ON person.sequence_nbr = cdf.instance_id
) AS a
WHERE
a.peopleType IS NOT NULL
AND a.peopleType = '1601'
) AS a
GROUP BY
parentId
</select>
</mapper>
......@@ -5,6 +5,9 @@ import com.yeejoin.amos.boot.module.jcs.api.dto.SignDto;
import com.yeejoin.amos.boot.module.jcs.api.dto.SinStaticDto;
import com.yeejoin.amos.boot.module.jcs.api.entity.Sign;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import java.util.Map;
/**
* 打卡记录 Mapper 接口
......@@ -20,4 +23,6 @@ public interface SignMapper extends BaseMapper<Sign> {
IPage<SinStaticDto> queryStaticForPage(IPage<?> page, SinStaticDto dto);
int queryPersonNum(String bizOgrCode);
// Map<String, Object> getSignStatistic(@Param("bizOrgCode") String bizOgrCode, @Param("userId") String userId);
}
......@@ -3,6 +3,8 @@ package com.yeejoin.amos.boot.module.jcs.api.service;
import com.yeejoin.amos.boot.module.jcs.api.dto.SignDto;
import java.util.Map;
/**
* 打卡记录接口类
*
......@@ -14,4 +16,6 @@ public interface ISignService {
Boolean hasSign(String type,String date,String userId);
Boolean saveSign(SignDto dot);
Map<String, Object> getSignStatistic(String userId, String bizOrgCode);
}
......@@ -78,6 +78,9 @@
<select id="queryPersonNum" resultType="java.lang.Integer">
select count(*) from cb_firefighters where biz_org_code like CONCAT('%',#{bizOgrCode}, '%') AND people_type = '1601'
AND is_delete = 0 AND now() > rec_date
</select>
<!-- <select id="getSignStatistic" resultType="Map">-->
<!-- </select>-->
</mapper>
......@@ -572,11 +572,11 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
}
if (req!=null&&req.containsKey("bizOrgCode") && !ObjectUtils.isEmpty(req.get("bizOrgCode"))) {
LambdaQueryWrapper<OrgUsr> query = new LambdaQueryWrapper<>();
query.eq(OrgUsr::getBizOrgCode, req.get("bizOrgCode").toString());
OrgUsr orgUsr = this.getOne(query);
// LambdaQueryWrapper<OrgUsr> query = new LambdaQueryWrapper<>();
// query.eq(OrgUsr::getBizOrgCode, req.get("bizOrgCode").toString());
// OrgUsr orgUsr = this.getOne(query);
map.put("bizOrgCode", req.get("bizOrgCode"));
req.remove("bizOrgCode");
map.put("company", orgUsr.getSequenceNbr().toString());
}
/* BUG2680 查询部门人员错误 传递参数类型不正确 修改为string 2021-09-14 陈召 开始 */
if (!req.isEmpty()&&req.containsKey("parentId") && req.get("parentId") != null && req.get("parentId") != "") {
......@@ -3580,6 +3580,13 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
orgUsrMapper.updatePersonStatus(status,id);
}
@Override
public String reportResult(String startTime, String endTime, String bizOrgCode) {
List<Map<String, Object>> stringObjectMap = orgUsrMapper.reportResult(startTime, endTime, bizOrgCode);
return String.valueOf(stringObjectMap.size());
}
private RiskBizInfoVo getRiskBizInfo(RiskBizInfoVo riskBizInfoVo, PeopleInfoDto peopleInfoDto,String id) {
Map<String, Object> map = new HashMap<>();
riskBizInfoVo.setWarningObjectName(peopleInfoDto.getFirefighters().getName());
......
......@@ -6,11 +6,14 @@ import com.yeejoin.equipmanage.common.entity.dto.FireResourceStatsDTO;
import com.yeejoin.equipmanage.service.IFireResourceSupervisionService;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
......@@ -29,9 +32,11 @@ public class FireResourceSupervisionController extends BaseController {
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET", value = "消防系统、监测部件、消防车辆统计信息查询", notes = "聚合接口: 消防系统、监测部件、消防车辆统计信息查询")
@RequestMapping(value = "/stats", method = RequestMethod.GET)
public ResponseModel<Object> stats() {
ReginParams reginParams = getSelectedOrgInfo();
String bizOrgCode = reginParams.getPersonIdentity().getCompanyBizOrgCode();
public ResponseModel<Object> stats(@RequestParam(value = "bizOrgCode", required = false) String bizOrgCode) {
if (StringUtils.isBlank(bizOrgCode)) {
ReginParams reginParams = getSelectedOrgInfo();
bizOrgCode = !ValidationUtil.isEmpty(reginParams.getPersonIdentity()) && StringUtils.isNotEmpty(reginParams.getPersonIdentity().getBizOrgCode()) ? reginParams.getPersonIdentity().getBizOrgCode() : null;
}
FireResourceStatsDTO fireSystemStats = iFireResourceSupervisionService.getFireSystemStats(bizOrgCode);
FireResourceStatsDTO monitorComponentStats = iFireResourceSupervisionService.getMonitorComponentStats(bizOrgCode);
FireResourceStatsDTO fireCarStats = iFireResourceSupervisionService.getFireCarStats(bizOrgCode);
......
package com.yeejoin.equipmanage.listener;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.yeejoin.equipmanage.common.entity.Car;
import com.yeejoin.equipmanage.common.entity.WlCarMileage;
import com.yeejoin.equipmanage.common.utils.CoordinateUtil;
import com.yeejoin.equipmanage.fegin.IotFeign;
import com.yeejoin.equipmanage.service.ICarService;
import com.yeejoin.equipmanage.service.IWlCarMileageService;
import com.yeejoin.equipmanage.service.impl.WlCarMileageServiceImpl;
import com.yeejoin.equipmanage.thread.ThreadCar;
import org.eclipse.paho.client.mqttv3.MqttException;
import org.eclipse.paho.client.mqttv3.MqttMessage;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
import org.springframework.util.ObjectUtils;
import org.typroject.tyboot.component.emq.EmqKeeper;
import org.typroject.tyboot.component.emq.EmqxListener;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.math.BigDecimal;
import java.net.HttpURLConnection;
import java.net.URL;
import java.text.ParseException;
......@@ -32,6 +32,7 @@ import java.util.*;
@Component
public class CarIotNewListener extends EmqxListener {
Logger logger = LoggerFactory.getLogger(CarIotNewListener.class);
@Autowired
private IWlCarMileageService iWlCarMileageService;
......@@ -41,7 +42,7 @@ public class CarIotNewListener extends EmqxListener {
@Autowired
private IotFeign iotFeign;
@Value("${mileage.clippingtime}")
@Value("${mileage.clippingtime:600000}")
private Long clipping_time;
private final String GUIDE_KEY = "813684495d9a3981dd2c7694916fe404";
......@@ -53,46 +54,23 @@ public class CarIotNewListener extends EmqxListener {
private static SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
// 用于根据topicId 也就是物联设备id 存储对应的线程来进行计时
private static HashMap<String, ThreadCar> deviceInfo = new HashMap();
private static HashMap<String, String> deviceLastInfo = new HashMap();
private static final HashMap<String, ThreadCar> deviceInfo = new HashMap();
private static final HashMap<String, String> deviceLastInfo = new HashMap();
@Override
public void processMessage(String topic, MqttMessage message) throws Exception {
System.out.println(topic);
System.out.println(message);
logger.info("----收到物联消息::topic---------------" + topic);
logger.info("----收到物联消息::message---------------" + message);
String measurement = topic.split("/")[0];
String deviceName = topic.split("/")[1];
String iotCode = measurement + deviceName;
JSONObject jsonObject = JSONObject.parseObject(message.toString());
//通过消息存电量到扩展字段2
this.updateEquipBattery(jsonObject,iotCode);
if (jsonObject.containsKey("FireCar_Longitude")) {
this.updateCarLocation(jsonObject, iotCode);
//如果map中已经存在该设备或者该设备有但是线程已经执行了
if ((!deviceInfo.containsKey(iotCode)) || (deviceInfo.containsKey(iotCode) && deviceInfo.get(iotCode) == null)) {
ThreadCar threadCar = new ThreadCar(topic, jsonObject, this.iWlCarMileageService, this.iotFeign, this.iCarService, this.emqkeeper, clipping_time);
deviceInfo.put(iotCode, threadCar);
threadCar.start();
}
String coordinate = jsonObject.getDoubleValue("FireCar_Longitude") + String.valueOf(jsonObject.getDoubleValue("FireCar_Latitude"));
if (!deviceLastInfo.containsKey(iotCode)) {
deviceLastInfo.put(iotCode, coordinate);
}
Long currentTime = new Date().getTime();
Long endTime = jsonObject.getLong("time");
// if ((startTime - endTime) <= 600000) {
if (((currentTime - endTime) <= clipping_time) && (!deviceLastInfo.get(iotCode).equals(coordinate))) {
try {
deviceInfo.get(iotCode).interrupt();
} catch (Exception e) {
}
ThreadCar threadCar = new ThreadCar(topic, jsonObject, this.iWlCarMileageService, this.iotFeign, this.iCarService, this.emqkeeper, clipping_time);
deviceInfo.put(iotCode, threadCar);
//更新车辆的最新坐标数据
deviceLastInfo.put(iotCode, coordinate);
threadCar.start();
}
this.updateEquipBattery(jsonObject, iotCode);
logger.info("当前设备信息info" + JSON.toJSONString(deviceInfo));
//判断是否有效数据
if (!ObjectUtils.isEmpty(jsonObject.get("FireCar_Longitude")) || !ObjectUtils.isEmpty(jsonObject.get("FireCar_Latitude"))) {
if (iWlCarMileageService.getUncompleteMileagByIotCode(iotCode)) {
WlCarMileage wlCarMileage = new WlCarMileage();
wlCarMileage.setIotCode(iotCode);
......@@ -105,10 +83,11 @@ public class CarIotNewListener extends EmqxListener {
wlCarMileage.setStartLatitude(startLatitude);
// Date startTime = UTCToCST();
//时间值被mysql自动转换
Date startTime = new Date((jsonObject.getLong("time")/1000)*1000);
Date startTime = new Date((jsonObject.getLong("time") / 1000) * 1000);
wlCarMileage.setStartTime(startTime);
wlCarMileage.setStartName(getAddress(startLongitude, startLatitude));
wlCarMileage.setStartSpeed(Double.valueOf(jsonObject.getDoubleValue("FireCar_Speed")).intValue());
logger.info("新增数据信息如下::" + JSONObject.toJSONString(wlCarMileage));
try {
iWlCarMileageService.save(wlCarMileage);
} catch (Exception e) {
......@@ -116,7 +95,40 @@ public class CarIotNewListener extends EmqxListener {
iWlCarMileageService.save(wlCarMileage);
}
}
this.updateCarLocation(jsonObject, iotCode);
//如果map中已经存在该设备或者该设备有但是线程已经执行了
//存储上报上来的经纬度信息
String coordinate = jsonObject.getDoubleValue("FireCar_Longitude") + String.valueOf(jsonObject.getDoubleValue("FireCar_Latitude"));
if ((!deviceInfo.containsKey(iotCode))) {
logger.info("topic---------------------" + topic + "开启计时线程");
ThreadCar threadCar = new ThreadCar(topic, jsonObject, this.iWlCarMileageService, this.iotFeign, this.iCarService, clipping_time);
deviceInfo.put(iotCode, threadCar);
threadCar.start();
}
if (!deviceLastInfo.containsKey(iotCode)) {
deviceLastInfo.put(iotCode, coordinate);
}
//获取打不过全部系统时间
Long currentTime = System.currentTimeMillis();
//获取上报的时间
Long endTime = jsonObject.getLong("time");
//如果当前时间减去上报时间大小于配置的时间并且之前没包含上报的数据
if (((currentTime - endTime) < clipping_time) && (!deviceLastInfo.get(iotCode).equals(coordinate))) {
try {
//销毁线程后移除
deviceInfo.get(iotCode).interrupt();
deviceInfo.remove(iotCode);
} catch (Exception e) {
}
logger.info("topic---------------------" + topic + "开启计时线程");
ThreadCar threadCar = new ThreadCar(topic, jsonObject, this.iWlCarMileageService, this.iotFeign, this.iCarService, clipping_time);
deviceInfo.put(iotCode, threadCar);
//更新车辆的最新坐标数据
deviceLastInfo.put(iotCode, coordinate);
threadCar.start();
}
}
}
public String getAddress(double longitude, double lantitude) {
......@@ -140,7 +152,7 @@ public class CarIotNewListener extends EmqxListener {
JSONObject regeocode = object.getJSONObject("regeocode");
String address = regeocode.getString("formatted_address");
if ("[]".equals(address)) {
System.out.println("===============无效坐标:" + longitude + "," + lantitude);
logger.info("===============无效坐标:" + longitude + "," + lantitude);
address = "无效坐标";
}
res = new StringBuilder(address);
......@@ -191,7 +203,7 @@ public class CarIotNewListener extends EmqxListener {
car.setLongitude(startLongitude);
car.setLatitude(startLatitude);
iCarService.updateById(car);
System.out.println("-----------推送车辆位置消息到到地图成功--------");
logger.info("-----------推送车辆位置消息到到地图成功--------");
try {
emqkeeper.getMqttClient().publish("car/location", mqttMessage);
} catch (MqttException e) {
......@@ -218,7 +230,7 @@ public class CarIotNewListener extends EmqxListener {
if (car != null && power != 0) {
car.setExtra2(power.toString());
iCarService.updateById(car);
System.out.println("-----------更新车辆设备电池电量成功--------");
logger.info("-----------更新车辆设备电池电量成功--------");
}
}
}
......@@ -87,4 +87,6 @@ public interface CarMapper extends BaseMapper<Car> {
Integer getCarCategoryCountByCategoryID(Long categoryID);
List<CarEquipStateInfoDto> getCarEquipStateInfo();
List<CarEquipAlarmInfoDto> getCarEquipAlarmInfo(Integer batteryNumber);
void updateStatusByIds(List<String> carIds, String status);
}
......@@ -36,4 +36,7 @@ public interface CarPropertyMapper extends BaseMapper<CarProperty> {
List<CarPropertyVo> getCarPropertyListByCarIds(@Param("list") List<Long> carIds);
Map<String, Object> getCarPropertyByCarIds(List<Long> carIds);
List<Map<String, Object>> selectIndexByTime(String carStartIndexKey);
}
package com.yeejoin.equipmanage.quartz;
import com.yeejoin.equipmanage.service.ICarService;
import com.yeejoin.equipmanage.service.impl.CarServiceImpl;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
/**
* 定时监控车辆相关指标
* @author xxz
*/
@Component
@EnableScheduling
@Slf4j
public class CarPropertyJob {
@Autowired
private ICarService carService;
/**
* 车辆赋红码。定时查询车辆启停更新时间,
*/
@Scheduled(cron = "${update.car.qrCode}")
public void UpdateCarQrCode(){
carService.updateCarStartStatus();
}
}
......@@ -207,4 +207,11 @@ public interface ICarService extends IService<Car> {
List<CarExportDto> exportCarMileageInfoByMoth(String date);
ZZChartsDto getCarMileageInfoByMothOFDay(String iotCode);
Page<CarExceptionDto> getCarExcepitonTrack(Integer type);
/**
* 查询车辆启动状态,赋码
*/
void updateCarStartStatus();
}
......@@ -156,6 +156,9 @@ public class CarServiceImpl extends ServiceImpl<CarMapper, Car> implements ICarS
@Autowired
private IEquipmentCategoryService iEquipmentCategoryService;
@Autowired
private CarPropertyMapper carPropertyMapper;
@Value("${equip.dict.car-state}")
private String carState;
......@@ -175,6 +178,8 @@ public class CarServiceImpl extends ServiceImpl<CarMapper, Car> implements ICarS
@Lazy
private IWlCarMileageService iWlCarMileageService;
private final String CAR_START_INDEX_KEY = "FireCar_Start";
/**
* 当前登录用户信息
*/
......@@ -1962,4 +1967,16 @@ public class CarServiceImpl extends ServiceImpl<CarMapper, Car> implements ICarS
page.setSize(10);
return page;
}
@Override
public void updateCarStartStatus() {
List<Map<String, Object>> list = carPropertyMapper.selectIndexByTime(CAR_START_INDEX_KEY);
List<String> carIds = list.stream().map(o -> String.valueOf(o.get("carId"))).collect(Collectors.toList());
// 近七天未启动赋红码
updateCarQrCode(carIds, "2");
}
private void updateCarQrCode(List<String> carIds, String status) {
carMapper.updateStatusByIds(carIds, status);
}
}
......@@ -56,6 +56,7 @@ import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.net.Inet4Address;
import java.net.InetAddress;
import java.net.NetworkInterface;
......@@ -139,10 +140,10 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
@Autowired
private JCSRemoteService jcsRemoteService;
@Autowired
private EquipmentSpecificMapper equipmentSpecificMapper;
@Autowired
private VideoMapper videoMapper;
......@@ -2397,7 +2398,7 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
return fireFightingSystemMapper.getStationStatusStatistics();
}
@Override
public void resetMorphic() {
try {
......@@ -2440,15 +2441,15 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
videoInScene = "".equals(videoInScene) ? action.getSequenceNbr().toString()
: videoInScene + "," + action.getSequenceNbr();
}
}
parse.setChildren(newPointList);
System.out.println("parse="+JSONObject.toJSONString(parse));
resourceDTO.setContent(JSONObject.toJSONString(parse));
System.out.println("resourceDTO="+JSONObject.toJSONString(resourceDTO));
FeignUtil.remoteCall(() -> Morphic.morphicSubjectClient.update(resourceDTO));
sourceScene.setPointInScene(pointInScene);
sourceScene.setVideoInScene(videoInScene);
System.out.println("sourceScene="+JSONObject.toJSONString(sourceScene));
......@@ -2474,8 +2475,12 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
BigDecimal redNum = new BigDecimal(String.valueOf(resultMap.get("redCode")));
BigDecimal yellowNum = new BigDecimal(String.valueOf(resultMap.get("yellowCode")));
BigDecimal errorNum = redNum.add(yellowNum);
BigDecimal ratePercent = errorNum.divide(total, 2, BigDecimal.ROUND_HALF_UP);
map.put("ratePercent", ratePercent + "%");
if (total.compareTo(BigDecimal.ZERO) == 0) {
map.put("ratePercent", "0%");
} else {
BigDecimal ratePercent = errorNum.divide(total, 2, RoundingMode.HALF_UP);
map.put("ratePercent", ratePercent.multiply(new BigDecimal(100)) + "%");
}
return map;
}
......
......@@ -16,6 +16,7 @@ import com.yeejoin.equipmanage.fegin.IotFeign;
import com.yeejoin.equipmanage.mapper.WlCarMileageMapper;
import com.yeejoin.equipmanage.service.ICarService;
import com.yeejoin.equipmanage.service.IWlCarMileageService;
import com.yeejoin.equipmanage.thread.ThreadCarMileageTreatment;
import org.apache.commons.lang3.ObjectUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
......@@ -348,7 +349,6 @@ public class WlCarMileageServiceImpl extends ServiceImpl<WlCarMileageMapper, WlC
start.getDoubleValue("FireCar_Longitude"), end.getDoubleValue("FireCar_Latitude"),
end.getDoubleValue("FireCar_Longitude"));
}
// 查询车辆最新位置
String address = getAddress(startLongitude, startLatitude);
// 里程耗时
......@@ -362,7 +362,7 @@ public class WlCarMileageServiceImpl extends ServiceImpl<WlCarMileageMapper, WlC
item.setTravel(new BigDecimal(travel / 1000).setScale(1, BigDecimal.ROUND_HALF_UP).doubleValue());
item.setTakeTime(takeTime);
this.getBaseMapper().updateById(item);
log.info("-----------结束里程成功:::"+JSONObject.toJSONString(item)+"-----------------");
// 从0点开启新里程
item.setStartName(address);
item.setDate(date);
......@@ -379,10 +379,21 @@ public class WlCarMileageServiceImpl extends ServiceImpl<WlCarMileageMapper, WlC
item.setStartLongitude(startLongitude);
item.setStartLatitude(startLatitude);
this.baseMapper.insert(item);
log.info("-----------新增开始里程成功:::"+JSONObject.toJSONString(item)+"-----------------");
//根据iotcode获取车辆并且同步经纬度到车辆
Car car = iCarService.getOne(new QueryWrapper<Car>().eq("iot_code", item.getIotCode()));
car.setLongitude(startLongitude);
car.setLatitude(startLatitude);
iCarService.saveOrUpdate(car);
log.info("-----------更新车辆坐标成功:::"+JSONObject.toJSONString(item)+"-----------------");
}
});
log.info("轨迹切分任务执行完成..............");
log.info("-------------------对于切割完成的数据进行倒计时操作----------------------------------");
ThreadCarMileageTreatment threadCarMileageTreatment = new ThreadCarMileageTreatment();
log.info("-------------------对于切割完成的数据进行倒计时开始----------------------------------");
threadCarMileageTreatment.start();
log.info("-------------------对于切割完成的数据进行倒计时结束----------------------------------");
}
@Override
......
package com.yeejoin.equipmanage.thread;
import ch.qos.logback.core.joran.conditional.ElseAction;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
......@@ -13,6 +14,9 @@ import com.yeejoin.equipmanage.utils.CarUtils;
import org.eclipse.paho.client.mqttv3.MqttException;
import org.eclipse.paho.client.mqttv3.MqttMessage;
import org.jfree.util.Log;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.util.ObjectUtils;
import org.typroject.tyboot.component.emq.EmqKeeper;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
......@@ -23,24 +27,23 @@ import java.util.List;
import java.util.Timer;
import java.util.concurrent.TimeUnit;
public class ThreadCar extends Thread {
public class
ThreadCar extends Thread {
Logger logger = LoggerFactory.getLogger(ThreadCar.class);
private IWlCarMileageService iWlCarMileageService;
private IotFeign iotFeign;
private String topic;
private Long clippingTime;
ICarService iCarService;
private EmqKeeper emqkeeper;
private JSONObject jsonObject;
public ThreadCar(String topic, JSONObject jsonObject, IWlCarMileageService iWlCarMileageService, IotFeign iotFeign, ICarService iCarService, EmqKeeper emqkeeper, Long clippingTime) {
public ThreadCar(String topic, JSONObject jsonObject, IWlCarMileageService iWlCarMileageService, IotFeign iotFeign, ICarService iCarService, Long clippingTime) {
this.topic = topic;
this.jsonObject = jsonObject;
this.iWlCarMileageService = iWlCarMileageService;
this.iotFeign = iotFeign;
this.iCarService = iCarService;
this.emqkeeper = emqkeeper;
this.clippingTime = clippingTime;
}
......@@ -51,7 +54,8 @@ public class ThreadCar extends Thread {
JSONObject lastObj = null;
WlCarMileage last = null;
try {
Log.info("-------------------------" + this.topic + "结束坐标开始计时------------------------------");
Long startTime = System.currentTimeMillis();
logger.info("=============================================" + topic + "结束坐标开始计时=======================================");
this.sleep(clippingTime);
//业务处理
//如果十分钟没有坐标,则需要设置结束标记
......@@ -67,7 +71,6 @@ public class ThreadCar extends Thread {
last.getStartTime(), new Date(new Date().getTime() + 2000));
List<Object> list = result.getResult();
if (list != null && list.size() > 0) {
// 过滤空坐标
List<Object> filterList = new ArrayList<Object>();
for (int i = 0; i < list.size(); i++) {
......@@ -82,14 +85,13 @@ public class ThreadCar extends Thread {
}
}
}
// JSONObject lastObj =
// JSONObject.parseObject(JSONObject.toJSONString(list.get(list.size() - 1)));
if (lastObj == null) {
lastObj = new JSONObject();
lastObj.put("FireCar_Longitude", last.getStartLongitude());
lastObj.put("FireCar_Latitude", last.getEndLatitude());
lastObj.put("time", 0);
lastObj.put("FireCar_Speed", 0);
logger.info("---过滤后last信息为null时的数据::" + JSONObject.toJSONString(last));
}
double endLongitude = lastObj.getDoubleValue("FireCar_Longitude");
double endLatitude = lastObj.getDoubleValue("FireCar_Latitude");
......@@ -97,15 +99,25 @@ public class ThreadCar extends Thread {
Date endTime = new Date();
//实时库中的时间虽然坐标与记录的一致,但是更新时间可能最新,故可能会有记录的结束时间早于开始时间
long takeTime = (endTime.getTime() / 1000 * 1000) - (last.getStartTime().getTime() / 1000 * 1000);
if(takeTime<0){
takeTime = 0-takeTime;
if (takeTime < 0) {
takeTime = 0 - takeTime;
}
last.setTakeTime(takeTime);
last.setEndLongitude(endLongitude);
last.setEndLatitude(endLatitude);
last.setEndTime(endTime);
last.setEndName(CarUtils.getAddress(endLongitude, endLatitude));
last.setEndSpeed(lastObj.getIntValue("FireCar_Speed"));
last.setTakeTime(takeTime);
//原来的写法不够健壮,如果上报的数据为double写法则会直接报凑错
try {
Double.valueOf(jsonObject.getDoubleValue("FireCar_Speed")).intValue();
if (ObjectUtils.isEmpty(lastObj.containsKey("FireCar_Speed"))) {
last.setEndSpeed(0);
} else {
last.setEndSpeed(Double.valueOf(jsonObject.getString("FireCar_Speed")).intValue());
}
} catch (Exception exception) {
last.setEndSpeed(0);
}
double travel = 0.0;
// 获取里程
for (int i = 0; i < filterList.size() - 1; i++) {
......@@ -115,15 +127,24 @@ public class ThreadCar extends Thread {
start.getDoubleValue("FireCar_Longitude"), end.getDoubleValue("FireCar_Latitude"),
end.getDoubleValue("FireCar_Longitude"));
}
last.setTravel(new BigDecimal(travel / 1000).setScale(1, BigDecimal.ROUND_HALF_UP).doubleValue());
Double travle =new BigDecimal(travel / 1000).setScale(1, BigDecimal.ROUND_HALF_UP).doubleValue();
logger.info("---------------------本次里程::"+travle+"---------------------------------------");
last.setTravel(travle);
iWlCarMileageService.updateById(last);
Log.info("============================================================更新结束坐标成功==========:"+topic);
this.interrupt();
Long lastTime = System.currentTimeMillis();
logger.info("---正常时获取到的获取last信息::" + JSONObject.toJSONString(last));
logger.info("--------------" + topic + "结束坐标成功::花费时间====" + String.valueOf((lastTime - startTime) / 60000) + "分钟-------------------------");
logger.info("============================================================更新结束坐标成功==============================================:" + topic);
}
} catch (Exception exception) {
if (last != null) {
logger.info("---异常时获取到的获取last信息::" + JSONObject.toJSONString(last));
iWlCarMileageService.updateById(last);
}
} finally {
logger.info("销毁车辆倒计时线程::topic_" + topic);
this.interrupt();
}
}
......
......@@ -14,9 +14,12 @@ import com.yeejoin.equipmanage.service.impl.WlCarMileageServiceImpl;
import com.yeejoin.equipmanage.utils.CarUtils;
import liquibase.pro.packaged.E;
import org.jfree.util.Log;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
import org.springframework.util.ObjectUtils;
import org.typroject.tyboot.component.emq.EmqKeeper;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
......@@ -28,6 +31,7 @@ import java.util.List;
@Component
public class ThreadCarMileageTreatment extends Thread {
Logger logger = LoggerFactory.getLogger(ThreadCarMileageTreatment.class);
@Autowired
private WlCarMileageServiceImpl wlCarMileageServiceImpl;
......@@ -40,7 +44,7 @@ public class ThreadCarMileageTreatment extends Thread {
@Override
public void run() {
Log.info("----------------------------------------------------开始处理未结束里程---------------------------------");
logger.info("----------------------------------------------------开始处理未结束里程---------------------------------");
HashMap<String, String> hashMap = new HashMap<>();
//toDo
WlCarMileage last = null;
......@@ -82,7 +86,7 @@ public class ThreadCarMileageTreatment extends Thread {
lastObj = Obj;
}
}
Log.info("----------------------------------------lastobj----------------------"+lastObj.toJSONString());
logger.info("----------------------------------------lastobj----------------------"+lastObj.toJSONString());
if (lastObj == null) {
lastObj = new JSONObject();
lastObj.put("FireCar_Longitude", last.getStartLongitude());
......@@ -97,12 +101,22 @@ public class ThreadCarMileageTreatment extends Thread {
if(takeTime<0){
takeTime = 0-takeTime;
}
last.setTakeTime(takeTime);
last.setEndLongitude(endLongitude);
last.setEndLatitude(endLatitude);
last.setEndTime(endTime);
last.setEndName(CarUtils.getAddress(endLongitude, endLatitude));
last.setEndSpeed(lastObj.getIntValue("FireCar_Speed"));
last.setTakeTime(takeTime);
//原来的写法不够健壮,如果上报的数据为double写法则会直接报凑错
try {
Double.valueOf(lastObj.getDoubleValue("FireCar_Speed")).intValue();
if (ObjectUtils.isEmpty(lastObj.containsKey("FireCar_Speed"))) {
last.setEndSpeed(0);
} else {
last.setEndSpeed(Double.valueOf(lastObj.getString("FireCar_Speed")).intValue());
}
} catch (Exception exception) {
last.setEndSpeed(0);
}
double travel = 0.0;
// 获取里程
for (int k = 0; k < filterList.size() - 1; k++) {
......@@ -112,14 +126,17 @@ public class ThreadCarMileageTreatment extends Thread {
start.getDoubleValue("FireCar_Longitude"), end.getDoubleValue("FireCar_Latitude"),
end.getDoubleValue("FireCar_Longitude"));
}
last.setTravel(new BigDecimal(travel / 1000).setScale(1, BigDecimal.ROUND_HALF_UP).doubleValue());
Log.info("----------------------------------------last----------------------"+lastObj.toJSONString());
// wlCarMileageServiceImpl.updateById(last);
Double travle =new BigDecimal(travel / 1000).setScale(1, BigDecimal.ROUND_HALF_UP).doubleValue();
logger.info("---------------------本次里程::"+travle+"---------------------------------------");
last.setTravel(travle);
logger.info("----------------------------------------last----------------------"+lastObj.toJSONString());
wlCarMileageServiceImpl.updateById(last);
}
}
}
} catch (Exception exception) {
exception.printStackTrace();
logger.info(exception.getMessage());
wlCarMileageServiceImpl.updateById(last);
}
}
......
......@@ -5,11 +5,14 @@ import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import com.yeejoin.amos.boot.module.jcs.api.service.IFireResourceSupervisionService;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
......@@ -26,9 +29,11 @@ public class FireResourceSupervisionController extends BaseController {
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET", value = "驻站消防员、运维人员统计信息查询", notes = "驻站消防员、运维人员统计信息查询")
@RequestMapping(value = "/stats", method = RequestMethod.GET)
public ResponseModel<Object> stats() {
ReginParams reginParams = getSelectedOrgInfo();
String bizOrgCode = reginParams.getPersonIdentity().getCompanyBizOrgCode();
public ResponseModel<Object> stats(@RequestParam(value = "bizOrgCode", required = false) String bizOrgCode) {
if (StringUtils.isBlank(bizOrgCode)) {
ReginParams reginParams = getSelectedOrgInfo();
bizOrgCode = !ValidationUtil.isEmpty(reginParams.getPersonIdentity()) && StringUtils.isNotEmpty(reginParams.getPersonIdentity().getBizOrgCode()) ? reginParams.getPersonIdentity().getBizOrgCode() : null;
}
Map<String, Map<String, Number>> personnelStats = iFireResourceSupervisionService.getPersonnelStats(bizOrgCode);
return ResponseHelper.buildResponse(personnelStats);
}
......
package com.yeejoin.amos.boot.module.jcs.biz.controller;
import com.yeejoin.amos.boot.module.common.api.service.IOrgUsrService;
import com.yeejoin.amos.boot.module.common.biz.utils.CommonResponseUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
@Api(tags = "报表填充字段接口")
@RestController
@RequestMapping("/reportSource")
public class ReportController {
@Autowired
private IOrgUsrService orgUsrService;
@TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
@ApiOperation(value = "获取换流站已配备消防人员的换流站数量", notes = "获取换流站已配备消防人员的换流站数量")
@RequestMapping(value = "/station/count", produces = "application/json;charset=UTF-8", method = RequestMethod.GET)
public ResponseModel getPersonDetailById(@RequestParam(value = "bizOrgCode") String bizOrgCode,
@RequestParam(value = "startTime") String startTime,
@RequestParam(value = "endTime") String endTime
) {
return CommonResponseUtil.success(orgUsrService.reportResult(startTime,endTime, bizOrgCode));
}
}
......@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.module.jcs.biz.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.yeejoin.amos.boot.biz.common.utils.DateUtils;
import com.yeejoin.amos.boot.module.common.api.core.framework.PersonIdentify;
import com.yeejoin.amos.boot.module.common.api.dto.FormValue;
import com.yeejoin.amos.boot.module.common.api.dto.OrgPersonFormDto;
import com.yeejoin.amos.boot.module.common.api.entity.OrgUsr;
......@@ -17,6 +18,7 @@ import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import com.yeejoin.amos.boot.module.jcs.biz.service.impl.SignServiceImpl;
......@@ -125,7 +127,36 @@ public class SignController extends BaseController {
Page<SignDto> page = new Page<SignDto>();
page.setCurrent(dto.getCurrent());
page.setSize(dto.getSize());
return ResponseHelper.buildResponse(signServiceImpl.queryForSignPageByMapper(page, dto));
IPage<SignDto> page1 = signServiceImpl.queryForSignPageByMapper(page, dto);
if (0 < page1.getRecords().size()) {
for(SignDto d : page1.getRecords()){
QueryWrapper<OrgUsr> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("sequence_nbr",d.getSignUserId());
queryWrapper.eq("is_delete",0);
OrgUsr orgUsr = iOrgUsrService.getOne(queryWrapper);
try {
OrgPersonFormDto orgPersonFormDto = iOrgUsrService.selectPersonById(orgUsr.getSequenceNbr());
List<FormValue> personImg = orgPersonFormDto.getDynamicFormAlert().stream().filter(e -> e.getKey().equals("personImg")).collect(Collectors.toList());
d.setPersonPhotos(personImg.get(0).getValue());
} catch (Exception e) {
e.printStackTrace();
}
}
}
return ResponseHelper.buildResponse(page1);
}
/**
* 人员信息卡统计打卡
*
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET",value = "人员信息卡统计打卡", notes = "人员信息卡统计打卡")
@GetMapping(value = "/statistic")
public ResponseModel<Map<String, Object>> getSignStatistic(@RequestParam(value = "userId" , required = false) String userId,
@RequestParam(value = "bizOrgCode" , required = false) String bizOrgCode) {
return ResponseHelper.buildResponse(signServiceImpl.getSignStatistic(userId, bizOrgCode));
}
/**
......
......@@ -111,6 +111,16 @@ public class SignServiceImpl extends BaseService<SignDto,Sign,SignMapper> implem
}
@Override
public Map<String, Object> getSignStatistic(String userId, String bizOrgCode) {
// 人员缺卡统计暂无法统计,只知道person_of_day需要打卡总人数,但是打一次卡和哪些人打卡无法获取,此处返回了默认值
// this.baseMapper.getSignStatistic(bizOrgCode, userId);
Map<String, Object> map = new HashMap<>();
map.put("totalNum", 50);
map.put("loss", 4);
return map;
}
@Override
public Boolean saveSign(SignDto dot) {
Sign sign = new Sign();
Map<String,Object> bizOrgCodeAndBizOrgName = iFirefightersService.getCompanyName(dot.getBizOrgCode());
......
......@@ -916,4 +916,41 @@ public class CheckController extends AbstractBaseController {
return CommonResponseUtil.failure(e.getMessage());
}
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
@RequestMapping(value = "/people/statistic", method = RequestMethod.GET, produces = "application/json;charset=UTF-8")
public CommonResponse getPeopleStatistic(
@RequestParam(required = false) String bizOrgCode,
@RequestParam(required = false) String userId) {
try {
return CommonResponseUtil.success(checkService.getPeopleStatistic(bizOrgCode, userId));
} catch (Exception e) {
return CommonResponseUtil.failure(e.getMessage());
}
}
@TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
@RequestMapping(value = "/people/page", method = RequestMethod.GET, produces = "application/json;charset=UTF-8")
public CommonResponse getPeoplePatrolPage(
@RequestParam(required = false) String bizOrgCode,
@RequestParam(required = false) String userId,
int pageNumber,
int pageSize) {
CheckInfoPageParam param = new CheckInfoPageParam();
param.setBizOrgCode(bizOrgCode);
param.setUserId(userId);
ReginParams reginParams = getSelectedOrgInfo();
param.setOrderBy("checkDate desc");
param.setBizOrgCode(ObjectUtils.isEmpty(param.getBizOrgCode()) ? reginParams.getPersonIdentity().getBizOrgCode() : param.getBizOrgCode());
CommonPageable commonPageable = new CommonPageable();
commonPageable.setPageNumber(pageNumber);
commonPageable.setPageSize(pageSize);
if(commonPageable !=null){
param.setPageNumber(commonPageable.getPageNumber()-1);
param.setPageSize(commonPageable.getPageSize());
}
Page<CheckInfoVo> list = checkService.getPeoplePatrolPage(param);
return CommonResponseUtil.success(list);
}
}
......@@ -38,8 +38,11 @@ public class ControlScreenController extends AbstractBaseController {
@GetMapping("/statics")
@ApiOperation(value = "消防运维信息")
@TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
public CommonResponse getStatics(@RequestParam(required = false) String companyCode) {
return CommonResponseUtil.success(iPlanTaskService.getStatics(companyCode));
public CommonResponse getStatics(
@RequestParam(required = false) String companyCode,
@RequestParam(required = false) String bizOrgCode
) {
return CommonResponseUtil.success(iPlanTaskService.getStatics(companyCode, bizOrgCode));
}
}
......@@ -278,4 +278,10 @@ public interface CheckMapper extends BaseMapper {
List<Map<String, Object>> selectCheckById(@Param(value = "taskId") Long taskId, @Param(value = "pointId") Long pointId);
List<Map<String, Object>> queryCheckInputItemsByCheckId(@Param(value="checkId") long checkId);
Map<String, Object> getPeopleStatistic(@Param(value = "bizOrgCode") String bizOrgCode, @Param(value = "userId") String userId);
long getPeoplePageCount(CheckInfoPageParam param);
List<CheckInfoVo> getPeopleCheckPage(CheckInfoPageParam param);
}
package com.yeejoin.amos.patrol.business.service.impl;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.google.common.base.Joiner;
......@@ -20,6 +21,7 @@ import com.yeejoin.amos.patrol.business.dao.repository.*;
import com.yeejoin.amos.patrol.business.dto.CheckDto;
import com.yeejoin.amos.patrol.business.entity.mybatis.*;
import com.yeejoin.amos.patrol.business.feign.EquipFeign;
import com.yeejoin.amos.patrol.business.feign.IdxFeign;
import com.yeejoin.amos.patrol.business.feign.JcsFeignClient;
import com.yeejoin.amos.patrol.business.param.*;
import com.yeejoin.amos.patrol.business.service.intfc.ICheckService;
......@@ -30,6 +32,7 @@ import com.yeejoin.amos.patrol.business.util.CheckDetailInputPageParam;
import com.yeejoin.amos.patrol.business.util.Toke;
import com.yeejoin.amos.patrol.business.vo.CheckAnalysisVo;
import com.yeejoin.amos.patrol.business.vo.CheckInfoVo;
import com.yeejoin.amos.patrol.business.vo.DefectVo;
import com.yeejoin.amos.patrol.common.enums.CheckStatusEnum;
import com.yeejoin.amos.patrol.common.enums.PointLevelEnum;
import com.yeejoin.amos.patrol.common.enums.PointStatusEnum;
......@@ -110,6 +113,9 @@ public class CheckServiceImpl implements ICheckService {
@Autowired
private CheckInputMapper checkInputMapper;
@Autowired
private IdxFeign idxFeign;
public static final Logger log = LoggerFactory.getLogger(CheckServiceImpl.class);
@Override
......@@ -162,6 +168,36 @@ public class CheckServiceImpl implements ICheckService {
return new PageImpl<>(content, param, total);
}
public Page<CheckInfoVo> getPeoplePatrolPage(CheckInfoPageParam param) {
long total = checkMapper.getPeoplePageCount(param);
List<CheckInfoVo> content = Lists.newArrayList();
if (total == 0) {
return new PageImpl<>(content, param, total);
}
content = checkMapper.getPeopleCheckPage(param);
for (CheckInfoVo infoVo : content) {
FeignClientResult responseModel = new FeignClientResult();
List result = new ArrayList();
try {
responseModel = idxFeign.queryDefectByCodes(new ArrayList<>(), infoVo.getId());
result = (List) responseModel.getResult();
} catch (Exception e) {
e.printStackTrace();
}
List<DefectVo> res = new ArrayList();
if (result != null && 0 < result.size()) {
for(Object object : result) {
DefectVo vo = JSON.parseObject(JSON.toJSONString(object), DefectVo.class);
res.add(vo);
}
infoVo.setError(ObjectUtils.isEmpty(res.get(0)) ? "" : res.get(0).getDefectDescribe());
infoVo.setProblemNum(ObjectUtils.isEmpty(res.get(0)) ? "" : res.get(0).getDefectNum());
infoVo.setHandleStatus(ObjectUtils.isEmpty(res.get(0)) ? "" : String.valueOf(res.get(0).getDefectStatus()));
}
}
return new PageImpl<>(content, param, total);
}
@Override
@Transactional
public void saveCheckImg(List<CheckShot> imgList) {
......@@ -2004,4 +2040,9 @@ public class CheckServiceImpl implements ICheckService {
public List<Long> getPlanCheckDataCount(HashMap<String, Object> param) {
return checkMapper.getPlanCheckDataCount(param);
}
@Override
public Map<String, Object> getPeopleStatistic(String bizOrgCode, String userId){
return checkMapper.getPeopleStatistic(bizOrgCode, userId);
}
}
......@@ -76,6 +76,7 @@ import java.io.FileInputStream;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.text.DateFormat;
import java.text.DecimalFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.time.LocalDateTime;
......@@ -2029,12 +2030,49 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
}
@Override
public List<Map<String, Object>> getStatics(String companyCode) {
String bizOrgCode = null;
if (StringUtil.isNotEmpty(companyCode)) {
public List<Map<String, Object>> getStatics(String companyCode, String bizOrgCode) {
if (StringUtils.isEmpty(bizOrgCode) && StringUtil.isNotEmpty(companyCode)) {
bizOrgCode = planTaskMapper.queryByCompanyCode(companyCode);
}
return planTaskMapper.getStatics(bizOrgCode);
List<Map<String, Object>> statics = planTaskMapper.getStatics(bizOrgCode);
int xcdw = 0;
int hgdw = 0;
int lcdw = 0;
for (Map<String, Object> map : statics
) {
if(map.get("code").equals("xfxcjrljxcdw")) {
xcdw = Integer.parseInt(map.get("value").toString());
}
if(map.get("code").equals("xfxchg")) {
hgdw = Integer.parseInt(map.get("value").toString());
}
if(map.get("code").equals("xfxcjrlcdw")) {
lcdw = Integer.parseInt(map.get("value").toString());
}
}
if(xcdw == 0) {
for (Map<String, Object> map : statics
) {
if(map.get("code").equals("xfxchgzb")) {
map.put("value","0");
}
if(map.get("code").equals("xfxclcl")) {
map.put("value","0");
}
}
} else {
for (Map<String, Object> map : statics
) {
if(map.get("code").equals("xfxchgzb")) {
map.put("value",(hgdw / xcdw)*100);
}
if(map.get("code").equals("xfxclcl")) {
map.put("value",(lcdw / xcdw)*100 );
}
}
}
return statics;
}
......
......@@ -262,4 +262,8 @@ public interface ICheckService {
List<HashMap<String,Object>> getEquipByCheckId(CheckDetailInputPageParam param);
Page<CheckInfoVo> getCheckInfoNew(String toke,String product,String appKey,CheckInfoPageParam param);
Page<CheckInfoVo> getPeoplePatrolPage(CheckInfoPageParam param);
Map<String, Object> getPeopleStatistic(String bizOrgCode, String userId);
}
......@@ -187,7 +187,7 @@ public interface IPlanTaskService {
*/
List<Map<String,Object>> firePatrolStatics(String bizOrgCode);
List<Map<String,Object>> getStatics(String companyCode);
List<Map<String,Object>> getStatics(String companyCode, String bizOrgCode);
/**
* 计划执行查询
......
......@@ -47,6 +47,26 @@ public class CheckInfoVo {
private String bizOrgName;
private String problemNum;
private String handleStatus;
public String getProblemNum() {
return problemNum;
}
public String getHandleStatus() {
return handleStatus;
}
public void setProblemNum(String problemNum) {
this.problemNum = problemNum;
}
public void setHandleStatus(String handleStatus) {
this.handleStatus = handleStatus;
}
public void setBizOrgName(String bizOrgName) {
this.bizOrgName = bizOrgName;
}
......
......@@ -12,6 +12,25 @@ public class LeavePlanTaskPointVo {
private String pointNO;
private String offline;
private String status;
private int shotMinNumber;
private int shotMaxNumber;
public int getShotMinNumber() {
return shotMinNumber;
}
public void setShotMinNumber(int shotMinNumber) {
this.shotMinNumber = shotMinNumber;
}
public int getShotMaxNumber() {
return shotMaxNumber;
}
public void setShotMaxNumber(int shotMaxNumber) {
this.shotMaxNumber = shotMaxNumber;
}
private String isFixed;
private String orderNo;
private String remark;
......
......@@ -62,6 +62,9 @@ jobs.day.cron = 0 5 0 * * ?
jobs.week.cron = 0 25 0 ? * 1
jobs.day.cron.old = 0 25 0 * * ?
# 定时更新车辆二维码
update.car.qrCode=0 01 00 * * ?
#数据同步开关
systemctl.sync.switch=false
#数据JCS开关
......
......@@ -714,4 +714,11 @@
FROM `wl_car`
where extra2 &lt; #{batteryNumber}
</select>
<update id="updateStatusByIds" parameterType="list">
UPDATE wl_car SET equip_status = #{status} WHERE id IN
<foreach collection="carIds" separator="," item="carId" open="(" close=")">
#{carId}
</foreach>
</update>
</mapper>
......@@ -97,4 +97,15 @@
</foreach>
AND equipment_index_key = '119car_Fire_foam'
</select>
<select id="selectIndexByTime" resultType="map">
SELECT
car_id carId
FROM
wl_car_property
WHERE
equipment_index_key = #{carStartIndexKey} AND `value` IS NOT NULL AND
DATE_SUB(CURDATE( ), INTERVAL 7 DAY ) > update_date
</select>
</mapper>
......@@ -5957,8 +5957,11 @@
COUNT( CASE WHEN wes.equip_status = '2' THEN 1 END ) AS redCodeCount
FROM
wl_equipment_specific wes
LEFT JOIN wl_equipment_detail wed ON wed.id = wes.equipment_detail_id
WHERE
wes.biz_org_code LIKE CONCAT(#{bizOrgCode}, '%')
AND wed.equipment_name IS NOT NULL
</select>
<select id="selectCarStats" resultType="java.util.Map">
......@@ -5968,8 +5971,11 @@
0 AS redCodeCount
FROM
wl_car wc
LEFT JOIN wl_equipment wle ON wle.id = wc.equipment_id
LEFT JOIN wl_equipment_category wec ON wle.category_id = wec.id
WHERE
wc.biz_org_code LIKE CONCAT(#{bizOrgCode}, '%')
and LEFT (wec.CODE, 6) = '210101'
</select>
<select id="getFireWaterInfo" resultType="Map">
......@@ -5979,33 +5985,13 @@
from
cb_water_resource
<where>
(resource_type = 'industryPool' or resource_type = 'pool')
<if test="bizOrgCode != null and bizOrgCode != ''">
biz_org_code like concat(#{bizOrgCode}, '%')
AND biz_org_code like concat(#{bizOrgCode}, '%')
</if>
</where>
) AS total,
(select
count(sequence_nbr)
from
cb_water_resource
<where>
resource_type = 'hydrant'
<if test="bizOrgCode != null and bizOrgCode != ''">
AND biz_org_code like concat(#{bizOrgCode}, '%')
</if>
</where>
) AS hydrant,
(select
count(sequence_nbr)
from
cb_water_resource
<where>
resource_type = 'crane'
<if test="bizOrgCode != null and bizOrgCode != ''">
AND biz_org_code like concat(#{bizOrgCode}, '%')
</if>
</where>
) AS crane,
(select
count(sequence_nbr)
from
......@@ -6022,28 +6008,6 @@
from
cb_water_resource
<where>
resource_type = 'natural'
<if test="bizOrgCode != null and bizOrgCode != ''">
AND biz_org_code like concat(#{bizOrgCode}, '%')
</if>
</where>
) AS `natural`,
(select
count(sequence_nbr)
from
cb_water_resource
<where>
resource_type = 'waterTank'
<if test="bizOrgCode != null and bizOrgCode != ''">
AND biz_org_code like concat(#{bizOrgCode}, '%')
</if>
</where>
) AS waterTank,
(select
count(sequence_nbr)
from
cb_water_resource
<where>
resource_type = 'industryPool'
<if test="bizOrgCode != null and bizOrgCode != ''">
AND biz_org_code like concat(#{bizOrgCode}, '%')
......@@ -6057,6 +6021,9 @@
sequence_nbr AS id,
biz_org_name AS bizOrgName,
resource_type_name AS typeName,
biz_org_code,
resource_type,
water_status,
name,
CASE
water_status
......@@ -6068,7 +6035,7 @@
'red'
END AS statusCode
from
cb_water_resource
(select * from cb_water_resource where resource_type = 'industryPool' or resource_type = 'pool') a
<where>
<if test="bizOrgCode != null and bizOrgCode != ''">
biz_org_code like concat(#{bizOrgCode}, '%')
......
......@@ -332,6 +332,57 @@
</choose>
</select>
<select id="getPeoplePageCount" resultType="long">
SELECT
count(1)
FROM
`p_check` `a`
<trim prefix="WHERE" prefixOverrides="AND ">
<if test="userId!=null and userId!=''">and find_in_set(#{userId}, a.user_id) > 0</if>
<if test="bizOrgCode != null and bizOrgCode != ''">
and a.org_code LIKE CONCAT(#{bizOrgCode},'%')
</if>
</trim>
<choose>
<when test="pageSize==-1"></when>
<when test="pageSize!=-1">limit #{offset},#{pageSize}</when>
</choose>
</select>
<select id="getPeopleCheckPage" resultMap="checkInfoMap">
SELECT
a.id,
a.user_id,
date_format(
`a`.`check_time`,
'%Y-%m-%d %H:%i:%s'
) AS `checkDate`,
(
CASE
WHEN `a`.`is_ok` = 1
THEN '合格'
WHEN `a`.`is_ok` = 2
THEN '不合格'
WHEN `a`.`is_ok` = 3
THEN '漏检'
END
) as is_ok
FROM
`p_check` `a`
<trim prefix="WHERE" prefixOverrides="AND ">
`a`.`is_ok` != 1
<if test="userId!=null and userId!=''">and find_in_set(#{userId}, a.user_id) > 0</if>
<if test="bizOrgCode != null and bizOrgCode != ''">
and a.org_code LIKE CONCAT(#{bizOrgCode},'%')
</if>
</trim>
order by ${orderBy}
<choose>
<when test="pageSize==-1"></when>
<when test="pageSize!=-1">limit #{offset},#{pageSize}</when>
</choose>
</select>
<select id="queryUnqualifiedInputItem" resultType="Map" parameterType="int">
SELECT
ii.name,
......@@ -2207,4 +2258,19 @@
ORDER BY
ci.order_no
</select>
<select id="getPeopleStatistic" resultType="Map">
SELECT
count(1) AS total
FROM
p_check pc
<where>
<if test="bizOrgCode !=null and bizOrgCode!='' ">
pc.org_code like CONCAT(#{bizOrgCode},'%')
</if>
<if test="bizOrgCode !=null and bizOrgCode!='' ">
AND pc.user_id = #{userId}
</if>
</where>
</select>
</mapper>
\ No newline at end of file
......@@ -826,6 +826,8 @@
p.offline,
ptd.is_finish status,
p.is_fixed isFixed,
p.shot_max_number shotMaxNumber,
p.shot_min_number shotMinNumber,dc-center/dc-center/
pt.route_id routeId,
c.id checkId,
pt.id planTaskId,
......@@ -1372,7 +1374,7 @@
UNION ALL
SELECT
'2' AS `key`,
ifnull( sum( ppk.`point_num` ), 0 ) AS `value`,
count(1) AS `value`,
'' AS unit,
'合格' AS `name`,
'xfxchg' AS code
......@@ -1394,14 +1396,22 @@
UNION ALL
SELECT
'4' AS `key`,
'' AS `value`,
count(1) AS `value`,
'' AS unit,
'不合格' AS `name`,
'xfxcbhg' AS code
FROM
`p_plan_task` ppk
LEFT JOIN p_plan_task_detail pptd ON pptd.task_no = ppk.id
WHERE
DATE_FORMAT( check_date, '%Y-%m-%d' ) = CURRENT_DATE () AND pptd.STATUS = 2
<if test="bizOrgCode != null and bizOrgCode != ''">
AND org_code LIKE CONCAT(#{bizOrgCode}, '%')
</if>
UNION ALL
SELECT
'5' AS `key`,
ifnull( sum( `p_plan_task`.`point_num` ), 0 ) AS `value`,
count(1) AS `value`,
'' AS unit,
'今日漏查点位' AS `name`,
'xfxcjrlcdw' AS code
......
......@@ -7,6 +7,7 @@ import org.apache.commons.lang3.StringUtils;
import org.apache.kafka.clients.consumer.ConsumerRecord;
import org.eclipse.paho.client.mqttv3.MqttException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.kafka.annotation.KafkaListener;
import org.springframework.kafka.support.Acknowledgment;
import org.springframework.stereotype.Service;
......@@ -28,9 +29,13 @@ public class KafkaConsumerService {
private static final String MQTT_TOPIC = "romaSite/data/transmit";
private static final String PROVINCE_MQTT_TOPIC = "province/data/transport";
@Value("${system.zxj}")
private boolean isZxj;
@Autowired
protected EmqKeeper emqKeeper;
/**
* 消费单条消息,topics 可以监听多个topic,如:topics = {"topic1", "topic2"}
*
......@@ -81,25 +86,27 @@ public class KafkaConsumerService {
*/
@KafkaListener(id = "provinceMessage", groupId = "province", topics = "#{'${kafka.risk.topics}'.split(',')}", concurrency = "2")
public void consumerSingle1(String message, Acknowledgment ack) {
Optional<?> messages = Optional.ofNullable(message);
if (messages.isPresent()) {
try {
JSONObject jsonObject = JSONObject.fromObject(message);
String type = jsonObject.optString("type");
String table = jsonObject.optString("table");
if (StringUtils.isNoneEmpty(type, table)) {
if(isZxj) {
Optional<?> messages = Optional.ofNullable(message);
if (messages.isPresent()) {
try {
JSONObject jsonObject = JSONObject.fromObject(message);
String type = jsonObject.optString("type");
String table = jsonObject.optString("table");
if (Arrays.asList(Constant.INSERT, Constant.UPDATE).contains(type) && DBTableTypeEnum.have(table) != null) {
JSONArray array = jsonObject.getJSONArray("data");
JSONObject data = (JSONObject) array.get(0);
data.put("dbType", type);
data.put("table", table);
emqKeeper.getMqttClient().publish(PROVINCE_MQTT_TOPIC, data.toString().getBytes(StandardCharsets.UTF_8), 0, false);
log.info("省级消息: {}", data);
if (Arrays.asList("INSERT", "UPDATE").contains(type)) {
JSONArray array = jsonObject.getJSONArray("data");
JSONObject data = (JSONObject)array.get(0);
data.put("dbType", type);
data.put("table", table);
emqKeeper.getMqttClient().publish(PROVINCE_MQTT_TOPIC, data.toString().getBytes(StandardCharsets.UTF_8), 0, false);
log.info("省级消息: {}", data);
}
}
} catch (MqttException e) {
log.error("消息转发失败" + e.getMessage(), e);
ack.acknowledge();
}
} catch (MqttException e) {
log.error("消息转发失败" + e.getMessage(), e);
ack.acknowledge();
}
}
}
......
#\u6CE8\u518C\u4E2D\u5FC3\u5730\u5740
eureka.client.service-url.defaultZone =http://172.16.10.216:10001/eureka/
eureka.client.service-url.defaultZone =http://172.16.11.201:10001/eureka/
eureka.instance.prefer-ip-address=true
management.endpoint.health.show-details=always
management.endpoints.web.exposure.include=*
eureka.instance.health-check-url-path=/actuator/health
eureka.instance.metadata-map.management.context-path=${server.servlet.context-path}/actuator
eureka.instance.status-page-url-path=/actuator/info
eureka.instance.metadata-map.management.api-docs=http://172.16.10.216:${server.port}${server.servlet.context-path}/swagger-ui.html
eureka.instance.metadata-map.management.api-docs=http://172.16.11.201:${server.port}${server.servlet.context-path}/swagger-ui.html
# kafka\u96C6\u7FA4\u4FE1\u606F
......@@ -74,7 +74,7 @@ management.health.redis.enabled=false
## emqx
emqx.clean-session=true
emqx.client-id=${spring.application.name}-${random.int[1024,65536]}
emqx.broker=tcp://172.16.10.216:1883
emqx.broker=tcp://172.16.11.201:1883
emqx.client-user-name=admin
emqx.client-password=public
emqx.max-inflight=1000
......@@ -86,14 +86,14 @@ emqx.max-inflight=1000
kafka.topics=JKXT2BP-XFZX-Topic
#\u9700\u8981\u76D1\u542C\u5F97eqm\u6D88\u606F\u4E3B\u9898 \u6839\u636E\u662F\u5426\u662F\u4E2D\u5FC3\u6781\u548C\u7AD9\u7AEF\u9009\u62E9\u9700\u8981\u76D1\u542C\u5F97\u4E3B\u9898\u8FDB\u884C\u914D\u7F6E emq.iot.created,
#emq.topic=emq.xf.created,emq.iot.created,emq.patrol.created,emq.sign.created,emq.bussSign.created,emq.user.created,emq.risk.created,emq.mcb.zxj
emq.topic=emq.xf.created,emq.iot.created,emq.patrol.created,emq.sign.created,emq.bussSign.created,emq.user.created,emq.risk.created,emq.mcb.zxj
##\u4E2D\u5FC3\u7EA7\u914D\u7F6E\u914D\u7F6E
##\u9700\u8981\u76D1\u542C\u5F97kafka\u6D88\u606F\u4E3B\u9898 \u6839\u636E\u662F\u5426\u662F\u4E2D\u5FC3\u6781\u548C\u7AD9\u7AEF\u9009\u62E9\u9700\u8981\u76D1\u542C\u5F97\u4E3B\u9898\u8FDB\u884C\u914D\u7F6E
kafka.risk.topics=JKXT2BP-XFYY-Topic
system.zxj=false
#
##\u9700\u8981\u76D1\u542C\u5F97eqm\u6D88\u606F\u4E3B\u9898 \u6839\u636E\u662F\u5426\u662F\u4E2D\u5FC3\u6781\u548C\u7AD9\u7AEF\u9009\u62E9\u9700\u8981\u76D1\u542C\u5F97\u4E3B\u9898\u8FDB\u884C\u914D\u7F6E emq.iot.created,
emq.topic=ccs-user-login-info,sync.execute,data/mcb/warning,emq.risk.qrcode.put,emq.risk.qrcode.clean
#emq.topic=ccs-user-login-info,sync.execute,data/mcb/warning,emq.risk.qrcode.put,emq.risk.qrcode.clean
queue.kafka.topics=null
kafka.auto-startup=false
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment