Commit a9ba5ed25ab2144b11e2db1d367107723ea00d27

Authored by baishou_zjx
1 parent a106242e

考勤下发

cloud/haikang/hs_err_pid5804.log
@@ -1,380 +0,0 @@ @@ -1,380 +0,0 @@
1 -#  
2 -# A fatal error has been detected by the Java Runtime Environment:  
3 -#  
4 -# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x000000002103643f, pid=5804, tid=0x0000000000005398  
5 -#  
6 -# JRE version: Java(TM) SE Runtime Environment (8.0_181-b13) (build 1.8.0_181-b13)  
7 -# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.181-b13 mixed mode windows-amd64 compressed oops)  
8 -# Problematic frame:  
9 -# C [HCEHomeAlarm.DLL+0x2643f]  
10 -#  
11 -# Failed to write core dump. Minidumps are not enabled by default on client versions of Windows  
12 -#  
13 -# If you would like to submit a bug report, please visit:  
14 -# http://bugreport.java.com/bugreport/crash.jsp  
15 -#  
16 -  
17 ---------------- T H R E A D ---------------  
18 -  
19 -Current thread (0x0000000017be9800): VMThread [stack: 0x00000000198b0000,0x00000000199b0000] [id=21400]  
20 -  
21 -siginfo: ExceptionCode=0xc0000005, reading address 0x0000000000000000  
22 -  
23 -Registers:  
24 -RAX=0x0000000000000001, RBX=0x0000000000000000, RCX=0x0000000000000000, RDX=0x0000000000000000  
25 -RSP=0x00000000199af330, RBP=0x0000000000000000, RSI=0x0000000000000000, RDI=0x000000000093cca0  
26 -R8 =0x0000000000000001, R9 =0x0000000000000001, R10=0x0000000000008000, R11=0x00000000199af3c0  
27 -R12=0x000000000092afe0, R13=0x0000000000000000, R14=0x0000000000000001, R15=0x000000000092b090  
28 -RIP=0x000000002103643f, EFLAGS=0x0000000000010206  
29 -  
30 -Top of Stack: (sp=0x00000000199af330)  
31 -0x00000000199af330: 000000002207d400 00007ff8179607cd  
32 -0x00000000199af340: 000000000093bd20 00000002008c0000  
33 -0x00000000199af350: 000000000093cca0 00000000210ccb11  
34 -0x00000000199af360: 0000000000000000 0000000000000000  
35 -0x00000000199af370: 00000000009125c0 000000341795fba1  
36 -0x00000000199af380: 000000001c9440e0 0000000021036bf2  
37 -0x00000000199af390: 0000000000000000 0000000000000001  
38 -0x00000000199af3a0: 0000000000000000 000000000092afe0  
39 -0x00000000199af3b0: 0000000000000001 0000000021036620  
40 -0x00000000199af3c0: 0000000000000000 000000001c9440e0  
41 -0x00000000199af3d0: 000000000092afe0 0000000000000000  
42 -0x00000000199af3e0: 0000000000942b00 0000000017a756d0  
43 -0x00000000199af3f0: 0000000021991200 0000000021035cc8  
44 -0x00000000199af400: 0000000017a756d0 000000001c9440e0  
45 -0x00000000199af410: 0000000000000000 0000000000000000  
46 -0x00000000199af420: 0000000021991200 00000000210cdb04  
47 -  
48 -Instructions: (pc=0x000000002103643f)  
49 -0x000000002103641f: 38 48 8b 74 24 40 48 83 c4 20 5f c3 cc cc cc cc  
50 -0x000000002103642f: cc 48 89 5c 24 08 48 89 74 24 10 57 48 83 ec 20  
51 -0x000000002103643f: 48 8b 01 41 8b f0 8b da 48 8b f9 ff 50 08 85 c0  
52 -0x000000002103644f: 75 48 48 8b 05 78 70 17 00 48 83 f8 ff 74 1f ba  
53 -  
54 -  
55 -Register to memory mapping:  
56 -  
57 -RAX=0x0000000000000001 is an unknown value  
58 -RBX=0x0000000000000000 is an unknown value  
59 -RCX=0x0000000000000000 is an unknown value  
60 -RDX=0x0000000000000000 is an unknown value  
61 -RSP=0x00000000199af330 is an unknown value  
62 -RBP=0x0000000000000000 is an unknown value  
63 -RSI=0x0000000000000000 is an unknown value  
64 -RDI=0x000000000093cca0 is an unknown value  
65 -R8 =0x0000000000000001 is an unknown value  
66 -R9 =0x0000000000000001 is an unknown value  
67 -R10=0x0000000000008000 is an unknown value  
68 -R11=0x00000000199af3c0 is an unknown value  
69 -R12=0x000000000092afe0 is an unknown value  
70 -R13=0x0000000000000000 is an unknown value  
71 -R14=0x0000000000000001 is an unknown value  
72 -R15=0x000000000092b090 is an unknown value  
73 -  
74 -  
75 -Stack: [0x00000000198b0000,0x00000000199b0000], sp=0x00000000199af330, free space=1020k  
76 -Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)  
77 -  
78 -VM_Operation (0x0000000002b8ed80): Exit, mode: safepoint, requested by thread 0x0000000002c03000  
79 -  
80 -  
81 ---------------- P R O C E S S ---------------  
82 -  
83 -Java Threads: ( => current thread )  
84 - 0x000000001e757800 JavaThread "surefire-forkedjvm-last-ditch-daemon-shutdown-thread-30s" daemon [_thread_blocked, id=4628, stack(0x000000001f5d0000,0x000000001f6d0000)]  
85 - 0x0000000019c8d000 JavaThread "surefire-forkedjvm-command-thread" daemon [_thread_in_native, id=4584, stack(0x000000001a7b0000,0x000000001a8b0000)]  
86 - 0x0000000019bd8800 JavaThread "Service Thread" daemon [_thread_blocked, id=1544, stack(0x000000001a5b0000,0x000000001a6b0000)]  
87 - 0x0000000019b4b800 JavaThread "C1 CompilerThread3" daemon [_thread_blocked, id=11108, stack(0x000000001a4b0000,0x000000001a5b0000)]  
88 - 0x0000000019b44800 JavaThread "C2 CompilerThread2" daemon [_thread_blocked, id=15628, stack(0x000000001a3b0000,0x000000001a4b0000)]  
89 - 0x0000000019b41800 JavaThread "C2 CompilerThread1" daemon [_thread_blocked, id=21148, stack(0x000000001a2b0000,0x000000001a3b0000)]  
90 - 0x0000000019b3d800 JavaThread "C2 CompilerThread0" daemon [_thread_blocked, id=19612, stack(0x000000001a1b0000,0x000000001a2b0000)]  
91 - 0x0000000019ae9000 JavaThread "Attach Listener" daemon [_thread_blocked, id=5504, stack(0x000000001a0b0000,0x000000001a1b0000)]  
92 - 0x0000000019ae8000 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=17668, stack(0x0000000019fb0000,0x000000001a0b0000)]  
93 - 0x0000000019ad0800 JavaThread "Finalizer" daemon [_thread_blocked, id=18084, stack(0x0000000019eb0000,0x0000000019fb0000)]  
94 - 0x0000000002cf6000 JavaThread "Reference Handler" daemon [_thread_blocked, id=21476, stack(0x00000000199b0000,0x0000000019ab0000)]  
95 - 0x0000000002c03000 JavaThread "main" [_thread_blocked, id=128, stack(0x0000000002a90000,0x0000000002b90000)]  
96 -  
97 -Other Threads:  
98 -=>0x0000000017be9800 VMThread [stack: 0x00000000198b0000,0x00000000199b0000] [id=21400]  
99 -  
100 -VM state:at safepoint (shutting down)  
101 -  
102 -VM Mutex/Monitor currently owned by a thread: ([mutex/lock_event])  
103 -[0x0000000002bfe070] Threads_lock - owner thread: 0x0000000017be9800  
104 -  
105 -Heap:  
106 - PSYoungGen total 110080K, used 8586K [0x00000000d6300000, 0x00000000e0580000, 0x0000000100000000)  
107 - eden space 100864K, 8% used [0x00000000d6300000,0x00000000d6b62a30,0x00000000dc580000)  
108 - from space 9216K, 0% used [0x00000000dc580000,0x00000000dc580000,0x00000000dce80000)  
109 - to space 10240K, 0% used [0x00000000dfb80000,0x00000000dfb80000,0x00000000e0580000)  
110 - ParOldGen total 87552K, used 13265K [0x0000000082800000, 0x0000000087d80000, 0x00000000d6300000)  
111 - object space 87552K, 15% used [0x0000000082800000,0x00000000834f4528,0x0000000087d80000)  
112 - Metaspace used 34115K, capacity 35628K, committed 35800K, reserved 1081344K  
113 - class space used 4508K, capacity 4790K, committed 4864K, reserved 1048576K  
114 -  
115 -Card table byte_map: [0x00000000120c0000,0x00000000124b0000] byte_map_base: 0x0000000011cac000  
116 -  
117 -Marking Bits: (ParMarkBitMap*) 0x000000005ca12d00  
118 - Begin Bits: [0x0000000012f50000, 0x0000000014eb0000)  
119 - End Bits: [0x0000000014eb0000, 0x0000000016e10000)  
120 -  
121 -Polling page: 0x00000000008b0000  
122 -  
123 -CodeCache: size=245760Kb used=12489Kb max_used=12525Kb free=233270Kb  
124 - bounds [0x0000000002d00000, 0x0000000003950000, 0x0000000011d00000]  
125 - total_blobs=3721 nmethods=3298 adapters=334  
126 - compilation: enabled  
127 -  
128 -Compilation events (10 events):  
129 -Event: 4.095 Thread 0x0000000019b4b800 nmethod 3298 0x00000000038f4250 code [0x00000000038f43a0, 0x00000000038f44d0]  
130 -Event: 4.095 Thread 0x0000000019b4b800 3299 3 java.util.logging.LogManager$LoggerContext::requiresDefaultLoggers (29 bytes)  
131 -Event: 4.095 Thread 0x0000000019b3d800 3300 4 org.springframework.core.ResolvableType$1::isAssignableFrom (24 bytes)  
132 -Event: 4.095 Thread 0x0000000019b4b800 nmethod 3299 0x00000000038f77d0 code [0x00000000038f7940, 0x00000000038f7d68]  
133 -Event: 4.096 Thread 0x0000000019b4b800 3301 1 java.util.concurrent.ConcurrentHashMap$MapEntry::getValue (5 bytes)  
134 -Event: 4.096 Thread 0x0000000019b4b800 nmethod 3301 0x00000000038f67d0 code [0x00000000038f6920, 0x00000000038f6a30]  
135 -Event: 4.096 Thread 0x0000000019b4b800 3302 1 ch.qos.logback.core.pattern.Converter::getNext (5 bytes)  
136 -Event: 4.096 Thread 0x0000000019b4b800 nmethod 3302 0x00000000038f7510 code [0x00000000038f7660, 0x00000000038f7770]  
137 -Event: 4.097 Thread 0x0000000019b4b800 3303 ! 3 java.util.concurrent.ConcurrentHashMap::clear (176 bytes)  
138 -Event: 4.098 Thread 0x0000000019b4b800 nmethod 3303 0x00000000038f1b10 code [0x00000000038f1d20, 0x00000000038f2ab8]  
139 -  
140 -GC Heap History (10 events):  
141 -Event: 1.128 GC heap before  
142 -{Heap before GC invocations=5 (full 1):  
143 - PSYoungGen total 70656K, used 5119K [0x00000000d6300000, 0x00000000dad00000, 0x0000000100000000)  
144 - eden space 65536K, 0% used [0x00000000d6300000,0x00000000d6300000,0x00000000da300000)  
145 - from space 5120K, 99% used [0x00000000da800000,0x00000000dacffcc0,0x00000000dad00000)  
146 - to space 5120K, 0% used [0x00000000da300000,0x00000000da300000,0x00000000da800000)  
147 - ParOldGen total 86016K, used 6297K [0x0000000082800000, 0x0000000087c00000, 0x00000000d6300000)  
148 - object space 86016K, 7% used [0x0000000082800000,0x0000000082e26720,0x0000000087c00000)  
149 - Metaspace used 20641K, capacity 21176K, committed 21248K, reserved 1067008K  
150 - class space used 2650K, capacity 2802K, committed 2816K, reserved 1048576K  
151 -Event: 1.151 GC heap after  
152 -Heap after GC invocations=5 (full 1):  
153 - PSYoungGen total 70656K, used 0K [0x00000000d6300000, 0x00000000dad00000, 0x0000000100000000)  
154 - eden space 65536K, 0% used [0x00000000d6300000,0x00000000d6300000,0x00000000da300000)  
155 - from space 5120K, 0% used [0x00000000da800000,0x00000000da800000,0x00000000dad00000)  
156 - to space 5120K, 0% used [0x00000000da300000,0x00000000da300000,0x00000000da800000)  
157 - ParOldGen total 56832K, used 7391K [0x0000000082800000, 0x0000000085f80000, 0x00000000d6300000)  
158 - object space 56832K, 13% used [0x0000000082800000,0x0000000082f37fc8,0x0000000085f80000)  
159 - Metaspace used 20641K, capacity 21176K, committed 21248K, reserved 1067008K  
160 - class space used 2650K, capacity 2802K, committed 2816K, reserved 1048576K  
161 -}  
162 -Event: 1.614 GC heap before  
163 -{Heap before GC invocations=6 (full 1):  
164 - PSYoungGen total 70656K, used 65536K [0x00000000d6300000, 0x00000000dad00000, 0x0000000100000000)  
165 - eden space 65536K, 100% used [0x00000000d6300000,0x00000000da300000,0x00000000da300000)  
166 - from space 5120K, 0% used [0x00000000da800000,0x00000000da800000,0x00000000dad00000)  
167 - to space 5120K, 0% used [0x00000000da300000,0x00000000da300000,0x00000000da800000)  
168 - ParOldGen total 56832K, used 7391K [0x0000000082800000, 0x0000000085f80000, 0x00000000d6300000)  
169 - object space 56832K, 13% used [0x0000000082800000,0x0000000082f37fc8,0x0000000085f80000)  
170 - Metaspace used 27507K, capacity 28260K, committed 28288K, reserved 1073152K  
171 - class space used 3531K, capacity 3706K, committed 3712K, reserved 1048576K  
172 -Event: 1.622 GC heap after  
173 -Heap after GC invocations=6 (full 1):  
174 - PSYoungGen total 70656K, used 5118K [0x00000000d6300000, 0x00000000dd800000, 0x0000000100000000)  
175 - eden space 65536K, 0% used [0x00000000d6300000,0x00000000d6300000,0x00000000da300000)  
176 - from space 5120K, 99% used [0x00000000da300000,0x00000000da7ff870,0x00000000da800000)  
177 - to space 8704K, 0% used [0x00000000dcf80000,0x00000000dcf80000,0x00000000dd800000)  
178 - ParOldGen total 56832K, used 10601K [0x0000000082800000, 0x0000000085f80000, 0x00000000d6300000)  
179 - object space 56832K, 18% used [0x0000000082800000,0x000000008325a5e8,0x0000000085f80000)  
180 - Metaspace used 27507K, capacity 28260K, committed 28288K, reserved 1073152K  
181 - class space used 3531K, capacity 3706K, committed 3712K, reserved 1048576K  
182 -}  
183 -Event: 3.417 GC heap before  
184 -{Heap before GC invocations=7 (full 1):  
185 - PSYoungGen total 70656K, used 70654K [0x00000000d6300000, 0x00000000dd800000, 0x0000000100000000)  
186 - eden space 65536K, 100% used [0x00000000d6300000,0x00000000da300000,0x00000000da300000)  
187 - from space 5120K, 99% used [0x00000000da300000,0x00000000da7ff870,0x00000000da800000)  
188 - to space 8704K, 0% used [0x00000000dcf80000,0x00000000dcf80000,0x00000000dd800000)  
189 - ParOldGen total 56832K, used 10601K [0x0000000082800000, 0x0000000085f80000, 0x00000000d6300000)  
190 - object space 56832K, 18% used [0x0000000082800000,0x000000008325a5e8,0x0000000085f80000)  
191 - Metaspace used 30824K, capacity 32158K, committed 32512K, reserved 1077248K  
192 - class space used 3972K, capacity 4243K, committed 4352K, reserved 1048576K  
193 -Event: 3.422 GC heap after  
194 -Heap after GC invocations=7 (full 1):  
195 - PSYoungGen total 106496K, used 7736K [0x00000000d6300000, 0x00000000dd780000, 0x0000000100000000)  
196 - eden space 98304K, 0% used [0x00000000d6300000,0x00000000d6300000,0x00000000dc300000)  
197 - from space 8192K, 94% used [0x00000000dcf80000,0x00000000dd70e208,0x00000000dd780000)  
198 - to space 9216K, 0% used [0x00000000dc580000,0x00000000dc580000,0x00000000dce80000)  
199 - ParOldGen total 56832K, used 10609K [0x0000000082800000, 0x0000000085f80000, 0x00000000d6300000)  
200 - object space 56832K, 18% used [0x0000000082800000,0x000000008325c5e8,0x0000000085f80000)  
201 - Metaspace used 30824K, capacity 32158K, committed 32512K, reserved 1077248K  
202 - class space used 3972K, capacity 4243K, committed 4352K, reserved 1048576K  
203 -}  
204 -Event: 3.985 GC heap before  
205 -{Heap before GC invocations=8 (full 1):  
206 - PSYoungGen total 106496K, used 88928K [0x00000000d6300000, 0x00000000dd780000, 0x0000000100000000)  
207 - eden space 98304K, 82% used [0x00000000d6300000,0x00000000db24a1a0,0x00000000dc300000)  
208 - from space 8192K, 94% used [0x00000000dcf80000,0x00000000dd70e208,0x00000000dd780000)  
209 - to space 9216K, 0% used [0x00000000dc580000,0x00000000dc580000,0x00000000dce80000)  
210 - ParOldGen total 56832K, used 10609K [0x0000000082800000, 0x0000000085f80000, 0x00000000d6300000)  
211 - object space 56832K, 18% used [0x0000000082800000,0x000000008325c5e8,0x0000000085f80000)  
212 - Metaspace used 33846K, capacity 35360K, committed 35416K, reserved 1079296K  
213 - class space used 4445K, capacity 4722K, committed 4736K, reserved 1048576K  
214 -Event: 3.994 GC heap after  
215 -Heap after GC invocations=8 (full 1):  
216 - PSYoungGen total 110080K, used 9213K [0x00000000d6300000, 0x00000000e0580000, 0x0000000100000000)  
217 - eden space 100864K, 0% used [0x00000000d6300000,0x00000000d6300000,0x00000000dc580000)  
218 - from space 9216K, 99% used [0x00000000dc580000,0x00000000dce7f6c8,0x00000000dce80000)  
219 - to space 10240K, 0% used [0x00000000dfb80000,0x00000000dfb80000,0x00000000e0580000)  
220 - ParOldGen total 56832K, used 10895K [0x0000000082800000, 0x0000000085f80000, 0x00000000d6300000)  
221 - object space 56832K, 19% used [0x0000000082800000,0x00000000832a3cc0,0x0000000085f80000)  
222 - Metaspace used 33846K, capacity 35360K, committed 35416K, reserved 1079296K  
223 - class space used 4445K, capacity 4722K, committed 4736K, reserved 1048576K  
224 -}  
225 -Event: 3.994 GC heap before  
226 -{Heap before GC invocations=9 (full 2):  
227 - PSYoungGen total 110080K, used 9213K [0x00000000d6300000, 0x00000000e0580000, 0x0000000100000000)  
228 - eden space 100864K, 0% used [0x00000000d6300000,0x00000000d6300000,0x00000000dc580000)  
229 - from space 9216K, 99% used [0x00000000dc580000,0x00000000dce7f6c8,0x00000000dce80000)  
230 - to space 10240K, 0% used [0x00000000dfb80000,0x00000000dfb80000,0x00000000e0580000)  
231 - ParOldGen total 56832K, used 10895K [0x0000000082800000, 0x0000000085f80000, 0x00000000d6300000)  
232 - object space 56832K, 19% used [0x0000000082800000,0x00000000832a3cc0,0x0000000085f80000)  
233 - Metaspace used 33846K, capacity 35360K, committed 35416K, reserved 1079296K  
234 - class space used 4445K, capacity 4722K, committed 4736K, reserved 1048576K  
235 -Event: 4.043 GC heap after  
236 -Heap after GC invocations=9 (full 2):  
237 - PSYoungGen total 110080K, used 0K [0x00000000d6300000, 0x00000000e0580000, 0x0000000100000000)  
238 - eden space 100864K, 0% used [0x00000000d6300000,0x00000000d6300000,0x00000000dc580000)  
239 - from space 9216K, 0% used [0x00000000dc580000,0x00000000dc580000,0x00000000dce80000)  
240 - to space 10240K, 0% used [0x00000000dfb80000,0x00000000dfb80000,0x00000000e0580000)  
241 - ParOldGen total 87552K, used 13265K [0x0000000082800000, 0x0000000087d80000, 0x00000000d6300000)  
242 - object space 87552K, 15% used [0x0000000082800000,0x00000000834f4528,0x0000000087d80000)  
243 - Metaspace used 33846K, capacity 35360K, committed 35416K, reserved 1079296K  
244 - class space used 4445K, capacity 4722K, committed 4736K, reserved 1048576K  
245 -}  
246 -  
247 -Deoptimization events (10 events):  
248 -Event: 3.280 Thread 0x0000000002c03000 Uncommon trap: reason=unstable_if action=reinterpret pc=0x00000000035b9da4 method=org.springframework.util.ConcurrentReferenceHashMap$Segment.findInChain(Lorg/springframework/util/ConcurrentReferenceHashMap$Reference;Ljava/lang/Object;I)Lorg/springframewo  
249 -Event: 3.343 Thread 0x0000000002c03000 Uncommon trap: reason=unstable_if action=reinterpret pc=0x000000000360ed98 method=org.springframework.util.ConcurrentReferenceHashMap$Segment.findInChain(Lorg/springframework/util/ConcurrentReferenceHashMap$Reference;Ljava/lang/Object;I)Lorg/springframewo  
250 -Event: 3.398 Thread 0x0000000002c03000 Uncommon trap: reason=unstable_if action=reinterpret pc=0x00000000035bb154 method=java.lang.reflect.Method.equals(Ljava/lang/Object;)Z @ 1  
251 -Event: 3.540 Thread 0x0000000002c03000 Uncommon trap: reason=unstable_if action=reinterpret pc=0x0000000003775984 method=org.springframework.beans.factory.support.AbstractBeanFactory.isTypeMatch(Ljava/lang/String;Lorg/springframework/core/ResolvableType;)Z @ 66  
252 -Event: 3.789 Thread 0x0000000002c03000 Uncommon trap: reason=unstable_if action=reinterpret pc=0x0000000003813fd4 method=org.springframework.util.ConcurrentReferenceHashMap$Segment.clear()V @ 4  
253 -Event: 3.863 Thread 0x0000000002c03000 Uncommon trap: reason=predicate action=maybe_recompile pc=0x000000000307ed50 method=java.lang.String.regionMatches(ZILjava/lang/String;II)Z @ 63  
254 -Event: 3.910 Thread 0x0000000002c03000 Uncommon trap: reason=bimorphic action=maybe_recompile pc=0x0000000003726afc method=java.util.AbstractList$Itr.next()Ljava/lang/Object; @ 14  
255 -Event: 3.912 Thread 0x0000000002c03000 Uncommon trap: reason=bimorphic action=maybe_recompile pc=0x0000000003726afc method=java.util.AbstractList$Itr.next()Ljava/lang/Object; @ 14  
256 -Event: 3.912 Thread 0x0000000002c03000 Uncommon trap: reason=bimorphic action=maybe_recompile pc=0x0000000003726afc method=java.util.AbstractList$Itr.next()Ljava/lang/Object; @ 14  
257 -Event: 3.912 Thread 0x0000000002c03000 Uncommon trap: reason=bimorphic action=maybe_recompile pc=0x0000000003726afc method=java.util.AbstractList$Itr.next()Ljava/lang/Object; @ 14  
258 -  
259 -Classes redefined (0 events):  
260 -No events  
261 -  
262 -Internal exceptions (10 events):  
263 -Event: 3.770 Thread 0x0000000002c03000 Exception <a 'java/lang/ClassNotFoundException': org/springframework/core/env/EnvironmentCapableCustomizer> (0x00000000da1eadc0) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u181\11358\hotspot\src\share\vm\classfile\systemDictionary.cpp,  
264 -Event: 3.770 Thread 0x0000000002c03000 Exception <a 'java/lang/ClassNotFoundException': org/springframework/web/context/ServletContextAwareCustomizer> (0x00000000da1fff18) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u181\11358\hotspot\src\share\vm\classfile\systemDictionary.c  
265 -Event: 3.771 Thread 0x0000000002c03000 Exception <a 'java/lang/ClassNotFoundException': org/springframework/beans/factory/AwareCustomizer> (0x00000000da212620) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u181\11358\hotspot\src\share\vm\classfile\systemDictionary.cpp, line 210  
266 -Event: 3.771 Thread 0x0000000002c03000 Exception <a 'java/lang/ClassNotFoundException': org/springframework/beans/factory/InitializingBeanCustomizer> (0x00000000da226008) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u181\11358\hotspot\src\share\vm\classfile\systemDictionary.cp  
267 -Event: 3.771 Thread 0x0000000002c03000 Exception <a 'java/lang/ClassNotFoundException': org/springframework/beans/factory/DisposableBeanCustomizer> (0x00000000da2395e0) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u181\11358\hotspot\src\share\vm\classfile\systemDictionary.cpp,  
268 -Event: 3.774 Thread 0x0000000002c03000 Exception <a 'java/lang/ClassNotFoundException': java/lang/ObjectCustomizer> (0x00000000da262588) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u181\11358\hotspot\src\share\vm\classfile\systemDictionary.cpp, line 210]  
269 -Event: 3.774 Thread 0x0000000002c03000 Exception <a 'java/lang/ClassNotFoundException': org/springframework/web/multipart/support/StandardServletMultipartResolverCustomizer> (0x00000000da27e750) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u181\11358\hotspot\src\share\vm\class  
270 -Event: 3.775 Thread 0x0000000002c03000 Exception <a 'java/lang/ClassNotFoundException': org/springframework/web/multipart/MultipartResolverCustomizer> (0x00000000da297570) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u181\11358\hotspot\src\share\vm\classfile\systemDictionary.c  
271 -Event: 3.847 Thread 0x0000000002c03000 Exception <a 'java/lang/ClassNotFoundException': java/lang/ObjectCustomizer> (0x00000000da5ca5e8) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u181\11358\hotspot\src\share\vm\classfile\systemDictionary.cpp, line 210]  
272 -Event: 3.848 Thread 0x0000000002c03000 Exception <a 'java/lang/ClassNotFoundException': com/sincere/haikang/HaikangApplicationTestsCustomizer> (0x00000000da5e00c8) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u181\11358\hotspot\src\share\vm\classfile\systemDictionary.cpp, line  
273 -  
274 -Events (10 events):  
275 -Event: 4.094 Thread 0x000000001e757000 Thread added: 0x000000001e757000  
276 -Event: 4.094 Thread 0x000000001e758800 Thread added: 0x000000001e758800  
277 -Event: 4.095 Thread 0x000000001e758800 Thread exited: 0x000000001e758800  
278 -Event: 4.095 loading class org/springframework/context/support/DefaultLifecycleProcessor  
279 -Event: 4.095 loading class org/springframework/context/support/DefaultLifecycleProcessor done  
280 -Event: 4.097 loading class java/util/concurrent/ConcurrentHashMap$ValueIterator  
281 -Event: 4.097 loading class java/util/concurrent/ConcurrentHashMap$ValueIterator done  
282 -Event: 4.098 Thread 0x000000001e756000 Thread exited: 0x000000001e756000  
283 -Event: 4.098 Thread 0x000000001e757000 Thread exited: 0x000000001e757000  
284 -Event: 4.099 Executing VM operation: EnableBiasedLocking  
285 -  
286 -  
287 -Dynamic libraries:  
288 -0x00007ff7b7a80000 - 0x00007ff7b7ab7000 C:\Program Files\Java\jdk1.8.0_181\jre\bin\java.exe  
289 -0x00007ff817920000 - 0x00007ff817b10000 C:\WINDOWS\SYSTEM32\ntdll.dll  
290 -0x00007ff815d40000 - 0x00007ff815df2000 C:\WINDOWS\System32\KERNEL32.DLL  
291 -0x00007ff8156c0000 - 0x00007ff815963000 C:\WINDOWS\System32\KERNELBASE.dll  
292 -0x00007ff816600000 - 0x00007ff8166a3000 C:\WINDOWS\System32\ADVAPI32.dll  
293 -0x00007ff817570000 - 0x00007ff81760e000 C:\WINDOWS\System32\msvcrt.dll  
294 -0x00007ff816f10000 - 0x00007ff816fa7000 C:\WINDOWS\System32\sechost.dll  
295 -0x00007ff817420000 - 0x00007ff817540000 C:\WINDOWS\System32\RPCRT4.dll  
296 -0x00007ff815b90000 - 0x00007ff815d23000 C:\WINDOWS\System32\USER32.dll  
297 -0x00007ff815030000 - 0x00007ff815051000 C:\WINDOWS\System32\win32u.dll  
298 -0x00007ff816830000 - 0x00007ff816856000 C:\WINDOWS\System32\GDI32.dll  
299 -0x00007ff8154f0000 - 0x00007ff815684000 C:\WINDOWS\System32\gdi32full.dll  
300 -0x00007ff815450000 - 0x00007ff8154ee000 C:\WINDOWS\System32\msvcp_win.dll  
301 -0x00007ff815190000 - 0x00007ff81528a000 C:\WINDOWS\System32\ucrtbase.dll  
302 -0x00007ffffbbb0000 - 0x00007ffffbe35000 C:\WINDOWS\WinSxS\amd64_microsoft.windows.common-controls_6595b64144ccf1df_6.0.18362.295_none_e6c3acbd13101292\COMCTL32.dll  
303 -0x00007ff817080000 - 0x00007ff8173b6000 C:\WINDOWS\System32\combase.dll  
304 -0x00007ff815060000 - 0x00007ff8150e0000 C:\WINDOWS\System32\bcryptPrimitives.dll  
305 -0x00007ff817540000 - 0x00007ff81756e000 C:\WINDOWS\System32\IMM32.DLL  
306 -0x000000005caa0000 - 0x000000005cb72000 C:\Program Files\Java\jdk1.8.0_181\jre\bin\msvcr100.dll  
307 -0x000000005c1f0000 - 0x000000005ca92000 C:\Program Files\Java\jdk1.8.0_181\jre\bin\server\jvm.dll  
308 -0x00007ff815ef0000 - 0x00007ff815ef8000 C:\WINDOWS\System32\PSAPI.DLL  
309 -0x00007ff8002c0000 - 0x00007ff8002c9000 C:\WINDOWS\SYSTEM32\WSOCK32.dll  
310 -0x00007ff8176c0000 - 0x00007ff81772f000 C:\WINDOWS\System32\WS2_32.dll  
311 -0x00007ff80b780000 - 0x00007ff80b78a000 C:\WINDOWS\SYSTEM32\VERSION.dll  
312 -0x00007ff80f370000 - 0x00007ff80f394000 C:\WINDOWS\SYSTEM32\WINMM.dll  
313 -0x00007ff80efa0000 - 0x00007ff80efcd000 C:\WINDOWS\SYSTEM32\winmmbase.dll  
314 -0x00007ff815290000 - 0x00007ff8152da000 C:\WINDOWS\System32\cfgmgr32.dll  
315 -0x000000005c1e0000 - 0x000000005c1ef000 C:\Program Files\Java\jdk1.8.0_181\jre\bin\verify.dll  
316 -0x000000005c1b0000 - 0x000000005c1d9000 C:\Program Files\Java\jdk1.8.0_181\jre\bin\java.dll  
317 -0x000000005c190000 - 0x000000005c1a6000 C:\Program Files\Java\jdk1.8.0_181\jre\bin\zip.dll  
318 -0x00007ff815f00000 - 0x00007ff8165e2000 C:\WINDOWS\System32\SHELL32.dll  
319 -0x00007ff8166b0000 - 0x00007ff816759000 C:\WINDOWS\System32\shcore.dll  
320 -0x00007ff8148b0000 - 0x00007ff81502c000 C:\WINDOWS\System32\windows.storage.dll  
321 -0x00007ff814890000 - 0x00007ff8148af000 C:\WINDOWS\System32\profapi.dll  
322 -0x00007ff814800000 - 0x00007ff81484a000 C:\WINDOWS\System32\powrprof.dll  
323 -0x00007ff8147f0000 - 0x00007ff814800000 C:\WINDOWS\System32\UMPDC.dll  
324 -0x00007ff815e90000 - 0x00007ff815ee2000 C:\WINDOWS\System32\shlwapi.dll  
325 -0x00007ff814850000 - 0x00007ff814861000 C:\WINDOWS\System32\kernel.appcore.dll  
326 -0x00007ff815430000 - 0x00007ff815447000 C:\WINDOWS\System32\cryptsp.dll  
327 -0x000000005c140000 - 0x000000005c14d000 C:\Program Files\Java\jdk1.8.0_181\jre\bin\management.dll  
328 -0x000000005c170000 - 0x000000005c18a000 C:\Program Files\Java\jdk1.8.0_181\jre\bin\net.dll  
329 -0x00007ff814060000 - 0x00007ff8140c7000 C:\WINDOWS\system32\mswsock.dll  
330 -0x000000005c090000 - 0x000000005c0a1000 C:\Program Files\Java\jdk1.8.0_181\jre\bin\nio.dll  
331 -0x00007fffee0e0000 - 0x00007fffee0f6000 C:\WINDOWS\system32\napinsp.dll  
332 -0x00007fffee0c0000 - 0x00007fffee0da000 C:\WINDOWS\system32\pnrpnsp.dll  
333 -0x00007ff813db0000 - 0x00007ff813e7a000 C:\WINDOWS\SYSTEM32\DNSAPI.dll  
334 -0x00007ff815d30000 - 0x00007ff815d38000 C:\WINDOWS\System32\NSI.dll  
335 -0x00007ff813d70000 - 0x00007ff813daa000 C:\WINDOWS\SYSTEM32\IPHLPAPI.DLL  
336 -0x00007fffee750000 - 0x00007fffee75e000 C:\WINDOWS\System32\winrnr.dll  
337 -0x00007ff811110000 - 0x00007ff81112c000 C:\WINDOWS\system32\NLAapi.dll  
338 -0x00007fffee0a0000 - 0x00007fffee0b5000 C:\WINDOWS\system32\wshbth.dll  
339 -0x00007ff80b540000 - 0x00007ff80b54a000 C:\Windows\System32\rasadhlp.dll  
340 -0x00007ff80c3b0000 - 0x00007ff80c427000 C:\WINDOWS\System32\fwpuclnt.dll  
341 -0x00007ff815690000 - 0x00007ff8156b6000 C:\WINDOWS\System32\bcrypt.dll  
342 -0x00007ff813bd0000 - 0x00007ff813c03000 C:\WINDOWS\system32\rsaenh.dll  
343 -0x00007ff814710000 - 0x00007ff814735000 C:\WINDOWS\SYSTEM32\USERENV.dll  
344 -0x00007ff814230000 - 0x00007ff81423c000 C:\WINDOWS\SYSTEM32\CRYPTBASE.dll  
345 -0x00007ff80cab0000 - 0x00007ff80cac6000 C:\WINDOWS\SYSTEM32\dhcpcsvc6.DLL  
346 -0x00007ff80cf90000 - 0x00007ff80cfac000 C:\WINDOWS\SYSTEM32\dhcpcsvc.DLL  
347 -0x0000000180000000 - 0x0000000180031000 C:\Users\taohandong\AppData\Local\Temp\jna8573894597523270195.tmp  
348 -0x0000000020c40000 - 0x000000002100b000 C:\lib\HCEHomeCMS.DLL  
349 -0x0000000021010000 - 0x000000002139f000 C:\lib\HCEHomeAlarm.DLL  
350 -0x0000000020730000 - 0x0000000020920000 C:\TaoHandong\Java_Code\apache-tomcat-8.5.34\bin\tcnative-1.dll  
351 -0x00007ff805a80000 - 0x00007ff805ab2000 C:\Program Files\Intel\WiFi\bin\zlib1.dll  
352 -0x00007ff813110000 - 0x00007ff813304000 C:\WINDOWS\SYSTEM32\dbghelp.dll  
353 -  
354 -VM Arguments:  
355 -java_command: C:\Users\TAOHAN~1\AppData\Local\Temp\surefire4361925548474029200\surefirebooter6466546106949192259.jar C:\Users\taohandong\AppData\Local\Temp\surefire4361925548474029200 2019-08-21T17-05-37_284-jvmRun1 surefire6910806768415210701tmp surefire_03608835572114943320tmp  
356 -java_class_path (initial): C:\Users\TAOHAN~1\AppData\Local\Temp\surefire4361925548474029200\surefirebooter6466546106949192259.jar  
357 -Launcher Type: SUN_STANDARD  
358 -  
359 -Environment Variables:  
360 -JAVA_HOME=C:\Program Files\Java\jdk1.8.0_181  
361 -CLASSPATH=.;C:\Program Files\Java\jdk1.8.0_181\lib;C:\Program Files\Java\jdk1.8.0_181\lib\tools.jar;  
362 -USERNAME=taohandong  
363 -OS=Windows_NT  
364 -PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 142 Stepping 10, GenuineIntel  
365 -  
366 -  
367 -  
368 ---------------- S Y S T E M ---------------  
369 -  
370 -OS: Windows 10.0 , 64 bit Build 18362 (10.0.18362.86)  
371 -  
372 -CPU:total 8 (initial active 8) (4 cores per cpu, 2 threads per core) family 6 model 142 stepping 10, 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  
373 -  
374 -Memory: 4k page, physical 8218728k(1001364k free), swap 16922824k(2753668k free)  
375 -  
376 -vm_info: Java HotSpot(TM) 64-Bit Server VM (25.181-b13) for windows-amd64 JRE (1.8.0_181-b13), built on Jul 7 2018 04:01:33 by "java_re" with MS VC++ 10.0 (VS2010)  
377 -  
378 -time: Wed Aug 21 17:05:42 2019  
379 -elapsed time: 4 seconds (0d 0h 0m 4s)  
380 -  
cloud/haikang/pom.xml
@@ -76,7 +76,18 @@ @@ -76,7 +76,18 @@
76 <artifactId>spring-boot-starter-jdbc</artifactId> 76 <artifactId>spring-boot-starter-jdbc</artifactId>
77 <version>2.1.6.RELEASE</version> 77 <version>2.1.6.RELEASE</version>
78 </dependency> 78 </dependency>
79 - 79 + <!--模拟http请求包-->
  80 + <dependency>
  81 + <groupId>org.apache.httpcomponents</groupId>
  82 + <artifactId>httpclient</artifactId>
  83 + <version>4.5.3</version>
  84 + </dependency>
  85 + <!--Json格式的字符串序列化和反序列化 fastjson-->
  86 + <dependency>
  87 + <groupId>com.alibaba</groupId>
  88 + <artifactId>fastjson</artifactId>
  89 + <version>1.2.58</version>
  90 + </dependency>
