From 35db0c3ea84b32a1e93ea72413b59c55480191e1 Mon Sep 17 00:00:00 2001 From: Harryxzy Date: Mon, 17 Feb 2025 11:37:31 +0800 Subject: [PATCH] =?UTF-8?q?=E9=92=B1=E6=99=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hs_err_pid14080.log | 227 ++++++++++++++++++ .../service/impl/SIAccountServiceImpl.java | 127 +++++++++- 2 files changed, 342 insertions(+), 12 deletions(-) create mode 100644 hs_err_pid14080.log diff --git a/hs_err_pid14080.log b/hs_err_pid14080.log new file mode 100644 index 000000000..a8e12a00f --- /dev/null +++ b/hs_err_pid14080.log @@ -0,0 +1,227 @@ +# +# There is insufficient memory for the Java Runtime Environment to continue. +# Native memory allocation (mmap) failed to map 266338304 bytes for G1 virtual space +# 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= +# JVM is running with Zero Based Compressed Oops mode in which the Java heap is +# placed in the first 32GB address space. The Java Heap base address is the +# maximum limit for the native heap growth. Please use -XX:HeapBaseMinAddress +# to set the Java Heap base and to place the Java Heap above 32GB virtual address. +# This output file may be truncated or incomplete. +# +# Out of Memory Error (os_windows.cpp:3760), pid=14080, tid=28956 +# +# JRE version: (17.0.5+1) (build ) +# Java VM: OpenJDK 64-Bit Server VM (17.0.5+1-b653.25, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, 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://221.226.25.34:3000': + +Host: 11th Gen Intel(R) Core(TM) i7-1185G7 @ 3.00GHz, 8 cores, 15G, Windows 11 , 64 bit Build 22621 (10.0.22621.4391) +Time: Fri Feb 14 15:22:37 2025 Windows 11 , 64 bit Build 22621 (10.0.22621.4391) elapsed time: 0.013680 seconds (0d 0h 0m 0s) + +--------------- T H R E A D --------------- + +Current thread (0x000002b63ab44860): JavaThread "Unknown thread" [_thread_in_vm, id=28956, stack(0x000000e509200000,0x000000e509300000)] + +Stack: [0x000000e509200000,0x000000e509300000] +Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) +V [jvm.dll+0x6830ca] +V [jvm.dll+0x83f4c4] +V [jvm.dll+0x840c6e] +V [jvm.dll+0x8412d3] +V [jvm.dll+0x2490b5] +V [jvm.dll+0x67ff99] +V [jvm.dll+0x6744aa] +V [jvm.dll+0x308f2b] +V [jvm.dll+0x3103e6] +V [jvm.dll+0x36013e] +V [jvm.dll+0x36036f] +V [jvm.dll+0x2df018] +V [jvm.dll+0x2dff84] +V [jvm.dll+0x810d91] +V [jvm.dll+0x36df31] +V [jvm.dll+0x7f028c] +V [jvm.dll+0x3f0cbf] +V [jvm.dll+0x3f2801] +C [jli.dll+0x526b] +C [ucrtbase.dll+0x29333] +C [KERNEL32.DLL+0x1259d] +C [ntdll.dll+0x5af38] + + +--------------- P R O C E S S --------------- + +Threads class SMR info: +_java_thread_list=0x00007ffafaf88f98, length=0, elements={ +} + +Java Threads: ( => current thread ) + +Other Threads: + 0x000002b63abaf200 GCTaskThread "GC Thread#0" [stack: 0x000000e509300000,0x000000e509400000] [id=15580] + 0x000002b63abbfed0 ConcurrentGCThread "G1 Main Marker" [stack: 0x000000e509400000,0x000000e509500000] [id=11804] + 0x000002b63abc08e0 ConcurrentGCThread "G1 Conc#0" [stack: 0x000000e509500000,0x000000e509600000] [id=7940] + +[error occurred during error reporting (printing all threads), id 0xc0000005, EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x00007ffafa73fbd7] + +VM state: not at safepoint (not fully initialized) + +VM Mutex/Monitor currently owned by a thread: ([mutex/lock_event]) +[0x000002b63ab3f8e0] Heap_lock - owner thread: 0x000002b63ab44860 + +Heap address: 0x0000000702600000, size: 4058 MB, Compressed Oops mode: Zero based, Oop shift amount: 3 + +CDS archive(s) mapped at: [0x0000000000000000-0x0000000000000000-0x0000000000000000), size 0, SharedBaseAddress: 0x0000000800000000, ArchiveRelocationMode: 0. +Narrow klass base: 0x0000000000000000, Narrow klass shift: 0, Narrow klass range: 0x0 + +GC Precious Log: + + +Heap: + garbage-first heap total 0K, used 0K [0x0000000702600000, 0x0000000800000000) + region size 2048K, 0 young (0K), 0 survivors (0K) + +[error occurred during error reporting (printing heap information), id 0xc0000005, EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x00007ffafab2cd59] + +GC Heap History (0 events): +No events + +Dll operation events (1 events): +Event: 0.009 Loaded shared library C:\Program Files\JetBrains\IntelliJ IDEA 2022.1.4\jbr\bin\java.dll + +Deoptimization events (0 events): +No events + +Classes unloaded (0 events): +No events + +Classes redefined (0 events): +No events + +Internal exceptions (0 events): +No events + +VM Operations (0 events): +No events + +Events (0 events): +No events + + +Dynamic libraries: +0x00007ff7ee970000 - 0x00007ff7ee97a000 C:\Program Files\JetBrains\IntelliJ IDEA 2022.1.4\jbr\bin\java.exe +0x00007ffb54c10000 - 0x00007ffb54e27000 C:\WINDOWS\SYSTEM32\ntdll.dll +0x00007ffb53830000 - 0x00007ffb538f4000 C:\WINDOWS\System32\KERNEL32.DLL +0x00007ffb51ff0000 - 0x00007ffb523aa000 C:\WINDOWS\System32\KERNELBASE.dll +0x00007ffb525d0000 - 0x00007ffb526e1000 C:\WINDOWS\System32\ucrtbase.dll +0x00007ffafa410000 - 0x00007ffafa427000 C:\Program Files\JetBrains\IntelliJ IDEA 2022.1.4\jbr\bin\jli.dll +0x00007ffb396f0000 - 0x00007ffb3970b000 C:\Program Files\JetBrains\IntelliJ IDEA 2022.1.4\jbr\bin\VCRUNTIME140.dll +0x00007ffb53f10000 - 0x00007ffb540be000 C:\WINDOWS\System32\USER32.dll +0x00007ffb525a0000 - 0x00007ffb525c6000 C:\WINDOWS\System32\win32u.dll +0x00007ffb3d6c0000 - 0x00007ffb3d952000 C:\WINDOWS\WinSxS\amd64_microsoft.windows.common-controls_6595b64144ccf1df_6.0.22621.4541_none_2710d1c57384c085\COMCTL32.dll +0x00007ffb52b20000 - 0x00007ffb52b49000 C:\WINDOWS\System32\GDI32.dll +0x00007ffb52ef0000 - 0x00007ffb52f97000 C:\WINDOWS\System32\msvcrt.dll +0x00007ffb51ed0000 - 0x00007ffb51feb000 C:\WINDOWS\System32\gdi32full.dll +0x00007ffb52860000 - 0x00007ffb528fa000 C:\WINDOWS\System32\msvcp_win.dll +0x00007ffb540c0000 - 0x00007ffb540f1000 C:\WINDOWS\System32\IMM32.DLL +0x00007ffb423a0000 - 0x00007ffb423ac000 C:\Program Files\JetBrains\IntelliJ IDEA 2022.1.4\jbr\bin\vcruntime140_1.dll +0x00007ffae6920000 - 0x00007ffae69ad000 C:\Program Files\JetBrains\IntelliJ IDEA 2022.1.4\jbr\bin\msvcp140.dll +0x00007ffafa450000 - 0x00007ffafb0bb000 C:\Program Files\JetBrains\IntelliJ IDEA 2022.1.4\jbr\bin\server\jvm.dll +0x00007ffb53bc0000 - 0x00007ffb53c72000 C:\WINDOWS\System32\ADVAPI32.dll +0x00007ffb53e50000 - 0x00007ffb53ef7000 C:\WINDOWS\System32\sechost.dll +0x00007ffb524b0000 - 0x00007ffb524d8000 C:\WINDOWS\System32\bcrypt.dll +0x00007ffb53d30000 - 0x00007ffb53e44000 C:\WINDOWS\System32\RPCRT4.dll +0x00007ffb4a3c0000 - 0x00007ffb4a3f4000 C:\WINDOWS\SYSTEM32\WINMM.dll +0x00007ffb36550000 - 0x00007ffb36559000 C:\WINDOWS\SYSTEM32\WSOCK32.dll +0x00007ffb4cfe0000 - 0x00007ffb4cfea000 C:\WINDOWS\SYSTEM32\VERSION.dll +0x00007ffb52d00000 - 0x00007ffb52d71000 C:\WINDOWS\System32\WS2_32.dll +0x00007ffb50f60000 - 0x00007ffb50f78000 C:\WINDOWS\SYSTEM32\kernel.appcore.dll +0x00007ffb17c80000 - 0x00007ffb17c8a000 C:\Program Files\JetBrains\IntelliJ IDEA 2022.1.4\jbr\bin\jimage.dll +0x00007ffb4f4d0000 - 0x00007ffb4f702000 C:\WINDOWS\SYSTEM32\DBGHELP.DLL +0x00007ffb54680000 - 0x00007ffb54a11000 C:\WINDOWS\System32\combase.dll +0x00007ffb52c20000 - 0x00007ffb52cf7000 C:\WINDOWS\System32\OLEAUT32.dll +0x00007ffb4d360000 - 0x00007ffb4d392000 C:\WINDOWS\SYSTEM32\dbgcore.DLL +0x00007ffb523b0000 - 0x00007ffb5242b000 C:\WINDOWS\System32\bcryptPrimitives.dll +0x00007ffb16db0000 - 0x00007ffb16dd5000 C:\Program Files\JetBrains\IntelliJ IDEA 2022.1.4\jbr\bin\java.dll + +dbghelp: loaded successfully - version: 4.0.5 - missing functions: none +symbol engine: initialized successfully - sym options: 0x614 - pdb path: .;C:\Program Files\JetBrains\IntelliJ IDEA 2022.1.4\jbr\bin;C:\WINDOWS\SYSTEM32;C:\WINDOWS\WinSxS\amd64_microsoft.windows.common-controls_6595b64144ccf1df_6.0.22621.4541_none_2710d1c57384c085;C:\Program Files\JetBrains\IntelliJ IDEA 2022.1.4\jbr\bin\server + +VM Arguments: +java_command: git4idea.http.GitAskPassApp Username for 'http://221.226.25.34:3000': +java_class_path (initial): C:/Program Files/JetBrains/IntelliJ IDEA 2022.1.4/plugins/vcs-git/lib/git4idea-rt.jar;C:/Program Files/JetBrains/IntelliJ IDEA 2022.1.4/lib/externalProcess-rt.jar;C:/Program Files/JetBrains/IntelliJ IDEA 2022.1.4/lib/app.jar;C:/Program Files/JetBrains/IntelliJ IDEA 2022.1.4/lib/3rd-party-rt.jar +Launcher Type: SUN_STANDARD + +[Global flags] + intx CICompilerCount = 4 {product} {ergonomic} + uint ConcGCThreads = 2 {product} {ergonomic} + uint G1ConcRefinementThreads = 8 {product} {ergonomic} + size_t G1HeapRegionSize = 2097152 {product} {ergonomic} + uintx GCDrainStackTargetSize = 64 {product} {ergonomic} + size_t InitialHeapSize = 266338304 {product} {ergonomic} + size_t MarkStackSize = 4194304 {product} {ergonomic} + size_t MaxHeapSize = 4255121408 {product} {ergonomic} + size_t MinHeapDeltaBytes = 2097152 {product} {ergonomic} + size_t MinHeapSize = 8388608 {product} {ergonomic} + uintx NonNMethodCodeHeapSize = 5839372 {pd product} {ergonomic} + uintx NonProfiledCodeHeapSize = 122909434 {pd product} {ergonomic} + uintx ProfiledCodeHeapSize = 122909434 {pd product} {ergonomic} + uintx ReservedCodeCacheSize = 251658240 {pd product} {ergonomic} + bool SegmentedCodeCache = true {product} {ergonomic} + size_t SoftMaxHeapSize = 4255121408 {manageable} {ergonomic} + bool UseCompressedClassPointers = true {product lp64_product} {ergonomic} + bool UseCompressedOops = true {product 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:\Program Files\Java\jdk1.8.0_341 +CLASSPATH=D:\WEAVER\Resin\lib\resin.jar +PATH=D:\Develop\Git\mingw64\libexec\git-core;D:\Develop\Git\mingw64\libexec\git-core;D:\Develop\Git\mingw64\bin;D:\Develop\Git\usr\bin;C:\Users\Harryxzy\bin;C:\Program Files (x86)\Microsoft SQL Server\100\DTS\Binn;C:\Program Files\Java\jre1.8.0_341\bin;C:\Program Files\Java\jdk1.8.0_341\bin;D:\Develop\apache-maven-3.8.1\bin;C:\Program Files\Common Files\Oracle\Java\javapath;C:\Program Files (x86)\VMware\VMware Workstation\bin;D:\oracle\product\11.2.0\dbhome_1\bin;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)\Microsoft SQL Server\100\Tools\Binn;C:\Program Files\Microsoft SQL Server\100\Tools\Binn;C:\Program Files\Microsoft SQL Server\100\DTS\Binn;C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE;C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\PrivateAssemblies;D:\Develop\Git\cmd;C:\Program Files (x86)\NetSarang\Xshell 7;C:\Program Files (x86)\NetSarang\Xftp 7;C:\Program Files\nodejs;C:\Program Files\Docker\Docker\resources\bin;C:\Users\Public\Desktop;D:\MySQL8.0.21\bin;E:\Python\Python313\Scripts;E:\Python\Python313;C:\Program Files\MySQL\MySQL Shell 8.0\bin;C:\Users\Harryxzy\AppData\Local\Microsoft\WindowsApps;D:\Develop\Microsoft VS Code\bin;C:\Users\Harryxzy\AppData\Roaming\npm;C:\Users\Harryxzy\AppData\Local\Programs\Fiddler +USERNAME=Harryxzy +DISPLAY=:0.0 +LC_ALL=en_US.UTF-8 +TERM=xterm-256color +TMPDIR=C:\Users\Harryxzy\AppData\Local\Temp +OS=Windows_NT +PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 140 Stepping 1, GenuineIntel +TMP=C:\Users\Harryxzy\AppData\Local\Temp +TEMP=C:\Users\Harryxzy\AppData\Local\Temp + + + +--------------- S Y S T E M --------------- + +OS: + Windows 11 , 64 bit Build 22621 (10.0.22621.4391) +OS uptime: 1 days 6:11 hours +Hyper-V role detected + +CPU: total 8 (initial active 8) (4 cores per cpu, 2 threads per core) family 6 model 140 stepping 1 microcode 0xba, cx8, cmov, fxsr, ht, mmx, 3dnowpref, sse, sse2, sse3, ssse3, sse4.1, sse4.2, popcnt, lzcnt, tsc, tscinvbit, avx, avx2, aes, erms, clmul, bmi1, bmi2, adx, avx512f, avx512dq, avx512cd, avx512bw, avx512vl, sha, fma, vzeroupper, avx512_vpopcntdq, avx512_vpclmulqdq, avx512_vaes, avx512_vnni, clflush, clflushopt, clwb, avx512_vbmi2, avx512_vbmi, hv + +Memory: 4k page, system-wide physical 16226M (372M free) +TotalPageFile size 51523M (AvailPageFile size 115M) +current process WorkingSet (physical memory assigned to process): 11M, peak: 11M +current process commit charge ("private bytes"): 60M, peak: 314M + +vm_info: OpenJDK 64-Bit Server VM (17.0.5+1-b653.25) for windows-amd64 JRE (17.0.5+1-b653.25), built on 2023-01-04 by "builduser" with MS VC++ 16.10 / 16.11 (VS2019) + +END. diff --git a/src/com/engine/salary/service/impl/SIAccountServiceImpl.java b/src/com/engine/salary/service/impl/SIAccountServiceImpl.java index fcf98d858..af5173619 100644 --- a/src/com/engine/salary/service/impl/SIAccountServiceImpl.java +++ b/src/com/engine/salary/service/impl/SIAccountServiceImpl.java @@ -2477,8 +2477,46 @@ public class SIAccountServiceImpl extends Service implements SIAccountService { if (!StringUtils.isEmpty(baseMap.getOrDefault("合计", "").toString())) { insuranceAccountDetailPO.setTotal(baseMap.get("合计").toString()); } else { + // 钱智 差额计算 + // 钱智 社保差异 + final BigDecimal[] socialSpecialSum = {new BigDecimal(0)}; + if (StringUtils.isNotEmpty(insuranceAccountDetailPO.getSocialSpecialJson())) { + Map socialSpecialJson = JSON.parseObject(insuranceAccountDetailPO.getSocialSpecialJson(), new HashMap().getClass()); + if(socialSpecialJson!=null){ + Map socialComJson = JSON.parseObject(insuranceAccountDetailPO.getSocialComJson(), new HashMap().getClass()); + socialSpecialJson.forEach((k, v) -> { + BigDecimal specialComVal = v == null ? new BigDecimal("0") : new BigDecimal(v.toString()); + String standardSocialCom = Util.null2String(socialComJson.get(k)); + BigDecimal standardComPerVal = new BigDecimal(0); + if (org.apache.commons.lang3.math.NumberUtils.isCreatable(standardSocialCom)) { + standardComPerVal = new BigDecimal(standardSocialCom); + } + BigDecimal subtract = specialComVal.subtract(standardComPerVal); + socialSpecialSum[0] = socialSpecialSum[0].add(subtract); + }); + } + } + // 钱智 公积金差异 + final BigDecimal[] fundSpecialSum = {new BigDecimal(0)}; + if (StringUtils.isNotEmpty(insuranceAccountDetailPO.getFundSpecialJson())) { + Map fundSpecialJson = JSON.parseObject(insuranceAccountDetailPO.getFundSpecialJson(), new HashMap().getClass()); + if(fundSpecialJson!=null){ + fundSpecialJson.forEach((k, v) -> { + Map fundComJson = JSON.parseObject(insuranceAccountDetailPO.getFundComJson(), new HashMap().getClass()); + BigDecimal specialComVal = v == null ? new BigDecimal("0") : new BigDecimal(v.toString()); + String standardFundCom = Util.null2String(fundComJson.get(k)); + BigDecimal standardFundComVal = new BigDecimal(0); + if (org.apache.commons.lang3.math.NumberUtils.isCreatable(standardFundCom)) { + standardFundComVal = new BigDecimal(standardFundCom); + } + BigDecimal subtract = specialComVal.subtract(standardFundComVal); + socialSpecialSum[0] = socialSpecialSum[0].add(subtract); + }); + } + } insuranceAccountDetailPO.setTotal(new BigDecimal(insuranceAccountDetailPO.getPerSum() == null ? "0" : insuranceAccountDetailPO.getPerSum()) .add(new BigDecimal(insuranceAccountDetailPO.getComSum() == null ? "0" : insuranceAccountDetailPO.getComSum())) + .add(socialSpecialSum[0]) .toString()); } @@ -4003,8 +4041,47 @@ public class SIAccountServiceImpl extends Service implements SIAccountService { insuranceAccountDetailPO.setFundSum(fundPerson.add(fundCom).toPlainString()); //其他福利合计 insuranceAccountDetailPO.setOtherSum(otherPerson.add(otherCom).toPlainString()); + + // 计算超额合计 + + // 钱智 社保差异 + final BigDecimal[] socialSpecialSum = {new BigDecimal(0)}; + if (StringUtils.isNotEmpty(insuranceAccountDetailPO.getSocialSpecialJson())) { + Map socialSpecialJson = JSON.parseObject(insuranceAccountDetailPO.getSocialSpecialJson(), new HashMap().getClass()); + if(socialSpecialJson!=null){ + Map socialComJson = JSON.parseObject(insuranceAccountDetailPO.getSocialComJson(), new HashMap().getClass()); + socialSpecialJson.forEach((k, v) -> { + BigDecimal specialComVal = v == null ? new BigDecimal("0") : new BigDecimal(v.toString()); + String standardSocialCom = Util.null2String(socialComJson.get(k)); + BigDecimal standardComPerVal = new BigDecimal(0); + if (org.apache.commons.lang3.math.NumberUtils.isCreatable(standardSocialCom)) { + standardComPerVal = new BigDecimal(standardSocialCom); + } + BigDecimal subtract = specialComVal.subtract(standardComPerVal); + socialSpecialSum[0] = socialSpecialSum[0].add(subtract); + }); + } + } + // 钱智 公积金差异 + final BigDecimal[] fundSpecialSum = {new BigDecimal(0)}; + if (StringUtils.isNotEmpty(insuranceAccountDetailPO.getFundSpecialJson())) { + Map fundSpecialJson = JSON.parseObject(insuranceAccountDetailPO.getFundSpecialJson(), new HashMap().getClass()); + if(fundSpecialJson!=null){ + fundSpecialJson.forEach((k, v) -> { + Map fundComJson = JSON.parseObject(insuranceAccountDetailPO.getFundComJson(), new HashMap().getClass()); + BigDecimal specialComVal = v == null ? new BigDecimal("0") : new BigDecimal(v.toString()); + String standardFundCom = Util.null2String(fundComJson.get(k)); + BigDecimal standardFundComVal = new BigDecimal(0); + if (org.apache.commons.lang3.math.NumberUtils.isCreatable(standardFundCom)) { + standardFundComVal = new BigDecimal(standardFundCom); + } + BigDecimal subtract = specialComVal.subtract(standardFundComVal); + socialSpecialSum[0] = socialSpecialSum[0].add(subtract); + }); + } + } //合计 - insuranceAccountDetailPO.setTotal(perSum.add(comSum).toPlainString()); + insuranceAccountDetailPO.setTotal(perSum.add(comSum).add(socialSpecialSum[0]).toPlainString()); return insuranceAccountDetailPO; } @@ -5265,6 +5342,9 @@ public class SIAccountServiceImpl extends Service implements SIAccountService { // 获取特殊人员社保福利档案数据 List ufTsrysjsbfldaList = ufTsrysjsbfldaListMap.get(k.intValue()); + if (insuranceAccountDetailPO.getEmployeeId().equals(95L)) { + System.out.println("h"); + } //核算社保 accountSocial(insuranceAccountDetailPO, v, billMonth, ufTsrysjsbfldaList); //核算公积金 @@ -5492,7 +5572,7 @@ public class SIAccountServiceImpl extends Service implements SIAccountService { List xmidList = new ArrayList<>(); if (CollectionUtils.isNotEmpty(ufTsrysjsbfldaList)) { xmidList = ufTsrysjsbfldaList.stream() - .filter(po -> po.getGrbl() != null) + .filter(po -> (po.getGrbl() != null || po.getGrgdz() != null)) .map(UfTsrysjsbfldaPO::getSbflxm) .filter(xmid -> NumberUtils.isNumber(xmid)) .map(Long::valueOf) @@ -5575,16 +5655,19 @@ public class SIAccountServiceImpl extends Service implements SIAccountService { specialPerResult = SalaryEntityUtil.carryRule(newScale, po.getRententionRule(), ufTsrysjsbfldaPO.getDyjs().multiply(specialProportion)); // 覆盖至个人部分 result = specialPerResult; + + } + // 只要这个台账里面维护了个人比例或者单位比例或者个人固定值或者单位固定值 + if (ufTsrysjsbfldaPO != null && (ufTsrysjsbfldaPO.getGrbl() != null || ufTsrysjsbfldaPO.getDybl() != null || ufTsrysjsbfldaPO.getGrgdz() != null || ufTsrysjsbfldaPO.getDwgdz() != null)) { // 基数也要覆盖 - if (fundBaseMap.containsKey(String.valueOf(e))) { + // if (fundBaseMap.containsKey(String.valueOf(e))) { fundBaseMap.put(String.valueOf(e), ufTsrysjsbfldaPO.getDyjs().toPlainString()); - } + // } } fundPerJsonMap.put(String.valueOf(e), result.toPlainString()); fundPer.add(result); }); insuranceAccountDetailPO.setFundPerJson(JSON.toJSONString(fundPerJsonMap)); - insuranceAccountDetailPO.setFundPaymentBaseString(JSON.toJSONString(fundBaseMap)); BigDecimal funPerSum = new BigDecimal("0"); for (BigDecimal bigDecimal : fundPer) { funPerSum = funPerSum.add(bigDecimal); @@ -5596,7 +5679,7 @@ public class SIAccountServiceImpl extends Service implements SIAccountService { List comXmidList = new ArrayList<>(); if (CollectionUtils.isNotEmpty(ufTsrysjsbfldaList)) { comXmidList = ufTsrysjsbfldaList.stream() - .filter(po -> po.getGrbl() != null) + .filter(po -> (po.getDybl() != null || po.getDwgdz() != null)) .map(UfTsrysjsbfldaPO::getSbflxm) .filter(xmid -> NumberUtils.isNumber(xmid)) .map(Long::valueOf) @@ -5682,12 +5765,21 @@ public class SIAccountServiceImpl extends Service implements SIAccountService { BigDecimal specialProportion = ufTsrysjsbfldaPO.getDybl().divide(new BigDecimal("100")); specialComResult = SalaryEntityUtil.carryRule(newScale, po.getRententionRule(), ufTsrysjsbfldaPO.getDyjs().multiply(specialProportion)); specialFundJsonMap.put(String.valueOf(e), specialComResult.toPlainString()); + + } + // 只要这个台账里面维护了个人比例或者单位比例或者个人固定值或者单位固定值 + if (ufTsrysjsbfldaPO != null && (ufTsrysjsbfldaPO.getGrbl() != null || ufTsrysjsbfldaPO.getDybl() != null || ufTsrysjsbfldaPO.getGrgdz() != null || ufTsrysjsbfldaPO.getDwgdz() != null)) { + // 基数也要覆盖 + // if (fundBaseMap.containsKey(String.valueOf(e))) { + fundBaseMap.put(String.valueOf(e), ufTsrysjsbfldaPO.getDyjs().toPlainString()); + // } } fundComJsonMap.put(String.valueOf(e), result.toPlainString()); fundComList.add(result); }); insuranceAccountDetailPO.setFundComJson(JSON.toJSONString(fundComJsonMap)); insuranceAccountDetailPO.setFundSpecialJson(JSON.toJSONString(specialFundJsonMap)); + insuranceAccountDetailPO.setFundPaymentBaseString(JSON.toJSONString(fundBaseMap)); BigDecimal fundComSum = new BigDecimal("0"); for (BigDecimal bigDecimal : fundComList) { fundComSum = fundComSum.add(bigDecimal); @@ -5722,7 +5814,7 @@ public class SIAccountServiceImpl extends Service implements SIAccountService { List perXmidList = new ArrayList<>(); if (CollectionUtils.isNotEmpty(ufTsrysjsbfldaList)) { perXmidList = ufTsrysjsbfldaList.stream() - .filter(data -> data.getGrbl() != null) + .filter(data -> (data.getGrbl() != null || data.getGrgdz() != null)) .map(UfTsrysjsbfldaPO::getSbflxm) .filter(xmid -> NumberUtils.isNumber(xmid)) .map(Long::valueOf) @@ -5805,16 +5897,19 @@ public class SIAccountServiceImpl extends Service implements SIAccountService { specialPerResult = SalaryEntityUtil.carryRule(newScale, po.getRententionRule(), ufTsrysjsbfldaPO.getDyjs().multiply(specialProportion)); // 覆盖至个人部分 result = specialPerResult; + } + // 只要这个台账里面维护了个人比例或者单位比例或者个人固定值或者单位固定值 + if (ufTsrysjsbfldaPO != null && (ufTsrysjsbfldaPO.getGrbl() != null || ufTsrysjsbfldaPO.getDybl() != null || ufTsrysjsbfldaPO.getGrgdz() != null || ufTsrysjsbfldaPO.getDwgdz() != null)) { // 基数也要覆盖 - if (socialBaseMap.containsKey(String.valueOf(e))) { + // if (socialBaseMap.containsKey(String.valueOf(e))) { socialBaseMap.put(String.valueOf(e), ufTsrysjsbfldaPO.getDyjs().toPlainString()); - } + // } } socialPerJsonMap.put(String.valueOf(e), result.toPlainString()); socialPer.add(result); }); insuranceAccountDetailPO.setSocialPerJson(JSON.toJSONString(socialPerJsonMap)); - insuranceAccountDetailPO.setSocialPaymentBaseString(JSON.toJSONString(socialBaseMap)); + // insuranceAccountDetailPO.setSocialPaymentBaseString(JSON.toJSONString(socialBaseMap)); BigDecimal socialPerSum = new BigDecimal("0"); for (BigDecimal bigDecimal : socialPer) { socialPerSum = socialPerSum.add(bigDecimal); @@ -5825,7 +5920,7 @@ public class SIAccountServiceImpl extends Service implements SIAccountService { List comXmidList = new ArrayList<>(); if (CollectionUtils.isNotEmpty(ufTsrysjsbfldaList)) { comXmidList = ufTsrysjsbfldaList.stream() - .filter(data -> data.getDybl() != null) + .filter(data -> (data.getDybl() != null || data.getDwgdz() != null)) .map(UfTsrysjsbfldaPO::getSbflxm) .filter(xmid -> NumberUtils.isNumber(xmid)) .map(Long::valueOf) @@ -5911,11 +6006,19 @@ public class SIAccountServiceImpl extends Service implements SIAccountService { specialComResult = SalaryEntityUtil.carryRule(newScale, po.getRententionRule(), ufTsrysjsbfldaPO.getDyjs().multiply(specialProportion)); specialSocialJsonMap.put(String.valueOf(e), specialComResult.toPlainString()); } - insuranceAccountDetailPO.setSocialSpecialJson(JSON.toJSONString(specialSocialJsonMap)); + // 只要这个台账里面维护了个人比例或者单位比例或者个人固定值或者单位固定值 + if (ufTsrysjsbfldaPO != null && (ufTsrysjsbfldaPO.getGrbl() != null || ufTsrysjsbfldaPO.getDybl() != null || ufTsrysjsbfldaPO.getGrgdz() != null || ufTsrysjsbfldaPO.getDwgdz() != null)) { + // 基数也要覆盖 + // if (socialBaseMap.containsKey(String.valueOf(e))) { + socialBaseMap.put(String.valueOf(e), ufTsrysjsbfldaPO.getDyjs().toPlainString()); + // } + } sociaComJsonMap.put(String.valueOf(e), result.toPlainString()); socialCom.add(result); }); + insuranceAccountDetailPO.setSocialSpecialJson(JSON.toJSONString(specialSocialJsonMap)); + insuranceAccountDetailPO.setSocialPaymentBaseString(JSON.toJSONString(socialBaseMap)); insuranceAccountDetailPO.setSocialComJson(JSON.toJSONString(sociaComJsonMap)); BigDecimal socialComSum = new BigDecimal("0"); for (BigDecimal decimal : socialCom) {