zhoulisky 9 months ago
parent
commit
0b7af4684a
65 changed files with 1373 additions and 478 deletions
  1. 297 0
      hs_err_pid23972.log
  2. 3 0
      kd-service-api/kd-scientific-api/src/main/java/org/sky/scientific/pojo/dto/XmCostDetailsDTO.java
  3. 4 4
      kd-service-api/kd-scientific-api/src/main/java/org/sky/scientific/pojo/entity/A107041.java
  4. 11 11
      kd-service-api/kd-scientific-api/src/main/java/org/sky/scientific/pojo/entity/SalaryEntity.java
  5. 18 0
      kd-service-api/kd-scientific-api/src/main/java/org/sky/scientific/pojo/entity/XmCostDetailsEntity.java
  6. 1 0
      kd-service-api/kd-scientific-api/src/main/java/org/sky/scientific/pojo/entity/XmTechnicianEntity.java
  7. 21 21
      kd-service-api/kd-scientific-api/src/main/java/org/sky/scientific/pojo/vo/A107012VO.java
  8. 43 45
      kd-service-api/kd-scientific-api/src/main/java/org/sky/scientific/pojo/vo/A107041VO.java
  9. 1 1
      kd-service-api/kd-scientific-api/src/main/java/org/sky/scientific/pojo/vo/A107_1VO.java
  10. 31 31
      kd-service-api/kd-scientific-api/src/main/java/org/sky/scientific/pojo/vo/A107_2VO.java
  11. 3 0
      kd-service-api/kd-scientific-api/src/main/java/org/sky/scientific/pojo/vo/CostSummaryVO.java
  12. 0 63
      kd-service-api/kd-scientific-api/src/main/java/org/sky/scientific/pojo/vo/DeductionCostSummary.java
  13. 13 8
      kd-service-api/kd-scientific-api/src/main/java/org/sky/scientific/pojo/vo/FinanceCostSummary.java
  14. 12 10
      kd-service-api/kd-scientific-api/src/main/java/org/sky/scientific/pojo/vo/HighTechCostSummary.java
  15. 10 0
      kd-service/kd-scientific/src/main/java/org/sky/scientific/controller/CostController.java
  16. 1 0
      kd-service/kd-scientific/src/main/java/org/sky/scientific/controller/EnterpriseController.java
  17. 43 59
      kd-service/kd-scientific/src/main/java/org/sky/scientific/controller/KYCGController.java
  18. 15 1
      kd-service/kd-scientific/src/main/java/org/sky/scientific/controller/TechnicianController.java
  19. 7 0
      kd-service/kd-scientific/src/main/java/org/sky/scientific/controller/XmTechnicianHoursController.java
  20. 4 0
      kd-service/kd-scientific/src/main/java/org/sky/scientific/excel/CgJsbzExcel.java
  21. 3 0
      kd-service/kd-scientific/src/main/java/org/sky/scientific/excel/CgKylwExcel.java
  22. 9 5
      kd-service/kd-scientific/src/main/java/org/sky/scientific/excel/CgQtExcel.java
  23. 8 0
      kd-service/kd-scientific/src/main/java/org/sky/scientific/excel/CgRjzzqExcel.java
  24. 9 5
      kd-service/kd-scientific/src/main/java/org/sky/scientific/excel/CgZlExcel.java
  25. 1 2
      kd-service/kd-scientific/src/main/java/org/sky/scientific/mapper/A107041Mapper.java
  26. 13 0
      kd-service/kd-scientific/src/main/java/org/sky/scientific/mapper/A107041Mapper.xml
  27. 1 0
      kd-service/kd-scientific/src/main/java/org/sky/scientific/mapper/A107_1Mapper.xml
  28. 0 1
      kd-service/kd-scientific/src/main/java/org/sky/scientific/mapper/AssetMapper.xml
  29. 0 11
      kd-service/kd-scientific/src/main/java/org/sky/scientific/mapper/CgZlMapper.java
  30. 0 4
      kd-service/kd-scientific/src/main/java/org/sky/scientific/mapper/CgZlMapper.xml
  31. 3 1
      kd-service/kd-scientific/src/main/java/org/sky/scientific/mapper/XmCostDetailsMapper.xml
  32. 1 1
      kd-service/kd-scientific/src/main/java/org/sky/scientific/mapper/XmLeaseMapper.xml
  33. 2 0
      kd-service/kd-scientific/src/main/java/org/sky/scientific/mapper/XmTechnicianMapper.xml
  34. 2 0
      kd-service/kd-scientific/src/main/java/org/sky/scientific/mapper/XmWwxmCostMapper.java
  35. 7 0
      kd-service/kd-scientific/src/main/java/org/sky/scientific/mapper/XmWwxmCostMapper.xml
  36. 6 0
      kd-service/kd-scientific/src/main/java/org/sky/scientific/service/IAssetService.java
  37. 3 9
      kd-service/kd-scientific/src/main/java/org/sky/scientific/service/ICgJsbzService.java
  38. 3 9
      kd-service/kd-scientific/src/main/java/org/sky/scientific/service/ICgKylwService.java
  39. 3 9
      kd-service/kd-scientific/src/main/java/org/sky/scientific/service/ICgQtService.java
  40. 2 9
      kd-service/kd-scientific/src/main/java/org/sky/scientific/service/ICgRjzzqService.java
  41. 4 10
      kd-service/kd-scientific/src/main/java/org/sky/scientific/service/ICgZlService.java
  42. 15 2
      kd-service/kd-scientific/src/main/java/org/sky/scientific/service/ITechnicianService.java
  43. 7 0
      kd-service/kd-scientific/src/main/java/org/sky/scientific/service/IXmTechnicianHoursService.java
  44. 44 3
      kd-service/kd-scientific/src/main/java/org/sky/scientific/service/impl/AssetServiceImpl.java
  45. 48 11
      kd-service/kd-scientific/src/main/java/org/sky/scientific/service/impl/CgJsbzServiceImpl.java
  46. 46 10
      kd-service/kd-scientific/src/main/java/org/sky/scientific/service/impl/CgKylwServiceImpl.java
  47. 53 21
      kd-service/kd-scientific/src/main/java/org/sky/scientific/service/impl/CgQtServiceImpl.java
  48. 50 14
      kd-service/kd-scientific/src/main/java/org/sky/scientific/service/impl/CgRjzzqServiceImpl.java
  49. 49 13
      kd-service/kd-scientific/src/main/java/org/sky/scientific/service/impl/CgZlServiceImpl.java
  50. 323 18
      kd-service/kd-scientific/src/main/java/org/sky/scientific/service/impl/EnterpriseInfoServiceImpl.java
  51. 39 24
      kd-service/kd-scientific/src/main/java/org/sky/scientific/service/impl/SalaryServiceImpl.java
  52. 10 0
      kd-service/kd-scientific/src/main/java/org/sky/scientific/service/impl/TechnicianServiceImpl.java
  53. 62 27
      kd-service/kd-scientific/src/main/java/org/sky/scientific/service/impl/XmCostDetailsServiceImpl.java
  54. 1 1
      kd-service/kd-scientific/src/main/java/org/sky/scientific/service/impl/XmGoodsServiceImpl.java
  55. 2 2
      kd-service/kd-scientific/src/main/java/org/sky/scientific/service/impl/XmServiceImpl.java
  56. 6 2
      kd-service/kd-scientific/src/main/java/org/sky/scientific/service/impl/XmTechnicianHoursServiceImpl.java
  57. BIN
      kd-service/kd-scientific/src/main/resources/export-template/每月工资信息.xls
  58. BIN
      kd-service/kd-scientific/src/main/resources/export-template/每月研发人员人工分配表.xls
  59. BIN
      kd-service/kd-scientific/src/main/resources/export-template/研发支出明细账P098.xls
  60. BIN
      kd-service/kd-scientific/src/main/resources/export-template/研发费用汇总表P0040.xls
  61. BIN
      kd-service/kd-scientific/src/main/resources/export-template/科研成果-专利成果.xls
  62. BIN
      kd-service/kd-scientific/src/main/resources/export-template/科研成果-其他成果.xls
  63. BIN
      kd-service/kd-scientific/src/main/resources/export-template/科研成果-技术标准.xls
  64. BIN
      kd-service/kd-scientific/src/main/resources/export-template/科研成果-科研论文.xls
  65. BIN
      kd-service/kd-scientific/src/main/resources/export-template/科研成果-软件著作.xls

+ 297 - 0
hs_err_pid23972.log