80 </dependencies> 91 </dependencies>
81 92
82 <build> 93 <build>
cloud/haikang/src/main/java/com/sincere/haikang/CMSServer.java
1 package com.sincere.haikang; 1 package com.sincere.haikang;
2 2
  3 +import com.alibaba.fastjson.JSON;
3 import com.sincere.haikang.bean.AttendanceBean; 4 import com.sincere.haikang.bean.AttendanceBean;
  5 +import com.sincere.haikang.bean.AttendanceInfoBean;
4 import com.sincere.haikang.dao.DeviceDao; 6 import com.sincere.haikang.dao.DeviceDao;
5 import com.sincere.haikang.libutils.HCEHomeAlarm; 7 import com.sincere.haikang.libutils.HCEHomeAlarm;
6 import com.sincere.haikang.libutils.HCEHomeCMS; 8 import com.sincere.haikang.libutils.HCEHomeCMS;
7 import com.sincere.haikang.libutils.HCEHomeSS; 9 import com.sincere.haikang.libutils.HCEHomeSS;
8 import com.sincere.haikang.libutils.HCEHomeStream; 10 import com.sincere.haikang.libutils.HCEHomeStream;
9 import com.sincere.haikang.server.AttendanceService; 11 import com.sincere.haikang.server.AttendanceService;
  12 +import com.sincere.haikang.utils.ApiHelper;
