@@ -1,200 +0,0 @@ | |||||
# | |||||
# There is insufficient memory for the Java Runtime Environment to continue. | |||||
# Native memory allocation (mmap) failed to map 532676608 bytes for Failed to commit area from 0x0000000604400000 to 0x0000000624000000 of length 532676608. | |||||
# Possible reasons: | |||||
# The system is out of physical RAM or swap space | |||||
# The process is running with CompressedOops enabled, and the Java Heap may be blocking the growth of the native heap | |||||
# Possible solutions: | |||||
# Reduce memory load on the system | |||||
# Increase physical memory or swap space | |||||
# Check if swap backing store is full | |||||
# Decrease Java heap size (-Xmx/-Xms) | |||||
# Decrease number of Java threads | |||||
# Decrease Java thread stack sizes (-Xss) | |||||
# Set larger code cache with -XX:ReservedCodeCacheSize= | |||||
# This output file may be truncated or incomplete. | |||||
# | |||||
# Out of Memory Error (src/hotspot/os/windows/os_windows.cpp:3627), pid=50732, tid=468 | |||||
# | |||||
# JRE version: (11.0.15+10) (build ) | |||||
# Java VM: OpenJDK 64-Bit Server VM (11.0.15+10-b2043.56, mixed mode, sharing, tiered, compressed oops, g1 gc, windows-amd64) | |||||
# No core dump will be written. Minidumps are not enabled by default on client versions of Windows | |||||
# | |||||
--------------- S U M M A R Y ------------ | |||||
Command Line: git4idea.http.GitAskPassApp Username for 'http://git.ningdatech.com': | |||||
Host: 12th Gen Intel(R) Core(TM) i9-12900H, 20 cores, 31G, Windows 11 , 64 bit Build 22621 (10.0.22621.1928) | |||||
Time: Mon Aug 7 10:27:38 2023 Windows 11 , 64 bit Build 22621 (10.0.22621.1928) elapsed time: 0.022779 seconds (0d 0h 0m 0s) | |||||
--------------- T H R E A D --------------- | |||||
Current thread (0x000002df0ddfd800): JavaThread "Unknown thread" [_thread_in_vm, id=468, stack(0x000000e5e2300000,0x000000e5e2400000)] | |||||
Stack: [0x000000e5e2300000,0x000000e5e2400000] | |||||
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) | |||||
V [jvm.dll+0x61612a] | |||||
V [jvm.dll+0x79c450] | |||||
V [jvm.dll+0x79da6d] | |||||
V [jvm.dll+0x79e143] | |||||
V [jvm.dll+0x24cc18] | |||||
V [jvm.dll+0x613174] | |||||
V [jvm.dll+0x607e55] | |||||
V [jvm.dll+0x30b1cb] | |||||
V [jvm.dll+0x30b13a] | |||||
V [jvm.dll+0x30b012] | |||||
V [jvm.dll+0x30ff76] | |||||
V [jvm.dll+0x35b4c3] | |||||
V [jvm.dll+0x35bbc6] | |||||
V [jvm.dll+0x35b5c3] | |||||
V [jvm.dll+0x2e5918] | |||||
V [jvm.dll+0x2e6ab7] | |||||
V [jvm.dll+0x7794f7] | |||||
V [jvm.dll+0x77acec] | |||||
V [jvm.dll+0x368a59] | |||||
V [jvm.dll+0x75ce8e] | |||||
V [jvm.dll+0x3d6a33] | |||||
V [jvm.dll+0x3d9001] | |||||
C [jli.dll+0x536b] | |||||
C [ucrtbase.dll+0x29363] | |||||
C [KERNEL32.DLL+0x126ad] | |||||
C [ntdll.dll+0x5aa68] | |||||
--------------- P R O C E S S --------------- | |||||
Threads class SMR info: | |||||
_java_thread_list=0x000002df0ba385e0, length=0, elements={ | |||||
} | |||||
Java Threads: ( => current thread ) | |||||
Other Threads: | |||||
0x000002df0de18000 GCTaskThread "GC Thread#0" [stack: 0x000000e5e2400000,0x000000e5e2500000] [id=2344] | |||||
0x000002df0de98000 ConcurrentGCThread "G1 Main Marker" [stack: 0x000000e5e2500000,0x000000e5e2600000] [id=43216] | |||||
0x000002df0de9a800 ConcurrentGCThread "G1 Conc#0" [stack: 0x000000e5e2600000,0x000000e5e2700000] [id=30344] | |||||
[error occurred during error reporting (printing all threads), id 0xc0000005, EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x00007ffe70616017] | |||||
VM state:not at safepoint (not fully initialized) | |||||
VM Mutex/Monitor currently owned by a thread: ([mutex/lock_event]) | |||||
[0x000002df0ddfad60] Heap_lock - owner thread: 0x000002df0ddfd800 | |||||
Heap address: 0x0000000604400000, size: 8124 MB, Compressed Oops mode: Non-zero based: 0x0000000604400000 | |||||
Narrow klass base: 0x0000000000000000, Narrow klass shift: 0 | |||||
GC Heap History (0 events): | |||||
No events | |||||
Deoptimization events (0 events): | |||||
No events | |||||
Classes redefined (0 events): | |||||
No events | |||||
Internal exceptions (0 events): | |||||
No events | |||||
Events (1 events): | |||||
Event: 0.016 Loaded shared library C:\IDEA\IntelliJ IDEA 2022.1.4\jbr\bin\zip.dll | |||||
Dynamic libraries: | |||||
0x00007ff796130000 - 0x00007ff79613a000 C:\IDEA\IntelliJ IDEA 2022.1.4\jbr\bin\java.exe | |||||
0x00007fff205f0000 - 0x00007fff20804000 C:\WINDOWS\SYSTEM32\ntdll.dll | |||||
0x00007fff1f640000 - 0x00007fff1f702000 C:\WINDOWS\System32\KERNEL32.DLL | |||||
0x00007fff1d9f0000 - 0x00007fff1dd93000 C:\WINDOWS\System32\KERNELBASE.dll | |||||
0x00007fff1e0f0000 - 0x00007fff1e201000 C:\WINDOWS\System32\ucrtbase.dll | |||||
0x00007fff035a0000 - 0x00007fff035b9000 C:\IDEA\IntelliJ IDEA 2022.1.4\jbr\bin\jli.dll | |||||
0x00007ffef11a0000 - 0x00007ffef11b6000 C:\IDEA\IntelliJ IDEA 2022.1.4\jbr\bin\VCRUNTIME140.dll | |||||
0x00007fff1f000000 - 0x00007fff1f1aa000 C:\WINDOWS\System32\USER32.dll | |||||
0x00007fff1de60000 - 0x00007fff1de86000 C:\WINDOWS\System32\win32u.dll | |||||
0x00007fff1ed90000 - 0x00007fff1edb9000 C:\WINDOWS\System32\GDI32.dll | |||||
0x00007fff07f70000 - 0x00007fff081fe000 C:\WINDOWS\WinSxS\amd64_microsoft.windows.common-controls_6595b64144ccf1df_6.0.22621.1635_none_270f70857386168e\COMCTL32.dll | |||||
0x00007fff1e2b0000 - 0x00007fff1e3c9000 C:\WINDOWS\System32\gdi32full.dll | |||||
0x00007fff1edc0000 - 0x00007fff1ee67000 C:\WINDOWS\System32\msvcrt.dll | |||||
0x00007fff1e210000 - 0x00007fff1e2aa000 C:\WINDOWS\System32\msvcp_win.dll | |||||
0x00007fff1e440000 - 0x00007fff1e471000 C:\WINDOWS\System32\IMM32.DLL | |||||
0x00007ffea1c40000 - 0x00007ffea1cea000 C:\IDEA\IntelliJ IDEA 2022.1.4\jbr\bin\msvcp140.dll | |||||
0x00007ffe70320000 - 0x00007ffe70e9b000 C:\IDEA\IntelliJ IDEA 2022.1.4\jbr\bin\server\jvm.dll | |||||
0x00007fff20390000 - 0x00007fff2043e000 C:\WINDOWS\System32\ADVAPI32.dll | |||||
0x00007fff1fea0000 - 0x00007fff1ff44000 C:\WINDOWS\System32\sechost.dll | |||||
0x00007fff1eee0000 - 0x00007fff1eff7000 C:\WINDOWS\System32\RPCRT4.dll | |||||
0x00007fff1f1b0000 - 0x00007fff1f1b8000 C:\WINDOWS\System32\PSAPI.DLL | |||||
0x00007fff168f0000 - 0x00007fff168f9000 C:\WINDOWS\SYSTEM32\WSOCK32.dll | |||||
0x00007fff20440000 - 0x00007fff204b1000 C:\WINDOWS\System32\WS2_32.dll | |||||
0x00007fff0ea00000 - 0x00007fff0ea34000 C:\WINDOWS\SYSTEM32\WINMM.dll | |||||
0x00007fff1a930000 - 0x00007fff1a93a000 C:\WINDOWS\SYSTEM32\VERSION.dll | |||||
0x00007fff1ca90000 - 0x00007fff1caa8000 C:\WINDOWS\SYSTEM32\kernel.appcore.dll | |||||
0x00007fff10140000 - 0x00007fff10151000 C:\IDEA\IntelliJ IDEA 2022.1.4\jbr\bin\verify.dll | |||||
0x00007fff1b360000 - 0x00007fff1b58e000 C:\WINDOWS\SYSTEM32\DBGHELP.DLL | |||||
0x00007fff1f8d0000 - 0x00007fff1fc59000 C:\WINDOWS\System32\combase.dll | |||||
0x00007fff1ff90000 - 0x00007fff20067000 C:\WINDOWS\System32\OLEAUT32.dll | |||||
0x00007ffefbaa0000 - 0x00007ffefbad2000 C:\WINDOWS\SYSTEM32\dbgcore.DLL | |||||
0x00007fff1df00000 - 0x00007fff1df7a000 C:\WINDOWS\System32\bcryptPrimitives.dll | |||||
0x00007fff10110000 - 0x00007fff10139000 C:\IDEA\IntelliJ IDEA 2022.1.4\jbr\bin\java.dll | |||||
0x00007fff17290000 - 0x00007fff1729b000 C:\IDEA\IntelliJ IDEA 2022.1.4\jbr\bin\jimage.dll | |||||
0x00007fff03580000 - 0x00007fff03599000 C:\IDEA\IntelliJ IDEA 2022.1.4\jbr\bin\zip.dll | |||||
dbghelp: loaded successfully - version: 4.0.5 - missing functions: none | |||||
symbol engine: initialized successfully - sym options: 0x614 - pdb path: .;C:\IDEA\IntelliJ IDEA 2022.1.4\jbr\bin;C:\WINDOWS\SYSTEM32;C:\WINDOWS\WinSxS\amd64_microsoft.windows.common-controls_6595b64144ccf1df_6.0.22621.1635_none_270f70857386168e;C:\IDEA\IntelliJ IDEA 2022.1.4\jbr\bin\server | |||||
VM Arguments: | |||||
java_command: git4idea.http.GitAskPassApp Username for 'http://git.ningdatech.com': | |||||
java_class_path (initial): C:/IDEA/IntelliJ IDEA 2022.1.4/plugins/git4idea/lib/git4idea-rt.jar;C:/IDEA/IntelliJ IDEA 2022.1.4/lib/externalProcess-rt.jar;C:/IDEA/IntelliJ IDEA 2022.1.4/lib/app.jar;C:/IDEA/IntelliJ IDEA 2022.1.4/lib/3rd-party-rt.jar | |||||
Launcher Type: SUN_STANDARD | |||||
[Global flags] | |||||
intx CICompilerCount = 12 {product} {ergonomic} | |||||
uint ConcGCThreads = 4 {product} {ergonomic} | |||||
uint G1ConcRefinementThreads = 15 {product} {ergonomic} | |||||
size_t G1HeapRegionSize = 2097152 {product} {ergonomic} | |||||
uintx GCDrainStackTargetSize = 64 {product} {ergonomic} | |||||
size_t InitialHeapSize = 532676608 {product} {ergonomic} | |||||
size_t MarkStackSize = 4194304 {product} {ergonomic} | |||||
size_t MaxHeapSize = 8518631424 {product} {ergonomic} | |||||
size_t MinHeapDeltaBytes = 2097152 {product} {ergonomic} | |||||
uintx NonNMethodCodeHeapSize = 7594288 {pd product} {ergonomic} | |||||
uintx NonProfiledCodeHeapSize = 122031976 {pd product} {ergonomic} | |||||
uintx ProfiledCodeHeapSize = 122031976 {pd product} {ergonomic} | |||||
uintx ReservedCodeCacheSize = 251658240 {pd product} {ergonomic} | |||||
bool SegmentedCodeCache = true {product} {ergonomic} | |||||
bool UseCompressedClassPointers = true {lp64_product} {ergonomic} | |||||
bool UseCompressedOops = true {lp64_product} {ergonomic} | |||||
bool UseG1GC = true {product} {ergonomic} | |||||
bool UseLargePagesIndividualAllocation = false {pd product} {ergonomic} | |||||
Logging: | |||||
Log output configuration: | |||||
#0: stdout all=warning uptime,level,tags | |||||
#1: stderr all=off uptime,level,tags | |||||
Environment Variables: | |||||
JAVA_HOME=C:\IDEA\jdk\jdk-11.0.17 | |||||
CLASSPATH=.;C:\IDEA\jdk\jdk-11.0.17\lib\dt.jar;C:\IDEA\jdk\jdk-11.0.17\lib\tools.jar; | |||||
PATH=D:\soft\Git\Git\mingw64\libexec\git-core;D:\soft\Git\Git\mingw64\libexec\git-core;D:\soft\Git\Git\mingw64\bin;D:\soft\Git\Git\usr\bin;C:\Users\CMM\bin;C:\Program Files\Common Files\Oracle\Java\javapath;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Windows\System32\OpenSSH;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\IDEA\jdk\jdk-11.0.17\bi;C:\IDEA\jdk\jdk-11.0.17\jre\bin";D:\soft\Git\Git\cmd;D:\soft\Git\Git\usr\bin;D:\soft\Maven\apache-maven-3.8.6-bin\apache-maven-3.8.6\bin;D:\soft\MySQL Installer\MySQL8.0\bin;D:\soft\Nodejs;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\WINDOWS\System32\OpenSSH;D:\soft\putty;C:\Users\CMM\AppData\Local\Microsoft\WindowsApps;C:\Users\CMM\AppData\Roaming\npm;D:\soft\GoLand\GoLand 2019.3.3\bin;D:\soft\Pycharm\PyCharm Community Edition 2022.3.3\bin | |||||
USERNAME=CMM | |||||
DISPLAY=:0.0 | |||||
LC_ALL=en_US.UTF-8 | |||||
OS=Windows_NT | |||||
PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 154 Stepping 3, GenuineIntel | |||||
--------------- S Y S T E M --------------- | |||||
OS: Windows 11 , 64 bit Build 22621 (10.0.22621.1928) | |||||
OS uptime: 11 days 17:18 hours | |||||
CPU:total 20 (initial active 20) (10 cores per cpu, 2 threads per core) family 6 model 154 stepping 3 microcode 0x41c, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ssse3, sse4.1, sse4.2, popcnt, avx, avx2, aes, clmul, erms, 3dnowpref, lzcnt, ht, tsc, tscinvbit, bmi1, bmi2, adx, sha, fma | |||||
Memory: 4k page, system-wide physical 32492M (784M free) | |||||
TotalPageFile size 58070M (AvailPageFile size 32M) | |||||
current process WorkingSet (physical memory assigned to process): 11M, peak: 11M | |||||
current process commit charge ("private bytes"): 76M, peak: 584M | |||||
vm_info: OpenJDK 64-Bit Server VM (11.0.15+10-b2043.56) for windows-amd64 JRE (11.0.15+10-b2043.56), built on May 16 2022 02:28:12 by "" with MS VC++ 14.0 (VS2015) | |||||
END. |
@@ -19,7 +19,7 @@ | |||||
<dependency> | <dependency> | ||||
<groupId>com.baomidou</groupId> | <groupId>com.baomidou</groupId> | ||||
<artifactId>mybatis-plus-generator</artifactId> | <artifactId>mybatis-plus-generator</artifactId> | ||||
<version>3.5.1</version> | |||||
<version>3.5.3.2</version> | |||||
</dependency> | </dependency> | ||||
<dependency> | <dependency> | ||||
<groupId>org.freemarker</groupId> | <groupId>org.freemarker</groupId> | ||||
@@ -41,7 +41,7 @@ public class GeneratorCodeKingbaseConfig { | |||||
// 设置父包模块名 | // 设置父包模块名 | ||||
.moduleName("pmapi." + packageName) | .moduleName("pmapi." + packageName) | ||||
// 设置mapperXml生成路径 | // 设置mapperXml生成路径 | ||||
.pathInfo(Collections.singletonMap(OutputFile.mapperXml, | |||||
.pathInfo(Collections.singletonMap(OutputFile.xml, | |||||
//设置自己的生成路径 | //设置自己的生成路径 | ||||
path + "/com/ningdatech/pmapi/" + packageName + "/mapper")); | path + "/com/ningdatech/pmapi/" + packageName + "/mapper")); | ||||
}) | }) | ||||
@@ -38,7 +38,10 @@ | |||||
<groupId>org.springframework.boot</groupId> | <groupId>org.springframework.boot</groupId> | ||||
<artifactId>spring-boot-starter-data-redis</artifactId> | <artifactId>spring-boot-starter-data-redis</artifactId> | ||||
</dependency> | </dependency> | ||||
<dependency> | |||||
<groupId>com.baomidou</groupId> | |||||
<artifactId>mybatis-plus-extension</artifactId> | |||||
</dependency> | |||||
<dependency> | <dependency> | ||||
<groupId>org.springframework.session</groupId> | <groupId>org.springframework.session</groupId> | ||||
<artifactId>spring-session-data-redis</artifactId> | <artifactId>spring-session-data-redis</artifactId> | ||||
@@ -85,10 +88,6 @@ | |||||
<scope>true</scope> | <scope>true</scope> | ||||
</dependency> | </dependency> | ||||
<dependency> | <dependency> | ||||
<groupId>com.alibaba</groupId> | |||||
<artifactId>druid-spring-boot-starter</artifactId> | |||||
</dependency> | |||||
<dependency> | |||||
<groupId>org.springframework.boot</groupId> | <groupId>org.springframework.boot</groupId> | ||||
<artifactId>spring-boot-starter-aop</artifactId> | <artifactId>spring-boot-starter-aop</artifactId> | ||||
</dependency> | </dependency> | ||||
@@ -129,11 +128,6 @@ | |||||
<groupId>org.springframework.boot</groupId> | <groupId>org.springframework.boot</groupId> | ||||
<artifactId>spring-boot-starter-test</artifactId> | <artifactId>spring-boot-starter-test</artifactId> | ||||
</dependency> | </dependency> | ||||
<dependency> | |||||
<groupId>org.mapstruct</groupId> | |||||
<artifactId>mapstruct</artifactId> | |||||
<version>1.5.3.Final</version> | |||||
</dependency> | |||||
<!--引入jwt--> | <!--引入jwt--> | ||||
<dependency> | <dependency> | ||||
<groupId>com.auth0</groupId> | <groupId>com.auth0</groupId> | ||||
@@ -141,11 +135,6 @@ | |||||
<version>3.10.3</version> | <version>3.10.3</version> | ||||
</dependency> | </dependency> | ||||
<dependency> | <dependency> | ||||
<groupId>org.mapstruct</groupId> | |||||
<artifactId>mapstruct-processor</artifactId> | |||||
<version>1.5.3.Final</version> | |||||
</dependency> | |||||
<dependency> | |||||
<groupId>org.springframework.boot</groupId> | <groupId>org.springframework.boot</groupId> | ||||
<artifactId>spring-boot-configuration-processor</artifactId> | <artifactId>spring-boot-configuration-processor</artifactId> | ||||
</dependency> | </dependency> | ||||
@@ -219,6 +208,16 @@ | |||||
<dependency> | <dependency> | ||||
<groupId>com.ningdatech</groupId> | <groupId>com.ningdatech</groupId> | ||||
<artifactId>nd-flowable-starter</artifactId> | <artifactId>nd-flowable-starter</artifactId> | ||||
<exclusions> | |||||
<exclusion> | |||||
<groupId>com.baomidou</groupId> | |||||
<artifactId>mybatis-plus-boot-starter</artifactId> | |||||
</exclusion> | |||||
<exclusion> | |||||
<groupId>com.alibaba</groupId> | |||||
<artifactId>druid-spring-boot-starter</artifactId> | |||||
</exclusion> | |||||
</exclusions> | |||||
</dependency> | </dependency> | ||||
<!--浙政钉--> | <!--浙政钉--> | ||||
<dependency> | <dependency> | ||||
@@ -265,7 +264,117 @@ | |||||
<groupId>cn.afterturn</groupId> | <groupId>cn.afterturn</groupId> | ||||
<artifactId>easypoi-base</artifactId> | <artifactId>easypoi-base</artifactId> | ||||
</dependency> | </dependency> | ||||
<dependency> | |||||
<groupId>com.agent</groupId> | |||||
<artifactId>agent-boot</artifactId> | |||||
<version>1.3.22</version> | |||||
<scope>system</scope> | |||||
<systemPath>${project.basedir}/lib/agent-boot-1.3.22.0215.jar</systemPath> | |||||
</dependency> | |||||
<dependency> | |||||
<groupId>com.agent</groupId> | |||||
<artifactId>agent-boot</artifactId> | |||||
<version>1.3.22</version> | |||||
<scope>system</scope> | |||||
<systemPath>${project.basedir}/lib/agent-boot-1.3.22.0215.jar</systemPath> | |||||
</dependency> | |||||
<dependency> | |||||
<groupId>com.suwell</groupId> | |||||
<artifactId>suwell-agent-http</artifactId> | |||||
<version>1.7</version> | |||||
<scope>system</scope> | |||||
<systemPath>${project.basedir}/lib/suwell-agent-http-1.7.220630.jar</systemPath> | |||||
</dependency> | |||||
<dependency> | |||||
<groupId>com.suwell</groupId> | |||||
<artifactId>suwell-agent-wrapper</artifactId> | |||||
<version>1.6</version> | |||||
<scope>system</scope> | |||||
<systemPath>${project.basedir}/lib/suwell-agent-wrapper-1.6.221208.jar</systemPath> | |||||
</dependency> | |||||
<dependency> | |||||
<groupId>com.slf4j</groupId> | |||||
<artifactId>slf4j-api</artifactId> | |||||
<version>1.7.29</version> | |||||
<scope>system</scope> | |||||
<systemPath>${project.basedir}/lib/slf4j-api-1.7.29.jar</systemPath> | |||||
</dependency> | |||||
<dependency> | |||||
<groupId>com.httpclient</groupId> | |||||
<artifactId>httpclient</artifactId> | |||||
<version>4.5.13</version> | |||||
<scope>system</scope> | |||||
<systemPath>${project.basedir}/lib/httpclient-4.5.13.jar</systemPath> | |||||
</dependency> | |||||
<dependency> | |||||
<groupId>com.httpcore</groupId> | |||||
<artifactId>httpcore</artifactId> | |||||
<version>4.4.13</version> | |||||
<scope>system</scope> | |||||
<systemPath>${project.basedir}/lib/httpcore-4.4.13.jar</systemPath> | |||||
</dependency> | |||||
<dependency> | |||||
<groupId>com.httpmime</groupId> | |||||
<artifactId>httpmime</artifactId> | |||||
<version>4.5.13</version> | |||||
<scope>system</scope> | |||||
<systemPath>${project.basedir}/lib/httpmime-4.5.13.jar</systemPath> | |||||
</dependency> | |||||
<dependency> | |||||
<groupId>com.jbArchivesTools</groupId> | |||||
<artifactId>jbArchivesTools</artifactId> | |||||
<version>1.0</version> | |||||
<scope>system</scope> | |||||
<systemPath>${project.basedir}/lib/jbArchivesTools-1.0-SNAPSHOT.jar</systemPath> | |||||
</dependency> | |||||
<dependency> | |||||
<groupId>com.suwell</groupId> | |||||
<artifactId>suwell-convert-base</artifactId> | |||||
<version>1.5.19</version> | |||||
<scope>system</scope> | |||||
<systemPath>${project.basedir}/lib/suwell-convert-base-1.5.19.0408.jar</systemPath> | |||||
</dependency> | |||||
<dependency> | |||||
<groupId>com.gson</groupId> | |||||
<artifactId>gson</artifactId> | |||||
<version>2.8.0</version> | |||||
<scope>system</scope> | |||||
<systemPath>${project.basedir}/lib/gson-2.8.0.jar</systemPath> | |||||
</dependency> | |||||
<dependency> | |||||
<groupId>com.suwell</groupId> | |||||
<artifactId>suwell-rpc-manager-client</artifactId> | |||||
<version>2.7</version> | |||||
<scope>system</scope> | |||||
<systemPath>${project.basedir}/lib/suwell-rpc-manager-client-2.7.211125.jar</systemPath> | |||||
</dependency> | |||||
<dependency> | |||||
<groupId>com.suwell</groupId> | |||||
<artifactId>suwell-packet-wrapper</artifactId> | |||||
<version>1.21</version> | |||||
<scope>system</scope> | |||||
<systemPath>${project.basedir}/lib/suwell-packet-wrapper-1.21.230306.jar</systemPath> | |||||
</dependency> | |||||
<dependency> | |||||
<groupId>com.dom4j</groupId> | |||||
<artifactId>dom4j</artifactId> | |||||
<version>2.0.2</version> | |||||
<scope>system</scope> | |||||
<systemPath>${project.basedir}/lib/dom4j-2.0.2.jar</systemPath> | |||||
</dependency> | |||||
</dependencies> | </dependencies> | ||||
<!-- 打包 --> | <!-- 打包 --> | ||||
@@ -90,4 +90,6 @@ public interface BizConst { | |||||
String ORG_CODE = "organizationCode"; | String ORG_CODE = "organizationCode"; | ||||
String DEV = "dev"; | String DEV = "dev"; | ||||
String PRE = "pre"; | |||||
String PROD = "prod"; | |||||
} | } |
@@ -34,7 +34,8 @@ import org.springframework.web.servlet.mvc.method.annotation.ResponseBodyAdvice; | |||||
"com.ningdatech.pmapi.safety.controller", | "com.ningdatech.pmapi.safety.controller", | ||||
"com.ningdatech.pmapi.portrait.controller", | "com.ningdatech.pmapi.portrait.controller", | ||||
"com.ningdatech.pmapi.irs.controller", | "com.ningdatech.pmapi.irs.controller", | ||||
"com.ningdatech.pmapi.dashboard.controller" | |||||
"com.ningdatech.pmapi.dashboard.controller", | |||||
"com.ningdatech.pmapi.wps.controller" | |||||
}) | }) | ||||
public class GlobalResponseHandler implements ResponseBodyAdvice<Object> { | public class GlobalResponseHandler implements ResponseBodyAdvice<Object> { | ||||
@@ -105,8 +105,8 @@ public interface RegionCacheHelper { | |||||
* | * | ||||
* @param code 区域编码 | * @param code 区域编码 | ||||
* @param level 区域层级 | * @param level 区域层级 | ||||
* @return | |||||
* @return \ | |||||
*/ | */ | ||||
String getUnionPathStr(String code, Integer level); | |||||
String getUnionPath(String code, Integer level); | |||||
} | } |
@@ -1,5 +1,6 @@ | |||||
package com.ningdatech.pmapi.common.helper.impl; | package com.ningdatech.pmapi.common.helper.impl; | ||||
import cn.hutool.core.collection.CollUtil; | |||||
import cn.hutool.core.text.StrPool; | import cn.hutool.core.text.StrPool; | ||||
import com.ningdatech.basic.exception.BizException; | import com.ningdatech.basic.exception.BizException; | ||||
import com.ningdatech.basic.util.CollUtils; | import com.ningdatech.basic.util.CollUtils; | ||||
@@ -197,15 +198,15 @@ public class RegionsCacheHelperImpl extends AbstractRegionCacheHelper implements | |||||
@Override | @Override | ||||
public String getUnionPathStr(String code, Integer level) { | |||||
if (StringUtils.isBlank(code) || Objects.isNull(level)) { | |||||
return null; | |||||
public String getUnionPath(String code, Integer level) { | |||||
if (StrUtils.isBlank(code) || Objects.isNull(level)) { | |||||
return StrUtils.EMPTY; | |||||
} | } | ||||
List<String> unionPathStrList = new ArrayList<>(); | List<String> unionPathStrList = new ArrayList<>(); | ||||
buildUnionPathStrList(code, level, unionPathStrList); | buildUnionPathStrList(code, level, unionPathStrList); | ||||
Collections.reverse(unionPathStrList); | Collections.reverse(unionPathStrList); | ||||
if (CollectionUtils.isEmpty(unionPathStrList)) { | |||||
return null; | |||||
if (CollUtil.isEmpty(unionPathStrList)) { | |||||
return StrUtils.EMPTY; | |||||
} | } | ||||
return String.join("@@", unionPathStrList); | return String.join("@@", unionPathStrList); | ||||
} | } | ||||
@@ -149,7 +149,7 @@ public class DingInfoPullController { | |||||
projectDto.setProjectCode(row.getCell(0).toString()); | projectDto.setProjectCode(row.getCell(0).toString()); | ||||
projectDto.setProjectName(row.getCell(1).toString()); | projectDto.setProjectName(row.getCell(1).toString()); | ||||
projectDto.setArea(row.getCell(2).toString()); | projectDto.setArea(row.getCell(2).toString()); | ||||
projectDto.setAreaCode(row.getCell(3).toString()); | |||||
projectDto.setAreaCode("331123000"); | |||||
String baseProjType = String.valueOf(row.getCell(4)); | String baseProjType = String.valueOf(row.getCell(4)); | ||||
if(StringUtils.isNotBlank(baseProjType) && baseProjType.contains(".")){ | if(StringUtils.isNotBlank(baseProjType) && baseProjType.contains(".")){ | ||||
baseProjType = baseProjType.substring(0, | baseProjType = baseProjType.substring(0, | ||||
@@ -255,6 +255,12 @@ public class DingInfoPullController { | |||||
return "推送失败"; | return "推送失败"; | ||||
} | } | ||||
@ApiOperation(value = "同步企业信息 条线", notes = "同步企业信息 条线") | |||||
@GetMapping("/synchronouOrgBiz") | |||||
public String synchronouOrgBiz() { | |||||
return procDefManage.synchronouOrgBiz(); | |||||
} | |||||
public static Workbook readExcel(InputStream is, String extString){ | public static Workbook readExcel(InputStream is, String extString){ | ||||
Workbook wb = null; | Workbook wb = null; | ||||
@@ -254,6 +254,7 @@ public class ExpertInfoCmdAssembler { | |||||
expertInfoModifyCmd.setExpertIntentionWorkRegionInfo(expertIntentionWorkRegionInfo); | expertInfoModifyCmd.setExpertIntentionWorkRegionInfo(expertIntentionWorkRegionInfo); | ||||
expertInfoModifyCmd.setExpertAvoidCompanyList(expertAvoidCompanyList); | expertInfoModifyCmd.setExpertAvoidCompanyList(expertAvoidCompanyList); | ||||
expertInfoModifyCmd.setExpertInfoSensitiveFieldCheckBO(expertInfoSensitiveFieldCheckBO); | expertInfoModifyCmd.setExpertInfoSensitiveFieldCheckBO(expertInfoSensitiveFieldCheckBO); | ||||
expertInfoModifyCmd.setBusinessStrips(expertJobInfo.getBusinessStrips()); | |||||
return expertInfoModifyCmd; | return expertInfoModifyCmd; | ||||
} | } | ||||
@@ -1,6 +1,7 @@ | |||||
package com.ningdatech.pmapi.expert.assembler; | package com.ningdatech.pmapi.expert.assembler; | ||||
import cn.hutool.core.bean.BeanUtil; | |||||
import cn.hutool.core.collection.CollUtil; | import cn.hutool.core.collection.CollUtil; | ||||
import cn.hutool.core.util.StrUtil; | import cn.hutool.core.util.StrUtil; | ||||
import com.alibaba.fastjson.JSONObject; | import com.alibaba.fastjson.JSONObject; | ||||
@@ -9,13 +10,11 @@ import com.ningdatech.pmapi.common.enumeration.BoolDisplayEnum; | |||||
import com.ningdatech.pmapi.common.helper.RegionCacheHelper; | import com.ningdatech.pmapi.common.helper.RegionCacheHelper; | ||||
import com.ningdatech.pmapi.common.model.FileBasicInfo; | import com.ningdatech.pmapi.common.model.FileBasicInfo; | ||||
import com.ningdatech.pmapi.expert.constant.ExpertApplyTypeEnum; | import com.ningdatech.pmapi.expert.constant.ExpertApplyTypeEnum; | ||||
import com.ningdatech.pmapi.expert.entity.ExpertAvoidCompany; | |||||
import com.ningdatech.pmapi.expert.entity.ExpertIntentionWorkRegion; | |||||
import com.ningdatech.pmapi.expert.entity.ExpertMetaApply; | |||||
import com.ningdatech.pmapi.expert.entity.ExpertUserFullInfo; | |||||
import com.ningdatech.pmapi.expert.entity.*; | |||||
import com.ningdatech.pmapi.expert.model.*; | import com.ningdatech.pmapi.expert.model.*; | ||||
import com.ningdatech.pmapi.expert.model.dto.*; | import com.ningdatech.pmapi.expert.model.dto.*; | ||||
import com.ningdatech.pmapi.expert.model.vo.ExpertFullInfoVO; | import com.ningdatech.pmapi.expert.model.vo.ExpertFullInfoVO; | ||||
import com.ningdatech.pmapi.gov.model.vo.GovBusinessStripVO; | |||||
import com.ningdatech.pmapi.meta.constant.DictExpertInfoTypeEnum; | import com.ningdatech.pmapi.meta.constant.DictExpertInfoTypeEnum; | ||||
import com.ningdatech.pmapi.meta.constant.ExpertTagEnum; | import com.ningdatech.pmapi.meta.constant.ExpertTagEnum; | ||||
import com.ningdatech.pmapi.meta.helper.DictionaryCache; | import com.ningdatech.pmapi.meta.helper.DictionaryCache; | ||||
@@ -45,43 +44,43 @@ public class ExpertUserInfoAssembler { | |||||
private final DictionaryCache dictionaryCache; | private final DictionaryCache dictionaryCache; | ||||
private final RegionCacheHelper regionCacheHelper; | private final RegionCacheHelper regionCacheHelper; | ||||
public ExpertFullInfoVO buildExpertFullInfoVO(List<AttachFileVo> attachFiles, ExpertFullInfoAllDTO expertFullInfoAll) { | |||||
public ExpertFullInfoVO buildExpertFullInfo(List<AttachFileVo> attachFiles, ExpertFullInfoAllDTO expertFullInfoAll) { | |||||
ExpertUserFullInfoDTO expertUserInfo = expertFullInfoAll.getExpertUserInfoDTO(); | ExpertUserFullInfoDTO expertUserInfo = expertFullInfoAll.getExpertUserInfoDTO(); | ||||
// 字典字典段map | // 字典字典段map | ||||
Map<String, List<DictionaryFieldInfo>> dictInfoMap = buildDictInfoMap(expertFullInfoAll.getExpertDictionaryList()); | |||||
Map<String, List<DictionaryFieldInfo>> dictMap = buildDictInfoMap(expertFullInfoAll.getExpertDictionaryList()); | |||||
// 专家文件资料map | // 专家文件资料map | ||||
Map<Long, FileBasicInfo> fileInfoMap = buildFileBasicInfoMap(attachFiles); | |||||
Map<Long, FileBasicInfo> fileMap = buildFileBasicInfoMap(attachFiles); | |||||
// 专家标签字段map | // 专家标签字段map | ||||
Map<String, List<TagFieldInfo>> tagInfoMap = buildTagFieldInfoMap(expertFullInfoAll.getExpertTagList()); | |||||
Map<String, List<TagFieldInfo>> tagMap = buildTagFieldInfoMap(expertFullInfoAll.getExpertTagList()); | |||||
// 专家履职意向地 | // 专家履职意向地 | ||||
List<ExpertRegionDTO> intentionWorkRegion = expertFullInfoAll.getExpertIntentionWorkRegionInfo(); | |||||
List<ExpertRegionDTO> intentionWorkRegions = expertFullInfoAll.getExpertIntentionWorkRegionInfo(); | |||||
// 专家回避单位列表 | // 专家回避单位列表 | ||||
List<ExpertAvoidCompanyDTO> expertAvoidCompanyList = expertFullInfoAll.getExpertAvoidCompanyList(); | |||||
List<ExpertAvoidCompanyDTO> avoidCompanies = expertFullInfoAll.getExpertAvoidCompanyList(); | |||||
// 基本信息 | // 基本信息 | ||||
ExpertBasicInfo basicInfo = buildExpertBasicInfo(expertUserInfo, dictInfoMap, tagInfoMap, intentionWorkRegion, fileInfoMap); | |||||
ExpertBasicInfo basicInfo = buildExpertBasicInfo(expertUserInfo, dictMap, tagMap, intentionWorkRegions, fileMap); | |||||
// 学历信息 | // 学历信息 | ||||
ExpertEduInfo eduInfo = buildExpertEduInfo(expertUserInfo, dictInfoMap, fileInfoMap); | |||||
ExpertEduInfo eduInfo = buildExpertEduInfo(expertUserInfo, dictMap, fileMap); | |||||
// 职业信息 | // 职业信息 | ||||
ExpertJobInfo jobInfo = buildExpertJobInfo(expertUserInfo, dictInfoMap); | |||||
ExpertJobInfo jobInfo = buildExpertJobInfo(expertUserInfo, dictMap); | |||||
jobInfo.setBusinessStrips(expertFullInfoAll.getBusinessStrips()); | |||||
// 专业信息 | // 专业信息 | ||||
ExpertProfessionalInfo professionalInfo = buildExpertProfessionalInfo(expertUserInfo, dictInfoMap | |||||
, tagInfoMap, fileInfoMap, expertAvoidCompanyList); | |||||
ExpertProfessionalInfo profession = buildExpertProfessionalInfo(expertUserInfo, dictMap, tagMap, fileMap, avoidCompanies); | |||||
// 推荐信息 | // 推荐信息 | ||||
ExpertRecommendInfo recommendInfo = new ExpertRecommendInfo(); | ExpertRecommendInfo recommendInfo = new ExpertRecommendInfo(); | ||||
recommendInfo.setRecommendedWay(dictInfoMap.get(DictExpertInfoTypeEnum.RECOMMENDED_WAY.getKey())); | |||||
recommendInfo.setRecommendationProofFile(getFileBasicInfoList(fileInfoMap, expertUserInfo.getRecommendationProofFileIdList())); | |||||
recommendInfo.setRecommendedWay(dictMap.get(DictExpertInfoTypeEnum.RECOMMENDED_WAY.getKey())); | |||||
recommendInfo.setRecommendationProofFile(getFileBasicInfoList(fileMap, expertUserInfo.getRecommendationProofFileIdList())); | |||||
// 其他信息 | // 其他信息 | ||||
ExpertOtherInfo otherInfo = new ExpertOtherInfo(); | ExpertOtherInfo otherInfo = new ExpertOtherInfo(); | ||||
otherInfo.setOther(tagInfoMap.get(ExpertTagEnum.OTHER.getKey())); | |||||
otherInfo.setOther(tagMap.get(ExpertTagEnum.OTHER.getKey())); | |||||
otherInfo.setRemark(expertUserInfo.getRemark()); | otherInfo.setRemark(expertUserInfo.getRemark()); | ||||
// 专家申请履职意向展示列表 | // 专家申请履职意向展示列表 | ||||
List<ExpertRegionInfo> applyIntentionWorkRegions = expertFullInfoAll.getExpertApplyIntentionWorkRegionInfo().stream().map(r -> { | List<ExpertRegionInfo> applyIntentionWorkRegions = expertFullInfoAll.getExpertApplyIntentionWorkRegionInfo().stream().map(r -> { | ||||
ExpertRegionInfo expertApplyIntentionWorkRegion = new ExpertRegionInfo(); | |||||
expertApplyIntentionWorkRegion.setRegionLevel(r.getRegionLevel()); | |||||
expertApplyIntentionWorkRegion.setRegionCode(r.getRegionCode()); | |||||
expertApplyIntentionWorkRegion.setRegionName(regionCacheHelper.getUnionPathStr(r.getRegionCode(), r.getRegionLevel())); | |||||
return expertApplyIntentionWorkRegion; | |||||
ExpertRegionInfo intentionWorkRegion = new ExpertRegionInfo(); | |||||
intentionWorkRegion.setRegionLevel(r.getRegionLevel()); | |||||
intentionWorkRegion.setRegionCode(r.getRegionCode()); | |||||
intentionWorkRegion.setRegionName(regionCacheHelper.getUnionPath(r.getRegionCode(), r.getRegionLevel())); | |||||
return intentionWorkRegion; | |||||
}).collect(Collectors.toList()); | }).collect(Collectors.toList()); | ||||
if (CollUtil.isEmpty(basicInfo.getExpertIntentionWorkRegions())) { | if (CollUtil.isEmpty(basicInfo.getExpertIntentionWorkRegions())) { | ||||
@@ -92,7 +91,7 @@ public class ExpertUserInfoAssembler { | |||||
resExpertFullInfo.setBasicInfo(basicInfo); | resExpertFullInfo.setBasicInfo(basicInfo); | ||||
resExpertFullInfo.setEduInfo(eduInfo); | resExpertFullInfo.setEduInfo(eduInfo); | ||||
resExpertFullInfo.setJobInfo(jobInfo); | resExpertFullInfo.setJobInfo(jobInfo); | ||||
resExpertFullInfo.setProfessionalInfo(professionalInfo); | |||||
resExpertFullInfo.setProfessionalInfo(profession); | |||||
resExpertFullInfo.setRecommendInfo(recommendInfo); | resExpertFullInfo.setRecommendInfo(recommendInfo); | ||||
resExpertFullInfo.setExpertOtherInfo(otherInfo); | resExpertFullInfo.setExpertOtherInfo(otherInfo); | ||||
resExpertFullInfo.setExpertApplyIntentionWorkRegions(applyIntentionWorkRegions); | resExpertFullInfo.setExpertApplyIntentionWorkRegions(applyIntentionWorkRegions); | ||||
@@ -237,14 +236,14 @@ public class ExpertUserInfoAssembler { | |||||
basicInfo.setHometown(expertUserInfoDTO.getHometown()); | basicInfo.setHometown(expertUserInfoDTO.getHometown()); | ||||
basicInfo.setNationality(expertUserInfoDTO.getNationality()); | basicInfo.setNationality(expertUserInfoDTO.getNationality()); | ||||
basicInfo.setExpertSource(tagFieldInfoMap.get(ExpertTagEnum.EXPERT_SOURCE.getKey())); | basicInfo.setExpertSource(tagFieldInfoMap.get(ExpertTagEnum.EXPERT_SOURCE.getKey())); | ||||
expertRegionInfo.setRegionName(regionCacheHelper.getUnionPathStr(expertRegionInfo.getRegionCode(), expertRegionInfo.getRegionLevel())); | |||||
expertRegionInfo.setRegionName(regionCacheHelper.getUnionPath(expertRegionInfo.getRegionCode(), expertRegionInfo.getRegionLevel())); | |||||
basicInfo.setExpertRegionInfo(expertRegionInfo); | basicInfo.setExpertRegionInfo(expertRegionInfo); | ||||
basicInfo.setExpertIntentionWorkRegions(expertIntentionWorkRegionInfo.stream().map(r -> { | basicInfo.setExpertIntentionWorkRegions(expertIntentionWorkRegionInfo.stream().map(r -> { | ||||
ExpertRegionInfo expertIntentionWorkRegion = new ExpertRegionInfo(); | ExpertRegionInfo expertIntentionWorkRegion = new ExpertRegionInfo(); | ||||
expertIntentionWorkRegion.setRegionCode(r.getRegionCode()); | expertIntentionWorkRegion.setRegionCode(r.getRegionCode()); | ||||
expertIntentionWorkRegion.setRegionLevel(r.getRegionLevel()); | expertIntentionWorkRegion.setRegionLevel(r.getRegionLevel()); | ||||
expertIntentionWorkRegion.setRegionName(regionCacheHelper.getUnionPathStr(r.getRegionCode(), r.getRegionLevel())); | |||||
expertIntentionWorkRegion.setRegionName(regionCacheHelper.getUnionPath(r.getRegionCode(), r.getRegionLevel())); | |||||
return expertIntentionWorkRegion; | return expertIntentionWorkRegion; | ||||
}).collect(Collectors.toList())); | }).collect(Collectors.toList())); | ||||
basicInfo.setExpertType(dictionaryFieldInfoMap.get(DictExpertInfoTypeEnum.EXPERT_TYPE.getKey())); | basicInfo.setExpertType(dictionaryFieldInfoMap.get(DictExpertInfoTypeEnum.EXPERT_TYPE.getKey())); | ||||
@@ -256,7 +255,8 @@ public class ExpertUserInfoAssembler { | |||||
List<ExpertDictionary> expertDictionaryList, | List<ExpertDictionary> expertDictionaryList, | ||||
List<ExpertIntentionWorkRegion> intentionWorkRegionList, | List<ExpertIntentionWorkRegion> intentionWorkRegionList, | ||||
List<ExpertMetaApply> expertMetaApplyList, | List<ExpertMetaApply> expertMetaApplyList, | ||||
List<ExpertAvoidCompany> expertAvoidCompanyList) { | |||||
List<ExpertAvoidCompany> expertAvoidCompanyList, | |||||
List<ExpertGovBusinessStrip> businessStrips) { | |||||
ExpertUserFullInfoDTO expertFullInfoDto = buildExpertUserFullInfoDTO(expertUserFullInfo); | ExpertUserFullInfoDTO expertFullInfoDto = buildExpertUserFullInfoDTO(expertUserFullInfo); | ||||
List<ExpertDictionaryDTO> expertDicts = buildExpertDictionaryDTOList(expertDictionaryList); | List<ExpertDictionaryDTO> expertDicts = buildExpertDictionaryDTOList(expertDictionaryList); | ||||
List<ExpertTagDTO> expertTags = buildExpertTagDTOList(expertTagList); | List<ExpertTagDTO> expertTags = buildExpertTagDTOList(expertTagList); | ||||
@@ -273,6 +273,7 @@ public class ExpertUserInfoAssembler { | |||||
expertFullInfoAll.setExpertIntentionWorkRegionInfo(intentionWorkRegions); | expertFullInfoAll.setExpertIntentionWorkRegionInfo(intentionWorkRegions); | ||||
expertFullInfoAll.setExpertApplyIntentionWorkRegionInfo(applyIntentionWorkRegions); | expertFullInfoAll.setExpertApplyIntentionWorkRegionInfo(applyIntentionWorkRegions); | ||||
expertFullInfoAll.setExpertAvoidCompanyList(expertAvoidCompanyDTOList); | expertFullInfoAll.setExpertAvoidCompanyList(expertAvoidCompanyDTOList); | ||||
expertFullInfoAll.setBusinessStrips(BeanUtil.copyToList(businessStrips, GovBusinessStripVO.class)); | |||||
return expertFullInfoAll; | return expertFullInfoAll; | ||||
} | } | ||||
@@ -1,10 +1,13 @@ | |||||
package com.ningdatech.pmapi.expert.entity; | package com.ningdatech.pmapi.expert.entity; | ||||
import com.baomidou.mybatisplus.annotation.FieldFill; | |||||
import com.baomidou.mybatisplus.annotation.TableField; | |||||
import com.baomidou.mybatisplus.annotation.TableName; | import com.baomidou.mybatisplus.annotation.TableName; | ||||
import io.swagger.annotations.ApiModel; | import io.swagger.annotations.ApiModel; | ||||
import lombok.Data; | import lombok.Data; | ||||
import java.io.Serializable; | import java.io.Serializable; | ||||
import java.time.LocalDateTime; | |||||
/** | /** | ||||
* <p> | * <p> | ||||
@@ -14,9 +17,9 @@ import java.io.Serializable; | |||||
* @author Liuxinxin | * @author Liuxinxin | ||||
* @since 2023-04-17 | * @since 2023-04-17 | ||||
*/ | */ | ||||
@TableName("expert_gov_business_strip") | |||||
@Data | @Data | ||||
@ApiModel(value = "ExpertGovBusinessStrip对象", description = "") | |||||
@TableName("expert_gov_business_strip") | |||||
@ApiModel(value = "ExpertGovBusinessStrip对象") | |||||
public class ExpertGovBusinessStrip implements Serializable { | public class ExpertGovBusinessStrip implements Serializable { | ||||
private static final long serialVersionUID = 1L; | private static final long serialVersionUID = 1L; | ||||
@@ -28,4 +31,11 @@ public class ExpertGovBusinessStrip implements Serializable { | |||||
private String businessStripName; | private String businessStripName; | ||||
private Long expertUserId; | private Long expertUserId; | ||||
@TableField(fill = FieldFill.INSERT) | |||||
private LocalDateTime createOn; | |||||
@TableField(fill = FieldFill.INSERT) | |||||
private Long createBy; | |||||
} | } |
@@ -135,7 +135,7 @@ public class ExpertManage { | |||||
} | } | ||||
List<Long> fileIdList = expertInfoCommonHelper.getExpertFileIdList(expertUserFullInfoAll); | List<Long> fileIdList = expertInfoCommonHelper.getExpertFileIdList(expertUserFullInfoAll); | ||||
List<AttachFileVo> attachFiles = fileService.getByIds(fileIdList); | List<AttachFileVo> attachFiles = fileService.getByIds(fileIdList); | ||||
return expertUserInfoAssembler.buildExpertFullInfoVO(attachFiles, expertUserFullInfoAll); | |||||
return expertUserInfoAssembler.buildExpertFullInfo(attachFiles, expertUserFullInfoAll); | |||||
} | } | ||||
@Transactional(rollbackFor = Exception.class) | @Transactional(rollbackFor = Exception.class) | ||||
@@ -1,5 +1,6 @@ | |||||
package com.ningdatech.pmapi.expert.model; | package com.ningdatech.pmapi.expert.model; | ||||
import com.ningdatech.pmapi.gov.model.vo.GovBusinessStripVO; | |||||
import io.swagger.annotations.ApiModel; | import io.swagger.annotations.ApiModel; | ||||
import io.swagger.annotations.ApiModelProperty; | import io.swagger.annotations.ApiModelProperty; | ||||
import lombok.Data; | import lombok.Data; | ||||
@@ -88,4 +89,8 @@ public class ExpertJobInfo { | |||||
@NotBlank | @NotBlank | ||||
@ApiModelProperty("工作经历") | @ApiModelProperty("工作经历") | ||||
private String experience; | private String experience; | ||||
@ApiModelProperty("专家条线") | |||||
private List<GovBusinessStripVO> businessStrips; | |||||
} | } |
@@ -3,6 +3,7 @@ package com.ningdatech.pmapi.expert.model.cmd; | |||||
import com.ningdatech.pmapi.expert.model.bo.ExpertInfoSensitiveFieldCheckBO; | import com.ningdatech.pmapi.expert.model.bo.ExpertInfoSensitiveFieldCheckBO; | ||||
import com.ningdatech.pmapi.expert.model.dto.*; | import com.ningdatech.pmapi.expert.model.dto.*; | ||||
import com.ningdatech.pmapi.gov.model.vo.GovBusinessStripVO; | |||||
import lombok.Data; | import lombok.Data; | ||||
import java.util.List; | import java.util.List; | ||||
@@ -35,4 +36,6 @@ public class ExpertInfoModifyCmd { | |||||
private ExpertInfoSensitiveFieldCheckBO expertInfoSensitiveFieldCheckBO; | private ExpertInfoSensitiveFieldCheckBO expertInfoSensitiveFieldCheckBO; | ||||
private ModifyApplyExtraInfoDTO modifyApplyExtraInfo; | private ModifyApplyExtraInfoDTO modifyApplyExtraInfo; | ||||
private List<GovBusinessStripVO> businessStrips; | |||||
} | } |
@@ -1,5 +1,6 @@ | |||||
package com.ningdatech.pmapi.expert.model.dto; | package com.ningdatech.pmapi.expert.model.dto; | ||||
import com.ningdatech.pmapi.gov.model.vo.GovBusinessStripVO; | |||||
import lombok.Data; | import lombok.Data; | ||||
import java.util.List; | import java.util.List; | ||||
@@ -35,5 +36,7 @@ public class ExpertFullInfoAllDTO { | |||||
*/ | */ | ||||
private List<ExpertAvoidCompanyDTO> expertAvoidCompanyList; | private List<ExpertAvoidCompanyDTO> expertAvoidCompanyList; | ||||
private List<GovBusinessStripVO> businessStrips; | |||||
} | } |
@@ -1,11 +1,16 @@ | |||||
package com.ningdatech.pmapi.expert.service; | package com.ningdatech.pmapi.expert.service; | ||||
import com.ningdatech.pmapi.expert.entity.ExpertGovBusinessStrip; | |||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | |||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers; | |||||
import com.baomidou.mybatisplus.extension.service.IService; | import com.baomidou.mybatisplus.extension.service.IService; | ||||
import com.ningdatech.pmapi.expert.entity.ExpertGovBusinessStrip; | |||||
import java.util.Collection; | |||||
import java.util.List; | |||||
/** | /** | ||||
* <p> | * <p> | ||||
* 服务类 | |||||
* 服务类 | |||||
* </p> | * </p> | ||||
* | * | ||||
* @author Liuxinxin | * @author Liuxinxin | ||||
@@ -13,4 +18,17 @@ import com.baomidou.mybatisplus.extension.service.IService; | |||||
*/ | */ | ||||
public interface IExpertGovBusinessStripService extends IService<ExpertGovBusinessStrip> { | public interface IExpertGovBusinessStripService extends IService<ExpertGovBusinessStrip> { | ||||
default List<ExpertGovBusinessStrip> listByUserIds(Collection<Long> userIds) { | |||||
LambdaQueryWrapper<ExpertGovBusinessStrip> query = Wrappers | |||||
.lambdaQuery(ExpertGovBusinessStrip.class) | |||||
.in(ExpertGovBusinessStrip::getExpertUserId, userIds); | |||||
return list(query); | |||||
} | |||||
default boolean removeByUserId(Long userId) { | |||||
LambdaQueryWrapper<ExpertGovBusinessStrip> query = Wrappers.lambdaQuery(ExpertGovBusinessStrip.class) | |||||
.eq(ExpertGovBusinessStrip::getExpertUserId, userId); | |||||
return remove(query); | |||||
} | |||||
} | } |
@@ -1,5 +1,6 @@ | |||||
package com.ningdatech.pmapi.expert.service.impl; | package com.ningdatech.pmapi.expert.service.impl; | ||||
import cn.hutool.core.bean.BeanUtil; | |||||
import cn.hutool.core.collection.CollUtil; | import cn.hutool.core.collection.CollUtil; | ||||
import cn.hutool.core.util.PhoneUtil; | import cn.hutool.core.util.PhoneUtil; | ||||
import com.alibaba.fastjson.JSONObject; | import com.alibaba.fastjson.JSONObject; | ||||
@@ -76,6 +77,7 @@ public class ExpertInfoServiceImpl implements ExpertInfoService { | |||||
private final IExpertSensitiveInfoModifyDetailRecordService iExpertSensitiveInfoModifyDetailRecordService; | private final IExpertSensitiveInfoModifyDetailRecordService iExpertSensitiveInfoModifyDetailRecordService; | ||||
private final IUserInfoService userInfoService; | private final IUserInfoService userInfoService; | ||||
private final YxtCallOrSmsHelper yxtCallOrSmsHelper; | private final YxtCallOrSmsHelper yxtCallOrSmsHelper; | ||||
private final IExpertGovBusinessStripService expertGovBusinessStripService; | |||||
@Value("${login.url:}") | @Value("${login.url:}") | ||||
private String loginUrl; | private String loginUrl; | ||||
@@ -319,8 +321,10 @@ public class ExpertInfoServiceImpl implements ExpertInfoService { | |||||
List<ExpertAvoidCompany> expertAvoidCompanyList = iExpertAvoidCompanyService | List<ExpertAvoidCompany> expertAvoidCompanyList = iExpertAvoidCompanyService | ||||
.list(Wrappers.lambdaQuery(ExpertAvoidCompany.class).eq(ExpertAvoidCompany::getUserId, userId)); | .list(Wrappers.lambdaQuery(ExpertAvoidCompany.class).eq(ExpertAvoidCompany::getUserId, userId)); | ||||
List<ExpertGovBusinessStrip> businessStrips = expertGovBusinessStripService.listByUserIds(Collections.singletonList(userId)); | |||||
return ExpertUserInfoAssembler.buildExpertFullInfoAllDTO(expertUserFullInfo, expertTagList, expertDictionaryList | return ExpertUserInfoAssembler.buildExpertFullInfoAllDTO(expertUserFullInfo, expertTagList, expertDictionaryList | ||||
, expertIntentionWorkRegionList, expertMetaApplyList, expertAvoidCompanyList); | |||||
, expertIntentionWorkRegionList, expertMetaApplyList, expertAvoidCompanyList, businessStrips); | |||||
} | } | ||||
@@ -454,6 +458,8 @@ public class ExpertInfoServiceImpl implements ExpertInfoService { | |||||
List<ExpertTag> expertTagList = iExpertTagService.list(Wrappers.lambdaQuery(ExpertTag.class) | List<ExpertTag> expertTagList = iExpertTagService.list(Wrappers.lambdaQuery(ExpertTag.class) | ||||
.in(ExpertTag::getUserId, userIds)); | .in(ExpertTag::getUserId, userIds)); | ||||
Map<Long, List<ExpertTag>> expertTagListMap = CollUtils.group(expertTagList, ExpertTag::getUserId); | Map<Long, List<ExpertTag>> expertTagListMap = CollUtils.group(expertTagList, ExpertTag::getUserId); | ||||
List<ExpertGovBusinessStrip> businessStrips = expertGovBusinessStripService.listByUserIds(userIds); | |||||
Map<Long, List<ExpertGovBusinessStrip>> stripMap = CollUtils.group(businessStrips, ExpertGovBusinessStrip::getExpertUserId); | |||||
// 所有专家字典字段 | // 所有专家字典字段 | ||||
List<ExpertDictionary> expertDictionaryList = iExpertDictionaryService.list(Wrappers.lambdaQuery(ExpertDictionary.class) | List<ExpertDictionary> expertDictionaryList = iExpertDictionaryService.list(Wrappers.lambdaQuery(ExpertDictionary.class) | ||||
.in(ExpertDictionary::getUserId, userIds)); | .in(ExpertDictionary::getUserId, userIds)); | ||||
@@ -478,7 +484,8 @@ public class ExpertInfoServiceImpl implements ExpertInfoService { | |||||
expertDictMap.getOrDefault(w.getUserId(), Collections.emptyList()), | expertDictMap.getOrDefault(w.getUserId(), Collections.emptyList()), | ||||
intentionRegionMap.getOrDefault(w.getUserId(), Collections.emptyList()), | intentionRegionMap.getOrDefault(w.getUserId(), Collections.emptyList()), | ||||
metaApplyMap.getOrDefault(w.getUserId(), Collections.emptyList()), | metaApplyMap.getOrDefault(w.getUserId(), Collections.emptyList()), | ||||
avoidInfoMap.getOrDefault(w.getUserId(), Collections.emptyList()))) | |||||
avoidInfoMap.getOrDefault(w.getUserId(), Collections.emptyList()), | |||||
stripMap.getOrDefault(w.getUserId(), Collections.emptyList()))) | |||||
.collect(Collectors.toList()); | .collect(Collectors.toList()); | ||||
} | } | ||||
@@ -551,6 +558,16 @@ public class ExpertInfoServiceImpl implements ExpertInfoService { | |||||
// 重新保存 | // 重新保存 | ||||
iExpertAvoidCompanyService.saveBatch(saveExpertAvoidCompanyList); | iExpertAvoidCompanyService.saveBatch(saveExpertAvoidCompanyList); | ||||
} | } | ||||
// 保存专家条线 | |||||
expertGovBusinessStripService.removeByUserId(userId); | |||||
if (CollUtil.isNotEmpty(cmd.getBusinessStrips())) { | |||||
List<ExpertGovBusinessStrip> strips = CollUtils.convert(cmd.getBusinessStrips(), w -> { | |||||
ExpertGovBusinessStrip strip = BeanUtil.copyProperties(w, ExpertGovBusinessStrip.class); | |||||
strip.setExpertUserId(userId); | |||||
return strip; | |||||
}); | |||||
expertGovBusinessStripService.saveBatch(strips); | |||||
} | |||||
// 敏感字段申请 | // 敏感字段申请 | ||||
ExpertInfoSensitiveFieldCheckBO expertInfoSensitiveFieldCheckBO = cmd.getExpertInfoSensitiveFieldCheckBO(); | ExpertInfoSensitiveFieldCheckBO expertInfoSensitiveFieldCheckBO = cmd.getExpertInfoSensitiveFieldCheckBO(); | ||||
ModifyApplyExtraInfoDTO modifyApplyExtraInfo = cmd.getModifyApplyExtraInfo(); | ModifyApplyExtraInfoDTO modifyApplyExtraInfo = cmd.getModifyApplyExtraInfo(); | ||||
@@ -0,0 +1,48 @@ | |||||
package com.ningdatech.pmapi.gov.controller; | |||||
import com.ningdatech.pmapi.gov.manage.BelongOrgManage; | |||||
import com.ningdatech.pmapi.gov.model.vo.GovBusinessStripVO; | |||||
import io.swagger.annotations.Api; | |||||
import io.swagger.annotations.ApiOperation; | |||||
import lombok.RequiredArgsConstructor; | |||||
import lombok.extern.slf4j.Slf4j; | |||||
import org.springframework.validation.annotation.Validated; | |||||
import org.springframework.web.bind.annotation.GetMapping; | |||||
import org.springframework.web.bind.annotation.RequestMapping; | |||||
import org.springframework.web.bind.annotation.RequestParam; | |||||
import org.springframework.web.bind.annotation.RestController; | |||||
import java.util.List; | |||||
/** | |||||
* <p> | |||||
* 前端控制器 | |||||
* </p> | |||||
* | |||||
* @author liuxinxin | |||||
* @since 2023-04-18 | |||||
*/ | |||||
@Slf4j | |||||
@Validated | |||||
@RestController | |||||
@RequiredArgsConstructor | |||||
@Api(value = "BelongOrgController", tags = "单位所属条线") | |||||
@RequestMapping("/api/v1/belong-org") | |||||
public class BelongOrgController { | |||||
private final BelongOrgManage belongOrgManage; | |||||
@GetMapping("/business-strip/list") | |||||
@ApiOperation("获取条线列表") | |||||
public List<GovBusinessStripVO> getGovBusinessStripList(@RequestParam(value = "businessStripName", required = false) String businessStripName) { | |||||
return belongOrgManage.getGovBusinessStripList(businessStripName); | |||||
} | |||||
@GetMapping("/business-strip/expert/analysis") | |||||
@ApiOperation("分析专家数据") | |||||
public void analysisExpertOrg() { | |||||
belongOrgManage.analysisExpertOrg(); | |||||
} | |||||
} |
@@ -0,0 +1,44 @@ | |||||
package com.ningdatech.pmapi.gov.entity; | |||||
import com.baomidou.mybatisplus.annotation.IdType; | |||||
import com.baomidou.mybatisplus.annotation.TableId; | |||||
import com.baomidou.mybatisplus.annotation.TableName; | |||||
import io.swagger.annotations.ApiModel; | |||||
import io.swagger.annotations.ApiModelProperty; | |||||
import lombok.Data; | |||||
import java.io.Serializable; | |||||
/** | |||||
* <p> | |||||
* | |||||
* </p> | |||||
* | |||||
* @author liuxinxin | |||||
* @since 2023-04-18 | |||||
*/ | |||||
@Data | |||||
@TableName("belong_org") | |||||
@ApiModel(value = "BelongOrg对象") | |||||
public class BelongOrg implements Serializable { | |||||
private static final long serialVersionUID = 1L; | |||||
@TableId(type = IdType.AUTO) | |||||
private Long id; | |||||
@ApiModelProperty("组织code") | |||||
private String orgCode; | |||||
@ApiModelProperty("组织名称") | |||||
private String orgName; | |||||
@ApiModelProperty("所属组织code") | |||||
private String belongCode; | |||||
@ApiModelProperty("所属组织名称") | |||||
private String belongName; | |||||
@ApiModelProperty("组织类型") | |||||
private String orgType; | |||||
} |
@@ -0,0 +1,78 @@ | |||||
package com.ningdatech.pmapi.gov.entity; | |||||
import com.baomidou.mybatisplus.annotation.TableName; | |||||
import io.swagger.annotations.ApiModel; | |||||
import java.io.Serializable; | |||||
/** | |||||
* <p> | |||||
* | |||||
* </p> | |||||
* | |||||
* @author liuxinxin | |||||
* @since 2023-04-13 | |||||
*/ | |||||
@TableName("gov_business_strip") | |||||
@ApiModel(value = "GovBusinessStrip对象", description = "") | |||||
public class GovBusinessStrip implements Serializable { | |||||
private static final long serialVersionUID = 1L; | |||||
private Long id; | |||||
private String businessStripCode; | |||||
private String businessStripName; | |||||
private String parentCode; | |||||
private String parentName; | |||||
public Long getId() { | |||||
return id; | |||||
} | |||||
public void setId(Long id) { | |||||
this.id = id; | |||||
} | |||||
public String getBusinessStripCode() { | |||||
return businessStripCode; | |||||
} | |||||
public void setBusinessStripCode(String businessStripCode) { | |||||
this.businessStripCode = businessStripCode; | |||||
} | |||||
public String getBusinessStripName() { | |||||
return businessStripName; | |||||
} | |||||
public void setBusinessStripName(String businessStripName) { | |||||
this.businessStripName = businessStripName; | |||||
} | |||||
public String getParentCode() { | |||||
return parentCode; | |||||
} | |||||
public void setParentCode(String parentCode) { | |||||
this.parentCode = parentCode; | |||||
} | |||||
public String getParentName() { | |||||
return parentName; | |||||
} | |||||
public void setParentName(String parentName) { | |||||
this.parentName = parentName; | |||||
} | |||||
@Override | |||||
public String toString() { | |||||
return "GovBusinessStrip{" + | |||||
"id=" + id + | |||||
", businessStripCode=" + businessStripCode + | |||||
", businessStripName=" + businessStripName + | |||||
", parentCode=" + parentCode + | |||||
", parentName=" + parentName + | |||||
"}"; | |||||
} | |||||
} |
@@ -0,0 +1,20 @@ | |||||
package com.ningdatech.pmapi.gov.enumeration; | |||||
/** | |||||
* @author liuxinxin | |||||
* @date 2023/4/18 下午2:48 | |||||
*/ | |||||
public enum BelongTypeEnum { | |||||
/** | |||||
* 组织 | |||||
*/ | |||||
ORGANIZATION, | |||||
/** | |||||
* 条线 | |||||
*/ | |||||
GOV_BUSINESS_STRIP | |||||
} |
@@ -0,0 +1,44 @@ | |||||
package com.ningdatech.pmapi.gov.helper; | |||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers; | |||||
import com.ningdatech.pmapi.expert.entity.ExpertGovBusinessStrip; | |||||
import com.ningdatech.pmapi.gov.entity.BelongOrg; | |||||
import com.ningdatech.pmapi.gov.service.IBelongOrgService; | |||||
import lombok.RequiredArgsConstructor; | |||||
import org.apache.commons.collections4.CollectionUtils; | |||||
import org.springframework.stereotype.Component; | |||||
import java.util.ArrayList; | |||||
import java.util.List; | |||||
import java.util.Map; | |||||
import java.util.stream.Collectors; | |||||
/** | |||||
* @author liuxinxin | |||||
* @date 2023/4/21 下午2:07 | |||||
*/ | |||||
@Component | |||||
@RequiredArgsConstructor | |||||
public class GovBusinessStripHelper { | |||||
private final IBelongOrgService iBelongOrgService; | |||||
public List<ExpertGovBusinessStrip> assemblerBusinessStripInfoList(List<String> businessStripCodeList) { | |||||
List<ExpertGovBusinessStrip> businessStripInfoList = new ArrayList<>(); | |||||
if (CollectionUtils.isNotEmpty(businessStripCodeList)) { | |||||
Map<String, String> codeNameMap = iBelongOrgService.list(Wrappers | |||||
.lambdaQuery(BelongOrg.class).in(BelongOrg::getOrgCode, businessStripCodeList)) | |||||
.stream().collect(Collectors.toMap(BelongOrg::getOrgCode, BelongOrg::getOrgName)); | |||||
businessStripCodeList.forEach(r -> { | |||||
ExpertGovBusinessStrip businessStripInfo = new ExpertGovBusinessStrip(); | |||||
businessStripInfo.setBusinessStripCode(r); | |||||
businessStripInfo.setBusinessStripName(codeNameMap.get(r)); | |||||
businessStripInfoList.add(businessStripInfo); | |||||
}); | |||||
} | |||||
return businessStripInfoList; | |||||
} | |||||
} |
@@ -0,0 +1,219 @@ | |||||
package com.ningdatech.pmapi.gov.manage; | |||||
import cn.hutool.core.util.StrUtil; | |||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | |||||
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; | |||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers; | |||||
import com.google.common.collect.Lists; | |||||
import com.ningdatech.pmapi.expert.entity.ExpertGovBusinessStrip; | |||||
import com.ningdatech.pmapi.expert.entity.ExpertUserFullInfo; | |||||
import com.ningdatech.pmapi.expert.service.IExpertGovBusinessStripService; | |||||
import com.ningdatech.pmapi.expert.service.IExpertUserFullInfoService; | |||||
import com.ningdatech.pmapi.gov.entity.BelongOrg; | |||||
import com.ningdatech.pmapi.gov.enumeration.BelongTypeEnum; | |||||
import com.ningdatech.pmapi.gov.model.vo.GovBusinessStripVO; | |||||
import com.ningdatech.pmapi.gov.service.IBelongOrgService; | |||||
import com.ningdatech.pmapi.organization.model.entity.DingOrganization; | |||||
import com.ningdatech.pmapi.organization.service.IDingOrganizationService; | |||||
import lombok.RequiredArgsConstructor; | |||||
import org.apache.commons.lang3.StringUtils; | |||||
import org.apache.poi.xssf.usermodel.XSSFCell; | |||||
import org.apache.poi.xssf.usermodel.XSSFRow; | |||||
import org.apache.poi.xssf.usermodel.XSSFSheet; | |||||
import org.apache.poi.xssf.usermodel.XSSFWorkbook; | |||||
import org.springframework.stereotype.Component; | |||||
import org.springframework.transaction.annotation.Transactional; | |||||
import java.io.FileInputStream; | |||||
import java.io.IOException; | |||||
import java.nio.file.Files; | |||||
import java.nio.file.Paths; | |||||
import java.util.*; | |||||
import java.util.stream.Collectors; | |||||
/** | |||||
* @author liuxinxin | |||||
* @date 2023/4/18 下午2:27 | |||||
*/ | |||||
@Component | |||||
@RequiredArgsConstructor | |||||
public class BelongOrgManage { | |||||
private final IBelongOrgService iBelongOrgService; | |||||
private final IExpertUserFullInfoService expertUserFullInfoService; | |||||
private final IDingOrganizationService dingOrganizationService; | |||||
private final IExpertGovBusinessStripService expertGovBusinessStripService; | |||||
public void generateBusinessStripOrg() { | |||||
// 条线Set | |||||
Set<String> businessStripSet = new HashSet<>(); | |||||
// 组织 Set | |||||
Set<String> orgSet = new HashSet<>(); | |||||
try { | |||||
//创建工作簿对象 | |||||
XSSFWorkbook xssfWorkbook = new XSSFWorkbook(Files.newInputStream(Paths.get("/Users/liuxinxin/Desktop/gov_business_strip_inport.xlsx"))); | |||||
//获取工作簿下sheet的个数 | |||||
int sheetNum = xssfWorkbook.getNumberOfSheets(); | |||||
System.out.println("该excel文件中总共有:" + sheetNum + "个sheet"); | |||||
//遍历工作簿中的所有数据 | |||||
for (int i = 0; i < sheetNum; i++) { | |||||
//读取第i个工作表 | |||||
System.out.println("读取第" + (i + 1) + "个sheet"); | |||||
XSSFSheet sheet = xssfWorkbook.getSheetAt(i); | |||||
//获取最后一行的num,即总行数。此处从0开始 | |||||
int maxRow = sheet.getLastRowNum(); | |||||
// 条线code | |||||
// 条线名称 | |||||
String businessStripOrgCode = sheet.getRow(1).getCell(0) + ""; | |||||
String businessStripOrgName = sheet.getRow(1).getCell(1) + ""; | |||||
String uniqKey = businessStripOrgCode + "####" + businessStripOrgName; | |||||
businessStripSet.add(uniqKey); | |||||
for (int row = 1; row <= maxRow; row++) { | |||||
//获取最后单元格num,即总单元格数 ***注意:此处从1开始计数*** | |||||
String cell2 = getCellStr(sheet, row, 2); | |||||
String cell3 = getCellStr(sheet, row, 3); | |||||
if (StringUtils.isNotBlank(cell2) && StringUtils.isNotBlank(cell3)) { | |||||
String orgUniqKey = uniqKey + "&&&" + cell2 + "####" + cell3; | |||||
orgSet.add(orgUniqKey); | |||||
} | |||||
String cell4 = getCellStr(sheet, row, 4); | |||||
String cell5 = getCellStr(sheet, row, 5); | |||||
if (StringUtils.isNotBlank(cell4) && StringUtils.isNotBlank(cell5)) { | |||||
String orgUniqKey = uniqKey + "&&&" + cell4 + "####" + cell5; | |||||
orgSet.add(orgUniqKey); | |||||
} | |||||
} | |||||
} | |||||
} catch (IOException e) { | |||||
e.printStackTrace(); | |||||
} | |||||
List<BelongOrg> orgList = orgSet.stream().map(BelongOrgManage::buildBelongOrg).collect(Collectors.toList()); | |||||
List<BelongOrg> belongOrgList = businessStripSet.stream().map(BelongOrgManage::buildBusinessStrip).collect(Collectors.toList()); | |||||
iBelongOrgService.saveBatch(orgList); | |||||
iBelongOrgService.saveBatch(belongOrgList); | |||||
} | |||||
public static BelongOrg buildBusinessStrip(String businessStripStr) { | |||||
String[] split = businessStripStr.split("&&&"); | |||||
String busStrip = split[0]; | |||||
String[] split1 = busStrip.split("####"); | |||||
String belongOrgCode = split1[0]; | |||||
String belongOrgName = split1[1]; | |||||
BelongOrg belongOrg = new BelongOrg(); | |||||
belongOrg.setOrgCode(belongOrgCode); | |||||
belongOrg.setOrgName(belongOrgName); | |||||
belongOrg.setBelongCode(belongOrgCode); | |||||
belongOrg.setBelongName(belongOrgName); | |||||
belongOrg.setOrgType(BelongTypeEnum.GOV_BUSINESS_STRIP.name()); | |||||
return belongOrg; | |||||
} | |||||
public static BelongOrg buildBelongOrg(String orgStr) { | |||||
String[] split = orgStr.split("&&&"); | |||||
String busStrip = split[0]; | |||||
String[] split1 = busStrip.split("####"); | |||||
String belongOrgCode = split1[0]; | |||||
String belongOrgName = split1[1]; | |||||
String org = split[1]; | |||||
String[] split2 = org.split("####"); | |||||
String orgCode = split2[0]; | |||||
String orgName = split2[1]; | |||||
BelongOrg belongOrg = new BelongOrg(); | |||||
belongOrg.setOrgCode(orgCode); | |||||
belongOrg.setOrgName(orgName); | |||||
belongOrg.setBelongCode(belongOrgCode); | |||||
belongOrg.setBelongName(belongOrgName); | |||||
belongOrg.setOrgType(BelongTypeEnum.ORGANIZATION.name()); | |||||
return belongOrg; | |||||
} | |||||
public static String getCellStr(XSSFSheet sheet, int row, int col) { | |||||
if (Objects.isNull(sheet)) { | |||||
return null; | |||||
} | |||||
XSSFRow row1 = sheet.getRow(row); | |||||
if (Objects.isNull(row1)) { | |||||
return null; | |||||
} | |||||
XSSFCell cell = row1.getCell(col); | |||||
if (Objects.isNull(cell)) { | |||||
return null; | |||||
} | |||||
return cell + "".trim(); | |||||
} | |||||
public List<GovBusinessStripVO> getGovBusinessStripList(String businessStripName) { | |||||
LambdaQueryWrapper<BelongOrg> query = Wrappers.lambdaQuery(BelongOrg.class) | |||||
.like(StrUtil.isNotBlank(businessStripName), BelongOrg::getBelongName, businessStripName) | |||||
.eq(BelongOrg::getOrgType, BelongTypeEnum.GOV_BUSINESS_STRIP.name()); | |||||
List<BelongOrg> belongOrgs = iBelongOrgService.list(query); | |||||
return belongOrgs.stream().map(r -> { | |||||
GovBusinessStripVO govBusinessStripVO = new GovBusinessStripVO(); | |||||
govBusinessStripVO.setBusinessStripCode(r.getOrgCode()); | |||||
govBusinessStripVO.setBusinessStripName(r.getOrgName()); | |||||
return govBusinessStripVO; | |||||
}).collect(Collectors.toList()); | |||||
} | |||||
@Transactional(rollbackFor = Exception.class) | |||||
public void analysisExpertOrg() { | |||||
List<ExpertUserFullInfo> expertUserFullInfoList = expertUserFullInfoService.list(); | |||||
for (ExpertUserFullInfo userFullInfo : expertUserFullInfoList) { | |||||
String company = userFullInfo.getCompany(); | |||||
if (StringUtils.isNotBlank(company)) { | |||||
// 获取专家信息 | |||||
List<DingOrganization> dingOrganizationList = dingOrganizationService | |||||
.list(Wrappers.lambdaQuery(DingOrganization.class) | |||||
.eq(DingOrganization::getOrganizationName, company.trim())); | |||||
if (CollectionUtils.isNotEmpty(dingOrganizationList)) { | |||||
// 获取专家组织code | |||||
DingOrganization dingOrganization = dingOrganizationList.get(0); | |||||
String organizationCode = dingOrganization.getOrganizationCode(); | |||||
List<BelongOrg> belongOrgList = iBelongOrgService | |||||
.list(Wrappers.lambdaQuery(BelongOrg.class) | |||||
.eq(BelongOrg::getOrgCode, organizationCode.trim())); | |||||
if (CollectionUtils.isNotEmpty(belongOrgList)) { | |||||
// 获取专家条线code | |||||
Set<String> belongOrgSet = new HashSet<>(); | |||||
List<BelongOrg> saveList = new ArrayList<>(); | |||||
for (BelongOrg belongOrg : belongOrgList) { | |||||
if (belongOrgSet.add(belongOrg.getBelongCode())) { | |||||
saveList.add(belongOrg); | |||||
} | |||||
} | |||||
expertGovBusinessStripService.remove(Wrappers.lambdaQuery(ExpertGovBusinessStrip.class) | |||||
.eq(ExpertGovBusinessStrip::getExpertUserId, userFullInfo.getUserId())); | |||||
List<ExpertGovBusinessStrip> expertBusinessStripSaveRecordList = saveList.stream().map(r -> { | |||||
ExpertGovBusinessStrip expertBusinessStrip = new ExpertGovBusinessStrip(); | |||||
expertBusinessStrip.setExpertUserId(userFullInfo.getUserId()); | |||||
expertBusinessStrip.setBusinessStripCode(r.getBelongCode()); | |||||
expertBusinessStrip.setBusinessStripName(r.getBelongName()); | |||||
return expertBusinessStrip; | |||||
}).collect(Collectors.toList()); | |||||
expertGovBusinessStripService.saveBatch(expertBusinessStripSaveRecordList); | |||||
} | |||||
} | |||||
} | |||||
} | |||||
} | |||||
} |
@@ -0,0 +1,16 @@ | |||||
package com.ningdatech.pmapi.gov.mapper; | |||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; | |||||
import com.ningdatech.pmapi.gov.entity.BelongOrg; | |||||
/** | |||||
* <p> | |||||
* Mapper 接口 | |||||
* </p> | |||||
* | |||||
* @author liuxinxin | |||||
* @since 2023-04-18 | |||||
*/ | |||||
public interface BelongOrgMapper extends BaseMapper<BelongOrg> { | |||||
} |
@@ -0,0 +1,21 @@ | |||||
package com.ningdatech.pmapi.gov.model.vo; | |||||
import io.swagger.annotations.ApiModel; | |||||
import io.swagger.annotations.ApiModelProperty; | |||||
import lombok.Data; | |||||
/** | |||||
* @author Liuxinxin | |||||
* @since 2023-03-08 | |||||
*/ | |||||
@Data | |||||
@ApiModel(value = "条线VO") | |||||
public class GovBusinessStripVO { | |||||
@ApiModelProperty("条线code") | |||||
private String businessStripCode; | |||||
@ApiModelProperty("条线名称") | |||||
private String businessStripName; | |||||
} |
@@ -0,0 +1,21 @@ | |||||
package com.ningdatech.pmapi.gov.service; | |||||
import com.baomidou.mybatisplus.extension.service.IService; | |||||
import com.ningdatech.pmapi.gov.entity.BelongOrg; | |||||
import java.util.Collection; | |||||
import java.util.List; | |||||
/** | |||||
* <p> | |||||
* 服务类 | |||||
* </p> | |||||
* | |||||
* @author liuxinxin | |||||
* @since 2023-04-18 | |||||
*/ | |||||
public interface IBelongOrgService extends IService<BelongOrg> { | |||||
List<String> listNameByCodes(Collection<String> stripCodes); | |||||
} |
@@ -0,0 +1,33 @@ | |||||
package com.ningdatech.pmapi.gov.service.impl; | |||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | |||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers; | |||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | |||||
import com.ningdatech.basic.util.CollUtils; | |||||
import com.ningdatech.pmapi.gov.entity.BelongOrg; | |||||
import com.ningdatech.pmapi.gov.mapper.BelongOrgMapper; | |||||
import com.ningdatech.pmapi.gov.service.IBelongOrgService; | |||||
import org.springframework.stereotype.Service; | |||||
import java.util.Collection; | |||||
import java.util.List; | |||||
/** | |||||
* <p> | |||||
* 服务实现类 | |||||
* </p> | |||||
* | |||||
* @author liuxinxin | |||||
* @since 2023-04-18 | |||||
*/ | |||||
@Service | |||||
public class BelongOrgServiceImpl extends ServiceImpl<BelongOrgMapper, BelongOrg> implements IBelongOrgService { | |||||
@Override | |||||
public List<String> listNameByCodes(Collection<String> stripCodes) { | |||||
LambdaQueryWrapper<BelongOrg> query = Wrappers.lambdaQuery(BelongOrg.class) | |||||
.in(BelongOrg::getOrgCode, stripCodes); | |||||
return CollUtils.fieldList(list(query), BelongOrg::getOrgName); | |||||
} | |||||
} |
@@ -0,0 +1,42 @@ | |||||
package com.ningdatech.pmapi.irs.controller; | |||||
import com.ningdatech.zwdd.client.ZwddClient; | |||||
import com.ningdatech.zwdd.model.dto.DingOrgInfoDTO; | |||||
import com.ningdatech.zwdd.model.dto.SubGovBusinessStripsDTO; | |||||
import io.swagger.annotations.Api; | |||||
import io.swagger.annotations.ApiOperation; | |||||
import lombok.RequiredArgsConstructor; | |||||
import lombok.extern.slf4j.Slf4j; | |||||
import org.springframework.validation.annotation.Validated; | |||||
import org.springframework.web.bind.annotation.*; | |||||
import java.util.List; | |||||
/** | |||||
* @Classname OrganizationController | |||||
* @Description | |||||
* @Date 2023/8/16 9:57 | |||||
* @Author PoffyZhang | |||||
*/ | |||||
@Slf4j | |||||
@Validated | |||||
@RestController | |||||
@RequestMapping("/api/v1/irs/org") | |||||
@Api(value = "Organization", tags = "irs-企业信息") | |||||
@RequiredArgsConstructor | |||||
public class OrganizationController { | |||||
private final ZwddClient zwddClient; | |||||
@ApiOperation(value = "获取企业信息", notes = "获取企业信息") | |||||
@GetMapping("/getOrganizationByCode/{code}") | |||||
public DingOrgInfoDTO getOrganizationByCode(@PathVariable String code) { | |||||
return zwddClient.getOrganizationByCode(code).getData(); | |||||
} | |||||
@ApiOperation(value = "获取条线列表", notes = "获取条线列表") | |||||
@GetMapping("/getGovBusinessStripLine/{code}") | |||||
public List<SubGovBusinessStripsDTO> getGovBusinessStripLine(@PathVariable String code) { | |||||
return zwddClient.getGovBusinessStripLine(code).getData(); | |||||
} | |||||
} |
@@ -323,13 +323,13 @@ public class AppIrsManage { | |||||
String baseConstructionType = projectDto.getBaseConstructionType();//"01" | String baseConstructionType = projectDto.getBaseConstructionType();//"01" | ||||
String baseProjType = projectDto.getBaseProjType();//"1" | String baseProjType = projectDto.getBaseProjType();//"1" | ||||
String baseProjContacts = projectDto.getContactName();//"毛以林" | String baseProjContacts = projectDto.getContactName();//"毛以林" | ||||
String isEffective = "1"; | |||||
String isEffective = "02"; // 有效 | |||||
String baseConsDeprtDing = projectDto.getBuildOrgCode();//"GO_9a7dce7fbaf54787998fa004f1b7c0e1"; | String baseConsDeprtDing = projectDto.getBuildOrgCode();//"GO_9a7dce7fbaf54787998fa004f1b7c0e1"; | ||||
String baseProjSetProg = projectDto.getBaseProjSetProg();//"04" | String baseProjSetProg = projectDto.getBaseProjSetProg();//"04" | ||||
String baseProjContactsCall = projectDto.getContactPhone();//"13857049999" | String baseProjContactsCall = projectDto.getContactPhone();//"13857049999" | ||||
String baseProjName = projectDto.getProjectName();//"遂昌县大数据和金融发展中心天工系统" | String baseProjName = projectDto.getProjectName();//"遂昌县大数据和金融发展中心天工系统" | ||||
String baseProjConsClass = projectDto.getBaseProjConsClass();//"C" | String baseProjConsClass = projectDto.getBaseProjConsClass();//"C" | ||||
String areaCode = projectDto.getAreaCode() + "000";//"331123000" | |||||
String areaCode = projectDto.getAreaCode();//"331123000" | |||||
String baseAreaName = projectDto.getArea();//"遂昌县"; | String baseAreaName = projectDto.getArea();//"遂昌县"; | ||||
String baseManDeprtDing = projectDto.getSuperOrgCode();//"GO_9a7dce7fbaf54787998fa004f1b7c0e1"; | String baseManDeprtDing = projectDto.getSuperOrgCode();//"GO_9a7dce7fbaf54787998fa004f1b7c0e1"; | ||||
String baseProvManDeprtDing = projectDto.getHigherSuperOrgCode();//"GO_6c383c049d95461f9a0df780140ceb32"; | String baseProvManDeprtDing = projectDto.getHigherSuperOrgCode();//"GO_6c383c049d95461f9a0df780140ceb32"; | ||||
@@ -0,0 +1,90 @@ | |||||
package com.ningdatech.pmapi.irs.manage; | |||||
import com.alibaba.fastjson.JSONArray; | |||||
import com.alibaba.fastjson.JSONObject; | |||||
import com.ningdatech.irs.service.IRefreshTokenService; | |||||
import com.ningdatech.pmapi.common.util.CryptUtils; | |||||
import com.ningdatech.pmapi.common.util.HttpUtil; | |||||
import lombok.RequiredArgsConstructor; | |||||
import lombok.extern.slf4j.Slf4j; | |||||
import org.apache.commons.lang3.StringUtils; | |||||
import org.springframework.beans.factory.annotation.Value; | |||||
import org.springframework.http.HttpMethod; | |||||
import org.springframework.http.ResponseEntity; | |||||
import org.springframework.http.client.HttpComponentsClientHttpRequestFactory; | |||||
import org.springframework.stereotype.Component; | |||||
import org.springframework.web.client.RestTemplate; | |||||
import javax.annotation.Resource; | |||||
import java.security.NoSuchAlgorithmException; | |||||
import java.util.Objects; | |||||
/** | |||||
* @Classname ProjectIrsManage | |||||
* @Description | |||||
* @Date 2023/8/15 11:43 | |||||
* @Author PoffyZhang | |||||
*/ | |||||
@Component | |||||
@Slf4j | |||||
@RequiredArgsConstructor | |||||
public class ProjectIrsManage { | |||||
@Value("${irs.core-biz.appKey}") | |||||
private String appKey; | |||||
@Value("${irs.core-biz.appSecret}") | |||||
private String appSecret; | |||||
@Value("${irs.core-biz.url}") | |||||
private String coreBizUrl; | |||||
@Value("${irs.core-biz.interfaceName}") | |||||
private String interfaceName; | |||||
@Resource | |||||
private IRefreshTokenService refreshTokenService; | |||||
@Value("${irs.interface-refresh.request-token-url}") | |||||
private String govRequestTokenUrl; | |||||
@Value("${irs.interface-refresh.refresh-token-url}") | |||||
private String govRefreshTokenUrl; | |||||
/** | |||||
* 查询核心业务 | |||||
* | |||||
* @param businessName | |||||
* @return | |||||
* @throws NoSuchAlgorithmException | |||||
*/ | |||||
public JSONObject searchCoreBiz(String businessName,String orgCode,Integer limit,Integer page) { | |||||
long timestamp = System.currentTimeMillis(); | |||||
String secret = refreshTokenService.refreshToken(appKey, appSecret, govRequestTokenUrl, govRefreshTokenUrl, | |||||
interfaceName, HttpMethod.POST.name()); | |||||
String sign = null; | |||||
try{ | |||||
sign = CryptUtils.MD5Encode(appKey + secret + timestamp); | |||||
}catch (Exception e){ | |||||
log.error(e.getMessage()); | |||||
} | |||||
HttpComponentsClientHttpRequestFactory factory = HttpUtil.generateHttpRequestFactory(); | |||||
RestTemplate restTemplate; | |||||
if(Objects.nonNull(factory)){ | |||||
restTemplate = new RestTemplate(factory); | |||||
}else{ | |||||
restTemplate = new RestTemplate(); | |||||
} | |||||
String url = coreBizUrl + "?" + | |||||
"dingCode=" + orgCode + "&matterName=" + (StringUtils.isNotBlank(businessName)?businessName:StringUtils.EMPTY) + "&oid=&useState=1&" + | |||||
"limit=" + (Objects.isNull(limit) ? "10" : limit) + "&page=" + (Objects.isNull(page) ? "1" : page) + | |||||
"&appKey=" + appKey + "&sign=" + sign + "&requestTime=" + timestamp; | |||||
ResponseEntity<JSONObject> forEntity = restTemplate.getForEntity(url, JSONObject.class); | |||||
JSONObject body = forEntity.getBody(); | |||||
log.info("body :{}",body); | |||||
JSONObject datas = body.getJSONObject("datas"); | |||||
if(Objects.nonNull(datas)){ | |||||
return datas; | |||||
} | |||||
return forEntity.getBody(); | |||||
} | |||||
} |
@@ -39,6 +39,9 @@ public class ExpertInviteAvoidRule implements Serializable { | |||||
@ApiModelProperty("回避条线ID") | @ApiModelProperty("回避条线ID") | ||||
private String avoidOrgIds; | private String avoidOrgIds; | ||||
@ApiModelProperty("回避类型") | |||||
private Integer avoidType; | |||||
@ApiModelProperty("每周参与次数") | @ApiModelProperty("每周参与次数") | ||||
private Integer weekInviteCount; | private Integer weekInviteCount; | ||||
@@ -4,7 +4,6 @@ import io.swagger.annotations.ApiModel; | |||||
import io.swagger.annotations.ApiModelProperty; | import io.swagger.annotations.ApiModelProperty; | ||||
import lombok.Data; | import lombok.Data; | ||||
import javax.validation.constraints.NotEmpty; | |||||
import java.util.List; | import java.util.List; | ||||
/** | /** | ||||
@@ -19,19 +18,20 @@ import java.util.List; | |||||
@ApiModel("回避信息") | @ApiModel("回避信息") | ||||
public class AvoidRuleDTO { | public class AvoidRuleDTO { | ||||
@ApiModelProperty("回避类型:1 回避同单位、2 回避同条线、3 不回避") | |||||
private Integer avoidType; | |||||
@ApiModelProperty("回避单位") | @ApiModelProperty("回避单位") | ||||
@NotEmpty(message = "回避单位不能为空", groups = {AbstractInviteRule.RuleSave.class}) | |||||
private List<String> avoidUnitIdList; | private List<String> avoidUnitIdList; | ||||
@ApiModelProperty("回避条线") | @ApiModelProperty("回避条线") | ||||
@NotEmpty(message = "回避条线不能为空", groups = {AbstractInviteRule.RuleSave.class}) | |||||
private List<String> avoidOrgIdList; | private List<String> avoidOrgIdList; | ||||
@ApiModelProperty("每周邀请次数") | @ApiModelProperty("每周邀请次数") | ||||
private Integer weekInviteCount; | private Integer weekInviteCount; | ||||
@ApiModelProperty("回避专家") | @ApiModelProperty("回避专家") | ||||
@NotEmpty(message = "回避专家不能为空", groups = {AbstractInviteRule.RuleSave.class}) | |||||
private List<Long> expertIds; | private List<Long> expertIds; | ||||
} | } |
@@ -0,0 +1,35 @@ | |||||
package com.ningdatech.pmapi.meeting.entity.enumeration; | |||||
import com.ningdatech.basic.exception.BizException; | |||||
import lombok.AllArgsConstructor; | |||||
import lombok.Getter; | |||||
import java.util.Arrays; | |||||
/** | |||||
* <p> | |||||
* AvoidTypeEnum | |||||
* </p> | |||||
* | |||||
* @author WendyYang | |||||
* @since 2023/8/17 | |||||
**/ | |||||
@Getter | |||||
@AllArgsConstructor | |||||
public enum AvoidTypeEnum { | |||||
CURR_UNIT(1, "同单位"), | |||||
CURR_STRIP(2, "同条线"), | |||||
NONE(3, "不回避"); | |||||
private final Integer code; | |||||
private final String remark; | |||||
public static AvoidTypeEnum getByCode(int code) { | |||||
return Arrays.stream(values()) | |||||
.filter(w -> w.getCode().equals(code)) | |||||
.findFirst() | |||||
.orElseThrow(() -> BizException.wrap("回避类型无效")); | |||||
} | |||||
} |
@@ -18,6 +18,9 @@ import java.util.List; | |||||
@ApiModel("回避信息") | @ApiModel("回避信息") | ||||
public class AvoidInfoVO { | public class AvoidInfoVO { | ||||
@ApiModelProperty("回避类型:1 回避同单位、2 回避同条线、3 不回避") | |||||
private Integer avoidType; | |||||
@ApiModelProperty("回避单位") | @ApiModelProperty("回避单位") | ||||
private List<String> avoidUnitIds; | private List<String> avoidUnitIds; | ||||
@@ -16,8 +16,6 @@ import java.util.List; | |||||
@Data | @Data | ||||
public class InviteRuleDetailVO { | public class InviteRuleDetailVO { | ||||
private Integer inviteType; | |||||
@ApiModelProperty("随机邀请规则") | @ApiModelProperty("随机邀请规则") | ||||
private List<RandomInviteRuleVO> randomRules; | private List<RandomInviteRuleVO> randomRules; | ||||
@@ -1,15 +1,14 @@ | |||||
package com.ningdatech.pmapi.meeting.helper; | package com.ningdatech.pmapi.meeting.helper; | ||||
import cn.hutool.core.util.RandomUtil; | import cn.hutool.core.util.RandomUtil; | ||||
import com.ningdatech.basic.util.CollUtils; | |||||
import com.ningdatech.pmapi.expert.entity.ExpertGovBusinessStrip; | |||||
import com.ningdatech.pmapi.expert.entity.ExpertUserFullInfo; | import com.ningdatech.pmapi.expert.entity.ExpertUserFullInfo; | ||||
import com.ningdatech.pmapi.meeting.entity.domain.MeetingExpert; | import com.ningdatech.pmapi.meeting.entity.domain.MeetingExpert; | ||||
import org.apache.commons.collections4.MapUtils; | import org.apache.commons.collections4.MapUtils; | ||||
import org.apache.commons.lang3.RandomUtils; | import org.apache.commons.lang3.RandomUtils; | ||||
import java.util.ArrayList; | |||||
import java.util.Collections; | |||||
import java.util.List; | |||||
import java.util.Map; | |||||
import java.util.*; | |||||
import java.util.stream.Collectors; | import java.util.stream.Collectors; | ||||
/** | /** | ||||
@@ -74,6 +73,77 @@ public class ExpertRandomInviteAlgorithm { | |||||
} | } | ||||
} | } | ||||
public static List<ExpertUserFullInfo> inviteGroupByStrip(Map<String, List<ExpertGovBusinessStrip>> expertStripGroup, | |||||
List<ExpertUserFullInfo> userFullInfoList, | |||||
List<List<MeetingExpert>> expertsByRecentMeeting, | |||||
Integer count) { | |||||
if (MapUtils.isEmpty(expertStripGroup)) { | |||||
return Collections.emptyList(); | |||||
} | |||||
Map<Long, ExpertUserFullInfo> userMap = CollUtils.listToMap(userFullInfoList, ExpertUserFullInfo::getUserId); | |||||
if (expertsByRecentMeeting.isEmpty()) { | |||||
return expertStripGroup.values().stream() | |||||
.map(w -> { | |||||
ExpertUserFullInfo euf; | |||||
while (true) { | |||||
ExpertGovBusinessStrip ele = RandomUtil.randomEle(w); | |||||
euf = userMap.remove(ele.getExpertUserId()); | |||||
if (euf != null || w.isEmpty() || userMap.isEmpty()) { | |||||
break; | |||||
} | |||||
w.remove(ele); | |||||
} | |||||
return euf; | |||||
}).filter(Objects::nonNull) | |||||
.limit(count) | |||||
.collect(Collectors.toList()); | |||||
} else { | |||||
List<ExpertUserFullInfo> lockedUsers = new ArrayList<>(); | |||||
List<String> strips = new ArrayList<>(expertStripGroup.keySet()); | |||||
for (int i = 0; i < count; i++) { | |||||
String strip = strips.get(RandomUtils.nextInt(0, strips.size())); | |||||
List<ExpertGovBusinessStrip> expertsByStrip = expertStripGroup.get(strip); | |||||
for (int j = 0; j < expertsByRecentMeeting.size(); j++) { | |||||
List<MeetingExpert> experts = expertsByRecentMeeting.get(j); | |||||
List<ExpertUserFullInfo> notInvitedUsers = expertsByStrip.stream() | |||||
.map(w -> userMap.get(w.getExpertUserId())) | |||||
.filter(w -> w != null && expertMatchNone(experts, w)) | |||||
.collect(Collectors.toList()); | |||||
if (!notInvitedUsers.isEmpty()) { | |||||
ExpertUserFullInfo usf = RandomUtil.randomEle(notInvitedUsers); | |||||
// 防止一个专家多条线 | |||||
userMap.remove(usf.getUserId()); | |||||
lockedUsers.add(usf); | |||||
break; | |||||
} else if (j == (expertsByRecentMeeting.size() - 1)) { | |||||
ExpertUserFullInfo euf; | |||||
ExpertGovBusinessStrip egs = RandomUtil.randomEle(expertsByStrip); | |||||
while (true) { | |||||
euf = userMap.remove(egs.getExpertUserId()); | |||||
if (euf != null || expertsByStrip.isEmpty() || userMap.isEmpty()) { | |||||
break; | |||||
} | |||||
expertsByStrip.remove(egs); | |||||
} | |||||
if (euf != null) { | |||||
lockedUsers.add(euf); | |||||
} | |||||
} | |||||
if (userMap.isEmpty()) { | |||||
return lockedUsers; | |||||
} | |||||
} | |||||
if (lockedUsers.size() < count) { | |||||
strips.remove(strip); | |||||
if (strips.isEmpty()) { | |||||
break; | |||||
} | |||||
} | |||||
} | |||||
return lockedUsers; | |||||
} | |||||
} | |||||
/** | /** | ||||
* 随机抽取专家 | * 随机抽取专家 | ||||
* | * | ||||
@@ -103,7 +173,7 @@ public class ExpertRandomInviteAlgorithm { | |||||
userFullInfos.removeAll(notInvitedUsers); | userFullInfos.removeAll(notInvitedUsers); | ||||
} | } | ||||
} | } | ||||
if (userFullInfos.size() == 0) { | |||||
if (userFullInfos.isEmpty()) { | |||||
return result; | return result; | ||||
} | } | ||||
int restCnt = Math.min(count - result.size(), userFullInfos.size()); | int restCnt = Math.min(count - result.size(), userFullInfos.size()); | ||||
@@ -8,8 +8,10 @@ import com.ningdatech.basic.util.CollUtils; | |||||
import com.ningdatech.pmapi.common.util.BizUtils; | import com.ningdatech.pmapi.common.util.BizUtils; | ||||
import com.ningdatech.pmapi.expert.constant.ExpertAccountStatusEnum; | import com.ningdatech.pmapi.expert.constant.ExpertAccountStatusEnum; | ||||
import com.ningdatech.pmapi.expert.entity.ExpertAvoidCompany; | import com.ningdatech.pmapi.expert.entity.ExpertAvoidCompany; | ||||
import com.ningdatech.pmapi.expert.entity.ExpertGovBusinessStrip; | |||||
import com.ningdatech.pmapi.expert.entity.ExpertUserFullInfo; | import com.ningdatech.pmapi.expert.entity.ExpertUserFullInfo; | ||||
import com.ningdatech.pmapi.expert.service.IExpertAvoidCompanyService; | import com.ningdatech.pmapi.expert.service.IExpertAvoidCompanyService; | ||||
import com.ningdatech.pmapi.expert.service.IExpertGovBusinessStripService; | |||||
import com.ningdatech.pmapi.expert.service.IExpertIntentionWorkRegionService; | import com.ningdatech.pmapi.expert.service.IExpertIntentionWorkRegionService; | ||||
import com.ningdatech.pmapi.expert.service.IExpertUserFullInfoService; | import com.ningdatech.pmapi.expert.service.IExpertUserFullInfoService; | ||||
import com.ningdatech.pmapi.meeting.builder.ExpertInviteBuilder; | import com.ningdatech.pmapi.meeting.builder.ExpertInviteBuilder; | ||||
@@ -17,8 +19,10 @@ import com.ningdatech.pmapi.meeting.entity.domain.ExpertInviteRule; | |||||
import com.ningdatech.pmapi.meeting.entity.domain.Meeting; | import com.ningdatech.pmapi.meeting.entity.domain.Meeting; | ||||
import com.ningdatech.pmapi.meeting.entity.domain.MeetingExpert; | import com.ningdatech.pmapi.meeting.entity.domain.MeetingExpert; | ||||
import com.ningdatech.pmapi.meeting.entity.dto.*; | import com.ningdatech.pmapi.meeting.entity.dto.*; | ||||
import com.ningdatech.pmapi.meeting.entity.enumeration.AvoidTypeEnum; | |||||
import com.ningdatech.pmapi.meeting.entity.enumeration.ExpertAttendStatusEnum; | import com.ningdatech.pmapi.meeting.entity.enumeration.ExpertAttendStatusEnum; | ||||
import com.ningdatech.pmapi.meeting.helper.ExpertInviteHelper; | import com.ningdatech.pmapi.meeting.helper.ExpertInviteHelper; | ||||
import com.ningdatech.pmapi.meeting.helper.ExpertRandomInviteAlgorithm; | |||||
import com.ningdatech.pmapi.meeting.helper.MeetingCallOrMsgHelper; | import com.ningdatech.pmapi.meeting.helper.MeetingCallOrMsgHelper; | ||||
import com.ningdatech.pmapi.meeting.service.IExpertInviteRuleService; | import com.ningdatech.pmapi.meeting.service.IExpertInviteRuleService; | ||||
import com.ningdatech.pmapi.meeting.service.IMeetingExpertService; | import com.ningdatech.pmapi.meeting.service.IMeetingExpertService; | ||||
@@ -41,7 +45,7 @@ import java.util.stream.Collectors; | |||||
import static com.ningdatech.pmapi.meeting.entity.enumeration.ExpertAttendStatusEnum.*; | import static com.ningdatech.pmapi.meeting.entity.enumeration.ExpertAttendStatusEnum.*; | ||||
import static com.ningdatech.pmapi.meeting.helper.ExpertInviteHelper.getExpertInviteRule; | import static com.ningdatech.pmapi.meeting.helper.ExpertInviteHelper.getExpertInviteRule; | ||||
import static com.ningdatech.pmapi.meeting.helper.ExpertRandomInviteAlgorithm.inviteGroupByCompany; | |||||
import static com.ningdatech.pmapi.meeting.helper.ExpertRandomInviteAlgorithm.*; | |||||
/** | /** | ||||
* <p> | * <p> | ||||
@@ -66,6 +70,7 @@ public class ExpertInviteManage { | |||||
private final IMeetingService meetingService; | private final IMeetingService meetingService; | ||||
private final IExpertAvoidCompanyService expertAvoidCompanyService; | private final IExpertAvoidCompanyService expertAvoidCompanyService; | ||||
private final MeetingCallOrMsgHelper meetingCallOrMsgHelper; | private final MeetingCallOrMsgHelper meetingCallOrMsgHelper; | ||||
private final IExpertGovBusinessStripService expertGovBusinessStripService; | |||||
@Value("#{randomInviteProperties.recentMeetingCount}") | @Value("#{randomInviteProperties.recentMeetingCount}") | ||||
private Integer recentMeetingCount; | private Integer recentMeetingCount; | ||||
@@ -364,10 +369,29 @@ public class ExpertInviteManage { | |||||
if (userInfoList.isEmpty()) { | if (userInfoList.isEmpty()) { | ||||
return result; | return result; | ||||
} | } | ||||
Map<String, List<ExpertUserFullInfo>> userGroupByUnit = CollUtils.group(userInfoList, ExpertUserFullInfo::getCompanyUniqCode); | |||||
result.setTotal(userGroupByUnit.size()); | |||||
result.setExperts(inviteGroupByCompany(userGroupByUnit, expertsByRecentMeeting(), randomRule.getCount())); | |||||
AvoidTypeEnum avoidType = avoidRule.getAvoidType() == null ? AvoidTypeEnum.CURR_UNIT : AvoidTypeEnum.getByCode(avoidRule.getAvoidType()); | |||||
switch (avoidType) { | |||||
case NONE: | |||||
result.setExperts(inviteWithoutCompany(userInfoList, expertsByRecentMeeting(), randomRule.getCount())); | |||||
result.setTotal(userInfoList.size()); | |||||
break; | |||||
case CURR_UNIT: | |||||
Map<String, List<ExpertUserFullInfo>> unitGroup = CollUtils.group(userInfoList, ExpertUserFullInfo::getCompanyUniqCode); | |||||
result.setExperts(inviteGroupByCompany(unitGroup, expertsByRecentMeeting(), randomRule.getCount())); | |||||
result.setTotal(unitGroup.size()); | |||||
break; | |||||
case CURR_STRIP: | |||||
List<Long> userIds = CollUtils.fieldList(userInfoList, ExpertUserFullInfo::getUserId); | |||||
List<ExpertGovBusinessStrip> expertStrips = expertGovBusinessStripService.listByUserIds(userIds); | |||||
if (!expertStrips.isEmpty()) { | |||||
Map<String, List<ExpertGovBusinessStrip>> stripGroup = CollUtils.group(expertStrips, ExpertGovBusinessStrip::getBusinessStripCode); | |||||
result.setExperts(inviteGroupByStrip(stripGroup, userInfoList, expertsByRecentMeeting(), randomRule.getCount())); | |||||
result.setTotal(stripGroup.size()); | |||||
} else { | |||||
result.setTotal(0); | |||||
} | |||||
break; | |||||
} | |||||
return result; | return result; | ||||
} | } | ||||
@@ -525,7 +549,7 @@ public class ExpertInviteManage { | |||||
AvoidRuleDTO avoidRule) { | AvoidRuleDTO avoidRule) { | ||||
List<MeetingExpert> expertInserts = new ArrayList<>(); | List<MeetingExpert> expertInserts = new ArrayList<>(); | ||||
// 处理随机抽取规则 | // 处理随机抽取规则 | ||||
if (CollectionUtils.isNotEmpty(randomRules)) { | |||||
if (CollUtil.isNotEmpty(randomRules)) { | |||||
List<ExpertInviteRule> randoms = new ArrayList<>(); | List<ExpertInviteRule> randoms = new ArrayList<>(); | ||||
List<ExpertChooseDTO> expertsByRandom = new ArrayList<>(); | List<ExpertChooseDTO> expertsByRandom = new ArrayList<>(); | ||||
List<Long> chooseExpertIds = new ArrayList<>(); | List<Long> chooseExpertIds = new ArrayList<>(); | ||||
@@ -25,6 +25,7 @@ import com.ningdatech.pmapi.expert.entity.ExpertUserFullInfo; | |||||
import com.ningdatech.pmapi.expert.model.entity.ExpertReview; | import com.ningdatech.pmapi.expert.model.entity.ExpertReview; | ||||
import com.ningdatech.pmapi.expert.service.IExpertReviewService; | import com.ningdatech.pmapi.expert.service.IExpertReviewService; | ||||
import com.ningdatech.pmapi.expert.service.IExpertUserFullInfoService; | import com.ningdatech.pmapi.expert.service.IExpertUserFullInfoService; | ||||
import com.ningdatech.pmapi.gov.service.IBelongOrgService; | |||||
import com.ningdatech.pmapi.meeting.builder.ExpertInviteBuilder; | import com.ningdatech.pmapi.meeting.builder.ExpertInviteBuilder; | ||||
import com.ningdatech.pmapi.meeting.entity.domain.*; | import com.ningdatech.pmapi.meeting.entity.domain.*; | ||||
import com.ningdatech.pmapi.meeting.entity.dto.*; | import com.ningdatech.pmapi.meeting.entity.dto.*; | ||||
@@ -43,7 +44,6 @@ import com.ningdatech.pmapi.meeting.task.ExpertRandomInviteTask; | |||||
import com.ningdatech.pmapi.meta.helper.DictionaryCache; | import com.ningdatech.pmapi.meta.helper.DictionaryCache; | ||||
import com.ningdatech.pmapi.meta.helper.TagCache; | import com.ningdatech.pmapi.meta.helper.TagCache; | ||||
import com.ningdatech.pmapi.organization.service.IDingOrganizationService; | import com.ningdatech.pmapi.organization.service.IDingOrganizationService; | ||||
import com.ningdatech.pmapi.organization.service.IGovBusinessStripService; | |||||
import com.ningdatech.pmapi.projectlib.enumeration.ProjectStatusEnum; | import com.ningdatech.pmapi.projectlib.enumeration.ProjectStatusEnum; | ||||
import com.ningdatech.pmapi.projectlib.model.entity.Project; | import com.ningdatech.pmapi.projectlib.model.entity.Project; | ||||
import com.ningdatech.pmapi.projectlib.service.IProjectService; | import com.ningdatech.pmapi.projectlib.service.IProjectService; | ||||
@@ -91,7 +91,7 @@ public class MeetingManage { | |||||
private final IProjectService projectService; | private final IProjectService projectService; | ||||
private final IMeetingInnerProjectService meetingInnerProjectService; | private final IMeetingInnerProjectService meetingInnerProjectService; | ||||
private final IMeetingOuterProjectService meetingOuterProjectService; | private final IMeetingOuterProjectService meetingOuterProjectService; | ||||
private final IGovBusinessStripService businessStripService; | |||||
private final IBelongOrgService belongOrgService; | |||||
private final IDingOrganizationService dingOrganizationService; | private final IDingOrganizationService dingOrganizationService; | ||||
private final IExpertReviewService expertReviewService; | private final IExpertReviewService expertReviewService; | ||||
private final ExpertInviteHelper expertInviteHelper; | private final ExpertInviteHelper expertInviteHelper; | ||||
@@ -199,7 +199,7 @@ public class MeetingManage { | |||||
if (!MeetingStatusEnum.NORMAL.eq(meeting.getStatus())) { | if (!MeetingStatusEnum.NORMAL.eq(meeting.getStatus())) { | ||||
throw BizException.wrap("转换失败,请刷新后重试"); | throw BizException.wrap("转换失败,请刷新后重试"); | ||||
} | } | ||||
expertRandomInviteTask.cancelByMeetingId(meetingId); | |||||
expertRandomInviteTask.cancelByMeetingIdAndKillTask(meetingId); | |||||
LambdaUpdateWrapper<Meeting> meetingUpdate = Wrappers.lambdaUpdate(Meeting.class) | LambdaUpdateWrapper<Meeting> meetingUpdate = Wrappers.lambdaUpdate(Meeting.class) | ||||
.set(Meeting::getInviteType, APPOINT.getCode()) | .set(Meeting::getInviteType, APPOINT.getCode()) | ||||
.eq(Meeting::getId, meetingId); | .eq(Meeting::getId, meetingId); | ||||
@@ -253,6 +253,7 @@ public class MeetingManage { | |||||
avoidRule.setAvoidOrgIds(CollUtils.joinByComma(avoidInfo.getAvoidOrgIdList())); | avoidRule.setAvoidOrgIds(CollUtils.joinByComma(avoidInfo.getAvoidOrgIdList())); | ||||
avoidRule.setAvoidUnitIds(CollUtils.joinByComma(avoidInfo.getAvoidUnitIdList())); | avoidRule.setAvoidUnitIds(CollUtils.joinByComma(avoidInfo.getAvoidUnitIdList())); | ||||
avoidRule.setAvoidExpertIds(CollUtils.joinByComma(avoidInfo.getExpertIds())); | avoidRule.setAvoidExpertIds(CollUtils.joinByComma(avoidInfo.getExpertIds())); | ||||
avoidRule.setAvoidType(avoidInfo.getAvoidType()); | |||||
inviteAvoidRuleService.save(avoidRule); | inviteAvoidRuleService.save(avoidRule); | ||||
} else { | } else { | ||||
// 指定邀请 | // 指定邀请 | ||||
@@ -587,7 +588,7 @@ public class MeetingManage { | |||||
randomRule.setIntentionRegions(intentionRegions); | randomRule.setIntentionRegions(intentionRegions); | ||||
} | } | ||||
if (CollUtil.isNotEmpty(randomRule.getExpertRegionList())) { | if (CollUtil.isNotEmpty(randomRule.getExpertRegionList())) { | ||||
List<RegionDTO> regions = CollUtils.convert(randomRule.getExpertRegions(), | |||||
List<RegionDTO> regions = CollUtils.convert(randomRule.getExpertRegionList(), | |||||
w -> regionCache.getByCodeAndLevel(w.getRegionCode(), w.getRegionLevel())); | w -> regionCache.getByCodeAndLevel(w.getRegionCode(), w.getRegionLevel())); | ||||
randomRule.setExpertRegions(regions); | randomRule.setExpertRegions(regions); | ||||
} | } | ||||
@@ -595,11 +596,12 @@ public class MeetingManage { | |||||
}); | }); | ||||
AvoidRuleDTO avoidInfo = inviteAvoidRuleService.getAvoidInfo(meetingId); | AvoidRuleDTO avoidInfo = inviteAvoidRuleService.getAvoidInfo(meetingId); | ||||
AvoidInfoVO vo = new AvoidInfoVO(); | AvoidInfoVO vo = new AvoidInfoVO(); | ||||
vo.setAvoidType(avoidInfo.getAvoidType()); | |||||
vo.setWeekInviteCount(avoidInfo.getWeekInviteCount()); | vo.setWeekInviteCount(avoidInfo.getWeekInviteCount()); | ||||
vo.setAvoidOrgIds(avoidInfo.getAvoidOrgIdList()); | vo.setAvoidOrgIds(avoidInfo.getAvoidOrgIdList()); | ||||
vo.setAvoidUnitIds(avoidInfo.getAvoidUnitIdList()); | vo.setAvoidUnitIds(avoidInfo.getAvoidUnitIdList()); | ||||
if (CollUtil.isNotEmpty(vo.getAvoidOrgIds())) { | if (CollUtil.isNotEmpty(vo.getAvoidOrgIds())) { | ||||
vo.setAvoidOrgs(businessStripService.listNameByCodes(avoidInfo.getAvoidOrgIdList())); | |||||
vo.setAvoidOrgs(belongOrgService.listNameByCodes(avoidInfo.getAvoidOrgIdList())); | |||||
} | } | ||||
if (CollUtil.isNotEmpty(vo.getAvoidUnitIds())) { | if (CollUtil.isNotEmpty(vo.getAvoidUnitIds())) { | ||||
vo.setAvoidUnits(dingOrganizationService.listNameByCodes(avoidInfo.getAvoidUnitIdList())); | vo.setAvoidUnits(dingOrganizationService.listNameByCodes(avoidInfo.getAvoidUnitIdList())); | ||||
@@ -652,7 +654,7 @@ public class MeetingManage { | |||||
} | } | ||||
public void stopRandomInvite(Long meetingId) { | public void stopRandomInvite(Long meetingId) { | ||||
expertRandomInviteTask.cancelByMeetingId(meetingId); | |||||
expertRandomInviteTask.cancelByMeetingIdAndKillTask(meetingId); | |||||
} | } | ||||
@Transactional(rollbackFor = Exception.class) | @Transactional(rollbackFor = Exception.class) | ||||
@@ -674,7 +676,7 @@ public class MeetingManage { | |||||
.set(Meeting::getStatus, MeetingStatusEnum.CANCELED.getCode()) | .set(Meeting::getStatus, MeetingStatusEnum.CANCELED.getCode()) | ||||
.eq(Meeting::getId, meetingId); | .eq(Meeting::getId, meetingId); | ||||
meetingService.update(meetingUpdate); | meetingService.update(meetingUpdate); | ||||
expertRandomInviteTask.cancelByMeetingId(meetingId); | |||||
expertRandomInviteTask.cancelByMeetingIdAndKillTask(meetingId); | |||||
// 发送通知给专家 | // 发送通知给专家 | ||||
List<MeetingExpert> experts = meetingExpertService.listAgreedExperts(meetingId); | List<MeetingExpert> experts = meetingExpertService.listAgreedExperts(meetingId); | ||||
if (!experts.isEmpty()) { | if (!experts.isEmpty()) { | ||||
@@ -40,6 +40,7 @@ public class ExpertInviteAvoidRuleServiceImpl extends ServiceImpl<ExpertInviteAv | |||||
avoidInfo.setAvoidUnitIdList(StrUtils.split(avoidRule.getAvoidUnitIds())); | avoidInfo.setAvoidUnitIdList(StrUtils.split(avoidRule.getAvoidUnitIds())); | ||||
avoidInfo.setExpertIds(BizUtils.splitToLong(avoidRule.getAvoidExpertIds())); | avoidInfo.setExpertIds(BizUtils.splitToLong(avoidRule.getAvoidExpertIds())); | ||||
avoidInfo.setWeekInviteCount(avoidRule.getWeekInviteCount()); | avoidInfo.setWeekInviteCount(avoidRule.getWeekInviteCount()); | ||||
avoidInfo.setAvoidType(avoidRule.getAvoidType()); | |||||
return avoidInfo; | return avoidInfo; | ||||
} | } | ||||
@@ -1,5 +1,7 @@ | |||||
package com.ningdatech.pmapi.meeting.service.impl; | package com.ningdatech.pmapi.meeting.service.impl; | ||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; | |||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers; | |||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | ||||
import com.ningdatech.basic.util.CollUtils; | import com.ningdatech.basic.util.CollUtils; | ||||
import com.ningdatech.pmapi.common.model.entity.CountGroupByDTO; | import com.ningdatech.pmapi.common.model.entity.CountGroupByDTO; | ||||
@@ -25,10 +27,10 @@ public class MeetingServiceImpl extends ServiceImpl<MeetingMapper, Meeting> impl | |||||
@Override | @Override | ||||
public void stopRandomInvite(Long meetingId) { | public void stopRandomInvite(Long meetingId) { | ||||
Meeting meeting = new Meeting(); | |||||
meeting.setId(meetingId); | |||||
meeting.setInviteStatus(Boolean.TRUE); | |||||
baseMapper.updateById(meeting); | |||||
LambdaUpdateWrapper<Meeting> update = Wrappers.lambdaUpdate(Meeting.class) | |||||
.eq(Meeting::getId, meetingId) | |||||
.set(Meeting::getInviteStatus, Boolean.TRUE); | |||||
update(update); | |||||
} | } | ||||
@Override | @Override | ||||
@@ -228,9 +228,9 @@ public class ExpertRandomInviteTask { | |||||
public void invite(Long meetingId, Boolean reInvite, LocalDateTime tsTime) { | public void invite(Long meetingId, Boolean reInvite, LocalDateTime tsTime) { | ||||
log.info("开始进行专家后台抽取:{}", meetingId); | log.info("开始进行专家后台抽取:{}", meetingId); | ||||
Meeting meeting = meetingService.getById(meetingId); | Meeting meeting = meetingService.getById(meetingId); | ||||
if (meeting.getStartTime().isBefore(LocalDateTime.now())) { | |||||
if (meeting.getInviteStatus() || meeting.getStartTime().isBefore(LocalDateTime.now())) { | |||||
log.info("会议已开始停止抽取:{}", meeting); | log.info("会议已开始停止抽取:{}", meeting); | ||||
cancelByMeetingId(meetingId); | |||||
killTaskAndDelCacheMeetingId(meetingId); | |||||
return; | return; | ||||
} | } | ||||
// 随机邀请规则 | // 随机邀请规则 | ||||
@@ -275,9 +275,13 @@ public class ExpertRandomInviteTask { | |||||
}); | }); | ||||
if (notIgnoreCnt.get() == 0 || notIgnoreCnt.get() == notSupportCnt.get()) { | if (notIgnoreCnt.get() == 0 || notIgnoreCnt.get() == notSupportCnt.get()) { | ||||
log.info("停止会议随机邀请:{} 未完成抽取规则数量 {} 无可抽取专家规则数量 {}", meetingId, notIgnoreCnt, notSupportCnt); | log.info("停止会议随机邀请:{} 未完成抽取规则数量 {} 无可抽取专家规则数量 {}", meetingId, notIgnoreCnt, notSupportCnt); | ||||
currProxy().cancelByMeetingId(meetingId); | |||||
meetingCallOrMsgHelper.sendInviteStopMsg(meeting.getCreateBy(), meetingId, meeting.getName()); | |||||
meetingService.stopRandomInvite(meetingId); | |||||
if (notIgnoreCnt.get() == notSupportCnt.get() && notIgnoreCnt.get() > 0) { | |||||
// 当未完成抽取且无专家可抽取时 | |||||
meetingCallOrMsgHelper.sendInviteStopMsg(meeting.getCreateBy(), meetingId, meeting.getName()); | |||||
} | |||||
} | } | ||||
// 所有抽取规则抽取人数满足 自动召开会议 | |||||
if (notIgnoreCnt.get() == 0 && notSupportCnt.get() == 0) { | if (notIgnoreCnt.get() == 0 && notSupportCnt.get() == 0) { | ||||
MeetingManage meetingManage = SpringUtils.getBean(MeetingManage.class); | MeetingManage meetingManage = SpringUtils.getBean(MeetingManage.class); | ||||
ConfirmedRosterReq req = new ConfirmedRosterReq(); | ConfirmedRosterReq req = new ConfirmedRosterReq(); | ||||
@@ -287,10 +291,7 @@ public class ExpertRandomInviteTask { | |||||
} | } | ||||
} | } | ||||
@Transactional(rollbackFor = Exception.class) | |||||
public void cancelByMeetingId(Long meetingId) { | |||||
log.info("终止专家抽取:{}", meetingId); | |||||
meetingService.stopRandomInvite(meetingId); | |||||
private void killTaskAndDelCacheMeetingId(Long meetingId) { | |||||
cachePlusOps.hDel(getCacheKey(meetingId)); | cachePlusOps.hDel(getCacheKey(meetingId)); | ||||
ScheduledFuture<?> future = INVITE_TASK_MAP.get(meetingId); | ScheduledFuture<?> future = INVITE_TASK_MAP.get(meetingId); | ||||
if (future != null) { | if (future != null) { | ||||
@@ -301,6 +302,13 @@ public class ExpertRandomInviteTask { | |||||
} | } | ||||
} | } | ||||
@Transactional(rollbackFor = Exception.class) | |||||
public void cancelByMeetingIdAndKillTask(Long meetingId) { | |||||
log.info("终止专家抽取:{}", meetingId); | |||||
meetingService.stopRandomInvite(meetingId); | |||||
killTaskAndDelCacheMeetingId(meetingId); | |||||
} | |||||
//================================================================================================================== | //================================================================================================================== | ||||
private Map<Long, ExpertCntBO> countByAttendStatus(Map<Long, MeetingExpert> expertMap) { | private Map<Long, ExpertCntBO> countByAttendStatus(Map<Long, MeetingExpert> expertMap) { | ||||
@@ -4,11 +4,14 @@ import cn.hutool.core.util.IdUtil; | |||||
import com.alibaba.fastjson.JSON; | import com.alibaba.fastjson.JSON; | ||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers; | import com.baomidou.mybatisplus.core.toolkit.Wrappers; | ||||
import com.google.common.collect.Lists; | import com.google.common.collect.Lists; | ||||
import com.ningdatech.basic.model.GenericResult; | |||||
import com.ningdatech.basic.util.StrPool; | import com.ningdatech.basic.util.StrPool; | ||||
import com.ningdatech.pmapi.ding.constants.DingOrganizationContant; | import com.ningdatech.pmapi.ding.constants.DingOrganizationContant; | ||||
import com.ningdatech.pmapi.organization.model.entity.DingOrganization; | import com.ningdatech.pmapi.organization.model.entity.DingOrganization; | ||||
import com.ningdatech.pmapi.organization.service.IDingOrganizationService; | import com.ningdatech.pmapi.organization.service.IDingOrganizationService; | ||||
import com.ningdatech.pmapi.organization.constants.ProcDefContant; | import com.ningdatech.pmapi.organization.constants.ProcDefContant; | ||||
import com.ningdatech.zwdd.client.ZwddClient; | |||||
import com.ningdatech.zwdd.model.dto.DingOrgInfoDTO; | |||||
import com.wflow.bean.entity.WflowOrgModelHistorys; | import com.wflow.bean.entity.WflowOrgModelHistorys; | ||||
import com.wflow.bean.entity.WflowOrgModels; | import com.wflow.bean.entity.WflowOrgModels; | ||||
import com.wflow.enums.ProcessDefTypeEnum; | import com.wflow.enums.ProcessDefTypeEnum; | ||||
@@ -16,6 +19,7 @@ import com.wflow.service.OrgProcdefHistoryService; | |||||
import com.wflow.service.OrgProcdefService; | import com.wflow.service.OrgProcdefService; | ||||
import lombok.AllArgsConstructor; | import lombok.AllArgsConstructor; | ||||
import lombok.extern.slf4j.Slf4j; | import lombok.extern.slf4j.Slf4j; | ||||
import org.apache.commons.lang3.StringUtils; | |||||
import org.springframework.stereotype.Component; | import org.springframework.stereotype.Component; | ||||
import java.time.LocalDateTime; | import java.time.LocalDateTime; | ||||
@@ -38,6 +42,8 @@ public class ProcDefManage { | |||||
private final OrgProcdefHistoryService orgProcdefHistoryService; | private final OrgProcdefHistoryService orgProcdefHistoryService; | ||||
private final ZwddClient zwddClient; | |||||
/** | /** | ||||
* 初始化 单位配置 | * 初始化 单位配置 | ||||
* @return | * @return | ||||
@@ -140,4 +146,21 @@ public class ProcDefManage { | |||||
return "初始化成功"; | return "初始化成功"; | ||||
} | } | ||||
public String synchronouOrgBiz() { | |||||
List<DingOrganization> orgs = organizationService.list(); | |||||
//同步所有的 企业条线 | |||||
for(DingOrganization org : orgs){ | |||||
GenericResult<DingOrgInfoDTO> organization = zwddClient.getOrganizationByCode(org.getOrganizationCode()); | |||||
if(organization.isSuccess()){ | |||||
DingOrgInfoDTO data = organization.getData(); | |||||
String businessStripCodes = data.getBusinessStripCodes(); | |||||
if(StringUtils.isNotBlank(businessStripCodes)){ | |||||
org.setBusinessStripCodes(businessStripCodes); | |||||
organizationService.updateById(org); | |||||
} | |||||
} | |||||
} | |||||
return "更新完成"; | |||||
} | |||||
} | } |
@@ -1,19 +1,13 @@ | |||||
package com.ningdatech.pmapi.projectdeclared.controller; | package com.ningdatech.pmapi.projectdeclared.controller; | ||||
import java.util.Iterator; | |||||
import javax.servlet.http.HttpServletResponse; | import javax.servlet.http.HttpServletResponse; | ||||
import com.ningdatech.log.annotation.WebLog; | import com.ningdatech.log.annotation.WebLog; | ||||
import org.apache.commons.lang3.StringUtils; | |||||
import org.springframework.validation.annotation.Validated; | import org.springframework.validation.annotation.Validated; | ||||
import org.springframework.web.bind.annotation.*; | import org.springframework.web.bind.annotation.*; | ||||
import com.alibaba.fastjson.JSONArray; | |||||
import com.alibaba.fastjson.JSONObject; | import com.alibaba.fastjson.JSONObject; | ||||
import com.ningdatech.basic.model.PageVo; | import com.ningdatech.basic.model.PageVo; | ||||
import com.ningdatech.pmapi.common.util.ExcelDownUtil; | import com.ningdatech.pmapi.common.util.ExcelDownUtil; | ||||
import com.ningdatech.pmapi.projectdeclared.contants.DeclaredProjectContant; | |||||
import com.ningdatech.pmapi.projectdeclared.manage.DeclaredProjectManage; | import com.ningdatech.pmapi.projectdeclared.manage.DeclaredProjectManage; | ||||
import com.ningdatech.pmapi.projectdeclared.manage.ProjectAdjustmentManage; | import com.ningdatech.pmapi.projectdeclared.manage.ProjectAdjustmentManage; | ||||
import com.ningdatech.pmapi.projectdeclared.model.dto.DeclaredProjectListParamDTO; | import com.ningdatech.pmapi.projectdeclared.model.dto.DeclaredProjectListParamDTO; | ||||
@@ -53,22 +47,10 @@ public class DeclaredProjectController { | |||||
@ApiOperation(value = "核心业务列表", notes = "核心业务列表") | @ApiOperation(value = "核心业务列表", notes = "核心业务列表") | ||||
@GetMapping("/core-biz") | @GetMapping("/core-biz") | ||||
public JSONObject bizList(@RequestParam(required = false) String businessName) { | |||||
JSONObject jsonObject = JSONObject.parseObject(DeclaredProjectContant.Biz.CORE_BIZ); | |||||
if(StringUtils.isNotBlank(businessName)){ | |||||
JSONArray dataArray = JSONArray.parseArray(jsonObject.getString("data")); | |||||
Iterator iter = dataArray.stream().iterator(); | |||||
JSONArray dataArrayRes = new JSONArray(); | |||||
while (iter.hasNext()) { | |||||
JSONObject value = (JSONObject) iter.next(); | |||||
String businessValue = value.getString("matterName"); | |||||
if(StringUtils.isNotBlank(businessValue) && businessValue.contains(businessName)){ | |||||
dataArrayRes.add(value); | |||||
} | |||||
} | |||||
jsonObject.put("data",dataArrayRes); | |||||
} | |||||
return jsonObject; | |||||
public JSONObject bizList(@RequestParam(required = false) String businessName, | |||||
@RequestParam(required = false) Integer pageSize, | |||||
@RequestParam(required = false) Integer pageNumber) { | |||||
return declaredProjectManage.bizList(businessName,pageSize,pageNumber); | |||||
} | } | ||||
@ApiOperation(value = "申报项目草稿箱列表", notes = "申报项目草稿箱列表") | @ApiOperation(value = "申报项目草稿箱列表", notes = "申报项目草稿箱列表") | ||||
@@ -3,6 +3,8 @@ package com.ningdatech.pmapi.projectdeclared.manage; | |||||
import cn.hutool.core.collection.CollUtil; | import cn.hutool.core.collection.CollUtil; | ||||
import com.alibaba.excel.EasyExcel; | import com.alibaba.excel.EasyExcel; | ||||
import com.alibaba.fastjson.JSON; | import com.alibaba.fastjson.JSON; | ||||
import com.alibaba.fastjson.JSONArray; | |||||
import com.alibaba.fastjson.JSONObject; | |||||
import com.alibaba.fastjson.TypeReference; | import com.alibaba.fastjson.TypeReference; | ||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | ||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers; | import com.baomidou.mybatisplus.core.toolkit.Wrappers; | ||||
@@ -19,6 +21,8 @@ import com.ningdatech.pmapi.common.helper.RegionCacheHelper; | |||||
import com.ningdatech.pmapi.common.helper.UserInfoHelper; | import com.ningdatech.pmapi.common.helper.UserInfoHelper; | ||||
import com.ningdatech.pmapi.common.util.ExcelDownUtil; | import com.ningdatech.pmapi.common.util.ExcelDownUtil; | ||||
import com.ningdatech.pmapi.common.util.ExcelExportStyle; | import com.ningdatech.pmapi.common.util.ExcelExportStyle; | ||||
import com.ningdatech.pmapi.irs.manage.ProjectIrsManage; | |||||
import com.ningdatech.pmapi.projectdeclared.contants.DeclaredProjectContant; | |||||
import com.ningdatech.pmapi.projectdeclared.model.dto.*; | import com.ningdatech.pmapi.projectdeclared.model.dto.*; | ||||
import com.ningdatech.pmapi.projectdeclared.model.entity.ProjectDraft; | import com.ningdatech.pmapi.projectdeclared.model.entity.ProjectDraft; | ||||
import com.ningdatech.pmapi.projectdeclared.model.vo.ProjectDraftVO; | import com.ningdatech.pmapi.projectdeclared.model.vo.ProjectDraftVO; | ||||
@@ -37,6 +41,7 @@ import com.ningdatech.pmapi.staging.enums.MsgTypeEnum; | |||||
import com.ningdatech.pmapi.sys.manage.NoticeManage; | import com.ningdatech.pmapi.sys.manage.NoticeManage; | ||||
import com.ningdatech.pmapi.todocenter.constant.WorkNoticeConstant; | import com.ningdatech.pmapi.todocenter.constant.WorkNoticeConstant; | ||||
import com.ningdatech.pmapi.user.security.auth.model.UserFullInfoDTO; | import com.ningdatech.pmapi.user.security.auth.model.UserFullInfoDTO; | ||||
import com.ningdatech.pmapi.user.security.auth.model.UserInfoDetails; | |||||
import com.ningdatech.pmapi.user.util.LoginUserUtil; | import com.ningdatech.pmapi.user.util.LoginUserUtil; | ||||
import com.wflow.bean.entity.WflowModels; | import com.wflow.bean.entity.WflowModels; | ||||
import com.wflow.exception.BusinessException; | import com.wflow.exception.BusinessException; | ||||
@@ -44,10 +49,12 @@ import com.wflow.workflow.bean.dto.OrgInfoDTO; | |||||
import com.wflow.workflow.bean.vo.ProcessStartParamsVo; | import com.wflow.workflow.bean.vo.ProcessStartParamsVo; | ||||
import com.wflow.workflow.service.ProcessInstanceService; | import com.wflow.workflow.service.ProcessInstanceService; | ||||
import com.wflow.workflow.service.ProcessModelService; | import com.wflow.workflow.service.ProcessModelService; | ||||
import io.swagger.models.auth.In; | |||||
import lombok.RequiredArgsConstructor; | import lombok.RequiredArgsConstructor; | ||||
import lombok.extern.slf4j.Slf4j; | import lombok.extern.slf4j.Slf4j; | ||||
import org.apache.commons.lang3.StringUtils; | import org.apache.commons.lang3.StringUtils; | ||||
import org.springframework.beans.BeanUtils; | import org.springframework.beans.BeanUtils; | ||||
import org.springframework.beans.factory.annotation.Value; | |||||
import org.springframework.stereotype.Component; | import org.springframework.stereotype.Component; | ||||
import org.springframework.transaction.annotation.Transactional; | import org.springframework.transaction.annotation.Transactional; | ||||
@@ -87,6 +94,11 @@ public class DeclaredProjectManage { | |||||
private final RegionCacheHelper regionCacheHelper; | private final RegionCacheHelper regionCacheHelper; | ||||
private final ProjectIrsManage projectIrsManage; | |||||
@Value("${spring.profiles.active}") | |||||
private String active; | |||||
/** | /** | ||||
* 新项目 启动实例 | * 新项目 启动实例 | ||||
* | * | ||||
@@ -414,4 +426,41 @@ public class DeclaredProjectManage { | |||||
throw new RuntimeException(e); | throw new RuntimeException(e); | ||||
} | } | ||||
} | } | ||||
/** | |||||
* 查询 核心业务 | |||||
* @param businessName | |||||
* @return | |||||
*/ | |||||
public JSONObject bizList(String businessName,Integer limit, Integer page) { | |||||
JSONObject jsonObject = new JSONObject(); | |||||
UserInfoDetails user = LoginUserUtil.loginUserDetail(); | |||||
if(BizConst.DEV.equals(active)){ | |||||
jsonObject = JSONObject.parseObject(DeclaredProjectContant.Biz.CORE_BIZ); | |||||
if(CollUtil.isEmpty(jsonObject)){ | |||||
return jsonObject; | |||||
} | |||||
if(StringUtils.isNotBlank(businessName)){ | |||||
JSONArray dataArray = JSONArray.parseArray(jsonObject.getString("data")); | |||||
if(CollUtil.isEmpty(dataArray)){ | |||||
return new JSONObject(); | |||||
} | |||||
Iterator iter = dataArray.stream().iterator(); | |||||
JSONArray dataArrayRes = new JSONArray(); | |||||
while (iter.hasNext()) { | |||||
JSONObject value = (JSONObject) iter.next(); | |||||
String businessValue = value.getString("matterName"); | |||||
if(StringUtils.isNotBlank(businessValue) && businessValue.contains(businessName)){ | |||||
dataArrayRes.add(value); | |||||
} | |||||
} | |||||
jsonObject.put("data",dataArrayRes); | |||||
jsonObject.put("total",dataArrayRes.size()); | |||||
} | |||||
}else if(BizConst.PRE.equals(active) || | |||||
BizConst.PROD.equals(active)){ | |||||
jsonObject = projectIrsManage.searchCoreBiz(businessName,user.getEmpPosUnitCode(),limit,page); | |||||
} | |||||
return jsonObject; | |||||
} | |||||
} | } |
@@ -10,6 +10,7 @@ import com.ningdatech.basic.function.VUtils; | |||||
import com.ningdatech.basic.model.PageVo; | import com.ningdatech.basic.model.PageVo; | ||||
import com.ningdatech.basic.util.CollUtils; | import com.ningdatech.basic.util.CollUtils; | ||||
import com.ningdatech.basic.util.NdDateUtils; | import com.ningdatech.basic.util.NdDateUtils; | ||||
import com.ningdatech.pmapi.common.constant.BizConst; | |||||
import com.ningdatech.pmapi.common.constant.CommonConst; | import com.ningdatech.pmapi.common.constant.CommonConst; | ||||
import com.ningdatech.pmapi.common.util.ExcelDownUtil; | import com.ningdatech.pmapi.common.util.ExcelDownUtil; | ||||
import com.ningdatech.pmapi.common.util.ExcelExportStyle; | import com.ningdatech.pmapi.common.util.ExcelExportStyle; | ||||
@@ -154,6 +155,30 @@ public class ProjectRenewalFundManage { | |||||
declaration.setUpdateOn(LocalDateTime.now()); | declaration.setUpdateOn(LocalDateTime.now()); | ||||
} | } | ||||
BeanUtils.copyProperties(dto,declaration); | BeanUtils.copyProperties(dto,declaration); | ||||
//有2个条件要判断 续建资金 | |||||
//1. 如果有审核中的 是不能继续申请的 | |||||
long pendingCount = projectRenewalFundDeclarationService.count(Wrappers.lambdaQuery(ProjectRenewalFundDeclaration.class) | |||||
.eq(ProjectRenewalFundDeclaration::getProjectId, projectId) | |||||
.eq(ProjectRenewalFundDeclaration::getApprovalStatus, ProjectRenewalApprovalStatusEnum.PENDING.name())); | |||||
VUtils.isTrue(pendingCount > 0L).throwMessage("当前有在审核的续建项目 不能再申请了"); | |||||
//2.是要当前最新资金的下年度 才能申请 | |||||
VUtils.isTrue(Objects.isNull(dto.getProjectYear())).throwMessage("新建的续建项目信息 年度不能为空"); | |||||
ProjectRenewalFundDeclaration lastRenewalFund = projectRenewalFundDeclarationService.getOne(Wrappers.lambdaQuery(ProjectRenewalFundDeclaration.class) | |||||
.eq(ProjectRenewalFundDeclaration::getProjectId, projectId) | |||||
.eq(ProjectRenewalFundDeclaration::getApprovalStatus,ProjectRenewalApprovalStatusEnum.PASS.name()) | |||||
.orderByDesc(ProjectRenewalFundDeclaration::getProjectYear) | |||||
.last(BizConst.LIMIT_1)); | |||||
//如果没有续建资金信息 就要比 当前项目的年度要大 | |||||
if(Objects.isNull(lastRenewalFund)){ | |||||
VUtils.isTrue(project.getProjectYear() >= dto.getProjectYear()) | |||||
.throwMessage("续建资金年度错误!"); | |||||
}else{ | |||||
VUtils.isTrue(lastRenewalFund.getProjectYear() >= dto.getProjectYear()) | |||||
.throwMessage("续建资金年度错误!"); | |||||
} | |||||
declaration.setApprovalStatus(ProjectRenewalApprovalStatusEnum.PENDING.name()); | declaration.setApprovalStatus(ProjectRenewalApprovalStatusEnum.PENDING.name()); | ||||
declaration.setRegionCode(project.getAreaCode()); | declaration.setRegionCode(project.getAreaCode()); | ||||
declaration.setOrgCode(project.getBuildOrgCode()); | declaration.setOrgCode(project.getBuildOrgCode()); | ||||
@@ -26,8 +26,8 @@ | |||||
<if test="param.projectType != null"> | <if test="param.projectType != null"> | ||||
and p.project_type = #{param.projectType} | and p.project_type = #{param.projectType} | ||||
</if> | </if> | ||||
<if test="param.projectYear != null"> | |||||
and p.project_year = #{param.projectYear} | |||||
<if test="param.year != null"> | |||||
and prfd.project_year = #{param.year} | |||||
</if> | </if> | ||||
<if test="param.stage != null"> | <if test="param.stage != null"> | ||||
and p.stage = #{param.stage} | and p.stage = #{param.stage} | ||||
@@ -35,11 +35,15 @@ | |||||
<if test="param.status != null"> | <if test="param.status != null"> | ||||
and p.status = #{param.status} | and p.status = #{param.status} | ||||
</if> | </if> | ||||
<if test="param.createOnMin != null"> | |||||
and p.create_on >= #{param.createOnMin} | |||||
<if test="param.startTime != null"> | |||||
and prfd.create_on >= #{param.startTime} | |||||
</if> | </if> | ||||
<if test="param.createOnMax != null"> | |||||
and p.create_on <= #{param.createOnMax} | |||||
<if test="param.endTime != null"> | |||||
and prfd.create_on <= #{param.endTime} | |||||
</if> | </if> | ||||
<if test="param.approvalStatus != null"> | |||||
and prfd.approval_status = #{param.approvalStatus} | |||||
</if> | |||||
</select> | </select> | ||||
</mapper> | </mapper> |
@@ -32,7 +32,7 @@ public class ProjectRenewalListReq extends PagePo { | |||||
private Integer projectType; | private Integer projectType; | ||||
@ApiModelProperty("预算年度") | @ApiModelProperty("预算年度") | ||||
private Integer projectYear; | |||||
private Integer year; | |||||
@ApiModelProperty("项目阶段") | @ApiModelProperty("项目阶段") | ||||
private Integer stage; | private Integer stage; | ||||
@@ -42,11 +42,11 @@ public class ProjectRenewalListReq extends PagePo { | |||||
@ApiModelProperty("创建时间") | @ApiModelProperty("创建时间") | ||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm") | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm") | ||||
private LocalDateTime createOnMin; | |||||
private LocalDateTime startTime; | |||||
@ApiModelProperty("创建时间") | @ApiModelProperty("创建时间") | ||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm") | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm") | ||||
private LocalDateTime createOnMax; | |||||
private LocalDateTime endTime; | |||||
@ApiModelProperty("用户ID") | @ApiModelProperty("用户ID") | ||||
private Long userId; | private Long userId; | ||||
@@ -59,4 +59,7 @@ public class ProjectRenewalListReq extends PagePo { | |||||
@ApiModelProperty("项目状态 多个") | @ApiModelProperty("项目状态 多个") | ||||
private List<Integer> statusList; | private List<Integer> statusList; | ||||
@ApiModelProperty("审核状态") | |||||
private String approvalStatus; | |||||
} | } |
@@ -5,24 +5,11 @@ import com.alibaba.fastjson.JSON; | |||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers; | import com.baomidou.mybatisplus.core.toolkit.Wrappers; | ||||
import com.ningdatech.pmapi.common.constant.BizConst; | import com.ningdatech.pmapi.common.constant.BizConst; | ||||
import com.ningdatech.pmapi.common.enumeration.CommonEnum; | import com.ningdatech.pmapi.common.enumeration.CommonEnum; | ||||
import com.ningdatech.pmapi.common.helper.UserInfoHelper; | |||||
import com.ningdatech.pmapi.meeting.helper.YxtCallOrSmsHelper; | |||||
import com.ningdatech.pmapi.projectlib.enumeration.InstTypeEnum; | |||||
import com.ningdatech.pmapi.projectlib.model.entity.Project; | import com.ningdatech.pmapi.projectlib.model.entity.Project; | ||||
import com.ningdatech.pmapi.projectlib.model.entity.ProjectInst; | import com.ningdatech.pmapi.projectlib.model.entity.ProjectInst; | ||||
import com.ningdatech.pmapi.projectlib.service.IProjectInstService; | import com.ningdatech.pmapi.projectlib.service.IProjectInstService; | ||||
import com.ningdatech.pmapi.projectlib.service.IProjectService; | import com.ningdatech.pmapi.projectlib.service.IProjectService; | ||||
import com.ningdatech.pmapi.staging.enums.MsgTypeEnum; | |||||
import com.ningdatech.pmapi.staging.service.INdWorkNoticeStagingService; | |||||
import com.ningdatech.pmapi.sys.manage.EarlyWarningManage; | import com.ningdatech.pmapi.sys.manage.EarlyWarningManage; | ||||
import com.ningdatech.pmapi.sys.manage.NoticeManage; | |||||
import com.ningdatech.pmapi.sys.model.entity.Notify; | |||||
import com.ningdatech.pmapi.sys.model.entity.WflowEarlyWarningRecords; | |||||
import com.ningdatech.pmapi.sys.service.IEarlyWarningRecordsService; | |||||
import com.ningdatech.pmapi.sys.service.INotifyService; | |||||
import com.ningdatech.pmapi.todocenter.bean.entity.WorkNoticeInfo; | |||||
import com.ningdatech.pmapi.user.security.auth.model.UserFullInfoDTO; | |||||
import com.ningdatech.yxt.model.cmd.SendSmsCmd; | |||||
import com.wflow.enums.WarningRuleTypeEnum; | import com.wflow.enums.WarningRuleTypeEnum; | ||||
import com.wflow.workflow.notify.event.EarlyWarningEvent; | import com.wflow.workflow.notify.event.EarlyWarningEvent; | ||||
import lombok.RequiredArgsConstructor; | import lombok.RequiredArgsConstructor; | ||||
@@ -34,7 +21,6 @@ import org.flowable.engine.history.HistoricProcessInstance; | |||||
import org.springframework.context.event.EventListener; | import org.springframework.context.event.EventListener; | ||||
import org.springframework.scheduling.annotation.Async; | import org.springframework.scheduling.annotation.Async; | ||||
import org.springframework.stereotype.Component; | import org.springframework.stereotype.Component; | ||||
import java.time.LocalDateTime; | |||||
import java.time.ZoneId; | import java.time.ZoneId; | ||||
import java.util.List; | import java.util.List; | ||||
import java.util.Objects; | import java.util.Objects; | ||||
@@ -11,6 +11,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | |||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers; | import com.baomidou.mybatisplus.core.toolkit.Wrappers; | ||||
import com.ningdatech.log.mapper.OptLogMapper; | import com.ningdatech.log.mapper.OptLogMapper; | ||||
import com.ningdatech.log.model.domain.OptLog; | import com.ningdatech.log.model.domain.OptLog; | ||||
import com.ningdatech.pmapi.common.constant.BizConst; | |||||
import com.ningdatech.pmapi.organization.mapper.DingEmployeeInfoMapper; | import com.ningdatech.pmapi.organization.mapper.DingEmployeeInfoMapper; | ||||
import com.ningdatech.pmapi.organization.model.entity.DingEmployeeInfo; | import com.ningdatech.pmapi.organization.model.entity.DingEmployeeInfo; | ||||
import com.ningdatech.pmapi.scheduler.task.model.CommonLog; | import com.ningdatech.pmapi.scheduler.task.model.CommonLog; | ||||
@@ -79,7 +80,8 @@ public class CommonLogTask { | |||||
String employeeCode = userInfo.getEmployeeCode(); | String employeeCode = userInfo.getEmployeeCode(); | ||||
if (StringUtils.isNotBlank(employeeCode)){ | if (StringUtils.isNotBlank(employeeCode)){ | ||||
DingEmployeeInfo dingEmployeeInfo = dingEmployeeInfoMapper.selectOne(new LambdaQueryWrapper<DingEmployeeInfo>() | DingEmployeeInfo dingEmployeeInfo = dingEmployeeInfoMapper.selectOne(new LambdaQueryWrapper<DingEmployeeInfo>() | ||||
.eq(DingEmployeeInfo::getEmployeeCode,employeeCode)); | |||||
.eq(DingEmployeeInfo::getEmployeeCode,employeeCode) | |||||
.last(BizConst.LIMIT_1)); | |||||
if (dingEmployeeInfo != null){ | if (dingEmployeeInfo != null){ | ||||
commonLog.setUserId(String.valueOf(dingEmployeeInfo.getAccountId())); | commonLog.setUserId(String.valueOf(dingEmployeeInfo.getAccountId())); | ||||
} | } | ||||
@@ -0,0 +1,16 @@ | |||||
package com.ningdatech.pmapi.wps.contants; | |||||
/** | |||||
* @Classname WpsContant | |||||
* @Description | |||||
* @Date 2023/8/15 14:09 | |||||
* @Author PoffyZhang | |||||
*/ | |||||
public interface WpsContant { | |||||
String WPS_CONVERT_URL_ONLINE = "http://10.53.157.47"; | |||||
String FIX_FILE_PATH = "/opt/file/"; | |||||
String PDF_PATH = "/opt/file/offices2pdf.pdf"; | |||||
String PDF_CONTENT_TYPE = "application/pdf"; | |||||
String PDF_NAME = "offices2pdf.pdf"; | |||||
} |
@@ -0,0 +1,82 @@ | |||||
package com.ningdatech.pmapi.wps.controller; | |||||
import com.ningdatech.irs.service.IRefreshTokenService; | |||||
import com.ningdatech.pmapi.common.util.CryptUtils; | |||||
import com.ningdatech.pmapi.common.util.HttpUtil; | |||||
import com.ningdatech.pmapi.wps.manage.WpsConvertManage; | |||||
import io.swagger.annotations.Api; | |||||
import lombok.extern.slf4j.Slf4j; | |||||
import org.springframework.beans.factory.annotation.Autowired; | |||||
import org.springframework.beans.factory.annotation.Value; | |||||
import org.springframework.http.HttpMethod; | |||||
import org.springframework.http.ResponseEntity; | |||||
import org.springframework.http.client.HttpComponentsClientHttpRequestFactory; | |||||
import org.springframework.web.bind.annotation.GetMapping; | |||||
import org.springframework.web.bind.annotation.RequestMapping; | |||||
import org.springframework.web.bind.annotation.RequestParam; | |||||
import org.springframework.web.bind.annotation.RestController; | |||||
import org.springframework.web.client.RestTemplate; | |||||
import javax.servlet.http.HttpServletResponse; | |||||
import java.security.NoSuchAlgorithmException; | |||||
import java.util.Objects; | |||||
/** | |||||
* @Classname WpsConvertController | |||||
* @Description | |||||
* @Date 2023/8/14 13:58 | |||||
* @Author PoffyZhang | |||||
*/ | |||||
@Slf4j | |||||
@RestController | |||||
@Api(tags = "待办中心控制器") | |||||
@RequestMapping("/api/v1/wps-convert") | |||||
public class WpsConvertController { | |||||
@Autowired | |||||
private IRefreshTokenService refreshTokenService; | |||||
@Autowired | |||||
private WpsConvertManage wpsConvertManage; | |||||
@Value("${irs.interface-refresh.request-token-url}") | |||||
private String govRequestTokenUrl; | |||||
@Value("${irs.interface-refresh.refresh-token-url}") | |||||
private String govRefreshTokenUrl; | |||||
@GetMapping("/office2pdf") | |||||
public String office2pdf(){ | |||||
return wpsConvertManage.offs2Pdf(); | |||||
} | |||||
@GetMapping("/downloadToPdfStream") | |||||
public void downloadToPdfStream(@RequestParam Long fileId, HttpServletResponse response){ | |||||
wpsConvertManage.downloadToPdfStream(fileId,response); | |||||
} | |||||
@GetMapping("/test-core") | |||||
public String testCore() throws NoSuchAlgorithmException { | |||||
long timestamp = System.currentTimeMillis(); | |||||
String appSecret = "496f0f2a19994f76b4fd9dae087366c7"; | |||||
String appKey = "A331101453557202109017383"; | |||||
String secret = refreshTokenService.refreshToken(appKey, appSecret, govRequestTokenUrl, govRefreshTokenUrl, | |||||
"Fc3re2cq7r64Qfa7", HttpMethod.POST.name()); | |||||
String sign = CryptUtils.MD5Encode(appKey + secret + timestamp); | |||||
HttpComponentsClientHttpRequestFactory factory = HttpUtil.generateHttpRequestFactory(); | |||||
RestTemplate restTemplate; | |||||
if(Objects.nonNull(factory)){ | |||||
restTemplate = new RestTemplate(factory); | |||||
}else{ | |||||
restTemplate = new RestTemplate(); | |||||
} | |||||
String url = "https://interface.zjzwfw.gov.cn/gateway/api/001008012012001/dataSharing/Fc3re2cq7r64Qfa7.htm?" + | |||||
"dingCode=&matterName=&oid=&useState=1&limit=1000&page=1" + | |||||
"&appKey=" + appKey + "&sign=" + sign + "&requestTime=" + timestamp; | |||||
ResponseEntity<String> forEntity = restTemplate.getForEntity(url, String.class); | |||||
log.info(forEntity.getBody()); | |||||
return forEntity.getBody(); | |||||
} | |||||
} |
@@ -0,0 +1,175 @@ | |||||
package com.ningdatech.pmapi.wps.manage; | |||||
import cn.hutool.core.util.CharsetUtil; | |||||
import com.aliyun.oss.OSS; | |||||
import com.aliyun.oss.OSSClientBuilder; | |||||
import com.aliyun.oss.model.OSSObject; | |||||
import com.aliyun.oss.model.ObjectMetadata; | |||||
import com.ningdatech.file.properties.FileServerProperties; | |||||
import com.ningdatech.file.service.FileService; | |||||
import com.ningdatech.pmapi.common.constant.BizConst; | |||||
import com.ningdatech.pmapi.wps.contants.WpsContant; | |||||
import com.suwell.ofd.custom.agent.AtomAgent; | |||||
import lombok.RequiredArgsConstructor; | |||||
import lombok.extern.slf4j.Slf4j; | |||||
import org.springframework.beans.factory.annotation.Value; | |||||
import org.springframework.boot.context.properties.EnableConfigurationProperties; | |||||
import org.springframework.stereotype.Component; | |||||
import javax.annotation.Resource; | |||||
import javax.servlet.ServletOutputStream; | |||||
import javax.servlet.http.HttpServletResponse; | |||||
import java.io.*; | |||||
import java.net.URLEncoder; | |||||
import java.nio.file.Path; | |||||
import java.util.ArrayList; | |||||
import java.util.List; | |||||
/** | |||||
* @Classname WpsConvertManage | |||||
* @Description | |||||
* @Date 2023/8/14 13:42 | |||||
* @Author PoffyZhang | |||||
*/ | |||||
@Slf4j | |||||
@Component | |||||
@RequiredArgsConstructor | |||||
public class WpsConvertManage { | |||||
@Resource | |||||
private FileService fileService; | |||||
private final FileServerProperties fileServerProperties; | |||||
@Value("${spring.profiles.active}") | |||||
private String active; | |||||
// HTTPAgent ha = new HTTPAgent("http://127.0.0.1:8090"); | |||||
//2、定义方法实现 多个文件合并转为1个pdf文件 | |||||
public String offs2Pdf() { | |||||
AtomAgent ha = new AtomAgent("http://10.53.157.47"); | |||||
try { | |||||
//2-1、传参文件对象转换输出PDF文件 | |||||
//1)、定义集合,存储待转换的原文件 | |||||
List<File> fileList =new ArrayList<File>(); | |||||
//2)、定义转换后的pdf文件输出流 | |||||
OutputStream out = null; | |||||
//3)、添加原文件到集合 | |||||
fileList.add(new File("/temp/111.xlsx")); | |||||
// fileList.add(new File("D:/cs.doc")); | |||||
// fileList.add(new File("D:/a.pdf")); | |||||
// fileList.add(new File("D:\\555.ofd")); | |||||
//4)、赋值转换后的pdf文件输出流 | |||||
out=new FileOutputStream(new File("/temp/offices2_pdf.pdf")); | |||||
//5)、调用方法,执行将多个文件转为pdf文件 | |||||
ha.OFDToPDF(fileList, out); | |||||
//2-2、传参文件流转换输出PDF文件(与2-1二选一即可) | |||||
//1)、定义集合,存储待转换的原文件(支持传文件流) | |||||
// Param[] params = new Param[] { | |||||
// new Param(PackEntry.wrap(new FileInputStream("D:\\temp\\111.ofd")), "ofd"), | |||||
// new Param(PackEntry.wrap(new FileInputStream("D:\\2.ofd")), "ofd"), | |||||
// new Param(PackEntry.wrap(new FileInputStream("D:\\T3.txt")), "txt") | |||||
// }; | |||||
//2)、赋值转换后的pdf文件输出流 | |||||
// out=new FileOutputStream(new File("D:/convert/offices_pdf.pdf")); | |||||
//3)、调用方法,执行将多个文件转为pdf文件 | |||||
// ha.OFDToPDF(params,out); | |||||
return "转换成功"; | |||||
} catch (Exception e) { | |||||
log.error(e.getMessage()); | |||||
} finally { | |||||
try { | |||||
//2-6、关闭资源 | |||||
ha.close(); | |||||
} catch (IOException e) { | |||||
e.printStackTrace(); | |||||
} | |||||
} | |||||
return "转换失败"; | |||||
} | |||||
public void downloadToPdfStream(Long fileId, HttpServletResponse response) { | |||||
com.ningdatech.file.entity.File file = fileService.getById(fileId); | |||||
downloadAndToPdf(file, response); | |||||
} | |||||
private void downloadAndToPdf(com.ningdatech.file.entity.File file, HttpServletResponse response) { | |||||
OSS oss = new OSSClientBuilder().build(fileServerProperties.getAli().getEndpoint(), fileServerProperties.getAli().getAccessKeyId(), fileServerProperties.getAli().getAccessKeySecret()); | |||||
AtomAgent ha = new AtomAgent(WpsContant.WPS_CONVERT_URL_ONLINE); | |||||
try (OSSObject ossObject = oss.getObject(file.getBucket(), file.getPath()); | |||||
InputStream stream = ossObject.getObjectContent(); | |||||
ServletOutputStream outputStream = response.getOutputStream()) { | |||||
String fileName = null; | |||||
byte[] bytes = new byte[4096]; | |||||
int read; | |||||
//测试环境 转不了PDF 请求不了 WPS转换服务器 | |||||
if(BizConst.DEV.equals(active)){ | |||||
ObjectMetadata metadata = ossObject.getObjectMetadata(); | |||||
response.setContentType(metadata.getContentType()); | |||||
fileName = URLEncoder.encode(file.getOriginalFileName(), CharsetUtil.UTF_8); | |||||
response.setHeader("Content-Disposition", "attachment;filename*=utf-8''" + fileName); | |||||
while ((read = stream.read(bytes)) != -1) { | |||||
outputStream.write(bytes, 0, read); | |||||
} | |||||
}else if(BizConst.PRE.equals(active) || | |||||
BizConst.PROD.equals(active)){ | |||||
String filePath = WpsContant.FIX_FILE_PATH + file.getOriginalFileName(); | |||||
convert(stream,filePath); | |||||
//转换PDF | |||||
List<File> fileList =new ArrayList<File>(); | |||||
//2)、定义转换后的pdf文件输出流 | |||||
OutputStream out = null; | |||||
//3)、添加原文件到集合 | |||||
fileList.add(new File(filePath)); | |||||
//4)、赋值转换后的pdf文件输出流 | |||||
File pdfFile = new File(WpsContant.PDF_PATH); | |||||
out = new FileOutputStream(pdfFile); | |||||
//5)、调用方法,执行将多个文件转为pdf文件 | |||||
ha.OFDToPDF(fileList, out); | |||||
FileInputStream fileInputStream = new FileInputStream(pdfFile); | |||||
response.setContentType(WpsContant.PDF_CONTENT_TYPE); | |||||
fileName = URLEncoder.encode(WpsContant.PDF_NAME, CharsetUtil.UTF_8); | |||||
response.setHeader("Content-Disposition", "attachment;filename*=utf-8''" + fileName); | |||||
while ((read = fileInputStream.read(bytes)) != -1) { | |||||
outputStream.write(bytes, 0, read); | |||||
} | |||||
for(File f : fileList){ | |||||
//用完就删 | |||||
f.deleteOnExit(); | |||||
} | |||||
} | |||||
outputStream.flush(); | |||||
}catch (Exception e){ | |||||
log.error(e.getMessage()); | |||||
}finally { | |||||
oss.shutdown(); | |||||
try { | |||||
ha.close(); | |||||
} catch (IOException e) { | |||||
log.error(e.getMessage()); | |||||
} | |||||
} | |||||
} | |||||
public static void convert(InputStream inputStream, String filePath) { | |||||
try { | |||||
File file = new File(filePath); | |||||
FileOutputStream outputStream = new FileOutputStream(file); | |||||
int bytesRead; | |||||
byte[] buffer = new byte[1024]; | |||||
while ((bytesRead = inputStream.read(buffer)) != -1) { | |||||
outputStream.write(buffer, 0, bytesRead); | |||||
} | |||||
outputStream.close(); | |||||
inputStream.close(); | |||||
} catch (IOException e) { | |||||
e.printStackTrace(); | |||||
} | |||||
} | |||||
} |
@@ -0,0 +1,5 @@ | |||||
package com.ningdatech.pmapi.wps.service; | |||||
public interface IConvertService { | |||||
} |
@@ -0,0 +1,19 @@ | |||||
package com.ningdatech.pmapi.wps.service.impl; | |||||
import com.ningdatech.pmapi.wps.service.IConvertService; | |||||
import lombok.extern.slf4j.Slf4j; | |||||
import org.springframework.stereotype.Service; | |||||
/** | |||||
* @Classname ConvertService | |||||
* @Description | |||||
* @Date 2023/8/15 10:56 | |||||
* @Author PoffyZhang | |||||
*/ | |||||
@Service | |||||
@Slf4j | |||||
public class ConvertService implements IConvertService { | |||||
} |
@@ -41,53 +41,29 @@ spring: | |||||
hibernate: | hibernate: | ||||
ddl-auto: update | ddl-auto: update | ||||
datasource: | datasource: | ||||
type: com.alibaba.druid.pool.DruidDataSource | |||||
type: com.zaxxer.hikari.HikariDataSource | |||||
driverClassName: com.kingbase8.Driver | driverClassName: com.kingbase8.Driver | ||||
url: jdbc:kingbase8://120.26.44.207:54321/nd_project_management?zeroDateTimeBehavior=convertToNull&useUnicode=true&characterEncoding=utf-8 | |||||
username: SYSTEM | |||||
password: Ndkj1234 | |||||
# 数据源 | # 数据源 | ||||
druid: | |||||
url: jdbc:kingbase8://120.26.44.207:54321/nd_project_management?zeroDateTimeBehavior=convertToNull&useUnicode=true&characterEncoding=utf-8 | |||||
username: SYSTEM | |||||
password: Ndkj1234 | |||||
# 初始连接数 | |||||
initialSize: 5 | |||||
# 最小连接池数量 | |||||
minIdle: 10 | |||||
# 最大连接池数量 | |||||
maxActive: 20 | |||||
# 配置获取连接等待超时的时间 | |||||
maxWait: 60000 | |||||
# 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒 | |||||
timeBetweenEvictionRunsMillis: 60000 | |||||
# 配置一个连接在池中最小生存的时间,单位是毫秒 | |||||
minEvictableIdleTimeMillis: 300000 | |||||
# 配置一个连接在池中最大生存的时间,单位是毫秒 | |||||
maxEvictableIdleTimeMillis: 900000 | |||||
# 配置检测连接是否有效 | |||||
#mysql使用:SELECT 1 FROM DUAL | |||||
validationQuery: SELECT 1 | |||||
testWhileIdle: true | |||||
testOnBorrow: false | |||||
testOnReturn: false | |||||
webStatFilter: | |||||
enabled: true | |||||
statViewServlet: | |||||
enabled: true | |||||
# 设置白名单,不填则允许所有访问 | |||||
allow: | |||||
url-pattern: /druid/* | |||||
# 控制台管理用户名和密码 | |||||
login-username: admin | |||||
login-password: admin | |||||
filter: | |||||
stat: | |||||
enabled: true | |||||
# 慢SQL记录 | |||||
log-slow-sql: true | |||||
slow-sql-millis: 1000 | |||||
merge-sql: true | |||||
wall: | |||||
config: | |||||
multi-statement-allow: true | |||||
hikari: | |||||
# 是客户端等待连接池连接的最大毫秒数 | |||||
connection-timeout: 30000 | |||||
# 是允许连接在连接池中空闲的最长时间 | |||||
minimum-idle: 5 | |||||
# 配置最大池大小 | |||||
maximum-pool-size: 20 | |||||
# 是允许连接在连接池中空闲的最长时间(以毫秒为单位) | |||||
idle-timeout: 60000 | |||||
# 池中连接关闭后的最长生命周期(以毫秒为单位) | |||||
max-lifetime: 600000 | |||||
# 配置从池返回的连接的默认自动提交行为。默认值为true。 | |||||
auto-commit: true | |||||
# 开启连接监测泄露 | |||||
leak-detection-threshold: 5000 | |||||
# 测试连接数据库 | |||||
connection-test-query: SELECT 1 | |||||
#设置上传 单个文件的大小 | #设置上传 单个文件的大小 | ||||
servlet: | servlet: | ||||
multipart: | multipart: | ||||
@@ -240,6 +216,11 @@ irs: | |||||
interfaceName: 3XN9R93Pva6db7sf | interfaceName: 3XN9R93Pva6db7sf | ||||
appSecret: 496f0f2a19994f76b4fd9dae087366c7 | appSecret: 496f0f2a19994f76b4fd9dae087366c7 | ||||
appKey: A331101453557202109017383 | appKey: A331101453557202109017383 | ||||
core-biz: | |||||
url: https://interface.zjzwfw.gov.cn/gateway/api/001008012012001/dataSharing/Fc3re2cq7r64Qfa7.htm | |||||
interfaceName: Fc3re2cq7r64Qfa7 | |||||
appSecret: 496f0f2a19994f76b4fd9dae087366c7 | |||||
appKey: A331101453557202109017383 | |||||
interface-refresh: | interface-refresh: | ||||
method: POST | method: POST | ||||
request-token-url: https://interface.zjzwfw.gov.cn/gateway/app/refreshTokenByKey.htm?appKey={appKey}&requestTime={requestTime}&sign={sign} | request-token-url: https://interface.zjzwfw.gov.cn/gateway/app/refreshTokenByKey.htm?appKey={appKey}&requestTime={requestTime}&sign={sign} | ||||
@@ -40,53 +40,29 @@ spring: | |||||
hibernate: | hibernate: | ||||
ddl-auto: update | ddl-auto: update | ||||
datasource: | datasource: | ||||
type: com.alibaba.druid.pool.DruidDataSource | |||||
type: com.zaxxer.hikari.HikariDataSource | |||||
driverClassName: com.kingbase8.Driver | driverClassName: com.kingbase8.Driver | ||||
url: jdbc:kingbase8://10.53.168.41:54321/nd_project_management?zeroDateTimeBehavior=convertToNull&useUnicode=true&characterEncoding=utf-8&nullCatalogMeansCurrent=true | |||||
username: SYSTEM | |||||
password: Ndkj1234 | |||||
# 数据源 | # 数据源 | ||||
druid: | |||||
url: jdbc:kingbase8://10.53.168.41:54321/nd_project_management?zeroDateTimeBehavior=convertToNull&useUnicode=true&characterEncoding=utf-8&nullCatalogMeansCurrent=true | |||||
username: SYSTEM | |||||
password: Ndkj1234 | |||||
# 初始连接数 | |||||
initialSize: 5 | |||||
# 最小连接池数量 | |||||
minIdle: 10 | |||||
# 最大连接池数量 | |||||
maxActive: 20 | |||||
# 配置获取连接等待超时的时间 | |||||
maxWait: 60000 | |||||
# 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒 | |||||
timeBetweenEvictionRunsMillis: 60000 | |||||
# 配置一个连接在池中最小生存的时间,单位是毫秒 | |||||
minEvictableIdleTimeMillis: 300000 | |||||
# 配置一个连接在池中最大生存的时间,单位是毫秒 | |||||
maxEvictableIdleTimeMillis: 900000 | |||||
# 配置检测连接是否有效 | |||||
#mysql使用:SELECT 1 FROM DUAL | |||||
validationQuery: SELECT 1 | |||||
testWhileIdle: true | |||||
testOnBorrow: false | |||||
testOnReturn: false | |||||
webStatFilter: | |||||
enabled: true | |||||
statViewServlet: | |||||
enabled: true | |||||
# 设置白名单,不填则允许所有访问 | |||||
allow: | |||||
url-pattern: /druid/* | |||||
# 控制台管理用户名和密码 | |||||
login-username: admin | |||||
login-password: admin | |||||
filter: | |||||
stat: | |||||
enabled: true | |||||
# 慢SQL记录 | |||||
log-slow-sql: true | |||||
slow-sql-millis: 1000 | |||||
merge-sql: true | |||||
wall: | |||||
config: | |||||
multi-statement-allow: true | |||||
hikari: | |||||
# 是客户端等待连接池连接的最大毫秒数 | |||||
connection-timeout: 30000 | |||||
# 是允许连接在连接池中空闲的最长时间 | |||||
minimum-idle: 10 | |||||
# 配置最大池大小 | |||||
maximum-pool-size: 20 | |||||
# 是允许连接在连接池中空闲的最长时间(以毫秒为单位) | |||||
idle-timeout: 60000 | |||||
# 池中连接关闭后的最长生命周期(以毫秒为单位) | |||||
max-lifetime: 600000 | |||||
# 配置从池返回的连接的默认自动提交行为。默认值为true。 | |||||
auto-commit: true | |||||
# 开启连接监测泄露 | |||||
leak-detection-threshold: 5000 | |||||
# 测试连接数据库 | |||||
connection-test-query: SELECT 1 | |||||
#设置上传 单个文件的大小 | #设置上传 单个文件的大小 | ||||
servlet: | servlet: | ||||
multipart: | multipart: | ||||
@@ -243,6 +219,11 @@ irs: | |||||
interfaceName: 3XN9R93Pva6db7sf | interfaceName: 3XN9R93Pva6db7sf | ||||
appSecret: 496f0f2a19994f76b4fd9dae087366c7 | appSecret: 496f0f2a19994f76b4fd9dae087366c7 | ||||
appKey: A331101453557202109017383 | appKey: A331101453557202109017383 | ||||
core-biz: | |||||
url: https://interface.zjzwfw.gov.cn/gateway/api/001008012012001/dataSharing/Fc3re2cq7r64Qfa7.htm | |||||
interfaceName: Fc3re2cq7r64Qfa7 | |||||
appSecret: 496f0f2a19994f76b4fd9dae087366c7 | |||||
appKey: A331101453557202109017383 | |||||
interface-refresh: | interface-refresh: | ||||
method: POST | method: POST | ||||
request-token-url: https://interface.zjzwfw.gov.cn/gateway/app/refreshTokenByKey.htm?appKey={appKey}&requestTime={requestTime}&sign={sign} | request-token-url: https://interface.zjzwfw.gov.cn/gateway/app/refreshTokenByKey.htm?appKey={appKey}&requestTime={requestTime}&sign={sign} | ||||
@@ -40,53 +40,29 @@ spring: | |||||
hibernate: | hibernate: | ||||
ddl-auto: update | ddl-auto: update | ||||
datasource: | datasource: | ||||
type: com.alibaba.druid.pool.DruidDataSource | |||||
type: com.zaxxer.hikari.HikariDataSource | |||||
driverClassName: com.kingbase8.Driver | driverClassName: com.kingbase8.Driver | ||||
url: jdbc:kingbase8://10.53.172.221:54321/nd_project_management?zeroDateTimeBehavior=convertToNull&useUnicode=true&characterEncoding=utf-8&nullCatalogMeansCurrent=true | |||||
username: SYSTEM | |||||
password: Ndkj1234 | |||||
# 数据源 | # 数据源 | ||||
druid: | |||||
url: jdbc:kingbase8://10.53.172.221:54321/nd_project_management?zeroDateTimeBehavior=convertToNull&useUnicode=true&characterEncoding=utf-8&nullCatalogMeansCurrent=true | |||||
username: SYSTEM | |||||
password: Ndkj1234 | |||||
# 初始连接数 | |||||
initialSize: 5 | |||||
# 最小连接池数量 | |||||
minIdle: 10 | |||||
# 最大连接池数量 | |||||
maxActive: 20 | |||||
# 配置获取连接等待超时的时间 | |||||
maxWait: 60000 | |||||
# 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒 | |||||
timeBetweenEvictionRunsMillis: 60000 | |||||
# 配置一个连接在池中最小生存的时间,单位是毫秒 | |||||
minEvictableIdleTimeMillis: 300000 | |||||
# 配置一个连接在池中最大生存的时间,单位是毫秒 | |||||
maxEvictableIdleTimeMillis: 900000 | |||||
# 配置检测连接是否有效 | |||||
#mysql使用:SELECT 1 FROM DUAL | |||||
validationQuery: SELECT 1 | |||||
testWhileIdle: true | |||||
testOnBorrow: false | |||||
testOnReturn: false | |||||
webStatFilter: | |||||
enabled: true | |||||
statViewServlet: | |||||
enabled: true | |||||
# 设置白名单,不填则允许所有访问 | |||||
allow: | |||||
url-pattern: /druid/* | |||||
# 控制台管理用户名和密码 | |||||
login-username: admin | |||||
login-password: admin | |||||
filter: | |||||
stat: | |||||
enabled: true | |||||
# 慢SQL记录 | |||||
log-slow-sql: true | |||||
slow-sql-millis: 1000 | |||||
merge-sql: true | |||||
wall: | |||||
config: | |||||
multi-statement-allow: true | |||||
hikari: | |||||
# 是客户端等待连接池连接的最大毫秒数 | |||||
connection-timeout: 30000 | |||||
# 是允许连接在连接池中空闲的最长时间 | |||||
minimum-idle: 10 | |||||
# 配置最大池大小 | |||||
maximum-pool-size: 20 | |||||
# 是允许连接在连接池中空闲的最长时间(以毫秒为单位) | |||||
idle-timeout: 60000 | |||||
# 池中连接关闭后的最长生命周期(以毫秒为单位) | |||||
max-lifetime: 600000 | |||||
# 配置从池返回的连接的默认自动提交行为。默认值为true。 | |||||
auto-commit: true | |||||
# 开启连接监测泄露 | |||||
leak-detection-threshold: 5000 | |||||
# 测试连接数据库 | |||||
connection-test-query: SELECT 1 | |||||
#设置上传 单个文件的大小 | #设置上传 单个文件的大小 | ||||
servlet: | servlet: | ||||
multipart: | multipart: | ||||
@@ -145,7 +121,7 @@ flowable: | |||||
async-executor-activate: true | async-executor-activate: true | ||||
#关闭一些不需要的功能服务 | #关闭一些不需要的功能服务 | ||||
rest-api-enabled: false | rest-api-enabled: false | ||||
# database-schema-update: false | |||||
# database-schema-update: false | |||||
idm: | idm: | ||||
enabled: false | enabled: false | ||||
common: | common: | ||||
@@ -243,6 +219,11 @@ irs: | |||||
interfaceName: 3XN9R93Pva6db7sf | interfaceName: 3XN9R93Pva6db7sf | ||||
appSecret: 496f0f2a19994f76b4fd9dae087366c7 | appSecret: 496f0f2a19994f76b4fd9dae087366c7 | ||||
appKey: A331101453557202109017383 | appKey: A331101453557202109017383 | ||||
core-biz: | |||||
url: https://interface.zjzwfw.gov.cn/gateway/api/001008012012001/dataSharing/Fc3re2cq7r64Qfa7.htm | |||||
interfaceName: Fc3re2cq7r64Qfa7 | |||||
appSecret: 496f0f2a19994f76b4fd9dae087366c7 | |||||
appKey: A331101453557202109017383 | |||||
interface-refresh: | interface-refresh: | ||||
method: POST | method: POST | ||||
request-token-url: https://interface.zjzwfw.gov.cn/gateway/app/refreshTokenByKey.htm?appKey={appKey}&requestTime={requestTime}&sign={sign} | request-token-url: https://interface.zjzwfw.gov.cn/gateway/app/refreshTokenByKey.htm?appKey={appKey}&requestTime={requestTime}&sign={sign} | ||||
@@ -36,6 +36,7 @@ security: | |||||
- /file/download | - /file/download | ||||
- /api/v1/zwdd/pull/** | - /api/v1/zwdd/pull/** | ||||
- /api/v1/irs/** | - /api/v1/irs/** | ||||
- /api/v1/wps-convert/** | |||||
ignore-csrf-urls: | ignore-csrf-urls: | ||||
- /api/v1/user/auth/** | - /api/v1/user/auth/** | ||||
- /v2/api-docs | - /v2/api-docs | ||||
@@ -64,6 +65,7 @@ security: | |||||
- /file/download | - /file/download | ||||
- /api/v1/zwdd/pull/** | - /api/v1/zwdd/pull/** | ||||
- /api/v1/irs/** | - /api/v1/irs/** | ||||
- /api/v1/wps-convert/** | |||||
role-map: | role-map: | ||||
"engineer": | "engineer": | ||||
"project_manager": | "project_manager": | ||||
@@ -36,6 +36,7 @@ security: | |||||
- /file/download | - /file/download | ||||
- /api/v1/zwdd/pull/** | - /api/v1/zwdd/pull/** | ||||
- /api/v1/irs/** | - /api/v1/irs/** | ||||
- /api/v1/wps-convert/** | |||||
ignore-csrf-urls: | ignore-csrf-urls: | ||||
- /api/v1/user/auth/** | - /api/v1/user/auth/** | ||||
- /v2/api-docs | - /v2/api-docs | ||||
@@ -64,6 +65,7 @@ security: | |||||
- /file/download | - /file/download | ||||
- /api/v1/zwdd/pull/** | - /api/v1/zwdd/pull/** | ||||
- /api/v1/irs/** | - /api/v1/irs/** | ||||
- /api/v1/wps-convert/** | |||||
role-map: | role-map: | ||||
"engineer": | "engineer": | ||||
"project_manager": | "project_manager": | ||||
@@ -36,6 +36,7 @@ security: | |||||
- /file/download | - /file/download | ||||
- /api/v1/zwdd/pull/** | - /api/v1/zwdd/pull/** | ||||
- /api/v1/irs/** | - /api/v1/irs/** | ||||
- /api/v1/wps-convert/** | |||||
ignore-csrf-urls: | ignore-csrf-urls: | ||||
- /api/v1/user/auth/** | - /api/v1/user/auth/** | ||||
- /v2/api-docs | - /v2/api-docs | ||||
@@ -64,6 +65,7 @@ security: | |||||
- /file/download | - /file/download | ||||
- /api/v1/zwdd/pull/** | - /api/v1/zwdd/pull/** | ||||
- /api/v1/irs/** | - /api/v1/irs/** | ||||
- /api/v1/wps-convert/** | |||||
role-map: | role-map: | ||||
"engineer": | "engineer": | ||||
"project_manager": | "project_manager": | ||||
@@ -0,0 +1,60 @@ | |||||
package com.ningdatech.pmapi.irs; | |||||
import com.ningdatech.irs.service.IRefreshTokenService; | |||||
import com.ningdatech.pmapi.AppTests; | |||||
import com.ningdatech.pmapi.common.util.CryptUtils; | |||||
import com.ningdatech.pmapi.common.util.HttpUtil; | |||||
import lombok.extern.slf4j.Slf4j; | |||||
import org.junit.Test; | |||||
import org.springframework.beans.factory.annotation.Value; | |||||
import org.springframework.http.HttpMethod; | |||||
import org.springframework.http.ResponseEntity; | |||||
import org.springframework.http.client.HttpComponentsClientHttpRequestFactory; | |||||
import org.springframework.web.client.RestTemplate; | |||||
import javax.annotation.Resource; | |||||
import java.security.NoSuchAlgorithmException; | |||||
import java.util.Objects; | |||||
/** | |||||
* @Classname irsTest3 | |||||
* @Description | |||||
* @Date 2023/7/25 9:52 | |||||
* @Author PoffyZhang | |||||
*/ | |||||
@Slf4j | |||||
public class irsTest4 extends AppTests { | |||||
@Resource | |||||
private IRefreshTokenService refreshTokenService; | |||||
@Value("${irs.interface-refresh.request-token-url}") | |||||
private String govRequestTokenUrl; | |||||
@Value("${irs.interface-refresh.refresh-token-url}") | |||||
private String govRefreshTokenUrl; | |||||
@Test | |||||
public void test1() throws NoSuchAlgorithmException { | |||||
long timestamp = System.currentTimeMillis(); | |||||
String appSecret = "496f0f2a19994f76b4fd9dae087366c7"; | |||||
String appKey = "A331101453557202109017383"; | |||||
String dataName = "大数据管理局"; | |||||
String secret = refreshTokenService.refreshToken(appKey, appSecret, govRequestTokenUrl, govRefreshTokenUrl, | |||||
"Fc3re2cq7r64Qfa7", HttpMethod.POST.name()); | |||||
String sign = CryptUtils.MD5Encode(appKey + secret + timestamp); | |||||
HttpComponentsClientHttpRequestFactory factory = HttpUtil.generateHttpRequestFactory(); | |||||
RestTemplate restTemplate; | |||||
if(Objects.nonNull(factory)){ | |||||
restTemplate = new RestTemplate(factory); | |||||
}else{ | |||||
restTemplate = new RestTemplate(); | |||||
} | |||||
String url = "https://interface.zjzwfw.gov.cn/gateway/api/001008012012001/dataSharing/Fc3re2cq7r64Qfa7.htm?" + | |||||
"dingCode=&matterName=&oid=&useState=1&limit=1000&page=1" + | |||||
"&appKey=" + appKey + "&sign=" + sign + "&requestTime=" + timestamp; | |||||
ResponseEntity<String> forEntity = restTemplate.getForEntity(url, String.class); | |||||
System.out.println(forEntity.getBody()); | |||||
} | |||||
} |
@@ -1,13 +1,23 @@ | |||||
package com.ningdatech.pmapi.org; | package com.ningdatech.pmapi.org; | ||||
import cn.hutool.core.collection.CollUtil; | import cn.hutool.core.collection.CollUtil; | ||||
import cn.hutool.core.map.MapUtil; | |||||
import cn.hutool.core.util.StrUtil; | |||||
import cn.hutool.extra.spring.SpringUtil; | |||||
import cn.hutool.poi.excel.ExcelReader; | |||||
import cn.hutool.poi.excel.ExcelUtil; | |||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers; | import com.baomidou.mybatisplus.core.toolkit.Wrappers; | ||||
import com.ningdatech.basic.util.SpringUtils; | |||||
import com.ningdatech.pmapi.AppTests; | import com.ningdatech.pmapi.AppTests; | ||||
import com.ningdatech.pmapi.gov.entity.BelongOrg; | |||||
import com.ningdatech.pmapi.gov.enumeration.BelongTypeEnum; | |||||
import com.ningdatech.pmapi.gov.service.IBelongOrgService; | |||||
import com.ningdatech.pmapi.organization.model.entity.DingOrganization; | import com.ningdatech.pmapi.organization.model.entity.DingOrganization; | ||||
import com.ningdatech.pmapi.organization.service.IDingOrganizationService; | import com.ningdatech.pmapi.organization.service.IDingOrganizationService; | ||||
import org.junit.Test; | import org.junit.Test; | ||||
import org.springframework.beans.factory.annotation.Autowired; | import org.springframework.beans.factory.annotation.Autowired; | ||||
import java.util.List; | |||||
import java.util.*; | |||||
/** | /** | ||||
* @Classname RegionTest | * @Classname RegionTest | ||||
@@ -19,16 +29,18 @@ public class OrgTest extends AppTests { | |||||
@Autowired | @Autowired | ||||
private IDingOrganizationService organizationService; | private IDingOrganizationService organizationService; | ||||
@Autowired | |||||
private IBelongOrgService belongOrgService; | |||||
@Test | @Test | ||||
public void test(){ | |||||
public void test() { | |||||
List<DingOrganization> orgs = organizationService.list(Wrappers.lambdaQuery(DingOrganization.class) | List<DingOrganization> orgs = organizationService.list(Wrappers.lambdaQuery(DingOrganization.class) | ||||
.eq(DingOrganization::getDivisionCode, "331199")); | .eq(DingOrganization::getDivisionCode, "331199")); | ||||
for(DingOrganization org : orgs){ | |||||
for (DingOrganization org : orgs) { | |||||
List<DingOrganization> inners = organizationService.list(Wrappers.lambdaQuery(DingOrganization.class) | List<DingOrganization> inners = organizationService.list(Wrappers.lambdaQuery(DingOrganization.class) | ||||
.eq(DingOrganization::getParentCode, org.getOrganizationCode())); | .eq(DingOrganization::getParentCode, org.getOrganizationCode())); | ||||
for(DingOrganization inner : inners){ | |||||
for (DingOrganization inner : inners) { | |||||
mergeRegionCode(inner); | mergeRegionCode(inner); | ||||
} | } | ||||
} | } | ||||
@@ -40,12 +52,62 @@ public class OrgTest extends AppTests { | |||||
List<DingOrganization> is = organizationService.list(Wrappers.lambdaQuery(DingOrganization.class) | List<DingOrganization> is = organizationService.list(Wrappers.lambdaQuery(DingOrganization.class) | ||||
.eq(DingOrganization::getParentCode, inner.getOrganizationCode())); | .eq(DingOrganization::getParentCode, inner.getOrganizationCode())); | ||||
if(CollUtil.isEmpty(is)){ | |||||
if (CollUtil.isEmpty(is)) { | |||||
return; | return; | ||||
} | } | ||||
for(DingOrganization i : is){ | |||||
for (DingOrganization i : is) { | |||||
mergeRegionCode(i); | mergeRegionCode(i); | ||||
} | } | ||||
} | } | ||||
@Test | |||||
public void businessStrip() { | |||||
String path = "/Users/wendy/Desktop/省市县条线单位梳理202303016.xlsx"; | |||||
ExcelReader reader = ExcelUtil.getReader(path); | |||||
Set<String> orgCodes = new HashSet<>(); | |||||
List<BelongOrg> belongOrgs = new ArrayList<>(); | |||||
for (int i = 0; i < reader.getSheetCount(); i++) { | |||||
reader.setSheet(i); | |||||
List<Map<String, Object>> maps = reader.readAll(); | |||||
for (Map<String, Object> map : maps) { | |||||
String cityName = MapUtil.getStr(map, "市级组织名称"); | |||||
if (cityName == null || !cityName.contains("丽水")) { | |||||
continue; | |||||
} | |||||
String cityCode = MapUtil.getStr(map, "市级组织机构代码"); | |||||
if (StrUtil.isBlank(cityCode)) { | |||||
continue; | |||||
} | |||||
String countyName = MapUtil.getStr(map, "区县组织名称"); | |||||
if (StrUtil.isBlank(countyName)) { | |||||
continue; | |||||
} | |||||
String countyCode = MapUtil.getStr(map, "区县组织机构代码"); | |||||
if (StrUtil.isBlank(countyCode)) { | |||||
continue; | |||||
} | |||||
System.out.printf("市级:%s -> %s 区县:%s -> %s\n", cityName, cityCode, countyName, countyCode); | |||||
BelongOrg county = new BelongOrg(); | |||||
county.setBelongCode(cityCode); | |||||
county.setBelongName(cityName); | |||||
county.setOrgCode(countyCode); | |||||
county.setOrgName(countyName); | |||||
county.setOrgType(BelongTypeEnum.ORGANIZATION.name()); | |||||
belongOrgs.add(county); | |||||
if (!orgCodes.add(cityCode)) { | |||||
continue; | |||||
} | |||||
BelongOrg city = new BelongOrg(); | |||||
city.setBelongCode(cityCode); | |||||
city.setBelongName(cityName); | |||||
city.setOrgCode(cityCode); | |||||
city.setOrgName(cityName); | |||||
city.setOrgType(BelongTypeEnum.GOV_BUSINESS_STRIP.name()); | |||||
belongOrgs.add(city); | |||||
} | |||||
belongOrgs.forEach(System.out::println); | |||||
} | |||||
belongOrgService.saveBatch(belongOrgs); | |||||
} | |||||
} | } |
@@ -182,7 +182,7 @@ organization: | |||||
- GO_ff70e47bae684fdba0d64f4acab85661 | - GO_ff70e47bae684fdba0d64f4acab85661 | ||||
yxt: | yxt: | ||||
# wsdl-url: http://115.239.137.23:9501/ws/v1?wsdl | |||||
# wsdl-url: http://115.239.137.23:9501/ws/v1?wsdl | |||||
wsdl-url: classpath:/wsdl.xml | wsdl-url: classpath:/wsdl.xml | ||||
#账号 | #账号 | ||||
user-code: hzndkj | user-code: hzndkj | ||||
@@ -194,7 +194,7 @@ yxt: | |||||
#省局联审 请求信息 | #省局联审 请求信息 | ||||
provincial: | provincial: | ||||
# host: http://zj.ningdatech.com/prometheus-zhejiang_foreign | |||||
# host: http://zj.ningdatech.com/prometheus-zhejiang_foreign | |||||
host: http://223.4.72.75/prometheus-zhejiang_foreign | host: http://223.4.72.75/prometheus-zhejiang_foreign | ||||
pushUrl: /api/v1/foreign/importantPro | pushUrl: /api/v1/foreign/importantPro | ||||
detailUrl: /api/v1/foreign/importantProView | detailUrl: /api/v1/foreign/importantProView | ||||
@@ -208,7 +208,7 @@ irs: | |||||
is-search-app: false | is-search-app: false | ||||
digital-resource-indicators: | digital-resource-indicators: | ||||
url: https://interface.zjzwfw.gov.cn/gateway/api/proxy/001003001029/dataSharing/99E2bic31KdXzaa7.htm | url: https://interface.zjzwfw.gov.cn/gateway/api/proxy/001003001029/dataSharing/99E2bic31KdXzaa7.htm | ||||
interfaceName: 99E2bic31KdXzaa7 | |||||
interface-name: 99E2bic31KdXzaa7 | |||||
app-key: A331101453557202109017383 | app-key: A331101453557202109017383 | ||||
app-secret: 496f0f2a19994f76b4fd9dae087366c7 | app-secret: 496f0f2a19994f76b4fd9dae087366c7 | ||||
seal-platform: | seal-platform: | ||||
@@ -240,6 +240,11 @@ irs: | |||||
interfaceName: 3XN9R93Pva6db7sf | interfaceName: 3XN9R93Pva6db7sf | ||||
appSecret: 496f0f2a19994f76b4fd9dae087366c7 | appSecret: 496f0f2a19994f76b4fd9dae087366c7 | ||||
appKey: A331101453557202109017383 | appKey: A331101453557202109017383 | ||||
core-biz: | |||||
url: https://interface.zjzwfw.gov.cn/gateway/api/001008012012001/dataSharing/Fc3re2cq7r64Qfa7.htm | |||||
interfaceName: Fc3re2cq7r64Qfa7 | |||||
appSecret: 496f0f2a19994f76b4fd9dae087366c7 | |||||
appKey: A331101453557202109017383 | |||||
interface-refresh: | interface-refresh: | ||||
method: POST | method: POST | ||||
request-token-url: https://interface.zjzwfw.gov.cn/gateway/app/refreshTokenByKey.htm?appKey={appKey}&requestTime={requestTime}&sign={sign} | request-token-url: https://interface.zjzwfw.gov.cn/gateway/app/refreshTokenByKey.htm?appKey={appKey}&requestTime={requestTime}&sign={sign} | ||||
@@ -253,5 +258,6 @@ hostname: iZbp13nwyvib53j4j1p2xoZ | |||||
login: | login: | ||||
phone-verify-code: | phone-verify-code: | ||||
skip: true | skip: true | ||||
url: http://lspm.ningdatech.com/login | |||||
@@ -243,6 +243,11 @@ irs: | |||||
interfaceName: 3XN9R93Pva6db7sf | interfaceName: 3XN9R93Pva6db7sf | ||||
appSecret: 496f0f2a19994f76b4fd9dae087366c7 | appSecret: 496f0f2a19994f76b4fd9dae087366c7 | ||||
appKey: A331101453557202109017383 | appKey: A331101453557202109017383 | ||||
core-biz: | |||||
url: https://interface.zjzwfw.gov.cn/gateway/api/001008012012001/dataSharing/Fc3re2cq7r64Qfa7.htm | |||||
interfaceName: Fc3re2cq7r64Qfa7 | |||||
appSecret: 496f0f2a19994f76b4fd9dae087366c7 | |||||
appKey: A331101453557202109017383 | |||||
interface-refresh: | interface-refresh: | ||||
method: POST | method: POST | ||||
request-token-url: https://interface.zjzwfw.gov.cn/gateway/app/refreshTokenByKey.htm?appKey={appKey}&requestTime={requestTime}&sign={sign} | request-token-url: https://interface.zjzwfw.gov.cn/gateway/app/refreshTokenByKey.htm?appKey={appKey}&requestTime={requestTime}&sign={sign} | ||||
@@ -238,6 +238,11 @@ irs: | |||||
interfaceName: 3XN9R93Pva6db7sf | interfaceName: 3XN9R93Pva6db7sf | ||||
appSecret: 496f0f2a19994f76b4fd9dae087366c7 | appSecret: 496f0f2a19994f76b4fd9dae087366c7 | ||||
appKey: A331101453557202109017383 | appKey: A331101453557202109017383 | ||||
core-biz: | |||||
url: https://interface.zjzwfw.gov.cn/gateway/api/001008012012001/dataSharing/Fc3re2cq7r64Qfa7.htm | |||||
interfaceName: Fc3re2cq7r64Qfa7 | |||||
appSecret: 496f0f2a19994f76b4fd9dae087366c7 | |||||
appKey: A331101453557202109017383 | |||||
interface-refresh: | interface-refresh: | ||||
method: POST | method: POST | ||||
request-token-url: https://interface.zjzwfw.gov.cn/gateway/app/refreshTokenByKey.htm?appKey={appKey}&requestTime={requestTime}&sign={sign} | request-token-url: https://interface.zjzwfw.gov.cn/gateway/app/refreshTokenByKey.htm?appKey={appKey}&requestTime={requestTime}&sign={sign} | ||||
@@ -17,16 +17,12 @@ | |||||
<maven.compiler.source>1.8</maven.compiler.source> | <maven.compiler.source>1.8</maven.compiler.source> | ||||
<maven.compiler.target>1.8</maven.compiler.target> | <maven.compiler.target>1.8</maven.compiler.target> | ||||
<jwt.version>3.7.0</jwt.version> | <jwt.version>3.7.0</jwt.version> | ||||
<com.alibaba.druid.version>1.2.8</com.alibaba.druid.version> | |||||
<mybatis.plus.version>3.5.1</mybatis.plus.version> | |||||
<mybatis.plus.version>3.5.3.2</mybatis.plus.version> | |||||
<io.springfox-swagger2.version>3.0.0</io.springfox-swagger2.version> | <io.springfox-swagger2.version>3.0.0</io.springfox-swagger2.version> | ||||
<swagger-knife.version>3.0.3</swagger-knife.version> | <swagger-knife.version>3.0.3</swagger-knife.version> | ||||
<fastjson.version>1.2.83</fastjson.version> | <fastjson.version>1.2.83</fastjson.version> | ||||
<guava.version>31.1-jre</guava.version> | <guava.version>31.1-jre</guava.version> | ||||
<commons-pool2.version>2.11.1</commons-pool2.version> | <commons-pool2.version>2.11.1</commons-pool2.version> | ||||
<useragent.yauaa>6.11</useragent.yauaa> | |||||
<druid.version>1.2.8</druid.version> | |||||
<mica.ip2region>2.6.3</mica.ip2region> | |||||
</properties> | </properties> | ||||
<dependencyManagement> | <dependencyManagement> | ||||
@@ -37,11 +33,6 @@ | |||||
<version>5.2.2</version> | <version>5.2.2</version> | ||||
</dependency> | </dependency> | ||||
<dependency> | <dependency> | ||||
<groupId>com.alibaba</groupId> | |||||
<artifactId>druid-spring-boot-starter</artifactId> | |||||
<version>${druid.version}</version> | |||||
</dependency> | |||||
<dependency> | |||||
<groupId>org.apache.poi</groupId> | <groupId>org.apache.poi</groupId> | ||||
<artifactId>poi-ooxml</artifactId> | <artifactId>poi-ooxml</artifactId> | ||||
<version>5.2.2</version> | <version>5.2.2</version> | ||||
@@ -51,12 +42,6 @@ | |||||
<artifactId>fastjson</artifactId> | <artifactId>fastjson</artifactId> | ||||
<version>${fastjson.version}</version> | <version>${fastjson.version}</version> | ||||
</dependency> | </dependency> | ||||
<!-- 解析客户端操作系统、浏览器信息 --> | |||||
<dependency> | |||||
<groupId>nl.basjes.parse.useragent</groupId> | |||||
<artifactId>yauaa</artifactId> | |||||
<version>${useragent.yauaa}</version> | |||||
</dependency> | |||||
<dependency> | <dependency> | ||||
<groupId>org.springframework.boot</groupId> | <groupId>org.springframework.boot</groupId> | ||||
<artifactId>spring-boot-dependencies</artifactId> | <artifactId>spring-boot-dependencies</artifactId> | ||||
@@ -64,12 +49,6 @@ | |||||
<type>pom</type> | <type>pom</type> | ||||
<scope>import</scope> | <scope>import</scope> | ||||
</dependency> | </dependency> | ||||
<!--druid数据库连接池--> | |||||
<dependency> | |||||
<groupId>com.alibaba</groupId> | |||||
<artifactId>druid</artifactId> | |||||
<version>${com.alibaba.druid.version}</version> | |||||
</dependency> | |||||
<!-- mybatis plus --> | <!-- mybatis plus --> | ||||
<dependency> | <dependency> | ||||
<groupId>com.baomidou</groupId> | <groupId>com.baomidou</groupId> | ||||
@@ -87,6 +66,11 @@ | |||||
<version>1.0.0</version> | <version>1.0.0</version> | ||||
</dependency> | </dependency> | ||||
<dependency> | <dependency> | ||||
<groupId>com.baomidou</groupId> | |||||
<artifactId>mybatis-plus-extension</artifactId> | |||||
<version>${mybatis.plus.version}</version> | |||||
</dependency> | |||||
<dependency> | |||||
<groupId>com.ningdatech</groupId> | <groupId>com.ningdatech</groupId> | ||||
<artifactId>nd-swagger2-starter</artifactId> | <artifactId>nd-swagger2-starter</artifactId> | ||||
<version>1.0.0</version> | <version>1.0.0</version> | ||||