1
This commit is contained in:
273
mosty-bkzx/mosty-bkzx.iml
Normal file
273
mosty-bkzx/mosty-bkzx.iml
Normal file
@ -0,0 +1,273 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
|
||||
<component name="FacetManager">
|
||||
<facet type="Spring" name="Spring">
|
||||
<configuration />
|
||||
</facet>
|
||||
<facet type="web" name="Web">
|
||||
<configuration>
|
||||
<webroots />
|
||||
</configuration>
|
||||
</facet>
|
||||
<facet type="JRebel" name="JRebel">
|
||||
<configuration>
|
||||
<option name="ideModuleStorage">
|
||||
<map>
|
||||
<entry key="com.zeroturnaround.jrebel.FormatVersion" value="7.0.0" />
|
||||
<entry key="com.zeroturnaround.jrebel.remoting.DeleteUnindexedFiles" value="false" />
|
||||
<entry key="com.zeroturnaround.jrebel.remoting.ModuleRemoteServerSelection" value="off" />
|
||||
<entry key="jrebelEnabled" value="true" />
|
||||
<entry key="lastExternalPluginCheckTime" value="1721024353924" />
|
||||
</map>
|
||||
</option>
|
||||
<option name="version" value="2" />
|
||||
</configuration>
|
||||
</facet>
|
||||
</component>
|
||||
<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$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/target" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter:2.2.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot:2.2.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-context:5.2.8.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-aop:5.2.8.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-expression:5.2.8.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-autoconfigure:2.2.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-logging:2.2.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: ch.qos.logback:logback-classic:1.2.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-to-slf4j:2.12.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-api:2.13.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.slf4j:jul-to-slf4j:1.7.30" 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.8.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-jcl:5.2.8.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.yaml:snakeyaml:1.25" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-test:2.2.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-test:2.2.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-test-autoconfigure:2.2.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.jayway.jsonpath:json-path:2.4.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: net.minidev:json-smart:2.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: net.minidev:accessors-smart:1.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.ow2.asm:asm:5.0.4" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.30" level="project" />
|
||||
<orderEntry type="library" name="Maven: jakarta.xml.bind:jakarta.xml.bind-api:2.3.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: jakarta.activation:jakarta.activation-api:1.2.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.junit.jupiter:junit-jupiter:5.6.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.junit.jupiter:junit-jupiter-api:5.6.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.opentest4j:opentest4j:1.2.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.junit.platform:junit-platform-commons:1.6.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.junit.jupiter:junit-jupiter-params:5.6.2" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: org.junit.jupiter:junit-jupiter-engine:5.6.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.junit.vintage:junit-vintage-engine:5.6.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apiguardian:apiguardian-api:1.1.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.junit.platform:junit-platform-engine:1.6.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: junit:junit:4.12" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.mockito:mockito-junit-jupiter:3.1.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.assertj:assertj-core:3.13.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.hamcrest:hamcrest:2.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.mockito:mockito-core:3.1.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: net.bytebuddy:byte-buddy:1.10.6" level="project" />
|
||||
<orderEntry type="library" name="Maven: net.bytebuddy:byte-buddy-agent:1.10.6" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.objenesis:objenesis:2.6" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.skyscreamer:jsonassert:1.5.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.vaadin.external.google:android-json:0.0.20131108.vaadin1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-test:5.2.8.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.xmlunit:xmlunit-core:2.6.3" 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.3.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: mysql:mysql-connector-java:8.0.16" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.cloud:spring-cloud-starter-alibaba-nacos-discovery:2.0.3.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.nacos:nacos-client:1.3.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.nacos:nacos-common:1.3.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: commons-io:commons-io:2.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.httpcomponents:httpasyncclient:4.1.4" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.httpcomponents:httpcore-nio:4.4.13" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.nacos:nacos-api:1.3.3" 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: com.google.code.findbugs:jsr305:3.0.2" 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: commons-codec:commons-codec:1.13" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-core:2.11.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-databind:2.11.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-annotations:2.11.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.prometheus:simpleclient:0.5.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.spring:spring-context-support:1.0.10" 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: 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: org.springframework.cloud:spring-cloud-starter-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: 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: javax.inject:javax.inject:1" 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: commons-lang:commons-lang:2.6" 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.sun.jersey:jersey-client:1.19.1" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: com.sun.jersey:jersey-core:1.19.1" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: javax.ws.rs:jsr311-api:1.1.1" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: com.sun.jersey.contribs:jersey-apache-client4:1.19.1" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: com.netflix.servo:servo-core:0.12.21" 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-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: org.springframework.boot:spring-boot-starter-aop:2.2.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.aspectj:aspectjweaver:1.9.5" 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: org.springframework:spring-web:5.2.8.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-beans:5.2.8.RELEASE" 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: com.netflix.archaius:archaius-core:0.7.6" 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: com.mosty:common-magic-api-starter:1.0.0-SNAPSHOT" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.mosty:common-base-starter:1.0.0-SNAPSHOT" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.velocity:velocity-engine-core:2.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.springfox:springfox-swagger2:2.8.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.swagger:swagger-annotations:1.5.14" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.swagger:swagger-models:1.5.14" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.springfox:springfox-spi:2.8.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.springfox:springfox-core:2.8.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.springfox:springfox-schema:2.8.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.springfox:springfox-swagger-common:2.8.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.springfox:springfox-spring-web:2.8.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.reflections:reflections:0.9.11" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.javassist:javassist:3.21.0-GA" 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:1.2.0.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.plugin:spring-plugin-metadata:1.2.0.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.mapstruct:mapstruct:1.2.0.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.springfox:springfox-swagger-ui:2.8.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.github.caspar-chen:swagger-ui-layer:1.1.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-web:2.2.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-json:2.2.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.11.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.11.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.module:jackson-module-parameter-names:2.11.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-tomcat:2.2.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-core:9.0.30" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-websocket:9.0.30" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-webmvc:5.2.8.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: cn.hutool:hutool-all:5.7.20" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.belerweb:pinyin4j:2.5.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba:fastjson:1.2.83" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.commons:commons-lang3:3.9" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.projectlombok:lombok:1.18.10" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.github.pagehelper:pagehelper:5.3.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.github.jsqlparser:jsqlparser:4.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: jakarta.validation:jakarta.validation-api:2.0.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.baomidou:mybatis-plus-boot-starter:3.4.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.baomidou:mybatis-plus:3.4.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-jdbc:2.2.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.zaxxer:HikariCP:3.4.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.baomidou:mybatis-plus-extension:3.4.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.baomidou:mybatis-plus-core:3.4.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.baomidou:mybatis-plus-annotation:3.4.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.mybatis:mybatis:3.5.7" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.mybatis:mybatis-spring:2.0.6" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.poi:poi-ooxml:4.1.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.poi:poi-ooxml-schemas:4.1.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.xmlbeans:xmlbeans:3.1.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.commons:commons-compress:1.19" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.github.virtuald:curvesapi:1.06" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.poi:poi:4.1.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.commons:commons-collections4:4.4" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.commons:commons-math3:3.6.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.zaxxer:SparseBitSet:1.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.ssssssss:magic-api-spring-boot-starter:2.0.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.ssssssss:magic-api:2.0.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-websocket:2.2.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-messaging:5.2.8.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-websocket:5.2.8.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-jdbc:5.2.8.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.commons:commons-text:1.6" level="project" />
|
||||
<orderEntry type="library" name="Maven: commons-beanutils:commons-beanutils:1.9.4" level="project" />
|
||||
<orderEntry type="library" name="Maven: commons-logging:commons-logging:1.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.ssssssss:magic-script:1.8.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.ssssssss:magic-editor:2.0.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.ssssssss:magic-api-plugin-swagger:2.0.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.mosty:common-token-starter:1.0.0-SNAPSHOT" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba:transmittable-thread-local:2.11.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.auth0:java-jwt:3.8.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.vividsolutions:jts:1.13" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.mosty:common-redis-starter:1.0.0-SNAPSHOT" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-data-redis:2.2.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.data:spring-data-redis:2.3.2.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.data:spring-data-keyvalue:2.3.2.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.data:spring-data-commons:2.3.2.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-tx:5.2.8.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-oxm:5.2.8.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-context-support:5.2.8.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.lettuce:lettuce-core:5.2.1.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.netty:netty-common:4.1.51.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.netty:netty-handler:4.1.51.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.netty:netty-resolver:4.1.51.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.netty:netty-buffer:4.1.51.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.netty:netty-codec:4.1.51.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.netty:netty-transport:4.1.51.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.projectreactor:reactor-core:3.3.8.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.reactivestreams:reactive-streams:1.0.3" level="project" />
|
||||
<orderEntry type="module" module-name="mosty-base-feign-sdk" />
|
||||
<orderEntry type="library" name="Maven: com.netflix.feign:feign-slf4j:8.14.4" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: com.netflix.feign:feign-core:8.14.4" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.mosty:common-core-starter:1.0.0-SNAPSHOT" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.mosty:common-config-starter:1.0.0-SNAPSHOT" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.mybatis.spring.boot:mybatis-spring-boot-starter:2.2.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.mybatis.spring.boot:mybatis-spring-boot-autoconfigure:2.2.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.shiro:shiro-core:1.8.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.shiro:shiro-lang:1.8.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.shiro:shiro-cache:1.8.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.shiro:shiro-crypto-hash:1.8.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.shiro:shiro-crypto-core:1.8.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.shiro:shiro-crypto-cipher:1.8.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.shiro:shiro-config-core:1.8.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.shiro:shiro-config-ogdl:1.8.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.shiro:shiro-event:1.8.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.shiro:shiro-ehcache:1.8.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: net.sf.ehcache:ehcache-core:2.6.11" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-validation:2.2.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-el:9.0.30" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.hibernate.validator:hibernate-validator:6.0.18.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.jboss.logging:jboss-logging:3.4.1.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.github.penggle:kaptcha:2.3.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: javax.servlet:javax.servlet-api:4.0.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.jhlabs:filters:2.0.235-1" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.minio:minio:8.0.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.carrotsearch.thirdparty:simple-xml-safe:2.7.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.squareup.okhttp3:okhttp:3.14.6" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.squareup.okio:okio:1.17.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.httpcomponents:httpclient:4.5.10" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.httpcomponents:httpcore:4.4.13" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.hikvision.ga:artemis-http-client:1.1.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: ch.qos.logback:logback-core:1.2.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.locationtech.jts:jts-core:1.18.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.mosty:operation-log-aspect-starter:1.0.0-SNAPSHOT" level="project" />
|
||||
</component>
|
||||
</module>
|
104
mosty-bkzx/pom.xml
Normal file
104
mosty-bkzx/pom.xml
Normal file
@ -0,0 +1,104 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<artifactId>mosty-dyga-cloud</artifactId>
|
||||
<groupId>com.mosty</groupId>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>mosty-bkzx</artifactId>
|
||||
<description>布控中心</description>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.source>8</maven.compiler.source>
|
||||
<maven.compiler.target>8</maven.compiler.target>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-test</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>mysql</groupId>
|
||||
<artifactId>mysql-connector-java</artifactId>
|
||||
<version>8.0.16</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
|
||||
<version>2.0.3.RELEASE</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-openfeign</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!--magicAPI-->
|
||||
<dependency>
|
||||
<groupId>com.mosty</groupId>
|
||||
<artifactId>common-magic-api-starter</artifactId>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<!--登录jar包-->
|
||||
<dependency>
|
||||
<groupId>com.mosty</groupId>
|
||||
<artifactId>common-token-starter</artifactId>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<!--redis包-->
|
||||
<dependency>
|
||||
<groupId>com.mosty</groupId>
|
||||
<artifactId>common-redis-starter</artifactId>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<!--base-feign-->
|
||||
<dependency>
|
||||
<groupId>com.mosty</groupId>
|
||||
<artifactId>mosty-base-feign-sdk</artifactId>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<!--日志包-->
|
||||
<dependency>
|
||||
<groupId>com.mosty</groupId>
|
||||
<artifactId>operation-log-aspect-starter</artifactId>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<!-- 这个插件,可以将应用打包成一个可执行的jar包;-->
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<configuration>
|
||||
<source>8</source>
|
||||
<target>8</target>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
@ -0,0 +1,29 @@
|
||||
package com.mosty.bkzx;
|
||||
|
||||
import com.mosty.common.base.timeconsume.EnableTimeConsume;
|
||||
import org.mybatis.spring.annotation.MapperScan;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
|
||||
import org.springframework.cloud.openfeign.EnableFeignClients;
|
||||
|
||||
/**
|
||||
* 布控中心 微服务
|
||||
* @author zengbo
|
||||
* @date 2022/7/11 14:29 PM[
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@EnableTimeConsume
|
||||
//@ComponentScan("com.mosty")
|
||||
@EnableFeignClients(basePackages = "com.mosty.base.feign.service")
|
||||
@MapperScan("com.mosty.bkzx.mapper")
|
||||
@EnableDiscoveryClient
|
||||
@SpringBootApplication
|
||||
public class MostyBkzxApplication {
|
||||
|
||||
public static void main(String[] args) {
|
||||
|
||||
SpringApplication.run(MostyBkzxApplication.class, args);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,23 @@
|
||||
package com.mosty.bkzx.config;
|
||||
|
||||
import feign.RequestInterceptor;
|
||||
import feign.RequestTemplate;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.web.context.request.RequestContextHolder;
|
||||
import org.springframework.web.context.request.ServletRequestAttributes;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
@Configuration
|
||||
public class FeignConfig implements RequestInterceptor {
|
||||
|
||||
@Override
|
||||
public void apply(RequestTemplate requestTemplate) {
|
||||
ServletRequestAttributes attr = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
|
||||
if (attr != null) {
|
||||
HttpServletRequest request = attr.getRequest();
|
||||
// 添加token
|
||||
requestTemplate.header("Authorization", request.getHeader("Authorization"));
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,25 @@
|
||||
package com.mosty.bkzx.config;
|
||||
|
||||
import lombok.Data;
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 全局配置
|
||||
* @author kevin
|
||||
* @date 2022/5/25 1:56 上午
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Data
|
||||
@Configuration
|
||||
@ConfigurationProperties("exclude.path-patterns")
|
||||
public class GlobalYmlConfig {
|
||||
|
||||
/**
|
||||
* swagger 静态文件的放行列表
|
||||
*/
|
||||
private List<String> swagger;
|
||||
|
||||
}
|
120
mosty-bkzx/src/main/java/com/mosty/bkzx/config/WebMvcConfig.java
Normal file
120
mosty-bkzx/src/main/java/com/mosty/bkzx/config/WebMvcConfig.java
Normal file
@ -0,0 +1,120 @@
|
||||
package com.mosty.bkzx.config;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.fasterxml.jackson.core.JsonGenerator;
|
||||
import com.fasterxml.jackson.databind.DeserializationFeature;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.fasterxml.jackson.databind.SerializationFeature;
|
||||
import com.fasterxml.jackson.databind.module.SimpleModule;
|
||||
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateDeserializer;
|
||||
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
|
||||
import com.fasterxml.jackson.datatype.jsr310.deser.LocalTimeDeserializer;
|
||||
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateSerializer;
|
||||
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
|
||||
import com.fasterxml.jackson.datatype.jsr310.ser.LocalTimeSerializer;
|
||||
import com.mosty.common.token.SysUserInterceptor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.InitializingBean;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.converter.HttpMessageConverter;
|
||||
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
|
||||
import org.springframework.web.servlet.config.annotation.*;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalTime;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 单体服务拦截器
|
||||
* @author kevin
|
||||
* @date 2022/3/21 11:17 PM
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Configuration
|
||||
@Slf4j
|
||||
public class WebMvcConfig implements WebMvcConfigurer, InitializingBean {
|
||||
|
||||
private static final String DEFAULT_TIME_FORMAT = "HH:mm:ss";
|
||||
private static final String DEFAULT_DATE_FORMAT = "yyyy-MM-dd";
|
||||
private static final String DEFAULT_DATE_TIME_FORMAT = "yyyy-MM-dd HH:mm:ss";
|
||||
|
||||
@Value("${server.servlet.context-path:/}")
|
||||
private String contextPath;
|
||||
|
||||
@Autowired
|
||||
private GlobalYmlConfig globalYmlConfig;
|
||||
|
||||
@Override
|
||||
public void extendMessageConverters(List<HttpMessageConverter<?>> converters) {
|
||||
MappingJackson2HttpMessageConverter converter = new MappingJackson2HttpMessageConverter();
|
||||
ObjectMapper objectMapper = converter.getObjectMapper();
|
||||
// 生成JSON时,将所有Long转换成String
|
||||
SimpleModule simpleModule = new SimpleModule();
|
||||
//日期格式化
|
||||
simpleModule.addSerializer(LocalDateTime.class, new LocalDateTimeSerializer(DateTimeFormatter.ofPattern(DEFAULT_DATE_TIME_FORMAT)));
|
||||
simpleModule.addSerializer(LocalDate.class, new LocalDateSerializer(DateTimeFormatter.ofPattern(DEFAULT_DATE_FORMAT)));
|
||||
simpleModule.addSerializer(LocalTime.class, new LocalTimeSerializer(DateTimeFormatter.ofPattern(DEFAULT_TIME_FORMAT)));
|
||||
simpleModule.addDeserializer(LocalDateTime.class, new LocalDateTimeDeserializer(DateTimeFormatter.ofPattern(DEFAULT_DATE_TIME_FORMAT)));
|
||||
simpleModule.addDeserializer(LocalDate.class, new LocalDateDeserializer(DateTimeFormatter.ofPattern(DEFAULT_DATE_FORMAT)));
|
||||
simpleModule.addDeserializer(LocalTime.class, new LocalTimeDeserializer(DateTimeFormatter.ofPattern(DEFAULT_TIME_FORMAT)));
|
||||
objectMapper.registerModule(simpleModule);
|
||||
// 时间格式化
|
||||
objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
|
||||
objectMapper.configure(JsonGenerator.Feature.WRITE_BIGDECIMAL_AS_PLAIN, true);
|
||||
objectMapper.configure(JsonGenerator.Feature.IGNORE_UNKNOWN, true);
|
||||
objectMapper.setDateFormat(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"));
|
||||
objectMapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS);
|
||||
// 设置格式化内容
|
||||
converter.setObjectMapper(objectMapper);
|
||||
converters.add(0, converter);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void afterPropertiesSet() throws Exception {
|
||||
log.info("当前服务的 contextPath={}", contextPath);
|
||||
log.info("当前服务的 swaggerExcludePathPatterns={}", JSON.toJSONString(globalYmlConfig.getSwagger()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addViewControllers(ViewControllerRegistry registry) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void configureContentNegotiation(ContentNegotiationConfigurer configurer) {
|
||||
configurer.defaultContentType(MediaType.APPLICATION_JSON);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInterceptors(InterceptorRegistry registry) {
|
||||
registry.addInterceptor(userInfoInterceptor()).addPathPatterns("/**")
|
||||
.excludePathPatterns(globalYmlConfig.getSwagger());
|
||||
log.info("初始化WebMvcConfig 监控拦截器SysUserInterceptor");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addResourceHandlers(ResourceHandlerRegistry registry) {
|
||||
if (!registry.hasMappingForPattern("/template/**")) {
|
||||
registry.addResourceHandler("/template/**").addResourceLocations("classpath:/template/");
|
||||
}
|
||||
registry.addResourceHandler("swagger-ui.html")
|
||||
.addResourceLocations("classpath:/META-INF/resources/");
|
||||
registry.addResourceHandler("docs.html")
|
||||
.addResourceLocations("classpath:/META-INF/resources/");
|
||||
registry.addResourceHandler("/webjars/**")
|
||||
.addResourceLocations("classpath:/META-INF/resources/webjars/");
|
||||
WebMvcConfigurer.super.addResourceHandlers(registry);
|
||||
}
|
||||
|
||||
@Bean
|
||||
public SysUserInterceptor userInfoInterceptor() {
|
||||
log.info("初始化WebMvcConfig 拦截器SysUserInterceptor");
|
||||
return new SysUserInterceptor();
|
||||
}
|
||||
}
|
@ -0,0 +1,95 @@
|
||||
package com.mosty.bkzx.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.mosty.base.model.dto.bkzx.TbBkClInsertDto;
|
||||
import com.mosty.base.model.dto.bkzx.TbBkClJudgeDto;
|
||||
import com.mosty.base.model.entity.bkzx.TbBkCl;
|
||||
import com.mosty.base.model.query.bkzx.TbBkClSearchDto;
|
||||
import com.mosty.bkzx.service.TbBkClService;
|
||||
import com.mosty.common.base.domain.ResponseResult;
|
||||
import com.mosty.common.base.entity.log.BusinessType;
|
||||
import com.mosty.common.base.entity.log.Log;
|
||||
import com.mosty.common.token.JwtSysUser;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author dw
|
||||
* @since 2022/7/13
|
||||
* 布控车辆接口
|
||||
**/
|
||||
@Api(tags = "布控车辆接口")
|
||||
@RestController
|
||||
@AllArgsConstructor
|
||||
@RequestMapping("/tbBkCl")
|
||||
public class TbBkClController {
|
||||
|
||||
private final TbBkClService tbBkClService;
|
||||
|
||||
@ApiOperation("新增布控车辆")
|
||||
@JwtSysUser
|
||||
@PostMapping
|
||||
@Log(title = "新增布控车辆", businessType = BusinessType.INSERT)
|
||||
public ResponseResult<Integer> addEntity(@RequestBody TbBkClInsertDto dto) {
|
||||
return ResponseResult.success(this.tbBkClService.addEntity(dto));
|
||||
}
|
||||
|
||||
@ApiOperation("分页查询车辆布控列表")
|
||||
@JwtSysUser
|
||||
@GetMapping
|
||||
public ResponseResult<IPage<TbBkCl>> getPageList(TbBkClSearchDto dto) {
|
||||
return ResponseResult.success(this.tbBkClService.getPageList(dto));
|
||||
}
|
||||
|
||||
@ApiOperation("查询布控车辆详情")
|
||||
@JwtSysUser
|
||||
@GetMapping("{id}")
|
||||
public ResponseResult<TbBkCl> getInfo(@PathVariable("id") String id) {
|
||||
return ResponseResult.success(this.tbBkClService.getInfo(id));
|
||||
}
|
||||
|
||||
@ApiOperation("修改布控车辆")
|
||||
@JwtSysUser
|
||||
@PutMapping
|
||||
@Log(title = "修改布控车辆", businessType = BusinessType.UPDATE)
|
||||
public ResponseResult<Integer> editCar(@RequestBody TbBkClInsertDto dto) {
|
||||
return ResponseResult.success(this.tbBkClService.editCar(dto));
|
||||
}
|
||||
|
||||
@ApiOperation("删除和批量删除布控车辆")
|
||||
@JwtSysUser
|
||||
@DeleteMapping
|
||||
@Log(title = "删除和批量删除布控车辆", businessType = BusinessType.UPDATE)
|
||||
public ResponseResult<Integer> delCar(@RequestBody List<String> ids) {
|
||||
return ResponseResult.success(this.tbBkClService.delCar(ids));
|
||||
}
|
||||
|
||||
@ApiOperation("结束布控")
|
||||
@JwtSysUser
|
||||
@PostMapping("endBk/{id}")
|
||||
@Log(title = "结束布控", businessType = BusinessType.UPDATE)
|
||||
public ResponseResult<Integer> endBk(@PathVariable("id") String id) {
|
||||
return ResponseResult.success(this.tbBkClService.endBk(id));
|
||||
}
|
||||
|
||||
@ApiOperation("重新布控")
|
||||
@JwtSysUser
|
||||
@PostMapping("startBk/{id}")
|
||||
@Log(title = "重新布控", businessType = BusinessType.UPDATE)
|
||||
public ResponseResult<Integer> startBk(@PathVariable("id") String id) {
|
||||
return ResponseResult.success(this.tbBkClService.startBk(id));
|
||||
}
|
||||
|
||||
@ApiOperation("布控车辆审批")
|
||||
@JwtSysUser
|
||||
@PostMapping("judge")
|
||||
@Log(title = "布控车辆审批", businessType = BusinessType.UPDATE)
|
||||
public ResponseResult<Integer> judge(@RequestBody TbBkClJudgeDto dto) {
|
||||
return ResponseResult.success(this.tbBkClService.judge(dto));
|
||||
}
|
||||
}
|
@ -0,0 +1,118 @@
|
||||
package com.mosty.bkzx.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.mosty.base.model.dto.bkzx.TbBkDbBkDto;
|
||||
import com.mosty.base.model.dto.bkzx.TbBkDbInsertDto;
|
||||
import com.mosty.base.model.dto.bkzx.TbBkDbSearchDto;
|
||||
import com.mosty.base.model.dto.bkzx.TbBkDbUpDto;
|
||||
import com.mosty.base.model.entity.bkzx.TbBkDb;
|
||||
import com.mosty.bkzx.service.TbBkDbService;
|
||||
import com.mosty.common.base.domain.ResponseResult;
|
||||
import com.mosty.common.base.entity.log.BusinessType;
|
||||
import com.mosty.common.base.entity.log.Log;
|
||||
import com.mosty.common.base.exception.BusinessException;
|
||||
import com.mosty.common.token.JwtSysUser;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
import org.springframework.util.StringUtils;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Api(tags = "布控库管理服务")
|
||||
@RestController
|
||||
@AllArgsConstructor
|
||||
@RequestMapping("/tbBkDb")
|
||||
public class TbBkDbController {
|
||||
private final TbBkDbService tbBkDbService;
|
||||
|
||||
/**
|
||||
* 新建布控数据库信息
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation("新建布控库")
|
||||
@JwtSysUser
|
||||
@Log(title = "新建各市布控数据库", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/builderDb")
|
||||
public ResponseResult<?> builderDb(@RequestBody TbBkDbInsertDto dto) {
|
||||
if (null == dto) {
|
||||
throw new BusinessException("新建布控数据库信息无效!");
|
||||
}
|
||||
dto.checkData();
|
||||
tbBkDbService.builderDb(dto);
|
||||
return ResponseResult.success("创建布控数据库成功!");
|
||||
}
|
||||
|
||||
@ApiOperation("删除布控数据库")
|
||||
@JwtSysUser
|
||||
@Log(title = "布控数据库删除", businessType = BusinessType.DELETE)
|
||||
@PostMapping("/del")
|
||||
public ResponseResult<?> delDb(@RequestBody List<Long> keys) {
|
||||
if (CollectionUtils.isEmpty(keys)) {
|
||||
throw new BusinessException("删除布控数据库记录集合无效!");
|
||||
}
|
||||
tbBkDbService.delDb(keys);
|
||||
return ResponseResult.success();
|
||||
}
|
||||
|
||||
@ApiOperation("布控数据库分页查询")
|
||||
@JwtSysUser
|
||||
@GetMapping("/pagelist")
|
||||
public ResponseResult<IPage<TbBkDb>> getPageList(TbBkDbSearchDto repar) {
|
||||
if (null == repar) {
|
||||
throw new BusinessException("布控数据库分页查询参数无效!");
|
||||
}
|
||||
return ResponseResult.success(tbBkDbService.getPageList(repar));
|
||||
}
|
||||
|
||||
@ApiOperation("建库的区域选择")
|
||||
@JwtSysUser
|
||||
@GetMapping("/arelist")
|
||||
public ResponseResult<List<Map>> getAreList() {
|
||||
return ResponseResult.success(tbBkDbService.getAreList());
|
||||
}
|
||||
|
||||
@ApiOperation("布控数据详情信息")
|
||||
@JwtSysUser
|
||||
@GetMapping("/detail")
|
||||
public ResponseResult<TbBkDb> detail(@RequestParam(name = "id", required = true) String id) {
|
||||
if (StringUtils.isEmpty(id)) {
|
||||
throw new BusinessException("数据库主键数据无效!");
|
||||
}
|
||||
return ResponseResult.success(tbBkDbService.getDetail(id));
|
||||
}
|
||||
|
||||
@ApiOperation("对大华数据库进行布控")
|
||||
@JwtSysUser
|
||||
@PostMapping("/bkdb")
|
||||
public ResponseResult<?> bKDb(@RequestBody TbBkDbBkDto reqPar) {
|
||||
if (null == reqPar || null == reqPar.getId() || reqPar.getBkKssj() == null || reqPar.getBkJssj() == null) {
|
||||
throw new BusinessException("布控数据库参数异常,请核查 !");
|
||||
}
|
||||
return ResponseResult.success(tbBkDbService.bKDb(reqPar));
|
||||
}
|
||||
|
||||
@ApiOperation("对数据库布控进行撤销布控操作")
|
||||
@JwtSysUser
|
||||
@PostMapping("/unbkdb")
|
||||
public ResponseResult<?> unBkDb(@RequestBody List<Long> id) {
|
||||
if (CollectionUtils.isEmpty(id)) {
|
||||
throw new BusinessException("撤销布控数据库信息无效!");
|
||||
}
|
||||
return ResponseResult.success(tbBkDbService.unBkDb(id));
|
||||
}
|
||||
|
||||
@ApiOperation("编辑数据库基础信息")
|
||||
@JwtSysUser
|
||||
@PostMapping("/modify")
|
||||
public ResponseResult<?> modify(@RequestBody TbBkDbUpDto upDto) {
|
||||
if (null == upDto || StringUtils.isEmpty(upDto.getId())) {
|
||||
throw new BusinessException("修改参数无效!");
|
||||
}
|
||||
return ResponseResult.success(tbBkDbService.modify(upDto));
|
||||
}
|
||||
}
|
@ -0,0 +1,95 @@
|
||||
package com.mosty.bkzx.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.mosty.base.model.dto.bkzx.TbBkRyInsertDto;
|
||||
import com.mosty.base.model.dto.bkzx.TbBkRyJudgeDto;
|
||||
import com.mosty.base.model.entity.bkzx.TbBkRy;
|
||||
import com.mosty.base.model.query.bkzx.TbBkRySearchDto;
|
||||
import com.mosty.bkzx.service.TbBkRyService;
|
||||
import com.mosty.common.base.domain.ResponseResult;
|
||||
import com.mosty.common.base.entity.log.BusinessType;
|
||||
import com.mosty.common.base.entity.log.Log;
|
||||
import com.mosty.common.token.JwtSysUser;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author dw
|
||||
* @since 2022/7/13
|
||||
* 布控人员接口
|
||||
**/
|
||||
@Api(tags = "布控人员接口")
|
||||
@RestController
|
||||
@AllArgsConstructor
|
||||
@RequestMapping("/tbBkRy")
|
||||
public class TbBkRyController {
|
||||
|
||||
private final TbBkRyService tbBkRyService;
|
||||
|
||||
@ApiOperation("新增布控人员")
|
||||
@JwtSysUser
|
||||
@PostMapping
|
||||
@Log(title = "新增布控人员", businessType = BusinessType.INSERT)
|
||||
public ResponseResult<Integer> addEntity(@RequestBody TbBkRyInsertDto dto) {
|
||||
return ResponseResult.success(this.tbBkRyService.addEntity(dto));
|
||||
}
|
||||
|
||||
@ApiOperation("分页查询人员布控列表")
|
||||
@JwtSysUser
|
||||
@GetMapping
|
||||
public ResponseResult<IPage<TbBkRy>> getPageList(TbBkRySearchDto dto) {
|
||||
return ResponseResult.success(this.tbBkRyService.getPageList(dto));
|
||||
}
|
||||
|
||||
@ApiOperation("查询布控人员详情")
|
||||
@JwtSysUser
|
||||
@GetMapping("{id}")
|
||||
public ResponseResult<TbBkRy> getInfo(@PathVariable("id") String id) {
|
||||
return ResponseResult.success(this.tbBkRyService.getInfo(id));
|
||||
}
|
||||
|
||||
@ApiOperation("修改布控人员")
|
||||
@JwtSysUser
|
||||
@PutMapping
|
||||
@Log(title = "修改布控人员", businessType = BusinessType.UPDATE)
|
||||
public ResponseResult<Integer> editPerson(@RequestBody TbBkRyInsertDto dto) {
|
||||
return ResponseResult.success(this.tbBkRyService.editPerson(dto));
|
||||
}
|
||||
|
||||
@ApiOperation("删除和批量删除布控人员")
|
||||
@JwtSysUser
|
||||
@DeleteMapping
|
||||
@Log(title = "删除和批量删除布控人员", businessType = BusinessType.UPDATE)
|
||||
public ResponseResult<Integer> delPerson(@RequestBody List<String> ids) {
|
||||
return ResponseResult.success(this.tbBkRyService.delPerson(ids));
|
||||
}
|
||||
|
||||
@ApiOperation("结束布控")
|
||||
@JwtSysUser
|
||||
@PostMapping("endBk/{id}")
|
||||
@Log(title = "结束布控", businessType = BusinessType.UPDATE)
|
||||
public ResponseResult<Integer> endBk(@PathVariable("id") String id) {
|
||||
return ResponseResult.success(this.tbBkRyService.endBk(id));
|
||||
}
|
||||
|
||||
@ApiOperation("重新布控")
|
||||
@JwtSysUser
|
||||
@PostMapping("startBk/{id}")
|
||||
@Log(title = "重新布控", businessType = BusinessType.UPDATE)
|
||||
public ResponseResult<Integer> startBk(@PathVariable("id") String id) {
|
||||
return ResponseResult.success(this.tbBkRyService.startBk(id));
|
||||
}
|
||||
|
||||
@ApiOperation("布控人员审批")
|
||||
@JwtSysUser
|
||||
@PostMapping("judge")
|
||||
@Log(title = "布控人员审批", businessType = BusinessType.UPDATE)
|
||||
public ResponseResult<Integer> judge(@RequestBody TbBkRyJudgeDto dto) {
|
||||
return ResponseResult.success(this.tbBkRyService.judge(dto));
|
||||
}
|
||||
}
|
@ -0,0 +1,65 @@
|
||||
package com.mosty.bkzx.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.mosty.base.model.dto.bkzx.XdxxQuery;
|
||||
import com.mosty.bkzx.service.XdxxService;
|
||||
import com.mosty.common.base.domain.BaseController;
|
||||
import com.mosty.common.base.domain.ResponseResult;
|
||||
import com.mosty.common.token.JwtSysUser;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@AllArgsConstructor
|
||||
@RestController
|
||||
@Api(tags = "系统字典--原magic接口")
|
||||
@RequestMapping("/xdxx")
|
||||
public class XdxxController extends BaseController {
|
||||
|
||||
@Resource
|
||||
private XdxxService xdxxService;
|
||||
|
||||
@GetMapping("/queryXdxxBYSzfh")
|
||||
@ApiOperation(value = "根据身份证号查询行动信息列表")
|
||||
@JwtSysUser
|
||||
public ResponseResult<IPage<Map<String, Object>>> queryXdxxBYSzfh(XdxxQuery dto) {
|
||||
return ResponseResult.success(this.xdxxService.queryXdxxBYSzfh(dto));
|
||||
}
|
||||
|
||||
@GetMapping("/xdrylb")
|
||||
@ApiOperation(value = "行动人员列表")
|
||||
@JwtSysUser
|
||||
public ResponseResult<IPage<Map<String, Object>>> xdrylb(XdxxQuery dto) {
|
||||
return ResponseResult.success(this.xdxxService.xdrylb(dto));
|
||||
}
|
||||
|
||||
@GetMapping("/xdrytj")
|
||||
@ApiOperation(value = "行动人员统计")
|
||||
@JwtSysUser
|
||||
public ResponseResult<List<Map<String, Object>>> xdrytj(XdxxQuery dto) {
|
||||
return ResponseResult.success(this.xdxxService.xdrytj(dto));
|
||||
}
|
||||
|
||||
@GetMapping("/xdxxlb")
|
||||
@ApiOperation(value = "行动信息列表")
|
||||
@JwtSysUser
|
||||
public ResponseResult<IPage<Map<String, Object>>> xdxxlb(XdxxQuery dto) {
|
||||
return ResponseResult.success(this.xdxxService.xdxxlb(dto));
|
||||
}
|
||||
|
||||
@GetMapping("/xdxxtj")
|
||||
@ApiOperation(value = "行动信息统计")
|
||||
@JwtSysUser
|
||||
public ResponseResult<List<Map<String, Object>>> xdxxtj(XdxxQuery dto) {
|
||||
return ResponseResult.success(this.xdxxService.xdxxtj(dto));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,15 @@
|
||||
package com.mosty.bkzx.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.mosty.base.model.entity.bkzx.TbBkCl;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* @author dw
|
||||
* @since 2022/7/14
|
||||
* 布控车辆Mapper
|
||||
**/
|
||||
@Mapper
|
||||
public interface TbBkClMapper extends BaseMapper<TbBkCl> {
|
||||
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
package com.mosty.bkzx.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.mosty.base.model.entity.bkzx.TbBkDb;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
@Mapper
|
||||
public interface TbBkDbMapper extends BaseMapper<TbBkDb> {
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
package com.mosty.bkzx.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.mosty.base.model.entity.bkzx.TbBkRy;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* @author dw
|
||||
* @since 2022/7/13
|
||||
* 人员布控Mapper
|
||||
**/
|
||||
@Mapper
|
||||
public interface TbBkRyMapper extends BaseMapper<TbBkRy> {
|
||||
|
||||
}
|
@ -0,0 +1,35 @@
|
||||
package com.mosty.bkzx.mapper;
|
||||
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Mapper
|
||||
public interface XdxxMapper {
|
||||
|
||||
@ApiOperation("根据身份证号查询行动信息数量")
|
||||
int queryXdxxBYSzfhCount(Map<String, Object> map);
|
||||
|
||||
@ApiOperation("根据身份证号查询行动信息列表")
|
||||
List<Map<String, Object>> queryXdxxBYSzfh(Map<String, Object> map);
|
||||
|
||||
@ApiOperation("行动人员数量")
|
||||
int xdrylbCount(Map<String, Object> map);
|
||||
|
||||
@ApiOperation("行动人员列表")
|
||||
List<Map<String, Object>> xdrylb(Map<String, Object> map);
|
||||
|
||||
@ApiOperation("行动人员统计")
|
||||
List<Map<String, Object>> xdrytj(Map<String, Object> map);
|
||||
|
||||
@ApiOperation("行动信息数量")
|
||||
int xdxxlbCount(Map<String, Object> map);
|
||||
|
||||
@ApiOperation("行动信息列表")
|
||||
List<Map<String, Object>> xdxxlb(Map<String, Object> map);
|
||||
|
||||
@ApiOperation("行动信息统计")
|
||||
List<Map<String, Object>> xdxxtj(Map<String, Object> map);
|
||||
}
|
@ -0,0 +1,118 @@
|
||||
package com.mosty.bkzx.mybatisplus;
|
||||
|
||||
import cn.hutool.http.HttpStatus;
|
||||
import com.baomidou.mybatisplus.core.handlers.MetaObjectHandler;
|
||||
import com.mosty.common.base.exception.BusinessException;
|
||||
import com.mosty.common.base.util.IpUtil;
|
||||
import com.mosty.common.token.UserInfo;
|
||||
import com.mosty.common.token.UserInfoManager;
|
||||
import org.apache.ibatis.reflection.MetaObject;
|
||||
|
||||
import java.sql.Timestamp;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* MybatisPlus注入处理器
|
||||
*
|
||||
* @author Lhh
|
||||
* @date 2021/4/25
|
||||
*/
|
||||
public class CreateAndUpdateMetaObjectHandler implements MetaObjectHandler {
|
||||
|
||||
@Override
|
||||
public void insertFill(MetaObject metaObject) {
|
||||
try {
|
||||
UserInfo userInfo = UserInfoManager.getUser();
|
||||
//根据属性名字设置要填充的值
|
||||
if (metaObject.hasGetter("xtCjip")) {
|
||||
if (metaObject.getValue("xtCjip") == null) {
|
||||
this.strictInsertFill(metaObject, "xtCjip", String.class, IpUtil.getIpAddress());
|
||||
}
|
||||
}
|
||||
//根据属性名字设置要填充的值
|
||||
if (metaObject.hasGetter("xtSjzt")) {
|
||||
if (metaObject.getValue("xtSjzt") == null) {
|
||||
this.strictInsertFill(metaObject, "xtSjzt", String.class, "1");
|
||||
}
|
||||
}
|
||||
if (metaObject.hasGetter("xtScbz")) {
|
||||
if (metaObject.getValue("xtScbz") == null) {
|
||||
this.strictInsertFill(metaObject, "xtScbz", String.class, "0");
|
||||
}
|
||||
}
|
||||
if (metaObject.hasGetter("xtCjsj")) {
|
||||
if (metaObject.getValue("xtCjsj") == null) {
|
||||
this.strictInsertFill(metaObject, "xtCjsj", Timestamp.class, new Timestamp(System.currentTimeMillis()));
|
||||
}
|
||||
}
|
||||
if (Objects.nonNull(userInfo)) {
|
||||
if (metaObject.hasGetter("xtCjrId")) {
|
||||
if (metaObject.getValue("xtCjrId") == null) {
|
||||
this.strictInsertFill(metaObject, "xtCjrId", String.class, String.valueOf(userInfo.userId));
|
||||
}
|
||||
}
|
||||
if (metaObject.hasGetter("xtCjr")) {
|
||||
if (metaObject.getValue("xtCjr") == null) {
|
||||
this.strictInsertFill(metaObject, "xtCjr", String.class, String.valueOf(userInfo.userName));
|
||||
}
|
||||
}
|
||||
if (metaObject.hasGetter("xtCjbmdm")) {
|
||||
if (metaObject.getValue("xtCjbmdm") == null) {
|
||||
this.strictInsertFill(metaObject, "xtCjbmdm", String.class, String.valueOf(userInfo.getDeptCode()));
|
||||
}
|
||||
}
|
||||
if (metaObject.hasGetter("xtCjbmmc")) {
|
||||
if (metaObject.getValue("xtCjbmmc") == null) {
|
||||
this.strictInsertFill(metaObject, "xtCjbmmc", String.class, userInfo.getDeptName());
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
throw new BusinessException("自动注入异常 => " + e.getMessage(), HttpStatus.HTTP_UNAUTHORIZED);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateFill(MetaObject metaObject) {
|
||||
try {
|
||||
UserInfo userInfo = UserInfoManager.getUser();
|
||||
//根据属性名字设置要填充的值
|
||||
if (metaObject.hasGetter("xtZhgxrid")) {
|
||||
if (metaObject.getValue("xtZhgxrid") == null) {
|
||||
this.strictInsertFill(metaObject, "xtZhgxrid", String.class, IpUtil.getIpAddress());
|
||||
}
|
||||
}
|
||||
if (metaObject.hasGetter("xtZhgxsj")) {
|
||||
if (metaObject.getValue("xtZhgxsj") == null) {
|
||||
this.strictUpdateFill(metaObject, "xtZhgxsj", Timestamp.class, new Timestamp(System.currentTimeMillis()));
|
||||
}
|
||||
}
|
||||
if (Objects.nonNull(userInfo)) {
|
||||
if (metaObject.hasGetter("xtZhgxrid")) {
|
||||
if (metaObject.getValue("xtZhgxrid") == null) {
|
||||
this.strictUpdateFill(metaObject, "xtZhgxrid", String.class, String.valueOf(userInfo.userId));
|
||||
}
|
||||
}
|
||||
if (metaObject.hasGetter("xtZhgxr")) {
|
||||
if (metaObject.getValue("xtZhgxr") == null) {
|
||||
this.strictUpdateFill(metaObject, "xtZhgxr", String.class, userInfo.userName);
|
||||
}
|
||||
}
|
||||
|
||||
if (metaObject.hasGetter("xtZhgxbmdm")) {
|
||||
if (metaObject.getValue("xtZhgxbmdm") == null) {
|
||||
this.strictUpdateFill(metaObject, "xtZhgxbmdm", String.class, userInfo.getDeptCode());
|
||||
}
|
||||
}
|
||||
if (metaObject.hasGetter("xtZhgxbm")) {
|
||||
if (metaObject.getValue("xtZhgxbm") == null) {
|
||||
this.strictUpdateFill(metaObject, "xtZhgxbm", String.class, userInfo.getDeptName());
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
throw new BusinessException("自动注入异常 => " + e.getMessage(), HttpStatus.HTTP_UNAUTHORIZED);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,29 @@
|
||||
package com.mosty.bkzx.mybatisplus;
|
||||
|
||||
import com.baomidou.mybatisplus.core.handlers.MetaObjectHandler;
|
||||
import org.mybatis.spring.annotation.MapperScan;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.transaction.annotation.EnableTransactionManagement;
|
||||
|
||||
/**
|
||||
* mybatis-plus配置类
|
||||
*
|
||||
* @author Lhh
|
||||
*/
|
||||
@EnableTransactionManagement(proxyTargetClass = true)
|
||||
@Configuration
|
||||
@MapperScan("com.mosty.wqzx.mapper")
|
||||
public class MybatisPlusConfig {
|
||||
|
||||
/**
|
||||
* 元对象字段填充控制器
|
||||
* https://baomidou.com/guide/auto-fill-metainfo.html
|
||||
*/
|
||||
@Bean
|
||||
public MetaObjectHandler metaObjectHandler() {
|
||||
return new CreateAndUpdateMetaObjectHandler();
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,68 @@
|
||||
package com.mosty.bkzx.remote;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.mosty.base.model.dto.base.GetSsbmDto;
|
||||
import com.mosty.base.model.dto.base.SysDeptDTO;
|
||||
import com.mosty.base.feign.service.MostyBaseFeignService;
|
||||
import com.mosty.common.base.domain.ResponseResult;
|
||||
import com.mosty.common.base.exception.BusinessException;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* 调用部门信息远程适配层
|
||||
* @author kevin
|
||||
* @date 2022/7/6 10:37 上午
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
@AllArgsConstructor
|
||||
public class TbBaseAdaptRemoteService {
|
||||
|
||||
private final MostyBaseFeignService mostyBaseFeignService;
|
||||
|
||||
/**
|
||||
* 根据部门编码查询部门信息
|
||||
* @param orgCode 部门编码
|
||||
* @return 部门信息
|
||||
*/
|
||||
public SysDeptDTO getDeptByOrgCode(String orgCode) {
|
||||
if (StringUtils.isBlank(orgCode)) {
|
||||
return null;
|
||||
}
|
||||
ResponseResult<SysDeptDTO> responseResult = mostyBaseFeignService.getDeptByOrgCode(orgCode);
|
||||
if (responseResult == null || !responseResult.isSuccess()) {
|
||||
log.error("调用部门编码查询部门信息异常 responseResult = {}", JSON.toJSONString(responseResult));
|
||||
return null;
|
||||
}
|
||||
return responseResult.getData();
|
||||
}
|
||||
// 获取权限查询条件
|
||||
public String getSsbm(String ssbmdm, String isChild) {
|
||||
GetSsbmDto dto = new GetSsbmDto(ssbmdm, isChild);
|
||||
ResponseResult<String> responseResult = mostyBaseFeignService.getSsbm(dto);
|
||||
if (responseResult == null || !responseResult.isSuccess()) {
|
||||
log.error("获取权限查询条件异常 responseResult = {}", JSON.toJSONString(responseResult));
|
||||
throw new BusinessException("获取权限查询条件异常");
|
||||
}
|
||||
return responseResult.getData();
|
||||
}
|
||||
|
||||
public String downloadBaes64(String id) {
|
||||
if (StringUtils.isBlank(id)) {
|
||||
return null;
|
||||
}
|
||||
ResponseResult<String> responseResult = mostyBaseFeignService.downloadBaes64(id);
|
||||
if (responseResult == null || !responseResult.isSuccess()) {
|
||||
log.error("查询URl异常 responseResult = {}", JSON.toJSONString(responseResult));
|
||||
return null;
|
||||
}
|
||||
return responseResult.getData();
|
||||
}
|
||||
}
|
@ -0,0 +1,42 @@
|
||||
package com.mosty.bkzx.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.mosty.base.model.dto.bkzx.TbBkClInsertDto;
|
||||
import com.mosty.base.model.dto.bkzx.TbBkClJudgeDto;
|
||||
import com.mosty.base.model.entity.bkzx.TbBkCl;
|
||||
import com.mosty.base.model.query.bkzx.TbBkClSearchDto;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author dw
|
||||
* @since 2022/7/13
|
||||
* 车辆布控服务类
|
||||
**/
|
||||
public interface TbBkClService {
|
||||
|
||||
@ApiOperation("新增布控车辆")
|
||||
int addEntity(TbBkClInsertDto dto);
|
||||
|
||||
@ApiOperation("分页查询车辆布控列表")
|
||||
IPage<TbBkCl> getPageList(TbBkClSearchDto dto);
|
||||
|
||||
@ApiOperation("查询布控车辆详情")
|
||||
TbBkCl getInfo(String id);
|
||||
|
||||
@ApiOperation("修改布控车辆")
|
||||
int editCar(TbBkClInsertDto dto);
|
||||
|
||||
@ApiOperation("删除和批量删除布控车辆")
|
||||
int delCar(List<String> ids);
|
||||
|
||||
@ApiOperation("结束布控")
|
||||
int endBk(String id);
|
||||
|
||||
@ApiOperation("重新布控")
|
||||
int startBk(String id);
|
||||
|
||||
@ApiOperation("布控车辆审批")
|
||||
int judge(TbBkClJudgeDto dto);
|
||||
}
|
@ -0,0 +1,99 @@
|
||||
package com.mosty.bkzx.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.mosty.base.model.dto.bkzx.TbBkDbBkDto;
|
||||
import com.mosty.base.model.dto.bkzx.TbBkDbInsertDto;
|
||||
import com.mosty.base.model.dto.bkzx.TbBkDbSearchDto;
|
||||
import com.mosty.base.model.dto.bkzx.TbBkDbUpDto;
|
||||
import com.mosty.base.model.entity.bkzx.TbBkDb;
|
||||
import com.mosty.common.base.exception.BusinessException;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 布控数据库服务
|
||||
*/
|
||||
public interface TbBkDbService {
|
||||
|
||||
/**
|
||||
* 创建布控数据库
|
||||
* @param dto
|
||||
* @throws BusinessException
|
||||
*/
|
||||
void builderDb(TbBkDbInsertDto dto) throws BusinessException;
|
||||
|
||||
/**
|
||||
* 布控数据库记录删除
|
||||
* @param records
|
||||
* @throws BusinessException
|
||||
*/
|
||||
void delDb(List<Long> records) throws BusinessException;
|
||||
|
||||
/**
|
||||
* 根据条件查询布控数据库列表
|
||||
* @return
|
||||
* @throws BusinessException
|
||||
*/
|
||||
List<TbBkDb> selectList(Wrapper<TbBkDb> wrapper) throws BusinessException;
|
||||
|
||||
/**
|
||||
* 按条件查询单条记录
|
||||
* @param wrapper
|
||||
* @return
|
||||
* @throws BusinessException
|
||||
*/
|
||||
TbBkDb selectByOne(Wrapper<TbBkDb> wrapper) throws BusinessException;
|
||||
|
||||
/**
|
||||
* 更新数据
|
||||
* @param entity
|
||||
* @return
|
||||
*/
|
||||
int updateEntity(TbBkDb entity);
|
||||
|
||||
/**
|
||||
* 布控数据库信息分页查询
|
||||
* @param repar
|
||||
* @return
|
||||
*/
|
||||
IPage<TbBkDb> getPageList(TbBkDbSearchDto repar);
|
||||
|
||||
/**
|
||||
* 对数据库进行布控
|
||||
* @param reqPar
|
||||
* @return
|
||||
*/
|
||||
Object bKDb(TbBkDbBkDto reqPar);
|
||||
|
||||
/**
|
||||
* 撤销数据库的布控操作
|
||||
* @param idKeys
|
||||
* @return
|
||||
*/
|
||||
Object unBkDb(List<Long> idKeys);
|
||||
|
||||
/**
|
||||
* 编辑数据库基础信息
|
||||
* @param upDto
|
||||
* @return
|
||||
*/
|
||||
Object modify(TbBkDbUpDto upDto);
|
||||
|
||||
/**
|
||||
* 获取指定数据详情信息
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
TbBkDb getDetail(String id);
|
||||
|
||||
/**
|
||||
* 获取建库区域列表
|
||||
* @return
|
||||
*/
|
||||
List<Map> getAreList();
|
||||
|
||||
boolean updateBatchById(Collection<TbBkDb> entityList, int batchSize);
|
||||
}
|
@ -0,0 +1,42 @@
|
||||
package com.mosty.bkzx.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.mosty.base.model.dto.bkzx.TbBkRyInsertDto;
|
||||
import com.mosty.base.model.dto.bkzx.TbBkRyJudgeDto;
|
||||
import com.mosty.base.model.entity.bkzx.TbBkRy;
|
||||
import com.mosty.base.model.query.bkzx.TbBkRySearchDto;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author dw
|
||||
* @since 2022/7/13
|
||||
* 人员布控服务类
|
||||
**/
|
||||
public interface TbBkRyService {
|
||||
|
||||
@ApiOperation("新增布控人员")
|
||||
int addEntity(TbBkRyInsertDto dto);
|
||||
|
||||
@ApiOperation("分页查询人员布控列表")
|
||||
IPage<TbBkRy> getPageList(TbBkRySearchDto dto);
|
||||
|
||||
@ApiOperation("查询布控人员详情")
|
||||
TbBkRy getInfo(String id);
|
||||
|
||||
@ApiOperation("修改布控人员")
|
||||
int editPerson(TbBkRyInsertDto dto);
|
||||
|
||||
@ApiOperation("删除和批量删除布控人员")
|
||||
int delPerson(List<String> ids);
|
||||
|
||||
@ApiOperation("结束布控")
|
||||
int endBk(String id);
|
||||
|
||||
@ApiOperation("重新布控")
|
||||
int startBk(String id);
|
||||
|
||||
@ApiOperation("布控人员审批")
|
||||
int judge(TbBkRyJudgeDto dto);
|
||||
}
|
@ -0,0 +1,195 @@
|
||||
package com.mosty.bkzx.service;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.mosty.base.enums.BKCSTypeEnum;
|
||||
import com.mosty.base.enums.BKDbTypeEnum;
|
||||
import com.mosty.base.model.entity.bkzx.TbBkCl;
|
||||
import com.mosty.base.model.entity.bkzx.TbBkDb;
|
||||
import com.mosty.base.model.entity.bkzx.TbBkRy;
|
||||
import com.mosty.base.model.vo.base.DeptInfoVo;
|
||||
import com.mosty.bkzx.sjjs.dto.ResponseStatusObject;
|
||||
import com.mosty.common.base.exception.BusinessException;
|
||||
import com.mosty.common.token.UserInfo;
|
||||
import lombok.Data;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 第三方布控数据库服务接口
|
||||
*/
|
||||
public interface ThridBkService {
|
||||
/**
|
||||
* 创建布控数据库
|
||||
* @param dto 创建数布控数据库基础信息模型
|
||||
* @param userInfo 当前登陆用户信息
|
||||
* @param detpVo 部门信息
|
||||
* @return
|
||||
* @throws BusinessException
|
||||
*/
|
||||
default ResultData createDb(List<TbBkDb> dto, UserInfo userInfo, DeptInfoVo detpVo) throws BusinessException{
|
||||
return null;
|
||||
};
|
||||
|
||||
/**
|
||||
* 修改布控数据库信息
|
||||
* @param dbInfo 数据库信息
|
||||
* @return
|
||||
* @throws BusinessException
|
||||
*/
|
||||
default ResultData modifyDb(TbBkDb dbInfo) throws BusinessException{
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除布控数据库
|
||||
* @param args
|
||||
* @return
|
||||
* @throws BusinessException
|
||||
*/
|
||||
default ResultData delDb(Map<String, Object> args) throws BusinessException{
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 开始进行布控
|
||||
* @param arg
|
||||
* @throws BusinessException
|
||||
*/
|
||||
void startBKHandler(BkHand arg) throws BusinessException;
|
||||
|
||||
/**
|
||||
* 删除布控信息
|
||||
* @param records
|
||||
* @return
|
||||
*/
|
||||
// List<Long> delBuKong(List<TbBkRecords> records);
|
||||
|
||||
/**
|
||||
* 布控数据库
|
||||
* @param bkdbitems
|
||||
* @param bkdbitems 厂商
|
||||
*/
|
||||
default List<ResponseStatusObject> startBkDb(List<TbBkDb> bkdbitems, UserInfo user){
|
||||
throw new BusinessException("暂未实现数据库布控操作!");
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 编辑人员信息
|
||||
* @param bkRy
|
||||
* @throws BusinessException
|
||||
*/
|
||||
// default void updatePerson(TbBkRy bkRy, TbBkRecords record) throws BusinessException{}
|
||||
|
||||
/**
|
||||
* 编辑车辆信息
|
||||
* @param bkCl
|
||||
* @param record
|
||||
* @throws BusinessException
|
||||
*/
|
||||
// default void updateVehicle(TbBkCl bkCl, TbBkRecords record) throws BusinessException{}
|
||||
|
||||
/**
|
||||
* 撤销对数据库的布控操作
|
||||
* @param value
|
||||
* @return
|
||||
*/
|
||||
default List<String> cancleDbBuKong(List<TbBkDb> value){
|
||||
return null;
|
||||
}
|
||||
|
||||
@Data
|
||||
public static class ResultData{
|
||||
/**
|
||||
* 数据返回的厂商类型
|
||||
*/
|
||||
private BKCSTypeEnum csType;
|
||||
|
||||
/**
|
||||
* 接口返回的数据对象
|
||||
*/
|
||||
private JSONObject object = null;
|
||||
|
||||
/**
|
||||
* 返回对象信息
|
||||
*/
|
||||
private Object resultObject = null;
|
||||
|
||||
/**
|
||||
* 操作成功的records的主键key集合和
|
||||
*/
|
||||
private List<String> primKeys;
|
||||
|
||||
public ResultData(){
|
||||
this.csType = null;
|
||||
this.object = null;
|
||||
this.resultObject = null;
|
||||
};
|
||||
|
||||
public ResultData(BKCSTypeEnum csType){
|
||||
this.csType = csType;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Data
|
||||
public static class BkHand implements Serializable {
|
||||
/**
|
||||
* 布控库列表信息
|
||||
*/
|
||||
private List<TbBkDb> bkDbList;
|
||||
|
||||
/**
|
||||
* 布控类型,人或车
|
||||
*/
|
||||
private BKDbTypeEnum dbTypeEnum;
|
||||
|
||||
/**
|
||||
* 布控人员信息
|
||||
*/
|
||||
private TbBkRy tbBkRy;
|
||||
|
||||
/**
|
||||
* 布控的车辆信息
|
||||
*/
|
||||
private TbBkCl tbBkCl;
|
||||
|
||||
public void checkData(){
|
||||
if(null == dbTypeEnum){
|
||||
throw new BusinessException("布控类型参数无效!");
|
||||
}
|
||||
if(CollectionUtils.isEmpty(bkDbList)){
|
||||
throw new BusinessException("未找到需要布控的布控数据库信息!");
|
||||
}
|
||||
switch (dbTypeEnum){
|
||||
case Personnel:
|
||||
if(null == tbBkRy){
|
||||
throw new BusinessException("布控人员信息无效!");
|
||||
}
|
||||
break;
|
||||
case Car:
|
||||
if(null == tbBkCl){
|
||||
throw new BusinessException("布控车辆信息无效!");
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Data
|
||||
public static class DbInfo{
|
||||
/**
|
||||
* 建立成功数据库主键
|
||||
*/
|
||||
private String dbKey;
|
||||
|
||||
/**
|
||||
* 标说数据库是否是隐藏属性
|
||||
*/
|
||||
private boolean hidden =false;
|
||||
}
|
||||
}
|
@ -0,0 +1,26 @@
|
||||
package com.mosty.bkzx.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.mosty.base.model.dto.bkzx.XdxxQuery;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public interface XdxxService {
|
||||
|
||||
@ApiOperation("根据身份证号查询行动信息列表")
|
||||
IPage<Map<String, Object>> queryXdxxBYSzfh(XdxxQuery dto);
|
||||
|
||||
@ApiOperation("行动人员列表")
|
||||
IPage<Map<String, Object>> xdrylb(XdxxQuery dto);
|
||||
|
||||
@ApiOperation("行动人员统计")
|
||||
List<Map<String, Object>> xdrytj(XdxxQuery dto);
|
||||
|
||||
@ApiOperation("行动信息列表")
|
||||
IPage<Map<String, Object>> xdxxlb(XdxxQuery dto);
|
||||
|
||||
@ApiOperation("行动信息统计")
|
||||
List<Map<String, Object>> xdxxtj(XdxxQuery dto);
|
||||
}
|
@ -0,0 +1,242 @@
|
||||
package com.mosty.bkzx.service.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
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.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.mosty.base.utils.Constant;
|
||||
import com.mosty.base.utils.DateUtils;
|
||||
import com.mosty.base.model.dto.bkzx.TbBkClInsertDto;
|
||||
import com.mosty.base.model.dto.bkzx.TbBkClJudgeDto;
|
||||
import com.mosty.base.model.entity.bkzx.TbBkCl;
|
||||
import com.mosty.base.model.query.bkzx.TbBkClSearchDto;
|
||||
import com.mosty.bkzx.mapper.TbBkClMapper;
|
||||
import com.mosty.bkzx.remote.TbBaseAdaptRemoteService;
|
||||
import com.mosty.bkzx.service.TbBkClService;
|
||||
import com.mosty.bkzx.sjjs.client.HttpClient;
|
||||
import com.mosty.bkzx.sjjs.domain.ResponseStatusList;
|
||||
import com.mosty.bkzx.sjjs.entity.MotorVehic;
|
||||
import com.mosty.common.base.exception.BusinessException;
|
||||
import com.mosty.common.base.util.StringUtils;
|
||||
import com.mosty.common.token.UserInfo;
|
||||
import com.mosty.common.token.UserInfoManager;
|
||||
import com.mosty.common.util.PermissionsUtil;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.text.ParseException;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author dw
|
||||
* @since 2022/7/13
|
||||
* 布控车辆服务-实现
|
||||
**/
|
||||
@AllArgsConstructor
|
||||
@Service
|
||||
public class TbBkClServiceImpl extends ServiceImpl<TbBkClMapper, TbBkCl>
|
||||
implements TbBkClService {
|
||||
|
||||
private final TbBaseAdaptRemoteService tbBaseAdaptRemoteService;
|
||||
|
||||
@Override
|
||||
public int addEntity(TbBkClInsertDto dto) {
|
||||
// 查询是否有重复的数据
|
||||
TbBkCl clItem = this.baseMapper.selectOne(
|
||||
new LambdaQueryWrapper<TbBkCl>()
|
||||
.eq(TbBkCl::getXtSjzt, "1")
|
||||
.eq(TbBkCl::getCphm, dto.getCphm())
|
||||
.eq(TbBkCl::getCplxdm, dto.getCplxdm())
|
||||
.last(" limit 1")
|
||||
);
|
||||
if (clItem != null) {
|
||||
throw new BusinessException("该车辆已经存在,请修改布控状态或重新录入");
|
||||
}
|
||||
UserInfo user = UserInfoManager.get();
|
||||
// 计算布控天数
|
||||
int bkts = 0;
|
||||
try {
|
||||
bkts = DateUtils.daysBetween(dto.getBkkssj(), dto.getBkjssj());
|
||||
} catch (ParseException e) {
|
||||
e.printStackTrace();
|
||||
throw new BusinessException("时间格式转换异常");
|
||||
}
|
||||
TbBkCl Cl = new TbBkCl();
|
||||
BeanUtils.copyProperties(dto, Cl);
|
||||
Cl.setBkts(bkts);
|
||||
Cl.setShzt("0");
|
||||
Cl.setBkzt("0");
|
||||
Cl.setXtSjly("1");
|
||||
Cl.setSqrid(String.valueOf(user.getUserId()));
|
||||
Cl.setSqrsfzh(user.getIdEntityCard());
|
||||
Cl.setSqrxm(user.getUserName());
|
||||
Cl.setSsbm(user.getDeptName());
|
||||
Cl.setSsbmdm(String.valueOf(user.getDeptId()));
|
||||
Cl.setSfqsbkcg("0");
|
||||
Cl.setSfqsebkcg("0");
|
||||
return this.baseMapper.insert(Cl);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPage<TbBkCl> getPageList(TbBkClSearchDto dto) {
|
||||
// UserInfo userInfo = UserInfoManager.get();
|
||||
// PermissionsUtil.queryWrapperUtil(qw, userInfo);
|
||||
|
||||
dto.setSsbmdm(this.tbBaseAdaptRemoteService.getSsbm(dto.getSsbmdm(), null));
|
||||
QueryWrapper<TbBkCl> qw = new QueryWrapper<>();
|
||||
IPage<TbBkCl> page = this.baseMapper.selectPage(
|
||||
new Page<>(dto.getPageNum(), dto.getPageSize()),
|
||||
qw.lambda()
|
||||
.eq(StringUtils.isNotBlank(dto.getCplxdm()), TbBkCl::getCplxdm, dto.getCplxdm())
|
||||
.eq(StringUtils.isNotBlank(dto.getBkjb()), TbBkCl::getBkjb, dto.getBkjb())
|
||||
.eq(StringUtils.isNotBlank(dto.getShzt()), TbBkCl::getShzt, dto.getShzt())
|
||||
.eq(StringUtils.isNotBlank(dto.getBkzt()), TbBkCl::getBkzt, dto.getBkzt())
|
||||
.like(StringUtils.isNotBlank(dto.getCphm()), TbBkCl::getCphm, dto.getCphm())
|
||||
.likeRight(StringUtils.isNotBlank(dto.getSsbmdm()), TbBkCl::getSsbmdm, dto.getSsbmdm())
|
||||
.orderByDesc(TbBkCl::getXtCjsj)
|
||||
);
|
||||
// 查询状态是否过期
|
||||
List<TbBkCl> ClList = page.getRecords();
|
||||
ClList.forEach(item -> {
|
||||
if ("1".equals(item.getBkzt())) {
|
||||
if (new Date().getTime() >= item.getBkjssj().getTime()) {
|
||||
item.setBkzt("2");
|
||||
this.baseMapper.updateById(item);
|
||||
}
|
||||
}
|
||||
});
|
||||
page.setRecords(ClList);
|
||||
return page;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TbBkCl getInfo(String id) {
|
||||
return this.baseMapper.selectById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int editCar(TbBkClInsertDto dto) {
|
||||
// 查询是否有重复的数据
|
||||
TbBkCl clItem = this.baseMapper.selectOne(
|
||||
new LambdaQueryWrapper<TbBkCl>()
|
||||
.eq(TbBkCl::getXtSjzt, "1")
|
||||
.eq(TbBkCl::getCphm, dto.getCphm())
|
||||
.eq(TbBkCl::getCplxdm, dto.getCplxdm())
|
||||
.last(" limit 1")
|
||||
.ne(TbBkCl::getId, dto.getId())
|
||||
);
|
||||
if (clItem != null) {
|
||||
throw new BusinessException("该车辆已经存在,请修改布控状态或重新录入");
|
||||
}
|
||||
UserInfo user = UserInfoManager.get();
|
||||
// 计算布控天数
|
||||
int bkts = 0;
|
||||
try {
|
||||
bkts = DateUtils.daysBetween(dto.getBkkssj(), dto.getBkjssj());
|
||||
} catch (ParseException e) {
|
||||
e.printStackTrace();
|
||||
throw new BusinessException("时间格式转换异常");
|
||||
}
|
||||
TbBkCl Cl = this.getInfo(dto.getId());
|
||||
BeanUtils.copyProperties(dto, Cl);
|
||||
Cl.setBkts(bkts);
|
||||
Cl.setShzt("0");
|
||||
Cl.setBkzt("0");
|
||||
Cl.setSqrid(String.valueOf(user.getUserId()));
|
||||
Cl.setSqrsfzh(user.getIdEntityCard());
|
||||
Cl.setSqrxm(user.getUserName());
|
||||
Cl.setSsbm(user.getDeptName());
|
||||
Cl.setSsbmdm(user.getDeptCode());
|
||||
return this.baseMapper.updateById(Cl);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int delCar(List<String> ids) {
|
||||
return this.baseMapper.deleteBatchIds(ids);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int endBk(String id) {
|
||||
TbBkCl Cl = this.baseMapper.selectById(id);
|
||||
if (Cl != null) {
|
||||
Cl.setBkzt("2");
|
||||
if (org.apache.commons.lang3.StringUtils.isNotBlank(Cl.getBkid())) {
|
||||
HttpClient.delMotor(Cl.getBkid(), Cl.getBkkid());
|
||||
}
|
||||
return this.baseMapper.updateById(Cl);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int startBk(String id) {
|
||||
TbBkCl Cl = this.baseMapper.selectById(id);
|
||||
// 查看布控时间是否过期
|
||||
if (Cl != null) {
|
||||
if (new Date().getTime() >= Cl.getBkjssj().getTime()) {
|
||||
throw new BusinessException("布控结束时间已过,请重新修改布控时间!!");
|
||||
}
|
||||
|
||||
if (org.apache.commons.lang3.StringUtils.isNotBlank(Cl.getBkid())) {
|
||||
HttpClient.delMotor(Cl.getBkid(), Cl.getBkkid());
|
||||
}
|
||||
Cl.setBkzt("0");
|
||||
Cl.setShzt("0");
|
||||
return this.baseMapper.updateById(Cl);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int judge(TbBkClJudgeDto dto) {
|
||||
TbBkCl cl = this.baseMapper.selectById(dto.getId());
|
||||
if (cl == null) {
|
||||
throw new BusinessException("布控车辆信息不存在");
|
||||
}
|
||||
cl.setShzt(dto.getShzt());
|
||||
if ("1".equals(dto.getShzt())) {
|
||||
if (cl.getBkjssj().getTime() <= new Date().getTime() + 60 * 60 * 1000) {
|
||||
throw new BusinessException("布控结束时间不正确,请确保结束时间在1小时之后!");
|
||||
}
|
||||
cl.setBkzt("1");
|
||||
} else if ("2".equals(dto.getShzt())) {
|
||||
cl.setBkzt("3");
|
||||
}
|
||||
cl.setShsm(StringUtils.isBlank(dto.getShsm()) ? "审核通过" : dto.getShsm());
|
||||
UserInfo userInfo = UserInfoManager.get();
|
||||
cl.setShryid(String.valueOf(userInfo.getUserId()));
|
||||
cl.setShrybm(userInfo.getDeptName());
|
||||
cl.setShrybmdm(String.valueOf(userInfo.getDeptId()));
|
||||
cl.setShryxm(userInfo.getUserName());
|
||||
|
||||
if (cl.getShzt().equals("1")) {
|
||||
//向大华布控推送成员
|
||||
MotorVehic motorVehic = new MotorVehic();
|
||||
motorVehic.setPlateClass(cl.getCplxdm());
|
||||
motorVehic.setPlateNo(cl.getCphm());
|
||||
//调用大华布控添加车辆
|
||||
//设置布控库车辆id 和 设置布控库
|
||||
String faceId = cl.getBkkid() + "07" + String.valueOf((int) ((Math.random() * 9 + 1) * 10000));
|
||||
motorVehic.setMotorVehicleID(faceId);
|
||||
motorVehic.setTabID(cl.getBkkid());
|
||||
String faces = HttpClient.insertMotor(motorVehic);
|
||||
if (org.apache.commons.lang3.StringUtils.isNotBlank(faces)) {
|
||||
ResponseStatusList responseStatusList = JSONObject.parseObject(faces, ResponseStatusList.class);
|
||||
if (null != responseStatusList && responseStatusList.getResponseStatusListObject().getResponseStatusObject().get(0).getStatusCode().equals("0")) {
|
||||
//保存布控库车辆id
|
||||
cl.setBkid(faceId);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (org.apache.commons.lang3.StringUtils.isNotBlank(cl.getBkid())) {
|
||||
HttpClient.delMotor(cl.getBkid(), cl.getBkkid());
|
||||
}
|
||||
}
|
||||
|
||||
return this.baseMapper.updateById(cl);
|
||||
}
|
||||
}
|
@ -0,0 +1,467 @@
|
||||
package com.mosty.bkzx.service.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
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.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.mosty.base.enums.BKCSTypeEnum;
|
||||
import com.mosty.base.enums.BKDbTypeEnum;
|
||||
import com.mosty.base.enums.BkTypeEnum;
|
||||
import com.mosty.base.model.dto.bkzx.TbBkDbBkDto;
|
||||
import com.mosty.base.model.dto.bkzx.TbBkDbInsertDto;
|
||||
import com.mosty.base.model.dto.bkzx.TbBkDbSearchDto;
|
||||
import com.mosty.base.model.dto.bkzx.TbBkDbUpDto;
|
||||
import com.mosty.base.model.entity.bkzx.TbBkDb;
|
||||
import com.mosty.base.model.vo.base.DeptInfoVo;
|
||||
import com.mosty.bkzx.mapper.TbBkDbMapper;
|
||||
import com.mosty.bkzx.remote.TbBaseAdaptRemoteService;
|
||||
import com.mosty.bkzx.service.TbBkDbService;
|
||||
import com.mosty.bkzx.service.ThridBkService;
|
||||
import com.mosty.bkzx.sjjs.client.AccountUtils;
|
||||
import com.mosty.bkzx.sjjs.dto.ResponseStatusObject;
|
||||
import com.mosty.common.base.exception.BusinessException;
|
||||
import com.mosty.common.base.util.DateUtils;
|
||||
import com.mosty.common.base.util.SpringIocContext;
|
||||
import com.mosty.common.token.UserInfo;
|
||||
import com.mosty.common.token.UserInfoManager;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
|
||||
import java.text.MessageFormat;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@AllArgsConstructor
|
||||
@Service
|
||||
public class TbBkDbServiceImpl extends ServiceImpl<TbBkDbMapper, TbBkDb> implements TbBkDbService {
|
||||
private final TbBaseAdaptRemoteService tbBaseAdaptRemoteService;
|
||||
private final AccountUtils accountUtils;
|
||||
|
||||
|
||||
@Override
|
||||
public boolean updateBatchById(Collection<TbBkDb> entityList, int batchSize) {
|
||||
return super.updateBatchById(entityList, batchSize);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void builderDb(TbBkDbInsertDto dto) throws BusinessException {
|
||||
UserInfo user = UserInfoManager.get();
|
||||
if (null == user) {
|
||||
throw new BusinessException("当前登陆用户信息无效!");
|
||||
}
|
||||
|
||||
List<AccountUtils.Accounts> _accounts = this.accountUtils.findAccountsByArce(dto.getAreaCode());
|
||||
if (CollectionUtils.isEmpty(_accounts)) {
|
||||
throw new BusinessException("所要创建布控数据库区哉未找到,请重试!");
|
||||
}
|
||||
|
||||
// this.builderDb(dto, user, _deptVo.getData(), _accounts);
|
||||
}
|
||||
|
||||
/**
|
||||
* 布控数据库删除
|
||||
*
|
||||
* @param records
|
||||
* @throws BusinessException
|
||||
*/
|
||||
@Override
|
||||
public void delDb(List<Long> records) throws BusinessException {
|
||||
if (CollectionUtils.isEmpty(records)) {
|
||||
throw new BusinessException("删除布控数据库记录集合无效!");
|
||||
}
|
||||
List<TbBkDb> _daoes = this.baseMapper.selectList(new LambdaQueryWrapper<TbBkDb>().in(TbBkDb::getId, records));
|
||||
if (CollectionUtils.isEmpty(_daoes)) {
|
||||
throw new BusinessException("删除的布控数据库信息不存在!");
|
||||
}
|
||||
this.baseMapper.deleteBatchIds(_daoes.stream().map(_tp -> _tp.getId()).collect(Collectors.toList()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<TbBkDb> selectList(Wrapper<TbBkDb> wrapper) throws BusinessException {
|
||||
return this.baseMapper.selectList(wrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TbBkDb selectByOne(Wrapper<TbBkDb> wrapper) throws BusinessException {
|
||||
return this.baseMapper.selectOne(wrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateEntity(TbBkDb entity) {
|
||||
if (null == entity) {
|
||||
return 0;
|
||||
}
|
||||
return this.baseMapper.updateById(entity);
|
||||
}
|
||||
|
||||
/**
|
||||
* 布控数据库分页查询
|
||||
*
|
||||
* @param reqPar
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public IPage<TbBkDb> getPageList(TbBkDbSearchDto reqPar) {
|
||||
if (null == reqPar) {
|
||||
throw new BusinessException("布控数据库分页查询请求参数无效!");
|
||||
}
|
||||
QueryWrapper<TbBkDb> qw = new QueryWrapper<>();
|
||||
IPage<TbBkDb> _pageData = this.baseMapper.selectPage(
|
||||
new Page<>(reqPar.getPageCurrent(), reqPar.getPageSize()),
|
||||
qw.lambda()
|
||||
.like(StringUtils.isNotBlank(reqPar.getDbName()), TbBkDb::getDbName, reqPar.getDbName())
|
||||
.eq(StringUtils.isNotBlank(reqPar.getDbCs()), TbBkDb::getDbCs, reqPar.getDbCs())
|
||||
.eq(StringUtils.isNotBlank(reqPar.getDbType()), TbBkDb::getDbType, reqPar.getDbType())
|
||||
.eq(StringUtils.isNotBlank(reqPar.getAreaCode()), TbBkDb::getAreaCode, reqPar.getAreaCode())
|
||||
.eq(TbBkDb::getHidden, false)
|
||||
.orderByDesc(TbBkDb::getXtCjsj)
|
||||
);
|
||||
return _pageData;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object bKDb(TbBkDbBkDto reqPar) {
|
||||
if (null == reqPar || null == reqPar.getId() || null == reqPar.getBkJssj() || null == reqPar.getBkJssj()) {
|
||||
throw new BusinessException("布控数据参数异常,请核查!");
|
||||
}
|
||||
List<TbBkDb> _dbs = this.baseMapper.selectList(new LambdaQueryWrapper<TbBkDb>()
|
||||
.eq(TbBkDb::getId, reqPar.getId())
|
||||
);
|
||||
if (CollectionUtils.isEmpty(_dbs)) {
|
||||
return "未找到需要进行布控的数据库!";
|
||||
}
|
||||
|
||||
_dbs = this.baseMapper.selectList(new LambdaQueryWrapper<TbBkDb>()
|
||||
.eq(TbBkDb::getDbCs, _dbs.get(0).getDbCs())
|
||||
.eq(TbBkDb::getSssgajid, _dbs.get(0).getSssgajid())
|
||||
);
|
||||
if (CollectionUtils.isEmpty(_dbs)) {
|
||||
return "未找到需要进行布控的数据库!";
|
||||
}
|
||||
|
||||
List<TbBkDb> _bkdbitems = new ArrayList<TbBkDb>();
|
||||
List<TbBkDb> _bkdbs = _dbs.stream().filter(_tp -> (StringUtils.isEmpty(_tp.getDbBkzt()) || _tp.getDbBkzt().equals("0"))).collect(Collectors.toList());
|
||||
List<TbBkDb> _expritDbs = _dbs.stream().filter(_tp -> StringUtils.isNotBlank(_tp.getDbBkzt()) && _tp.getDbBkzt().equals("1")
|
||||
&& (_tp.getBkJssj().getTime() < DateUtils.getNowDate().getTime())).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(_bkdbs)) {
|
||||
_bkdbitems.addAll(_bkdbs);
|
||||
}
|
||||
if (!CollectionUtils.isEmpty(_expritDbs)) {
|
||||
_bkdbitems.addAll(_expritDbs);
|
||||
}
|
||||
_bkdbitems.forEach(_tp -> {
|
||||
_tp.setBkJssj(reqPar.getBkJssj());
|
||||
_tp.setBkKassj(reqPar.getBkKssj());
|
||||
_tp.setJgxxjssjhm(reqPar.getJgxxjssjhm());
|
||||
});
|
||||
UserInfo user = UserInfoManager.get();
|
||||
|
||||
Map<BKCSTypeEnum, List<TbBkDb>> _dbItems = new HashMap<>();
|
||||
for (TbBkDb _db : _bkdbitems) {
|
||||
BKCSTypeEnum _cs = BKCSTypeEnum.toValue(_db.getDbCs());
|
||||
if (null == _cs) {
|
||||
continue;
|
||||
}
|
||||
if (_dbItems.containsKey(_cs)) {
|
||||
_dbItems.get(_cs).add(_db);
|
||||
} else {
|
||||
List<TbBkDb> _dbes = new ArrayList<>();
|
||||
_dbes.add(_db);
|
||||
_dbItems.put(_cs, _dbes);
|
||||
}
|
||||
}
|
||||
if (CollectionUtils.isEmpty(_dbItems)) {
|
||||
throw new BusinessException("未找到需进行布控的数据!");
|
||||
}
|
||||
|
||||
List<ResponseStatusObject> _statusObjects = new ArrayList<>();
|
||||
Iterator<Map.Entry<BKCSTypeEnum, List<TbBkDb>>> _iter = _dbItems.entrySet().iterator();
|
||||
while (_iter.hasNext()) {
|
||||
Map.Entry<BKCSTypeEnum, List<TbBkDb>> _node = _iter.next();
|
||||
ThridBkService _service = (ThridBkService) SpringIocContext.getBean(_node.getKey().getBeanName());
|
||||
if (null != _service) {
|
||||
List<ResponseStatusObject> _tmpresult = _service.startBkDb(_node.getValue(), user);
|
||||
if (null != _tmpresult) {
|
||||
_statusObjects.addAll(_tmpresult);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (CollectionUtils.isEmpty(_statusObjects)) {
|
||||
|
||||
return MessageFormat.format("布控{0}{1}数据库成功!", _dbs.get(0).getSssgaj(), (_dbs.get(0).getDbType().equals(BKDbTypeEnum.Personnel.getCode()) ? "人像" : "车辆"));
|
||||
}
|
||||
List<TbBkDb> _upDbs = new ArrayList<TbBkDb>();
|
||||
for (ResponseStatusObject _tp : _statusObjects) {
|
||||
TbBkDb _tmpDb = _bkdbitems.stream().filter(_tmp -> StringUtils.isNotBlank(_tmp.getDispositionID()) && _tmp.getDispositionID().equals(_tp.getId())).findAny().orElse(null);
|
||||
if (_tmpDb != null) {
|
||||
_tmpDb.setDbBkzt("1");
|
||||
_tmpDb.setBkKassj(_tmpDb.getBkKassj());
|
||||
_tmpDb.setBkJssj(_tmpDb.getBkJssj());
|
||||
_tmpDb.setJgxxjssjhm(_tmpDb.getJgxxjssjhm());
|
||||
_upDbs.add(_tmpDb);
|
||||
}
|
||||
}
|
||||
if (!CollectionUtils.isEmpty(_upDbs)) {
|
||||
this.updateBatchById(_upDbs);
|
||||
} else {
|
||||
throw new BusinessException(MessageFormat.format("布控{0}{1}数据库失败!", _dbs.get(0).getSssgaj(), (_dbs.get(0).getDbType().equals(BKDbTypeEnum.Personnel.getCode()) ? "人像" : "车辆")));
|
||||
}
|
||||
return MessageFormat.format("布控{0}{1}数据库成功!", _dbs.get(0).getSssgaj(), (_dbs.get(0).getDbType().equals(BKDbTypeEnum.Personnel.getCode()) ? "人像" : "车辆"));
|
||||
}
|
||||
|
||||
/**
|
||||
* 撤销对已经布控的数据撤销布控
|
||||
*
|
||||
* @param idKeys
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Object unBkDb(List<Long> idKeys) {
|
||||
if (CollectionUtils.isEmpty(idKeys)) {
|
||||
throw new BusinessException("撤销布控数据库信息无效!");
|
||||
}
|
||||
List<TbBkDb> _tbBkDbItems = this.selectList(new LambdaQueryWrapper<TbBkDb>().in(TbBkDb::getId, idKeys));
|
||||
if (CollectionUtils.isEmpty(_tbBkDbItems)) {
|
||||
throw new BusinessException("撤销布控数据库信息无效!");
|
||||
}
|
||||
_tbBkDbItems = _tbBkDbItems.stream().filter(_tmp -> StringUtils.isNotBlank(_tmp.getDbBkzt()) && _tmp.getDbBkzt().equals("1")).collect(Collectors.toList());
|
||||
if (CollectionUtils.isEmpty(_tbBkDbItems)) {
|
||||
throw new BusinessException("当前所选择的数据均未进行下发布控,无法进行撤销布控操作!");
|
||||
}
|
||||
Map<BKCSTypeEnum, List<TbBkDb>> _dbItems = new HashMap<>();
|
||||
for (TbBkDb _temp : _tbBkDbItems) {
|
||||
BKCSTypeEnum _cs = BKCSTypeEnum.toValue(_temp.getDbCs());
|
||||
if (null == _cs) {
|
||||
continue;
|
||||
}
|
||||
if (_dbItems.containsKey(_cs)) {
|
||||
_dbItems.get(_cs).add(_temp);
|
||||
} else {
|
||||
List<TbBkDb> _items = new ArrayList<>();
|
||||
_items.add(_temp);
|
||||
_dbItems.put(_cs, _items);
|
||||
}
|
||||
}
|
||||
if (CollectionUtils.isEmpty(_dbItems)) {
|
||||
throw new BusinessException("撤销布控数据库信息无效!");
|
||||
}
|
||||
List<String> _dbKeys = new ArrayList<>();
|
||||
Iterator<Map.Entry<BKCSTypeEnum, List<TbBkDb>>> _iter = _dbItems.entrySet().iterator();
|
||||
while (_iter.hasNext()) {
|
||||
Map.Entry<BKCSTypeEnum, List<TbBkDb>> _node = _iter.next();
|
||||
List<String> _tmpKeys = ((ThridBkService) SpringIocContext.getBean(_node.getKey().getBeanName())).cancleDbBuKong(_node.getValue());
|
||||
if (!CollectionUtils.isEmpty(_tmpKeys)) {
|
||||
_dbKeys.addAll(_tmpKeys);
|
||||
}
|
||||
}
|
||||
if (CollectionUtils.isEmpty(_dbKeys)) {
|
||||
throw new BusinessException("撤销数据布控操作失败,请重试!");
|
||||
}
|
||||
_tbBkDbItems = _tbBkDbItems.stream().filter(_tp -> _dbKeys.contains(_tp.getDbId())).collect(Collectors.toList());
|
||||
if (CollectionUtils.isEmpty(_tbBkDbItems)) {
|
||||
throw new BusinessException("撤销数据布控操作失败,请重试!");
|
||||
}
|
||||
_tbBkDbItems.forEach(_tp -> {
|
||||
_tp.setDbBkzt("0");
|
||||
_tp.setDbId(StringUtils.EMPTY);
|
||||
});
|
||||
this.updateBatchById(_tbBkDbItems);
|
||||
return MessageFormat.format("成功撤销数据库布控总数:{0},失败数:{1}", _tbBkDbItems.size(), idKeys.size() - _tbBkDbItems.size());
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑布控数据库信息
|
||||
*
|
||||
* @param upDto
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Object modify(TbBkDbUpDto upDto) {
|
||||
TbBkDb _dbinfo = this.baseMapper.selectById(upDto.getId());
|
||||
if (null == _dbinfo) {
|
||||
throw new BusinessException("布控数据库未找到!");
|
||||
}
|
||||
List<TbBkDb> _dbitems = this.baseMapper.selectList(new LambdaQueryWrapper<TbBkDb>().eq(TbBkDb::getAreaCode, _dbinfo.getAreaCode()));
|
||||
if (CollectionUtils.isEmpty(_dbitems)) {
|
||||
throw new BusinessException("编辑的布控数据未找到!");
|
||||
}
|
||||
_dbitems.forEach(_tp -> {
|
||||
_tp.setDbName(upDto.getDbName());
|
||||
_tp.setDescription(upDto.getDescription());
|
||||
_tp.setBkKassj(upDto.getBkKassj());
|
||||
_tp.setBkJssj(upDto.getBkJssj());
|
||||
});
|
||||
Boolean _succes = this.updateBatchById(_dbitems);
|
||||
if (!_succes) {
|
||||
return "更新布控数据基础信息成功!";
|
||||
}
|
||||
return "更新布控数据库基础信息失败,请重试!";
|
||||
}
|
||||
|
||||
@Override
|
||||
public TbBkDb getDetail(String id) {
|
||||
return this.baseMapper.selectById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map> getAreList() {
|
||||
return accountUtils.getAccountList();
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建布控车库
|
||||
*
|
||||
* @param dto
|
||||
* @param user
|
||||
*/
|
||||
private void builderDb(TbBkDbInsertDto dto, UserInfo user, DeptInfoVo detpVo, List<AccountUtils.Accounts> accounts) {
|
||||
List<TbBkDb> _dbitems = this.baseMapper.selectList(
|
||||
new LambdaQueryWrapper<TbBkDb>()
|
||||
.eq(TbBkDb::getSssgajdm, dto.getAreaCode()));
|
||||
|
||||
if (!CollectionUtils.isEmpty(_dbitems)) {
|
||||
long _counts = 0;
|
||||
if (dto.getDbType() == BKDbTypeEnum.All) {
|
||||
_counts = _dbitems.stream().filter(_temp -> {
|
||||
return _temp.getDbType().equals(BKDbTypeEnum.Personnel.getCode()) ||
|
||||
_temp.getDbType().equals(BKDbTypeEnum.Car.getCode());
|
||||
}).count();
|
||||
} else {
|
||||
_counts = _dbitems.stream().filter(_temp -> {
|
||||
return _temp.getDbType().equals(dto.getDbType().getCode());
|
||||
}).count();
|
||||
}
|
||||
if (_counts > 0) {
|
||||
throw new BusinessException("你当前所选择市的布控数据库已经存在,请不要重复创建布控数据库!");
|
||||
}
|
||||
}
|
||||
List<TbBkDb> _dbs = new ArrayList<>();
|
||||
for (AccountUtils.Accounts _account : accounts) {
|
||||
if (_account.isPeopleLibrary()) {
|
||||
TbBkDb _tempA = new TbBkDb();
|
||||
_tempA.setHidden(_account.isHidden());
|
||||
_tempA.setDescription(dto.getDescription());
|
||||
_tempA.setSssgajid(detpVo.getDeptcode());
|
||||
_tempA.setDbName(dto.getDbName());
|
||||
_tempA.setDbType(BKDbTypeEnum.Personnel.getCode());
|
||||
_tempA.setDbCs(BKCSTypeEnum.DAHUA.getValue());
|
||||
_tempA.setAreaCode(_account.getAreaCode());
|
||||
_tempA.setAreaName(_account.getName());
|
||||
_tempA.setBkKassj(dto.getBkKassj());
|
||||
_tempA.setBkJssj(dto.getBkJssj());
|
||||
_tempA.setAccount(_account);
|
||||
_dbs.add(_tempA);
|
||||
}
|
||||
|
||||
if (_account.isCarLibrary()) {
|
||||
TbBkDb _tempb = new TbBkDb();
|
||||
_tempb.setDescription(dto.getDescription());
|
||||
_tempb.setSssgajid(detpVo.getDeptcode());
|
||||
_tempb.setDbName(dto.getDbName());
|
||||
_tempb.setDbType(BKDbTypeEnum.Car.getCode());
|
||||
_tempb.setDbCs(BKCSTypeEnum.DAHUA.getValue());
|
||||
if (!_account.isPeopleLibrary()) {
|
||||
_tempb.setHidden(true);
|
||||
} else {
|
||||
_tempb.setHidden(BKDbTypeEnum.Car.isHidden());
|
||||
}
|
||||
_tempb.setAreaName(_account.getName());
|
||||
_tempb.setBkJssj(dto.getBkJssj());
|
||||
_tempb.setBkKassj(dto.getBkKassj());
|
||||
_tempb.setAreaCode(_account.getAreaCode());
|
||||
_tempb.setAccount(_account);
|
||||
_dbs.add(_tempb);
|
||||
}
|
||||
}
|
||||
for (BKCSTypeEnum _tmp : BKCSTypeEnum.values()) {
|
||||
if (_tmp.isEnable()) {
|
||||
ThridBkService dbService = (ThridBkService) SpringIocContext.getBean(_tmp.getBeanName());
|
||||
if (null != dbService) {
|
||||
dbService.createDb(_dbs, user, detpVo);
|
||||
}
|
||||
}
|
||||
}
|
||||
this.saveOrUpdateBatch(_dbs);
|
||||
}
|
||||
|
||||
private List<TbBkDb> convertDaHuaByPrimKey(List<ThridBkService.DbInfo> dbInfo, TbBkDbInsertDto dto, DeptInfoVo detpVo) {
|
||||
List<TbBkDb> _resdata = new ArrayList<TbBkDb>();
|
||||
if (CollectionUtils.isEmpty(dbInfo)) {
|
||||
return null;
|
||||
}
|
||||
for (int _index = 0; _index < dbInfo.size(); _index++) {
|
||||
TbBkDb _tpDb = new TbBkDb();
|
||||
_tpDb.setDbName(dto.getDbName());
|
||||
_tpDb.setDbId(dbInfo.get(_index).getDbKey());
|
||||
_tpDb.setDbCs(BKCSTypeEnum.DAHUA.getValue());
|
||||
_tpDb.setDescription(dto.getDescription());
|
||||
_tpDb.setHidden(dbInfo.get(_index).isHidden());
|
||||
_tpDb.setDbType(this.getBkDbType(_tpDb.getDbId()));
|
||||
_tpDb.setSssgajid(detpVo.getDeptid());
|
||||
_tpDb.setSssgaj(detpVo.getDeptname());
|
||||
_tpDb.setSssgajdm(detpVo.getDeptcode());
|
||||
BKDbTypeEnum _dbType = BKDbTypeEnum.toCode(_tpDb.getDbType());
|
||||
if (null != _dbType) {
|
||||
if (_dbType == BKDbTypeEnum.Car && !_tpDb.getHidden()) {
|
||||
_tpDb.setHidden(true);
|
||||
}
|
||||
}
|
||||
if (_tpDb.getDbType().equals(BKDbTypeEnum.Personnel.getCode())) {
|
||||
_tpDb.setBkType(BkTypeEnum.BKRL.getValue());
|
||||
}
|
||||
_resdata.add(_tpDb);
|
||||
}
|
||||
return _resdata;
|
||||
}
|
||||
|
||||
/**
|
||||
* 大华数据转换
|
||||
*
|
||||
* @param object
|
||||
* @return
|
||||
*/
|
||||
private List<TbBkDb> convertDaHua(JSONObject object, TbBkDbInsertDto dto, DeptInfoVo detpVo) {
|
||||
List<TbBkDb> _resdata = new ArrayList<TbBkDb>();
|
||||
if (object == null) {
|
||||
return _resdata;
|
||||
}
|
||||
JSONArray _jsArray = object.getJSONObject("ResponseStatusListObject").getJSONArray("ResponseStatusObject");
|
||||
for (int _index = 0; _index < _jsArray.size(); _index++) {
|
||||
TbBkDb _tpDb = new TbBkDb();
|
||||
_tpDb.setDbName(dto.getDbName());
|
||||
_tpDb.setDbId(_jsArray.getJSONObject(_index).getString("Id"));
|
||||
_tpDb.setDbCs(BKCSTypeEnum.DAHUA.getValue());
|
||||
_tpDb.setDescription(dto.getDescription());
|
||||
_tpDb.setDbType(this.getBkDbType(_tpDb.getDbId()));
|
||||
_tpDb.setSssgajid(detpVo.getDeptid());
|
||||
_tpDb.setSssgaj(detpVo.getDeptname());
|
||||
_tpDb.setSssgajdm(detpVo.getDeptcode());
|
||||
if (_tpDb.getDbType().equals(BKDbTypeEnum.Personnel.getCode())) {
|
||||
_tpDb.setBkType(BkTypeEnum.BKRL.getValue());
|
||||
}
|
||||
_resdata.add(_tpDb);
|
||||
}
|
||||
return _resdata;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取布控库类型
|
||||
*
|
||||
* @param dbId
|
||||
* @return
|
||||
*/
|
||||
private String getBkDbType(String dbId) {
|
||||
String _typeCode = dbId.substring(20, 22);
|
||||
if ("05".equals(_typeCode)) {
|
||||
return BKDbTypeEnum.Personnel.getCode();
|
||||
} else {
|
||||
return BKDbTypeEnum.Car.getCode();
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,281 @@
|
||||
package com.mosty.bkzx.service.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
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.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.mosty.base.utils.Constant;
|
||||
import com.mosty.base.utils.DateUtils;
|
||||
import com.mosty.base.model.dto.bkzx.TbBkRyInsertDto;
|
||||
import com.mosty.base.model.dto.bkzx.TbBkRyJudgeDto;
|
||||
import com.mosty.base.model.entity.bkzx.TbBkRy;
|
||||
import com.mosty.base.model.query.bkzx.TbBkRySearchDto;
|
||||
import com.mosty.bkzx.mapper.TbBkRyMapper;
|
||||
import com.mosty.bkzx.remote.TbBaseAdaptRemoteService;
|
||||
import com.mosty.bkzx.service.TbBkRyService;
|
||||
import com.mosty.bkzx.sjjs.client.HttpClient;
|
||||
import com.mosty.bkzx.sjjs.domain.ResponseStatusList;
|
||||
import com.mosty.bkzx.sjjs.dto.SubImageListDTO;
|
||||
import com.mosty.bkzx.sjjs.entity.Face;
|
||||
import com.mosty.common.base.exception.BusinessException;
|
||||
import com.mosty.common.base.util.StringUtils;
|
||||
import com.mosty.common.token.UserInfo;
|
||||
import com.mosty.common.token.UserInfoManager;
|
||||
import com.mosty.common.util.PermissionsUtil;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.text.ParseException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author dw
|
||||
* @since 2022/7/13
|
||||
* 布控人员服务-实现
|
||||
**/
|
||||
@AllArgsConstructor
|
||||
@Service
|
||||
public class TbBkRyServiceImpl extends ServiceImpl<TbBkRyMapper, TbBkRy>
|
||||
implements TbBkRyService {
|
||||
private final TbBaseAdaptRemoteService tbBaseAdaptRemoteService;
|
||||
@Override
|
||||
public int addEntity(TbBkRyInsertDto dto) {
|
||||
// 查询是否有重复的数据
|
||||
TbBkRy ryItem = this.baseMapper.selectOne(
|
||||
new LambdaQueryWrapper<TbBkRy>()
|
||||
.eq(TbBkRy::getXtSjzt, "1")
|
||||
.eq(TbBkRy::getBklx, dto.getBklx())
|
||||
.eq("1".equals(dto.getBklx()), TbBkRy::getSfzh, dto.getSfzh())
|
||||
.eq("2".equals(dto.getBklx()), TbBkRy::getSjhm, dto.getSjhm())
|
||||
.eq("3".equals(dto.getBklx()), TbBkRy::getHzhm, dto.getHzhm())
|
||||
.eq("4".equals(dto.getBklx()), TbBkRy::getImsi, dto.getImsi())
|
||||
.eq("5".equals(dto.getBklx()), TbBkRy::getImei, dto.getImei())
|
||||
.last(" limit 1")
|
||||
);
|
||||
if (ryItem != null) {
|
||||
throw new BusinessException("该人员已经存在,请修改布控状态或重新录入");
|
||||
}
|
||||
UserInfo user = UserInfoManager.get();
|
||||
// 计算布控天数
|
||||
int bkts = 0;
|
||||
try {
|
||||
bkts = DateUtils.daysBetween(dto.getBkkssj(), dto.getBkjssj());
|
||||
} catch (ParseException e) {
|
||||
e.printStackTrace();
|
||||
throw new BusinessException("时间格式转换异常");
|
||||
}
|
||||
TbBkRy ry = new TbBkRy();
|
||||
BeanUtils.copyProperties(dto, ry);
|
||||
ry.setBkts(bkts);
|
||||
ry.setShzt("0");
|
||||
ry.setBkzt("0");
|
||||
ry.setXtSjly("1");
|
||||
ry.setSqrid(String.valueOf(user.getUserId()));
|
||||
ry.setSqrsfzh(user.getIdEntityCard());
|
||||
ry.setSqrxm(user.getUserName());
|
||||
ry.setSsbm(user.getDeptName());
|
||||
ry.setSsbmdm(user.getDeptCode());
|
||||
ry.setSfqsbkcg("0");
|
||||
ry.setSfqsebkcg("0");
|
||||
return this.baseMapper.insert(ry);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPage<TbBkRy> getPageList(TbBkRySearchDto dto) {
|
||||
// UserInfo userInfo = UserInfoManager.get();
|
||||
// PermissionsUtil.queryWrapperUtil(qw, userInfo);
|
||||
dto.setSsbmdm(this.tbBaseAdaptRemoteService.getSsbm(dto.getSsbmdm(), null));
|
||||
QueryWrapper<TbBkRy> qw = new QueryWrapper<>();
|
||||
IPage<TbBkRy> page = this.baseMapper.selectPage(
|
||||
new Page<>(dto.getPageNum(), dto.getPageSize()),
|
||||
qw.lambda()
|
||||
.like(StringUtils.isNotBlank(dto.getXm()), TbBkRy::getXm, dto.getXm())
|
||||
.likeRight(StringUtils.isNotBlank(dto.getSsbmdm()), TbBkRy::getSsbmdm, dto.getSsbmdm())
|
||||
.eq(StringUtils.isNotBlank(dto.getBkjb()), TbBkRy::getBkjb, dto.getBkjb())
|
||||
.eq(StringUtils.isNotBlank(dto.getShzt()), TbBkRy::getShzt, dto.getShzt())
|
||||
.eq(StringUtils.isNotBlank(dto.getBkzt()), TbBkRy::getBkzt, dto.getBkzt())
|
||||
.eq(StringUtils.isNotBlank(dto.getBklx()), TbBkRy::getBklx, dto.getBklx())
|
||||
.and(StringUtils.isNotBlank(dto.getKeyword()),
|
||||
ew -> ew.like(TbBkRy::getSfzh, dto.getKeyword())
|
||||
.or().like(TbBkRy::getSjhm, dto.getKeyword())
|
||||
.or().like(TbBkRy::getHzhm, dto.getKeyword())
|
||||
.or().like(TbBkRy::getImsi, dto.getKeyword())
|
||||
.or().like(TbBkRy::getImei, dto.getKeyword())
|
||||
).orderByDesc(TbBkRy::getXtCjsj)
|
||||
);
|
||||
// 查询状态是否过期
|
||||
List<TbBkRy> ryList = page.getRecords();
|
||||
ryList.forEach(item -> {
|
||||
if ("1".equals(item.getBkzt())) {
|
||||
if (new Date().getTime() >= item.getBkjssj().getTime()) {
|
||||
item.setBkzt("2");
|
||||
this.baseMapper.updateById(item);
|
||||
}
|
||||
}
|
||||
});
|
||||
page.setRecords(ryList);
|
||||
return page;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TbBkRy getInfo(String id) {
|
||||
return this.baseMapper.selectById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int editPerson(TbBkRyInsertDto dto) {
|
||||
// 查询是否有重复的数据
|
||||
TbBkRy ryItem = this.baseMapper.selectOne(
|
||||
new LambdaQueryWrapper<TbBkRy>()
|
||||
.eq(TbBkRy::getXtSjzt, "1")
|
||||
.eq(TbBkRy::getBklx, dto.getBklx())
|
||||
.eq("1".equals(dto.getBklx()), TbBkRy::getSfzh, dto.getSfzh())
|
||||
.eq("2".equals(dto.getBklx()), TbBkRy::getSjhm, dto.getSjhm())
|
||||
.eq("3".equals(dto.getBklx()), TbBkRy::getHzhm, dto.getHzhm())
|
||||
.eq("4".equals(dto.getBklx()), TbBkRy::getImsi, dto.getImsi())
|
||||
.eq("5".equals(dto.getBklx()), TbBkRy::getImei, dto.getImei())
|
||||
.ne(TbBkRy::getId, dto.getId())
|
||||
.last(" limit 1")
|
||||
);
|
||||
if (ryItem != null) {
|
||||
throw new BusinessException("该人员已经存在,请修改布控状态或重新录入");
|
||||
}
|
||||
UserInfo user = UserInfoManager.get();
|
||||
// 计算布控天数
|
||||
int bkts = 0;
|
||||
try {
|
||||
bkts = DateUtils.daysBetween(dto.getBkkssj(), dto.getBkjssj());
|
||||
} catch (ParseException e) {
|
||||
e.printStackTrace();
|
||||
throw new BusinessException("时间格式转换异常");
|
||||
}
|
||||
TbBkRy ry = this.getInfo(dto.getId());
|
||||
BeanUtils.copyProperties(dto, ry);
|
||||
ry.setBkts(bkts);
|
||||
ry.setShzt("0");
|
||||
ry.setBkzt("0");
|
||||
ry.setSqrid(String.valueOf(user.getUserId()));
|
||||
ry.setSqrsfzh(user.getIdEntityCard());
|
||||
ry.setSqrxm(user.getUserName());
|
||||
ry.setSsbm(user.getDeptName());
|
||||
ry.setSsbmdm(user.getDeptCode());
|
||||
return this.baseMapper.updateById(ry);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int delPerson(List<String> ids) {
|
||||
return this.baseMapper.deleteBatchIds(ids);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int endBk(String id) {
|
||||
TbBkRy ry = this.baseMapper.selectById(id);
|
||||
if (ry != null) {
|
||||
ry.setBkzt("2");
|
||||
if (org.apache.commons.lang3.StringUtils.isNotBlank(ry.getBkid())) {
|
||||
HttpClient.delFaces(ry.getBkid(), ry.getBkkid());
|
||||
}
|
||||
return this.baseMapper.updateById(ry);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int startBk(String id) {
|
||||
TbBkRy ry = this.baseMapper.selectById(id);
|
||||
// 查看布控时间是否过期
|
||||
if (ry != null) {
|
||||
if (new Date().getTime() >= ry.getBkjssj().getTime()) {
|
||||
throw new BusinessException("布控结束时间已过,请重新修改布控时间!!");
|
||||
}
|
||||
ry.setBkzt("0");
|
||||
ry.setShzt("0");
|
||||
//删除成员
|
||||
if (org.apache.commons.lang3.StringUtils.isNotBlank(ry.getBkid())) {
|
||||
HttpClient.delFaces(ry.getBkid(), ry.getBkkid());
|
||||
}
|
||||
|
||||
return this.baseMapper.updateById(ry);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int judge(TbBkRyJudgeDto dto) {
|
||||
TbBkRy ry = this.baseMapper.selectById(dto.getId());
|
||||
if (ry == null) {
|
||||
throw new BusinessException("布控人员信息不存在");
|
||||
}
|
||||
ry.setShzt(dto.getShzt());
|
||||
if ("1".equals(dto.getShzt())) {
|
||||
if (ry.getBkjssj().getTime() <= new Date().getTime() + 60 * 60 * 1000) {
|
||||
throw new BusinessException("布控结束时间不正确,请确保结束时间在1小时之后!");
|
||||
}
|
||||
ry.setBkzt("1");
|
||||
} else if ("2".equals(dto.getShzt())) {
|
||||
ry.setBkzt("3");
|
||||
}
|
||||
ry.setShsm(StringUtils.isBlank(dto.getShsm()) ? "审核通过" : dto.getShsm());
|
||||
UserInfo userInfo = UserInfoManager.get();
|
||||
ry.setShryid(String.valueOf(userInfo.getUserId()));
|
||||
ry.setShrybm(userInfo.getDeptName());
|
||||
ry.setShrybmdm(String.valueOf(userInfo.getDeptId()));
|
||||
ry.setShryxm(userInfo.getUserName());
|
||||
|
||||
//通过添加到大华
|
||||
if (ry.getShzt().equals("1")) {
|
||||
try {
|
||||
Face face = new Face();
|
||||
face.setIDType("111");//默认身份证
|
||||
face.setIDNumber(ry.getSfzh());
|
||||
face.setName(ry.getXm());
|
||||
face.setGenderCode(ry.getXbdm());
|
||||
List<SubImageListDTO.SubImageInfoObjectDTO> list = new ArrayList<>();
|
||||
SubImageListDTO.SubImageInfoObjectDTO subImageInfoObjectDTO = new SubImageListDTO.SubImageInfoObjectDTO();
|
||||
//minio获取图片
|
||||
// String url = tbBaseAdaptRemoteService.downloadUrl(ry.getRxtpdz());
|
||||
String base64 = tbBaseAdaptRemoteService.downloadBaes64(ry.getRxtpdz());//照片一定不为空
|
||||
if (StringUtils.isNotEmpty(base64)) {
|
||||
subImageInfoObjectDTO.setStoragePath(base64);
|
||||
subImageInfoObjectDTO.setLeftTopX(0);
|
||||
subImageInfoObjectDTO.setLeftTopY(0);
|
||||
subImageInfoObjectDTO.setRightBtmX(0);
|
||||
subImageInfoObjectDTO.setRightBtmY(0);
|
||||
list.add(subImageInfoObjectDTO);
|
||||
SubImageListDTO subImageListDTO = new SubImageListDTO();
|
||||
subImageListDTO.setSubImageInfoObject(list);
|
||||
face.setSubImageList(subImageListDTO);
|
||||
//调用大华布控添加人员
|
||||
//设置布控库人员id
|
||||
String faceId = ry.getBkkid() + "06" + String.valueOf((int) ((Math.random() * 9 + 1) * 10000));
|
||||
face.setFaceID(faceId);
|
||||
//设置布控库
|
||||
face.setTabID(ry.getBkkid());
|
||||
String faces = HttpClient.insertFaces(face);
|
||||
if (org.apache.commons.lang3.StringUtils.isNotBlank(faces)) {
|
||||
ResponseStatusList responseStatusList = JSONObject.parseObject(faces, ResponseStatusList.class);
|
||||
if (null != responseStatusList && responseStatusList.getResponseStatusListObject().getResponseStatusObject().get(0).getStatusCode().equals("0")) {
|
||||
//保存布控库人员id
|
||||
ry.setBkid(faceId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
System.out.println("添加大华布控成员失败------->" + e.getMessage());
|
||||
throw new BusinessException("添加大华布控成员失败 请重试!");
|
||||
}
|
||||
|
||||
} else {
|
||||
if (org.apache.commons.lang3.StringUtils.isNotBlank(ry.getBkid())) {
|
||||
HttpClient.delFaces(ry.getBkid(), ry.getBkkid());
|
||||
}
|
||||
}
|
||||
return this.baseMapper.updateById(ry);
|
||||
}
|
||||
}
|
@ -0,0 +1,79 @@
|
||||
package com.mosty.bkzx.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.mosty.base.model.dto.bkzx.XdxxQuery;
|
||||
import com.mosty.bkzx.mapper.XdxxMapper;
|
||||
import com.mosty.bkzx.service.XdxxService;
|
||||
import com.mosty.common.token.UserInfo;
|
||||
import com.mosty.common.token.UserInfoManager;
|
||||
import com.mosty.common.util.PermissionsUtil;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Service
|
||||
@AllArgsConstructor
|
||||
public class XdxxServiceImpl implements XdxxService {
|
||||
|
||||
private final XdxxMapper xdxxMapper;
|
||||
|
||||
@Override
|
||||
public IPage<Map<String, Object>> queryXdxxBYSzfh(XdxxQuery dto) {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("pageIndex", (dto.getPageCurrent() - 1) * dto.getPageSize());
|
||||
map.put("pageSize", dto.getPageSize());
|
||||
map.put("dto", dto);
|
||||
int count = this.xdxxMapper.queryXdxxBYSzfhCount(map);
|
||||
List<Map<String, Object>> list = this.xdxxMapper.queryXdxxBYSzfh(map);
|
||||
IPage<Map<String, Object>> page = new Page<>(dto.getPageCurrent(), dto.getPageSize());
|
||||
page.setTotal(count);
|
||||
page.setRecords(list);
|
||||
return page;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPage<Map<String, Object>> xdrylb(XdxxQuery dto) {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("pageIndex", (dto.getPageCurrent() - 1) * dto.getPageSize());
|
||||
map.put("pageSize", dto.getPageSize());
|
||||
map.put("dto", dto);
|
||||
int count = this.xdxxMapper.xdrylbCount(map);
|
||||
List<Map<String, Object>> list = this.xdxxMapper.xdrylb(map);
|
||||
IPage<Map<String, Object>> page = new Page<>(dto.getPageCurrent(), dto.getPageSize());
|
||||
page.setTotal(count);
|
||||
page.setRecords(list);
|
||||
return page;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map<String, Object>> xdrytj(XdxxQuery dto) {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("dto", dto);
|
||||
return this.xdxxMapper.xdrytj(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPage<Map<String, Object>> xdxxlb(XdxxQuery dto) {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("pageIndex", (dto.getPageCurrent() - 1) * dto.getPageSize());
|
||||
map.put("pageSize", dto.getPageSize());
|
||||
map.put("dto", dto);
|
||||
int count = this.xdxxMapper.xdxxlbCount(map);
|
||||
List<Map<String, Object>> list = this.xdxxMapper.xdxxlb(map);
|
||||
IPage<Map<String, Object>> page = new Page<>(dto.getPageCurrent(), dto.getPageSize());
|
||||
page.setTotal(count);
|
||||
page.setRecords(list);
|
||||
return page;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map<String, Object>> xdxxtj(XdxxQuery dto) {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("dto", dto);
|
||||
return this.xdxxMapper.xdxxtj(map);
|
||||
}
|
||||
}
|
@ -0,0 +1,103 @@
|
||||
package com.mosty.bkzx.sjjs.client;
|
||||
|
||||
import lombok.Data;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.*;
|
||||
|
||||
@Service
|
||||
public class AccountUtils {
|
||||
private static final Map<String, Accounts> accounts = new HashMap<String, Accounts>();
|
||||
|
||||
AccountUtils() {
|
||||
accounts.put("5106", new Accounts("德阳", "zydytest", "system123", "5107", false, "510600000000", true, true));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取建库的区域列表
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public List<Map> getAccountList() {
|
||||
List<Map> _reslist = new ArrayList<>();
|
||||
Iterator<Map.Entry<String, Accounts>> _iter = accounts.entrySet().iterator();
|
||||
while (_iter.hasNext()) {
|
||||
Map.Entry<String, Accounts> _node = _iter.next();
|
||||
if (_node.getValue().hidden) {
|
||||
continue;
|
||||
}
|
||||
Map _tp = new HashMap();
|
||||
_tp.put("arecode", _node.getKey());
|
||||
_tp.put("name", _node.getValue().getName());
|
||||
_reslist.add(_tp);
|
||||
}
|
||||
return _reslist;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 根据所选择的区域查找账户信息
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public List<Accounts> findAccountsByArce(String arce) {
|
||||
if (StringUtils.isEmpty(arce)) {
|
||||
return null;
|
||||
}
|
||||
List<Accounts> _accounts = new ArrayList<>();
|
||||
Iterator<Map.Entry<String, Accounts>> _iter = accounts.entrySet().iterator();
|
||||
while (_iter.hasNext()) {
|
||||
Map.Entry<String, Accounts> entry = _iter.next();
|
||||
if (entry.getValue().getAreaCode().equals(arce)) {
|
||||
_accounts.add(entry.getValue());
|
||||
}
|
||||
}
|
||||
return _accounts;
|
||||
}
|
||||
|
||||
|
||||
public List<Accounts> findAccountsByArceAndName(String arce, String arceName) {
|
||||
if (StringUtils.isEmpty(arce) || StringUtils.isEmpty(arceName)) {
|
||||
return null;
|
||||
}
|
||||
List<Accounts> _accounts = new ArrayList<>();
|
||||
Iterator<Map.Entry<String, Accounts>> _iter = accounts.entrySet().iterator();
|
||||
while (_iter.hasNext()) {
|
||||
Map.Entry<String, Accounts> entry = _iter.next();
|
||||
if (entry.getValue().getAreaCode().equals(arce) && entry.getValue().getName().equals(arceName)) {
|
||||
_accounts.add(entry.getValue());
|
||||
}
|
||||
}
|
||||
return _accounts;
|
||||
}
|
||||
|
||||
|
||||
@Data
|
||||
public static class Accounts implements Serializable {
|
||||
private String name;
|
||||
private String account;
|
||||
private String pwd;
|
||||
private String areaCode;
|
||||
private boolean hidden;
|
||||
private String sssgajdm;
|
||||
private boolean isCarLibrary;
|
||||
private boolean isPeopleLibrary;
|
||||
|
||||
public Accounts() {
|
||||
}
|
||||
|
||||
public Accounts(String name, String account, String pwd, String areaCode, boolean hidden, String sssgajdm, boolean isCarLibrary, boolean isPeopleLibrary) {
|
||||
this.name = name;
|
||||
this.account = account;
|
||||
this.pwd = pwd;
|
||||
this.areaCode = areaCode;
|
||||
this.hidden = hidden;
|
||||
this.sssgajdm = sssgajdm;
|
||||
this.isCarLibrary = isCarLibrary;
|
||||
this.isPeopleLibrary = isPeopleLibrary;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,271 @@
|
||||
package com.mosty.bkzx.sjjs.client;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.alibaba.fastjson.TypeReference;
|
||||
import com.mosty.base.utils.Constant;
|
||||
import com.mosty.bkzx.sjjs.dto.DHUpVIASDataClassTabs;
|
||||
import com.mosty.bkzx.sjjs.dto.DispositionObjectDto;
|
||||
import com.mosty.bkzx.sjjs.dto.FaceObjectDTO;
|
||||
import com.mosty.bkzx.sjjs.dto.MotorVehicleObject;
|
||||
import com.mosty.bkzx.sjjs.entity.DataClassTabObject;
|
||||
import com.mosty.bkzx.sjjs.entity.Dispositions;
|
||||
import com.mosty.bkzx.sjjs.entity.Face;
|
||||
import com.mosty.bkzx.sjjs.entity.MotorVehic;
|
||||
import com.mosty.bkzx.sjjs.vo.*;
|
||||
import com.mosty.bkzx.utlis.MD5Util;
|
||||
import com.mosty.bkzx.utlis.OkHttpUtils;
|
||||
import com.mosty.common.base.exception.BusinessException;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* HTTP请求静态类
|
||||
*/
|
||||
public class HttpClient {
|
||||
|
||||
/**
|
||||
* 保活会话
|
||||
* 用户登录成功后,都是用token进行关联会话信息,为了避免出现token变更无法查找关联信息,
|
||||
* 可以使用会话保持接口,对该token进行续租,保持持续有效。续租成功,请求方需要在下一次超时之前再次发起会话保活请求
|
||||
*
|
||||
* @param token
|
||||
* @return
|
||||
*/
|
||||
public static String keepAlive(String token) {return null;}
|
||||
|
||||
/**
|
||||
* 第一次交互
|
||||
*
|
||||
* @param userName
|
||||
* @param clientType
|
||||
* @return
|
||||
*/
|
||||
public static AuthorizeOneVo authorizeBefore(String userName, String clientType) {return null;}
|
||||
|
||||
|
||||
/**
|
||||
* 第二次交互
|
||||
*
|
||||
* @param userName
|
||||
* @param password
|
||||
* @return
|
||||
*/
|
||||
public static AuthorizeTwoVo authorizeAfter(AuthorizeOneVo authorizeOneVo, String userName, String password) {return null;}
|
||||
|
||||
/**
|
||||
* 巡逻盘查图片获取人员信息
|
||||
*
|
||||
* @param base64
|
||||
* @return
|
||||
*/
|
||||
public static CustomInfoVo userList(String base64) {return null;}
|
||||
|
||||
/**
|
||||
* 图片获取人员信息
|
||||
*
|
||||
* @param personIdentifyObject
|
||||
* @return
|
||||
*/
|
||||
public static FaceObject faceObject(PersonIdentifyObject personIdentifyObject) {return null;}
|
||||
|
||||
|
||||
/**
|
||||
* 大华人像库新增
|
||||
*
|
||||
* @param faceRepository
|
||||
* @return
|
||||
*/
|
||||
public static String insertFaceRepository(FaceRepository faceRepository) {return null;}
|
||||
|
||||
/**
|
||||
* 大华人像库查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public static List<FaceRepositoryInfo> queryFaceRepository() {return null;}
|
||||
|
||||
/**
|
||||
* 大华人像库详情
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public static FaceRepositoryInfo faceRepositoryDetail(String faceRepositoryId) {return null;}
|
||||
|
||||
/**
|
||||
* 大华人像库修改
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public static void faceRepositoryUpdate(String faceRepositoryId, String name, String memo, int type) {}
|
||||
|
||||
/**
|
||||
* 大华人像库新增成员
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public static String faceRepositoryUserSave(FaceRepositoryUser faceRepositoryUser) {return null;}
|
||||
|
||||
/**
|
||||
* 大华人像库删除成员
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public static void faceRepositoryUserDelete(String memberId) {}
|
||||
|
||||
|
||||
/**
|
||||
* 查看某个库成员的详情
|
||||
*
|
||||
* @param faceImgId
|
||||
* @return
|
||||
*/
|
||||
public static RepositoryUser authorizeBefore(String faceImgId) {return null;}
|
||||
|
||||
/**
|
||||
* 人像布控
|
||||
*
|
||||
* @param repositoryId 人像库 id,必填。
|
||||
* @param channelCode Saas通道id,必填。
|
||||
* @param threshold 布控阈值,取值范围为[0-1],必填。
|
||||
* @param level 布控等级。选填。
|
||||
* @return
|
||||
*/
|
||||
public static void surveillance(String repositoryId, String channelCode, double threshold, int level) {}
|
||||
|
||||
/**
|
||||
* 布控删除
|
||||
*
|
||||
* @param repositoryId 人像库 id,必填。
|
||||
* @param channelCode Saas通道id,必填。
|
||||
*/
|
||||
public static void surveillanceDelete(String repositoryId, String channelCode) {}
|
||||
|
||||
/**
|
||||
* 车辆新增布控
|
||||
*
|
||||
* @param vehicleCar 人像库 id,必填。
|
||||
*/
|
||||
|
||||
public static String carSurveillance(VehicleCar vehicleCar) {return null;}
|
||||
|
||||
/**
|
||||
* 车辆新增布控审核
|
||||
*
|
||||
* @param recordId 过车记录索引号。
|
||||
* @param operation pass通过,notPass不通过。
|
||||
*/
|
||||
public static void carSurveillanceAudit(String recordId, Boolean operation) {}
|
||||
|
||||
|
||||
/**
|
||||
* 车辆撤销布控
|
||||
*
|
||||
* @param recordId 过车记录索引号。
|
||||
* @param revokeReason 撤控原因"。
|
||||
*/
|
||||
public static void carSurveillanceDelete(String recordId, String revokeReason) {}
|
||||
|
||||
|
||||
/**
|
||||
* 获取HLS播放地址
|
||||
*
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
public static String getHLS(String channelId) {return null;}
|
||||
|
||||
/**
|
||||
* 创建人脸布控库(修改put) 难得写 没必要
|
||||
*
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
public static String insertPersonIdentify(DataClassTabObject dataClassTabObject) {return null;}
|
||||
|
||||
/**
|
||||
* 删除人脸布控库
|
||||
*
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
public static String delPersonIdentify(String id) {return null;}
|
||||
|
||||
/**
|
||||
* 布控库添加人员
|
||||
*
|
||||
* @param face
|
||||
* @return
|
||||
*/
|
||||
public static String insertFaces(Face face) {return null;}
|
||||
|
||||
/**
|
||||
* 向布控库中添加布控人员信息
|
||||
* @param faceObjects
|
||||
* @return
|
||||
*/
|
||||
public static String insertFaces(List<FaceObjectDTO> faceObjects, String token){return null;}
|
||||
|
||||
/**
|
||||
* 布控库添加车辆
|
||||
*
|
||||
* @param motorVehic
|
||||
* @return
|
||||
*/
|
||||
public static String insertMotor(MotorVehic motorVehic) {return null;}
|
||||
|
||||
|
||||
/**
|
||||
* 布控库添加车辆
|
||||
*
|
||||
* @param motorVehic
|
||||
* @return
|
||||
*/
|
||||
public static String insertMotor(List<MotorVehicleObject> motorVehic, String token) {return null;}
|
||||
/**
|
||||
* 申请进行布控
|
||||
* @return
|
||||
*/
|
||||
public static String cancelDbDispositions(List<DispositionObjectDto> bkDto){return null;}
|
||||
|
||||
|
||||
public static String insertDispositions(DispositionObjectDto dispositions,String token) {return null;}
|
||||
|
||||
/**
|
||||
* 删除布控库人员
|
||||
*
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
public static String delFaces(String id, String tabId) {return null;}
|
||||
|
||||
/**
|
||||
* 布控人员
|
||||
*
|
||||
* @param dispositions
|
||||
* @return
|
||||
*/
|
||||
public static String insertDispositions(Dispositions dispositions) {return null;}
|
||||
|
||||
|
||||
|
||||
public static String insertPersonIdentifyByToken(DataClassTabObject dataClassTabObject,String token){return null;}
|
||||
|
||||
/**
|
||||
* 更新布控库信息
|
||||
* @param tabs
|
||||
* @return
|
||||
*/
|
||||
public static String updateBkDbInfor(List<DHUpVIASDataClassTabs> tabs){return null;}
|
||||
|
||||
/**
|
||||
* 删除布控库车辆
|
||||
*
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
public static String delMotor(String id, String tabId) {return null;}
|
||||
|
||||
}
|
@ -0,0 +1,44 @@
|
||||
package com.mosty.bkzx.sjjs.client;
|
||||
|
||||
|
||||
import com.mosty.bkzx.sjjs.vo.AuthorizeTwoVo;
|
||||
import com.mosty.common.base.exception.BusinessException;
|
||||
|
||||
public enum TokenClient {
|
||||
|
||||
INSTANCE();
|
||||
|
||||
private static String token;
|
||||
|
||||
private static long createdTime;
|
||||
|
||||
|
||||
public String accessToken(){
|
||||
if(token == null){
|
||||
AuthorizeTwoVo authorizeTwoVo = HttpClient.authorizeAfter(HttpClient.authorizeBefore("zymytest","web"),"zymytest","system123");
|
||||
token = authorizeTwoVo.getToken();
|
||||
createdTime = System.currentTimeMillis();
|
||||
}
|
||||
if((System.currentTimeMillis() - createdTime) >= 90 *1000 ){
|
||||
HttpClient.keepAlive(token);
|
||||
}
|
||||
if((System.currentTimeMillis() - createdTime) >= 120 *1000){
|
||||
AuthorizeTwoVo authorizeTwoVo = HttpClient.authorizeAfter(HttpClient.authorizeBefore("zymytest","web"),"zymytest","system123");
|
||||
token = authorizeTwoVo.getToken();
|
||||
createdTime = System.currentTimeMillis();
|
||||
}
|
||||
return token;
|
||||
}
|
||||
|
||||
/**
|
||||
* 大华根据不同的市区建库
|
||||
* @param account
|
||||
* @return
|
||||
*/
|
||||
public String accessToken(AccountUtils.Accounts account){
|
||||
if(null == account){throw new BusinessException("token账号信息无效!");}
|
||||
AuthorizeTwoVo authorizeTwoVo = HttpClient.authorizeAfter(HttpClient.authorizeBefore(account.getAccount(),"web"),account.getAccount(),account.getPwd());
|
||||
token = authorizeTwoVo.getToken();
|
||||
return token;
|
||||
}
|
||||
}
|
@ -0,0 +1,39 @@
|
||||
package com.mosty.bkzx.sjjs.domain;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public class ResponseStatusList {
|
||||
|
||||
|
||||
@JsonProperty("ResponseStatusListObject")
|
||||
private ResponseStatusListObjectDTO responseStatusListObject;
|
||||
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public static class ResponseStatusListObjectDTO {
|
||||
@JsonProperty("ResponseStatusObject")
|
||||
private List<ResponseStatusObjectDTO> responseStatusObject;
|
||||
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public static class ResponseStatusObjectDTO {
|
||||
@JsonProperty("Id")
|
||||
private String id;
|
||||
@JsonProperty("LocalTime")
|
||||
private String localTime;
|
||||
@JsonProperty("RequestURL")
|
||||
private String requestURL;
|
||||
@JsonProperty("StatusCode")
|
||||
private String statusCode;
|
||||
@JsonProperty("StatusString")
|
||||
private String statusString;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,52 @@
|
||||
package com.mosty.bkzx.sjjs.dto;
|
||||
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 图像识别返回人员列表
|
||||
*/
|
||||
@Data
|
||||
public class CustomInfo implements Serializable, Cloneable {
|
||||
private static final long serialVersionUID = 1l;
|
||||
|
||||
/**
|
||||
* 人员身份证号
|
||||
*/
|
||||
private String sfzh;
|
||||
|
||||
/**
|
||||
* 人员出身日期
|
||||
*/
|
||||
private String csrq;
|
||||
|
||||
/**
|
||||
* 人员性别代码
|
||||
*/
|
||||
private String xbdm;
|
||||
|
||||
/**
|
||||
* 人员姓名
|
||||
*/
|
||||
private String xm;
|
||||
|
||||
/**
|
||||
* 人员照片ID
|
||||
*/
|
||||
private String xp;
|
||||
|
||||
/**
|
||||
* 相似度
|
||||
*/
|
||||
private double xsd;
|
||||
|
||||
/**
|
||||
* 人员照片URL
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
private String filePath;
|
||||
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
package com.mosty.bkzx.sjjs.dto;
|
||||
|
||||
import com.mosty.bkzx.sjjs.enums.DHDataTypeEnum;
|
||||
import com.mosty.bkzx.sjjs.enums.DHOperateTypeENum;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
public class DHDateDto implements Serializable {
|
||||
private Object data; //数据
|
||||
private DHDataTypeEnum dataType; //数据类型
|
||||
private DHOperateTypeENum operType; //操作类型
|
||||
private Object args; //附带参数
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
package com.mosty.bkzx.sjjs.dto;
|
||||
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 大华修改布控库信息请求模型
|
||||
*/
|
||||
@Data
|
||||
public class DHUpVIASDataClassTabs implements Serializable {
|
||||
@JSONField(name = "TabID")
|
||||
private String tabID;
|
||||
@JSONField(name = "TabName")
|
||||
private String tabName;
|
||||
@JSONField(name = "Description")
|
||||
private String description;
|
||||
}
|
@ -0,0 +1,170 @@
|
||||
package com.mosty.bkzx.sjjs.dto;
|
||||
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 大华布控请求
|
||||
*/
|
||||
@Data
|
||||
public class DispositionObjectDto implements Serializable {
|
||||
/**
|
||||
* 布控id,【必填】 总共33位,前12位机构编码,其中1-6位为
|
||||
* 省市县的行政区划代码;第7-12位为前六位所标识的公安机关的下辖机构,分为三层,每层编
|
||||
* 码2位,00代表本级机构。13-14位为子类型编码,详细定义:01-布/撤控 ;02-告警 ;03-订
|
||||
* 阅;04-通知 ;99-其它 ;15-28位为当前时间;最后5位为随机数。
|
||||
*/
|
||||
@JSONField(name = "DispositionID")
|
||||
private String DispositionID;
|
||||
/**
|
||||
* 布控标题,布控时【必填】
|
||||
*/
|
||||
@JSONField(name = "Title")
|
||||
private String Title;
|
||||
/**
|
||||
* 布控类别,人、机动车、非机动车、关键字、人脸等布
|
||||
* 控时【必填】 详细定义见A10 布控类别(DispositionCategoryType)
|
||||
*/
|
||||
@JSONField(name = "DispositionCategory")
|
||||
private int DispositionCategory;
|
||||
/**
|
||||
* 布控对象特征 ,【选填】。
|
||||
*/
|
||||
@JSONField(name = "TargetFeature")
|
||||
private String TargetFeature;
|
||||
/**
|
||||
*布控对象图像,图像路径,以目标图像特征进行布控时使
|
||||
* 用。【选填】
|
||||
*/
|
||||
@JSONField(name = "TargetImageURI")
|
||||
private String TargetImageURI;
|
||||
/**
|
||||
* 布控优先级 ,1-3 级,1 级最高,3 级最低。预警灵敏度越高,
|
||||
* 则触发预警的相似度阈值越低,误报率越高。各厂商分析系统可根据预警灵敏度级别,设置布
|
||||
* 控的相似度阈值。【选填】
|
||||
*/
|
||||
@JSONField(name = "PriorityLevel")
|
||||
private int PriorityLevel;
|
||||
/**
|
||||
*申请人 姓名 【必填】
|
||||
*/
|
||||
@JSONField(name = "ApplicantName")
|
||||
private String ApplicantName;
|
||||
/**
|
||||
* 申请人联系方式 【选填】
|
||||
*/
|
||||
@JSONField(name = "ApplicantInfo")
|
||||
private String ApplicantInfo;
|
||||
/**
|
||||
* 申请单位 【必填】
|
||||
*/
|
||||
@JSONField(name = "ApplicantOrg")
|
||||
private String ApplicantOrg;
|
||||
/**
|
||||
* 布控开始时间 【必填】
|
||||
*/
|
||||
@JSONField(name = "BeginTime")
|
||||
private String BeginTime;
|
||||
/**
|
||||
* 布控结束时间 【必填】
|
||||
*/
|
||||
@JSONField(name = "EndTime")
|
||||
private String EndTime;
|
||||
/**
|
||||
* : 创建时间,系统自动生成
|
||||
*/
|
||||
@JSONField(name = "CreatTime")
|
||||
private String CreatTime;
|
||||
/**
|
||||
* 布控操作类型 ,【必填】 0:布控;1:撤控
|
||||
*/
|
||||
@JSONField(name = "OperateType")
|
||||
private int OperateType;
|
||||
/**
|
||||
* 布控执行状态,0:布控中;1:已撤控;2:布控到期;9:
|
||||
* 未布控。【选填】
|
||||
*/
|
||||
@JSONField(name = "DispositionStatus")
|
||||
private int DispositionStatus;
|
||||
/**
|
||||
* 布控范围,1:卡口;2:区域布控;3:设备。【必填】
|
||||
*/
|
||||
@JSONField(name = "DispositionRange")
|
||||
private int DispositionRange;
|
||||
/**
|
||||
* 布控卡口 ,DispositionRange为1时使用; 可带多个卡口ID,多个
|
||||
* 以”;”间隔(英文半角分号); 为空表示布控到所有卡口;
|
||||
*/
|
||||
@JSONField(name = "TollgateList")
|
||||
private String TollgateList;
|
||||
/**
|
||||
* 布控行政区代码,DispositionRange为2时使用;实际需要执行
|
||||
* 布控的行政区域代码,县际联动填6位行政区号码(GB/T2260规定),地市联动填4位行政区
|
||||
* 号码,省际联动填2位行政区号码,多个区域间以”;”间隔;为空表示布控到所有区域;
|
||||
*/
|
||||
@JSONField(name = "DispositionArea")
|
||||
private String DispositionArea;
|
||||
/**
|
||||
* 告警信息接收地址, 【必填】
|
||||
*/
|
||||
@JSONField(name = "ReceiveAddr")
|
||||
private String ReceiveAddr;
|
||||
/**
|
||||
* 告警信息接收手机号
|
||||
*/
|
||||
@JSONField(name = "ReceiveMobile")
|
||||
private String ReceiveMobile;
|
||||
/**
|
||||
* 布控原因
|
||||
*/
|
||||
@JSONField(name = "Reason")
|
||||
private String Reason;
|
||||
/**
|
||||
* 撤控单位名称
|
||||
*/
|
||||
@JSONField(name = "DispositionRemoveOrg")
|
||||
private String DispositionRemoveOrg;
|
||||
/**
|
||||
* 撤控人
|
||||
*/
|
||||
@JSONField(name = "DispositionRemovePerson")
|
||||
private String DispositionRemovePerson;
|
||||
/**
|
||||
* 撤控时间
|
||||
*/
|
||||
@JSONField(name = "DispositionRemoveTime")
|
||||
private String DispositionRemoveTime;
|
||||
/**
|
||||
* 撤控原因
|
||||
*/
|
||||
@JSONField(name = "DispositionRemoveReason")
|
||||
private String DispositionRemoveReason;
|
||||
/**
|
||||
* 图像列表 ,可以包含0个或者多个子图像对象实现单图片/多图布
|
||||
* 控;一般用于单图布控,多图布控建议使用TabIDList
|
||||
*/
|
||||
@JSONField(name = "SubImageList")
|
||||
private List<Object> SubImageList;
|
||||
/**
|
||||
* 布控库id列表,库布控时【必填】,其他情况无需填写;可多值,此
|
||||
* 时类型为string,多个值之间使用英文半角分号隔开
|
||||
*/
|
||||
@JSONField(name = "TabIDList")
|
||||
private String TabIDList;
|
||||
/**
|
||||
* 布控设备,设备布控时使用。可对多个设备进行布控。携带多个设备
|
||||
* ID时使用英文半角分号分隔;为空表示布控到当前行政区域所有设备
|
||||
*/
|
||||
@JSONField(name = "DeviceList")
|
||||
private String DeviceList;
|
||||
/**
|
||||
* 预警灵敏度 ,预警灵敏度:1-3 级,1 级最高(相似度低于
|
||||
* 70%),3 级最低(相似度大于等于90%)。预警灵敏度越高,则触发预警的相似度阈值越
|
||||
* 低,误报率越高。各厂商分析系统可根据预警灵敏度级别,设置布控的相似度阈值 .【选填】
|
||||
*/
|
||||
@JSONField(name = "AlarmSensitivity")
|
||||
private int AlarmSensitivity = 3;
|
||||
}
|
@ -0,0 +1,100 @@
|
||||
package com.mosty.bkzx.sjjs.dto;
|
||||
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 向布控库中添加布控人员信
|
||||
*/
|
||||
@Data
|
||||
public class FaceObjectDTO implements Serializable {
|
||||
/**
|
||||
* 类型 String ,总共48位,【必填】SourceID+06(人脸)+5位随机数
|
||||
*/
|
||||
@JSONField(name = "FaceID")
|
||||
private String FaceID;
|
||||
/**
|
||||
* 证件类型,【选填】,111-居民身份证;112114-军官证;123-警
|
||||
* 官证;414-普通护照。
|
||||
*/
|
||||
@JSONField(name ="IDType")
|
||||
private String IDType;
|
||||
|
||||
/**
|
||||
* :类型 String 。有效证件号码;【必填】;
|
||||
*/
|
||||
@JSONField(name = "IDNumber")
|
||||
private String IDNumber;
|
||||
/**
|
||||
* 姓名
|
||||
*/
|
||||
@JSONField(name = "Name")
|
||||
private String Name;
|
||||
/**
|
||||
* 类型 String ,性别代码,【选填】 0-未知的性别;1-男性;2-女性;9-未说
|
||||
* 明的性别。
|
||||
*/
|
||||
@JSONField(name = "GenderCode")
|
||||
private String GenderCode;
|
||||
/**
|
||||
* 归属分类标签,必填 1-20设备编码 21-22子类型编码【02-图像;03-文件;04 特
|
||||
* 征值;05 人脸库;06 人员库;07 机动车库;08 非机动车库;09 物品库;10 场景库;99-其他】
|
||||
* 23-36时间编码37-41序号。
|
||||
*/
|
||||
@JSONField(name = "TabID")
|
||||
private String TabID;
|
||||
|
||||
/**
|
||||
* 所属市公安局代码
|
||||
*/
|
||||
private String sssgajdm;
|
||||
|
||||
/**
|
||||
* 图片信息
|
||||
*/
|
||||
@JSONField(name = "SubImageList")
|
||||
private Map<String,Object> SubImageList = new HashMap<>();
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 图片信息
|
||||
*/
|
||||
@Data
|
||||
public static class SubImageInfoObject implements Serializable{
|
||||
/**
|
||||
* 照片存储地址
|
||||
*/
|
||||
/*
|
||||
@JSONField(name = "StoragePath")
|
||||
private String StoragePath;
|
||||
*/
|
||||
|
||||
@JSONField(name = "Data")
|
||||
private String Data;
|
||||
/**
|
||||
* 人脸区域,LeftTopX;
|
||||
*/
|
||||
// @JSONField(name = "LeftTopX")
|
||||
//private BigDecimal LeftTopX;
|
||||
/**
|
||||
* 人脸区域,LeftTopY;
|
||||
*/
|
||||
// @JSONField(name = "LeftTopY")
|
||||
// private BigDecimal LeftTopY;
|
||||
/**
|
||||
* 人脸区域,RightBtmX;
|
||||
*/
|
||||
// @JSONField(name = "RightBtmX")
|
||||
// private BigDecimal RightBtmX;
|
||||
/**
|
||||
* 人脸区域,RightBtmY;
|
||||
*/
|
||||
// @JSONField(name = "RightBtmY")
|
||||
// private BigDecimal RightBtmY;
|
||||
}
|
||||
}
|
@ -0,0 +1,42 @@
|
||||
package com.mosty.bkzx.sjjs.dto;
|
||||
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 车辆布控库添加数据模型
|
||||
*/
|
||||
@Data
|
||||
public class MotorVehicleObject implements Serializable {
|
||||
/**
|
||||
* 类型 String ,总共48位,【必填】SourceID+07(机动车)+5位
|
||||
* 随机数。其中SourceID为来源图像信息标识,如大图ImageID,有关联大图时必填。
|
||||
* 41位, DeviceID+02+当前时间(14位)+5位随机数
|
||||
*/
|
||||
@JSONField(name = "MotorVehicleID")
|
||||
private String MotorVehicleID;
|
||||
/**
|
||||
* 号牌种类【必填】 参考附录A15
|
||||
*/
|
||||
@JSONField(name = "PlateClass")
|
||||
private String PlateClass;
|
||||
/**
|
||||
* 车辆号牌【必填】
|
||||
*/
|
||||
@JSONField(name = "PlateNo")
|
||||
private String PlateNo;
|
||||
/**
|
||||
* 归属分类标签,必填 1-20设备编码 21-22子类型编码【02-图像;03-文件;04
|
||||
* 特征值;05 人脸库;06 人员库;07 机动车库;08 非机动车库;09 物品库;10 场景
|
||||
* 库;99-其他】23-36时间编码37-41序号。【必填】
|
||||
*/
|
||||
@JSONField(name = "TabID")
|
||||
private String TabID;
|
||||
/**
|
||||
* 所属市公安局代码
|
||||
*/
|
||||
private String sssgajdm;
|
||||
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
package com.mosty.bkzx.sjjs.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 大华布控接口返回数据
|
||||
*/
|
||||
@Data
|
||||
public class ResponseStatusObject {
|
||||
private String Id;
|
||||
private String LocalTime;
|
||||
private String RequestURL;
|
||||
private String StatusCode;
|
||||
private String StatusString;
|
||||
}
|
@ -0,0 +1,46 @@
|
||||
package com.mosty.bkzx.sjjs.dto;
|
||||
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
public class SubImageListDTO implements Serializable, Cloneable {
|
||||
@JSONField(name = "SubImageInfoObject")
|
||||
private List<SubImageInfoObjectDTO> subImageInfoObject;
|
||||
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public static class SubImageInfoObjectDTO {
|
||||
|
||||
@ApiModelProperty(value = "存储路径 ,图像文件的存储路径,采用URI命名规则")
|
||||
// @JSONField(name = "StoragePath") T区无法使用url 使用base64 用Data传
|
||||
@JSONField(name = "Data")
|
||||
private String storagePath;
|
||||
|
||||
@ApiModelProperty(value = "人脸区域,LeftTopX;")
|
||||
@JSONField(name = "LeftTopX")
|
||||
private Integer leftTopX;
|
||||
|
||||
@ApiModelProperty(value = "人脸区域,LeftTopY;")
|
||||
@JSONField(name = "LeftTopY")
|
||||
private Integer leftTopY;
|
||||
|
||||
@ApiModelProperty(value = "人脸区域,RightBtmX;")
|
||||
@JSONField(name = "RightBtmX")
|
||||
private Integer rightBtmX;
|
||||
|
||||
@ApiModelProperty(value = "人脸区域,RightBtmY;")
|
||||
@JSONField(name = "RightBtmY")
|
||||
private Integer rightBtmY;
|
||||
}
|
||||
}
|
@ -0,0 +1,42 @@
|
||||
package com.mosty.bkzx.sjjs.entity;
|
||||
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
@ApiModel(value = "创建人脸布控库对象", description = "创建人脸布控库对象")
|
||||
public class DataClassTabObject implements Serializable, Cloneable {
|
||||
|
||||
private static final long serialVersionUID = 1l;
|
||||
|
||||
|
||||
/**
|
||||
* 通道国标id(20位),组成为:省级编号(2位)+市级编号(2位)
|
||||
* +区级编号(2位)+基层接入单位编号(2位)+行业编码(2位)+设备类型编码
|
||||
* (3位)+网络标识(1位)+设备、用户序号(6位),
|
||||
*/
|
||||
@ApiModelProperty(value = "标签标识,库ID,总共41位。字段规则由20位设备 国标编码+人脸库(05)+14位当前时间+5位随机数")
|
||||
@JSONField(name = "TabID")
|
||||
private String TabID;
|
||||
|
||||
@ApiModelProperty(value = "标签名称")
|
||||
@JSONField(name = "TabName")
|
||||
private String TabName;
|
||||
|
||||
@ApiModelProperty(value = "标签描述")
|
||||
@JSONField(name = "Description")
|
||||
private String Description;
|
||||
|
||||
@ApiModelProperty(value = "null则默认为人像库新增 1、四位表示,第1位同TabID的第22位,表示一级分类。第2位表示二级分类。第3-4位表示三级分类。 5100:静态人脸 5200:抓拍人脸 ,5300:布控人脸 ,7300:布控车牌 ;2、静态库人脸不支持用于布控")
|
||||
@JSONField(name = "TabType")
|
||||
private String TabType;
|
||||
|
||||
}
|
@ -0,0 +1,148 @@
|
||||
package com.mosty.bkzx.sjjs.entity;
|
||||
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
import com.mosty.bkzx.sjjs.dto.SubImageListDTO;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
@ApiModel(value = "创建布控对象", description = "创建布控对象")
|
||||
public class Dispositions implements Serializable, Cloneable {
|
||||
|
||||
private static final long serialVersionUID = 1l;
|
||||
|
||||
@ApiModelProperty(value = "布控id,【必填】 总共33位,前12位机构编码,其中1-6位为省市县的行政区划代码;第7-12位为前六位所标识的公安机关的下辖机构,分为三层,每层编码2位,00代表本级机构。13-14位为子类型编码,详细定义:01-布/撤控 ;02-告警;03-订阅;04-通知;99-其它 ;15-28位为当前时间;最后5位为随机数。")
|
||||
@JSONField(name = "DispositionID")
|
||||
private String dispositionID;
|
||||
|
||||
@ApiModelProperty(value = "布控标题,布控时【必填】")
|
||||
@JSONField(name = "Title")
|
||||
private String title;
|
||||
|
||||
@ApiModelProperty(value = "布控类别,人、机动车、非机动车、关键字、人脸等布控时【必填】 详细定义见A10 布控类别(DispositionCategoryType)")
|
||||
@JSONField(name = "DispositionCategory")
|
||||
private Integer dispositionCategory;
|
||||
|
||||
@ApiModelProperty(value = "布控对象特征 ,【选填】。")
|
||||
@JSONField(name = "TargetFeature")
|
||||
private String targetFeature;
|
||||
|
||||
@ApiModelProperty(value = "布控对象图像,图像路径,以目标图像特征进行布控时使用。【选填】")
|
||||
@JSONField(name = "TargetImageURI")
|
||||
private Object targetImageURI;
|
||||
|
||||
@ApiModelProperty(value = "布控优先级 ,1-3 级,1 级最高,3 级最低。预警灵敏度越高,则触发预警的相似度阈值越低,误报率越高。各厂商分析系统可根据预警灵敏度级别,设置布控的相似度阈值。【选填】")
|
||||
@JSONField(name = "PriorityLevel")
|
||||
private Integer priorityLevel;
|
||||
|
||||
@ApiModelProperty(value = ":申请人 姓名 【必填】")
|
||||
@JSONField(name = "ApplicantName")
|
||||
private String applicantName;
|
||||
|
||||
@ApiModelProperty(value = "申请人联系方式 【选填】")
|
||||
@JSONField(name = "ApplicantInfo")
|
||||
private Object applicantInfo;
|
||||
|
||||
@ApiModelProperty(value = "申请单位 【必填】")
|
||||
@JSONField(name = "ApplicantOrg")
|
||||
private String applicantOrg;
|
||||
|
||||
@ApiModelProperty(value = "布控开始时间 【必填】")
|
||||
@JSONField(name = "BeginTime")
|
||||
private String beginTime;
|
||||
|
||||
@ApiModelProperty(value = "布控结束时间 【必填】")
|
||||
@JSONField(name = "EndTime")
|
||||
private String endTime;
|
||||
|
||||
@ApiModelProperty(value = "创建时间,系统自动生成")
|
||||
@JSONField(name = "CreatTime")
|
||||
private String creatTime;
|
||||
|
||||
@ApiModelProperty(value = " 布控操作类型 ,【必填】 0:布控;1:撤控")
|
||||
@JSONField(name = "OperateType")
|
||||
private Integer operateType;
|
||||
|
||||
@ApiModelProperty(value = "布控执行状态,0:布控中;1:已撤控;2:布控到期;9:未布控。【选填】")
|
||||
@JSONField(name = "DispositionStatus")
|
||||
private Integer dispositionStatus;
|
||||
|
||||
@ApiModelProperty(value = "布控范围,1:卡口;2:区域布控;3:设备。【必填】")
|
||||
@JSONField(name = "DispositionRange")
|
||||
private Integer dispositionRange;
|
||||
|
||||
@ApiModelProperty(value = "布控卡口 ,DispositionRange为1时使用; 可带多个卡口ID,多个以”;”间隔(英文半角分号); 为空表示布控到所有卡口;")
|
||||
@JSONField(name = "TollgateList")
|
||||
private Object tollgateList;
|
||||
|
||||
@ApiModelProperty(value = "布控行政区代码,DispositionRange为2时使用;实际需要执行布控的行政区域代码,县际联动填6位行政区号码(GB/T2260规定),地市联动填4位行政区号码,省际联动填2位行政区号码,多个区域间以”;”间隔;为空表示布控到所有区域;")
|
||||
@JSONField(name = "DispositionArea")
|
||||
private Object dispositionArea;
|
||||
|
||||
@ApiModelProperty(value = " 告警信息接收地址, 【必填】")
|
||||
@JSONField(name = "ReceiveAddr")
|
||||
private String receiveAddr;
|
||||
|
||||
@ApiModelProperty(value = "告警信息接收手机号")
|
||||
@JSONField(name = "ReceiveMobile")
|
||||
private String receiveMobile;
|
||||
|
||||
@ApiModelProperty(value = "布控原因")
|
||||
@JSONField(name = "Reason")
|
||||
private String reason;
|
||||
|
||||
@ApiModelProperty(value = "撤控单位名称")
|
||||
@JSONField(name = "DispositionRemoveOrg")
|
||||
private String dispositionRemoveOrg;
|
||||
|
||||
@ApiModelProperty(value = "撤控人")
|
||||
@JSONField(name = "DispositionRemovePerson")
|
||||
private String dispositionRemovePerson;
|
||||
|
||||
@ApiModelProperty(value = "撤控时间")
|
||||
@JSONField(name = "DispositionRemoveTime")
|
||||
private String dispositionRemoveTime;
|
||||
|
||||
@ApiModelProperty(value = "撤控原因")
|
||||
@JSONField(name = "DispositionRemoveReason")
|
||||
private String dispositionRemoveReason;
|
||||
|
||||
@ApiModelProperty(value = "图像列表 ,可以包含0个或者多个子图像对象实现单图片/多图布控;一般用于单图布控,多图布控建议使用TabIDList")
|
||||
@JSONField(name = "SubImageList")
|
||||
private SubImageListDTO subImageList;
|
||||
|
||||
@ApiModelProperty(value = " 布控库id列表,库布控时【必填】,其他情况无需填写;可多值,此时类型为string,多个值之间使用英文半角分号隔开")
|
||||
@JSONField(name = "TabIDList")
|
||||
private String tabIDList;
|
||||
|
||||
@ApiModelProperty(value = " 布控设备,设备布控时使用。可对多个设备进行布控。携带多个设备ID时使用英文半角分号分隔;为空表示布控到当前行政区域所有设备")
|
||||
@JSONField(name = "DeviceList")
|
||||
private String deviceList;
|
||||
|
||||
@ApiModelProperty(value = "特征")
|
||||
@JSONField(name = "FeatureObject")
|
||||
private Object featureObject;
|
||||
|
||||
@ApiModelProperty(value = "结果图像声明")
|
||||
@JSONField(name = "ResultImageDeclare")
|
||||
private Object resultImageDeclare;
|
||||
|
||||
@ApiModelProperty(value = "结果特征声明")
|
||||
@JSONField(name = "ResultFeatureDeclare")
|
||||
private Object resultFeatureDeclare;
|
||||
|
||||
@ApiModelProperty(value = "布控库ID")
|
||||
@JSONField(name = "TabID")
|
||||
private String tabID;
|
||||
|
||||
@ApiModelProperty(value = "预警灵敏度 ,预警灵敏度:1-3 级,1 级最高(相似度低于70低,误报率越高。各厂商分析系统可根据预警灵敏度级别,设置布控的相似度阈值 .【选填】")
|
||||
@JSONField(name = "AlarmSensitivity")
|
||||
private Integer alarmSensitivity;
|
||||
}
|
@ -0,0 +1,48 @@
|
||||
package com.mosty.bkzx.sjjs.entity;
|
||||
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.mosty.bkzx.sjjs.dto.SubImageListDTO;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
@ApiModel(value = "人脸布控库对象", description = "人脸布控库对象")
|
||||
public class Face {
|
||||
|
||||
@ApiModelProperty(value = "总共48位,【必填】SourceID+06(人脸)+5位随机数。其中SourceID为来源图像信息标识,如大图ImageID,有关联大图时必填。41位, DeviceID+02+当前时间(14位)+5位随机数,")
|
||||
@JSONField(name = "FaceID")
|
||||
private String faceID;
|
||||
|
||||
@ApiModelProperty(value = "证件类型,111-居民身份证;112114-军官证;123-警官证;414-普通护照。")
|
||||
@JSONField(name = "IDType")
|
||||
private String iDType;
|
||||
|
||||
@ApiModelProperty(value = "有效证件号码;")
|
||||
@JSONField(name = "IDNumber")
|
||||
private String iDNumber;
|
||||
|
||||
@ApiModelProperty(value = "人员的中文姓名全称")
|
||||
@JSONField(name = "Name")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(value = "性别代码,【选填】 0-未知的性别;1-男性;2-女性;9-未说明的性别")
|
||||
@JSONField(name = "GenderCode")
|
||||
private String genderCode;
|
||||
|
||||
@ApiModelProperty(value = "存储路径 ,图像文件的存储路径,采用URI命名规则")
|
||||
@JSONField(name = "SubImageList")
|
||||
private SubImageListDTO subImageList;
|
||||
|
||||
@ApiModelProperty(value = "归属分类标签,必填 1-20设备编码 21-22子类型编码【02-图像;03-文件;04 特 征值;05 人脸库;06 人员库;07 机动车库;08 非机动车库;09 物品库;10 场景库;99-其他】23-36时间编码37-41序号")
|
||||
@JSONField(name = "TabID")
|
||||
private String tabID;
|
||||
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
package com.mosty.bkzx.sjjs.entity;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
@ApiModel(value = "创建人脸布控库对象", description = "创建人脸布控库对象")
|
||||
public class FaceObject {
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,36 @@
|
||||
package com.mosty.bkzx.sjjs.entity;
|
||||
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
@ApiModel(value = "车辆布控库对象", description = "车辆布控库对象")
|
||||
public class MotorVehic implements Serializable, Cloneable {
|
||||
|
||||
private static final long serialVersionUID = 1l;
|
||||
|
||||
@ApiModelProperty(value = "总共48位,【必填】SourceID+07(机动车)+5位随机数。其中SourceID为来源图像信息标识,如大图ImageID,有关联大图时必填。41位, DeviceID+02+当前时间(14位)+5位随机数")
|
||||
@JSONField(name = "MotorVehicleID")
|
||||
private String motorVehicleID;
|
||||
|
||||
@ApiModelProperty(value = "号牌种类【必填】")
|
||||
@JSONField(name = "PlateClass")
|
||||
private String plateClass;
|
||||
|
||||
@ApiModelProperty(value = "车辆号牌【必填】")
|
||||
@JSONField(name = "PlateNo")
|
||||
private String plateNo;
|
||||
|
||||
@ApiModelProperty(value = "归属分类标签,必填 1-20设备编码 21-22子类型编码【02-图像;03-文件;04 特 征值;05 人脸库;06 人员库;07 机动车库;08 非机动车库;09 物品库;10 场景库;99-其他】23-36时间编码37-41序号")
|
||||
@JSONField(name = "TabID")
|
||||
private String tabID;
|
||||
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
package com.mosty.bkzx.sjjs.enums;
|
||||
|
||||
import lombok.Getter;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 大华数据类型枚举
|
||||
*/
|
||||
@Getter
|
||||
public enum DHDataTypeEnum implements Serializable {
|
||||
DB, //数据库
|
||||
PERSONFACE, //人脸数据
|
||||
CAR, //车辆数据
|
||||
BKDB, //数据库布控数据类型
|
||||
;
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
package com.mosty.bkzx.sjjs.enums;
|
||||
|
||||
import lombok.Getter;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 数据操作类型
|
||||
*/
|
||||
@Getter
|
||||
public enum DHOperateTypeENum implements Serializable {
|
||||
Add,
|
||||
Update,
|
||||
Delete;
|
||||
}
|
@ -0,0 +1,35 @@
|
||||
package com.mosty.bkzx.sjjs.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 登陆第一次交互返回内容 视觉计算
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
@ApiModel(value = "登陆第一次交互返回内容对象", description = "登陆第一次交互返回内容对象")
|
||||
public class AuthorizeOneVo implements Serializable,Cloneable {
|
||||
|
||||
private static final long serialVersionUID = 1l;
|
||||
|
||||
|
||||
@ApiModelProperty(value = "域信息,加密过程使用")
|
||||
private String realm;
|
||||
|
||||
@ApiModelProperty(value = "随机密钥种子")
|
||||
private String randomKey;
|
||||
|
||||
@ApiModelProperty(value = "加密算法")
|
||||
private String encryptType;
|
||||
|
||||
@ApiModelProperty(value = "使用哪种加密流程。没有该字段,按通用加密流程计算,\"simple\"表示按简易加密流程计算")
|
||||
private String method;
|
||||
|
||||
}
|
@ -0,0 +1,41 @@
|
||||
package com.mosty.bkzx.sjjs.vo;
|
||||
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 视觉计算 登陆第一次交互返回内容对象
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
@ApiModel(value = "登陆第二次交互返回内容对象", description = "登陆第二次交互返回内容对象")
|
||||
public class AuthorizeTwoVo implements Serializable, Cloneable {
|
||||
|
||||
private static final long serialVersionUID = 1l;
|
||||
|
||||
@ApiModelProperty(value = "有效时间,由服务端指定,单位秒,建议3/4 duration时就进行会话更新")
|
||||
private int duration;
|
||||
|
||||
@ApiModelProperty(value = "返回登陆令牌,令牌字符串由服务端发布。之后的其它请求,在HTTP头的 X-Subject-Token: 带上这个令牌进行鉴权")
|
||||
private String token;
|
||||
|
||||
@ApiModelProperty(value = "创建该会话的用户名")
|
||||
private String userName;
|
||||
|
||||
@ApiModelProperty(value = "用户名对应的用户Id,如果需要对该用户信息进行修改,使用用户Id")
|
||||
private String userId;
|
||||
|
||||
@ApiModelProperty(value = "上次登陆的IP")
|
||||
private String lastLoginIp;
|
||||
|
||||
@ApiModelProperty(value = "视频云版本")
|
||||
private String version;
|
||||
|
||||
}
|
@ -0,0 +1,38 @@
|
||||
package com.mosty.bkzx.sjjs.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
@ApiModel(value = "图像识别返回人员列表", description = "图像识别返回人员列表")
|
||||
public class CustomInfoVo implements Serializable, Cloneable {
|
||||
private static final long serialVersionUID = 1l;
|
||||
|
||||
@ApiModelProperty(value = "人员身份证号")
|
||||
private String sfzh;
|
||||
|
||||
@ApiModelProperty(value = "人员出身日期")
|
||||
private String csrq;
|
||||
|
||||
@ApiModelProperty(value = "人员性别代码")
|
||||
private String xbdm;
|
||||
|
||||
@ApiModelProperty(value = "人员姓名")
|
||||
private String xm;
|
||||
|
||||
@ApiModelProperty(value = "人员照片ID")
|
||||
private String xp;
|
||||
|
||||
@ApiModelProperty(value = "相似度")
|
||||
private double xsd;
|
||||
|
||||
@ApiModelProperty(value = "人员照片URL")
|
||||
private String filePath;
|
||||
}
|
@ -0,0 +1,23 @@
|
||||
package com.mosty.bkzx.sjjs.vo;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
public class FaceObject implements Serializable, Cloneable {
|
||||
private static final long serialVersionUID = 1l;
|
||||
|
||||
private String IDNumber;
|
||||
|
||||
private String Name;
|
||||
|
||||
private double Similarity;
|
||||
|
||||
private SubImageList SubImageList;
|
||||
|
||||
}
|
@ -0,0 +1,31 @@
|
||||
package com.mosty.bkzx.sjjs.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
@ApiModel(value = "登陆第一次交互返回内容对象", description = "登陆第一次交互返回内容对象")
|
||||
public class FaceObjectList implements Serializable,Cloneable {
|
||||
private static final long serialVersionUID = 1l;
|
||||
|
||||
private List<FaceObject> FaceObject;
|
||||
|
||||
public FaceObjectList(List<FaceObject> faceObject) {
|
||||
FaceObject = faceObject;
|
||||
}
|
||||
|
||||
public List<FaceObject> getFaceObject() {
|
||||
return FaceObject;
|
||||
}
|
||||
|
||||
public void setFaceObject(List<FaceObject> faceObject) {
|
||||
FaceObject = faceObject;
|
||||
}
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
package com.mosty.bkzx.sjjs.vo;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
public class FaceObjectVo implements Serializable,Cloneable {
|
||||
private static final long serialVersionUID = 1l;
|
||||
|
||||
private String IDNumber;
|
||||
private String Name;
|
||||
private double Similarity;
|
||||
|
||||
private SubImageList SubImageList;
|
||||
|
||||
}
|
@ -0,0 +1,32 @@
|
||||
package com.mosty.bkzx.sjjs.vo;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
public class FacePicture implements Serializable, Cloneable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 图片类型(0、base64,1、url)
|
||||
*/
|
||||
private int type;
|
||||
|
||||
/**
|
||||
*人俩图片base64(type为0时必填)
|
||||
*/
|
||||
private String data;
|
||||
|
||||
|
||||
/**
|
||||
*人俩图片url(type为1时必填)
|
||||
*/
|
||||
private String url;
|
||||
|
||||
};
|
@ -0,0 +1,34 @@
|
||||
package com.mosty.bkzx.sjjs.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 图像采集列表
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
@ApiModel(value = "图像采集列表", description = "图像采集列表")
|
||||
public class FaceRepository implements Serializable, Cloneable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "人像库名称")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(value = "人像库类型(默认黑名单0)")
|
||||
private int type;
|
||||
|
||||
@ApiModelProperty(value = "备注")
|
||||
private String memo;
|
||||
|
||||
@ApiModelProperty(value = "用户自定义库等级(如:1-A,2-B)")
|
||||
private String rank;
|
||||
|
||||
}
|
@ -0,0 +1,81 @@
|
||||
package com.mosty.bkzx.sjjs.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 图像采集列表
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
@ApiModel(value = "图像采集列表", description = "图像采集列表")
|
||||
public class FaceRepositoryInfo implements Serializable, Cloneable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 库ID
|
||||
*/
|
||||
@ApiModelProperty(value = "库ID")
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 人像库名称
|
||||
*/
|
||||
@ApiModelProperty(value = "人像库名称")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 人像库类型(默认黑名单0)
|
||||
*/
|
||||
@ApiModelProperty(value = "人像库类型(默认黑名单0)")
|
||||
private int type;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ApiModelProperty(value = "备注")
|
||||
private String memo;
|
||||
|
||||
/**
|
||||
* 用户自定义库等级(如:1-A,2-B)
|
||||
*/
|
||||
@ApiModelProperty(value = "用户自定义库等级(如:1-A,2-B)")
|
||||
private String rank;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private String createTime;
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
@ApiModelProperty(value = "修改")
|
||||
private String updateTime;
|
||||
|
||||
/**
|
||||
* 库中图片数目
|
||||
*/
|
||||
@ApiModelProperty(value = "库中图片数目")
|
||||
private String totalPictureCount;
|
||||
|
||||
/**
|
||||
* 库中人脸数目
|
||||
*/
|
||||
@ApiModelProperty(value = "库中人脸数目")
|
||||
private String faceImageCount;
|
||||
|
||||
/**
|
||||
* 入库失败数目
|
||||
*/
|
||||
@ApiModelProperty(value = "入库失败数目")
|
||||
private String failedPictureCount;
|
||||
}
|
@ -0,0 +1,81 @@
|
||||
package com.mosty.bkzx.sjjs.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
public class FaceRepositoryUser implements Serializable, Cloneable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 库ID
|
||||
*/
|
||||
@ApiModelProperty(value = "库ID")
|
||||
private String repositoryId;
|
||||
|
||||
/**
|
||||
* 证件类型(111、身份证,114、军官证,123、警察证,414、普通护照,0、其他)
|
||||
*/
|
||||
@ApiModelProperty(value = "证件类型(111、身份证,114、军官证,123、警察证,414、普通护照,0、其他)")
|
||||
private int type;
|
||||
|
||||
/**
|
||||
* 证件号码
|
||||
*/
|
||||
@ApiModelProperty(value = "证件号码")
|
||||
private String identificationId;
|
||||
|
||||
/**
|
||||
* 成员姓名
|
||||
*/
|
||||
@ApiModelProperty(value = "成员姓名")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 区域编号
|
||||
*/
|
||||
@ApiModelProperty(value = "区域编号")
|
||||
private String region;
|
||||
|
||||
/**
|
||||
* 民族
|
||||
*/
|
||||
@ApiModelProperty(value = "民族")
|
||||
private String nation;
|
||||
|
||||
/**
|
||||
* 成员性别(0-未知,1-男,2-女)
|
||||
*/
|
||||
@ApiModelProperty(value = "成员性别(0-未知,1-男,2-女)")
|
||||
private String gender;
|
||||
|
||||
/**
|
||||
* 电话
|
||||
*/
|
||||
@ApiModelProperty(value = "电话")
|
||||
private String phone;
|
||||
/**
|
||||
* 地址
|
||||
*/
|
||||
@ApiModelProperty(value = "地址")
|
||||
private String address;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ApiModelProperty(value = "备注")
|
||||
private String memo;
|
||||
/**
|
||||
* 人脸图片
|
||||
*/
|
||||
@ApiModelProperty(value = "人脸图片")
|
||||
private FacePicture facePicture;
|
||||
}
|
@ -0,0 +1,43 @@
|
||||
package com.mosty.bkzx.sjjs.vo;
|
||||
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 图像采集列表
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
public class ImageList implements Serializable,Cloneable{
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 图像采集对象(数组)
|
||||
*/
|
||||
@ApiModelProperty(value = "图像采集对象(数组)")
|
||||
private List<SubImageInfoObject> SubImageInfoObject;
|
||||
|
||||
public ImageList(List<SubImageInfoObject> subImageInfoObject) {
|
||||
SubImageInfoObject = subImageInfoObject;
|
||||
}
|
||||
|
||||
public ImageList() {
|
||||
}
|
||||
|
||||
@JSONField(name = "SubImageInfoObject")
|
||||
public List<SubImageInfoObject> getSubImageInfoListObject() {
|
||||
return SubImageInfoObject;
|
||||
}
|
||||
|
||||
public void setSubImageInfoListObject(List<SubImageInfoObject> SubImageInfoObject) {
|
||||
SubImageInfoObject = SubImageInfoObject;
|
||||
}
|
||||
}
|
@ -0,0 +1,32 @@
|
||||
package com.mosty.bkzx.sjjs.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
public class PersonIdentify implements Serializable, Cloneable {
|
||||
private static final long serialVersionUID = 1l;
|
||||
|
||||
/**
|
||||
* 返回结果对应请求消息的QueryID
|
||||
*/
|
||||
@ApiModelProperty(value = "返回结果对应请求消息的QueryID")
|
||||
private String QueryID;
|
||||
/**
|
||||
* 符合条件记录总数
|
||||
*/
|
||||
@ApiModelProperty(value = "符合条件记录总数")
|
||||
private int TotalNum;
|
||||
|
||||
/**
|
||||
* 结果人脸对象列表,相似度倒序排序
|
||||
*/
|
||||
@ApiModelProperty(value = "结果人脸对象列表,相似度倒序排序")
|
||||
private FaceObjectList FaceObjectList;
|
||||
}
|
@ -0,0 +1,213 @@
|
||||
package com.mosty.bkzx.sjjs.vo;
|
||||
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
public class PersonIdentifyObject implements Serializable,Cloneable{
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 图像检索目标ID
|
||||
*/
|
||||
private String QueryID;
|
||||
|
||||
/**
|
||||
* 最大返回数量
|
||||
*/
|
||||
private int MaxNumRecordReturn;
|
||||
|
||||
/**
|
||||
* 图像列表
|
||||
*/
|
||||
private ImageList ImageList;
|
||||
|
||||
/**
|
||||
* 归属分类标签
|
||||
*/
|
||||
private String TabIDList;
|
||||
|
||||
/**
|
||||
* 算法标识
|
||||
*/
|
||||
private String AlgorithmID;
|
||||
|
||||
/**
|
||||
* 相似度
|
||||
*/
|
||||
private double Threshold;
|
||||
|
||||
/**
|
||||
* 设备Mac地址
|
||||
*/
|
||||
private String ReqDeviceID;
|
||||
|
||||
/**
|
||||
* 请求业务类型(01、轨迹查询,02、分析服务,03、身份核验,04、其他)
|
||||
*/
|
||||
private String BusinessType;
|
||||
|
||||
/**
|
||||
* 业务ID
|
||||
*/
|
||||
private String BusinessID;
|
||||
|
||||
/**
|
||||
* 警种(01、科信,02、邢侦,03、治安,04、情报,05、反恐,06、国保,07、禁毒,
|
||||
* 08、特勤,09、经侦,10、铁路公安,11、网安,12、监所,13、警务保障,14、交通管理,15、海关,16、民航,99、其他)
|
||||
*/
|
||||
private String Category;
|
||||
|
||||
/**
|
||||
* 业务使用场景(01、总重大活动,02、反恐维稳,03、刑侦破案,04、社会民生,05、疫情防控,99、其他)
|
||||
*/
|
||||
private String BusinessScene;
|
||||
|
||||
/**
|
||||
* 业务请求人姓名
|
||||
*/
|
||||
private String ReqUserName;
|
||||
|
||||
/**
|
||||
* 业务请求人身份证号码
|
||||
*/
|
||||
private String ReqUserIDNo;
|
||||
|
||||
/**
|
||||
* 业务请求人编号,民警数字证书编号或者警员编号
|
||||
*/
|
||||
private String ReqUserID;
|
||||
|
||||
@JSONField(name = "QueryID")
|
||||
public String getQueryID() {
|
||||
return QueryID;
|
||||
}
|
||||
|
||||
public void setQueryID(String queryID) {
|
||||
QueryID = queryID;
|
||||
}
|
||||
|
||||
@JSONField(name = "MaxNumRecordReturn")
|
||||
public int getMaxNumRecordReturn() {
|
||||
return MaxNumRecordReturn;
|
||||
}
|
||||
|
||||
public void setMaxNumRecordReturn(int maxNumRecordReturn) {
|
||||
MaxNumRecordReturn = maxNumRecordReturn;
|
||||
}
|
||||
|
||||
@JSONField(name = "ImageList")
|
||||
public ImageList getImageList() {
|
||||
return ImageList;
|
||||
}
|
||||
|
||||
public void setImageList(ImageList imageList) {
|
||||
ImageList = imageList;
|
||||
}
|
||||
|
||||
@JSONField(name = "TabIDList")
|
||||
public String getTabIDList() {
|
||||
return TabIDList;
|
||||
}
|
||||
|
||||
public void setTabIDList(String tabIDList) {
|
||||
TabIDList = tabIDList;
|
||||
}
|
||||
|
||||
@JSONField(name = "Threshold")
|
||||
public double getThreshold() {
|
||||
return Threshold;
|
||||
}
|
||||
|
||||
public void setThreshold(double threshold) {
|
||||
Threshold = threshold;
|
||||
}
|
||||
|
||||
@JSONField(name = "ReqDeviceID")
|
||||
public String getReqDeviceID() {
|
||||
return ReqDeviceID;
|
||||
}
|
||||
|
||||
public void setReqDeviceID(String reqDeviceID) {
|
||||
ReqDeviceID = reqDeviceID;
|
||||
}
|
||||
|
||||
@JSONField(name = "BusinessType")
|
||||
public String getBusinessType() {
|
||||
return BusinessType;
|
||||
}
|
||||
|
||||
public void setBusinessType(String businessType) {
|
||||
BusinessType = businessType;
|
||||
}
|
||||
|
||||
@JSONField(name = "BusinessID")
|
||||
public String getBusinessID() {
|
||||
return BusinessID;
|
||||
}
|
||||
|
||||
public void setBusinessID(String businessID) {
|
||||
BusinessID = businessID;
|
||||
}
|
||||
|
||||
@JSONField(name = "Category")
|
||||
public String getCategory() {
|
||||
return Category;
|
||||
}
|
||||
|
||||
public void setCategory(String category) {
|
||||
Category = category;
|
||||
}
|
||||
|
||||
@JSONField(name = "BusinessScene")
|
||||
public String getBusinessScene() {
|
||||
return BusinessScene;
|
||||
}
|
||||
|
||||
public void setBusinessScene(String businessScene) {
|
||||
BusinessScene = businessScene;
|
||||
}
|
||||
|
||||
@JSONField(name = "ReqUserName")
|
||||
public String getReqUserName() {
|
||||
return ReqUserName;
|
||||
}
|
||||
|
||||
public void setReqUserName(String reqUserName) {
|
||||
ReqUserName = reqUserName;
|
||||
}
|
||||
|
||||
@JSONField(name = "ReqUserIDNo")
|
||||
public String getReqUserIDNo() {
|
||||
return ReqUserIDNo;
|
||||
}
|
||||
|
||||
public void setReqUserIDNo(String reqUserIDNo) {
|
||||
ReqUserIDNo = reqUserIDNo;
|
||||
}
|
||||
|
||||
@JSONField(name = "ReqUserID")
|
||||
public String getReqUserID() {
|
||||
return ReqUserID;
|
||||
}
|
||||
|
||||
public void setReqUserID(String reqUserID) {
|
||||
ReqUserID = reqUserID;
|
||||
}
|
||||
|
||||
@JSONField(name = "AlgorithmID")
|
||||
public String getAlgorithmID() {
|
||||
return AlgorithmID;
|
||||
}
|
||||
|
||||
public void setAlgorithmID(String algorithmID) {
|
||||
AlgorithmID = algorithmID;
|
||||
}
|
||||
}
|
@ -0,0 +1,24 @@
|
||||
package com.mosty.bkzx.sjjs.vo;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
public class PersonIdentifyResultObject implements Serializable,Cloneable {
|
||||
private static final long serialVersionUID = 1l;
|
||||
|
||||
private PersonIdentify PersonIdentifyResultObject;
|
||||
|
||||
public PersonIdentify getPersonIdentifyResultObject() {
|
||||
return PersonIdentifyResultObject;
|
||||
}
|
||||
|
||||
public void setPersonIdentifyResultObject(PersonIdentify personIdentifyResultObject) {
|
||||
PersonIdentifyResultObject = personIdentifyResultObject;
|
||||
}
|
||||
}
|
@ -0,0 +1,97 @@
|
||||
package com.mosty.bkzx.sjjs.vo;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 登陆第一次交互返回内容
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
public class RepositoryUser implements Serializable,Cloneable {
|
||||
|
||||
private static final long serialVersionUID = 1l;
|
||||
|
||||
/**
|
||||
* 库成员ID
|
||||
*/
|
||||
private String faceImgId;
|
||||
/**
|
||||
* 人脸图片URL
|
||||
*/
|
||||
private String faceImgUrl;
|
||||
/**
|
||||
* 库ID
|
||||
*/
|
||||
private String repositoryId;
|
||||
/**
|
||||
* 库名字
|
||||
*/
|
||||
private String repositoryName;
|
||||
/**
|
||||
* 证件类型
|
||||
*/
|
||||
private int type;
|
||||
/**
|
||||
* 证件号码
|
||||
*/
|
||||
private String identificationId;
|
||||
/**
|
||||
* 成员姓名
|
||||
*/
|
||||
private String name;
|
||||
/**
|
||||
* 区域编号
|
||||
*/
|
||||
private int region;
|
||||
/**
|
||||
* 民族
|
||||
*/
|
||||
private int nation;
|
||||
/**
|
||||
* 出生日期,格式为YYYY-mm-dd
|
||||
*/
|
||||
private String birthday;
|
||||
/**
|
||||
* 成员性别,0-未知,1-男,2-女
|
||||
*/
|
||||
private int gender;
|
||||
/**
|
||||
* 电话
|
||||
*/
|
||||
private String phone;
|
||||
/**
|
||||
* 地址
|
||||
*/
|
||||
private String address;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String memo;
|
||||
/**
|
||||
* 人脸大图URL
|
||||
*/
|
||||
private String imgUrl;
|
||||
/**
|
||||
* 相似度,取值范围[0-1]
|
||||
*/
|
||||
private double similarity;
|
||||
/**
|
||||
* 该人员的创建时间,毫秒时间戳。
|
||||
*/
|
||||
private long createTime;
|
||||
/**
|
||||
* 该人员的更新时间,毫秒时间戳。
|
||||
*/
|
||||
private long updateTime;
|
||||
/**
|
||||
* 1-当天新增,2-当天更新,0-其他
|
||||
*/
|
||||
private int isNew;
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
package com.mosty.bkzx.sjjs.vo;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
public class SubImageInfoObject implements Serializable, Cloneable {
|
||||
private static final long serialVersionUID = 1l;
|
||||
|
||||
private String StoragePath;
|
||||
private String Type;
|
||||
|
||||
}
|
@ -0,0 +1,23 @@
|
||||
package com.mosty.bkzx.sjjs.vo;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
public class SubImageList implements Serializable,Cloneable {
|
||||
private static final long serialVersionUID = 1l;
|
||||
|
||||
private List<SubImageInfoObject> SubImageInfoObject;
|
||||
|
||||
public SubImageList(List<SubImageInfoObject> subImageInfoObject) {
|
||||
SubImageInfoObject = subImageInfoObject;
|
||||
}
|
||||
|
||||
|
||||
}
|
106
mosty-bkzx/src/main/java/com/mosty/bkzx/sjjs/vo/VehicleCar.java
Normal file
106
mosty-bkzx/src/main/java/com/mosty/bkzx/sjjs/vo/VehicleCar.java
Normal file
@ -0,0 +1,106 @@
|
||||
package com.mosty.bkzx.sjjs.vo;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
|
||||
/**
|
||||
* 图像列表
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
public class VehicleCar implements Serializable,Cloneable {
|
||||
|
||||
private static final long serialVersionUID = 1l;
|
||||
|
||||
/**
|
||||
* 布控类型,如果不填,审核布控操作会失败(必填)
|
||||
* 100801 假/套牌车 100802 涉案车辆 100803 其他车辆
|
||||
*/
|
||||
private short surveyType;
|
||||
/**
|
||||
* 车牌号码,暂不支持模糊匹配(勾选无牌车时,plateNum传值八个0 "00000000")
|
||||
*/
|
||||
private String plateNum;
|
||||
/**
|
||||
* 号牌种类
|
||||
*/
|
||||
private String plateType;
|
||||
/**
|
||||
* 布控开始时间
|
||||
*/
|
||||
private String startTimeStr;
|
||||
/**
|
||||
* 布控结束时间
|
||||
*/
|
||||
private String endTimeStr;
|
||||
/**
|
||||
* 过车开始时间(UTC时间),若startTimeStrUtc有值,则startTimeStr无效
|
||||
*/
|
||||
private String startTimeStrUtc;
|
||||
/**
|
||||
* 过车结束时间(UTC时间),若有endTimeStrUtc有值,则endTimeStr无效。
|
||||
*/
|
||||
private String endTimeStrUtc;
|
||||
/**
|
||||
* 布控原因,最大128字节
|
||||
*/
|
||||
private String reason;
|
||||
/**
|
||||
* 类型array[string],选填。报警号码,数组。
|
||||
*/
|
||||
private ArrayList<String> tels;
|
||||
/**
|
||||
* 布控类型,选填
|
||||
*/
|
||||
private String surveyCategory;
|
||||
/**
|
||||
* 布控名称
|
||||
*/
|
||||
private String surveyTaskName;
|
||||
/**
|
||||
* 库管理的唯一编码。
|
||||
*/
|
||||
private ArrayList<String> libRecordIds;
|
||||
/**
|
||||
* 通道数组
|
||||
*/
|
||||
private ArrayList<String> channelCodes;
|
||||
/**
|
||||
* greater表示大于,less表示小于,equal表示等于
|
||||
*/
|
||||
private String paperSign;
|
||||
/**
|
||||
* 摆件个数,与paperSign同有同无
|
||||
*/
|
||||
private int paperCnt;
|
||||
/**
|
||||
* 挂件符号:greater表示大于,less表示小于,equal表示等于
|
||||
*/
|
||||
private String dropSign;
|
||||
/**
|
||||
* 挂件个数,与dropSign同有同无
|
||||
*/
|
||||
private int dropCnt;
|
||||
/**
|
||||
* 年检标符号:greater表示大于,less表示小于,equal表示等于。
|
||||
*/
|
||||
private String tagSign;
|
||||
/**
|
||||
* 年检标个数,与tagSign同有同无
|
||||
*/
|
||||
private int tagCnt;
|
||||
/**
|
||||
* 遮阳板符号:greater表示大于,less表示小于,equal表示等于
|
||||
*/
|
||||
private String sunSign;
|
||||
/**
|
||||
* 遮阳板个数,与sunSign同有同无。
|
||||
*/
|
||||
private int sunCnt;
|
||||
|
||||
}
|
162
mosty-bkzx/src/main/java/com/mosty/bkzx/utlis/MD5Util.java
Normal file
162
mosty-bkzx/src/main/java/com/mosty/bkzx/utlis/MD5Util.java
Normal file
@ -0,0 +1,162 @@
|
||||
package com.mosty.bkzx.utlis;
|
||||
|
||||
import java.math.BigInteger;
|
||||
import java.security.MessageDigest;
|
||||
import java.security.NoSuchAlgorithmException;
|
||||
|
||||
/**
|
||||
* @ClassName MD5Util
|
||||
* @Description MD5工具类
|
||||
*/
|
||||
public class MD5Util {
|
||||
|
||||
|
||||
static final char hexDigits[] = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F'};
|
||||
static final char hexDigitsLower[] = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'};
|
||||
|
||||
/**
|
||||
* @param plainText 传入要加密的字符串
|
||||
* @return java.lang.String MD5加密后生成32位(小写字母+数字)字符串
|
||||
* @Description //对字符串 MD5 无盐值加密
|
||||
*/
|
||||
public static String MD5Lower(String plainText) {
|
||||
try {
|
||||
// 获得MD5摘要算法的 MessageDigest 对象
|
||||
MessageDigest md = MessageDigest.getInstance("MD5");
|
||||
|
||||
// 使用指定的字节更新摘要
|
||||
md.update(plainText.getBytes());
|
||||
|
||||
// digest()最后确定返回md5 hash值,返回值为8位字符串。因为md5 hash值是16位的hex值,实际上就是8位的字符
|
||||
// BigInteger函数则将8位的字符串转换成16位hex值,用字符串来表示;得到字符串形式的hash值。1 固定值
|
||||
return new BigInteger(1, md.digest()).toString(16);
|
||||
} catch (NoSuchAlgorithmException e) {
|
||||
e.printStackTrace();
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param plainText 传入要加密的字符串
|
||||
* @return java.lang.String MD5加密后生成32位(大写字母+数字)字符串
|
||||
* @Description // 对字符串 MD5 加密
|
||||
*/
|
||||
public static String MD5Upper(String plainText) {
|
||||
try {
|
||||
// 获得MD5摘要算法的 MessageDigest 对象
|
||||
MessageDigest md = MessageDigest.getInstance("MD5");
|
||||
|
||||
// 使用指定的字节更新摘要
|
||||
md.update(plainText.getBytes());
|
||||
|
||||
// 获得密文
|
||||
byte[] mdResult = md.digest();
|
||||
// 把密文转换成十六进制的字符串形式
|
||||
int j = mdResult.length;
|
||||
char str[] = new char[j * 2];
|
||||
int k = 0;
|
||||
for (int i = 0; i < j; i++) {
|
||||
byte byte0 = mdResult[i];
|
||||
str[k++] = hexDigits[byte0 >>> 4 & 0xf];// 取字节中高 4 位的数字转换, >>> 为逻辑右移,将符号位一起右移
|
||||
str[k++] = hexDigits[byte0 & 0xf]; // 取字节中低 4 位的数字转换
|
||||
}
|
||||
return new String(str);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param plainText 传入要加密的字符串
|
||||
* @param saltValue 传入要加的盐值
|
||||
* @return java.lang.String MD5加密后生成32位(小写字母+数字)字符串
|
||||
* @Description //对字符串 MD5 加盐值加密
|
||||
*/
|
||||
public static String MD5Lower(String plainText, String saltValue) {
|
||||
try {
|
||||
// 获得MD5摘要算法的 MessageDigest 对象
|
||||
MessageDigest md = MessageDigest.getInstance("MD5");
|
||||
|
||||
// 使用指定的字节更新摘要
|
||||
md.update(plainText.getBytes());
|
||||
md.update(saltValue.getBytes());
|
||||
|
||||
// digest()最后确定返回md5 hash值,返回值为8位字符串。因为md5 hash值是16位的hex值,实际上就是8位的字符
|
||||
// BigInteger函数则将8位的字符串转换成16位hex值,用字符串来表示;得到字符串形式的hash值。1 固定值
|
||||
return new BigInteger(1, md.digest()).toString(16);
|
||||
} catch (NoSuchAlgorithmException e) {
|
||||
e.printStackTrace();
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param plainText 传入要加密的字符串
|
||||
* @param saltValue 传入要加的盐值
|
||||
* @return java.lang.String MD5加密后生成32位(大写字母+数字)字符串
|
||||
* @Description //对字符串 MD5 加盐值加密
|
||||
*/
|
||||
public static String MD5Upper(String plainText, String saltValue) {
|
||||
try {
|
||||
// 获得MD5摘要算法的 MessageDigest 对象
|
||||
MessageDigest md = MessageDigest.getInstance("MD5");
|
||||
|
||||
// 使用指定的字节更新摘要
|
||||
md.update(plainText.getBytes());
|
||||
md.update(saltValue.getBytes());
|
||||
|
||||
// 获得密文
|
||||
byte[] mdResult = md.digest();
|
||||
// 把密文转换成十六进制的字符串形式
|
||||
int j = mdResult.length;
|
||||
char str[] = new char[j * 2];
|
||||
int k = 0;
|
||||
for (int i = 0; i < j; i++) {
|
||||
byte byte0 = mdResult[i];
|
||||
str[k++] = hexDigits[byte0 >>> 4 & 0xf];
|
||||
str[k++] = hexDigits[byte0 & 0xf];
|
||||
}
|
||||
return new String(str);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param plainText
|
||||
* @return java.lang.String
|
||||
* @Description //MD5加密后生成32位(小写字母+数字)字符串,同 MD5Lower() 一样
|
||||
*/
|
||||
public final static String MD5(String plainText) {
|
||||
try {
|
||||
MessageDigest mdTemp = MessageDigest.getInstance("MD5");
|
||||
mdTemp.update(plainText.getBytes("UTF-8"));
|
||||
byte[] md = mdTemp.digest();
|
||||
int j = md.length;
|
||||
char str[] = new char[j * 2];
|
||||
int k = 0;
|
||||
for (int i = 0; i < j; i++) {
|
||||
byte byte0 = md[i];
|
||||
str[k++] = hexDigitsLower[byte0 >>> 4 & 0xf];
|
||||
str[k++] = hexDigitsLower[byte0 & 0xf];
|
||||
}
|
||||
return new String(str);
|
||||
} catch (Exception e) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param text 要校验的字符串
|
||||
* @param md5 md5值
|
||||
* @return boolean 校验结果
|
||||
* @Description //校验MD5码
|
||||
*/
|
||||
public static boolean valid(String text, String md5) {
|
||||
return md5.equals(MD5(text)) || md5.equals(MD5(text).toUpperCase());
|
||||
}
|
||||
|
||||
}
|
389
mosty-bkzx/src/main/java/com/mosty/bkzx/utlis/OkHttpUtils.java
Normal file
389
mosty-bkzx/src/main/java/com/mosty/bkzx/utlis/OkHttpUtils.java
Normal file
@ -0,0 +1,389 @@
|
||||
package com.mosty.bkzx.utlis;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import okhttp3.*;
|
||||
|
||||
import javax.net.ssl.SSLContext;
|
||||
import javax.net.ssl.SSLSocketFactory;
|
||||
import javax.net.ssl.TrustManager;
|
||||
import javax.net.ssl.X509TrustManager;
|
||||
import java.io.IOException;
|
||||
import java.net.URLEncoder;
|
||||
import java.security.SecureRandom;
|
||||
import java.security.cert.X509Certificate;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.Semaphore;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
public class OkHttpUtils {
|
||||
private static volatile OkHttpClient okHttpClient = null;
|
||||
private static volatile Semaphore semaphore = null;
|
||||
private Map<String, String> headerMap;
|
||||
private Map<String, Object> paramMap;
|
||||
private String url;
|
||||
private Request.Builder request;
|
||||
|
||||
/**
|
||||
* 初始化okHttpClient,并且允许https访问
|
||||
*/
|
||||
private OkHttpUtils() {
|
||||
if (okHttpClient == null) {
|
||||
synchronized (OkHttpUtils.class) {
|
||||
if (okHttpClient == null) {
|
||||
TrustManager[] trustManagers = buildTrustManagers();
|
||||
okHttpClient = new OkHttpClient.Builder().connectTimeout(15, TimeUnit.SECONDS).writeTimeout(20, TimeUnit.SECONDS).readTimeout(20, TimeUnit.SECONDS).sslSocketFactory(createSSLSocketFactory(trustManagers), (X509TrustManager) trustManagers[0]).hostnameVerifier((hostName, session) -> true).retryOnConnectionFailure(true).build();
|
||||
addHeader("User-Agent", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 用于异步请求时,控制访问线程数,返回结果
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
private static Semaphore getSemaphoreInstance() {
|
||||
//只能1个线程同时访问
|
||||
synchronized (OkHttpUtils.class) {
|
||||
if (semaphore == null) {
|
||||
semaphore = new Semaphore(0);
|
||||
}
|
||||
}
|
||||
return semaphore;
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建OkHttpUtils
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public static OkHttpUtils builder() {
|
||||
return new OkHttpUtils();
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加url
|
||||
*
|
||||
* @param url
|
||||
* @return
|
||||
*/
|
||||
public OkHttpUtils url(String url) {
|
||||
this.url = url;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加参数
|
||||
*
|
||||
* @param key 参数名
|
||||
* @param value 参数值
|
||||
* @return
|
||||
*/
|
||||
public OkHttpUtils addParam(String key, Object value) {
|
||||
if (paramMap == null) {
|
||||
paramMap = new LinkedHashMap<>(16);
|
||||
}
|
||||
paramMap.put(key, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加请求头
|
||||
*
|
||||
* @param key 参数名
|
||||
* @param value 参数值
|
||||
* @return
|
||||
*/
|
||||
public OkHttpUtils addHeader(String key, String value) {
|
||||
if (headerMap == null) {
|
||||
headerMap = new LinkedHashMap<>(16);
|
||||
}
|
||||
headerMap.put(key, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* 初始化get方法
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public OkHttpUtils get() {
|
||||
request = new Request.Builder().get();
|
||||
StringBuilder urlBuilder = new StringBuilder(url);
|
||||
if (paramMap != null) {
|
||||
urlBuilder.append("?");
|
||||
try {
|
||||
for (Map.Entry<String, Object> entry : paramMap.entrySet()) {
|
||||
urlBuilder.append(URLEncoder.encode(entry.getKey(), "utf-8")).append("=").append(URLEncoder.encode(entry.getValue().toString(), "utf-8")).append("&");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
urlBuilder.deleteCharAt(urlBuilder.length() - 1);
|
||||
}
|
||||
request.url(urlBuilder.toString());
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* 初始化delet方法
|
||||
*
|
||||
* @param isJsonPost true等于json的方式提交数据,类似postman里post方法的raw
|
||||
* false等于普通的表单提交
|
||||
* @return
|
||||
*/
|
||||
public OkHttpUtils delete(boolean isJsonPost) {
|
||||
RequestBody requestBody;
|
||||
if (isJsonPost) {
|
||||
String json = "";
|
||||
if (paramMap != null) {
|
||||
json = JSON.toJSONString(paramMap);
|
||||
}
|
||||
requestBody = RequestBody.create(MediaType.parse("application/json; charset=utf-8"), json);
|
||||
} else {
|
||||
FormBody.Builder formBody = new FormBody.Builder();
|
||||
if (paramMap != null) {
|
||||
paramMap.forEach((key,value) ->{
|
||||
formBody.add(key,String.valueOf(value));
|
||||
});
|
||||
}
|
||||
requestBody = formBody.build();
|
||||
}
|
||||
request = new Request.Builder().delete(requestBody).url(url);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* 初始化post方法
|
||||
*
|
||||
* @param isJsonPost true等于json的方式提交数据,类似postman里post方法的raw
|
||||
* false等于普通的表单提交
|
||||
* @return
|
||||
*/
|
||||
public OkHttpUtils post(boolean isJsonPost) {
|
||||
RequestBody requestBody;
|
||||
if (isJsonPost) {
|
||||
String json = "";
|
||||
if (paramMap != null) {
|
||||
json = JSON.toJSONString(paramMap);
|
||||
}
|
||||
requestBody = RequestBody.create(MediaType.parse("application/json; charset=utf-8"), json);
|
||||
} else {
|
||||
FormBody.Builder formBody = new FormBody.Builder();
|
||||
if (paramMap != null) {
|
||||
paramMap.forEach((key,value) ->{
|
||||
formBody.add(key,String.valueOf(value));
|
||||
});
|
||||
}
|
||||
requestBody = formBody.build();
|
||||
}
|
||||
|
||||
request = new Request.Builder().post(requestBody).url(url);
|
||||
return this;
|
||||
}
|
||||
|
||||
public OkHttpUtils post(Map<String,Object> data,boolean isJsonPost) {
|
||||
RequestBody requestBody;
|
||||
if (isJsonPost) {
|
||||
String json = "";
|
||||
if (data != null) {
|
||||
json = JSON.toJSONString(data);
|
||||
}
|
||||
requestBody = RequestBody.create(MediaType.parse("application/json; charset=utf-8"), json);
|
||||
} else {
|
||||
FormBody.Builder formBody = new FormBody.Builder();
|
||||
if (data != null) {
|
||||
data.forEach((key,value) ->{
|
||||
formBody.add(key,String.valueOf(value));
|
||||
});
|
||||
}
|
||||
requestBody = formBody.build();
|
||||
}
|
||||
request = new Request.Builder().post(requestBody).url(url);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* 初始化post方法
|
||||
*
|
||||
* @param isJsonPut true等于json的方式提交数据,类似postman里post方法的raw
|
||||
* false等于普通的表单提交
|
||||
* @return
|
||||
*/
|
||||
public OkHttpUtils put(boolean isJsonPut) {
|
||||
RequestBody requestBody;
|
||||
if (isJsonPut) {
|
||||
String json = "";
|
||||
if (paramMap != null) {
|
||||
json = JSON.toJSONString(paramMap);
|
||||
}
|
||||
requestBody = RequestBody.create(MediaType.parse("application/json; charset=utf-8"), json);
|
||||
} else {
|
||||
FormBody.Builder formBody = new FormBody.Builder();
|
||||
if (paramMap != null) {
|
||||
paramMap.forEach((key,value) ->{
|
||||
formBody.add(key,String.valueOf(value));
|
||||
});
|
||||
}
|
||||
requestBody = formBody.build();
|
||||
}
|
||||
request = new Request.Builder().put(requestBody).url(url);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* 初始化post方法
|
||||
*
|
||||
* @param isJsonPut true等于json的方式提交数据,类似postman里post方法的raw
|
||||
* false等于普通的表单提交
|
||||
* @return
|
||||
*/
|
||||
public OkHttpUtils put(Map<String,Object> data,boolean isJsonPut) {
|
||||
RequestBody requestBody;
|
||||
if (isJsonPut) {
|
||||
String json = "";
|
||||
if (data != null) {
|
||||
json = JSON.toJSONString(data);
|
||||
}
|
||||
requestBody = RequestBody.create(MediaType.parse("application/json; charset=utf-8"), json);
|
||||
} else {
|
||||
FormBody.Builder formBody = new FormBody.Builder();
|
||||
if (data != null) {
|
||||
data.forEach((key,value) ->{
|
||||
formBody.add(key,String.valueOf(value));
|
||||
});
|
||||
}
|
||||
requestBody = formBody.build();
|
||||
}
|
||||
request = new Request.Builder().put(requestBody).url(url);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* 同步请求
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public String sync() {
|
||||
setHeader(request);
|
||||
try {
|
||||
Response response = okHttpClient.newCall(request.build()).execute();
|
||||
assert response.body() != null;
|
||||
return response.body().string();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
return "请求失败:" + e.getMessage();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 异步请求,有返回值
|
||||
*/
|
||||
public String async() {
|
||||
StringBuilder buffer = new StringBuilder("");
|
||||
setHeader(request);
|
||||
okHttpClient.newCall(request.build()).enqueue(new Callback() {
|
||||
@Override
|
||||
public void onFailure(Call call, IOException e) {
|
||||
buffer.append("请求出错:").append(e.getMessage());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onResponse(Call call, Response response) throws IOException {
|
||||
assert response.body() != null;
|
||||
buffer.append(response.body().string());
|
||||
getSemaphoreInstance().release();
|
||||
}
|
||||
});
|
||||
try {
|
||||
getSemaphoreInstance().acquire();
|
||||
} catch (InterruptedException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return buffer.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* 异步请求,带有接口回调
|
||||
*
|
||||
* @param callBack
|
||||
*/
|
||||
public void async(ICallBack callBack) {
|
||||
setHeader(request);
|
||||
okHttpClient.newCall(request.build()).enqueue(new Callback() {
|
||||
@Override
|
||||
public void onFailure(Call call, IOException e) {
|
||||
callBack.onFailure(call, e.getMessage());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onResponse(Call call, Response response) throws IOException {
|
||||
assert response.body() != null;
|
||||
callBack.onSuccessful(call, response.body().string());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 为request添加请求头
|
||||
*
|
||||
* @param request
|
||||
*/
|
||||
private void setHeader(Request.Builder request) {
|
||||
if (headerMap != null) {
|
||||
try {
|
||||
for (Map.Entry<String, String> entry : headerMap.entrySet()) {
|
||||
request.addHeader(entry.getKey(), entry.getValue());
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 生成安全套接字工厂,用于https请求的证书跳过
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
private static SSLSocketFactory createSSLSocketFactory(TrustManager[] trustAllCerts) {
|
||||
SSLSocketFactory ssfFactory = null;
|
||||
try {
|
||||
SSLContext sc = SSLContext.getInstance("SSL");
|
||||
sc.init(null, trustAllCerts, new SecureRandom());
|
||||
ssfFactory = sc.getSocketFactory();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return ssfFactory;
|
||||
}
|
||||
|
||||
private static TrustManager[] buildTrustManagers() {
|
||||
return new TrustManager[]{new X509TrustManager() {
|
||||
@Override
|
||||
public void checkClientTrusted(X509Certificate[] chain, String authType) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void checkServerTrusted(X509Certificate[] chain, String authType) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public X509Certificate[] getAcceptedIssuers() {
|
||||
return new X509Certificate[]{};
|
||||
}
|
||||
}};
|
||||
}
|
||||
/**
|
||||
* 自定义一个接口回调
|
||||
*/
|
||||
public interface ICallBack {
|
||||
|
||||
void onSuccessful(Call call, String data);
|
||||
|
||||
void onFailure(Call call, String errorMsg);
|
||||
|
||||
}
|
||||
}
|
75
mosty-bkzx/src/main/resources/application.yml
Normal file
75
mosty-bkzx/src/main/resources/application.yml
Normal file
@ -0,0 +1,75 @@
|
||||
ribbon:
|
||||
ReadTimeout: 600000
|
||||
ConnectTimeout: 600000
|
||||
spring:
|
||||
servlet:
|
||||
multipart:
|
||||
max-file-size: 100MB
|
||||
max-request-size: 100MB
|
||||
jackson:
|
||||
serialization:
|
||||
write-dates-as-timestamps: false
|
||||
# # 格式化返回时间 yyyy-MM-dd HH:mm:ss
|
||||
date-format: yyyy-MM-dd HH:mm:ss
|
||||
time-zone: GMT+8
|
||||
datasource:
|
||||
driver-class-name: com.mysql.jdbc.Driver
|
||||
url: jdbc:mysql://192.168.200.131:3306/mosty_bkzx?autoReconnect=true&failOverReadOnly=false&useUnicode=true&characterEncoding=utf8&useSSL=false&allowMultiQueries=true&rewriteBatchedStatements=true&serverTimezone=Asia/Shanghai
|
||||
username: root
|
||||
password: mosty888
|
||||
hikari:
|
||||
minimum-idle: 10 # ??????????10???0???maximum-pool-size??????maximum-pool-size
|
||||
maximum-pool-size: 20 # ??????????0????????10??????1?????minimum-idle??
|
||||
idle-timeout: 500000 # ????????????600000?10????????max-lifetime?max-lifetime>0??????0????0???10???????10??
|
||||
max-lifetime: 540000 # ????????????0???30??????????30??.?????mysql????????
|
||||
connection-timeout: 60000 # ????????????250????????????30?
|
||||
connection-test-query: SELECT 1 # ???????????????
|
||||
# Redis数据库索引(默认为0)
|
||||
redis:
|
||||
database: 8
|
||||
# Redis服务器地址
|
||||
host: 192.168.200.131
|
||||
# Redis服务器连接端口
|
||||
port: 6379
|
||||
# Redis服务器连接密码(默认为空)
|
||||
password: mosty888
|
||||
# 连接超时时间(毫秒)
|
||||
timeout: 2000
|
||||
jedis:
|
||||
pool:
|
||||
max-active: 50
|
||||
|
||||
swagger:
|
||||
host: 80.155.0.84
|
||||
port: 8010
|
||||
|
||||
mybatis-plus:
|
||||
global-config:
|
||||
db-config:
|
||||
logic-delete-value: 1 # 逻辑已删除值(默认为 1)
|
||||
logic-not-delete-value: 0 # 逻辑未删除值(默认为 0)
|
||||
configuration:
|
||||
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
|
||||
|
||||
magic-api:
|
||||
web: /magic/web
|
||||
#配置文件存储位置。当以classpath开头时,为只读模式
|
||||
resource:
|
||||
# location: /data/magic-api
|
||||
type: database
|
||||
table-name: magic_api # 数据库中的表名
|
||||
prefix: /magic-api # 前缀
|
||||
datasource:
|
||||
response-code:
|
||||
success: 10000
|
||||
exclude:
|
||||
pathPatterns:
|
||||
swagger:
|
||||
- /swagger-resources/**
|
||||
- /webjars/**
|
||||
- /v2/**
|
||||
- /swagger-ui.html/**
|
||||
- /docs.html/**
|
||||
|
||||
config:
|
||||
orgCode: 510600000000
|
39
mosty-bkzx/src/main/resources/bootstrap.yml
Normal file
39
mosty-bkzx/src/main/resources/bootstrap.yml
Normal file
@ -0,0 +1,39 @@
|
||||
server:
|
||||
port: 8013
|
||||
servlet:
|
||||
context-path: /mosty-bkzx/
|
||||
spring:
|
||||
application:
|
||||
name: mosty-bkzx
|
||||
cloud:
|
||||
nacos:
|
||||
discovery:
|
||||
namespace: 657d1843-b590-41ac-b5e7-5d261bf00de9
|
||||
server-addr: 192.168.200.131:8848
|
||||
register-enabled: true # 是否将自己注册到配置中心,让其他服务发现调用(本地调试使用)
|
||||
|
||||
|
||||
# 开启健康监控
|
||||
management:
|
||||
endpoints:
|
||||
web:
|
||||
exposure:
|
||||
include: '*'
|
||||
endpoint:
|
||||
health:
|
||||
show-details: always
|
||||
auditevents:
|
||||
enabled: true
|
||||
|
||||
#swagger:
|
||||
# enable: true
|
||||
# title: 基础微服务
|
||||
# version: 1.0.0
|
||||
# name: 基础微服务
|
||||
# url: ''
|
||||
# email: ''
|
||||
|
||||
# 日志
|
||||
#logging:
|
||||
# file: /application/applogs/admin.log
|
||||
|
114
mosty-bkzx/src/main/resources/logback-spring.xml
Normal file
114
mosty-bkzx/src/main/resources/logback-spring.xml
Normal file
@ -0,0 +1,114 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<configuration scan="true" scanPeriod="60 seconds" debug="false">
|
||||
<jmxConfigurator/>
|
||||
<property name="PROJECT_NAME" value="msxf-retail-sort" />
|
||||
<property name="LOG_FILE_INFO" value="${LOG_PATH:-${LOG_TEMP:-${java.io.tmpdir:-/tmp}}}/msxf-retail-sort-info.log" />
|
||||
<property name="LOG_FILE_WARN" value="${LOG_PATH:-${LOG_TEMP:-${java.io.tmpdir:-/tmp}}}/msxf-retail-sort-warn.log" />
|
||||
<property name="LOG_FILE_ERR" value="${LOG_PATH:-${LOG_TEMP:-${java.io.tmpdir:-/tmp}}}/msxf-retail-sort-error.log" />
|
||||
<property name="LOG_BUSINESS" value="${LOG_PATH:-${LOG_TEMP:-${java.io.tmpdir:-/tmp}}}/business/business-2de.log"/>
|
||||
<include resource="org/springframework/boot/logging/logback/defaults.xml" />
|
||||
<include resource="org/springframework/boot/logging/logback/console-appender.xml" />
|
||||
<contextName>${PROJECT_NAME}</contextName>
|
||||
|
||||
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
|
||||
<encoder>
|
||||
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} ${LOG_LEVEL_PATTERN:-%5p} ${PID:- } --- [%t] %-40.40logger{39} %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}</pattern>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
|
||||
<appender name="LOG_FILE_INFO" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
|
||||
<level>INFO</level>
|
||||
</filter>
|
||||
<encoder>
|
||||
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} ${LOG_LEVEL_PATTERN:-%5p} ${PID:- } --- [%t] %-40.40logger{39} %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}</pattern>
|
||||
</encoder>
|
||||
<file>${LOG_FILE_INFO}</file>
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||
<fileNamePattern>${LOG_FILE_INFO}-7de.%d{yyyy-MM-dd}.%i</fileNamePattern>
|
||||
<timeBasedFileNamingAndTriggeringPolicy
|
||||
class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
|
||||
<maxFileSize>1024MB</maxFileSize>
|
||||
</timeBasedFileNamingAndTriggeringPolicy>
|
||||
|
||||
</rollingPolicy>
|
||||
</appender>
|
||||
|
||||
<appender name="LOG_FILE_WARN"
|
||||
class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
|
||||
<level>WARN</level>
|
||||
</filter>
|
||||
<encoder>
|
||||
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} ${LOG_LEVEL_PATTERN:-%5p} ${PID:- } --- [%t] %-40.40logger{39} %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}</pattern>
|
||||
</encoder>
|
||||
<file>${LOG_FILE_WARN}</file>
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||
<fileNamePattern>${LOG_FILE_WARN}-30de.%d{yyyy-MM-dd}.%i</fileNamePattern>
|
||||
<timeBasedFileNamingAndTriggeringPolicy
|
||||
class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
|
||||
<maxFileSize>1024MB</maxFileSize>
|
||||
</timeBasedFileNamingAndTriggeringPolicy>
|
||||
</rollingPolicy>
|
||||
</appender>
|
||||
|
||||
<appender name="LOG_FILE_ERROR"
|
||||
class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
|
||||
<level>ERROR</level>
|
||||
</filter>
|
||||
<encoder>
|
||||
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} ${LOG_LEVEL_PATTERN:-%5p} ${PID:- } --- [%t] %-40.40logger{39} %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}</pattern>
|
||||
</encoder>
|
||||
<file>${LOG_FILE_ERR}</file>
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||
<fileNamePattern>${LOG_FILE_ERR}.%d{yyyy-MM-dd}.%i</fileNamePattern>
|
||||
<timeBasedFileNamingAndTriggeringPolicy
|
||||
class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
|
||||
<maxFileSize>512MB</maxFileSize>
|
||||
</timeBasedFileNamingAndTriggeringPolicy>
|
||||
</rollingPolicy>
|
||||
</appender>
|
||||
|
||||
<!--添加监控日志 -->
|
||||
<appender name="business-log-appender"
|
||||
class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
|
||||
<level>info</level>
|
||||
</filter>
|
||||
<file>${LOG_BUSINESS}</file>
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
|
||||
<fileNamePattern>${LOG_BUSINESS}.%d{yyyy-MM-dd}.%i
|
||||
</fileNamePattern>
|
||||
<maxFileSize>1024MB</maxFileSize>
|
||||
</rollingPolicy>
|
||||
<encoder>
|
||||
<pattern>%msg%n</pattern>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<logger name="business-log" additivity="false" level="info">
|
||||
<appender-ref ref="business-log-appender"/>
|
||||
<appender-ref ref="CONSOLE" />
|
||||
</logger>
|
||||
<!-- show parameters for hibernate sql 专为 Hibernate 定制 -->
|
||||
<logger name="logging.level.jdbc" level="INFO" />
|
||||
<logger name="logging.level.jdbc.sqlonly" level="INFO" />
|
||||
<logger name="org.springframework" level="INFO" additivity="true" />
|
||||
<Logger name="jdbc.sqlonly" level="info" />
|
||||
<Logger name="jdbc.sqltiming" level="warn" />
|
||||
<Logger name="jdbc.audit" level="warn" />
|
||||
<Logger name="jdbc.resultset" level="warn" />
|
||||
<Logger name="jdbc.resultsettable" level="warn" />
|
||||
<logger name="jdbc.connection" level="warn" />
|
||||
<Logger name="log4jdbc.debug" level="warn" />
|
||||
<Logger name="org.apache.kafka.clients.NetworkClient" level="ERROR" />
|
||||
|
||||
<root level="INFO">
|
||||
<appender-ref ref="CONSOLE" />
|
||||
<appender-ref ref="LOG_FILE_INFO" />
|
||||
<appender-ref ref="LOG_FILE_WARN" />
|
||||
<appender-ref ref="LOG_FILE_ERROR" />
|
||||
</root>
|
||||
</configuration>
|
151
mosty-bkzx/src/main/resources/mapper/XdxxMapper.xml
Normal file
151
mosty-bkzx/src/main/resources/mapper/XdxxMapper.xml
Normal file
@ -0,0 +1,151 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||
<mapper namespace="com.mosty.bkzx.mapper.XdxxMapper">
|
||||
<select id="queryXdxxBYSzfhCount" resultType="int">
|
||||
select count(1) from tb_xdxx where xt_scbz = '0'
|
||||
and id in (
|
||||
select xd_id from tb_xdxx_ry where xt_scbz = '0'
|
||||
<if test="dto.xm != null and dto.xm != ''">
|
||||
and xm like concat('%',#{dto.xm},'%')
|
||||
</if>
|
||||
<if test="dto.sfzh != null and dto.sfzh != ''">
|
||||
and sfzh = #{dto.sfzh}
|
||||
</if>
|
||||
<if test="dto.kssj != null and dto.kssj != ''">
|
||||
and xjcjsj >= #{dto.kssj}
|
||||
</if>
|
||||
<if test="dto.jssj != null and dto.jssj != ''">
|
||||
and xjcjsj <= #{dto.jssj}
|
||||
</if>
|
||||
)
|
||||
</select>
|
||||
|
||||
<select id="queryXdxxBYSzfh" resultType="java.util.Map">
|
||||
select * from tb_xdxx where xt_scbz = '0'
|
||||
and id in (
|
||||
select xd_id from tb_xdxx_ry where xt_scbz = '0'
|
||||
<if test="dto.xm != null and dto.xm != ''">
|
||||
and xm like concat('%',#{dto.xm},'%')
|
||||
</if>
|
||||
<if test="dto.sfzh != null and dto.sfzh != ''">
|
||||
and sfzh = #{dto.sfzh}
|
||||
</if>
|
||||
<if test="dto.kssj != null and dto.kssj != ''">
|
||||
and xjcjsj >= #{dto.kssj}
|
||||
</if>
|
||||
<if test="dto.jssj != null and dto.jssj != ''">
|
||||
and xjcjsj <= #{dto.jssj}
|
||||
</if>
|
||||
)
|
||||
order by xdlysj desc
|
||||
limit #{pageIndex},#{pageSize}
|
||||
</select>
|
||||
|
||||
<select id="xdrylbCount" resultType="int">
|
||||
select count(1) from tb_xdxx_ry where xt_scbz = '0'
|
||||
<if test="dto.xm != null and dto.xm != ''">
|
||||
and xm like concat('%',#{dto.xm},'%')
|
||||
</if>
|
||||
<if test="dto.sfzh != null and dto.sfzh != ''">
|
||||
and sfzh = #{dto.sfzh}
|
||||
</if>
|
||||
<if test="dto.xdbm != null and dto.xdbm != ''">
|
||||
and xdbm = #{dto.xdbm}
|
||||
</if>
|
||||
<if test="dto.xdId != null and dto.xdId != ''">
|
||||
and xd_id = #{dto.xdId}
|
||||
</if>
|
||||
<if test="dto.kssj != null and dto.kssj != ''">
|
||||
and xjcjsj >= #{dto.kssj}
|
||||
</if>
|
||||
<if test="jssj != null and jssj != ''">
|
||||
and xjcjsj <= #{jssj}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="xdrylb" resultType="java.util.Map">
|
||||
select * from tb_xdxx_ry where xt_scbz = '0'
|
||||
<if test="dto.xm != null and dto.xm != ''">
|
||||
and xm like concat('%',#{dto.xm},'%')
|
||||
</if>
|
||||
<if test="dto.sfzh != null and dto.sfzh != ''">
|
||||
and sfzh = #{dto.sfzh}
|
||||
</if>
|
||||
<if test="dto.xdbm != null and dto.xdbm != ''">
|
||||
and xdbm = #{dto.xdbm}
|
||||
</if>
|
||||
<if test="dto.xdId != null and dto.xdId != ''">
|
||||
and xd_id = #{dto.xdId}
|
||||
</if>
|
||||
<if test="dto.kssj != null and dto.kssj != ''">
|
||||
and xjcjsj >= #{dto.kssj}
|
||||
</if>
|
||||
<if test="jssj != null and jssj != ''">
|
||||
and xjcjsj <= #{jssj}
|
||||
</if>
|
||||
order by xjcjsj desc
|
||||
limit #{pageIndex},#{pageSize}
|
||||
</select>
|
||||
|
||||
<select id="xdrytj" resultType="java.util.Map">
|
||||
select count(1) as sl from tb_xdxx_ry where xt_scbz = '0'
|
||||
<if test="dto.xm != null and dto.xm != ''">
|
||||
and xm like concat('%',#{dto.xm},'%')
|
||||
</if>
|
||||
<if test="dto.sfzh != null and dto.sfzh != ''">
|
||||
and sfzh = #{dto.sfzh}
|
||||
</if>
|
||||
<if test="dto.xdbm != null and dto.xdbm != ''">
|
||||
and xdbm = #{dto.xdbm}
|
||||
</if>
|
||||
<if test="dto.xdId != null and dto.xdId != ''">
|
||||
and xd_id = #{dto.xdId}
|
||||
</if>
|
||||
<if test="dto.kssj != null and dto.kssj != ''">
|
||||
and xjcjsj >= #{dto.kssj}
|
||||
</if>
|
||||
<if test="dto.jssj != null and dto.jssj != ''">
|
||||
and xjcjsj <= #{dto.jssj}
|
||||
</if>
|
||||
order by xjcjsj desc
|
||||
</select>
|
||||
|
||||
<select id="xdxxlbCount" resultType="int">
|
||||
select count(1) from tb_xdxx where xt_scbz = '0'
|
||||
<if test="dto.kssj != null and dto.kssj != ''">
|
||||
and xdlysj >= #{dto.kssj}
|
||||
</if>
|
||||
<if test="dto.jssj != null and dto.jssj != ''">
|
||||
and xdlysj <= #{dto.jssj}
|
||||
</if>
|
||||
<if test="dto.xdid != null and dto.xdid != ''">
|
||||
and id in ( #{dto.xdid} )
|
||||
</if>
|
||||
order by xdlysj desc
|
||||
</select>
|
||||
|
||||
<select id="xdxxlb" resultType="java.util.Map">
|
||||
select * from tb_xdxx where xt_scbz = '0'
|
||||
<if test="dto.kssj != null and dto.kssj != ''">
|
||||
and xdlysj >= #{dto.kssj}
|
||||
</if>
|
||||
<if test="dto.jssj != null and dto.jssj != ''">
|
||||
and xdlysj <= #{dto.jssj}
|
||||
</if>
|
||||
<if test="dto.xdid != null and dto.xdid != ''">
|
||||
and id in ( #{dto.xdid} )
|
||||
</if>
|
||||
order by xdlysj desc
|
||||
limit #{pageIndex},#{pageSize}
|
||||
</select>
|
||||
|
||||
<select id="xdxxtj" resultType="java.util.Map">
|
||||
select count(1) as sl from tb_xdxx where xt_scbz = '0'
|
||||
<if test="dto.kssj != null and dto.kssj != ''">
|
||||
and xdlysj >= #{dto.kssj}
|
||||
</if>
|
||||
<if test="dto.jssj != null and dto.jssj != ''">
|
||||
and xdlysj <= #{dto.jssj}
|
||||
</if>
|
||||
</select>
|
||||
</mapper>
|
16
mosty-bkzx/src/main/resources/rebel.xml
Normal file
16
mosty-bkzx/src/main/resources/rebel.xml
Normal file
@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!--
|
||||
This is the JRebel configuration file. It maps the running application to your IDE workspace, enabling JRebel reloading for this project.
|
||||
Refer to https://manuals.jrebel.com/jrebel/standalone/config.html for more information.
|
||||
-->
|
||||
<application generated-by="intellij" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.zeroturnaround.com" xsi:schemaLocation="http://www.zeroturnaround.com http://update.zeroturnaround.com/jrebel/rebel-2_3.xsd">
|
||||
|
||||
<id>mosty-bkzx</id>
|
||||
|
||||
<classpath>
|
||||
<dir name="E:/project/rs/mosty-dyga-cloud/mosty-bkzx/target/classes">
|
||||
</dir>
|
||||
</classpath>
|
||||
|
||||
</application>
|
Reference in New Issue
Block a user