10 import com.sun.jna.Memory; 13 import com.sun.jna.Memory;
11 import com.sun.jna.NativeLong; 14 import com.sun.jna.NativeLong;
12 import com.sun.jna.Pointer; 15 import com.sun.jna.Pointer;
13 import org.springframework.beans.factory.annotation.Autowired; 16 import org.springframework.beans.factory.annotation.Autowired;
  17 +import org.springframework.beans.factory.annotation.Value;
14 import org.springframework.boot.ApplicationArguments; 18 import org.springframework.boot.ApplicationArguments;
15 import org.springframework.boot.ApplicationRunner; 19 import org.springframework.boot.ApplicationRunner;
16 import org.springframework.jdbc.core.JdbcTemplate; 20 import org.springframework.jdbc.core.JdbcTemplate;
@@ -21,6 +25,7 @@ import java.math.BigInteger; @@ -21,6 +25,7 @@ import java.math.BigInteger;
21 import java.nio.ByteBuffer; 25 import java.nio.ByteBuffer;
22 import java.text.SimpleDateFormat; 26 import java.text.SimpleDateFormat;
23 import java.util.Date; 27 import java.util.Date;
  28 +import java.util.HashMap;
24 29
25 @Component 30 @Component
26 public class CMSServer implements ApplicationRunner { 31 public class CMSServer implements ApplicationRunner {
@@ -40,8 +45,16 @@ public class CMSServer implements ApplicationRunner { @@ -40,8 +45,16 @@ public class CMSServer implements ApplicationRunner {
40 static HCEHomeCMS.NET_EHOME_CMS_LISTEN_PARAM struCMSListenPara = new HCEHomeCMS.NET_EHOME_CMS_LISTEN_PARAM(); 45 static HCEHomeCMS.NET_EHOME_CMS_LISTEN_PARAM struCMSListenPara = new HCEHomeCMS.NET_EHOME_CMS_LISTEN_PARAM();
41 46
42 // private String ip = "121.40.109.21"; 47 // private String ip = "121.40.109.21";
43 - private String ip = "172.16.2.145"; 48 + private String ip = "192.168.66.46";
44 49
  50 + @Value("${attendanceHost}")
  51 + private String host;
  52 +
  53 + @Value("${SchoolPwd}")
  54 + private String pwd;
  55 +
  56 + @Value("${SchoolAccount}")
  57 + private String account;
45 58
46 @Override 59 @Override
47 public void run(ApplicationArguments args) { 60 public void run(ApplicationArguments args) {
@@ -202,7 +215,7 @@ public class CMSServer implements ApplicationRunner { @@ -202,7 +215,7 @@ public class CMSServer implements ApplicationRunner {
202 String configCmd = "SetFingerPrintCfg"; 215 String configCmd = "SetFingerPrintCfg";
203 216
204 net_ehome_xml_cfg.pCmdBuf = new Memory(configCmd.length()); 217 net_ehome_xml_cfg.pCmdBuf = new Memory(configCmd.length());
205 - net_ehome_xml_cfg.pCmdBuf.write(0,configCmd.getBytes(),0,configCmd.length()); 218 + net_ehome_xml_cfg.pCmdBuf.write(0, configCmd.getBytes(), 0, configCmd.length());
206 net_ehome_xml_cfg.dwCmdLen = configCmd.length(); 219 net_ehome_xml_cfg.dwCmdLen = configCmd.length();
207 220
208 byte[] configByte = configCmd.getBytes(); 221 byte[] configByte = configCmd.getBytes();
@@ -215,21 +228,21 @@ public class CMSServer implements ApplicationRunner { @@ -215,21 +228,21 @@ public class CMSServer implements ApplicationRunner {
215 228
216 byte[] paramByte = strInputXParam.getBytes(); 229 byte[] paramByte = strInputXParam.getBytes();
217 230
218 - int pInLength = configByte.length+paramByte.length; 231 + int pInLength = configByte.length + paramByte.length;
219 232
220 byte[] byInput = new byte[pInLength]; 233 byte[] byInput = new byte[pInLength];
221 234
222 - System.out.println("configByte:"+configByte.length+" paramByte:"+paramByte.length+" byInput:"+byInput.length); 235 + System.out.println("configByte:" + configByte.length + " paramByte:" + paramByte.length + " byInput:" + byInput.length);
223 236
224 //复制配置信息 237 //复制配置信息
225 - System.arraycopy(configByte,0,byInput,0,configByte.length); 238 + System.arraycopy(configByte, 0, byInput, 0, configByte.length);
226 239
227 //复制配置信息 240 //复制配置信息
228 - System.arraycopy(paramByte,0,byInput,configByte.length,paramByte.length); 241 + System.arraycopy(paramByte, 0, byInput, configByte.length, paramByte.length);
229 242
230 //输入缓冲区 243 //输入缓冲区
231 net_ehome_xml_cfg.pInBuf = new Memory(pInLength); 244 net_ehome_xml_cfg.pInBuf = new Memory(pInLength);
232 - net_ehome_xml_cfg.pInBuf.write(0,byInput,0,byInput.length); 245 + net_ehome_xml_cfg.pInBuf.write(0, byInput, 0, byInput.length);
233 net_ehome_xml_cfg.dwInSize = byInput.length; 246 net_ehome_xml_cfg.dwInSize = byInput.length;
234 247
235 248
@@ -239,9 +252,8 @@ public class CMSServer implements ApplicationRunner { @@ -239,9 +252,8 @@ public class CMSServer implements ApplicationRunner {
239 net_ehome_xml_cfg.dwOutSize = 3 * 1024 * 1024; 252 net_ehome_xml_cfg.dwOutSize = 3 * 1024 * 1024;
240 253
241 254
242 -  
243 - boolean putXml = hCEhomeCMS.NET_ECMS_XMLConfig(lUserID, net_ehome_xml_cfg,net_ehome_xml_cfg.size());  
244 - System.out.println("下发卡号:" + putXml+" lUserID:"+lUserID+net_ehome_xml_cfg.toString()+" content:"+new String(byInput)); 255 + boolean putXml = hCEhomeCMS.NET_ECMS_XMLConfig(lUserID, net_ehome_xml_cfg, net_ehome_xml_cfg.size());
  256 + System.out.println("下发卡号:" + putXml + " lUserID:" + lUserID + net_ehome_xml_cfg.toString() + " content:" + new String(byInput));
245 } 257 }
246 258
247 /** 259 /**
@@ -286,9 +298,39 @@ public class CMSServer implements ApplicationRunner { @@ -286,9 +298,39 @@ public class CMSServer implements ApplicationRunner {
286 } else if (majirType.equals("0x4")) {// 298 } else if (majirType.equals("0x4")) {//
287 299
288 } else if (majirType.equals("0x5")) {//事件 300 } else if (majirType.equals("0x5")) {//事件
289 -// BigInteger bigInteger = new BigInteger(cardNo);  
290 -// cardNo = cardNo(bigInteger.toString(16)).toUpperCase(); 301 +
  302 + if (cardNo != null && cardNo.length() > 0) {
  303 +
  304 + BigInteger bigInteger = new BigInteger(cardNo);
  305 + cardNo = String.format("%08x", bigInteger); //16进制取8位,不够补0
  306 + cardNo = cardNo(cardNo).toUpperCase();
  307 + cardNo = new BigInteger(cardNo, 16).toString();
  308 +
  309 + }
291 System.out.println(String.format("设备号:%s 卡号:%s 时间:%s", deviceID, cardNo, time)); 310 System.out.println(String.format("设备号:%s 卡号:%s 时间:%s", deviceID, cardNo, time));
  311 +
  312 + if (deviceID != null && !deviceID.isEmpty()) {
  313 +
  314 + SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
  315 + String info = String.format("<AttendanceInfo submitTime=\"%s\"><Info device=\"%s\" card=\"%s\" operTime=\"%s\" direc=\"%s\"></Info></AttendanceInfo>", simpleDateFormat.format(new Date()), deviceID, cardNo, time, "-1");
  316 +
  317 + AttendanceInfoBean attendanceInfoBean = new AttendanceInfoBean();
  318 + attendanceInfoBean.setInfo(info);
  319 + attendanceInfoBean.setIsControl(0);
  320 + attendanceInfoBean.setPwd(pwd);
  321 + attendanceInfoBean.setUsername(account);
  322 +
  323 + String jsonResult = JSON.toJSONString(attendanceInfoBean);
  324 +
  325 + System.out.println(jsonResult);
  326 + String urlXST = host + "api/XiaoAnCommon/SendXST";
  327 + String result1 = ApiHelper.doPost(urlXST, new HashMap<String, String>(), jsonResult);
  328 + System.out.println("urlXST:" + result1);
  329 + String urlHXY = host + "api/XiaoAnCommon/SendHXY";
  330 + String result2 = ApiHelper.doPost(urlHXY, new HashMap<String, String>(), jsonResult);
  331 + System.out.println("urlHXY:" + result2);
  332 +
  333 + }
292 } 334 }
293 335
294 // System.out.println(strXML); 336 // System.out.println(strXML);
@@ -322,5 +364,4 @@ public class CMSServer implements ApplicationRunner { @@ -322,5 +364,4 @@ public class CMSServer implements ApplicationRunner {
322 return cardR; 364 return cardR;
323 365
324 } 366 }
325 -  
326 } 367 }
cloud/haikang/src/main/java/com/sincere/haikang/bean/AttendanceInfo.java 0 → 100644
@@ -0,0 +1,8 @@ @@ -0,0 +1,8 @@
  1 +package com.sincere.haikang.bean;
  2 +
  3 +public class AttendanceInfo {
  4 +
  5 + /*<AttendanceInfo submitTime="2017-08-01T16:30:30">
  6 + * <Info device="FD98DC58C467DB43" card="223456789" operTime="2017-08-01T11:20:30" direc="0"></Info>
  7 + * </AttendanceInfo>*/
  8 +}
cloud/haikang/src/main/java/com/sincere/haikang/bean/AttendanceInfoBean.java 0 → 100644
@@ -0,0 +1,61 @@ @@ -0,0 +1,61 @@
  1 +package com.sincere.haikang.bean;
  2 +
  3 +/**
  4 + * 考勤账号表
  5 + */
  6 +public class AttendanceInfoBean {
  7 +
  8 + /**
  9 + * 控制器类型,0是其他控制器,1是微耕控制器
  10 + */
  11 + private Integer isControl;
  12 +
  13 + public Integer getIsControl() {
  14 + return isControl;
  15 + }
  16 +
  17 + public void setIsControl(Integer isControl) {
  18 + this.isControl = isControl;
  19 + }
  20 +
  21 + public String getInfo() {
  22 + return info;
  23 + }
  24 +
  25 + public void setInfo(String info) {
  26 + this.info = info;
  27 + }
  28 +
  29 + public String getUsername() {
  30 + return username;
  31 + }
  32 +
  33 + public void setUsername(String username) {
  34 + this.username = username;
  35 + }
  36 +
  37 + public String getPwd() {
  38 + return pwd;
  39 + }
  40 +
  41 + public void setPwd(String pwd) {
  42 + this.pwd = pwd;
  43 + }
  44 +
  45 + /**
  46 + * 刷卡信息,XML格式字符串:<AttendanceInfo submitTime="2017-08-01T16:30:30">
  47 + * <Info device="FD98DC58C467DB43" card="223456789" operTime="2017-08-01T11:20:30" direc="0"></Info>
  48 + * </AttendanceInfo>
  49 + */
  50 + private String info;
  51 +
  52 + /**
  53 + * 账号
  54 + */
  55 + private String username;
  56 +
  57 + /**
  58 + * 密码
  59 + */
  60 + private String pwd;
  61 +}
cloud/haikang/src/main/java/com/sincere/haikang/utils/ApiHelper.java 0 → 100644
@@ -0,0 +1,270 @@ @@ -0,0 +1,270 @@
  1 +package com.sincere.haikang.utils;
  2 +
  3 +import org.apache.http.HttpEntity;
  4 +import org.apache.http.NameValuePair;
  5 +import org.apache.http.client.ClientProtocolException;
  6 +import org.apache.http.client.config.RequestConfig;
  7 +import org.apache.http.client.entity.UrlEncodedFormEntity;
  8 +import org.apache.http.client.methods.*;
  9 +import org.apache.http.entity.ContentType;
  10 +import org.apache.http.entity.StringEntity;
  11 +import org.apache.http.impl.client.CloseableHttpClient;
  12 +import org.apache.http.impl.client.HttpClients;
  13 +import org.apache.http.message.BasicNameValuePair;
  14 +import org.apache.http.util.EntityUtils;
  15 +
  16 +import java.io.IOException;
  17 +import java.io.UnsupportedEncodingException;
  18 +import java.util.*;
  19 +
  20 +public class ApiHelper {
  21 +
  22 + public static String doGet(String url,Map<String, String> headerParamMap) {
  23 + CloseableHttpClient httpClient = null;
  24 + CloseableHttpResponse response = null;
  25 + String result = "";
  26 + try {
  27 + // 通过址默认配置创建一个httpClient实例
  28 + httpClient = HttpClients.createDefault();
  29 + // 创建httpGet远程连接实例
  30 + HttpGet httpGet = new HttpGet(url);
  31 + // 设置请求头信息,
  32 + for (Map.Entry<String, String> entry : headerParamMap.entrySet()) {
  33 + httpGet.setHeader(entry.getKey(),entry.getValue());
  34 + }
  35 +
  36 + // 为httpGet实例设置配置
  37 + httpGet.setConfig(setRequestConfig());
  38 + // 执行get请求得到返回对象
  39 + response = httpClient.execute(httpGet);
  40 + // 通过返回对象获取返回数据
  41 + HttpEntity entity = response.getEntity();
  42 + // 通过EntityUtils中的toString方法将结果转换为字符串
  43 + result = EntityUtils.toString(entity);
  44 + } catch (ClientProtocolException e) {
  45 + e.printStackTrace();
  46 + } catch (IOException e) {
  47 + e.printStackTrace();
  48 + } finally {
  49 + // 关闭资源
  50 + if (null != response) {
  51 + try {
  52 + response.close();
  53 + } catch (IOException e) {
  54 + e.printStackTrace();
  55 + }
  56 + }
  57 + if (null != httpClient) {
  58 + try {
  59 + httpClient.close();
  60 + } catch (IOException e) {
  61 + e.printStackTrace();
  62 + }
  63 + }
  64 + }
  65 + return result;
  66 + }
  67 +
  68 +
  69 +
  70 + public static String doDelete(String url,Map<String, String> headerParamMap) {
  71 + CloseableHttpClient httpClient = null;
  72 + CloseableHttpResponse response = null;
  73 + String result = "";
  74 + try {
  75 + // 通过址默认配置创建一个httpClient实例
  76 + httpClient = HttpClients.createDefault();
  77 + // 创建HttpDelete远程连接实例
  78 + HttpDelete httpDelete = new HttpDelete(url);
  79 + // 设置请求头信息,
  80 + for (Map.Entry<String, String> entry : headerParamMap.entrySet()) {
  81 + httpDelete.setHeader(entry.getKey(),entry.getValue());
  82 + }
  83 + // 为httpGet实例设置配置
  84 + httpDelete.setConfig(setRequestConfig());
  85 + // 执行get请求得到返回对象
  86 + response = httpClient.execute(httpDelete);
  87 + // 通过返回对象获取返回数据
  88 + HttpEntity entity = response.getEntity();
  89 + // 通过EntityUtils中的toString方法将结果转换为字符串
  90 + result = EntityUtils.toString(entity);
  91 + } catch (ClientProtocolException e) {
  92 + e.printStackTrace();
  93 + } catch (IOException e) {
  94 + e.printStackTrace();
  95 + } finally {
  96 + // 关闭资源
  97 + if (null != response) {
  98 + try {
  99 + response.close();
  100 + } catch (IOException e) {
  101 + e.printStackTrace();
  102 + }
  103 + }
  104 + if (null != httpClient) {
  105 + try {
  106 + httpClient.close();
  107 + } catch (IOException e) {
  108 + e.printStackTrace();
  109 + }
  110 + }
  111 + }
  112 + return result;
  113 + }
  114 +
  115 + /**
  116 + * 表单格式的post请求
  117 + *
  118 + * @param url 接口地址
  119 + * @param headerParamMap 设置请求头
  120 + * @param paramMap 设置请求值,表单格式的请求值
  121 + * @return
  122 + */
  123 + public static String doPost(String url, Map<String, String> headerParamMap, Map<String, Object> paramMap) {
  124 + CloseableHttpClient httpClient;
  125 + String result;
  126 + // 创建httpClient实例
  127 + httpClient = HttpClients.createDefault();
  128 + // 创建httpPost远程连接实例
  129 + HttpPost httpPost = new HttpPost(url);
  130 + // 设置请求头
  131 + httpPost.addHeader("Content-Type", "application/x-www-form-urlencoded");
  132 + for (Map.Entry<String, String> entry : headerParamMap.entrySet()) {
  133 + httpPost.setHeader(entry.getKey(), entry.getValue());
  134 + }
  135 + // 为httpPost实例设置配置
  136 + httpPost.setConfig(setRequestConfig());
  137 +
  138 + // 封装post请求参数
  139 + if (null != paramMap && paramMap.size() > 0) {
  140 + List<NameValuePair> nvps = new ArrayList<NameValuePair>();
  141 + // 通过map集成entrySet方法获取entity
  142 + Set<Map.Entry<String, Object>> entrySet = paramMap.entrySet();
  143 + // 循环遍历,获取迭代器
  144 + Iterator<Map.Entry<String, Object>> iterator = entrySet.iterator();
  145 + while (iterator.hasNext()) {
  146 + Map.Entry<String, Object> mapEntry = iterator.next();
  147 + nvps.add(new BasicNameValuePair(mapEntry.getKey(), mapEntry.getValue().toString()));
  148 + }
  149 +
  150 + // 为httpPost设置封装好的请求参数
  151 + try {
  152 + UrlEncodedFormEntity entity = new UrlEncodedFormEntity(nvps, "UTF-8");
  153 + httpPost.setEntity(entity);
  154 + } catch (UnsupportedEncodingException e) {
  155 + e.printStackTrace();
  156 + }
  157 + }
  158 + result = closeHttpAndResult(httpClient, httpPost,null);
  159 + return result;
  160 + }
  161 + /**
  162 + * post请求,内容体比较灵活,任意字符串格式的内容
  163 + * @param url
  164 + * @param headerParamMap
  165 + * @param jsonParam
  166 + * @return
  167 + */
  168 + public static String doPost(String url, Map<String, String> headerParamMap, String jsonParam) {
  169 + CloseableHttpClient httpClient;
  170 + String result;
  171 + // 创建httpClient实例
  172 + httpClient = HttpClients.createDefault();
  173 + // 创建httpPost远程连接实例
  174 + HttpPost httpPost = new HttpPost(url);
  175 + // 设置请求头
  176 + httpPost.addHeader("Content-Type", "application/json");
  177 + for (Map.Entry<String, String> entry : headerParamMap.entrySet()) {
  178 + httpPost.setHeader(entry.getKey(),entry.getValue());
  179 + }
  180 + // 为httpPost实例设置配置
  181 + httpPost.setConfig(setRequestConfig());
  182 +// try {
  183 + StringEntity stringEntity = new StringEntity(jsonParam, ContentType.create("application/json","UTF-8"));
  184 +// stringEntity.setContentType("application/json");
  185 +// stringEntity.setContentEncoding("gzip");//请求头的编码格式
  186 + httpPost.setEntity(stringEntity);
  187 +// }catch (UnsupportedEncodingException e){
  188 +// e.printStackTrace();
  189 +// }
  190 + result = closeHttpAndResult(httpClient,httpPost,null);
  191 + return result;
  192 + }
  193 +
  194 + public static String doPut(String url, Map<String, String> headerParamMap, String jsonParam) {
  195 + CloseableHttpClient httpClient;
  196 + String result;
  197 + // 创建httpClient实例
  198 + httpClient = HttpClients.createDefault();
  199 + // 创建httpPost远程连接实例
  200 + HttpPut httpPut= new HttpPut(url);
  201 + // 设置请求头
  202 + httpPut.addHeader("Content-Type", "application/json");
  203 + for (Map.Entry<String, String> entry : headerParamMap.entrySet()) {
  204 + httpPut.setHeader(entry.getKey(),entry.getValue());
  205 + }
  206 + // 为httpPut实例设置配置
  207 + httpPut.setConfig(setRequestConfig());
  208 +
  209 + StringEntity stringEntity = new StringEntity(jsonParam, ContentType.create("application/json","UTF-8"));
  210 +
  211 + httpPut.setEntity(stringEntity);
  212 +
  213 + result = closeHttpAndResult(httpClient,null,httpPut);
  214 + return result;
  215 + }
  216 +
  217 +
  218 + private static String closeHttpAndResult(CloseableHttpClient httpClient,HttpPost httpPost,HttpPut httpPut){
  219 + CloseableHttpResponse httpResponse = null;
  220 + String result = null;
  221 + try {
  222 + // httpClient对象执行post或者是put请求,并返回响应参数对象
  223 + if(httpPost != null) {
  224 + httpResponse = httpClient.execute(httpPost);
  225 + }else {
  226 + httpResponse = httpClient.execute(httpPut);
  227 + }
  228 + // 从响应对象中获取响应内容
  229 + HttpEntity entity = httpResponse.getEntity();
  230 + result = EntityUtils.toString(entity);
  231 + } catch (ClientProtocolException e) {
  232 + e.printStackTrace();
  233 + } catch (IOException e) {
  234 + e.printStackTrace();
  235 + } finally {
  236 + // 关闭资源
  237 + if (null != httpResponse) {
  238 + try {
  239 + httpResponse.close();
  240 + } catch (IOException e) {
  241 + e.printStackTrace();
  242 + }
  243 + }
  244 + if (null != httpClient) {
  245 + try {
  246 + httpClient.close();
  247 + } catch (IOException e) {
  248 + e.printStackTrace();
  249 + }
  250 + }
  251 + }
  252 +
  253 + return result;
  254 + }
  255 +
  256 +
  257 + /**
  258 + * 设置配置请求参数
  259 + * @return
  260 + */
  261 + private static RequestConfig setRequestConfig(){
  262 + RequestConfig requestConfig = RequestConfig.custom().setConnectTimeout(35000)// 连接主机服务超时时间
  263 + .setConnectionRequestTimeout(35000)// 请求超时时间
  264 + .setSocketTimeout(60000)// 数据读取超时时间
  265 + .build();
  266 +
  267 + return requestConfig;
  268 + }
  269 +}
  270 +
cloud/haikang/src/main/resources/application.yaml
@@ -22,3 +22,10 @@ mybatis: @@ -22,3 +22,10 @@ mybatis:
22 mapper-locations: classpath:mapper/*.xml 22 mapper-locations: classpath:mapper/*.xml
23 config-location: classpath:mybatis-config.xml 23 config-location: classpath:mybatis-config.xml
24 24
  25 +attendanceHost: http://campus.myjxt.com/
  26 +SchoolAccount: ceshixiao
  27 +SchoolPwd: 11111111-6fef-48gh-a5a9-447ec68bff1f
  28 +
  29 +
  30 +
  31 +