@@ -0,0 +1,297 @@
+#
+# There is insufficient memory for the Java Runtime Environment to continue.
+# Native memory allocation (mmap) failed to map 528482304 bytes. Error detail: G1 virtual space
+# Possible reasons:
+#   The system is out of physical RAM or swap space
+#   This 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:3825), pid=23972, tid=21612
+#
+# JRE version:  (17.0.11+1) (build )
+# Java VM: OpenJDK 64-Bit Server VM (17.0.11+1-b1207.24, 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 'https://gitee.com': 
+
+Host: Intel(R) Core(TM) Ultra 7 155H, 22 cores, 31G,  Windows 11 , 64 bit Build 26100 (10.0.26100.4484)
+Time: Thu Sep  4 16:36:37 2025  Windows 11 , 64 bit Build 26100 (10.0.26100.4484) elapsed time: 1.438784 seconds (0d 0h 0m 1s)
+
+---------------  T H R E A D  ---------------
+
+Current thread (0x0000020b7320e7f0):  JavaThread "Unknown thread" [_thread_in_vm, id=21612, stack(0x000000d7bf400000,0x000000d7bf500000)]
+
+Stack: [0x000000d7bf400000,0x000000d7bf500000]
+Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
+V  [jvm.dll+0x6877f9]
+V  [jvm.dll+0x8411aa]
+V  [jvm.dll+0x842e2e]
+V  [jvm.dll+0x843493]
+V  [jvm.dll+0x249fdf]
+V  [jvm.dll+0x6845c9]
+V  [jvm.dll+0x678e7a]
+V  [jvm.dll+0x30ab4b]
+V  [jvm.dll+0x311ff6]
+V  [jvm.dll+0x361a5e]
+V  [jvm.dll+0x361c8f]
+V  [jvm.dll+0x2e0978]
+V  [jvm.dll+0x2e18e4]
+V  [jvm.dll+0x811c71]
+V  [jvm.dll+0x36f7c8]
+V  [jvm.dll+0x7f05f6]
+V  [jvm.dll+0x3f398f]
+V  [jvm.dll+0x3f5541]
+C  [jli.dll+0x528f]
+C  [ucrtbase.dll+0x37b0]
+C  [KERNEL32.DLL+0x2e8d7]
+C  [ntdll.dll+0x3c34c]
+
+
+---------------  P R O C E S S  ---------------
+
+Threads class SMR info:
+_java_thread_list=0x00007ffe81deefd8, length=0, elements={
+}
+
+Java Threads: ( => current thread )
+
+Other Threads:
+  0x0000020b7b0b0950 GCTaskThread "GC Thread#0" [stack: 0x000000d7bf500000,0x000000d7bf600000] [id=24348]
+  0x0000020b7328d230 ConcurrentGCThread "G1 Main Marker" [stack: 0x000000d7bf600000,0x000000d7bf700000] [id=50948]
+  0x0000020b7328dc50 ConcurrentGCThread "G1 Conc#0" [stack: 0x000000d7bf700000,0x000000d7bf800000] [id=37848]
+
+[error occurred during error reporting (printing all threads), id 0xc0000005, EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x00007ffe815a1547]
+
+VM state: not at safepoint (not fully initialized)
+
+VM Mutex/Monitor currently owned by a thread:  ([mutex/lock_event])
+[0x0000020b7320d4d0] Heap_lock - owner thread: 0x0000020b7320e7f0
+
+Heap address: 0x0000000608000000, size: 8064 MB, Compressed Oops mode: Zero based, Oop shift amount: 3
+
+CDS archive(s) mapped at: [0x0000000000000000-0x0000000000000000-0x0000000000000000), size 0, SharedBaseAddress: 0x0000000800000000, ArchiveRelocationMode: 1.
+Narrow klass base: 0x0000000000000000, Narrow klass shift: 0, Narrow klass range: 0x0
+
+GC Precious Log:
+<Empty>
+
+Heap:
+ garbage-first heap   total 0K, used 0K [0x0000000608000000, 0x0000000800000000)
+  region size 4096K, 0 young (0K), 0 survivors (0K)
+ Metaspace       used 0K, committed 0K, reserved 0K
+  class space    used 0K, committed 0K, reserved 0K
+
+Heap Regions: E=young(eden), S=young(survivor), O=old, HS=humongous(starts), HC=humongous(continues), CS=collection set, F=free, OA=open archive, CA=closed archive, TAMS=top-at-mark-start (previous, next)
+
+Card table byte_map: [0x0000020b78ff0000,0x0000020b79fb0000] _byte_map_base: 0x0000020b75fb0000
+
+Marking Bits (Prev, Next): (CMBitMap*) 0x0000020b7327c030, (CMBitMap*) 0x0000020b7327c070
+ Prev Bits: [0x0000020b0f000000, 0x0000020b16e00000)
+ Next Bits: [0x0000020b16e00000, 0x0000020b1ec00000)
+
+GC Heap History (0 events):
+No events
+
+Dll operation events (1 events):
+Event: 0.009 Loaded shared library D:\soft\IntelliJ IDEA 2024.1.2\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:
+0x00007ff725fb0000 - 0x00007ff725fba000 	D:\soft\IntelliJ IDEA 2024.1.2\jbr\bin\java.exe
+0x00007fff38320000 - 0x00007fff38588000 	C:\WINDOWS\SYSTEM32\ntdll.dll
+0x00007fff36e20000 - 0x00007fff36ee9000 	C:\WINDOWS\System32\KERNEL32.DLL
+0x00007fff35880000 - 0x00007fff35c6d000 	C:\WINDOWS\System32\KERNELBASE.dll
+0x00007fff36b20000 - 0x00007fff36bd4000 	C:\WINDOWS\System32\ADVAPI32.DLL
+0x00007fff375a0000 - 0x00007fff37649000 	C:\WINDOWS\System32\msvcrt.dll
+0x00007fff374f0000 - 0x00007fff37596000 	C:\WINDOWS\System32\sechost.dll
+0x00007fff37840000 - 0x00007fff37958000 	C:\WINDOWS\System32\RPCRT4.dll
+0x00007fff355b0000 - 0x00007fff356fb000 	C:\WINDOWS\System32\ucrtbase.dll
+0x00007fff1fc40000 - 0x00007fff1fc57000 	D:\soft\IntelliJ IDEA 2024.1.2\jbr\bin\jli.dll
+0x00007fff36950000 - 0x00007fff36b1c000 	C:\WINDOWS\System32\USER32.dll
+0x00007fff35fe0000 - 0x00007fff36007000 	C:\WINDOWS\System32\win32u.dll
+0x00007fff38200000 - 0x00007fff3822b000 	C:\WINDOWS\System32\GDI32.dll
+0x00007fff35470000 - 0x00007fff355a7000 	C:\WINDOWS\System32\gdi32full.dll
+0x00007fff36010000 - 0x00007fff360b3000 	C:\WINDOWS\System32\msvcp_win.dll
+0x00007fff1fd00000 - 0x00007fff1fd1b000 	D:\soft\IntelliJ IDEA 2024.1.2\jbr\bin\VCRUNTIME140.dll
+0x00007fff1d070000 - 0x00007fff1d30a000 	C:\WINDOWS\WinSxS\amd64_microsoft.windows.common-controls_6595b64144ccf1df_6.0.26100.4484_none_3e0e6d4ce32ef3b3\COMCTL32.dll
+0x00007fff37a60000 - 0x00007fff37a8f000 	C:\WINDOWS\System32\IMM32.DLL
+0x000000005a960000 - 0x000000005a96d000 	C:\Program Files (x86)\360\360Safe\safemon\SafeWrapper.dll
+0x00007fff2b8f0000 - 0x00007fff2b9f5000 	C:\Program Files (x86)\360\360Safe\safemon\libzdtp64.dll
+0x00007fff37aa0000 - 0x00007fff381ea000 	C:\WINDOWS\System32\SHELL32.dll
+0x00007fff35700000 - 0x00007fff35874000 	C:\WINDOWS\System32\wintypes.dll
+0x00007fff360c0000 - 0x00007fff36446000 	C:\WINDOWS\System32\combase.dll
+0x00007fff36fa0000 - 0x00007fff3700a000 	C:\WINDOWS\System32\SHLWAPI.dll
+0x00007fff34d00000 - 0x00007fff34d0b000 	C:\WINDOWS\SYSTEM32\VERSION.dll
+0x00007fff2f740000 - 0x00007fff2f74c000 	D:\soft\IntelliJ IDEA 2024.1.2\jbr\bin\vcruntime140_1.dll
+0x00007ffef6140000 - 0x00007ffef61cd000 	D:\soft\IntelliJ IDEA 2024.1.2\jbr\bin\msvcp140.dll
+0x00007ffe812b0000 - 0x00007ffe81f33000 	D:\soft\IntelliJ IDEA 2024.1.2\jbr\bin\server\jvm.dll
+0x00007fff2f750000 - 0x00007fff2f75a000 	C:\WINDOWS\SYSTEM32\WSOCK32.dll
+0x00007fff37340000 - 0x00007fff373b4000 	C:\WINDOWS\System32\WS2_32.dll
+0x00007fff1d310000 - 0x00007fff1d345000 	C:\WINDOWS\SYSTEM32\WINMM.dll
+0x00007fff352c0000 - 0x00007fff3531e000 	C:\WINDOWS\SYSTEM32\POWRPROF.dll
+0x00007fff352a0000 - 0x00007fff352b4000 	C:\WINDOWS\SYSTEM32\UMPDC.dll
+0x00007fff34120000 - 0x00007fff3413b000 	C:\WINDOWS\SYSTEM32\kernel.appcore.dll
+0x00007fff2f730000 - 0x00007fff2f73a000 	D:\soft\IntelliJ IDEA 2024.1.2\jbr\bin\jimage.dll
+0x00007fff32d00000 - 0x00007fff32f41000 	C:\WINDOWS\SYSTEM32\DBGHELP.DLL
+0x00007fff37090000 - 0x00007fff37170000 	C:\WINDOWS\System32\OLEAUT32.dll
+0x00007fff130e0000 - 0x00007fff13123000 	C:\WINDOWS\SYSTEM32\dbgcore.DLL
+0x00007fff35f40000 - 0x00007fff35fd9000 	C:\WINDOWS\System32\bcryptPrimitives.dll
+0x00007fff1fc60000 - 0x00007fff1fc85000 	D:\soft\IntelliJ IDEA 2024.1.2\jbr\bin\java.dll
+
+dbghelp: loaded successfully - version: 4.0.5 - missing functions: none
+symbol engine: initialized successfully - sym options: 0x614 - pdb path: .;D:\soft\IntelliJ IDEA 2024.1.2\jbr\bin;C:\WINDOWS\SYSTEM32;C:\WINDOWS\WinSxS\amd64_microsoft.windows.common-controls_6595b64144ccf1df_6.0.26100.4484_none_3e0e6d4ce32ef3b3;C:\Program Files (x86)\360\360Safe\safemon;D:\soft\IntelliJ IDEA 2024.1.2\jbr\bin\server
+
+VM Arguments:
+java_command: git4idea.http.GitAskPassApp Username for 'https://gitee.com': 
+java_class_path (initial): D:/soft/IntelliJ IDEA 2024.1.2/plugins/vcs-git/lib/git4idea-rt.jar;D:/soft/IntelliJ IDEA 2024.1.2/lib/externalProcess-rt.jar
+Launcher Type: SUN_STANDARD
+
+[Global flags]
+     intx CICompilerCount                          = 12                                        {product} {ergonomic}
+     uint ConcGCThreads                            = 4                                         {product} {ergonomic}
+     uint G1ConcRefinementThreads                  = 16                                        {product} {ergonomic}
+   size_t G1HeapRegionSize                         = 4194304                                   {product} {ergonomic}
+    uintx GCDrainStackTargetSize                   = 64                                        {product} {ergonomic}
+   size_t InitialHeapSize                          = 528482304                                 {product} {ergonomic}
+   size_t MarkStackSize                            = 4194304                                   {product} {ergonomic}
+   size_t MaxHeapSize                              = 8455716864                                {product} {ergonomic}
+   size_t MinHeapDeltaBytes                        = 4194304                                   {product} {ergonomic}
+   size_t MinHeapSize                              = 8388608                                   {product} {ergonomic}
+    uintx NonNMethodCodeHeapSize                   = 7602480                                {pd product} {ergonomic}
+    uintx NonProfiledCodeHeapSize                  = 122027880                              {pd product} {ergonomic}
+    uintx ProfiledCodeHeapSize                     = 122027880                              {pd product} {ergonomic}
+    uintx ReservedCodeCacheSize                    = 251658240                              {pd product} {ergonomic}
+     bool SegmentedCodeCache                       = true                                      {product} {ergonomic}
+   size_t SoftMaxHeapSize                          = 8455716864                             {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=D:\soft\jdk17
+PATH=D:\soft\Git\mingw64\libexec\git-core;D:\soft\Git\mingw64\libexec\git-core;D:\soft\Git\mingw64\bin;D:\soft\Git\usr\bin;C:\Users\Administrator\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\WINDOWS\System32\OpenSSH;D:\soft\jdk17\bin;D:\soft\Git\cmd;D:\soft\nodejs;D:\soft\mysql-5.7.41-winx64\bin;C:\Users\Administrator\AppData\Local\Microsoft\WindowsApps;C:\Users\Administrator\AppData\Local\Programs\Microsoft VS Code\bin
+USERNAME=Administrator
+DISPLAY=:0.0
+LC_ALL=en_US.UTF-8
+TERM=cygwin
+TMPDIR=C:\Users\ADMINI~1\AppData\Local\Temp
+OS=Windows_NT
+PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 170 Stepping 4, GenuineIntel
+TMP=C:\Users\ADMINI~1\AppData\Local\Temp
+TEMP=C:\Users\ADMINI~1\AppData\Local\Temp
+
+
+
+Periodic native trim disabled
+
+JNI global refs:
+JNI global refs: 0, weak refs: 0
+
+JNI global refs memory usage: 0, weak refs: 0
+
+Process memory usage:
+Resident Set Size: 15468K (0% of 33019596K total physical memory with 3084672K free physical memory)
+
+OOME stack traces (most recent first):
+Classloader memory used:
+
+
+---------------  S Y S T E M  ---------------
+
+OS:
+ Windows 11 , 64 bit Build 26100 (10.0.26100.4484)
+OS uptime: 34 days 7:14 hours
+
+CPU: total 22 (initial active 22) (11 cores per cpu, 2 threads per core) family 6 model 170 stepping 4 microcode 0x1c, 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, sha, fma, vzeroupper, clflush, clflushopt, clwb
+Processor Information for processor 0
+  Max Mhz: 1400, Current Mhz: 1400, Mhz Limit: 1400
+Processor Information for processor 1
+  Max Mhz: 1400, Current Mhz: 1400, Mhz Limit: 1400
+Processor Information for processor 2
+  Max Mhz: 3800, Current Mhz: 900, Mhz Limit: 874
+Processor Information for processor 3
+  Max Mhz: 3800, Current Mhz: 900, Mhz Limit: 874
+Processor Information for processor 4
+  Max Mhz: 3800, Current Mhz: 900, Mhz Limit: 874
+Processor Information for processor 5
+  Max Mhz: 3800, Current Mhz: 900, Mhz Limit: 874
+Processor Information for processor 6
+  Max Mhz: 3800, Current Mhz: 900, Mhz Limit: 874
+Processor Information for processor 7
+  Max Mhz: 3800, Current Mhz: 900, Mhz Limit: 874
+Processor Information for processor 8
+  Max Mhz: 3800, Current Mhz: 900, Mhz Limit: 874
+Processor Information for processor 9
+  Max Mhz: 3800, Current Mhz: 900, Mhz Limit: 874
+Processor Information for processor 10
+  Max Mhz: 1400, Current Mhz: 1400, Mhz Limit: 1400
+Processor Information for processor 11
+  Max Mhz: 1400, Current Mhz: 1400, Mhz Limit: 1400
+Processor Information for processor 12
+  Max Mhz: 1400, Current Mhz: 1400, Mhz Limit: 1400
+Processor Information for processor 13
+  Max Mhz: 1400, Current Mhz: 1400, Mhz Limit: 1400
+Processor Information for processor 14
+  Max Mhz: 1400, Current Mhz: 1400, Mhz Limit: 1400
+Processor Information for processor 15
+  Max Mhz: 1400, Current Mhz: 1400, Mhz Limit: 1400
+Processor Information for processor 16
+  Max Mhz: 1400, Current Mhz: 1400, Mhz Limit: 1400
+Processor Information for processor 17
+  Max Mhz: 1400, Current Mhz: 1400, Mhz Limit: 1400
+Processor Information for processor 18
+  Max Mhz: 1400, Current Mhz: 1400, Mhz Limit: 1400
+Processor Information for processor 19
+  Max Mhz: 1400, Current Mhz: 1400, Mhz Limit: 1400
+Processor Information for processor 20
+  Max Mhz: 2500, Current Mhz: 700, Mhz Limit: 700
+Processor Information for processor 21
+  Max Mhz: 2500, Current Mhz: 700, Mhz Limit: 700
+
+Memory: 4k page, system-wide physical 32245M (3012M free)
+TotalPageFile size 51329M (AvailPageFile size 256M)
+current process WorkingSet (physical memory assigned to process): 15M, peak: 15M
+current process commit charge ("private bytes"): 78M, peak: 582M
+
+vm_info: OpenJDK 64-Bit Server VM (17.0.11+1-b1207.24) for windows-amd64 JRE (17.0.11+1-b1207.24), built on 2024-05-15 by "builduser" with MS VC++ 16.10 / 16.11 (VS2019)
+
+END.

+ 3 - 0
kd-service-api/kd-scientific-api/src/main/java/org/sky/scientific/pojo/dto/XmCostDetailsDTO.java

@@ -27,6 +27,9 @@ public class XmCostDetailsDTO implements Serializable {
 	@Schema(description = "研发项目名称")
 	private String xmmc;
 
+	@Schema(description = "研发项目id")
+	private Long xmId;
+
 	@Schema(description = "费用金额区间-小")
 	private Double amountMin;
 

+ 4 - 4
kd-service-api/kd-scientific-api/src/main/java/org/sky/scientific/pojo/entity/A107041.java

@@ -33,13 +33,13 @@ public class A107041 extends TenantEntity {
 	@Schema(description = "不征税收入")
 	private BigDecimal d9;
 	@Schema(description = "五、本年职工总数")
-	private Integer d12;
+	private Integer d12=0;
 	@Schema(description = "八、销售(营业)收入 本年度")
-	private BigDecimal d29_1;
+ 	private BigDecimal d2901;
 	@Schema(description = "八、销售(营业)收入 前一年度")
-	private BigDecimal d29_2;
+ 	private BigDecimal d2902;
 	@Schema(description = "八、销售(营业)收入 前二年度")
-	private BigDecimal d29_3;
+ 	private BigDecimal d2903;
 	@Schema(description = "十、国家需要重点扶持的高新技术企业减征企业所得税")
 	private BigDecimal d31;
 	@Schema(description = "十一、经济特区和上海浦东新区新设立的高新技术企业定期减免税额")

+ 11 - 11
kd-service-api/kd-scientific-api/src/main/java/org/sky/scientific/pojo/entity/SalaryEntity.java

@@ -30,67 +30,67 @@ public class SalaryEntity extends TenantEntity {
 	private String yearAndMonth;
 
 	@Schema(description = "工资(元)")
-	private BigDecimal averageMonthlySalary;
+	private BigDecimal averageMonthlySalary = BigDecimal.ZERO;
 
 	@Schema(description = "工资(元),是否修改过,0:否,1:是")
 	private Integer averageMonthlySalaryEdit;
 
 	@Schema(description = "养老保险单位部分")
-	private BigDecimal pensionInsurance;
+	private BigDecimal pensionInsurance = BigDecimal.ZERO;
 
 	@Schema(description = "养老保险单位部分,是否修改过,0:否,1:是")
 	private Integer pensionInsuranceEdit;
 
 	@Schema(description = "医疗保险单位部分")
-	private BigDecimal medicalInsurance;
+	private BigDecimal medicalInsurance = BigDecimal.ZERO;
 
 	@Schema(description = "医疗保险单位部分,是否修改过,0:否,1:是")
 	private Integer medicalInsuranceEdit;
 
 	@Schema(description = "失业保险单位部分")
-	private BigDecimal unemploymentInsurance;
+	private BigDecimal unemploymentInsurance = BigDecimal.ZERO;
 
 	@Schema(description = "失业保险单位部分,是否修改过,0:否,1:是")
 	private Integer unemploymentInsuranceEdit;
 
 	@Schema(description = "工伤保险单位部分")
-	private BigDecimal injuryInsurance;
+	private BigDecimal injuryInsurance = BigDecimal.ZERO;
 
 	@Schema(description = "工伤保险单位部分,是否修改过,0:否,1:是")
 	private Integer injuryInsuranceEdit;
 
 	@Schema(description = "生育保险单位部分")
-	private BigDecimal maternityInsurance;
+	private BigDecimal maternityInsurance = BigDecimal.ZERO;
 
 	@Schema(description = "生育保险单位部分,是否修改过,0:否,1:是")
 	private Integer maternityInsuranceEdit;
 
 	@Schema(description = "公积金单位部分")
-	private BigDecimal providentFund;
+	private BigDecimal providentFund = BigDecimal.ZERO;
 
 	@Schema(description = "公积金单位部分,是否修改过,0:否,1:是")
 	private Integer providentFundEdit;
 
 	@Schema(description = "奖金")
-	private BigDecimal bonus;
+	private BigDecimal bonus = BigDecimal.ZERO;
 
 	@Schema(description = "奖金,是否修改过,0:否,1:是")
 	private Integer bonusEdit;
 
 	@Schema(description = "福利费")
-	private BigDecimal benefit;
+	private BigDecimal benefit = BigDecimal.ZERO;
 
 	@Schema(description = "福利费,是否修改过,0:否,1:是")
 	private Integer benefitEdit;
 
 	@Schema(description = "补充养老保险")
-	private BigDecimal pensionInsuranceBc;
+	private BigDecimal pensionInsuranceBc = BigDecimal.ZERO;
 
 	@Schema(description = "补充养老保险,是否修改过,0:否,1:是")
 	private Integer pensionInsuranceBcEdit;
 
 	@Schema(description = "补充医疗保险")
-	private BigDecimal medicalInsuranceBc;
+	private BigDecimal medicalInsuranceBc = BigDecimal.ZERO;
 
 	@Schema(description = "补充医疗保险,是否修改过,0:否,1:是")
 	private Integer medicalInsuranceBcEdit;

+ 18 - 0
kd-service-api/kd-scientific-api/src/main/java/org/sky/scientific/pojo/entity/XmCostDetailsEntity.java

@@ -4,6 +4,7 @@ package org.sky.scientific.pojo.entity;
 import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableName;
 import com.fasterxml.jackson.annotation.JsonFormat;
+import com.fasterxml.jackson.annotation.JsonIgnore;
 import io.swagger.v3.oas.annotations.media.Schema;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
@@ -49,6 +50,10 @@ public class XmCostDetailsEntity extends TenantEntity {
 	@JsonFormat(pattern = DateUtil.PATTERN_DATE)
 	private Date recordDate;
 
+	@Schema(hidden = true)
+	@TableField(exist = false)
+	private String recordDateStr;
+
 	@Schema(description = "凭证字号")
 	private String voucherNumber;
 
@@ -61,6 +66,14 @@ public class XmCostDetailsEntity extends TenantEntity {
 	@Schema(description = "企业科目名称")
 	private String eSubjectName;
 
+	@Schema(description = "企业科目代码")
+	@TableField(exist = false)
+	private String code;
+
+	@Schema(description = "企业科目名称")
+	@TableField(exist = false)
+	private String name;
+
 	@Schema(description = "摘要")
 	private String digest;
 
@@ -69,4 +82,9 @@ public class XmCostDetailsEntity extends TenantEntity {
 
 	@Schema(description = "账簿名称")
 	private String cashbook;
+
+	@Schema(description = "序号", hidden = true)
+	@JsonIgnore
+	@TableField(exist = false)
+	private String xh;
 }

+ 1 - 0
kd-service-api/kd-scientific-api/src/main/java/org/sky/scientific/pojo/entity/XmTechnicianEntity.java

@@ -29,6 +29,7 @@ public class XmTechnicianEntity extends TenantEntity {
 	private static final long serialVersionUID = 1L;
 
 	@Schema(hidden = true)
+	@TableField(exist = false)
 	private String xh;
 
 	@Schema(description = "所属年月,如:202505")

+ 21 - 21
kd-service-api/kd-scientific-api/src/main/java/org/sky/scientific/pojo/vo/A107012VO.java

@@ -13,64 +13,64 @@ import java.math.BigDecimal;
 public class A107012VO extends A107012 {
 
 	@Schema(description = "本年可享受研发费用加计扣除项目数量")
-	private Integer d1;
+	private Integer d1 = 0;
 
 	@Schema(description = "一、自主研发、合作研发、集中研发(3+7+16+19+23+34)")
-	private BigDecimal d2;
+	private BigDecimal d2 = BigDecimal.ZERO;
 
 	@Schema(description = "(一)人员人工费用(4+5+6)")
-	private BigDecimal d3;
+	private BigDecimal d3 = BigDecimal.ZERO;
 
 	@Schema(description = "(二)直接投入费用(8+9+10+11+12+13+14+15)")
-	private BigDecimal d7;
+	private BigDecimal d7 = BigDecimal.ZERO;
 
 	@Schema(description = "(三)折旧费用(17+18)")
-	private BigDecimal d16;
+	private BigDecimal d16 = BigDecimal.ZERO;
 
 	@Schema(description = "(四)无形资产摊销(20+21+22)")
-	private BigDecimal d19;
+	private BigDecimal d19 = BigDecimal.ZERO;
 
 	@Schema(description = "(五)新产品设计费(24+25+26+27)")
-	private BigDecimal d23;
+	private BigDecimal d23 = BigDecimal.ZERO;
 
 	@Schema(description = "(六)其他相关费用(29+30+31+32+33)")
-	private BigDecimal d28;
+	private BigDecimal d28 = BigDecimal.ZERO;
 
 	@Schema(description = "(七)经限额调整后的其他相关费用")
-	private BigDecimal d34;
+	private BigDecimal d34 = BigDecimal.ZERO;
 
 	@Schema(description = "二、委托研发(36+37+39)")
-	private BigDecimal d35;
+	private BigDecimal d35 = BigDecimal.ZERO;
 
 	@Schema(description = "(一)委托境内机构或个人进行研发活动所发生的费用")
-	private BigDecimal d36;
+	private BigDecimal d36 = BigDecimal.ZERO;
 
 	@Schema(description = "(二)委托境外机构进行研发活动发生的费用")
-	private BigDecimal d37;
+	private BigDecimal d37 = BigDecimal.ZERO;
 
 	@Schema(description = "其中:允许加计扣除的委托境外机构进行研发活动发生的费用")
-	private BigDecimal d38;
+	private BigDecimal d38 = BigDecimal.ZERO;
 
 	@Schema(description = "(三)委托境外个人进行研发活动发生的费用")
-	private BigDecimal d39;
+	private BigDecimal d39 = BigDecimal.ZERO;
 
 	@Schema(description = "三、年度研发费用小计(2+36×80%+38)")
-	private BigDecimal d40;
+	private BigDecimal d40 = BigDecimal.ZERO;
 
 	@Schema(description = "(一)本年费用化金额")
-	private BigDecimal d41;
+	private BigDecimal d41 = BigDecimal.ZERO;
 
 	@Schema(description = "(二)本年资本化金额")
-	private BigDecimal d42;
+	private BigDecimal d42 = BigDecimal.ZERO;
 
 	@Schema(description = "六、允许扣除的研发费用合计(41+43+44)")
-	private BigDecimal d45;
+	private BigDecimal d45 = BigDecimal.ZERO;
 	@Schema(description = "七、允许扣除的研发费用抵减特殊收入后的金额(45-46)")
-	private BigDecimal d47;
+	private BigDecimal d47 = BigDecimal.ZERO;
 
 	@Schema(description = "九、本年研发费用加计扣除总额(47-48-49)×50")
-	private BigDecimal d51;
+	private BigDecimal d51 = BigDecimal.ZERO;
 
 	@Schema(description = "十、销售研发活动直接形成产品(包括组成部分)对应材料部分转移以后年度扣减金额(当47-48-49≥0,本行=0;当47-48-49<0,本行=47-48-49的绝对值)")
-	private BigDecimal d52;
+	private BigDecimal d52 = BigDecimal.ZERO;
 }

+ 43 - 45
kd-service-api/kd-scientific-api/src/main/java/org/sky/scientific/pojo/vo/A107041VO.java

@@ -29,7 +29,7 @@ public class A107041VO extends A107041 {
 	private BigDecimal d10 = BigDecimal.ZERO;
 
 	@Schema(description = "四、本年企业成本(10-13)")
-	private Integer d11;
+	private Integer d11=0;
 
 	@Schema(description = "六、本年科技人员占企业当年职工总数的比例(11÷12)")
 	private BigDecimal d13 = BigDecimal.ZERO;
@@ -72,101 +72,99 @@ public class A107041VO extends A107041 {
 
 
 	@Schema(description = "3.折旧费用与长期待摊费用 本年度")
-	private BigDecimal d19_1;
+	private BigDecimal d19_1= BigDecimal.ZERO;
 	@Schema(description = "3.折旧费用与长期待摊费用用 前一年度")
-	private BigDecimal d19_2;
+	private BigDecimal d19_2= BigDecimal.ZERO;
 	@Schema(description = "3.折旧费用与长期待摊费用 前二年度")
-	private BigDecimal d19_3;
+	private BigDecimal d19_3= BigDecimal.ZERO;
 	@Schema(description = "3.折旧费用与长期待摊费用 合计")
-	private BigDecimal d19_4;
+	private BigDecimal d19_4= BigDecimal.ZERO;
 
 	@Schema(description = "4.无形资产摊销费用 本年度")
-	private BigDecimal d20_1;
+	private BigDecimal d20_1= BigDecimal.ZERO;
 	@Schema(description = "4.无形资产摊销费用 前一年度")
-	private BigDecimal d20_2;
+	private BigDecimal d20_2= BigDecimal.ZERO;
 	@Schema(description = "4.无形资产摊销费用 前二年度")
-	private BigDecimal d20_3;
+	private BigDecimal d20_3= BigDecimal.ZERO;
 	@Schema(description = "4.无形资产摊销费用 合计")
-	private BigDecimal d20_4;
+	private BigDecimal d20_4= BigDecimal.ZERO;
 
 	@Schema(description = "5.设计费用 本年度")
-	private BigDecimal d21_1;
+	private BigDecimal d21_1= BigDecimal.ZERO;
 	@Schema(description = "5.设计费用 前一年度")
-	private BigDecimal d21_2;
+	private BigDecimal d21_2= BigDecimal.ZERO;
 	@Schema(description = "5.设计费用 前二年度")
-	private BigDecimal d21_3;
+	private BigDecimal d21_3= BigDecimal.ZERO;
 	@Schema(description = "5.设计费用 合计")
-	private BigDecimal d21_4;
+	private BigDecimal d21_4= BigDecimal.ZERO;
 
 	@Schema(description = "6.设备调试费与实验费用 本年度")
-	private BigDecimal d22_1;
+	private BigDecimal d22_1= BigDecimal.ZERO;
 	@Schema(description = "6.设备调试费与实验费用 前一年度")
-	private BigDecimal d22_2;
+	private BigDecimal d22_2= BigDecimal.ZERO;
 	@Schema(description = "6.设备调试费与实验费用 前二年度")
-	private BigDecimal d22_3;
+	private BigDecimal d22_3= BigDecimal.ZERO;
 	@Schema(description = "6.设备调试费与实验费用 合计")
-	private BigDecimal d22_4;
+	private BigDecimal d22_4= BigDecimal.ZERO;
 
 	@Schema(description = "7.其他费用 本年度")
-	private BigDecimal d23_1;
+	private BigDecimal d23_1= BigDecimal.ZERO;
 	@Schema(description = "7.其他费用 前一年度")
-	private BigDecimal d23_2;
+	private BigDecimal d23_2= BigDecimal.ZERO;
 	@Schema(description = "7.其他费用 前二年度")
-	private BigDecimal d23_3;
+	private BigDecimal d23_3= BigDecimal.ZERO;
 	@Schema(description = "7.其他费用 合计")
-	private BigDecimal d23_4;
+	private BigDecimal d23_4= BigDecimal.ZERO;
 
 	@Schema(description = "其中:可计入研发费用的其他费用 本年度")
-	private BigDecimal d24_1;
+	private BigDecimal d24_1= BigDecimal.ZERO;
 	@Schema(description = "其中:可计入研发费用的其他费用 前一年度")
-	private BigDecimal d24_2;
+	private BigDecimal d24_2= BigDecimal.ZERO;
 	@Schema(description = "其中:可计入研发费用的其他费用 前二年度")
-	private BigDecimal d24_3;
+	private BigDecimal d24_3= BigDecimal.ZERO;
 	@Schema(description = "其中:可计入研发费用的其他费用 合计")
-	private BigDecimal d24_4;
+	private BigDecimal d24_4= BigDecimal.ZERO;
 
 	@Schema(description = "(二)委托外部研发费用【(26+28)×80%】 本年度")
-	private BigDecimal d25_1;
+	private BigDecimal d25_1= BigDecimal.ZERO;
 	@Schema(description = "(二)委托外部研发费用【(26+28)×80%】5.设计费用 前一年度")
-	private BigDecimal d25_2;
+	private BigDecimal d25_2= BigDecimal.ZERO;
 	@Schema(description = "(二)委托外部研发费用【(26+28)×80%】 前二年度")
-	private BigDecimal d25_3;
+	private BigDecimal d25_3= BigDecimal.ZERO;
 	@Schema(description = "(二)委托外部研发费用【(26+28)×80%】 合计")
-	private BigDecimal d25_4;
+	private BigDecimal d25_4= BigDecimal.ZERO;
 
 	@Schema(description = "1.境内的外部研发费 本年度")
-	private BigDecimal d26_1;
+	private BigDecimal d26_1= BigDecimal.ZERO;
 	@Schema(description = "1.境内的外部研发费 前一年度")
-	private BigDecimal d26_2;
+	private BigDecimal d26_2= BigDecimal.ZERO;
 	@Schema(description = "1.境内的外部研发费 前二年度")
-	private BigDecimal d26_3;
+	private BigDecimal d26_3= BigDecimal.ZERO;
 	@Schema(description = "1.境内的外部研发费 合计")
-	private BigDecimal d26_4;
+	private BigDecimal d26_4= BigDecimal.ZERO;
 
 	@Schema(description = "2.境外的外部研发费 本年度")
-	private BigDecimal d27_1;
+	private BigDecimal d27_1= BigDecimal.ZERO;
 	@Schema(description = "2.境外的外部研发费 前一年度")
-	private BigDecimal d27_2;
+	private BigDecimal d27_2= BigDecimal.ZERO;
 	@Schema(description = "2.境外的外部研发费 前二年度")
-	private BigDecimal d27_3;
+	private BigDecimal d27_3= BigDecimal.ZERO;
 	@Schema(description = "2.境外的外部研发费 合计")
-	private BigDecimal d27_4;
+	private BigDecimal d27_4= BigDecimal.ZERO;
 
 	@Schema(description = "其中:可计入研发费用的境外的外部研发费 本年度")
-	private BigDecimal d28_1;
+	private BigDecimal d28_1= BigDecimal.ZERO;
 	@Schema(description = "其中:可计入研发费用的境外的外部研发费 前一年度")
-	private BigDecimal d28_2;
+	private BigDecimal d28_2= BigDecimal.ZERO;
 	@Schema(description = "其中:可计入研发费用的境外的外部研发费 前二年度")
-	private BigDecimal d28_3;
+	private BigDecimal d28_3= BigDecimal.ZERO;
 	@Schema(description = "其中:可计入研发费用的境外的外部研发费 合计")
-	private BigDecimal d28_4;
+	private BigDecimal d28_4= BigDecimal.ZERO;
 
 
 	@Schema(description = "八、销售(营业)收入 合计")
-	private BigDecimal d29_4;
+	private BigDecimal d2904= BigDecimal.ZERO;
 
 	@Schema(description = "九、三年研发费用占销售(营业)收入的比例(15行第4列/29行第4列)")
-	private BigDecimal d30;
-
-
+	private BigDecimal d30= BigDecimal.ZERO;
 }

+ 1 - 1
kd-service-api/kd-scientific-api/src/main/java/org/sky/scientific/pojo/vo/A107_1VO.java

@@ -42,7 +42,7 @@ public class A107_1VO extends A107_1 {
 	private Date jssj;
 
 	@Schema(description = "项目研究开发人员(人)")
-	private Long technicianCount;
+	private Long technicianCount = 0L;
 
 	@Schema(description = "项目人员实际工作时间(人月)")
 	private Double workTime;

+ 31 - 31
kd-service-api/kd-scientific-api/src/main/java/org/sky/scientific/pojo/vo/A107_2VO.java

@@ -13,76 +13,76 @@ import java.math.BigDecimal;
 public class A107_2VO extends A107_2 {
 
 	@Schema(description = "研究开发人员合计")
-	private Integer d1;
+	private Integer d1 = 0;
 	@Schema(description = "其中:女性")
-	private Integer d3;
+	private Integer d3 = 0;
 	@Schema(description = "其中:全职人员")
-	private Integer d4;
+	private Integer d4 = 0;
 	@Schema(description = "其中:本科毕业及以上人员")
-	private Integer d5;
+	private Integer d5 = 0;
 	@Schema(description = "其中:外聘人员")
-	private Integer d6;
+	private Integer d6 = 0;
 
 	@Schema(description = "研究开发费用合计")
-	private BigDecimal d7= BigDecimal.ZERO;
+	private BigDecimal d7 = BigDecimal.ZERO;
 	@Schema(description = "1.人员人工费用")
 	private BigDecimal d8 = BigDecimal.ZERO;
 	@Schema(description = "2.直接投入费用")
-	private BigDecimal d9= BigDecimal.ZERO;
+	private BigDecimal d9 = BigDecimal.ZERO;
 	@Schema(description = "3.折旧费用与长期待摊费用")
-	private BigDecimal d10= BigDecimal.ZERO;
+	private BigDecimal d10 = BigDecimal.ZERO;
 	@Schema(description = "4.无形资产摊销费用")
-	private BigDecimal d11= BigDecimal.ZERO;
+	private BigDecimal d11 = BigDecimal.ZERO;
 	@Schema(description = "5.设计费用")
-	private BigDecimal d12= BigDecimal.ZERO;
+	private BigDecimal d12 = BigDecimal.ZERO;
 	@Schema(description = "6.装备调试费用与试验费用")
-	private BigDecimal d13= BigDecimal.ZERO;
+	private BigDecimal d13 = BigDecimal.ZERO;
 	@Schema(description = "7.委托外部研究开发费用")
-	private BigDecimal d14= BigDecimal.ZERO;
+	private BigDecimal d14 = BigDecimal.ZERO;
 	@Schema(description = "①委托境内研究机构")
-	private BigDecimal d15= BigDecimal.ZERO;
+	private BigDecimal d15 = BigDecimal.ZERO;
 	@Schema(description = "②委托境内高等学校")
-	private BigDecimal d16= BigDecimal.ZERO;
+	private BigDecimal d16 = BigDecimal.ZERO;
 	@Schema(description = "③委托境内企业")
-	private BigDecimal d17= BigDecimal.ZERO;
+	private BigDecimal d17 = BigDecimal.ZERO;
 	@Schema(description = "④委托境外机构")
-	private BigDecimal d18= BigDecimal.ZERO;
+	private BigDecimal d18 = BigDecimal.ZERO;
 	@Schema(description = "8.其他费用")
-	private BigDecimal d19= BigDecimal.ZERO;
+	private BigDecimal d19 = BigDecimal.ZERO;
 
 	@Schema(description = "当年形成用于研发开发的固定资产")
-	private BigDecimal d20= BigDecimal.ZERO;
+	private BigDecimal d20 = BigDecimal.ZERO;
 	@Schema(description = "其中:仪器和设备")
-	private BigDecimal d21= BigDecimal.ZERO;
+	private BigDecimal d21 = BigDecimal.ZERO;
 	@Schema(description = "1.来自企业自筹")
-	private BigDecimal d57= BigDecimal.ZERO;
+	private BigDecimal d57 = BigDecimal.ZERO;
 	@Schema(description = "2.来自政府部门")
-	private BigDecimal d43= BigDecimal.ZERO;
+	private BigDecimal d43 = BigDecimal.ZERO;
 
 	@Schema(description = "申报加计扣除减免税的研究开发支出")
-	private BigDecimal d52= BigDecimal.ZERO;
+	private BigDecimal d52 = BigDecimal.ZERO;
 	@Schema(description = "加计扣除减免税金额")
-	private BigDecimal d44= BigDecimal.ZERO;
+	private BigDecimal d44 = BigDecimal.ZERO;
 
 	@Schema(description = "期末仪器和设备原价")
-	private BigDecimal d27= BigDecimal.ZERO;
+	private BigDecimal d27 = BigDecimal.ZERO;
 
 
 	@Schema(description = "当年专利申请数")
-	private Integer d29;
+	private Integer d29 = 0;
 	@Schema(description = "其中:发明专利")
-	private Integer d30;
+	private Integer d30 = 0;
 	@Schema(description = "期末有效发明专利数")
-	private Integer d32;
+	private Integer d32 = 0;
 	@Schema(description = "其中:已被实施")
-	private Integer d33;
+	private Integer d33 = 0;
 
 	@Schema(description = "发表科技论文")
-	private Integer d40;
+	private Integer d40 = 0;
 
 	@Schema(description = "形成国家或行业标准")
-	private Integer d41;
+	private Integer d41 = 0;
 
 	@Schema(description = "当年企业研发准备金合计")
-	private BigDecimal d59;
+	private BigDecimal d59 = BigDecimal.ZERO;
 }

+ 3 - 0
kd-service-api/kd-scientific-api/src/main/java/org/sky/scientific/pojo/vo/CostSummaryVO.java

@@ -8,6 +8,9 @@ import java.math.BigDecimal;
 @Data
 public class CostSummaryVO {
 
+	@Schema(description = "序号")
+	private String xh;
+
 	@Schema(description = "所属年月")
 	private String yearAndMonth;
 

+ 0 - 63
kd-service-api/kd-scientific-api/src/main/java/org/sky/scientific/pojo/vo/DeductionCostSummary.java

@@ -13,223 +13,160 @@ public class DeductionCostSummary {
 
 	@Schema(description = "资本化金额小计-允许加计扣除金额合计")
 	private BigDecimal yxjjkcjehj_zbh = new BigDecimal("0.00");
-	;
 
 	@Schema(description = "费用化金额小计-允许加计扣除金额合计")
 	private BigDecimal yxjjkcjehj_fyh = new BigDecimal("0.00");
-	;
 
 	@Schema(description = "其中:其他事项-允许加计扣除金额合计")
 	private BigDecimal yxjjkcjehj_qt = new BigDecimal("0.00");
-	;
 
 	@Schema(description = "金额合计-允许加计扣除金额合计")
 	private BigDecimal yxjjkcjehj_hjje = new BigDecimal("0.00");
-	;
 
 
 	@Schema(description = "资本化金额小计-人员人工费用")
 	private BigDecimal ryrgfy_zbh = new BigDecimal("0.00");
-	;
 
 	@Schema(description = "费用化金额小计-人员人工费用")
 	private BigDecimal ryrgfy_fyh = new BigDecimal("0.00");
-	;
 
 	@Schema(description = "其中:其他事项-人员人工费用")
 	private BigDecimal ryrgfy_qt = new BigDecimal("0.00");
-	;
 
 	@Schema(description = "金额合计-人员人工费用")
 	private BigDecimal ryrgfy_hjje = new BigDecimal("0.00");
-	;
-
 
 	@Schema(description = "资本化金额小计-直接投入费用")
 	private BigDecimal zjtrfy_zbh = new BigDecimal("0.00");
-	;
 
 	@Schema(description = "费用化金额小计-直接投入费用")
 	private BigDecimal zjtrfy_fyh = new BigDecimal("0.00");
-	;
 
 	@Schema(description = "其中:其他事项-直接投入费用")
 	private BigDecimal zjtrfy_qt = new BigDecimal("0.00");
-	;
 
 	@Schema(description = "金额合计-直接投入费用")
 	private BigDecimal zjtrfy_hjje = new BigDecimal("0.00");
-	;
-
 
 	@Schema(description = "资本化金额小计-折旧费用")
 	private BigDecimal zjfy_zbh = new BigDecimal("0.00");
-	;
 
 	@Schema(description = "费用化金额小计-折旧费用")
 	private BigDecimal zjfy_fyh = new BigDecimal("0.00");
-	;
 
 	@Schema(description = "其中:其他事项-折旧费用")
 	private BigDecimal zjfy_qt = new BigDecimal("0.00");
-	;
 
 	@Schema(description = "金额合计-折旧费用")
 	private BigDecimal zjfy_hjje = new BigDecimal("0.00");
-	;
-
 
 	@Schema(description = "资本化金额小计-无形资产摊销")
 	private BigDecimal wxzctx_zbh = new BigDecimal("0.00");
-	;
 
 	@Schema(description = "费用化金额小计-无形资产摊销")
 	private BigDecimal wxzctx_fyh = new BigDecimal("0.00");
-	;
 
 	@Schema(description = "其中:其他事项-无形资产摊销")
 	private BigDecimal wxzctx_qt = new BigDecimal("0.00");
-	;
 
 	@Schema(description = "金额合计-无形资产摊销")
 	private BigDecimal wxzctx_hjje = new BigDecimal("0.00");
-	;
-
 
 	@Schema(description = "资本化金额小计-新产品设计费等")
 	private BigDecimal xcpsjfd_zbh = new BigDecimal("0.00");
-	;
 
 	@Schema(description = "费用化金额小计-新产品设计费等")
 	private BigDecimal xcpsjfd_fyh = new BigDecimal("0.00");
-	;
 
 	@Schema(description = "其中:其他事项-新产品设计费等")
 	private BigDecimal xcpsjfd_qt = new BigDecimal("0.00");
-	;
 
 	@Schema(description = "金额合计-新产品设计费等")
 	private BigDecimal xcpsjfd_hjje = new BigDecimal("0.00");
-	;
-
 
 	@Schema(description = "资本化金额小计-前五项小计")
 	private BigDecimal total_zbh = new BigDecimal("0.00");
-	;
 
 	@Schema(description = "费用化金额小计-前五项小计")
 	private BigDecimal total_fyh = new BigDecimal("0.00");
-	;
 
 	@Schema(description = "其中:其他事项-前五项小计")
 	private BigDecimal total_qt = new BigDecimal("0.00");
-	;
 
 	@Schema(description = "金额合计-前五项小计")
 	private BigDecimal total_hjje = new BigDecimal("0.00");
-	;
-
 
 	@Schema(description = "资本化金额小计-其他相关费用合计")
 	private BigDecimal qtxgfyhj_zbh = new BigDecimal("0.00");
-	;
 
 	@Schema(description = "费用化金额小计-其他相关费用合计")
 	private BigDecimal qtxgfyhj_fyh = new BigDecimal("0.00");
-	;
 
 	@Schema(description = "其中:其他事项-其他相关费用合计")
 	private BigDecimal qtxgfyhj_qt = new BigDecimal("0.00");
-	;
 
 	@Schema(description = "金额合计-其他相关费用合计")
 	private BigDecimal qtxgfyhj_hjje = new BigDecimal("0.00");
-	;
-
 
 	@Schema(description = "资本化金额小计-经限额调整后的其他相关费用")
 	private BigDecimal qtxgfyhj_adjust_zbh = new BigDecimal("0.00");
-	;
 
 	@Schema(description = "费用化金额小计-经限额调整后的其他相关费用")
 	private BigDecimal qtxgfyhj_adjust_fyh = new BigDecimal("0.00");
-	;
 
 	@Schema(description = "其中:其他事项-经限额调整后的其他相关费用")
 	private BigDecimal qtxgfyhj_adjust_qt = new BigDecimal("0.00");
-	;
 
 	@Schema(description = "金额合计-经限额调整后的其他相关费用")
 	private BigDecimal qtxgfyhj_adjust_hjje = new BigDecimal("0.00");
-	;
-
 
 	@Schema(description = "资本化金额小计-委托境内机构或个人进行研发活动所发生的费用")
 	private BigDecimal wtjnjgfy_zbh = new BigDecimal("0.00");
-	;
 
 	@Schema(description = "费用化金额小计-委托境内机构或个人进行研发活动所发生的费用")
 	private BigDecimal wtjnjgfy_fyh = new BigDecimal("0.00");
-	;
 
 	@Schema(description = "其中:其他事项-委托境内机构或个人进行研发活动所发生的费用")
 	private BigDecimal wtjnjgfy_qt = new BigDecimal("0.00");
-	;
 
 	@Schema(description = "金额合计-委托境内机构或个人进行研发活动所发生的费用")
 	private BigDecimal wtjnjgfy_hjje = new BigDecimal("0.00");
-	;
-
 
 	@Schema(description = "资本化金额小计-允许加计扣除的委托境内机构或个人进行研发活动所发生的费用")
 	private BigDecimal yxwtjnjgfy_zbh = new BigDecimal("0.00");
-	;
 
 	@Schema(description = "费用化金额小计-允许加计扣除的委托境内机构或个人进行研发活动所发生的费用")
 	private BigDecimal yxwtjnjgfy_fyh = new BigDecimal("0.00");
-	;
 
 	@Schema(description = "其中:其他事项-允许加计扣除的委托境内机构或个人进行研发活动所发生的费用")
 	private BigDecimal yxwtjnjgfy_qt = new BigDecimal("0.00");
-	;
 
 	@Schema(description = "金额合计-允许加计扣除的委托境内机构或个人进行研发活动所发生的费用")
 	private BigDecimal yxwtjnjgfy_hjje = new BigDecimal("0.00");
-	;
-
 
 	@Schema(description = "资本化金额小计-委托境外机构进行研发活动所发生的费用")
 	private BigDecimal wtjwjgfy_zbh = new BigDecimal("0.00");
-	;
 
 	@Schema(description = "费用化金额小计-委托境外机构进行研发活动所发生的费用")
 	private BigDecimal wtjwjgfy_fyh = new BigDecimal("0.00");
-	;
 
 	@Schema(description = "其中:其他事项-委托境外机构进行研发活动所发生的费用")
 	private BigDecimal wtjwjgfy_qt = new BigDecimal("0.00");
-	;
 
 	@Schema(description = "金额合计-委托境外机构进行研发活动所发生的费用")
 	private BigDecimal wtjwjgfy_hjje = new BigDecimal("0.00");
-	;
-
 
 	@Schema(description = "资本化金额小计-经限额调整后的委托境外机构进行研发活动所发生的费用")
 	private BigDecimal wtjwjgfy_adjust_zbh = new BigDecimal("0.00");
-	;
 
 	@Schema(description = "费用化金额小计-经限额调整后的委托境外机构进行研发活动所发生的费用")
 	private BigDecimal wtjwjgfy_adjust_fyh = new BigDecimal("0.00");
-	;
 
 	@Schema(description = "其中:其他事项-经限额调整后的委托境外机构进行研发活动所发生的费用")
 	private BigDecimal wtjwjgfy_adjust_qt = new BigDecimal("0.00");
-	;
 
 	@Schema(description = "金额合计-经限额调整后的委托境外机构进行研发活动所发生的费用")
 	private BigDecimal wtjwjgfy_adjust_hjje = new BigDecimal("0.00");
-	;
 
 	@Schema(description = "表格内的数据,每个项目有资本化和费用化两条数据")
 	List<DeductionCostSummaryItem> itemList;

+ 13 - 8
kd-service-api/kd-scientific-api/src/main/java/org/sky/scientific/pojo/vo/FinanceCostSummary.java

@@ -3,6 +3,8 @@ package org.sky.scientific.pojo.vo;
 import io.swagger.v3.oas.annotations.media.Schema;
 import lombok.Data;
 
+import java.math.BigDecimal;
+
 
 @Data
 @Schema(description = "研发费用辅助账汇总表")
@@ -18,26 +20,29 @@ public class FinanceCostSummary {
 	private String xmmc;
 
 	@Schema(description = "1、人员人工")
-	private double ryrgTotal;
+	private BigDecimal ryrgTotal=BigDecimal.ZERO;
 
 	@Schema(description = "2、直接投入")
-	private double zjtrTotal;
+	private BigDecimal zjtrTotal = BigDecimal.ZERO;
 
 	@Schema(description = "3、折旧费用与长期摊销费用")
-	private double zjfyycqdtfyTotal;
+	private BigDecimal zjfyycqdtfyTotal = BigDecimal.ZERO;
 
 	@Schema(description = "4、设计费")
-	private double sjfTotal;
+	private BigDecimal sjfTotal = BigDecimal.ZERO;
 
 	@Schema(description = "5、无形资产摊销")
-	private double wxzctxTotal;
+	private BigDecimal wxzctxTotal = BigDecimal.ZERO;
 
 	@Schema(description = "6、装备调试费用与试验费用")
-	private double zbtsfyysyfyTotal;
+	private BigDecimal zbtsfyysyfyTotal = BigDecimal.ZERO;
 
 	@Schema(description = "7、其他费用")
-	private double qtfyTotal;
+	private BigDecimal qtfyTotal = BigDecimal.ZERO;
 
 	@Schema(description = "8、委外研发")
-	private double wwyfTotal;
+	private BigDecimal wwyfTotal = BigDecimal.ZERO;
+
+	@Schema(description = "1-8项合计")
+	private BigDecimal total = BigDecimal.ZERO;
 }

+ 12 - 10
kd-service-api/kd-scientific-api/src/main/java/org/sky/scientific/pojo/vo/HighTechCostSummary.java

@@ -3,6 +3,8 @@ package org.sky.scientific.pojo.vo;
 import io.swagger.v3.oas.annotations.media.Schema;
 import lombok.Data;
 
+import java.math.BigDecimal;
+
 @Data
 public class HighTechCostSummary {
 
@@ -16,32 +18,32 @@ public class HighTechCostSummary {
 	private String xmmc;
 
 	@Schema(description = "1、人员人工")
-	private double ryrgTotal;
+	private BigDecimal ryrgTotal = BigDecimal.ZERO;
 
 	@Schema(description = "2、直接投入")
-	private double zjtrTotal;
+	private BigDecimal zjtrTotal = BigDecimal.ZERO;
 
 	@Schema(description = "3、折旧费用与长期摊销费用")
-	private double zjfyycqdtfyTotal;
+	private BigDecimal zjfyycqdtfyTotal = BigDecimal.ZERO;
 
 	@Schema(description = "4、设计费")
-	private double sjfTotal;
+	private BigDecimal sjfTotal = BigDecimal.ZERO;
 
 	@Schema(description = "5、无形资产摊销")
-	private double wxzctxTotal;
+	private BigDecimal wxzctxTotal = BigDecimal.ZERO;
 
 	@Schema(description = "6、装备调试费用与试验费用")
-	private double zbtsfyysyfyTotal;
+	private BigDecimal zbtsfyysyfyTotal = BigDecimal.ZERO;
 
 	@Schema(description = "7-1、其他费用")
-	private double qtfyTotal;
+	private BigDecimal qtfyTotal = BigDecimal.ZERO;
 
 	@Schema(description = "7-2、其他费用限额,1-6合计相加/0.8*0.2")
-	private double qtfyLimit;
+	private BigDecimal qtfyLimit = BigDecimal.ZERO;
 
 	@Schema(description = "7-3、调整后其他费用,7-1和7-2,谁小取谁")
-	private double qtfyAdjust;
+	private BigDecimal qtfyAdjust = BigDecimal.ZERO;
 
 	@Schema(description = "8、委外研发")
-	private double wwyfTotal;
+	private BigDecimal wwyfTotal = BigDecimal.ZERO;
 }

+ 10 - 0
kd-service/kd-scientific/src/main/java/org/sky/scientific/controller/CostController.java

@@ -3,12 +3,15 @@ package org.sky.scientific.controller;
 import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
 import io.swagger.v3.oas.annotations.Operation;
 import io.swagger.v3.oas.annotations.tags.Tag;
+import jakarta.servlet.http.HttpServletResponse;
 import lombok.AllArgsConstructor;
 import org.sky.core.tool.api.R;
 import org.sky.scientific.pojo.dto.CostSummaryDTO;
 import org.sky.scientific.pojo.vo.CostSummaryVO;
 import org.sky.scientific.service.IAssetService;
 import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RestController;
 
 import java.util.List;
@@ -27,4 +30,11 @@ public class CostController {
 		return R.data(service.costSummary(dto));
 	}
 
+	@PostMapping("/cost/summary/export")
+	@ApiOperationSupport(order = 2)
+	@Operation(summary = "研发费用统计-本年各月研发费用汇总表-导出", description  = "传入salary")
+	public void exportCostSummary(HttpServletResponse response, @RequestBody CostSummaryDTO dto) {
+		service.exportCostSummary(response, dto);
+	}
+
 }

+ 1 - 0
kd-service/kd-scientific/src/main/java/org/sky/scientific/controller/EnterpriseController.java

@@ -96,6 +96,7 @@ public class EnterpriseController extends KdController {
 	public R<List<A107_1VO>> qyyjkfxmqk(String year) {
 		return R.data(enterpriseInfoService.qyyjkfxmqk(year));
 	}
+
 	@PostMapping("qyyjkfxmqk")
 	@ApiOperationSupport(order = 30)
 	@Operation(summary = "107-1-企业研究开发项目情况-修改")

+ 43 - 59
kd-service/kd-scientific/src/main/java/org/sky/scientific/controller/KYCGController.java

@@ -1,7 +1,6 @@
 
 package org.sky.scientific.controller;
 
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
 import io.swagger.v3.oas.annotations.Operation;
@@ -11,14 +10,11 @@ import jakarta.servlet.http.HttpServletResponse;
 import jakarta.validation.Valid;
 import lombok.AllArgsConstructor;
 import org.sky.core.boot.ctrl.KdController;
-import org.sky.core.excel.util.ExcelUtil;
 import org.sky.core.mp.support.Condition;
 import org.sky.core.mp.support.Query;
 import org.sky.core.secure.KdUser;
 import org.sky.core.tool.api.R;
-import org.sky.core.tool.utils.DateUtil;
 import org.sky.core.tool.utils.Func;
-import org.sky.scientific.excel.*;
 import org.sky.scientific.pojo.dto.CgQtDTO;
 import org.sky.scientific.pojo.dto.CgRjzzqDTO;
 import org.sky.scientific.pojo.entity.*;
@@ -28,7 +24,6 @@ import org.sky.scientific.wrapper.*;
 import org.springframework.web.bind.annotation.*;
 import org.springframework.web.multipart.MultipartFile;
 
-import java.util.List;
 import java.util.Map;
 
 /**
@@ -51,7 +46,7 @@ public class KYCGController extends KdController {
 
 	@GetMapping("/zl/detail")
 	@ApiOperationSupport(order = 1)
-	@Operation(summary = "专利-详情", description  = "传入cgZl")
+	@Operation(summary = "专利-详情", description = "传入cgZl")
 	public R<CgZlVO> zlDetail(CgZlEntity cgZl) {
 		CgZlEntity detail = zlService.getOne(Condition.getQueryWrapper(cgZl));
 		return R.data(CgZlWrapper.build().entityVO(detail));
@@ -59,7 +54,7 @@ public class KYCGController extends KdController {
 
 	@GetMapping("/zl/list")
 	@ApiOperationSupport(order = 2)
-	@Operation(summary = "专利-分页", description  = "传入cgZl")
+	@Operation(summary = "专利-分页", description = "传入cgZl")
 	public R<IPage<CgZlVO>> zlList(@Parameter(hidden = true) @RequestParam Map<String, Object> cgZl, Query query) {
 		IPage<CgZlEntity> pages = zlService.page(Condition.getPage(query), Condition.getQueryWrapper(cgZl, CgZlEntity.class));
 		return R.data(CgZlWrapper.build().pageVO(pages));
@@ -67,21 +62,21 @@ public class KYCGController extends KdController {
 
 	@PostMapping("/zl/save")
 	@ApiOperationSupport(order = 3)
-	@Operation(summary = "专利-新增", description  = "传入cgZl")
+	@Operation(summary = "专利-新增", description = "传入cgZl")
 	public R saveZl(@Valid @RequestBody CgZlEntity cgZl) {
 		return R.status(zlService.save(cgZl));
 	}
 
 	@PostMapping("/zl/update")
 	@ApiOperationSupport(order = 4)
-	@Operation(summary = "专利-修改", description  = "传入cgZl")
+	@Operation(summary = "专利-修改", description = "传入cgZl")
 	public R updateZl(@Valid @RequestBody CgZlEntity cgZl) {
 		return R.status(zlService.update(cgZl));
 	}
 
 	@PostMapping("/zl/remove")
 	@ApiOperationSupport(order = 5)
-	@Operation(summary = "专利-删除", description  = "传入ids")
+	@Operation(summary = "专利-删除", description = "传入ids")
 	public R removeZl(@Parameter(description = "主键集合", required = true) @RequestParam String ids) {
 		return R.status(zlService.physicalDeleteByIds(Func.toLongList(ids)));
 	}
@@ -96,16 +91,14 @@ public class KYCGController extends KdController {
 
 	@GetMapping("/zl/export")
 	@ApiOperationSupport(order = 7)
-	@Operation(summary = "专利-导出", description  = "传入cgZl")
-	public void exportZl(@Parameter(hidden = true) @RequestParam Map<String, Object> cgZl, KdUser kdUser, HttpServletResponse response) {
-		QueryWrapper<CgZlEntity> queryWrapper = Condition.getQueryWrapper(cgZl, CgZlEntity.class);
-		List<CgZlExcel> list = zlService.export(queryWrapper);
-		ExcelUtil.export(response, "科研成果-专利数据" + DateUtil.time(), "科研成果-专利数据表", list, CgZlExcel.class);
+	@Operation(summary = "专利-导出", description = "传入cgZl")
+	public void exportZl(@Parameter(hidden = true) @RequestParam Map<String, Object> cgZl, HttpServletResponse response) {
+		zlService.exportZl(response, cgZl);
 	}
 
 	@GetMapping("/rjzzq/detail")
 	@ApiOperationSupport(order = 11)
-	@Operation(summary = "软件著作-详情", description  = "传入cgRjzzq")
+	@Operation(summary = "软件著作-详情", description = "传入cgRjzzq")
 	public R<CgRjzzqVO> rjzzqDetail(CgRjzzqEntity cgRjzzq) {
 		CgRjzzqEntity detail = rjzzqService.getOne(Condition.getQueryWrapper(cgRjzzq));
 		return R.data(CgRjzzqWrapper.build().entityVO(detail));
@@ -113,7 +106,7 @@ public class KYCGController extends KdController {
 
 	@GetMapping("/rjzzq/list")
 	@ApiOperationSupport(order = 12)
-	@Operation(summary = "软件著作-分页", description  = "传入cgRjzzq")
+	@Operation(summary = "软件著作-分页", description = "传入cgRjzzq")
 	public R<IPage<CgRjzzqVO>> rjzzqList(CgRjzzqDTO dto, Query query) {
 		IPage<CgRjzzqVO> pages = rjzzqService.selectRjzzqPage(Condition.getPage(query), dto);
 		return R.data(pages);
@@ -121,21 +114,21 @@ public class KYCGController extends KdController {
 
 	@PostMapping("/rjzzq/save")
 	@ApiOperationSupport(order = 13)
-	@Operation(summary = "软件著作-新增", description  = "传入cgRjzzq")
+	@Operation(summary = "软件著作-新增", description = "传入cgRjzzq")
 	public R saveRjzzq(@Valid @RequestBody CgRjzzqEntity cgRjzzq) {
 		return R.status(rjzzqService.save(cgRjzzq));
 	}
 
 	@PostMapping("/rjzzq/update")
 	@ApiOperationSupport(order = 14)
-	@Operation(summary = "软件著作-修改", description  = "传入cgRjzzq")
+	@Operation(summary = "软件著作-修改", description = "传入cgRjzzq")
 	public R updateRjzzq(@Valid @RequestBody CgRjzzqEntity cgRjzzq) {
 		return R.status(rjzzqService.update(cgRjzzq));
 	}
 
 	@PostMapping("/rjzzq/remove")
 	@ApiOperationSupport(order = 15)
-	@Operation(summary = "软件著作-删除", description  = "传入ids")
+	@Operation(summary = "软件著作-删除", description = "传入ids")
 	public R removeRjzzq(@Parameter(description = "主键集合", required = true) @RequestParam String ids) {
 		return R.status(rjzzqService.physicalDeleteByIds(Func.toLongList(ids)));
 	}
@@ -148,18 +141,16 @@ public class KYCGController extends KdController {
 		return R.success("操作成功");
 	}
 
- 	@GetMapping("/rjzzq/export")
+	@GetMapping("/rjzzq/export")
 	@ApiOperationSupport(order = 17)
-	@Operation(summary = "软件著作-导出", description  = "传入cgRjzzq")
-	public void exportRjzzq(@Parameter(hidden = true) @RequestParam Map<String, Object> cgRjzzq, KdUser kdUser, HttpServletResponse response) {
-		QueryWrapper<CgRjzzqEntity> queryWrapper = Condition.getQueryWrapper(cgRjzzq, CgRjzzqEntity.class);
-		List<CgRjzzqExcel> list = rjzzqService.export(queryWrapper);
-		ExcelUtil.export(response, "科研成果-软件著作数据" + DateUtil.time(), "科研成果-软件著作数据表", list, CgRjzzqExcel.class);
+	@Operation(summary = "软件著作-导出", description = "传入cgRjzzq")
+	public void exportRjzzq(HttpServletResponse response, CgRjzzqDTO dto) {
+		rjzzqService.export(response, dto);
 	}
 
 	@GetMapping("/jsbz/detail")
 	@ApiOperationSupport(order = 21)
-	@Operation(summary = "技术标准-详情", description  = "传入cgJsbz")
+	@Operation(summary = "技术标准-详情", description = "传入cgJsbz")
 	public R<CgJsbzVO> detailJsbz(CgJsbzEntity jsbz) {
 		CgJsbzEntity detail = jsbzService.getOne(Condition.getQueryWrapper(jsbz));
 		return R.data(CgJsbzWrapper.build().entityVO(detail));
@@ -167,7 +158,7 @@ public class KYCGController extends KdController {
 
 	@GetMapping("/jsbz/list")
 	@ApiOperationSupport(order = 22)
-	@Operation(summary = "技术标准-分页", description  = "传入cgJsbz")
+	@Operation(summary = "技术标准-分页", description = "传入cgJsbz")
 	public R<IPage<CgJsbzVO>> listJsbz(@Parameter(hidden = true) @RequestParam Map<String, Object> cgJsbz, Query query) {
 		IPage<CgJsbzEntity> pages = jsbzService.page(Condition.getPage(query), Condition.getQueryWrapper(cgJsbz, CgJsbzEntity.class));
 		return R.data(CgJsbzWrapper.build().pageVO(pages));
@@ -175,21 +166,21 @@ public class KYCGController extends KdController {
 
 	@PostMapping("/jsbz/save")
 	@ApiOperationSupport(order = 23)
-	@Operation(summary = "技术标准-新增", description  = "传入cgJsbz")
+	@Operation(summary = "技术标准-新增", description = "传入cgJsbz")
 	public R saveJsbz(@Valid @RequestBody CgJsbzEntity cgJsbz) {
 		return R.status(jsbzService.save(cgJsbz));
 	}
 
 	@PostMapping("/jsbz/update")
 	@ApiOperationSupport(order = 24)
-	@Operation(summary = "技术标准-修改", description  = "传入cgJsbz")
+	@Operation(summary = "技术标准-修改", description = "传入cgJsbz")
 	public R updateJsbz(@Valid @RequestBody CgJsbzEntity cgJsbz) {
 		return R.status(jsbzService.update(cgJsbz));
 	}
 
 	@PostMapping("/jsbz/remove")
 	@ApiOperationSupport(order = 25)
-	@Operation(summary = "技术标准-删除", description  = "传入ids")
+	@Operation(summary = "技术标准-删除", description = "传入ids")
 	public R removeJsbz(@Parameter(description = "主键集合", required = true) @RequestParam String ids) {
 		return R.status(jsbzService.physicalDeleteByIds(Func.toLongList(ids)));
 	}
@@ -198,23 +189,20 @@ public class KYCGController extends KdController {
 	@ApiOperationSupport(order = 26)
 	@Operation(summary = "技术标准-导入", description = "传入excel")
 	public R importJsbz(MultipartFile file) {
-		jsbzService.importCgJsbz( file);
+		jsbzService.importCgJsbz(file);
 		return R.success("操作成功");
 	}
 
 	@GetMapping("/jsbz/export")
 	@ApiOperationSupport(order = 27)
-	@Operation(summary = "技术标准-导出", description  = "传入cgJsbz")
+	@Operation(summary = "技术标准-导出", description = "传入cgJsbz")
 	public void exportCgJsbz(@Parameter(hidden = true) @RequestParam Map<String, Object> cgJsbz, KdUser kdUser, HttpServletResponse response) {
-		QueryWrapper<CgJsbzEntity> queryWrapper = Condition.getQueryWrapper(cgJsbz, CgJsbzEntity.class);
-		List<CgJsbzExcel> list = jsbzService.export(queryWrapper);
-		ExcelUtil.export(response, "科研成果-技术标准数据" + DateUtil.time(), "科研成果-技术标准数据表", list, CgJsbzExcel.class);
+		jsbzService.export(response, cgJsbz);
 	}
 
-
 	@GetMapping("/kylw/detail")
 	@ApiOperationSupport(order = 30)
-	@Operation(summary = "科研论文-详情", description  = "传入cgKylw")
+	@Operation(summary = "科研论文-详情", description = "传入cgKylw")
 	public R<CgKylwVO> kylwDetail(CgKylwEntity cgKylw) {
 		CgKylwEntity detail = kylwService.getOne(Condition.getQueryWrapper(cgKylw));
 		return R.data(CgKylwWrapper.build().entityVO(detail));
@@ -222,7 +210,7 @@ public class KYCGController extends KdController {
 
 	@GetMapping("/kylw/list")
 	@ApiOperationSupport(order = 31)
-	@Operation(summary = "科研论文-分页", description  = "传入cgKylw")
+	@Operation(summary = "科研论文-分页", description = "传入cgKylw")
 	public R<IPage<CgKylwVO>> kylwList(@Parameter(hidden = true) @RequestParam Map<String, Object> cgKylw, Query query) {
 		IPage<CgKylwEntity> pages = kylwService.page(Condition.getPage(query), Condition.getQueryWrapper(cgKylw, CgKylwEntity.class));
 		return R.data(CgKylwWrapper.build().pageVO(pages));
@@ -230,14 +218,14 @@ public class KYCGController extends KdController {
 
 	@PostMapping("/kylw/save")
 	@ApiOperationSupport(order = 32)
-	@Operation(summary = "科研论文-新增", description  = "传入cgKylw")
+	@Operation(summary = "科研论文-新增", description = "传入cgKylw")
 	public R saveKylw(@Valid @RequestBody CgKylwEntity cgKylw) {
 		return R.status(kylwService.save(cgKylw));
 	}
 
 	@PostMapping("/kylw/update")
 	@ApiOperationSupport(order = 33)
-	@Operation(summary = "科研论文-修改", description  = "传入cgKylw")
+	@Operation(summary = "科研论文-修改", description = "传入cgKylw")
 	public R updateKylw(@Valid @RequestBody CgKylwEntity cgKylw) {
 		return R.status(kylwService.update(cgKylw));
 	}
@@ -245,7 +233,7 @@ public class KYCGController extends KdController {
 
 	@PostMapping("/kylw/remove")
 	@ApiOperationSupport(order = 34)
-	@Operation(summary = "科研论文-逻辑删除", description  = "传入ids")
+	@Operation(summary = "科研论文-逻辑删除", description = "传入ids")
 	public R removeKylw(@Parameter(description = "主键集合", required = true) @RequestParam String ids) {
 		return R.status(kylwService.physicalDeleteByIds(Func.toLongList(ids)));
 	}
@@ -260,16 +248,14 @@ public class KYCGController extends KdController {
 
 	@GetMapping("kylw/export")
 	@ApiOperationSupport(order = 36)
-	@Operation(summary = "科研论文-导出", description  = "传入cgKylw")
+	@Operation(summary = "科研论文-导出", description = "传入cgKylw")
 	public void exportKylw(@Parameter(hidden = true) @RequestParam Map<String, Object> cgKylw, KdUser kdUser, HttpServletResponse response) {
-		QueryWrapper<CgKylwEntity> queryWrapper = Condition.getQueryWrapper(cgKylw, CgKylwEntity.class);
-		List<CgKylwExcel> list = kylwService.export(queryWrapper);
-		ExcelUtil.export(response, "科研成果-科研论文数据" + DateUtil.time(), "科研成果-科研论文数据表", list, CgKylwExcel.class);
+		kylwService.export(response, cgKylw);
 	}
 
 	@GetMapping("/qt/detail")
 	@ApiOperationSupport(order = 41)
-	@Operation(summary = "其他成果-详情", description  = "传入cgQt")
+	@Operation(summary = "其他成果-详情", description = "传入cgQt")
 	public R<CgQtVO> qtDetail(CgQtEntity cgQt) {
 		CgQtEntity detail = qtService.getOne(Condition.getQueryWrapper(cgQt));
 		return R.data(CgQtWrapper.build().entityVO(detail));
@@ -277,7 +263,7 @@ public class KYCGController extends KdController {
 
 	@GetMapping("/qt/list")
 	@ApiOperationSupport(order = 42)
-	@Operation(summary = "其他成果-分页", description  = "传入cgQt")
+	@Operation(summary = "其他成果-分页", description = "传入cgQt")
 	public R<IPage<CgQtVO>> qtList(CgQtDTO dto, Query query) {
 		IPage<CgQtVO> pages = qtService.selectQtPage(Condition.getPage(query), dto);
 		return R.data(pages);
@@ -285,21 +271,21 @@ public class KYCGController extends KdController {
 
 	@PostMapping("/qt/save")
 	@ApiOperationSupport(order = 43)
-	@Operation(summary = "其他成果-新增", description  = "传入cgQt")
+	@Operation(summary = "其他成果-新增", description = "传入cgQt")
 	public R saveQt(@Valid @RequestBody CgQtEntity cgQt) {
 		return R.status(qtService.save(cgQt));
 	}
 
 	@PostMapping("/qt/update")
 	@ApiOperationSupport(order = 44)
-	@Operation(summary = "其他成果-修改", description  = "传入cgQt")
+	@Operation(summary = "其他成果-修改", description = "传入cgQt")
 	public R updateQt(@Valid @RequestBody CgQtEntity cgQt) {
 		return R.status(qtService.update(cgQt));
 	}
 
 	@PostMapping("/qt/remove")
 	@ApiOperationSupport(order = 45)
-	@Operation(summary = "其他成果-逻辑删除", description  = "传入ids")
+	@Operation(summary = "其他成果-逻辑删除", description = "传入ids")
 	public R removeQt(@Parameter(description = "主键集合", required = true) @RequestParam String ids) {
 		return R.status(qtService.physicalDeleteByIds(Func.toLongList(ids)));
 	}
@@ -312,20 +298,18 @@ public class KYCGController extends KdController {
 		return R.success("操作成功");
 	}
 
- 	@GetMapping("/qt/export")
+	@GetMapping("/qt/export")
 	@ApiOperationSupport(order = 47)
-	@Operation(summary = "其他成果-导出数据", description  = "传入cgQt")
-	public void exportQt(@Parameter(hidden = true) @RequestParam Map<String, Object> cgQt, KdUser kdUser, HttpServletResponse response) {
-		QueryWrapper<CgQtEntity> queryWrapper = Condition.getQueryWrapper(cgQt, CgQtEntity.class);
-		List<CgQtExcel> list = qtService.export(queryWrapper);
-		ExcelUtil.export(response, "科研成果-其他成果数据" + DateUtil.time(), "科研成果-其他成果数据表", list, CgQtExcel.class);
+	@Operation(summary = "其他成果-导出数据", description = "传入cgQt")
+	public void exportQt(HttpServletResponse response, CgQtDTO dto) {
+		qtService.export(response, dto);
 	}
 
 	@GetMapping("/summary")
 	@ApiOperationSupport(order = 80)
 	@Operation(summary = "研发项目成果")
-	public R<IPage<XmCGSummary>>  xmCgSummary(Query query, Long xmId){
-		IPage<XmCGSummary> page =  qtService.xmCgSummary(Condition.getPage(query), xmId);
+	public R<IPage<XmCGSummary>> xmCgSummary(Query query, Long xmId) {
+		IPage<XmCGSummary> page = qtService.xmCgSummary(Condition.getPage(query), xmId);
 		return R.data(page);
 	}
 }

+ 15 - 1
kd-service/kd-scientific/src/main/java/org/sky/scientific/controller/TechnicianController.java

@@ -196,10 +196,24 @@ public class TechnicianController extends KdController {
 		return R.data(technicianService.meiyueyanfarengongfeiyongfeifenpeibiao(Condition.getPage(query), dto));
 	}
 
-	@GetMapping("myyfxmrgfyhzb")
+	@PostMapping("/myyfryrgfyfpb/export")
 	@ApiOperationSupport(order = 31)
+	@Operation(summary = "每月研发人员人工费用分配表-导出")
+	public void exportMyyfryrgfyfpb(HttpServletResponse response, @RequestBody XmTechnicianDto dto) {
+		technicianService.exportMeiyueyanfarengongfeiyongfeifenpeibiao(response, dto);
+	}
+
+	@GetMapping("myyfxmrgfyhzb")
+	@ApiOperationSupport(order = 32)
 	@Operation(summary = "每月研发项目人工分配汇总表")
 	public R<IPage<XmSalaryVO>> meiyueyanfaxiangmurengongfenpeihuizongbiao(XmSalaryDto dto, Query query) {
 		return R.data(technicianService.meiyueyanfaxiangmurengongfenpeihuizongbiao(Condition.getPage(query), dto));
 	}
+
+	@PostMapping("/myyfxmrgfyhzb/export")
+	@ApiOperationSupport(order = 33)
+	@Operation(summary = "每月研发项目人工分配汇总表-导出")
+	public void exportMyyfxmrgfyhzb(HttpServletResponse response, @RequestBody XmSalaryDto dto) {
+		technicianService.exportMeiyueyanfaxiangmurengongfenpeihuizongbiao(response, dto);
+	}
 }

+ 7 - 0
kd-service/kd-scientific/src/main/java/org/sky/scientific/controller/XmTechnicianHoursController.java

@@ -85,4 +85,11 @@ public class XmTechnicianHoursController extends KdController {
 		return R.data(service.meiyueyanfagongshifenpeibiao(Condition.getPage(query), dto));
 	}
 
+	@PostMapping("/myyfgsfpb/export")
+	@ApiOperationSupport(order = 33)
+	@Operation(summary = "每月研发工时分配表-导出")
+	public void exportMyyfgsfpb(HttpServletResponse response, @RequestBody TechnicianDTO dto) {
+		service.exportMeiyueyanfagongshifenpeibiao(response, dto);
+	}
+
 }

+ 4 - 0
kd-service/kd-scientific/src/main/java/org/sky/scientific/excel/CgJsbzExcel.java

@@ -32,6 +32,8 @@ public class CgJsbzExcel implements Serializable {
 	@Serial
 	private static final long serialVersionUID = 1L;
 
+	private String xh;
+
 	@ColumnWidth(20)
 	@ExcelProperty(index = 1, value ="标准号")
 	private String zbh;
@@ -62,6 +64,8 @@ public class CgJsbzExcel implements Serializable {
 	@JsonFormat(pattern = DateUtil.PATTERN_DATE)
 	private Date ssrq;
 
+	private String ssrqStr;
+
 	@ColumnWidth(20)
 	@ExcelProperty(index = 8, value ="标准状态")
 	private String state;

+ 3 - 0
kd-service/kd-scientific/src/main/java/org/sky/scientific/excel/CgKylwExcel.java

@@ -32,6 +32,7 @@ public class CgKylwExcel implements Serializable {
 	@Serial
 	private static final long serialVersionUID = 1L;
 
+	private String xh;
 
 	@ColumnWidth(20)
 	@ExcelProperty(index = 1, value = "论文名称")
@@ -55,6 +56,8 @@ public class CgKylwExcel implements Serializable {
 	@JsonFormat(pattern = DateUtil.PATTERN_DATETIME)
 	private Date fbrq;
 
+	private String fbrqStr;
+
 	@ColumnWidth(20)
 	@ExcelProperty(index = 6, value = "期刊名称")
 	private String qkmc;

+ 9 - 5
kd-service/kd-scientific/src/main/java/org/sky/scientific/excel/CgQtExcel.java

@@ -2,19 +2,17 @@
 package org.sky.scientific.excel;
 
 
-import com.fasterxml.jackson.annotation.JsonFormat;
-import lombok.Data;
-
 import com.alibaba.excel.annotation.ExcelProperty;
 import com.alibaba.excel.annotation.write.style.ColumnWidth;
 import com.alibaba.excel.annotation.write.style.ContentRowHeight;
 import com.alibaba.excel.annotation.write.style.HeadRowHeight;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Data;
 import org.sky.core.tool.utils.DateUtil;
 import org.springframework.format.annotation.DateTimeFormat;
 
-import java.io.Serializable;
 import java.io.Serial;
-import java.lang.runtime.ObjectMethods;
+import java.io.Serializable;
 import java.util.Date;
 
 
@@ -33,6 +31,8 @@ public class CgQtExcel implements Serializable {
 	@Serial
 	private static final long serialVersionUID = 1L;
 
+	private String xh;
+
 	@ColumnWidth(20)
 	@ExcelProperty(index = 1, value = "成果编号")
 	private String cgbh;
@@ -63,12 +63,16 @@ public class CgQtExcel implements Serializable {
 	@JsonFormat(pattern = DateUtil.PATTERN_DATE)
 	private Date shenqingRq;
 
+	private String shenqingRqStr;
+
 	@ColumnWidth(20)
 	@ExcelProperty(index = 8, value ="授权日期")
 	@DateTimeFormat(pattern = DateUtil.PATTERN_DATE)
 	@JsonFormat(pattern = DateUtil.PATTERN_DATE)
 	private Date shouquanRq;
 
+	private String shouquanRqStr;
+
 	@ColumnWidth(20)
 	@ExcelProperty(index = 9, value ="参与/主持")
 	private String canyunZhuchi;

+ 8 - 0
kd-service/kd-scientific/src/main/java/org/sky/scientific/excel/CgRjzzqExcel.java

@@ -32,6 +32,8 @@ public class CgRjzzqExcel implements Serializable {
 	@Serial
 	private static final long serialVersionUID = 1L;
 
+	private String xh;
+
 	@ColumnWidth(20)
 	@ExcelProperty(index = 1, value = "软件名称")
 	private String rjmc;
@@ -54,18 +56,24 @@ public class CgRjzzqExcel implements Serializable {
 	@JsonFormat(pattern = DateUtil.PATTERN_DATE)
 	private Date kfwcrq;
 
+	private String kfwcrqStr;
+
 	@ColumnWidth(20)
 	@ExcelProperty(index = 6, value ="首次发布日期")
 	@DateTimeFormat(pattern = DateUtil.PATTERN_DATE)
 	@JsonFormat(pattern = DateUtil.PATTERN_DATE)
 	private Date scfbrq;
 
+	private String scfbrqStr;
+
 	@ColumnWidth(20)
 	@ExcelProperty(index = 7, value ="登记批准日期")
 	@DateTimeFormat(pattern = DateUtil.PATTERN_DATE)
 	@JsonFormat(pattern = DateUtil.PATTERN_DATE)
 	private Date djpzrq;
 
+	private String djpzrqStr;
+
 	@ColumnWidth(20)
 	@ExcelProperty(index = 8, value ="取得方式")
 	private String qdfs;

+ 9 - 5
kd-service/kd-scientific/src/main/java/org/sky/scientific/excel/CgZlExcel.java

@@ -2,19 +2,17 @@
 package org.sky.scientific.excel;
 
 
-import com.fasterxml.jackson.annotation.JsonFormat;
-import io.swagger.v3.oas.annotations.media.Schema;
-import lombok.Data;
-
 import com.alibaba.excel.annotation.ExcelProperty;
 import com.alibaba.excel.annotation.write.style.ColumnWidth;
 import com.alibaba.excel.annotation.write.style.ContentRowHeight;
 import com.alibaba.excel.annotation.write.style.HeadRowHeight;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Data;
 import org.sky.core.tool.utils.DateUtil;
 import org.springframework.format.annotation.DateTimeFormat;
 
-import java.io.Serializable;
 import java.io.Serial;
+import java.io.Serializable;
 import java.util.Date;
 
 
@@ -33,6 +31,8 @@ public class CgZlExcel implements Serializable {
 	@Serial
 	private static final long serialVersionUID = 1L;
 
+	private String xh;
+
 	@ColumnWidth(20)
 	@ExcelProperty(index = 1, value = "专利号")
 	private String zlh;
@@ -63,12 +63,16 @@ public class CgZlExcel implements Serializable {
 	@JsonFormat(pattern = DateUtil.PATTERN_DATE)
 	private Date shenqingRq;
 
+	private String shenqingRqStr;
+
 	@ColumnWidth(20)
 	@ExcelProperty(index = 8, value = "授权日")
 	@DateTimeFormat(pattern = DateUtil.PATTERN_DATE)
 	@JsonFormat(pattern = DateUtil.PATTERN_DATE)
 	private Date shouquanRq;
 
+	private String shouquanRqStr;
+
 	@ColumnWidth(20)
 	@ExcelProperty(index = 9, value = "申请单位")
 	private String sqdw;

+ 1 - 2
kd-service/kd-scientific/src/main/java/org/sky/scientific/mapper/A107041Mapper.java

@@ -1,4 +1,3 @@
-
 package org.sky.scientific.mapper;
 
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
@@ -12,5 +11,5 @@ import org.sky.scientific.pojo.entity.A107041;
  */
 public interface A107041Mapper extends BaseMapper<A107041> {
 
-
+//	A107041 selectByYear(@Param("year") String year);
 }

+ 13 - 0
kd-service/kd-scientific/src/main/java/org/sky/scientific/mapper/A107041Mapper.xml

@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="org.sky.scientific.mapper.A107041Mapper">
+
+<!--    <select id="selectByYear" resultType="org.sky.scientific.pojo.entity.A107041">-->
+<!--        select-->
+<!--        *-->
+<!--        from kd_a107041-->
+<!--        where year_and_month = #{year}-->
+
+<!--    </select>-->
+
+</mapper>

+ 1 - 0
kd-service/kd-scientific/src/main/java/org/sky/scientific/mapper/A107_1Mapper.xml

@@ -10,6 +10,7 @@
         (
             SELECT
                 xm.id as xm_id,xm.tenant_id,
+                xm.yjlx,
                 COALESCE( (SELECT bgrz.BGHDZ FROM kd_xm_bgrz bgrz WHERE bgrz.XM_ID = xm.id AND bgrz.ZDMC = 'XMMC' AND DATE_FORMAT(bgrz.BGSXSJ,'%Y') <![CDATA[<=]]> #{year} ORDER BY bgrz.BGSXSJ DESC LIMIT 1),XMMC) AS XMMC,
                 xm.XMLY,xm.XMKZXS as kzxs,xm.YQCGXS as cgxs,xm.XMJSJJMB as jsjjmb,
                 xm.XMKSSJ as kssj,

+ 0 - 1
kd-service/kd-scientific/src/main/java/org/sky/scientific/mapper/AssetMapper.xml

@@ -190,7 +190,6 @@
                  ) AS numbers
             ) AS m
         GROUP BY m.month
-
     </select>
 
     <select id="checkAssetUsage" resultType="java.lang.Long">

+ 0 - 11
kd-service/kd-scientific/src/main/java/org/sky/scientific/mapper/CgZlMapper.java

@@ -1,10 +1,7 @@
 
 package org.sky.scientific.mapper;
 
-import com.baomidou.mybatisplus.core.conditions.Wrapper;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import org.apache.ibatis.annotations.Param;
-import org.sky.scientific.excel.CgZlExcel;
 import org.sky.scientific.pojo.entity.CgZlEntity;
 
 import java.util.List;
@@ -17,13 +14,5 @@ import java.util.List;
  */
 public interface CgZlMapper extends BaseMapper<CgZlEntity> {
 
-	/**
-	 * 获取导出数据
-	 *
-	 * @param queryWrapper 查询条件
-	 * @return List<CgZlExcel>
-	 */
-	List<CgZlExcel> exportCgZl(@Param("ew") Wrapper<CgZlEntity> queryWrapper);
-
 	boolean physicalDeleteByIds(List<Long> ids);
 }

+ 0 - 4
kd-service/kd-scientific/src/main/java/org/sky/scientific/mapper/CgZlMapper.xml

@@ -40,8 +40,4 @@
         </foreach>
     </delete>
 
-    <select id="exportCgZl" resultType="org.sky.scientific.excel.CgZlExcel">
-        SELECT * FROM kd_cg_zl ${ew.customSqlSegment}
-    </select>
-
 </mapper>

+ 3 - 1
kd-service/kd-scientific/src/main/java/org/sky/scientific/mapper/XmCostDetailsMapper.xml

@@ -213,7 +213,7 @@
         order by kxcd.record_date asc
     </select>
 
-    <select id="costSummary" resultType="com.alibaba.fastjson.JSONObject">
+    <select id="costSummary" resultType="com.alibaba.fastjson.JSONObject" parameterType="org.sky.scientific.pojo.dto.XmCostDetailsDTO">
         SELECT
         p.xm_id as xmId,xm.XMBH,xm.XMMC
         FROM
@@ -233,7 +233,9 @@
         ) xm on xm.id = p.xm_id
         <where>
             <if test="ew.xmmc!=null and ew.xmmc!=''">and xm.XMMC like concat('%',#{ew.xmmc},'%')</if>
+            <if test="ew.xmId!=null and ew.xmId>0">and xm.id = #{ew.xmId}</if>
         </where>
+
     </select>
 
     <resultMap id="CostItemVO" type="org.sky.scientific.pojo.vo.CostItemVO">

+ 1 - 1
kd-service/kd-scientific/src/main/java/org/sky/scientific/mapper/XmLeaseMapper.xml

@@ -52,7 +52,7 @@
         from kd_xm_lease kxl
         left join kd_xm xm on xm.id = kxl.xm_id
         where kxl.is_deleted = 0 and kxl.year_and_month = #{ew.yearAndMonth}
-        <if test="ew.xmmc!=null and ew.xmbh!=''">and xm.xmmc like concat('%',#{ew.xmmc},'%')</if>
+        <if test="ew.xmmc!=null and ew.xmmc!=''">and xm.xmmc like concat('%',#{ew.xmmc},'%')</if>
         <if test="ew.xmbh!=null and ew.xmbh!=''">and xm.xmbh like concat('%',#{ew.xmbh},'%')</if>
         <if test="ew.type!=null and ew.type!=''">and xm.type = #{ew.type}</if>
         <if test="ew.name!=null and ew.name!=''">and kxl.name like concat('%',#{ew.name},'%')</if>

+ 2 - 0
kd-service/kd-scientific/src/main/java/org/sky/scientific/mapper/XmTechnicianMapper.xml

@@ -253,6 +253,7 @@
         <if test="ew.number!=null and ew.number!=''">and t.number like concat('%',#{ew.number}, '%')</if>
         <if test="ew.idCard!=null and ew.idCard!=''">and t.id_card like concat('%', #{ew.idCard}, '%')</if>
         <if test="ew.personnelType!=null and ew.personnelType!=''">and t.personnel_type = #{ew.personnelType}</if>
+        order by m.xm_id, m.unicode
     </select>
 
     <select id="meiyueyanfarengongfeiyongfeifenpeibiaoYear"
@@ -292,6 +293,7 @@
         <if test="ew.idCard!=null and ew.idCard!=''">and t.id_card like concat('%', #{ew.idCard}, '%')</if>
         <if test="ew.personnelType!=null and ew.personnelType!=''">and t.personnel_type = #{ew.personnelType}</if>
         GROUP BY m.xm_id, m.unicode
+        order by m.xm_id, m.unicode
     </select>
 
     <select id="meiyueyanfaxiangmurengongfenpeihuizongbiao" resultType="org.sky.scientific.pojo.vo.XmSalaryVO">

+ 2 - 0
kd-service/kd-scientific/src/main/java/org/sky/scientific/mapper/XmWwxmCostMapper.java

@@ -8,6 +8,7 @@ import org.sky.scientific.pojo.dto.XmWwxmCostQuery;
 import org.sky.scientific.pojo.entity.XmWwxmCost;
 import org.sky.scientific.pojo.vo.XmWwxmCostVO;
 
+import java.math.BigDecimal;
 import java.util.List;
 
 /**
@@ -20,6 +21,7 @@ public interface XmWwxmCostMapper extends BaseMapper<XmWwxmCost> {
 
 	List<XmWwxmCostVO> selectPageByYearAndMonth(IPage<XmWwxmCostVO> page, @Param("ew") XmWwxmCostQuery param);
 	List<XmWwxmCostVO> selectPageByYear(IPage<XmWwxmCostVO> page, @Param("ew") XmWwxmCostQuery param);
+	BigDecimal getAmountByXmAndYear(@Param("year") String year, @Param("xmId") Long xmId);
 
 	boolean physicalDeleteByIds(List<Long> ids);
 }

+ 7 - 0
kd-service/kd-scientific/src/main/java/org/sky/scientific/mapper/XmWwxmCostMapper.xml

@@ -75,6 +75,13 @@
         <if test="ew.STFLX!=null and ew.STFLX!=''">and x.STFLX like concat('%',#{ew.STFLX},'%')</if>
     </select>
 
+    <select id="getAmountByXmAndYear">
+        SELECT IFNULL(sum(pay_amount),0)
+        FROM kd_xm_wwxm_cost c
+                 LEFT JOIN kd_xm_wwxm w on w.id = c.ww_id
+        WHERE LEFT(c.year_and_month,4) = #{year} and w.XM_ID = #{xmId} and w.STFLX in ('境内研究机构','境内高等学校','境内企业','境内个人','境外机构')
+    </select>
+
     <delete id="physicalDeleteByIds">
         DELETE FROM kd_xm_wwxm_cost
         WHERE id IN

+ 6 - 0
kd-service/kd-scientific/src/main/java/org/sky/scientific/service/IAssetService.java

@@ -82,6 +82,11 @@ public interface IAssetService extends BaseService<AssetEntity> {
 	 */
 	List<CostSummaryVO> costSummary(CostSummaryDTO dto);
 
+	/*
+	 * 研发费用统计-本年各月研发费用汇总表-导出
+	 */
+	void exportCostSummary(HttpServletResponse response, CostSummaryDTO dto);
+
 	/**
 	 * 修改
 	 * @param asset
@@ -102,4 +107,5 @@ public interface IAssetService extends BaseService<AssetEntity> {
 	 * @return
 	 */
 	boolean recover(AssetEntity asset);
+
 }

+ 3 - 9
kd-service/kd-scientific/src/main/java/org/sky/scientific/service/ICgJsbzService.java

@@ -1,13 +1,13 @@
 
 package org.sky.scientific.service;
 
-import com.baomidou.mybatisplus.core.conditions.Wrapper;
+import jakarta.servlet.http.HttpServletResponse;
 import org.sky.core.mp.base.BaseService;
-import org.sky.scientific.excel.CgJsbzExcel;
 import org.sky.scientific.pojo.entity.CgJsbzEntity;
 import org.springframework.web.multipart.MultipartFile;
 
 import java.util.List;
+import java.util.Map;
 
 /**
  * 科研成果-技术标准 服务类
@@ -17,13 +17,7 @@ import java.util.List;
  */
 public interface ICgJsbzService extends BaseService<CgJsbzEntity> {
 
-	/**
-	 * 导出数据
-	 *
-	 * @param queryWrapper 查询条件
-	 * @return List<CgJsbzExcel>
-	 */
-	List<CgJsbzExcel> export(Wrapper<CgJsbzEntity> queryWrapper);
+	void export(HttpServletResponse response, Map<String, Object> cgJsbz);
 
 	void importCgJsbz(MultipartFile file);
 

+ 3 - 9
kd-service/kd-scientific/src/main/java/org/sky/scientific/service/ICgKylwService.java

@@ -1,13 +1,13 @@
 
 package org.sky.scientific.service;
 
-import com.baomidou.mybatisplus.core.conditions.Wrapper;
+import jakarta.servlet.http.HttpServletResponse;
 import org.sky.core.mp.base.BaseService;
-import org.sky.scientific.excel.CgKylwExcel;
 import org.sky.scientific.pojo.entity.CgKylwEntity;
 import org.springframework.web.multipart.MultipartFile;
 
 import java.util.List;
+import java.util.Map;
 
 /**
  * 科研成果-科研论文 服务类
@@ -17,13 +17,7 @@ import java.util.List;
  */
 public interface ICgKylwService extends BaseService<CgKylwEntity> {
 
-	/**
-	 * 导出数据
-	 *
-	 * @param queryWrapper 查询条件
-	 * @return List<CgKylwExcel>
-	 */
-	List<CgKylwExcel> export(Wrapper<CgKylwEntity> queryWrapper);
+	void export(HttpServletResponse response, Map<String, Object> cgKylw);
 
     void importCgKylw(MultipartFile file);
 

+ 3 - 9
kd-service/kd-scientific/src/main/java/org/sky/scientific/service/ICgQtService.java

@@ -1,10 +1,9 @@
 
 package org.sky.scientific.service;
 
-import com.baomidou.mybatisplus.core.conditions.Wrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
+import jakarta.servlet.http.HttpServletResponse;
 import org.sky.core.mp.base.BaseService;
-import org.sky.scientific.excel.CgQtExcel;
 import org.sky.scientific.pojo.dto.CgQtDTO;
 import org.sky.scientific.pojo.entity.CgQtEntity;
 import org.sky.scientific.pojo.vo.CgQtVO;
@@ -21,13 +20,6 @@ import java.util.List;
  */
 public interface ICgQtService extends BaseService<CgQtEntity> {
 
-	/**
-	 * 导出数据
-	 *
-	 * @param queryWrapper 查询条件
-	 * @return List<CgQtExcel>
-	 */
-	List<CgQtExcel> export(Wrapper<CgQtEntity> queryWrapper);
 
     void importQt(MultipartFile file);
 
@@ -46,4 +38,6 @@ public interface ICgQtService extends BaseService<CgQtEntity> {
 	IPage<XmCGSummary> xmCgSummary(IPage<XmCGSummary> page, Long xmId);
 
 	IPage<CgQtVO> selectQtPage(IPage<CgQtVO> page, CgQtDTO dto);
+
+	void export(HttpServletResponse response, CgQtDTO dto);
 }

+ 2 - 9
kd-service/kd-scientific/src/main/java/org/sky/scientific/service/ICgRjzzqService.java

@@ -1,10 +1,9 @@
 package org.sky.scientific.service;
 
-import com.baomidou.mybatisplus.core.conditions.Wrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
+import jakarta.servlet.http.HttpServletResponse;
 import org.apache.ibatis.annotations.Param;
 import org.sky.core.mp.base.BaseService;
-import org.sky.scientific.excel.CgRjzzqExcel;
 import org.sky.scientific.pojo.dto.CgRjzzqDTO;
 import org.sky.scientific.pojo.entity.CgRjzzqEntity;
 import org.sky.scientific.pojo.vo.CgRjzzqVO;
@@ -20,13 +19,7 @@ import java.util.List;
  */
 public interface ICgRjzzqService extends BaseService<CgRjzzqEntity> {
 
-	/**
-	 * 导出数据
-	 *
-	 * @param queryWrapper 查询条件
-	 * @return List<CgRjzzqExcel>
-	 */
-	List<CgRjzzqExcel> export(Wrapper<CgRjzzqEntity> queryWrapper);
+	void export(HttpServletResponse response, CgRjzzqDTO dto);
 
     void importRjzzq(MultipartFile file);
 

+ 4 - 10
kd-service/kd-scientific/src/main/java/org/sky/scientific/service/ICgZlService.java

@@ -1,13 +1,13 @@
 
 package org.sky.scientific.service;
 
-import com.baomidou.mybatisplus.core.conditions.Wrapper;
+import jakarta.servlet.http.HttpServletResponse;
 import org.sky.core.mp.base.BaseService;
-import org.sky.scientific.excel.CgZlExcel;
 import org.sky.scientific.pojo.entity.CgZlEntity;
 import org.springframework.web.multipart.MultipartFile;
 
 import java.util.List;
+import java.util.Map;
 
 /**
  * 科研成果-专利 服务类
@@ -17,14 +17,6 @@ import java.util.List;
  */
 public interface ICgZlService extends BaseService<CgZlEntity> {
 
-	/**
-	 * 导出数据
-	 *
-	 * @param queryWrapper 查询条件
-	 * @return List<CgZlExcel>
-	 */
-	List<CgZlExcel> export(Wrapper<CgZlEntity> queryWrapper);
-
     void importZl(MultipartFile file);
 
 	boolean save(CgZlEntity cgZl);
@@ -32,4 +24,6 @@ public interface ICgZlService extends BaseService<CgZlEntity> {
 	boolean update(CgZlEntity cgZl);
 
 	boolean physicalDeleteByIds(List<Long> ids);
+
+	void exportZl(HttpServletResponse response, Map<String, Object> cgZl);
 }

+ 15 - 2
kd-service/kd-scientific/src/main/java/org/sky/scientific/service/ITechnicianService.java

@@ -73,7 +73,6 @@ public interface ITechnicianService extends BaseService<TechnicianEntity> {
 	 */
 	void zhijieyinyongyusuanbiaomingdan(String yearAndMonth);
 
-
 	/**
 	 * 每月实际参研人员名单-分页
 	 * @param entity
@@ -117,7 +116,6 @@ public interface ITechnicianService extends BaseService<TechnicianEntity> {
 	 */
 	IPage<XmTechnicianSummary> xiangmucanyanrenyuanhuizongbiao(IPage<XmTechnicianSummary> page, XmTechnicianEntity entity);
 
-
 	/**
 	 * 参研人员花名册
 	 * @param page
@@ -140,6 +138,13 @@ public interface ITechnicianService extends BaseService<TechnicianEntity> {
 	IPage<XmTechnicianSalaryVO> meiyueyanfarengongfeiyongfeifenpeibiao(IPage<XmTechnicianSalaryVO> page, XmTechnicianDto dto);
 
 	/**
+	 * 月度研发人员人工费用分配表-导出
+	 * @param response
+	 * @param dto
+	 */
+	void exportMeiyueyanfarengongfeiyongfeifenpeibiao(HttpServletResponse response, XmTechnicianDto dto);
+
+	/**
 	 * 每月研发项目人工分配汇总表-按月
 	 * @param page
 	 * @param dto
@@ -147,9 +152,17 @@ public interface ITechnicianService extends BaseService<TechnicianEntity> {
 	 */
 	IPage<XmSalaryVO> meiyueyanfaxiangmurengongfenpeihuizongbiao(IPage<XmSalaryVO> page, XmSalaryDto dto);
 
+	/**
+	 * 每月研发项目人工分配汇总表-导出
+	 * @param response
+	 * @param dto
+	 */
+	void exportMeiyueyanfaxiangmurengongfenpeihuizongbiao(HttpServletResponse response, XmSalaryDto dto);
+
 	void exportCyryhmc(HttpServletResponse response, XmTechnicianDto dto);
 
 	void exportXmcyryhzb(HttpServletResponse response, XmTechnicianEntity dto);
 
 	void exportNdgkjryhzb(HttpServletResponse response, TechnicianDTO dto);
+
 }

+ 7 - 0
kd-service/kd-scientific/src/main/java/org/sky/scientific/service/IXmTechnicianHoursService.java

@@ -66,4 +66,11 @@ public interface IXmTechnicianHoursService extends BaseService<XmTechnicianHours
 	 * @return
 	 */
     IPage<TechnicianHoursMonthlyVO> meiyueyanfagongshifenpeibiao(IPage<TechnicianHoursMonthlyVO> page, TechnicianDTO dto);
+
+ 	/**
+	 * 研发费用统计-人员人工费用-每月研发工时分配表-导出
+	 * @param response
+	 * @param dto
+	 */
+	void exportMeiyueyanfagongshifenpeibiao(HttpServletResponse response, TechnicianDTO dto);
 }

+ 44 - 3
kd-service/kd-scientific/src/main/java/org/sky/scientific/service/impl/AssetServiceImpl.java

@@ -5,6 +5,7 @@ import com.alibaba.excel.EasyExcel;
 import com.alibaba.excel.ExcelWriter;
 import com.alibaba.excel.support.ExcelTypeEnum;
 import com.alibaba.excel.write.metadata.WriteSheet;
+import com.alibaba.excel.write.metadata.fill.FillConfig;
 import com.alibaba.excel.write.metadata.fill.FillWrapper;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
@@ -38,9 +39,7 @@ import java.io.InputStream;
 import java.math.BigDecimal;
 import java.math.RoundingMode;
 import java.net.URLEncoder;
-import java.util.Arrays;
-import java.util.List;
-import java.util.Objects;
+import java.util.*;
 import java.util.concurrent.atomic.AtomicInteger;
 
 /**
@@ -236,7 +235,49 @@ public class AssetServiceImpl extends BaseServiceImpl<AssetMapper, AssetEntity>
 		return list;
 	}
 
+    @SneakyThrows
 	@Override
+    public void exportCostSummary(HttpServletResponse response, CostSummaryDTO dto) {
+		List<CostSummaryVO> list = this.costSummary(dto);
+		AtomicInteger index = new AtomicInteger(1);
+		list.forEach(temp -> {
+			temp.setXh(index.getAndIncrement()+"");
+		});
+
+		InputStream templateFileName = this.getClass().getClassLoader().getResourceAsStream("export-template/研发费用汇总表P0040.xls");
+		response.setContentType("application/vnd.ms-excel");
+		response.setCharacterEncoding("utf-8");
+		response.addHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode("研发费用汇总表.xls", Charsets.UTF_8));
+		ExcelWriter excelWriter = EasyExcel.write(response.getOutputStream())
+			.withTemplate((templateFileName))
+			.excelType(ExcelTypeEnum.XLS)
+			.build();
+
+		WriteSheet writeSheet = EasyExcel.writerSheet().build();
+		FillConfig fillConfig = FillConfig.builder().forceNewRow(Boolean.TRUE).build();
+		//设置list集合数据
+		excelWriter.fill(list, fillConfig, writeSheet);
+		Map<String,Object> map = new HashMap<>();
+		map.put("ryrgfySum", list.stream().map(CostSummaryVO::getRyrgfy).reduce(BigDecimal.ZERO, BigDecimal::add));
+		map.put("zjtrfySum", list.stream().map(CostSummaryVO::getZjtrfy).reduce(BigDecimal.ZERO, BigDecimal::add));
+		map.put("zjfyycqdtfySum", list.stream().map(CostSummaryVO::getZjfyycqdtfy).reduce(BigDecimal.ZERO, BigDecimal::add));
+		map.put("sjfySum", list.stream().map(CostSummaryVO::getSjfy).reduce(BigDecimal.ZERO, BigDecimal::add));
+		map.put("wxzctxfySum", list.stream().map(CostSummaryVO::getWxzctxfy).reduce(BigDecimal.ZERO, BigDecimal::add));
+		map.put("zbtsfyysyfySum", list.stream().map(CostSummaryVO::getZbtsfyysyfy).reduce(BigDecimal.ZERO, BigDecimal::add));
+		map.put("qtfySum", list.stream().map(CostSummaryVO::getQtfy).reduce(BigDecimal.ZERO, BigDecimal::add));
+		map.put("wwfySum", list.stream().map(CostSummaryVO::getWwfy).reduce(BigDecimal.ZERO, BigDecimal::add));
+		map.put("wwfyAdjustSum", list.stream().map(CostSummaryVO::getWwfyAdjust).reduce(BigDecimal.ZERO, BigDecimal::add));
+		map.put("totalSum", list.stream().map(CostSummaryVO::getTotal).reduce(BigDecimal.ZERO, BigDecimal::add));
+		map.put("year", dto.getYearAndMonth().substring(0,4));
+		map.put("month", dto.getYearAndMonth().substring(4));
+		excelWriter.fill(map, writeSheet);
+		excelWriter.finish();
+		if (templateFileName != null) {
+			templateFileName.close();
+		}
+    }
+
+    @Override
 	public boolean updateAsset(AssetEntity asset) {
 		if (Func.isNull(asset.getId())) {
 			throw new ServiceException("参数id不能为空");

+ 48 - 11
kd-service/kd-scientific/src/main/java/org/sky/scientific/service/impl/CgJsbzServiceImpl.java

@@ -1,15 +1,21 @@
 
 package org.sky.scientific.service.impl;
 
-import com.baomidou.mybatisplus.core.conditions.Wrapper;
+import com.alibaba.excel.EasyExcel;
+import com.alibaba.excel.ExcelWriter;
+import com.alibaba.excel.support.ExcelTypeEnum;
+import com.alibaba.excel.write.metadata.WriteSheet;
+import com.alibaba.excel.write.metadata.fill.FillConfig;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import jakarta.annotation.Resource;
+import jakarta.servlet.http.HttpServletResponse;
+import lombok.SneakyThrows;
 import org.sky.core.excel.util.ExcelUtil;
 import org.sky.core.log.exception.ServiceException;
 import org.sky.core.mp.base.BaseServiceImpl;
-import org.sky.core.tool.utils.BeanUtil;
-import org.sky.core.tool.utils.CollectionUtil;
-import org.sky.core.tool.utils.StringUtil;
+import org.sky.core.mp.support.Condition;
+import org.sky.core.mp.support.Query;
+import org.sky.core.tool.utils.*;
 import org.sky.scientific.excel.CgJsbzExcel;
 import org.sky.scientific.mapper.CgJsbzMapper;
 import org.sky.scientific.mapper.XmMapper;
@@ -21,8 +27,13 @@ import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.web.multipart.MultipartFile;
 
+import java.io.InputStream;
+import java.net.URLEncoder;
+import java.util.ArrayList;
 import java.util.List;
+import java.util.Map;
 import java.util.Objects;
+import java.util.concurrent.atomic.AtomicInteger;
 
 /**
  * 科研成果-技术标准 服务实现类
@@ -36,12 +47,6 @@ public class CgJsbzServiceImpl extends BaseServiceImpl<CgJsbzMapper, CgJsbzEntit
 	@Resource
 	private XmMapper xmMapper;
 
-	@Override
-	public List<CgJsbzExcel> export(Wrapper<CgJsbzEntity> queryWrapper) {
-		List<CgJsbzExcel> cgJsbzList = baseMapper.exportCgJsbz(queryWrapper);
-		return cgJsbzList;
-	}
-
 	@Transactional
     @Override
     public void importCgJsbz(MultipartFile file) {
@@ -64,7 +69,6 @@ public class CgJsbzServiceImpl extends BaseServiceImpl<CgJsbzMapper, CgJsbzEntit
 
 	@Override
 	public boolean save(CgJsbzEntity cgJsbz) {
-
 		return super.save(cgJsbz);
 	}
 
@@ -83,4 +87,37 @@ public class CgJsbzServiceImpl extends BaseServiceImpl<CgJsbzMapper, CgJsbzEntit
 	public boolean physicalDeleteByIds(List<Long> ids) {
 		return baseMapper.physicalDeleteByIds(ids);
 	}
+
+	@SneakyThrows
+	@Override
+	public void export(HttpServletResponse response, Map<String, Object> cgJsbz) {
+		List<CgJsbzEntity> list = this.page(Condition.getPage(new Query().setCurrent(1).setSize(Integer.MAX_VALUE)), Condition.getQueryWrapper(cgJsbz, CgJsbzEntity.class)).getRecords();
+ 		AtomicInteger index = new AtomicInteger(1);
+		List<CgJsbzExcel> results = new ArrayList<>();
+		list.forEach(temp -> {
+			CgJsbzExcel excel = BeanUtil.copyProperties(temp, CgJsbzExcel.class);
+			assert excel != null;
+			excel.setXh(index.getAndIncrement() + "");
+			excel.setSsrqStr(Func.notNull(temp.getSsrq())?DateUtil.format(temp.getSsrq(), DateUtil.PATTERN_DATE):null);
+			results.add(excel);
+		});
+
+		InputStream templateFileName = this.getClass().getClassLoader().getResourceAsStream("export-template/科研成果-技术标准.xls");
+		response.setContentType("application/vnd.ms-excel");
+		response.setCharacterEncoding("utf-8");
+		response.addHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode("科研成果-技术标准.xls", Charsets.UTF_8));
+		ExcelWriter excelWriter = EasyExcel.write(response.getOutputStream())
+			.withTemplate((templateFileName))
+			.excelType(ExcelTypeEnum.XLS)
+			.build();
+
+		WriteSheet writeSheet = EasyExcel.writerSheet().build();
+		FillConfig fillConfig = FillConfig.builder().forceNewRow(Boolean.TRUE).build();
+		//设置list集合数据
+		excelWriter.fill(results, fillConfig, writeSheet);
+		excelWriter.finish();
+		if (templateFileName != null) {
+			templateFileName.close();
+		}
+	}
 }

+ 46 - 10
kd-service/kd-scientific/src/main/java/org/sky/scientific/service/impl/CgKylwServiceImpl.java

@@ -1,16 +1,21 @@
 
 package org.sky.scientific.service.impl;
 
-import com.baomidou.mybatisplus.core.conditions.Wrapper;
+import com.alibaba.excel.EasyExcel;
+import com.alibaba.excel.ExcelWriter;
+import com.alibaba.excel.support.ExcelTypeEnum;
+import com.alibaba.excel.write.metadata.WriteSheet;
+import com.alibaba.excel.write.metadata.fill.FillConfig;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import jakarta.annotation.Resource;
+import jakarta.servlet.http.HttpServletResponse;
 import lombok.SneakyThrows;
 import org.sky.core.excel.util.ExcelUtil;
 import org.sky.core.log.exception.ServiceException;
 import org.sky.core.mp.base.BaseServiceImpl;
-import org.sky.core.tool.utils.BeanUtil;
-import org.sky.core.tool.utils.CollectionUtil;
-import org.sky.core.tool.utils.StringUtil;
+import org.sky.core.mp.support.Condition;
+import org.sky.core.mp.support.Query;
+import org.sky.core.tool.utils.*;
 import org.sky.scientific.excel.CgKylwExcel;
 import org.sky.scientific.mapper.CgKylwMapper;
 import org.sky.scientific.mapper.XmMapper;
@@ -22,8 +27,13 @@ import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.web.multipart.MultipartFile;
 
+import java.io.InputStream;
+import java.net.URLEncoder;
+import java.util.ArrayList;
 import java.util.List;
+import java.util.Map;
 import java.util.Objects;
+import java.util.concurrent.atomic.AtomicInteger;
 
 /**
  * 科研成果-科研论文 服务实现类
@@ -37,14 +47,40 @@ public class CgKylwServiceImpl extends BaseServiceImpl<CgKylwMapper, CgKylwEntit
 	@Resource
 	private XmMapper xmMapper;
 
-
+    @SneakyThrows
 	@Override
-	public List<CgKylwExcel> export(Wrapper<CgKylwEntity> queryWrapper) {
-		List<CgKylwExcel> cgKylwList = baseMapper.exportCgKylw(queryWrapper);
-		return cgKylwList;
-	}
+    public void export(HttpServletResponse response, Map<String, Object> cgKylw) {
+		List<CgKylwEntity> list = this.page(Condition.getPage(new Query().setCurrent(1).setSize(Integer.MAX_VALUE)), Condition.getQueryWrapper(cgKylw, CgKylwEntity.class)).getRecords();
+		AtomicInteger index = new AtomicInteger(1);
+		List<CgKylwExcel> results = new ArrayList<>();
+		list.forEach(temp -> {
+			CgKylwExcel excel = BeanUtil.copyProperties(temp, CgKylwExcel.class);
+			assert excel != null;
+			excel.setXh(index.getAndIncrement() + "");
+			excel.setFbrqStr(Func.notNull(temp.getFbrq())?DateUtil.format(temp.getFbrq(), DateUtil.PATTERN_DATE):null);
+			results.add(excel);
+		});
+
+		InputStream templateFileName = this.getClass().getClassLoader().getResourceAsStream("export-template/科研成果-科研论文.xls");
+		response.setContentType("application/vnd.ms-excel");
+		response.setCharacterEncoding("utf-8");
+		response.addHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode("科研成果-科研论文.xls", Charsets.UTF_8));
+		ExcelWriter excelWriter = EasyExcel.write(response.getOutputStream())
+			.withTemplate((templateFileName))
+			.excelType(ExcelTypeEnum.XLS)
+			.build();
+
+		WriteSheet writeSheet = EasyExcel.writerSheet().build();
+		FillConfig fillConfig = FillConfig.builder().forceNewRow(Boolean.TRUE).build();
+		//设置list集合数据
+		excelWriter.fill(results, fillConfig, writeSheet);
+		excelWriter.finish();
+		if (templateFileName != null) {
+			templateFileName.close();
+		}
+     }
 
-	@Transactional
+    @Transactional
 	@SneakyThrows
 	@Override
 	public void importCgKylw(MultipartFile file) {

+ 53 - 21
kd-service/kd-scientific/src/main/java/org/sky/scientific/service/impl/CgQtServiceImpl.java

@@ -1,17 +1,22 @@
 
 package org.sky.scientific.service.impl;
 
-import com.baomidou.mybatisplus.core.conditions.Wrapper;
+import com.alibaba.excel.EasyExcel;
+import com.alibaba.excel.ExcelWriter;
+import com.alibaba.excel.support.ExcelTypeEnum;
+import com.alibaba.excel.write.metadata.WriteSheet;
+import com.alibaba.excel.write.metadata.fill.FillConfig;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import jakarta.annotation.Resource;
+import jakarta.servlet.http.HttpServletResponse;
+import lombok.SneakyThrows;
 import org.sky.core.excel.util.ExcelUtil;
 import org.sky.core.log.exception.ServiceException;
 import org.sky.core.mp.base.BaseServiceImpl;
-import org.sky.core.tool.utils.BeanUtil;
-import org.sky.core.tool.utils.CollectionUtil;
-import org.sky.core.tool.utils.Func;
-import org.sky.core.tool.utils.StringUtil;
+import org.sky.core.mp.support.Condition;
+import org.sky.core.mp.support.Query;
+import org.sky.core.tool.utils.*;
 import org.sky.scientific.excel.CgQtExcel;
 import org.sky.scientific.mapper.CgQtMapper;
 import org.sky.scientific.mapper.XmMapper;
@@ -25,8 +30,12 @@ import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.web.multipart.MultipartFile;
 
+import java.io.InputStream;
+import java.net.URLEncoder;
+import java.util.ArrayList;
 import java.util.List;
 import java.util.Objects;
+import java.util.concurrent.atomic.AtomicInteger;
 
 /**
  * 科研成果-其他成果 服务实现类
@@ -40,16 +49,6 @@ public class CgQtServiceImpl extends BaseServiceImpl<CgQtMapper, CgQtEntity> imp
 	@Resource
 	private XmMapper xmMapper;
 
-
-	@Override
-	public List<CgQtExcel> export(Wrapper<CgQtEntity> queryWrapper) {
-		List<CgQtExcel> cgQtList = baseMapper.exportCgQt(queryWrapper);
-		//cgQtList.forEach(cgQt -> {
-		//	cgQt.setTypeName(DictCache.getValue(DictEnum.YES_NO, CgQt.getType()));
-		//});
-		return cgQtList;
-	}
-
 	@Transactional
 	@Override
 	public void importQt(MultipartFile file) {
@@ -72,7 +71,6 @@ public class CgQtServiceImpl extends BaseServiceImpl<CgQtMapper, CgQtEntity> imp
 
 	@Override
 	public boolean save(CgQtEntity cgQt) {
-
 		return super.save(cgQt);
 	}
 
@@ -92,14 +90,14 @@ public class CgQtServiceImpl extends BaseServiceImpl<CgQtMapper, CgQtEntity> imp
 		return baseMapper.physicalDeleteByIds(ids);
 	}
 
-    @Override
-    public IPage<XmCGSummary> xmCgSummary(IPage<XmCGSummary> page, Long xmId) {
-		if(Func.isNull(xmId)){
+	@Override
+	public IPage<XmCGSummary> xmCgSummary(IPage<XmCGSummary> page, Long xmId) {
+		if (Func.isNull(xmId)) {
 			throw new ServiceException("参数xmId不能为空");
 		}
 		List<XmCGSummary> list = baseMapper.xmCgSummary(page, xmId);
-        return page.setRecords(list);
-    }
+		return page.setRecords(list);
+	}
 
 	@Override
 	public IPage<CgQtVO> selectQtPage(IPage<CgQtVO> page, CgQtDTO dto) {
@@ -107,4 +105,38 @@ public class CgQtServiceImpl extends BaseServiceImpl<CgQtMapper, CgQtEntity> imp
 		return page.setRecords(list);
 	}
 
+	@SneakyThrows
+	@Override
+	public void export(HttpServletResponse response, CgQtDTO dto) {
+		List<CgQtVO> list = this.selectQtPage(Condition.getPage(new Query().setCurrent(1).setSize(Integer.MAX_VALUE)), dto).getRecords();
+		AtomicInteger index = new AtomicInteger(1);
+		List<CgQtExcel> results = new ArrayList<>();
+		list.forEach(temp -> {
+			CgQtExcel excel = BeanUtil.copyProperties(temp, CgQtExcel.class);
+			assert excel != null;
+			excel.setXh(index.getAndIncrement() + "");
+			excel.setShenqingRqStr(Func.notNull(temp.getShenqingRq()) ? DateUtil.format(temp.getShenqingRq(), DateUtil.PATTERN_DATE) : null);
+			excel.setShouquanRqStr(Func.notNull(temp.getShouquanRq()) ? DateUtil.format(temp.getShouquanRq(), DateUtil.PATTERN_DATE) : null);
+			results.add(excel);
+		});
+
+		InputStream templateFileName = this.getClass().getClassLoader().getResourceAsStream("export-template/科研成果-其他成果.xls");
+ 		response.setContentType("application/vnd.ms-excel");
+		response.setCharacterEncoding("utf-8");
+		response.addHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode("科研成果-其他成果.xls", Charsets.UTF_8));
+		ExcelWriter excelWriter = EasyExcel.write(response.getOutputStream())
+			.withTemplate((templateFileName))
+			.excelType(ExcelTypeEnum.XLS)
+			.build();
+
+		WriteSheet writeSheet = EasyExcel.writerSheet().build();
+		FillConfig fillConfig = FillConfig.builder().forceNewRow(Boolean.TRUE).build();
+		//设置list集合数据
+		excelWriter.fill(results, fillConfig, writeSheet);
+		excelWriter.finish();
+		if (templateFileName != null) {
+			templateFileName.close();
+		}
+	}
+
 }

+ 50 - 14
kd-service/kd-scientific/src/main/java/org/sky/scientific/service/impl/CgRjzzqServiceImpl.java

@@ -1,16 +1,22 @@
 
 package org.sky.scientific.service.impl;
 
-import com.baomidou.mybatisplus.core.conditions.Wrapper;
+import com.alibaba.excel.EasyExcel;
+import com.alibaba.excel.ExcelWriter;
+import com.alibaba.excel.support.ExcelTypeEnum;
+import com.alibaba.excel.write.metadata.WriteSheet;
+import com.alibaba.excel.write.metadata.fill.FillConfig;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import jakarta.annotation.Resource;
+import jakarta.servlet.http.HttpServletResponse;
+import lombok.SneakyThrows;
 import org.sky.core.excel.util.ExcelUtil;
 import org.sky.core.log.exception.ServiceException;
 import org.sky.core.mp.base.BaseServiceImpl;
-import org.sky.core.tool.utils.BeanUtil;
-import org.sky.core.tool.utils.CollectionUtil;
-import org.sky.core.tool.utils.StringUtil;
+import org.sky.core.mp.support.Condition;
+import org.sky.core.mp.support.Query;
+import org.sky.core.tool.utils.*;
 import org.sky.scientific.excel.CgRjzzqExcel;
 import org.sky.scientific.mapper.CgRjzzqMapper;
 import org.sky.scientific.mapper.XmMapper;
@@ -23,8 +29,12 @@ import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.web.multipart.MultipartFile;
 
+import java.io.InputStream;
+import java.net.URLEncoder;
+import java.util.ArrayList;
 import java.util.List;
 import java.util.Objects;
+import java.util.concurrent.atomic.AtomicInteger;
 
 /**
  * 科研成果-软件著作 服务实现类
@@ -38,16 +48,7 @@ public class CgRjzzqServiceImpl extends BaseServiceImpl<CgRjzzqMapper, CgRjzzqEn
 	@Resource
 	private XmMapper xmMapper;
 
-	@Override
-	public List<CgRjzzqExcel> export(Wrapper<CgRjzzqEntity> queryWrapper) {
-		List<CgRjzzqExcel> cgRjzzqList = baseMapper.exportCgRjzzq(queryWrapper);
-		//cgRjzzqList.forEach(cgRjzzq -> {
-		//	cgRjzzq.setTypeName(DictCache.getValue(DictEnum.YES_NO, CgRjzzq.getType()));
-		//});
-		return cgRjzzqList;
-	}
-
-	@Transactional
+    @Transactional
     @Override
     public void importRjzzq(MultipartFile file) {
 		List<CgRjzzqExcel> data = ExcelUtil.read(file, 0, 2, CgRjzzqExcel.class);
@@ -94,4 +95,39 @@ public class CgRjzzqServiceImpl extends BaseServiceImpl<CgRjzzqMapper, CgRjzzqEn
 		return baseMapper.selectRjzzqPage(page, dto);
 	}
 
+	@SneakyThrows
+	@Override
+	public void export(HttpServletResponse response, CgRjzzqDTO dto) {
+		List<CgRjzzqVO> list = this.selectRjzzqPage(Condition.getPage(new Query().setCurrent(1).setSize(Integer.MAX_VALUE)), dto).getRecords();
+		AtomicInteger index = new AtomicInteger(1);
+		List<CgRjzzqExcel> results = new ArrayList<>();
+		list.forEach(temp -> {
+			CgRjzzqExcel excel = BeanUtil.copyProperties(temp, CgRjzzqExcel.class);
+			assert excel != null;
+			excel.setXh(index.getAndIncrement() + "");
+			excel.setKfwcrqStr(Func.notNull(temp.getKfwcrq())?DateUtil.format(temp.getKfwcrq(), DateUtil.PATTERN_DATE):null);
+			excel.setScfbrqStr(Func.notNull(temp.getScfbrq())?DateUtil.format(temp.getScfbrq(), DateUtil.PATTERN_DATE):null);
+			excel.setDjpzrqStr(Func.notNull(temp.getDjpzrq())?DateUtil.format(temp.getDjpzrq(), DateUtil.PATTERN_DATE):null);
+			results.add(excel);
+		});
+
+		InputStream templateFileName = this.getClass().getClassLoader().getResourceAsStream("export-template/科研成果-软件著作.xls");
+ 		response.setContentType("application/vnd.ms-excel");
+		response.setCharacterEncoding("utf-8");
+		response.addHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode("科研成果-软件著作.xls", Charsets.UTF_8));
+		ExcelWriter excelWriter = EasyExcel.write(response.getOutputStream())
+			.withTemplate((templateFileName))
+			.excelType(ExcelTypeEnum.XLS)
+			.build();
+
+		WriteSheet writeSheet = EasyExcel.writerSheet().build();
+		FillConfig fillConfig = FillConfig.builder().forceNewRow(Boolean.TRUE).build();
+		//设置list集合数据
+		excelWriter.fill(results, fillConfig, writeSheet);
+		excelWriter.finish();
+		if (templateFileName != null) {
+			templateFileName.close();
+		}
+	}
+
 }

+ 49 - 13
kd-service/kd-scientific/src/main/java/org/sky/scientific/service/impl/CgZlServiceImpl.java

@@ -1,15 +1,21 @@
 
 package org.sky.scientific.service.impl;
 
-import com.baomidou.mybatisplus.core.conditions.Wrapper;
+import com.alibaba.excel.EasyExcel;
+import com.alibaba.excel.ExcelWriter;
+import com.alibaba.excel.support.ExcelTypeEnum;
+import com.alibaba.excel.write.metadata.WriteSheet;
+import com.alibaba.excel.write.metadata.fill.FillConfig;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import jakarta.annotation.Resource;
+import jakarta.servlet.http.HttpServletResponse;
+import lombok.SneakyThrows;
 import org.sky.core.excel.util.ExcelUtil;
 import org.sky.core.log.exception.ServiceException;
 import org.sky.core.mp.base.BaseServiceImpl;
-import org.sky.core.tool.utils.BeanUtil;
-import org.sky.core.tool.utils.CollectionUtil;
-import org.sky.core.tool.utils.StringUtil;
+import org.sky.core.mp.support.Condition;
+import org.sky.core.mp.support.Query;
+import org.sky.core.tool.utils.*;
 import org.sky.scientific.excel.CgZlExcel;
 import org.sky.scientific.mapper.CgZlMapper;
 import org.sky.scientific.mapper.XmMapper;
@@ -21,8 +27,13 @@ import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.web.multipart.MultipartFile;
 
+import java.io.InputStream;
+import java.net.URLEncoder;
+import java.util.ArrayList;
 import java.util.List;
+import java.util.Map;
 import java.util.Objects;
+import java.util.concurrent.atomic.AtomicInteger;
 
 /**
  * 科研成果-专利 服务实现类
@@ -36,15 +47,6 @@ public class CgZlServiceImpl extends BaseServiceImpl<CgZlMapper, CgZlEntity> imp
 	@Resource
 	private XmMapper xmMapper;
 
-	@Override
-	public List<CgZlExcel> export(Wrapper<CgZlEntity> queryWrapper) {
-		List<CgZlExcel> cgZlList = baseMapper.exportCgZl(queryWrapper);
-		//cgZlList.forEach(cgZl -> {
-		//	cgZl.setTypeName(DictCache.getValue(DictEnum.YES_NO, CgZl.getType()));
-		//});
-		return cgZlList;
-	}
-
 	@Transactional
 	@Override
 	public void importZl(MultipartFile file) {
@@ -86,4 +88,38 @@ public class CgZlServiceImpl extends BaseServiceImpl<CgZlMapper, CgZlEntity> imp
 		return baseMapper.physicalDeleteByIds(ids);
 	}
 
+	@SneakyThrows
+	@Override
+	public void exportZl(HttpServletResponse response, Map<String, Object> cgZl) {
+		List<CgZlEntity> list = this.page(Condition.getPage(new Query().setCurrent(1).setSize(Integer.MAX_VALUE)), Condition.getQueryWrapper(cgZl, CgZlEntity.class)).getRecords();
+		AtomicInteger index = new AtomicInteger(1);
+		List<CgZlExcel> results = new ArrayList<>();
+		list.forEach(temp -> {
+			CgZlExcel excel = BeanUtil.copyProperties(temp, CgZlExcel.class);
+			assert excel != null;
+			excel.setXh(index.getAndIncrement() + "");
+			excel.setShenqingRqStr(Func.notNull(temp.getShenqingRq())?DateUtil.format(temp.getShenqingRq(), DateUtil.PATTERN_DATE):null);
+			excel.setShouquanRqStr(Func.notNull(temp.getShouquanRq())?DateUtil.format(temp.getShouquanRq(), DateUtil.PATTERN_DATE):null);
+			results.add(excel);
+		});
+
+		InputStream templateFileName = this.getClass().getClassLoader().getResourceAsStream("export-template/科研成果-专利成果.xls");
+ 		response.setContentType("application/vnd.ms-excel");
+		response.setCharacterEncoding("utf-8");
+		response.addHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode("科研成果-专利成果.xls", Charsets.UTF_8));
+		ExcelWriter excelWriter = EasyExcel.write(response.getOutputStream())
+			.withTemplate((templateFileName))
+			.excelType(ExcelTypeEnum.XLS)
+			.build();
+
+		WriteSheet writeSheet = EasyExcel.writerSheet().build();
+		FillConfig fillConfig = FillConfig.builder().forceNewRow(Boolean.TRUE).build();
+		//设置list集合数据
+		excelWriter.fill(results, fillConfig, writeSheet);
+		excelWriter.finish();
+		if (templateFileName != null) {
+			templateFileName.close();
+		}
+	}
+
 }

+ 323 - 18
kd-service/kd-scientific/src/main/java/org/sky/scientific/service/impl/EnterpriseInfoServiceImpl.java

@@ -1,6 +1,8 @@
 
 package org.sky.scientific.service.impl;
 
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
@@ -13,17 +15,17 @@ import org.sky.core.secure.utils.SecureUtil;
 import org.sky.core.tool.utils.DateUtil;
 import org.sky.core.tool.utils.Func;
 import org.sky.scientific.mapper.*;
-import org.sky.scientific.pojo.dto.CostSummaryDTO;
-import org.sky.scientific.pojo.dto.TechnicianDTO;
-import org.sky.scientific.pojo.dto.XmAssetQueryParam;
+import org.sky.scientific.pojo.dto.*;
 import org.sky.scientific.pojo.entity.*;
 import org.sky.scientific.pojo.vo.*;
 import org.sky.scientific.service.IEnterpriseInfoService;
+import org.sky.scientific.service.IXmCostDetailsService;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
 import java.math.BigDecimal;
 import java.math.RoundingMode;
+import java.util.Arrays;
 import java.util.Date;
 import java.util.List;
 
@@ -51,6 +53,10 @@ public class EnterpriseInfoServiceImpl extends BaseServiceImpl<EnterpriseInfoMap
 	private final CgRjzzqMapper rjzzqMapper;
 	private final CgQtMapper qtMapper;
 	private final ArchiveAttachMapper attachMapper;
+	private final XmWwxmCostMapper wwxmCostMapper;
+	private final IXmCostDetailsService xmCostDetailsService;
+	private final EnterpriseInfoMapper enterpriseInfoMapper;
+	private final XmMapper xmMapper;
 
 	@Override
 	@Transactional
@@ -96,7 +102,7 @@ public class EnterpriseInfoServiceImpl extends BaseServiceImpl<EnterpriseInfoMap
 
 		if (Func.isNull(one)) {
 			//新增
- 			result = this.save(enterpriseInfo);
+			result = this.save(enterpriseInfo);
 		} else {
 			//修改
 			enterpriseInfo.setId(one.getId());
@@ -114,6 +120,35 @@ public class EnterpriseInfoServiceImpl extends BaseServiceImpl<EnterpriseInfoMap
 			throw new ServiceException("参数year为年份,如2025");
 		}
 		List<A107_1VO> list = a107_1Mapper.qyyjkfxmqk(year, SecureUtil.getTenantId());
+		for (A107_1VO vo : list) {
+
+//			TODO 项目人员实际工作时间(人月)
+
+			//当列15等于基础研究时,列14=P088中对应研发项目的受托方类型的前5项的委外金额合计。当列15不等于基础研究时,列14等于0
+			if (Func.equals(vo.getYjlx(), "基础研究")) {
+				//对应研发项目的受托方类型的前5项的委外金额合计
+				vo.setWwfy(wwxmCostMapper.getAmountByXmAndYear(year, vo.getXmId()));
+
+				XmCostDetailsDTO dto = new XmCostDetailsDTO();
+				dto.setXmId(vo.getXmId());
+				dto.setYearAndMonth(year + "12");
+				List<FinanceCostSummary> summaryList = xmCostDetailsService.financeCostSummary(Condition.getPage(new Query().setCurrent(1).setSize(1)), dto).getRecords();
+				if (Func.isEmpty(summaryList)) {
+					vo.setCost(BigDecimal.ZERO);
+					vo.setCost1(BigDecimal.ZERO);
+				} else {
+					FinanceCostSummary summary = summaryList.get(0);
+					vo.setCost(summary.getTotal());
+					vo.setCost1(summary.getTotal());
+				}
+			} else {
+				vo.setCost(BigDecimal.ZERO);
+				vo.setCost1(BigDecimal.ZERO);
+				vo.setWwfy(BigDecimal.ZERO);
+			}
+			//其中:企业自主开展=用于科学原理的探索发现的经费总额-委托外单位开展
+			vo.setCost2(vo.getCost1().subtract(vo.getWwfy()));
+		}
 		return list;
 	}
 
@@ -168,10 +203,7 @@ public class EnterpriseInfoServiceImpl extends BaseServiceImpl<EnterpriseInfoMap
 		}
 
 		//一、研究开发人员情况
-		Query query = new Query();
-		query.setCurrent(1);
-		query.setSize(Integer.MAX_VALUE);
-		IPage<TechnicianVO> page = Condition.getPage(query);
+		IPage<TechnicianVO> page = Condition.getPage(new Query().setCurrent(1).setSize(Integer.MAX_VALUE));
 		TechnicianDTO dto = new TechnicianDTO();
 		dto.setYearAndMonth(year);
 		dto.setTenantId(SecureUtil.getTenantId());
@@ -199,11 +231,8 @@ public class EnterpriseInfoServiceImpl extends BaseServiceImpl<EnterpriseInfoMap
 		costSummaryDTO.setTenantId(SecureUtil.getTenantId());
 		List<CostSummaryVO> list = assetMapper.costSummary(costSummaryDTO);
 		for (CostSummaryVO costSummaryVO : list) {
-
 			costSummaryVO.setWwfyAdjust(costSummaryVO.getWwfy().multiply(new BigDecimal("0.8")).setScale(2, RoundingMode.HALF_UP));
-
 			costSummaryVO.setTotal(costSummaryVO.getRyrgfy().add(costSummaryVO.getZjtrfy()).add(costSummaryVO.getZjfyycqdtfy()).add(costSummaryVO.getSjfy()).add(costSummaryVO.getWxzctxfy()).add(costSummaryVO.getZbtsfyysyfy()).add(costSummaryVO.getQtfy()).add(costSummaryVO.getWwfyAdjust()).setScale(2, RoundingMode.HALF_UP));
-
 			vo.setD8(vo.getD8().add(costSummaryVO.getRyrgfy()));
 			vo.setD9(vo.getD9().add(costSummaryVO.getZjtrfy()));
 			vo.setD10(vo.getD10().add(costSummaryVO.getZjfyycqdtfy()));
@@ -211,25 +240,64 @@ public class EnterpriseInfoServiceImpl extends BaseServiceImpl<EnterpriseInfoMap
 			vo.setD12(vo.getD12().add(costSummaryVO.getSjfy()));
 			vo.setD13(vo.getD13().add(costSummaryVO.getZbtsfyysyfy()));
 			vo.setD14(vo.getD14().add(costSummaryVO.getWwfy()));
+			vo.setD19(vo.getD19().add(costSummaryVO.getQtfy()));
 		}
 
 		//换算成千元
+		//1.人员人工费用
 		vo.setD8(vo.getD8().multiply(new BigDecimal("0.001")).setScale(2, RoundingMode.HALF_UP));
+		//2.直接投入费用
 		vo.setD9(vo.getD9().multiply(new BigDecimal("0.001")).setScale(2, RoundingMode.HALF_UP));
+		//3.折旧费用与长期待摊费用
 		vo.setD10(vo.getD10().multiply(new BigDecimal("0.001")).setScale(2, RoundingMode.HALF_UP));
+		//4.无形资产摊销费用
 		vo.setD11(vo.getD11().multiply(new BigDecimal("0.001")).setScale(2, RoundingMode.HALF_UP));
+		//5.设计费用
 		vo.setD12(vo.getD12().multiply(new BigDecimal("0.001")).setScale(2, RoundingMode.HALF_UP));
+		//6.装备调试费用与试验费用
 		vo.setD13(vo.getD13().multiply(new BigDecimal("0.001")).setScale(2, RoundingMode.HALF_UP));
+		//7.委托外部研究开发费用
 		vo.setD14(vo.getD14().multiply(new BigDecimal("0.001")).setScale(2, RoundingMode.HALF_UP));
-
+		//8.其他费用
+		vo.setD19(vo.getD19().multiply(new BigDecimal("0.001")).setScale(2, RoundingMode.HALF_UP));
+
+		XmWwxmCostQuery wwxmCostQuery = new XmWwxmCostQuery();
+		wwxmCostQuery.setYearAndMonth(year);
+		List<XmWwxmCostVO> wwxmCostVOList = wwxmCostMapper.selectPageByYear(Condition.getPage(new Query().setCurrent(1).setSize(Integer.MAX_VALUE)), wwxmCostQuery);
+
+		//①委托境内研究机构
+		BigDecimal d15 = wwxmCostVOList.stream().filter(item -> Func.equals(item.getStflx(), "境内研究机构")).map(XmWwxmCostVO::getPayAmount).reduce(BigDecimal::add).orElse(BigDecimal.ZERO);
+		vo.setD15(d15.multiply(new BigDecimal("0.001")).setScale(2, RoundingMode.HALF_UP));
+		//②委托境内高等学校
+		BigDecimal d16 = wwxmCostVOList.stream().filter(item -> Func.equals(item.getStflx(), "境内高等学校")).map(XmWwxmCostVO::getPayAmount).reduce(BigDecimal::add).orElse(BigDecimal.ZERO);
+		vo.setD16(d16.multiply(new BigDecimal("0.001")).setScale(2, RoundingMode.HALF_UP));
+		//③委托境内企业
+		BigDecimal d17 = wwxmCostVOList.stream().filter(item -> Func.equals(item.getStflx(), "境内企业")).map(XmWwxmCostVO::getPayAmount).reduce(BigDecimal::add).orElse(BigDecimal.ZERO);
+		vo.setD17(d17.multiply(new BigDecimal("0.001")).setScale(2, RoundingMode.HALF_UP));
+		//④委托境外机构
+		BigDecimal d18 = wwxmCostVOList.stream().filter(item -> Func.equals(item.getStflx(), "境外机构")).map(XmWwxmCostVO::getPayAmount).reduce(BigDecimal::add).orElse(BigDecimal.ZERO);
+		vo.setD18(d18.multiply(new BigDecimal("0.001")).setScale(2, RoundingMode.HALF_UP));
+
+		// todo 三、研究开发资产情况
+		// d20 当年形成用于研发开发的固定资产
+
+		// d21 其中:仪器和设备
+
+		//四、研究开发支出资金来源
+		//2.来自政府部门
 		List<A107_1> d43List = a107_1Mapper.selectList(Wrappers.<A107_1>lambdaQuery().eq(A107_1::getYearAndMonth, year));
 		for (A107_1 a1071 : d43List) {
 			vo.setD43(vo.getD43().add(a1071.getGovBonus()));
 		}
 		vo.setD43(vo.getD43().setScale(2, RoundingMode.HALF_UP));
 
+		//五、相关政策落实情况
+		//申报加计扣除减免税的研究开发支出
+		//加计扣除减免税金额
 
-		IPage<XmFixedAsset> p2 = Condition.getPage(query);
+		//六、企业办研究开发机构 (境内)情况
+		// d27 :期末仪器和设备原价
+		IPage<XmFixedAsset> p2 = Condition.getPage(new Query().setCurrent(1).setSize(Integer.MAX_VALUE));
 		XmAssetQueryParam param = new XmAssetQueryParam();
 		param.setYearAndMonth(year + "12");
 		List<XmFixedAsset> yiqishebeiList = fixedAssetMapper.selectXmFixedAssetPageByYearAndMonth(p2, param, "仪器设备");
@@ -263,7 +331,6 @@ public class EnterpriseInfoServiceImpl extends BaseServiceImpl<EnterpriseInfoMap
 		vo.setD32(d32);
 		vo.setD33(vo.getD32());
 
-
 		Long d40 = kylwMapper.selectCount(Wrappers.<CgKylwEntity>lambdaQuery().between(CgKylwEntity::getFbrq, dateMin, dateMax));
 		vo.setD40(Func.toInt(d40, 0));
 
@@ -273,6 +340,22 @@ public class EnterpriseInfoServiceImpl extends BaseServiceImpl<EnterpriseInfoMap
 			.in(CgJsbzEntity::getBzlb, List.of("国家标准", "行业标准")));
 		vo.setD41(Func.toInt(d41, 0));
 
+		//八、其他相关情况
+		//当年企业研发准备金合计
+		List<XmEntity> xmList = xmMapper.selectList(Wrappers.emptyWrapper());
+		BigDecimal d59 = BigDecimal.ZERO;
+		for (XmEntity xm : xmList) {
+			String xmyszemx = xm.getXmyszemx();
+			if (Func.notNull(xmyszemx)) {
+				List<JSONObject> array = JSON.parseArray(xmyszemx, JSONObject.class);
+				double sum = array.stream().filter(item -> item.getInteger("year") == Integer.parseInt(year)).mapToDouble(item -> item.getDouble("amount")).sum();
+				System.out.println("sum:"+sum);
+				vo.setD59(vo.getD59().add(BigDecimal.valueOf(sum)));
+				System.out.println("d59:"+vo.getD59());
+			}
+		}
+		//预算的单位是万,这里要显示千元,故乘以10即可,即1万=10千元
+		vo.setD59(vo.getD59().multiply(new BigDecimal("10")).setScale(2, RoundingMode.HALF_UP));
 
 		return vo;
 	}
@@ -308,7 +391,6 @@ public class EnterpriseInfoServiceImpl extends BaseServiceImpl<EnterpriseInfoMap
 			d46 = one.getD46();
 			d48 = one.getD48();
 			d49 = one.getD49();
-
 		}
 		vo.setD43(d43);
 		vo.setD44(d44);
@@ -316,6 +398,66 @@ public class EnterpriseInfoServiceImpl extends BaseServiceImpl<EnterpriseInfoMap
 		vo.setD48(d48);
 		vo.setD49(d49);
 
+		XmCostDetailsDTO costDetailsDTO = new XmCostDetailsDTO();
+		costDetailsDTO.setYearAndMonth(year + "12");
+		DeductionCostSummary summary = xmCostDetailsService.deductionCostSummary(costDetailsDTO);
+
+		vo.setD1(Func.isNull(summary) ? 0 : (int) summary.getItemList().stream().map(DeductionCostSummaryItem::getXmId).distinct().count());
+		//(一)人员人工费用(4+5+6)
+		vo.setD3(Func.isNull(summary) ? BigDecimal.ZERO : summary.getRyrgfy_hjje());
+		//(二)直接投入费用(8+9+10+11+12+13+14+15)
+		vo.setD7(Func.isNull(summary) ? BigDecimal.ZERO : summary.getZjtrfy_hjje());
+		//(三)折旧费用(17+18)
+		vo.setD16(Func.isNull(summary) ? BigDecimal.ZERO : summary.getZjfy_hjje());
+		//(四)无形资产摊销(20+21+22)
+		vo.setD19(Func.isNull(summary) ? BigDecimal.ZERO : summary.getWxzctx_hjje());
+		//(五)新产品设计费
+		vo.setD23(Func.isNull(summary) ? BigDecimal.ZERO : summary.getXcpsjfd_hjje());
+		//(六)其他相关费用
+		vo.setD28(Func.isNull(summary) ? BigDecimal.ZERO : summary.getQtxgfyhj_hjje());
+		//(七)经限额调整后的其他相关费用
+		vo.setD34(Func.isNull(summary) ? BigDecimal.ZERO : summary.getQtxgfyhj_adjust_hjje());
+
+		//一、自主研发、合作研发、集中研发(3+7+16+19+23+34)
+		vo.setD2(vo.getD3().add(vo.getD7()).add(vo.getD16()).add(vo.getD19()).add(vo.getD23()).add(vo.getD28()).add(vo.getD34()));
+
+		//二、委托研发(36+37+39)
+		//(一)委托境内机构或个人进行研发活动所发生的费用
+		vo.setD36(Func.isNull(summary) ? BigDecimal.ZERO : summary.getWtjnjgfy_hjje());
+		//(二)委托境外机构进行研发活动发生的费用
+		vo.setD37(Func.isNull(summary) ? BigDecimal.ZERO : summary.getWtjwjgfy_hjje());
+		//其中:允许加计扣除的委托境外机构进行研发活动发生的费用
+		vo.setD38(Func.isNull(summary) ? BigDecimal.ZERO : summary.getWtjwjgfy_adjust_hjje());
+		//(三)委托境外个人进行研发活动发生的费用
+		XmWwxmCostQuery wwxmCostQuery = new XmWwxmCostQuery();
+		wwxmCostQuery.setYearAndMonth(year);
+		List<XmWwxmCostVO> wwxmCostVOList1 = wwxmCostMapper.selectPageByYear(Condition.getPage(new Query().setCurrent(1).setSize(Integer.MAX_VALUE)), wwxmCostQuery);
+		vo.setD39(wwxmCostVOList1.stream().filter(t -> "境外个人".equalsIgnoreCase(t.getStflx())).map(XmWwxmCostVO::getPayAmount).reduce(BigDecimal.ZERO, BigDecimal::add));
+		vo.setD35(vo.getD36().add(vo.getD37()).add(vo.getD39()));
+
+		//三、年度研发费用小计(2+36×80%+38)
+		//(一)本年费用化金额
+		vo.setD41(Func.isNull(summary) ? BigDecimal.ZERO : summary.getTotal_fyh());
+		//(二)本年资本化金额
+		vo.setD42(Func.isNull(summary) ? BigDecimal.ZERO : summary.getTotal_zbh());
+
+		//一、自主研发、合作研发、集中研发(3+7+16+19+23+34)
+		vo.setD2(vo.getD3().add(vo.getD7()).add(vo.getD16()).add(vo.getD19()).add(vo.getD23()).add(vo.getD34()));
+
+		//三、年度研发费用小计(2+36×80%+38)
+		vo.setD40(vo.getD2().add(vo.getD36().multiply(new BigDecimal("0.8"))).add(vo.getD38()));
+
+		//六、允许扣除的研发费用合计(41+43+44)
+		vo.setD45(vo.getD41().add(vo.getD43()).add(vo.getD44()));
+
+		//七、允许扣除的研发费用抵减特殊收入后的金额(45-46)
+		vo.setD47(vo.getD45().subtract(vo.getD46()));
+
+		//九、本年研发费用加计扣除总额(47-48-49)×50,50为固定的100%
+		vo.setD51((vo.getD47().subtract(vo.getD48()).subtract(vo.getD49())));
+
+		//十、销售研发活动直接形成产品(包括组成部分)对应材料部分转移以后年度扣减金额(当47-48-49≥0,本行=0;当47-48-49<0,本行=47-48-49的绝对值)
+		vo.setD52(vo.getD51().compareTo(BigDecimal.ZERO) > 0 ? BigDecimal.ZERO : vo.getD51().abs());
 		return vo;
 	}
 
@@ -343,6 +485,16 @@ public class EnterpriseInfoServiceImpl extends BaseServiceImpl<EnterpriseInfoMap
 
 		A107041VO vo = new A107041VO();
 
+		//国家重点支持的高新技术领域
+		EnterpriseInfoEntity enterpriseInfo = enterpriseInfoMapper.selectOne(Wrappers.<EnterpriseInfoEntity>lambdaQuery()
+			.eq(EnterpriseInfoEntity::getYearAndMonth, year)
+			.eq(EnterpriseInfoEntity::getTenantId, SecureUtil.getTenantId()));
+		if (Func.notNull(enterpriseInfo)) {
+			vo.setD1(enterpriseInfo.getHighTechDomainL1());
+			vo.setD2(enterpriseInfo.getHighTechDomainL2());
+			vo.setD3(enterpriseInfo.getHighTechDomainL3());
+		}
+
 		A107041 one = a107041Mapper.selectOne(Wrappers.<A107041>lambdaQuery().eq(A107041::getYearAndMonth, year));
 
 		BigDecimal d5 = new BigDecimal("0.00"), d6 = new BigDecimal("0.00"), d8 = new BigDecimal("0.00"), d9 = new BigDecimal("0.00");
@@ -355,14 +507,167 @@ public class EnterpriseInfoServiceImpl extends BaseServiceImpl<EnterpriseInfoMap
 			d8 = one.getD8();
 			d9 = one.getD9();
 			d12 = one.getD12();
-			d29_1 = one.getD29_1();
-			d29_2 = one.getD29_2();
-			d29_3 = one.getD29_3();
+			d29_1 = one.getD2901();
+			d29_2 = one.getD2902();
+			d29_3 = one.getD2903();
 			d31 = one.getD31();
 			d32 = one.getD32();
 		}
 
+		vo.setD5(d5);
+		vo.setD6(d6);
+		vo.setD4(vo.getD5().add(vo.getD6()));
+		vo.setD8(d8);
+		vo.setD9(d9);
+		vo.setD7(vo.getD6().subtract(vo.getD9()));
 
+		vo.setD10(vo.getD7().doubleValue() == 0 ? BigDecimal.ZERO : vo.getD4().divide(vo.getD7()));
+
+		//四、本年科技人员数
+		IPage<TechnicianVO> page = Condition.getPage(new Query().setCurrent(1).setSize(Integer.MAX_VALUE));
+		TechnicianDTO dto = new TechnicianDTO();
+		dto.setYearAndMonth(year);
+		dto.setTenantId(SecureUtil.getTenantId());
+		List<TechnicianVO> technicianVOList = technicianMapper.niandugaokejirenyuanhuizongbiao(page, dto);
+		vo.setD11(Func.isEmpty(technicianVOList) ? 0 : technicianVOList.size());
+		//五、本年职工总数
+		vo.setD12(d12);
+		//六、本年科技人员占企业当年职工总数的比例(11÷12)
+		vo.setD13(vo.getD12() == 0 ? BigDecimal.ZERO : BigDecimal.valueOf((vo.getD11() * 1.0) / vo.getD12()));
+
+		XmCostDetailsDTO xmCostDetailsDTO = new XmCostDetailsDTO();
+		xmCostDetailsDTO.setYearAndMonth(year + "12");
+		List<HighTechCostSummary> summaryList1 = xmCostDetailsService.highTechCostSummary(Condition.getPage(new Query().setCurrent(1).setSize(Integer.MAX_VALUE)), xmCostDetailsDTO).getRecords();
+
+		xmCostDetailsDTO = new XmCostDetailsDTO();
+		xmCostDetailsDTO.setYearAndMonth(Integer.parseInt(year) - 1 + "12");
+		List<HighTechCostSummary> summaryList2 = xmCostDetailsService.highTechCostSummary(Condition.getPage(new Query().setCurrent(1).setSize(Integer.MAX_VALUE)), xmCostDetailsDTO).getRecords();
+
+		xmCostDetailsDTO = new XmCostDetailsDTO();
+		xmCostDetailsDTO.setYearAndMonth(Integer.parseInt(year) - 2 + "12");
+		List<HighTechCostSummary> summaryList3 = xmCostDetailsService.highTechCostSummary(Condition.getPage(new Query().setCurrent(1).setSize(Integer.MAX_VALUE)), xmCostDetailsDTO).getRecords();
+
+		//七、归集的高新研发费用金额(16+25)
+		//一)内部研究开发投入
+		//1.人员人工费用
+		vo.setD17_1(summaryList1.stream().map(HighTechCostSummary::getRyrgTotal).reduce(BigDecimal.ZERO, BigDecimal::add));
+		vo.setD17_2(summaryList2.stream().map(HighTechCostSummary::getRyrgTotal).reduce(BigDecimal.ZERO, BigDecimal::add));
+		vo.setD17_3(summaryList3.stream().map(HighTechCostSummary::getRyrgTotal).reduce(BigDecimal.ZERO, BigDecimal::add));
+		vo.setD17_4(vo.getD17_1().add(vo.getD17_2()).add(vo.getD17_3()));
+
+		//2.直接投入费用
+		vo.setD18_1(summaryList1.stream().map(HighTechCostSummary::getZjtrTotal).reduce(BigDecimal.ZERO, BigDecimal::add));
+		vo.setD18_2(summaryList2.stream().map(HighTechCostSummary::getZjtrTotal).reduce(BigDecimal.ZERO, BigDecimal::add));
+		vo.setD18_3(summaryList3.stream().map(HighTechCostSummary::getZjtrTotal).reduce(BigDecimal.ZERO, BigDecimal::add));
+		vo.setD18_4(vo.getD18_1().add(vo.getD18_2()).add(vo.getD18_3()));
+
+		//3.折旧费用与长期待摊费用
+		vo.setD19_1(summaryList1.stream().map(HighTechCostSummary::getZjfyycqdtfyTotal).reduce(BigDecimal.ZERO, BigDecimal::add));
+		vo.setD19_2(summaryList2.stream().map(HighTechCostSummary::getZjfyycqdtfyTotal).reduce(BigDecimal.ZERO, BigDecimal::add));
+		vo.setD19_3(summaryList3.stream().map(HighTechCostSummary::getZjfyycqdtfyTotal).reduce(BigDecimal.ZERO, BigDecimal::add));
+		vo.setD19_4(vo.getD19_1().add(vo.getD19_2()).add(vo.getD19_3()));
+
+		//4.无形资产摊销费用
+		vo.setD20_1(summaryList1.stream().map(HighTechCostSummary::getWxzctxTotal).reduce(BigDecimal.ZERO, BigDecimal::add));
+		vo.setD20_2(summaryList2.stream().map(HighTechCostSummary::getWxzctxTotal).reduce(BigDecimal.ZERO, BigDecimal::add));
+		vo.setD20_3(summaryList3.stream().map(HighTechCostSummary::getWxzctxTotal).reduce(BigDecimal.ZERO, BigDecimal::add));
+		vo.setD20_4(vo.getD20_1().add(vo.getD20_2()).add(vo.getD20_3()));
+
+		//5.设计费用
+		vo.setD21_1(summaryList1.stream().map(HighTechCostSummary::getSjfTotal).reduce(BigDecimal.ZERO, BigDecimal::add));
+		vo.setD21_2(summaryList2.stream().map(HighTechCostSummary::getSjfTotal).reduce(BigDecimal.ZERO, BigDecimal::add));
+		vo.setD21_3(summaryList3.stream().map(HighTechCostSummary::getSjfTotal).reduce(BigDecimal.ZERO, BigDecimal::add));
+		vo.setD21_4(vo.getD21_1().add(vo.getD21_2()).add(vo.getD21_3()));
+
+		//6.设备调试费与实验费用
+		vo.setD22_1(summaryList1.stream().map(HighTechCostSummary::getZbtsfyysyfyTotal).reduce(BigDecimal.ZERO, BigDecimal::add));
+		vo.setD22_2(summaryList2.stream().map(HighTechCostSummary::getZbtsfyysyfyTotal).reduce(BigDecimal.ZERO, BigDecimal::add));
+		vo.setD22_3(summaryList3.stream().map(HighTechCostSummary::getZbtsfyysyfyTotal).reduce(BigDecimal.ZERO, BigDecimal::add));
+		vo.setD22_4(vo.getD22_1().add(vo.getD22_2()).add(vo.getD22_3()));
+
+		//7.其他费用
+		vo.setD23_1(summaryList1.stream().map(HighTechCostSummary::getQtfyTotal).reduce(BigDecimal.ZERO, BigDecimal::add));
+		vo.setD23_2(summaryList2.stream().map(HighTechCostSummary::getQtfyTotal).reduce(BigDecimal.ZERO, BigDecimal::add));
+		vo.setD23_3(summaryList3.stream().map(HighTechCostSummary::getQtfyTotal).reduce(BigDecimal.ZERO, BigDecimal::add));
+		vo.setD23_4(vo.getD23_1().add(vo.getD23_2()).add(vo.getD23_3()));
+
+		//其中:可计入研发费用的其他费用
+
+		vo.setD24_1(summaryList1.stream().map(HighTechCostSummary::getQtfyAdjust).reduce(BigDecimal.ZERO, BigDecimal::add));
+		vo.setD24_2(summaryList2.stream().map(HighTechCostSummary::getQtfyAdjust).reduce(BigDecimal.ZERO, BigDecimal::add));
+		vo.setD24_3(summaryList3.stream().map(HighTechCostSummary::getQtfyAdjust).reduce(BigDecimal.ZERO, BigDecimal::add));
+		vo.setD24_4(vo.getD24_1().add(vo.getD24_2()).add(vo.getD24_3()));
+
+		XmWwxmCostQuery wwxmCostQuery = new XmWwxmCostQuery();
+		wwxmCostQuery.setYearAndMonth(year);
+		List<XmWwxmCostVO> wwxmCostVOList1 = wwxmCostMapper.selectPageByYear(Condition.getPage(new Query().setCurrent(1).setSize(Integer.MAX_VALUE)), wwxmCostQuery);
+
+		wwxmCostQuery = new XmWwxmCostQuery();
+		wwxmCostQuery.setYearAndMonth(Integer.parseInt(year) - 1 + "12");
+		List<XmWwxmCostVO> wwxmCostVOList2 = wwxmCostMapper.selectPageByYear(Condition.getPage(new Query().setCurrent(1).setSize(Integer.MAX_VALUE)), wwxmCostQuery);
+
+		wwxmCostQuery = new XmWwxmCostQuery();
+		wwxmCostQuery.setYearAndMonth(Integer.parseInt(year) - 2 + "12");
+		List<XmWwxmCostVO> wwxmCostVOList3 = wwxmCostMapper.selectPageByYear(Condition.getPage(new Query().setCurrent(1).setSize(Integer.MAX_VALUE)), wwxmCostQuery);
+
+		//二)委托外部研发费用【(26+28)×80%】
+		//1.境内的外部研发费
+		BigDecimal d26_1 = wwxmCostVOList1.stream().filter(t -> Arrays.asList("境内研究机构", "境内高等学校", "境内企业", "境内个人").contains(t.getStflx())).map(XmWwxmCostVO::getPayAmount).reduce(BigDecimal.ZERO, BigDecimal::add);
+		vo.setD26_1(d26_1);
+		BigDecimal d26_2 = wwxmCostVOList2.stream().filter(t -> Arrays.asList("境内研究机构", "境内高等学校", "境内企业", "境内个人").contains(t.getStflx())).map(XmWwxmCostVO::getPayAmount).reduce(BigDecimal.ZERO, BigDecimal::add);
+		vo.setD26_2(d26_2);
+		BigDecimal d26_3 = wwxmCostVOList3.stream().filter(t -> Arrays.asList("境内研究机构", "境内高等学校", "境内企业", "境内个人").contains(t.getStflx())).map(XmWwxmCostVO::getPayAmount).reduce(BigDecimal.ZERO, BigDecimal::add);
+		vo.setD26_3(d26_3);
+		vo.setD26_4(vo.getD26_1().add(vo.getD26_2()).add(vo.getD26_3()));
+		//2.境外的外部研发费
+		BigDecimal d27_1 = wwxmCostVOList1.stream().filter(t -> Arrays.asList("境外机构", "境外个人").contains(t.getStflx())).map(XmWwxmCostVO::getPayAmount).reduce(BigDecimal.ZERO, BigDecimal::add);
+		vo.setD27_1(d27_1);
+		BigDecimal d27_2 = wwxmCostVOList2.stream().filter(t -> Arrays.asList("境外机构", "境外个人").contains(t.getStflx())).map(XmWwxmCostVO::getPayAmount).reduce(BigDecimal.ZERO, BigDecimal::add);
+		vo.setD27_2(d27_2);
+		BigDecimal d27_3 = wwxmCostVOList3.stream().filter(t -> Arrays.asList("境外机构", "境外个人").contains(t.getStflx())).map(XmWwxmCostVO::getPayAmount).reduce(BigDecimal.ZERO, BigDecimal::add);
+		vo.setD27_3(d27_3);
+		vo.setD27_4(vo.getD27_1().add(vo.getD27_2()).add(vo.getD27_3()));
+
+		XmCostDetailsDTO costDetailsDTO = new XmCostDetailsDTO();
+		costDetailsDTO.setYearAndMonth(year + "12");
+		DeductionCostSummary summary = xmCostDetailsService.deductionCostSummary(costDetailsDTO);
+		vo.setD28_1(Func.isNull(summary) ? BigDecimal.ZERO : summary.getWtjwjgfy_adjust_hjje());
+
+		costDetailsDTO.setYearAndMonth((Integer.parseInt(year) - 1) + "12");
+		summary = xmCostDetailsService.deductionCostSummary(costDetailsDTO);
+		vo.setD28_2(Func.isNull(summary) ? BigDecimal.ZERO : summary.getWtjwjgfy_adjust_hjje());
+
+		costDetailsDTO.setYearAndMonth((Integer.parseInt(year) - 2) + "12");
+		summary = xmCostDetailsService.deductionCostSummary(costDetailsDTO);
+		vo.setD28_3(Func.isNull(summary) ? BigDecimal.ZERO : summary.getWtjwjgfy_adjust_hjje());
+
+		vo.setD28_4(vo.getD28_1().add(vo.getD28_2()).add(vo.getD28_3()));
+
+		vo.setD15_1(vo.getD16_1().add(vo.getD25_1()));
+		vo.setD15_2(vo.getD16_2().add(vo.getD25_2()));
+		vo.setD15_3(vo.getD16_3().add(vo.getD25_3()));
+		vo.setD15_4(vo.getD15_1().add(vo.getD15_2()).add(vo.getD15_3()));
+
+		vo.setD16_1(vo.getD17_1().add(vo.getD18_1()).add(vo.getD19_1()).add(vo.getD20_1()).add(vo.getD21_1()).add(vo.getD22_1()).add(vo.getD23_1()).add(vo.getD24_1()));
+		vo.setD16_2(vo.getD17_2().add(vo.getD18_2()).add(vo.getD19_2()).add(vo.getD20_2()).add(vo.getD21_2()).add(vo.getD22_2()).add(vo.getD23_2()).add(vo.getD24_2()));
+		vo.setD16_3(vo.getD17_3().add(vo.getD18_3()).add(vo.getD19_3()).add(vo.getD20_3()).add(vo.getD21_3()).add(vo.getD22_3()).add(vo.getD23_3()).add(vo.getD24_3()));
+		vo.setD16_4(vo.getD16_1().add(vo.getD16_2()).add(vo.getD16_3()));
+
+		vo.setD25_1(vo.getD26_1().add(vo.getD28_1().multiply(BigDecimal.valueOf(0.8))));
+		vo.setD25_2(vo.getD26_2().add(vo.getD28_2().multiply(BigDecimal.valueOf(0.8))));
+		vo.setD25_3(vo.getD26_3().add(vo.getD28_3().multiply(BigDecimal.valueOf(0.8))));
+		vo.setD25_4(vo.getD25_1().add(vo.getD25_2()).add(vo.getD25_3()));
+
+		vo.setD2901(d29_1);
+		vo.setD2902(d29_2);
+		vo.setD2903(d29_3);
+		vo.setD2904(vo.getD2901().add(vo.getD2902()).add(vo.getD2903()));
+
+		//九、三年研发费用占销售(营业)收入的比例(15行第4列/29行第4列)
+		vo.setD30((vo.getD2904().compareTo(BigDecimal.ZERO) == 0) ? BigDecimal.ZERO : vo.getD15_4().divide(vo.getD2904()));
+
+		vo.setD31(d31);
+		vo.setD32(d32);
 		return vo;
 	}
 

+ 39 - 24
kd-service/kd-scientific/src/main/java/org/sky/scientific/service/impl/SalaryServiceImpl.java

@@ -5,6 +5,7 @@ import com.alibaba.excel.EasyExcel;
 import com.alibaba.excel.ExcelWriter;
 import com.alibaba.excel.support.ExcelTypeEnum;
 import com.alibaba.excel.write.metadata.WriteSheet;
+import com.alibaba.excel.write.metadata.fill.FillConfig;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
@@ -32,6 +33,7 @@ import org.springframework.transaction.annotation.Transactional;
 import org.springframework.web.multipart.MultipartFile;
 
 import java.io.InputStream;
+import java.math.BigDecimal;
 import java.net.URLEncoder;
 import java.util.*;
 import java.util.concurrent.atomic.AtomicInteger;
@@ -52,7 +54,7 @@ public class SalaryServiceImpl extends BaseServiceImpl<SalaryMapper, SalaryEntit
 
 	@Override
 	public IPage<SalaryVO> selectSalaryPage(IPage<SalaryVO> page, SalaryDTO salary) {
-		if(StringUtil.isBlank(salary.getYearAndMonth())){
+		if (StringUtil.isBlank(salary.getYearAndMonth())) {
 			throw new ServiceException("参数yearAndMonth不能为空");
 		}
 		List<SalaryVO> voList = baseMapper.selectSalaryPage(page, salary);
@@ -63,14 +65,14 @@ public class SalaryServiceImpl extends BaseServiceImpl<SalaryMapper, SalaryEntit
 
 	@SneakyThrows
 	@Override
-	public void exportSalary(HttpServletResponse response, SalaryDTO dto){
+	public void exportSalary(HttpServletResponse response, SalaryDTO dto) {
 
 		Query query = new Query().setCurrent(1).setSize(Integer.MAX_VALUE);
-		List<SalaryVO> assetVOList = this.selectSalaryPage(Condition.getPage(query), dto).getRecords();
+		List<SalaryVO> list = this.selectSalaryPage(Condition.getPage(query), dto).getRecords();
 
 		AtomicInteger i = new AtomicInteger(1);
- 		assetVOList.forEach(temp -> {
-			temp.setXh(i.getAndIncrement()+"");
+		list.forEach(temp -> {
+			temp.setXh(i.getAndIncrement() + "");
 			temp.setTotal(temp.getPensionInsurance().add(temp.getMedicalInsurance()).add(temp.getUnemploymentInsurance()).add(temp.getInjuryInsurance()).add(temp.getMaternityInsurance()));
 		});
 
@@ -84,10 +86,23 @@ public class SalaryServiceImpl extends BaseServiceImpl<SalaryMapper, SalaryEntit
 			.build();
 
 		WriteSheet writeSheet = EasyExcel.writerSheet().build();
+		FillConfig fillConfig = FillConfig.builder().forceNewRow(Boolean.TRUE).build();
 		//设置list集合数据
-		excelWriter.fill(assetVOList, writeSheet);
-		Map<String,Object> map = new HashMap<>();
-		map.put("year", dto.getYearAndMonth().substring(0,4));
+		excelWriter.fill(list, fillConfig, writeSheet);
+		Map<String, Object> map = new HashMap<>();
+		map.put("averageMonthlySalarySum", list.stream().map(SalaryVO::getAverageMonthlySalary).reduce(BigDecimal.ZERO, BigDecimal::add));
+		map.put("pensionInsuranceSum", list.stream().map(SalaryVO::getPensionInsurance).reduce(BigDecimal.ZERO, BigDecimal::add));
+		map.put("medicalInsuranceSum", list.stream().map(SalaryVO::getMedicalInsurance).reduce(BigDecimal.ZERO, BigDecimal::add));
+		map.put("unemploymentInsuranceSum", list.stream().map(SalaryVO::getUnemploymentInsurance).reduce(BigDecimal.ZERO, BigDecimal::add));
+		map.put("injuryInsuranceSum", list.stream().map(SalaryVO::getInjuryInsurance).reduce(BigDecimal.ZERO, BigDecimal::add));
+		map.put("maternityInsuranceSum", list.stream().map(SalaryVO::getMaternityInsurance).reduce(BigDecimal.ZERO, BigDecimal::add));
+		map.put("totalSum", list.stream().map(SalaryVO::getTotal).reduce(BigDecimal.ZERO, BigDecimal::add));
+		map.put("providentFundSum", list.stream().map(SalaryVO::getProvidentFund).reduce(BigDecimal.ZERO, BigDecimal::add));
+		map.put("bonusSum", list.stream().map(SalaryVO::getBonus).reduce(BigDecimal.ZERO, BigDecimal::add));
+		map.put("benefitSum", list.stream().map(SalaryVO::getBenefit).reduce(BigDecimal.ZERO, BigDecimal::add));
+		map.put("pensionInsuranceBcSum", list.stream().map(SalaryVO::getPensionInsuranceBc).reduce(BigDecimal.ZERO, BigDecimal::add));
+		map.put("medicalInsuranceBcSum", list.stream().map(SalaryVO::getMedicalInsuranceBc).reduce(BigDecimal.ZERO, BigDecimal::add));
+		map.put("year", dto.getYearAndMonth().substring(0, 4));
 		map.put("month", dto.getYearAndMonth().substring(4));
 		excelWriter.fill(map, writeSheet);
 		excelWriter.finish();
@@ -105,7 +120,7 @@ public class SalaryServiceImpl extends BaseServiceImpl<SalaryMapper, SalaryEntit
 			.eq(SalaryEntity::getYearAndMonth, salary.getYearAndMonth());
 		if (baseMapper.selectCount(queryWrapper) == 1) {
 			//存在,则修改
-			if(Func.isAllEmpty(salary.getAverageMonthlySalary(), salary.getPensionInsurance(), salary.getMedicalInsurance(), salary.getUnemploymentInsurance(), salary.getInjuryInsurance(), salary.getMaternityInsurance(), salary.getProvidentFund(), salary.getBonus(), salary.getBenefit(), salary.getPensionInsuranceBc(), salary.getMedicalInsuranceBc())){
+			if (Func.isAllEmpty(salary.getAverageMonthlySalary(), salary.getPensionInsurance(), salary.getMedicalInsurance(), salary.getUnemploymentInsurance(), salary.getInjuryInsurance(), salary.getMaternityInsurance(), salary.getProvidentFund(), salary.getBonus(), salary.getBenefit(), salary.getPensionInsuranceBc(), salary.getMedicalInsuranceBc())) {
 //				throw new ServiceException("数据无更新");
 				return true;
 			}
@@ -164,14 +179,14 @@ public class SalaryServiceImpl extends BaseServiceImpl<SalaryMapper, SalaryEntit
 	public boolean fetchTechnicianByYearAndMonth(String yearAndMonth) {
 		//查询yearAndMonth的实际参研人员名单
 		List<XmTechnicianEntity> list = xmTechnicianMapper.selectList(Wrappers.<XmTechnicianEntity>lambdaQuery().eq(XmTechnicianEntity::getYearAndMonth, yearAndMonth));
-		if(CollectionUtil.isEmpty(list)){
+		if (CollectionUtil.isEmpty(list)) {
 			throw new ServiceException("该月份无实际参研人员");
 		}
 		List<String> unicodeList = list.stream().map(XmTechnicianEntity::getUnicode).distinct().toList();
 		//yearAndMonth已有工资数据的研发人员
 		List<SalaryEntity> salaryEntities = baseMapper.selectList(Wrappers.<SalaryEntity>lambdaQuery().eq(SalaryEntity::getYearAndMonth, yearAndMonth));
 		List<String> dbUnicodeList = null;
-		if(CollectionUtil.isNotEmpty(salaryEntities)){
+		if (CollectionUtil.isNotEmpty(salaryEntities)) {
 			dbUnicodeList = salaryEntities.stream().map(SalaryEntity::getUnicode).toList();
 			List<String> finalDbUnicodeList = dbUnicodeList;
 			unicodeList = unicodeList.stream().filter(n -> !finalDbUnicodeList.contains(n)).toList();
@@ -193,45 +208,45 @@ public class SalaryServiceImpl extends BaseServiceImpl<SalaryMapper, SalaryEntit
 	@Transactional
 	@Override
 	public void importSalary(MultipartFile file, String yearAndMonth) {
-		if(StringUtil.isBlank(yearAndMonth) || yearAndMonth.length() != 6){
+		if (StringUtil.isBlank(yearAndMonth) || yearAndMonth.length() != 6) {
 			throw new ServiceException("请传入参数yearAndMonth,格式:YYYYmm");
 		}
 		List<SalaryExcel> data = ExcelUtil.read(file, 0, 2, SalaryExcel.class);
-		if(CollectionUtil.isEmpty(data)){
+		if (CollectionUtil.isEmpty(data)) {
 			throw new ServiceException("未能从模板中读取数据,请检查模板格式是否正确");
 		}
 		//导入时人员非本月实际参研人员,提示“某某非本月实际参研人员,请核对数据”
 		//获取本月实际参研人员名单
 		List<XmTechnicianEntity> technicianByYearMonth = xmTechnicianMapper.selectList(Wrappers.<XmTechnicianEntity>lambdaQuery().eq(XmTechnicianEntity::getYearAndMonth, yearAndMonth));
-		if(CollectionUtil.isEmpty(technicianByYearMonth)){
-			throw new ServiceException(yearAndMonth+"实际参研人员名单为空");
+		if (CollectionUtil.isEmpty(technicianByYearMonth)) {
+			throw new ServiceException(yearAndMonth + "实际参研人员名单为空");
 		}
 		List<String> unicodeList = technicianByYearMonth.stream().map(XmTechnicianEntity::getUnicode).toList();
 
 		for (SalaryExcel excel : data) {
-			if(StringUtil.isAllBlank(excel.getNumber(), excel.getIdCard())){
-				throw new ServiceException("序号为["+excel.getXh()+"]的工号和身份证不能都为空");
+			if (StringUtil.isAllBlank(excel.getNumber(), excel.getIdCard())) {
+				throw new ServiceException("序号为[" + excel.getXh() + "]的工号和身份证不能都为空");
 			}
 			//根据工号或者身份证查询technicianId
 			LambdaQueryWrapper<TechnicianEntity> wrapper = Wrappers.<TechnicianEntity>lambdaQuery()
 				.eq(TechnicianEntity::getYearAndMonth, yearAndMonth)
 				.and(t -> t.eq(TechnicianEntity::getNumber, excel.getNumber()).or().eq(TechnicianEntity::getIdCard, excel.getIdCard()));
 			TechnicianEntity dbTechnician = technicianMapper.selectOne(wrapper);
-			if(dbTechnician == null){
-				throw new ServiceException("序号为["+excel.getXh()+"]的工号和者身份证都不存在");
+			if (dbTechnician == null) {
+				throw new ServiceException("序号为[" + excel.getXh() + "]的工号和者身份证都不存在");
 			}
 
 			//非本月实际参研人员,提示“某某非本月实际参研人员,请核对数据”
-			if(!unicodeList.contains(dbTechnician.getUnicode())){
-				String tips = StringUtil.isNoneBlank(excel.getNumber())?excel.getNumber()+","+excel.getIdCard():excel.getIdCard();
-				throw new ServiceException("人员["+tips+"]非本月实际参研人员,请核对数据");
+			if (!unicodeList.contains(dbTechnician.getUnicode())) {
+				String tips = StringUtil.isNoneBlank(excel.getNumber()) ? excel.getNumber() + "," + excel.getIdCard() : excel.getIdCard();
+				throw new ServiceException("人员[" + tips + "]非本月实际参研人员,请核对数据");
 			}
 
 			LambdaQueryWrapper<SalaryEntity> queryWrapper = Wrappers.<SalaryEntity>lambdaQuery()
 				.eq(SalaryEntity::getYearAndMonth, yearAndMonth)
 				.eq(SalaryEntity::getUnicode, dbTechnician.getUnicode());
-			if(baseMapper.selectCount(queryWrapper) > 0){
-				throw new ServiceException("序号为["+excel.getXh()+"]的工资数据已存在, 导入失败");
+			if (baseMapper.selectCount(queryWrapper) > 0) {
+				throw new ServiceException("序号为[" + excel.getXh() + "]的工资数据已存在, 导入失败");
 			}
 
 			SalaryEntity entity = Objects.requireNonNull(BeanUtil.copyProperties(excel, SalaryDTO.class));

+ 10 - 0
kd-service/kd-scientific/src/main/java/org/sky/scientific/service/impl/TechnicianServiceImpl.java

@@ -457,6 +457,11 @@ public class TechnicianServiceImpl extends BaseServiceImpl<TechnicianMapper, Tec
 	}
 
 	@Override
+	public void exportMeiyueyanfarengongfeiyongfeifenpeibiao(HttpServletResponse response, XmTechnicianDto dto) {
+
+	}
+
+	@Override
 	public IPage<XmSalaryVO> meiyueyanfaxiangmurengongfenpeihuizongbiao(IPage<XmSalaryVO> page, XmSalaryDto dto) {
 		if (StringUtil.isBlank(dto.getYearAndMonth())) {
 			throw new ServiceException("参数yearAndMonth不能为空");
@@ -473,6 +478,11 @@ public class TechnicianServiceImpl extends BaseServiceImpl<TechnicianMapper, Tec
 		return page.setRecords(list);
 	}
 
+	@Override
+	public void exportMeiyueyanfaxiangmurengongfenpeihuizongbiao(HttpServletResponse response, XmSalaryDto dto) {
+
+	}
+
 	@SneakyThrows
 	@Override
 	public void exportCyryhmc(HttpServletResponse response, XmTechnicianDto dto) {

+ 62 - 27
kd-service/kd-scientific/src/main/java/org/sky/scientific/service/impl/XmCostDetailsServiceImpl.java

@@ -1,6 +1,11 @@
 
 package org.sky.scientific.service.impl;
 
+import com.alibaba.excel.EasyExcel;
+import com.alibaba.excel.ExcelWriter;
+import com.alibaba.excel.support.ExcelTypeEnum;
+import com.alibaba.excel.write.metadata.WriteSheet;
+import com.alibaba.excel.write.metadata.fill.FillConfig;
 import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
@@ -8,6 +13,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import jakarta.servlet.http.HttpServletResponse;
 import lombok.AllArgsConstructor;
+import lombok.SneakyThrows;
 import org.sky.core.excel.util.ExcelUtil;
 import org.sky.core.log.exception.ServiceException;
 import org.sky.core.mp.base.BaseServiceImpl;
@@ -29,9 +35,12 @@ import org.sky.scientific.service.IXmCostDetailsService;
 import org.springframework.stereotype.Service;
 import org.springframework.web.multipart.MultipartFile;
 
+import java.io.InputStream;
 import java.math.BigDecimal;
 import java.math.RoundingMode;
+import java.net.URLEncoder;
 import java.util.*;
+import java.util.concurrent.atomic.AtomicInteger;
 
 /**
  * 研发费用支出明细账 服务实现类
@@ -145,9 +154,42 @@ public class XmCostDetailsServiceImpl extends BaseServiceImpl<XmCostDetailsMappe
 		return true;
 	}
 
+	@SneakyThrows
 	@Override
 	public void exportXmCostDetails(HttpServletResponse response, XmCostDetailsDTO dto) {
 
+		List<XmCostDetailsEntity> list = this.selectXmCostDetailsPage(Condition.getPage(new Query().setCurrent(1).setSize(Integer.MAX_VALUE)), dto).getRecords();
+		AtomicInteger index = new AtomicInteger(1);
+		list.forEach(temp -> {
+			temp.setXh(index.getAndIncrement()+"");
+			temp.setRecordDateStr(Func.notNull(temp.getRecordDate())?DateUtil.format(temp.getRecordDate(), DateUtil.PATTERN_DATE): null);
+			temp.setCode(temp.getESubjectCode());
+			temp.setName(temp.getESubjectName());
+		});
+
+		InputStream templateFileName = this.getClass().getClassLoader().getResourceAsStream("export-template/研发支出明细账P098.xls");
+ 		response.setContentType("application/vnd.ms-excel");
+		response.setCharacterEncoding("utf-8");
+		response.addHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode("研发支出明细账.xls", Charsets.UTF_8));
+		ExcelWriter excelWriter = EasyExcel.write(response.getOutputStream())
+			.withTemplate((templateFileName))
+			.excelType(ExcelTypeEnum.XLS)
+			.build();
+
+		WriteSheet writeSheet = EasyExcel.writerSheet().build();
+		FillConfig fillConfig = FillConfig.builder().forceNewRow(Boolean.TRUE).build();
+		//设置list集合数据
+		excelWriter.fill(list, fillConfig, writeSheet);
+		Map<String,Object> map = new HashMap<>();
+		map.put("total", list.stream().filter(Objects::nonNull).map(XmCostDetailsEntity::getAmount).reduce(BigDecimal.ZERO, BigDecimal::add));
+		String yearAndMonth = dto.getYearAndMonth();
+
+		map.put("yearAndMonth", (yearAndMonth.length()==6)?yearAndMonth.substring(0, 4) + "年" + yearAndMonth.substring(4) + "月":yearAndMonth + "年");
+ 		excelWriter.fill(map, writeSheet);
+		excelWriter.finish();
+		if (templateFileName != null) {
+			templateFileName.close();
+		}
 	}
 
 	@Override
@@ -214,30 +256,31 @@ public class XmCostDetailsServiceImpl extends BaseServiceImpl<XmCostDetailsMappe
 			for (CostItemVO item : itemVOS) {
 				if (Arrays.asList("53010101", "53010201").contains(item.getL3Code())) {
 					//人员人工费用
-					summary.setRyrgTotal(summary.getRyrgTotal() + item.getAmount().doubleValue());
+					summary.setRyrgTotal(summary.getRyrgTotal().add(item.getAmount()));
 				} else if (Arrays.asList("53010102", "53010202").contains(item.getL3Code())) {
 					//直接投入费用
-					summary.setZjtrTotal(summary.getZjtrTotal() + item.getAmount().doubleValue());
+					summary.setZjtrTotal(summary.getZjtrTotal().add(item.getAmount()));
 				} else if (Arrays.asList("53010103", "53010203").contains(item.getL3Code())) {
 					//折旧费用与长期待摊费用
-					summary.setZjfyycqdtfyTotal(summary.getZjfyycqdtfyTotal() + item.getAmount().doubleValue());
+					summary.setZjfyycqdtfyTotal(summary.getZjfyycqdtfyTotal().add(item.getAmount()));
 				} else if (Arrays.asList("53010104", "53010204").contains(item.getL3Code())) {
 					//无形资产摊销费用
-					summary.setWxzctxTotal(summary.getWxzctxTotal() + item.getAmount().doubleValue());
+					summary.setWxzctxTotal(summary.getWxzctxTotal().add(item.getAmount()));
 				} else if (Arrays.asList("53010105", "53010205").contains(item.getL3Code())) {
 					//设计费用
-					summary.setSjfTotal(summary.getSjfTotal() + item.getAmount().doubleValue());
+					summary.setSjfTotal(summary.getSjfTotal().add(item.getAmount()));
 				} else if (Arrays.asList("53010106", "53010206").contains(item.getL3Code())) {
 					//装备调试费用与试验费用
-					summary.setZbtsfyysyfyTotal(summary.getZbtsfyysyfyTotal() + item.getAmount().doubleValue());
+					summary.setZbtsfyysyfyTotal(summary.getZbtsfyysyfyTotal().add(item.getAmount()));
 				} else if (Arrays.asList("53010107", "53010207").contains(item.getL3Code())) {
 					//委托外部研究开发费用
-					summary.setWwyfTotal(summary.getWwyfTotal() + item.getAmount().doubleValue());
+					summary.setWwyfTotal(summary.getWwyfTotal().add(item.getAmount()));
 				} else if (Arrays.asList("53010108", "53010208").contains(item.getL3Code())) {
 					//其他费用
-					summary.setQtfyTotal(summary.getQtfyTotal() + item.getAmount().doubleValue());
+					summary.setQtfyTotal(summary.getQtfyTotal().add(item.getAmount()));
 				}
 			}
+			summary.setTotal(summary.getRyrgTotal().add(summary.getZjtrTotal()).add(summary.getZjfyycqdtfyTotal()).add(summary.getSjfTotal()).add(summary.getWxzctxTotal()).add(summary.getZbtsfyysyfyTotal()).add(summary.getQtfyTotal()).add(summary.getWwyfTotal()));
 		}
 		return page.setRecords(summaryList);
 	}
@@ -316,35 +359,35 @@ public class XmCostDetailsServiceImpl extends BaseServiceImpl<XmCostDetailsMappe
 				}
 				if (Arrays.asList("53010101", "53010201").contains(item.getL3Code())) {
 					//1、人员人工费用
-					summary.setRyrgTotal(summary.getRyrgTotal() + item.getAmount().doubleValue());
+					summary.setRyrgTotal(summary.getRyrgTotal().add(item.getAmount()));
 				} else if (Arrays.asList("53010102", "53010202").contains(item.getL3Code())) {
 					//2、直接投入费用
-					summary.setZjtrTotal(summary.getZjtrTotal() + item.getAmount().doubleValue());
+					summary.setZjtrTotal(summary.getZjtrTotal().add(item.getAmount()));
 				} else if (Arrays.asList("53010103", "53010203").contains(item.getL3Code())) {
 					//3、折旧费用与长期待摊费用
-					summary.setZjfyycqdtfyTotal(summary.getZjfyycqdtfyTotal() + item.getAmount().doubleValue());
+					summary.setZjfyycqdtfyTotal(summary.getZjfyycqdtfyTotal().add(item.getAmount()));
 				} else if (Arrays.asList("53010104", "53010204").contains(item.getL3Code())) {
 					//4、无形资产摊销费用
-					summary.setWxzctxTotal(summary.getWxzctxTotal() + item.getAmount().doubleValue());
+					summary.setWxzctxTotal(summary.getWxzctxTotal().add(item.getAmount()));
 				} else if (Arrays.asList("53010105", "53010205").contains(item.getL3Code())) {
 					//5、设计费用
-					summary.setSjfTotal(summary.getSjfTotal() + item.getAmount().doubleValue());
+					summary.setSjfTotal(summary.getSjfTotal().add(item.getAmount()));
 				} else if (Arrays.asList("53010106", "53010206").contains(item.getL3Code())) {
 					//6、装备调试费用与试验费用
-					summary.setZbtsfyysyfyTotal(summary.getZbtsfyysyfyTotal() + item.getAmount().doubleValue());
+					summary.setZbtsfyysyfyTotal(summary.getZbtsfyysyfyTotal().add(item.getAmount()));
 				} else if (Arrays.asList("53010107", "53010207").contains(item.getL3Code())) {
 					//委托外部研究开发费用
-					summary.setWwyfTotal(summary.getWwyfTotal() + item.getAmount().doubleValue());
+					summary.setWwyfTotal(summary.getWwyfTotal().add(item.getAmount()));
 				} else if (Arrays.asList("53010108", "53010208").contains(item.getL3Code())) {
 					//7-1、其他费用
-					summary.setQtfyTotal(summary.getQtfyTotal() + item.getAmount().doubleValue());
+					summary.setQtfyTotal(summary.getQtfyTotal().add(item.getAmount()));
 				}
 				// 7-2、其他费用限额,1-6合计相加/0.8*0.2
-				double total = summary.getRyrgTotal() + summary.getZjtrTotal() + summary.getZjfyycqdtfyTotal() + summary.getSjfTotal() + summary.getWxzctxTotal() + summary.getZbtsfyysyfyTotal();
-				summary.setQtfyLimit(total / 0.8 * 0.2);
+				BigDecimal total = summary.getRyrgTotal().add(summary.getZjtrTotal()).add(summary.getZjfyycqdtfyTotal()).add(summary.getSjfTotal()).add(summary.getWxzctxTotal()).add(summary.getZbtsfyysyfyTotal());
+				summary.setQtfyLimit(total.divide(BigDecimal.valueOf(0.8), 2, RoundingMode.HALF_UP).multiply(BigDecimal.valueOf(0.2)));
 				//7-3、调整后其他费用,7-1和7-2,谁小取谁
-				summary.setQtfyAdjust(Math.min(summary.getQtfyTotal(), summary.getQtfyLimit()));
 
+				summary.setQtfyAdjust((summary.getQtfyTotal().compareTo(summary.getQtfyLimit())==-1)?summary.getQtfyTotal():summary.getQtfyLimit());
 			}
 		}
 		return page.setRecords(summaryList);
@@ -446,11 +489,9 @@ public class XmCostDetailsServiceImpl extends BaseServiceImpl<XmCostDetailsMappe
 		List<DeductionCostDetailVO> list = baseMapper.deductionCostDetail(dto);
 		DeductionCostSummary summary = new DeductionCostSummary();
 
-
 		DeductionCostQt qt = qtMapper.selectOne(Wrappers.<DeductionCostQt>lambdaQuery().eq(DeductionCostQt::getYearAndMonth, dto.getYearAndMonth()));
 
 		if (Func.notNull(qt)) {
-
 			summary.setRyrgfy_qt(qt.getRyrgfyQt());
 			summary.setZjtrfy_qt(qt.getZjtrfyQt());
 			summary.setZjfy_qt(qt.getZjfyQt());
@@ -548,8 +589,6 @@ public class XmCostDetailsServiceImpl extends BaseServiceImpl<XmCostDetailsMappe
 				}
 			}
 
-
-
 			//前五项小计=1、人员人工费用+2、直接投入费用+3、折旧费用+4、无形资产摊销+5、新产品设计费等
 			fyhSummary.setTotal(fyhSummary.getRyrgTotal().add(fyhSummary.getZjtrTotal()).add(fyhSummary.getZjfyTotal()).add(fyhSummary.getWxzctxTotal()).add(fyhSummary.getXcpsjfd()));
 			zbhSummary.setTotal(zbhSummary.getRyrgTotal().add(zbhSummary.getZjtrTotal()).add(zbhSummary.getZjfyTotal()).add(zbhSummary.getWxzctxTotal()).add(zbhSummary.getXcpsjfd()));
@@ -624,7 +663,6 @@ public class XmCostDetailsServiceImpl extends BaseServiceImpl<XmCostDetailsMappe
 			//金额合计-允许加计扣除的委托境内机构或个人进行研发活动所发生的费用
 			summary.setWtjnjgfy_hjje(summary.getWtjnjgfy_hjje().add(summary.getWtjnjgfy_zbh()).add(summary.getWtjnjgfy_fyh()));
 
-
 			//资本化金额小计-委托境外机构进行研发活动所发生的费用
 			summary.setWtjwjgfy_zbh(summary.getWtjwjgfy_zbh().add(zbhSummary.getWtjwfy()));
 			//费用化金额小计-委托境外机构进行研发活动所发生的费用
@@ -632,12 +670,9 @@ public class XmCostDetailsServiceImpl extends BaseServiceImpl<XmCostDetailsMappe
 			//金额合计-委托境外机构进行研发活动所发生的费用
 			summary.setWtjwjgfy_hjje(summary.getWtjwjgfy_hjje().add(summary.getWtjwjgfy_zbh()).add(summary.getWtjwjgfy_fyh()));
 
-
 			//允许加计扣除金额合计=前五项 小计 + 经限额调整后的其他相关费用 + 允许加计扣除的委托境内机构或个人进行研发活动所发生的费用 + 经限额调整后的委托境外机构进行研发活动所发生的费用
 			fyhSummary.setYxjjkcjehj(fyhSummary.getYxjjkcjehj().add(fyhSummary.getTotal()));
 			zbhSummary.setYxjjkcjehj(zbhSummary.getYxjjkcjehj().add(zbhSummary.getTotal()));
-
-
 		}
 
 		summary.setTotal_hjje(summary.getTotal_zbh().add(summary.getTotal_fyh()));

+ 1 - 1
kd-service/kd-scientific/src/main/java/org/sky/scientific/service/impl/XmGoodsServiceImpl.java

@@ -75,7 +75,7 @@ public class XmGoodsServiceImpl extends BaseServiceImpl<XmGoodsMapper, XmGoodsEn
 			excel.setXh(index.getAndIncrement());
 
 			excel.setAmount(excel.getUnitPrice().multiply(new BigDecimal(excel.getUseQuantity())));
-			excel.setUseDateStr(DateUtil.format(excel.getUseDate(), DateUtil.PATTERN_DATE));
+			excel.setUseDateStr(Func.notNull(excel.getUseDate())?DateUtil.format(excel.getUseDate(), DateUtil.PATTERN_DATE):null);
 			resultList.add(excel);
 
 		}

+ 2 - 2
kd-service/kd-scientific/src/main/java/org/sky/scientific/service/impl/XmServiceImpl.java

@@ -167,8 +167,8 @@ public class XmServiceImpl extends BaseServiceImpl<XmMapper, XmEntity> implement
 				Optional<XmStatusEnum> first = Arrays.stream(XmStatusEnum.values()).filter(status -> status.getCode() == summary.getStatus()).findFirst();
 				summary.setStatusName(first.isPresent()?first.get().getName():"");
 
-				summary.setXmkssjStr(DateUtil.format(summary.getXmkssj(), DateUtil.PATTERN_DATE));
-				summary.setXmjssjStr(DateUtil.format(summary.getXmjssj(), DateUtil.PATTERN_DATE));
+				summary.setXmkssjStr(Func.notNull(summary.getXmkssj())?DateUtil.format(summary.getXmkssj(), DateUtil.PATTERN_DATE):null);
+				summary.setXmjssjStr(Func.notNull(summary.getXmjssj())?DateUtil.format(summary.getXmjssj(), DateUtil.PATTERN_DATE):null);
 
 				summary.setLxbgStatus((summary.getLxbgCount()>0)?"已提交":"未提交");
 				summary.setJdxbgStatus((summary.getJdxbgCount()>0)?"已提交":"未提交");

+ 6 - 2
kd-service/kd-scientific/src/main/java/org/sky/scientific/service/impl/XmTechnicianHoursServiceImpl.java

@@ -53,8 +53,7 @@ import java.util.stream.Collectors;
 public class XmTechnicianHoursServiceImpl extends BaseServiceImpl<XmTechnicianHoursMapper, XmTechnicianHours> implements IXmTechnicianHoursService {
 
 	private final XmMapper xmMapper;
-	private final XmTechnicianMapper xmTechnicianMapper;
-	private final AttendanceMapper attendanceMapper;
+ 	private final AttendanceMapper attendanceMapper;
 	private final TechnicianMapper technicianMapper;
 
 	@SneakyThrows
@@ -485,4 +484,9 @@ public class XmTechnicianHoursServiceImpl extends BaseServiceImpl<XmTechnicianHo
 		}
 		return page.setRecords(list);
 	}
+
+	@Override
+	public void exportMeiyueyanfagongshifenpeibiao(HttpServletResponse response, TechnicianDTO dto) {
+
+	}
 }

BIN
kd-service/kd-scientific/src/main/resources/export-template/每月工资信息.xls


BIN
kd-service/kd-scientific/src/main/resources/export-template/每月研发人员人工分配表.xls


BIN
kd-service/kd-scientific/src/main/resources/export-template/研发支出明细账P098.xls


BIN
kd-service/kd-scientific/src/main/resources/export-template/研发费用汇总表P0040.xls


BIN
kd-service/kd-scientific/src/main/resources/export-template/科研成果-专利成果.xls


BIN
kd-service/kd-scientific/src/main/resources/export-template/科研成果-其他成果.xls


BIN
kd-service/kd-scientific/src/main/resources/export-template/科研成果-技术标准.xls


BIN
kd-service/kd-scientific/src/main/resources/export-template/科研成果-科研论文.xls


BIN
kd-service/kd-scientific/src/main/resources/export-template/科研成果-软件著作.xls