ソースを参照

瑞思财务模块

xmy 1 年間 前
コミット
91e6b66de1
共有100 個のファイルを変更した8753 個の追加0 個の削除を含む
  1. 42 0
      .gitignore
  2. BIN
      mjava-ruisi/log/2024-04-28/debug-0.log.gz
  3. BIN
      mjava-ruisi/log/2024-04-28/error-0.log.gz
  4. BIN
      mjava-ruisi/log/2024-04-28/info-0.log.gz
  5. BIN
      mjava-ruisi/log/2024-04-28/point-0.log.gz
  6. BIN
      mjava-ruisi/log/2024-04-28/warn-0.log.gz
  7. BIN
      mjava-ruisi/log/2024-04-29/debug-0.log.gz
  8. BIN
      mjava-ruisi/log/2024-04-29/error-0.log.gz
  9. BIN
      mjava-ruisi/log/2024-04-29/info-0.log.gz
  10. BIN
      mjava-ruisi/log/2024-04-29/point-0.log.gz
  11. BIN
      mjava-ruisi/log/2024-04-29/warn-0.log.gz
  12. 138 0
      mjava-ruisi/pom.xml
  13. 35 0
      mjava-ruisi/src/main/java/com/malk/ruisi/Boot.java
  14. 468 0
      mjava-ruisi/src/main/java/com/malk/ruisi/client/RefundEntry.java
  15. 80 0
      mjava-ruisi/src/main/java/com/malk/ruisi/client/WSBean.java
  16. 308 0
      mjava-ruisi/src/main/java/com/malk/ruisi/client/WSContext.java
  17. 307 0
      mjava-ruisi/src/main/java/com/malk/ruisi/client/WSIncome.java
  18. 424 0
      mjava-ruisi/src/main/java/com/malk/ruisi/client/WSIncomeEntry.java
  19. 87 0
      mjava-ruisi/src/main/java/com/malk/ruisi/client/WSInvokeException.java
  20. 306 0
      mjava-ruisi/src/main/java/com/malk/ruisi/client/WSReceive.java
  21. 689 0
      mjava-ruisi/src/main/java/com/malk/ruisi/client/WSReceiveEntry.java
  22. 92 0
      mjava-ruisi/src/main/java/com/malk/ruisi/config/load-config.properties
  23. 23 0
      mjava-ruisi/src/main/java/com/malk/ruisi/controller/ActivityProjectController.java
  24. 27 0
      mjava-ruisi/src/main/java/com/malk/ruisi/controller/ExpenseAccrualController.java
  25. 24 0
      mjava-ruisi/src/main/java/com/malk/ruisi/controller/MaterialController.java
  26. 23 0
      mjava-ruisi/src/main/java/com/malk/ruisi/controller/NewSupplierAdditionController.java
  27. 24 0
      mjava-ruisi/src/main/java/com/malk/ruisi/controller/TravelWriteKingDeeController.java
  28. 30 0
      mjava-ruisi/src/main/java/com/malk/ruisi/controller/WriteKingDeeController.java
  29. 42 0
      mjava-ruisi/src/main/java/com/malk/ruisi/demo/FinancialService.java
  30. 29 0
      mjava-ruisi/src/main/java/com/malk/ruisi/entity/NewsSupplier.java
  31. 8 0
      mjava-ruisi/src/main/java/com/malk/ruisi/mapper/BankNameMapper.java
  32. 8 0
      mjava-ruisi/src/main/java/com/malk/ruisi/mapper/CostCenterMapper.java
  33. 10 0
      mjava-ruisi/src/main/java/com/malk/ruisi/mapper/WriteKingDeeMapper.java
  34. 81 0
      mjava-ruisi/src/main/java/com/malk/ruisi/portalmainfacade/WSInvokeException.java
  35. 115 0
      mjava-ruisi/src/main/java/com/malk/ruisi/schedule/ScheduleTask.java
  36. 8 0
      mjava-ruisi/src/main/java/com/malk/ruisi/service/ActivityProjectService.java
  37. 9 0
      mjava-ruisi/src/main/java/com/malk/ruisi/service/BankNameService.java
  38. 6 0
      mjava-ruisi/src/main/java/com/malk/ruisi/service/CostBearerService.java
  39. 6 0
      mjava-ruisi/src/main/java/com/malk/ruisi/service/CostCenterService.java
  40. 6 0
      mjava-ruisi/src/main/java/com/malk/ruisi/service/DeleteYDDataService.java
  41. 9 0
      mjava-ruisi/src/main/java/com/malk/ruisi/service/ExpenseAccrualService.java
  42. 7 0
      mjava-ruisi/src/main/java/com/malk/ruisi/service/LegalEntityService.java
  43. 8 0
      mjava-ruisi/src/main/java/com/malk/ruisi/service/MaterialService.java
  44. 11 0
      mjava-ruisi/src/main/java/com/malk/ruisi/service/NewSupplierAdditionService.java
  45. 8 0
      mjava-ruisi/src/main/java/com/malk/ruisi/service/TravelWriteKingDeeService.java
  46. 6 0
      mjava-ruisi/src/main/java/com/malk/ruisi/service/UfHzqyService.java
  47. 11 0
      mjava-ruisi/src/main/java/com/malk/ruisi/service/WriteKingDeeService.java
  48. 237 0
      mjava-ruisi/src/main/java/com/malk/ruisi/service/impl/ActivityProjectServiceImpl.java
  49. 135 0
      mjava-ruisi/src/main/java/com/malk/ruisi/service/impl/BankNameServiceImpl.java
  50. 90 0
      mjava-ruisi/src/main/java/com/malk/ruisi/service/impl/CostBearerServiceImpl.java
  51. 122 0
      mjava-ruisi/src/main/java/com/malk/ruisi/service/impl/CostCenterServiceImpl.java
  52. 34 0
      mjava-ruisi/src/main/java/com/malk/ruisi/service/impl/DeleteYDDataServiceImpl.java
  53. 303 0
      mjava-ruisi/src/main/java/com/malk/ruisi/service/impl/ExpenseAccrualServiceImpl.java
  54. 100 0
      mjava-ruisi/src/main/java/com/malk/ruisi/service/impl/LegalEntityServiceImpl.java
  55. 83 0
      mjava-ruisi/src/main/java/com/malk/ruisi/service/impl/MaterialServiceImpl.java
  56. 206 0
      mjava-ruisi/src/main/java/com/malk/ruisi/service/impl/NewsSupplierAdditionServiceImpl.java
  57. 452 0
      mjava-ruisi/src/main/java/com/malk/ruisi/service/impl/TravelWriteKingDeeServiceImpl.java
  58. 89 0
      mjava-ruisi/src/main/java/com/malk/ruisi/service/impl/UfHzqyServiceImpl.java
  59. 474 0
      mjava-ruisi/src/main/java/com/malk/ruisi/service/impl/WriteKingDeeServiceImpl.java
  60. 13 0
      mjava-ruisi/src/main/java/com/malk/ruisi/services/EASLogin/EASLoginProxy.java
  61. 60 0
      mjava-ruisi/src/main/java/com/malk/ruisi/services/EASLogin/EASLoginProxyProxy.java
  62. 16 0
      mjava-ruisi/src/main/java/com/malk/ruisi/services/EASLogin/EASLoginProxyService.java
  63. 144 0
      mjava-ruisi/src/main/java/com/malk/ruisi/services/EASLogin/EASLoginProxyServiceLocator.java
  64. 237 0
      mjava-ruisi/src/main/java/com/malk/ruisi/services/EASLogin/EASLoginSoapBindingStub.java
  65. 183 0
      mjava-ruisi/src/main/java/com/malk/ruisi/services/WSPortalMainFacade/WSPortalMainFacadeSoapBindingStub.java
  66. 7 0
      mjava-ruisi/src/main/java/com/malk/ruisi/services/WSPortalMainFacade/WSPortalMainFacadeSrvProxy.java
  67. 54 0
      mjava-ruisi/src/main/java/com/malk/ruisi/services/WSPortalMainFacade/WSPortalMainFacadeSrvProxyProxy.java
  68. 10 0
      mjava-ruisi/src/main/java/com/malk/ruisi/services/WSPortalMainFacade/WSPortalMainFacadeSrvProxyService.java
  69. 133 0
      mjava-ruisi/src/main/java/com/malk/ruisi/services/WSPortalMainFacade/WSPortalMainFacadeSrvProxyServiceLocator.java
  70. 359 0
      mjava-ruisi/src/main/java/com/malk/ruisi/services/WSWebServiceProvideFacade/WSWebServiceProvideFacadeSoapBindingStub.java
  71. 14 0
      mjava-ruisi/src/main/java/com/malk/ruisi/services/WSWebServiceProvideFacade/WSWebServiceProvideFacadeSrvProxy.java
  72. 66 0
      mjava-ruisi/src/main/java/com/malk/ruisi/services/WSWebServiceProvideFacade/WSWebServiceProvideFacadeSrvProxyProxy.java
  73. 16 0
      mjava-ruisi/src/main/java/com/malk/ruisi/services/WSWebServiceProvideFacade/WSWebServiceProvideFacadeSrvProxyService.java
  74. 142 0
      mjava-ruisi/src/main/java/com/malk/ruisi/services/WSWebServiceProvideFacade/WSWebServiceProvideFacadeSrvProxyServiceLocator.java
  75. 173 0
      mjava-ruisi/src/main/java/com/malk/ruisi/utils/InterfaceClientUtil.java
  76. 69 0
      mjava-ruisi/src/main/resources/application-dev.yml
  77. 69 0
      mjava-ruisi/src/main/resources/application-prod.yml
  78. 3 0
      mjava-ruisi/src/main/resources/application.yml
  79. 82 0
      mjava-ruisi/src/test/java/com.malk.tianhe/TbTest.java
  80. 39 0
      mjava-ruisi/src/test/resource/server.sh
  81. 51 0
      mjava/pom.xml
  82. 29 0
      mjava/src/main/java/com/malk/Boot.java
  83. 29 0
      mjava/src/main/java/com/malk/base/BaseDao.java
  84. 112 0
      mjava/src/main/java/com/malk/base/BaseDto.java
  85. 64 0
      mjava/src/main/java/com/malk/base/BasePo.java
  86. 9 0
      mjava/src/main/java/com/malk/base/BaseRepository.java
  87. 78 0
      mjava/src/main/java/com/malk/base/JpaMap.java
  88. 35 0
      mjava/src/main/java/com/malk/config/JpaConfiguration.java
  89. 58 0
      mjava/src/main/java/com/malk/config/WebConfiguration.java
  90. 41 0
      mjava/src/main/java/com/malk/config/mutilSource/DataSourceConfig.java
  91. 80 0
      mjava/src/main/java/com/malk/config/mutilSource/PrimaryConfig.java
  92. 76 0
      mjava/src/main/java/com/malk/config/mutilSource/SlaveConfig.java
  93. 73 0
      mjava/src/main/java/com/malk/controller/DDCallbackController.java
  94. 61 0
      mjava/src/main/java/com/malk/controller/TBCallBackController.java
  95. 101 0
      mjava/src/main/java/com/malk/core/AsyncConfig.java
  96. 36 0
      mjava/src/main/java/com/malk/delegate/DDEvent.java
  97. 17 0
      mjava/src/main/java/com/malk/delegate/McDelegate.java
  98. 25 0
      mjava/src/main/java/com/malk/delegate/TBEvent.java
  99. 49 0
      mjava/src/main/java/com/malk/delegate/impl/DDImplEvent.java
  100. 0 0
      mjava/src/main/java/com/malk/delegate/impl/McImplDelegate.java

+ 42 - 0
.gitignore

@@ -0,0 +1,42 @@
+# IntelliJ project files
+.idea
+*.iml
+out
+gen
+### Java template
+# Compiled class file
+*.class
+
+# Log file
+*.log
+/log/
+
+# BlueJ files
+*.ctxt
+
+# Mobile Tools for Java (J2ME)
+.mtj.tmp/
+
+# Package Files #
+*.jar
+*.war
+*.nar
+*.ear
+*.zip
+*.tar.gz
+*.rar
+
+# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
+hs_err_pid*
+
+mvnw
+mvnw.cmd
+
+# tmp file
+.tmp
+*/tmp
+*/target
+
+# web2 file
+*/src/main/resources/static/web
+*/src/main/resources/static/mjs

BIN
mjava-ruisi/log/2024-04-28/debug-0.log.gz


BIN
mjava-ruisi/log/2024-04-28/error-0.log.gz


BIN
mjava-ruisi/log/2024-04-28/info-0.log.gz


BIN
mjava-ruisi/log/2024-04-28/point-0.log.gz


BIN
mjava-ruisi/log/2024-04-28/warn-0.log.gz


BIN
mjava-ruisi/log/2024-04-29/debug-0.log.gz


BIN
mjava-ruisi/log/2024-04-29/error-0.log.gz


BIN
mjava-ruisi/log/2024-04-29/info-0.log.gz


BIN
mjava-ruisi/log/2024-04-29/point-0.log.gz


BIN
mjava-ruisi/log/2024-04-29/warn-0.log.gz


+ 138 - 0
mjava-ruisi/pom.xml

@@ -0,0 +1,138 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>java-mcli</artifactId>
+        <groupId>com.malk</groupId>
+        <version>1.0-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>mjava-ruisi</artifactId>
+    <description>瑞思项目</description>
+
+    <properties>
+        <maven.compiler.source>8</maven.compiler.source>
+        <maven.compiler.target>8</maven.compiler.target>
+    </properties>
+
+    <dependencies>
+        <!-- 核心模块-->
+        <!--<dependency>
+            <groupId>com.malk</groupId>
+            <artifactId>mjava</artifactId>
+            <version>${mjava.version}</version>
+        </dependency>-->
+
+        <dependency>
+            <groupId>com.malk</groupId>
+            <artifactId>base</artifactId>
+            <version>1.0-SNAPSHOT</version>
+        </dependency>
+
+        <!--oracle-->
+        <dependency>
+            <groupId>com.oracle.database.jdbc</groupId>
+            <artifactId>ojdbc8</artifactId>
+            <version>19.3.0.0</version>
+        </dependency>
+
+        <!--mysql-->
+        <dependency>
+            <groupId>mysql</groupId>
+            <artifactId>mysql-connector-java</artifactId>
+            <version>8.0.28</version>
+        </dependency>
+
+        <!--mybatis-->
+        <dependency>
+            <groupId>org.mybatis.spring.boot</groupId>
+            <artifactId>mybatis-spring-boot-starter</artifactId>
+            <version>2.1.0</version>
+        </dependency>
+
+        <!--axis-->
+        <dependency>
+            <groupId>com.liferay</groupId>
+            <artifactId>org.apache.axis</artifactId>
+            <version>1.4.LIFERAY-PATCHED-7</version>
+        </dependency>
+
+        <!--javax-->
+        <dependency>
+            <groupId>javax.xml.rpc</groupId>
+            <artifactId>javax.xml.rpc-api</artifactId>
+            <version>1.1.2</version>
+        </dependency>
+
+        <!-- 添加Apache Commons Discovery依赖 -->
+        <dependency>
+            <groupId>commons-discovery</groupId>
+            <artifactId>commons-discovery</artifactId>
+            <version>0.5</version>
+        </dependency>
+
+        <!--hutool工具类-->
+        <dependency>
+            <groupId>cn.hutool</groupId>
+            <artifactId>hutool-all</artifactId>
+        </dependency>
+        <!-- JavaMail API -->
+        <dependency>
+            <groupId>javax.mail</groupId>
+            <artifactId>javax.mail-api</artifactId>
+            <version>1.6.2</version> <!-- 使用适合你项目的版本 -->
+        </dependency>
+        <!-- JavaMail 的具体实现(比如使用 com.sun.mail) -->
+        <dependency>
+            <groupId>com.sun.mail</groupId>
+            <artifactId>javax.mail</artifactId>
+            <version>1.6.2</version> <!-- 使用适合你项目的版本 -->
+        </dependency>
+        <!-- JavaBeans Activation Framework (JAF) -->
+        <dependency>
+            <groupId>javax.activation</groupId>
+            <artifactId>activation</artifactId>
+            <version>1.1.1</version> <!-- 使用适合你项目的版本 -->
+        </dependency>
+
+
+        <dependency>
+            <groupId>com.aliyun</groupId>
+            <artifactId>dingtalk</artifactId>
+            <version>2.0.14</version>
+        </dependency>
+        <dependency>
+            <groupId>org.hibernate.common</groupId>
+            <artifactId>hibernate-commons-annotations</artifactId>
+            <version>5.1.2.Final</version>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-maven-plugin</artifactId>
+                <version>2.1.1.RELEASE</version>
+                <configuration>
+                    <includeSystemScope>true</includeSystemScope>
+                    <!-- 如果没有该配置,devtools不会生效: 打包时关闭 -->
+                    <fork>false</fork>
+                    <!-- 避免中文乱码 -->
+                    <jvmArguments>-Dfile.encoding=UTF-8</jvmArguments>
+                </configuration>
+                <!-- 允许生成可运行jar -->
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>repackage</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+        <finalName>${project.artifactId}</finalName>
+    </build>
+</project>

+ 35 - 0
mjava-ruisi/src/main/java/com/malk/ruisi/Boot.java

@@ -0,0 +1,35 @@
+package com.malk.ruisi;
+
+import com.malk.ruisi.service.WriteKingDeeService;
+import com.querydsl.jpa.impl.JPAQueryFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.context.annotation.Bean;
+import org.springframework.data.jpa.repository.config.EnableJpaAuditing;
+
+import javax.persistence.EntityManager;
+import java.rmi.RemoteException;
+
+
+
+@EnableJpaAuditing
+@SpringBootApplication(scanBasePackages = {"com.malk"})
+public class Boot {
+
+
+    public static void main(String... args) throws RemoteException {
+
+        SpringApplication.run(Boot.class, args);
+        System.out.println("Ruisi_SpringBoot项目启动----------");
+
+    }
+
+   /**
+     * 让Spring管理JPAQueryFactory [不使用Qualifier详见mjava-Boot]
+     */
+    @Bean
+    public JPAQueryFactory jpaQueryFactory(EntityManager entityManager) {
+        return new JPAQueryFactory(entityManager);
+    }
+}

File diff suppressed because it is too large
+ 468 - 0
mjava-ruisi/src/main/java/com/malk/ruisi/client/RefundEntry.java


+ 80 - 0
mjava-ruisi/src/main/java/com/malk/ruisi/client/WSBean.java

@@ -0,0 +1,80 @@
+/**
+ * WSBean.java
+ *
+ * This file was auto-generated from WSDL
+ * by the Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java emitter.
+ */
+
+package com.malk.ruisi.client;
+
+public class WSBean  implements java.io.Serializable {
+    public WSBean() {
+    }
+
+    private Object __equalsCalc = null;
+    public synchronized boolean equals(Object obj) {
+        if (!(obj instanceof WSBean)) return false;
+        WSBean other = (WSBean) obj;
+        if (obj == null) return false;
+        if (this == obj) return true;
+        if (__equalsCalc != null) {
+            return (__equalsCalc == obj);
+        }
+        __equalsCalc = obj;
+        boolean _equals;
+        _equals = true;
+        __equalsCalc = null;
+        return _equals;
+    }
+
+    private boolean __hashCodeCalc = false;
+    public synchronized int hashCode() {
+        if (__hashCodeCalc) {
+            return 0;
+        }
+        __hashCodeCalc = true;
+        int _hashCode = 1;
+        __hashCodeCalc = false;
+        return _hashCode;
+    }
+
+    // Type metadata
+    private static org.apache.axis.description.TypeDesc typeDesc =
+        new org.apache.axis.description.TypeDesc(WSBean.class, true);
+
+    static {
+        typeDesc.setXmlType(new javax.xml.namespace.QName("urn:client.webserviceprovidefacade", "WSBean"));
+    }
+
+    /**
+     * Return type metadata object
+     */
+    public static org.apache.axis.description.TypeDesc getTypeDesc() {
+        return typeDesc;
+    }
+
+    /**
+     * Get Custom Serializer
+     */
+    public static org.apache.axis.encoding.Serializer getSerializer(
+           String mechType,
+           Class _javaType,
+           javax.xml.namespace.QName _xmlType) {
+        return 
+          new  org.apache.axis.encoding.ser.BeanSerializer(
+            _javaType, _xmlType, typeDesc);
+    }
+
+    /**
+     * Get Custom Deserializer
+     */
+    public static org.apache.axis.encoding.Deserializer getDeserializer(
+           String mechType,
+           Class _javaType,
+           javax.xml.namespace.QName _xmlType) {
+        return 
+          new  org.apache.axis.encoding.ser.BeanDeserializer(
+            _javaType, _xmlType, typeDesc);
+    }
+
+}

+ 308 - 0
mjava-ruisi/src/main/java/com/malk/ruisi/client/WSContext.java

@@ -0,0 +1,308 @@
+/**
+ * WSContext.java
+ *
+ * This file was auto-generated from WSDL
+ * by the Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java emitter.
+ */
+
+package com.malk.ruisi.client;
+
+public class WSContext implements java.io.Serializable {
+    private int dbType;
+
+    private String dcName;
+
+    private String password;
+
+    private String sessionId;
+
+    private String slnName;
+
+    private String userName;
+
+    public WSContext() {
+    }
+
+    public WSContext(
+           int dbType,
+           String dcName,
+           String password,
+           String sessionId,
+           String slnName,
+           String userName) {
+           this.dbType = dbType;
+           this.dcName = dcName;
+           this.password = password;
+           this.sessionId = sessionId;
+           this.slnName = slnName;
+           this.userName = userName;
+    }
+
+
+    /**
+     * Gets the dbType value for this WSContext.
+     * 
+     * @return dbType
+     */
+    public int getDbType() {
+        return dbType;
+    }
+
+
+    /**
+     * Sets the dbType value for this WSContext.
+     * 
+     * @param dbType
+     */
+    public void setDbType(int dbType) {
+        this.dbType = dbType;
+    }
+
+
+    /**
+     * Gets the dcName value for this WSContext.
+     * 
+     * @return dcName
+     */
+    public String getDcName() {
+        return dcName;
+    }
+
+
+    /**
+     * Sets the dcName value for this WSContext.
+     * 
+     * @param dcName
+     */
+    public void setDcName(String dcName) {
+        this.dcName = dcName;
+    }
+
+
+    /**
+     * Gets the password value for this WSContext.
+     * 
+     * @return password
+     */
+    public String getPassword() {
+        return password;
+    }
+
+
+    /**
+     * Sets the password value for this WSContext.
+     * 
+     * @param password
+     */
+    public void setPassword(String password) {
+        this.password = password;
+    }
+
+
+    /**
+     * Gets the sessionId value for this WSContext.
+     * 
+     * @return sessionId
+     */
+    public String getSessionId() {
+        return sessionId;
+    }
+
+
+    /**
+     * Sets the sessionId value for this WSContext.
+     * 
+     * @param sessionId
+     */
+    public void setSessionId(String sessionId) {
+        this.sessionId = sessionId;
+    }
+
+
+    /**
+     * Gets the slnName value for this WSContext.
+     * 
+     * @return slnName
+     */
+    public String getSlnName() {
+        return slnName;
+    }
+
+
+    /**
+     * Sets the slnName value for this WSContext.
+     * 
+     * @param slnName
+     */
+    public void setSlnName(String slnName) {
+        this.slnName = slnName;
+    }
+
+
+    /**
+     * Gets the userName value for this WSContext.
+     * 
+     * @return userName
+     */
+    public String getUserName() {
+        return userName;
+    }
+
+
+    /**
+     * Sets the userName value for this WSContext.
+     * 
+     * @param userName
+     */
+    public void setUserName(String userName) {
+        this.userName = userName;
+    }
+
+    private Object __equalsCalc = null;
+    public synchronized boolean equals(Object obj) {
+        if (!(obj instanceof WSContext)) return false;
+        WSContext other = (WSContext) obj;
+        if (obj == null) return false;
+        if (this == obj) return true;
+        if (__equalsCalc != null) {
+            return (__equalsCalc == obj);
+        }
+        __equalsCalc = obj;
+        boolean _equals;
+        _equals = true && 
+            this.dbType == other.getDbType() &&
+            ((this.dcName==null && other.getDcName()==null) || 
+             (this.dcName!=null &&
+              this.dcName.equals(other.getDcName()))) &&
+            ((this.password==null && other.getPassword()==null) || 
+             (this.password!=null &&
+              this.password.equals(other.getPassword()))) &&
+            ((this.sessionId==null && other.getSessionId()==null) || 
+             (this.sessionId!=null &&
+              this.sessionId.equals(other.getSessionId()))) &&
+            ((this.slnName==null && other.getSlnName()==null) || 
+             (this.slnName!=null &&
+              this.slnName.equals(other.getSlnName()))) &&
+            ((this.userName==null && other.getUserName()==null) || 
+             (this.userName!=null &&
+              this.userName.equals(other.getUserName())));
+        __equalsCalc = null;
+        return _equals;
+    }
+
+    private boolean __hashCodeCalc = false;
+    public synchronized int hashCode() {
+        if (__hashCodeCalc) {
+            return 0;
+        }
+        __hashCodeCalc = true;
+        int _hashCode = 1;
+        _hashCode += getDbType();
+        if (getDcName() != null) {
+            _hashCode += getDcName().hashCode();
+        }
+        if (getPassword() != null) {
+            _hashCode += getPassword().hashCode();
+        }
+        if (getSessionId() != null) {
+            _hashCode += getSessionId().hashCode();
+        }
+        if (getSlnName() != null) {
+            _hashCode += getSlnName().hashCode();
+        }
+        if (getUserName() != null) {
+            _hashCode += getUserName().hashCode();
+        }
+        __hashCodeCalc = false;
+        return _hashCode;
+    }
+
+    // Type metadata
+    private static org.apache.axis.description.TypeDesc typeDesc =
+        new org.apache.axis.description.TypeDesc(WSContext.class, true);
+
+    static {
+        typeDesc.setXmlType(new javax.xml.namespace.QName("urn:client", "WSContext"));
+        org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc();
+        elemField.setFieldName("dbType");
+        elemField.setXmlName(new javax.xml.namespace.QName("", "dbType"));
+        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "int"));
+        elemField.setNillable(false);
+        typeDesc.addFieldDesc(elemField);
+        elemField = new org.apache.axis.description.ElementDesc();
+        elemField.setFieldName("dcName");
+        elemField.setXmlName(new javax.xml.namespace.QName("", "dcName"));
+        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
+        elemField.setNillable(true);
+        typeDesc.addFieldDesc(elemField);
+        elemField = new org.apache.axis.description.ElementDesc();
+        elemField.setFieldName("password");
+        elemField.setXmlName(new javax.xml.namespace.QName("", "password"));
+        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
+        elemField.setNillable(true);
+        typeDesc.addFieldDesc(elemField);
+        elemField = new org.apache.axis.description.ElementDesc();
+        elemField.setFieldName("sessionId");
+        elemField.setXmlName(new javax.xml.namespace.QName("", "sessionId"));
+        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
+        elemField.setNillable(true);
+        typeDesc.addFieldDesc(elemField);
+        elemField = new org.apache.axis.description.ElementDesc();
+        elemField.setFieldName("slnName");
+        elemField.setXmlName(new javax.xml.namespace.QName("", "slnName"));
+        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
+        elemField.setNillable(true);
+        typeDesc.addFieldDesc(elemField);
+        elemField = new org.apache.axis.description.ElementDesc();
+        elemField.setFieldName("userName");
+        elemField.setXmlName(new javax.xml.namespace.QName("", "userName"));
+        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
+        elemField.setNillable(true);
+        typeDesc.addFieldDesc(elemField);
+    }
+
+    /**
+     * Return type metadata object
+     */
+    public static org.apache.axis.description.TypeDesc getTypeDesc() {
+        return typeDesc;
+    }
+
+    /**
+     * Get Custom Serializer
+     */
+    public static org.apache.axis.encoding.Serializer getSerializer(
+           String mechType,
+           Class _javaType,
+           javax.xml.namespace.QName _xmlType) {
+        return 
+          new  org.apache.axis.encoding.ser.BeanSerializer(
+            _javaType, _xmlType, typeDesc);
+    }
+
+    /**
+     * Get Custom Deserializer
+     */
+    public static org.apache.axis.encoding.Deserializer getDeserializer(
+           String mechType,
+           Class _javaType,
+           javax.xml.namespace.QName _xmlType) {
+        return 
+          new  org.apache.axis.encoding.ser.BeanDeserializer(
+            _javaType, _xmlType, typeDesc);
+    }
+
+    @Override
+    public String toString() {
+        return "WSContext{" +
+                "dbType=" + dbType +
+                ", dcName='" + dcName + '\'' +
+                ", password='" + password + '\'' +
+                ", sessionId='" + sessionId + '\'' +
+                ", slnName='" + slnName + '\'' +
+                ", userName='" + userName + '\'' +
+                ", __equalsCalc=" + __equalsCalc +
+                ", __hashCodeCalc=" + __hashCodeCalc +
+                '}';
+    }
+}

+ 307 - 0
mjava-ruisi/src/main/java/com/malk/ruisi/client/WSIncome.java

@@ -0,0 +1,307 @@
+/**
+ * WSIncome.java
+ *
+ * This file was auto-generated from WSDL
+ * by the Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java emitter.
+ */
+
+package com.malk.ruisi.client;
+
+public class WSIncome  extends com.malk.ruisi.client.WSBean  implements java.io.Serializable {
+    private String bizDate;
+
+    private String company;
+
+    private String decription;
+
+    private com.malk.ruisi.client.WSIncomeEntry[] entry;
+
+    private String sessionId;
+
+    private String user;
+
+    public WSIncome() {
+    }
+
+    public WSIncome(
+           String bizDate,
+           String company,
+           String decription,
+           com.malk.ruisi.client.WSIncomeEntry[] entry,
+           String sessionId,
+           String user) {
+        this.bizDate = bizDate;
+        this.company = company;
+        this.decription = decription;
+        this.entry = entry;
+        this.sessionId = sessionId;
+        this.user = user;
+    }
+
+
+    /**
+     * Gets the bizDate value for this WSIncome.
+     * 
+     * @return bizDate
+     */
+    public String getBizDate() {
+        return bizDate;
+    }
+
+
+    /**
+     * Sets the bizDate value for this WSIncome.
+     * 
+     * @param bizDate
+     */
+    public void setBizDate(String bizDate) {
+        this.bizDate = bizDate;
+    }
+
+
+    /**
+     * Gets the company value for this WSIncome.
+     * 
+     * @return company
+     */
+    public String getCompany() {
+        return company;
+    }
+
+
+    /**
+     * Sets the company value for this WSIncome.
+     * 
+     * @param company
+     */
+    public void setCompany(String company) {
+        this.company = company;
+    }
+
+
+    /**
+     * Gets the decription value for this WSIncome.
+     * 
+     * @return decription
+     */
+    public String getDecription() {
+        return decription;
+    }
+
+
+    /**
+     * Sets the decription value for this WSIncome.
+     * 
+     * @param decription
+     */
+    public void setDecription(String decription) {
+        this.decription = decription;
+    }
+
+
+    /**
+     * Gets the entry value for this WSIncome.
+     * 
+     * @return entry
+     */
+    public com.malk.ruisi.client.WSIncomeEntry[] getEntry() {
+        return entry;
+    }
+
+
+    /**
+     * Sets the entry value for this WSIncome.
+     * 
+     * @param entry
+     */
+    public void setEntry(com.malk.ruisi.client.WSIncomeEntry[] entry) {
+        this.entry = entry;
+    }
+
+
+    /**
+     * Gets the sessionId value for this WSIncome.
+     * 
+     * @return sessionId
+     */
+    public String getSessionId() {
+        return sessionId;
+    }
+
+
+    /**
+     * Sets the sessionId value for this WSIncome.
+     * 
+     * @param sessionId
+     */
+    public void setSessionId(String sessionId) {
+        this.sessionId = sessionId;
+    }
+
+
+    /**
+     * Gets the user value for this WSIncome.
+     * 
+     * @return user
+     */
+    public String getUser() {
+        return user;
+    }
+
+
+    /**
+     * Sets the user value for this WSIncome.
+     * 
+     * @param user
+     */
+    public void setUser(String user) {
+        this.user = user;
+    }
+
+    private Object __equalsCalc = null;
+    public synchronized boolean equals(Object obj) {
+        if (!(obj instanceof WSIncome)) return false;
+        WSIncome other = (WSIncome) obj;
+        if (obj == null) return false;
+        if (this == obj) return true;
+        if (__equalsCalc != null) {
+            return (__equalsCalc == obj);
+        }
+        __equalsCalc = obj;
+        boolean _equals;
+        _equals = super.equals(obj) && 
+            ((this.bizDate==null && other.getBizDate()==null) || 
+             (this.bizDate!=null &&
+              this.bizDate.equals(other.getBizDate()))) &&
+            ((this.company==null && other.getCompany()==null) || 
+             (this.company!=null &&
+              this.company.equals(other.getCompany()))) &&
+            ((this.decription==null && other.getDecription()==null) || 
+             (this.decription!=null &&
+              this.decription.equals(other.getDecription()))) &&
+            ((this.entry==null && other.getEntry()==null) || 
+             (this.entry!=null &&
+              java.util.Arrays.equals(this.entry, other.getEntry()))) &&
+            ((this.sessionId==null && other.getSessionId()==null) || 
+             (this.sessionId!=null &&
+              this.sessionId.equals(other.getSessionId()))) &&
+            ((this.user==null && other.getUser()==null) || 
+             (this.user!=null &&
+              this.user.equals(other.getUser())));
+        __equalsCalc = null;
+        return _equals;
+    }
+
+    private boolean __hashCodeCalc = false;
+    public synchronized int hashCode() {
+        if (__hashCodeCalc) {
+            return 0;
+        }
+        __hashCodeCalc = true;
+        int _hashCode = super.hashCode();
+        if (getBizDate() != null) {
+            _hashCode += getBizDate().hashCode();
+        }
+        if (getCompany() != null) {
+            _hashCode += getCompany().hashCode();
+        }
+        if (getDecription() != null) {
+            _hashCode += getDecription().hashCode();
+        }
+        if (getEntry() != null) {
+            for (int i=0;
+                 i<java.lang.reflect.Array.getLength(getEntry());
+                 i++) {
+                Object obj = java.lang.reflect.Array.get(getEntry(), i);
+                if (obj != null &&
+                    !obj.getClass().isArray()) {
+                    _hashCode += obj.hashCode();
+                }
+            }
+        }
+        if (getSessionId() != null) {
+            _hashCode += getSessionId().hashCode();
+        }
+        if (getUser() != null) {
+            _hashCode += getUser().hashCode();
+        }
+        __hashCodeCalc = false;
+        return _hashCode;
+    }
+
+    // Type metadata
+    private static org.apache.axis.description.TypeDesc typeDesc =
+        new org.apache.axis.description.TypeDesc(WSIncome.class, true);
+
+    static {
+        typeDesc.setXmlType(new javax.xml.namespace.QName("urn:client.income", "WSIncome"));
+        org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc();
+        elemField.setFieldName("bizDate");
+        elemField.setXmlName(new javax.xml.namespace.QName("", "bizDate"));
+        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
+        elemField.setNillable(true);
+        typeDesc.addFieldDesc(elemField);
+        elemField = new org.apache.axis.description.ElementDesc();
+        elemField.setFieldName("company");
+        elemField.setXmlName(new javax.xml.namespace.QName("", "company"));
+        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
+        elemField.setNillable(true);
+        typeDesc.addFieldDesc(elemField);
+        elemField = new org.apache.axis.description.ElementDesc();
+        elemField.setFieldName("decription");
+        elemField.setXmlName(new javax.xml.namespace.QName("", "decription"));
+        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
+        elemField.setNillable(true);
+        typeDesc.addFieldDesc(elemField);
+        elemField = new org.apache.axis.description.ElementDesc();
+        elemField.setFieldName("entry");
+        elemField.setXmlName(new javax.xml.namespace.QName("", "entry"));
+        elemField.setXmlType(new javax.xml.namespace.QName("urn:client.income", "WSIncomeEntry"));
+        elemField.setNillable(true);
+        typeDesc.addFieldDesc(elemField);
+        elemField = new org.apache.axis.description.ElementDesc();
+        elemField.setFieldName("sessionId");
+        elemField.setXmlName(new javax.xml.namespace.QName("", "sessionId"));
+        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
+        elemField.setNillable(true);
+        typeDesc.addFieldDesc(elemField);
+        elemField = new org.apache.axis.description.ElementDesc();
+        elemField.setFieldName("user");
+        elemField.setXmlName(new javax.xml.namespace.QName("", "user"));
+        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
+        elemField.setNillable(true);
+        typeDesc.addFieldDesc(elemField);
+    }
+
+    /**
+     * Return type metadata object
+     */
+    public static org.apache.axis.description.TypeDesc getTypeDesc() {
+        return typeDesc;
+    }
+
+    /**
+     * Get Custom Serializer
+     */
+    public static org.apache.axis.encoding.Serializer getSerializer(
+           String mechType,
+           Class _javaType,
+           javax.xml.namespace.QName _xmlType) {
+        return 
+          new  org.apache.axis.encoding.ser.BeanSerializer(
+            _javaType, _xmlType, typeDesc);
+    }
+
+    /**
+     * Get Custom Deserializer
+     */
+    public static org.apache.axis.encoding.Deserializer getDeserializer(
+           String mechType,
+           Class _javaType,
+           javax.xml.namespace.QName _xmlType) {
+        return 
+          new  org.apache.axis.encoding.ser.BeanDeserializer(
+            _javaType, _xmlType, typeDesc);
+    }
+
+}

+ 424 - 0
mjava-ruisi/src/main/java/com/malk/ruisi/client/WSIncomeEntry.java

@@ -0,0 +1,424 @@
+/**
+ * WSIncomeEntry.java
+ *
+ * This file was auto-generated from WSDL
+ * by the Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java emitter.
+ */
+
+package com.malk.ruisi.client;
+
+public class WSIncomeEntry  extends com.malk.ruisi.client.WSBean  implements java.io.Serializable {
+    private double amount;
+
+    private String amountType;
+
+    private double amountlocal;
+
+    private String biztype;
+
+    private String currency;
+
+    private String decription;
+
+    private double exchangeRate;
+
+    private WSIncome parent;
+        
+    private String studentNumber ;
+
+    private String studentName ;
+
+    private String contractNumber ;
+
+    public WSIncomeEntry() {
+    }
+
+    public WSIncomeEntry(
+           double amount,
+           String amountType,
+           double amountlocal,
+           String biztype,
+           String currency,
+           String decription,
+           double exchangeRate,
+           WSIncome parent,
+           String studentNumber,
+           String studentName,
+           String contractNumber) {
+        this.amount = amount;
+        this.amountType = amountType;
+        this.amountlocal = amountlocal;
+        this.biztype = biztype;
+        this.currency = currency;
+        this.decription = decription;
+        this.exchangeRate = exchangeRate;
+        this.parent = parent;
+        this.studentNumber = studentNumber;
+        this.studentName = studentName;
+        this.contractNumber = contractNumber;
+    }
+
+
+    /**
+     * Gets the amount value for this WSIncomeEntry.
+     * 
+     * @return amount
+     */
+    public double getAmount() {
+        return amount;
+    }
+
+
+    /**
+     * Sets the amount value for this WSIncomeEntry.
+     * 
+     * @param amount
+     */
+    public void setAmount(double amount) {
+        this.amount = amount;
+    }
+
+
+    /**
+     * Gets the amountType value for this WSIncomeEntry.
+     * 
+     * @return amountType
+     */
+    public String getAmountType() {
+        return amountType;
+    }
+
+
+    /**
+     * Sets the amountType value for this WSIncomeEntry.
+     * 
+     * @param amountType
+     */
+    public void setAmountType(String amountType) {
+        this.amountType = amountType;
+    }
+
+
+    /**
+     * Gets the amountlocal value for this WSIncomeEntry.
+     * 
+     * @return amountlocal
+     */
+    public double getAmountlocal() {
+        return amountlocal;
+    }
+
+
+    /**
+     * Sets the amountlocal value for this WSIncomeEntry.
+     * 
+     * @param amountlocal
+     */
+    public void setAmountlocal(double amountlocal) {
+        this.amountlocal = amountlocal;
+    }
+
+
+    /**
+     * Gets the biztype value for this WSIncomeEntry.
+     * 
+     * @return biztype
+     */
+    public String getBiztype() {
+        return biztype;
+    }
+
+
+    /**
+     * Sets the biztype value for this WSIncomeEntry.
+     * 
+     * @param biztype
+     */
+    public void setBiztype(String biztype) {
+        this.biztype = biztype;
+    }
+
+
+    /**
+     * Gets the currency value for this WSIncomeEntry.
+     * 
+     * @return currency
+     */
+    public String getCurrency() {
+        return currency;
+    }
+
+
+    /**
+     * Sets the currency value for this WSIncomeEntry.
+     * 
+     * @param currency
+     */
+    public void setCurrency(String currency) {
+        this.currency = currency;
+    }
+
+
+    /**
+     * Gets the decription value for this WSIncomeEntry.
+     * 
+     * @return decription
+     */
+    public String getDecription() {
+        return decription;
+    }
+
+
+    /**
+     * Sets the decription value for this WSIncomeEntry.
+     * 
+     * @param decription
+     */
+    public void setDecription(String decription) {
+        this.decription = decription;
+    }
+
+
+    /**
+     * Gets the exchangeRate value for this WSIncomeEntry.
+     * 
+     * @return exchangeRate
+     */
+    public double getExchangeRate() {
+        return exchangeRate;
+    }
+
+
+    /**
+     * Sets the exchangeRate value for this WSIncomeEntry.
+     * 
+     * @param exchangeRate
+     */
+    public void setExchangeRate(double exchangeRate) {
+        this.exchangeRate = exchangeRate;
+    }
+
+
+    /**
+     * Gets the parent value for this WSIncomeEntry.
+     * 
+     * @return parent
+     */
+    public WSIncome getParent() {
+        return parent;
+    }
+
+
+    /**
+     * Sets the parent value for this WSIncomeEntry.
+     * 
+     * @param parent
+     */
+    public void setParent(WSIncome parent) {
+        this.parent = parent;
+    }
+
+    public String getStudentNumber() {
+		return studentNumber;
+	}
+
+	public void setStudentNumber(String studentNumber) {
+		this.studentNumber = studentNumber;
+	}
+
+	public String getStudentName() {
+		return studentName;
+	}
+
+	public void setStudentName(String studentName) {
+		this.studentName = studentName;
+	}
+
+	public String getContractNumber() {
+		return contractNumber;
+	}
+
+	public void setContractNumber(String contractNumber) {
+		this.contractNumber = contractNumber;
+	}
+
+
+
+	private Object __equalsCalc = null;
+    public synchronized boolean equals(Object obj) {
+        if (!(obj instanceof WSIncomeEntry)) return false;
+        WSIncomeEntry other = (WSIncomeEntry) obj;
+        if (obj == null) return false;
+        if (this == obj) return true;
+        if (__equalsCalc != null) {
+            return (__equalsCalc == obj);
+        }
+        __equalsCalc = obj;
+        boolean _equals;
+        _equals = super.equals(obj) && 
+            this.amount == other.getAmount() &&
+            ((this.amountType==null && other.getAmountType()==null) || 
+             (this.amountType!=null &&
+              this.amountType.equals(other.getAmountType()))) &&
+            this.amountlocal == other.getAmountlocal() &&
+            ((this.biztype==null && other.getBiztype()==null) || 
+             (this.biztype!=null &&
+              this.biztype.equals(other.getBiztype()))) &&
+            ((this.currency==null && other.getCurrency()==null) || 
+             (this.currency!=null &&
+              this.currency.equals(other.getCurrency()))) &&
+            ((this.decription==null && other.getDecription()==null) || 
+             (this.decription!=null &&
+              this.decription.equals(other.getDecription()))) &&
+            this.exchangeRate == other.getExchangeRate() &&
+            ((this.parent==null && other.getParent()==null) || 
+             (this.parent!=null &&
+              this.parent.equals(other.getParent()))) &&
+            ((this.studentNumber==null && other.getStudentNumber()==null) || 
+             (this.studentNumber!=null &&
+              this.studentNumber.equals(other.getStudentNumber()))) &&
+            ((this.studentName==null && other.getStudentName()==null) || 
+              (this.studentName!=null &&
+               this.studentName.equals(other.getStudentName()))) &&
+            ((this.contractNumber==null && other.getContractNumber()==null) || 
+              (this.contractNumber!=null &&
+               this.contractNumber.equals(other.getContractNumber())));
+        __equalsCalc = null;
+        return _equals;
+    }
+
+    private boolean __hashCodeCalc = false;
+    public synchronized int hashCode() {
+        if (__hashCodeCalc) {
+            return 0;
+        }
+        __hashCodeCalc = true;
+        int _hashCode = super.hashCode();
+        _hashCode += new Double(getAmount()).hashCode();
+        if (getAmountType() != null) {
+            _hashCode += getAmountType().hashCode();
+        }
+        _hashCode += new Double(getAmountlocal()).hashCode();
+        if (getBiztype() != null) {
+            _hashCode += getBiztype().hashCode();
+        }
+        if (getCurrency() != null) {
+            _hashCode += getCurrency().hashCode();
+        }
+        if (getDecription() != null) {
+            _hashCode += getDecription().hashCode();
+        }
+        _hashCode += new Double(getExchangeRate()).hashCode();
+        if (getParent() != null) {
+            _hashCode += getParent().hashCode();
+        }
+        __hashCodeCalc = false;
+        return _hashCode;
+    }
+
+    // Type metadata
+    private static org.apache.axis.description.TypeDesc typeDesc =
+        new org.apache.axis.description.TypeDesc(WSIncomeEntry.class, true);
+
+    static {
+        typeDesc.setXmlType(new javax.xml.namespace.QName("urn:client.income", "WSIncomeEntry"));
+        org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc();
+        elemField.setFieldName("amount");
+        elemField.setXmlName(new javax.xml.namespace.QName("", "amount"));
+        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "double"));
+        elemField.setNillable(false);
+        typeDesc.addFieldDesc(elemField);
+        elemField = new org.apache.axis.description.ElementDesc();
+        elemField.setFieldName("amountType");
+        elemField.setXmlName(new javax.xml.namespace.QName("", "amountType"));
+        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
+        elemField.setNillable(true);
+        typeDesc.addFieldDesc(elemField);
+        elemField = new org.apache.axis.description.ElementDesc();
+        elemField.setFieldName("amountlocal");
+        elemField.setXmlName(new javax.xml.namespace.QName("", "amountlocal"));
+        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "double"));
+        elemField.setNillable(false);
+        typeDesc.addFieldDesc(elemField);
+        elemField = new org.apache.axis.description.ElementDesc();
+        elemField.setFieldName("biztype");
+        elemField.setXmlName(new javax.xml.namespace.QName("", "biztype"));
+        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
+        elemField.setNillable(true);
+        typeDesc.addFieldDesc(elemField);
+        elemField = new org.apache.axis.description.ElementDesc();
+        elemField.setFieldName("currency");
+        elemField.setXmlName(new javax.xml.namespace.QName("", "currency"));
+        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
+        elemField.setNillable(true);
+        typeDesc.addFieldDesc(elemField);
+        elemField = new org.apache.axis.description.ElementDesc();
+        elemField.setFieldName("decription");
+        elemField.setXmlName(new javax.xml.namespace.QName("", "decription"));
+        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
+        elemField.setNillable(true);
+        typeDesc.addFieldDesc(elemField);
+        elemField = new org.apache.axis.description.ElementDesc();
+        elemField.setFieldName("exchangeRate");
+        elemField.setXmlName(new javax.xml.namespace.QName("", "exchangeRate"));
+        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "double"));
+        elemField.setNillable(false);
+        typeDesc.addFieldDesc(elemField);
+        elemField = new org.apache.axis.description.ElementDesc();
+        elemField.setFieldName("parent");
+        elemField.setXmlName(new javax.xml.namespace.QName("", "parent"));
+        elemField.setXmlType(new javax.xml.namespace.QName("urn:client.income", "WSIncome"));
+        elemField.setNillable(true);
+        typeDesc.addFieldDesc(elemField);
+        elemField = new org.apache.axis.description.ElementDesc();
+        elemField.setFieldName("studentNumber");
+        elemField.setXmlName(new javax.xml.namespace.QName("", "studentNumber"));
+        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
+        elemField.setNillable(true);
+        typeDesc.addFieldDesc(elemField);
+        elemField = new org.apache.axis.description.ElementDesc();
+        elemField.setFieldName("studentName");
+        elemField.setXmlName(new javax.xml.namespace.QName("", "studentName"));
+        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
+        elemField.setNillable(true);
+        typeDesc.addFieldDesc(elemField);
+        elemField = new org.apache.axis.description.ElementDesc();
+        elemField.setFieldName("contractNumber");
+        elemField.setXmlName(new javax.xml.namespace.QName("", "contractNumber"));
+        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
+        elemField.setNillable(true);
+        typeDesc.addFieldDesc(elemField);
+    }
+
+    /**
+     * Return type metadata object
+     */
+    public static org.apache.axis.description.TypeDesc getTypeDesc() {
+        return typeDesc;
+    }
+
+    /**
+     * Get Custom Serializer
+     */
+    public static org.apache.axis.encoding.Serializer getSerializer(
+           String mechType,
+           Class _javaType,
+           javax.xml.namespace.QName _xmlType) {
+        return 
+          new  org.apache.axis.encoding.ser.BeanSerializer(
+            _javaType, _xmlType, typeDesc);
+    }
+
+    /**
+     * Get Custom Deserializer
+     */
+    public static org.apache.axis.encoding.Deserializer getDeserializer(
+           String mechType,
+           Class _javaType,
+           javax.xml.namespace.QName _xmlType) {
+        return 
+          new  org.apache.axis.encoding.ser.BeanDeserializer(
+            _javaType, _xmlType, typeDesc);
+    }
+
+}

+ 87 - 0
mjava-ruisi/src/main/java/com/malk/ruisi/client/WSInvokeException.java

@@ -0,0 +1,87 @@
+/**
+ * WSInvokeException.java
+ *
+ * This file was auto-generated from WSDL
+ * by the Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java emitter.
+ */
+
+package com.malk.ruisi.client;
+
+public class WSInvokeException  extends org.apache.axis.AxisFault  implements java.io.Serializable {
+    public WSInvokeException() {
+    }
+
+    private Object __equalsCalc = null;
+    public synchronized boolean equals(Object obj) {
+        if (!(obj instanceof WSInvokeException)) return false;
+        WSInvokeException other = (WSInvokeException) obj;
+        if (obj == null) return false;
+        if (this == obj) return true;
+        if (__equalsCalc != null) {
+            return (__equalsCalc == obj);
+        }
+        __equalsCalc = obj;
+        boolean _equals;
+        _equals = true;
+        __equalsCalc = null;
+        return _equals;
+    }
+
+    private boolean __hashCodeCalc = false;
+    public synchronized int hashCode() {
+        if (__hashCodeCalc) {
+            return 0;
+        }
+        __hashCodeCalc = true;
+        int _hashCode = 1;
+        __hashCodeCalc = false;
+        return _hashCode;
+    }
+
+    // Type metadata
+    private static org.apache.axis.description.TypeDesc typeDesc =
+        new org.apache.axis.description.TypeDesc(WSInvokeException.class, true);
+
+    static {
+        typeDesc.setXmlType(new javax.xml.namespace.QName("urn:client.webserviceprovidefacade", "WSInvokeException"));
+    }
+
+    /**
+     * Return type metadata object
+     */
+    public static org.apache.axis.description.TypeDesc getTypeDesc() {
+        return typeDesc;
+    }
+
+    /**
+     * Get Custom Serializer
+     */
+    public static org.apache.axis.encoding.Serializer getSerializer(
+           String mechType,
+           Class _javaType,
+           javax.xml.namespace.QName _xmlType) {
+        return 
+          new  org.apache.axis.encoding.ser.BeanSerializer(
+            _javaType, _xmlType, typeDesc);
+    }
+
+    /**
+     * Get Custom Deserializer
+     */
+    public static org.apache.axis.encoding.Deserializer getDeserializer(
+           String mechType,
+           Class _javaType,
+           javax.xml.namespace.QName _xmlType) {
+        return 
+          new  org.apache.axis.encoding.ser.BeanDeserializer(
+            _javaType, _xmlType, typeDesc);
+    }
+
+
+    /**
+     * Writes the exception data to the faultDetails
+     */
+    public void writeDetails(javax.xml.namespace.QName qname, org.apache.axis.encoding.SerializationContext context) throws java.io.IOException {
+        context.serialize(qname, null, this);
+    }
+}

+ 306 - 0
mjava-ruisi/src/main/java/com/malk/ruisi/client/WSReceive.java

@@ -0,0 +1,306 @@
+/**
+ * WSReceive.java
+ *
+ * This file was auto-generated from WSDL
+ * by the Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java emitter.
+ */
+
+package com.malk.ruisi.client;
+
+public class WSReceive  extends com.malk.ruisi.client.WSBean  implements java.io.Serializable {
+    private String bizDate;
+
+    private String company;
+
+    private String decription;
+
+    private com.malk.ruisi.client.WSReceiveEntry[] entry;
+
+    private String sessionID;
+
+    private String user;
+
+    public WSReceive() {
+    }
+
+    public WSReceive(
+           String bizDate,
+           String company,
+           String decription,
+           com.malk.ruisi.client.WSReceiveEntry[] entry,
+           String sessionID,
+           String user) {
+        this.bizDate = bizDate;
+        this.company = company;
+        this.decription = decription;
+        this.entry = entry;
+        this.sessionID = sessionID;
+        this.user = user;
+    }
+
+
+    /**
+     * Gets the bizDate value for this WSReceive.
+     * 
+     * @return bizDate
+     */
+    public String getBizDate() {
+        return bizDate;
+    }
+
+
+    /**
+     * Sets the bizDate value for this WSReceive.
+     * 
+     * @param bizDate
+     */
+    public void setBizDate(String bizDate) {
+        this.bizDate = bizDate;
+    }
+
+
+    /**
+     * Gets the company value for this WSReceive.
+     * 
+     * @return company
+     */
+    public String getCompany() {
+        return company;
+    }
+
+
+    /**
+     * Sets the company value for this WSReceive.
+     * 
+     * @param company
+     */
+    public void setCompany(String company) {
+        this.company = company;
+    }
+
+	/**
+     * Gets the decription value for this WSReceive.
+     * 
+     * @return decription
+     */
+    public String getDecription() {
+        return decription;
+    }
+
+
+    /**
+     * Sets the decription value for this WSReceive.
+     * 
+     * @param decription
+     */
+    public void setDecription(String decription) {
+        this.decription = decription;
+    }
+
+
+    /**
+     * Gets the entry value for this WSReceive.
+     * 
+     * @return entry
+     */
+    public com.malk.ruisi.client.WSReceiveEntry[] getEntry() {
+        return entry;
+    }
+
+
+    /**
+     * Sets the entry value for this WSReceive.
+     * 
+     * @param entry
+     */
+    public void setEntry(com.malk.ruisi.client.WSReceiveEntry[] entry) {
+        this.entry = entry;
+    }
+
+
+    /**
+     * Gets the sessionID value for this WSReceive.
+     * 
+     * @return sessionID
+     */
+    public String getSessionID() {
+        return sessionID;
+    }
+
+
+    /**
+     * Sets the sessionID value for this WSReceive.
+     * 
+     * @param sessionID
+     */
+    public void setSessionID(String sessionID) {
+        this.sessionID = sessionID;
+    }
+
+
+    /**
+     * Gets the user value for this WSReceive.
+     * 
+     * @return user
+     */
+    public String getUser() {
+        return user;
+    }
+
+
+    /**
+     * Sets the user value for this WSReceive.
+     * 
+     * @param user
+     */
+    public void setUser(String user) {
+        this.user = user;
+    }
+
+    private Object __equalsCalc = null;
+    public synchronized boolean equals(Object obj) {
+        if (!(obj instanceof WSReceive)) return false;
+        WSReceive other = (WSReceive) obj;
+        if (obj == null) return false;
+        if (this == obj) return true;
+        if (__equalsCalc != null) {
+            return (__equalsCalc == obj);
+        }
+        __equalsCalc = obj;
+        boolean _equals;
+        _equals = super.equals(obj) && 
+            ((this.bizDate==null && other.getBizDate()==null) || 
+             (this.bizDate!=null &&
+              this.bizDate.equals(other.getBizDate()))) &&
+            ((this.company==null && other.getCompany()==null) || 
+             (this.company!=null &&
+              this.company.equals(other.getCompany()))) &&
+            ((this.decription==null && other.getDecription()==null) || 
+             (this.decription!=null &&
+              this.decription.equals(other.getDecription()))) &&
+            ((this.entry==null && other.getEntry()==null) || 
+             (this.entry!=null &&
+              java.util.Arrays.equals(this.entry, other.getEntry()))) &&
+            ((this.sessionID==null && other.getSessionID()==null) || 
+             (this.sessionID!=null &&
+              this.sessionID.equals(other.getSessionID()))) &&
+            ((this.user==null && other.getUser()==null) || 
+             (this.user!=null &&
+              this.user.equals(other.getUser())));
+        __equalsCalc = null;
+        return _equals;
+    }
+
+    private boolean __hashCodeCalc = false;
+    public synchronized int hashCode() {
+        if (__hashCodeCalc) {
+            return 0;
+        }
+        __hashCodeCalc = true;
+        int _hashCode = super.hashCode();
+        if (getBizDate() != null) {
+            _hashCode += getBizDate().hashCode();
+        }
+        if (getCompany() != null) {
+            _hashCode += getCompany().hashCode();
+        }
+        if (getDecription() != null) {
+            _hashCode += getDecription().hashCode();
+        }
+        if (getEntry() != null) {
+            for (int i=0;
+                 i<java.lang.reflect.Array.getLength(getEntry());
+                 i++) {
+                Object obj = java.lang.reflect.Array.get(getEntry(), i);
+                if (obj != null &&
+                    !obj.getClass().isArray()) {
+                    _hashCode += obj.hashCode();
+                }
+            }
+        }
+        if (getSessionID() != null) {
+            _hashCode += getSessionID().hashCode();
+        }
+        if (getUser() != null) {
+            _hashCode += getUser().hashCode();
+        }
+        __hashCodeCalc = false;
+        return _hashCode;
+    }
+
+    // Type metadata
+    private static org.apache.axis.description.TypeDesc typeDesc =
+        new org.apache.axis.description.TypeDesc(WSReceive.class, true);
+
+    static {
+        typeDesc.setXmlType(new javax.xml.namespace.QName("urn:client.receive", "WSReceive"));
+        org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc();
+        elemField.setFieldName("bizDate");
+        elemField.setXmlName(new javax.xml.namespace.QName("", "bizDate"));
+        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
+        elemField.setNillable(true);
+        typeDesc.addFieldDesc(elemField);
+        elemField = new org.apache.axis.description.ElementDesc();
+        elemField.setFieldName("company");
+        elemField.setXmlName(new javax.xml.namespace.QName("", "company"));
+        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
+        elemField.setNillable(true);
+        typeDesc.addFieldDesc(elemField);
+        elemField = new org.apache.axis.description.ElementDesc();
+        elemField.setFieldName("decription");
+        elemField.setXmlName(new javax.xml.namespace.QName("", "decription"));
+        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
+        elemField.setNillable(true);
+        typeDesc.addFieldDesc(elemField);
+        elemField = new org.apache.axis.description.ElementDesc();
+        elemField.setFieldName("entry");
+        elemField.setXmlName(new javax.xml.namespace.QName("", "entry"));
+        elemField.setXmlType(new javax.xml.namespace.QName("urn:client.receive", "WSReceiveEntry"));
+        elemField.setNillable(true);
+        typeDesc.addFieldDesc(elemField);
+        elemField = new org.apache.axis.description.ElementDesc();
+        elemField.setFieldName("sessionID");
+        elemField.setXmlName(new javax.xml.namespace.QName("", "sessionID"));
+        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
+        elemField.setNillable(true);
+        typeDesc.addFieldDesc(elemField);
+        elemField = new org.apache.axis.description.ElementDesc();
+        elemField.setFieldName("user");
+        elemField.setXmlName(new javax.xml.namespace.QName("", "user"));
+        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
+        elemField.setNillable(true);
+        typeDesc.addFieldDesc(elemField);
+    }
+
+    /**
+     * Return type metadata object
+     */
+    public static org.apache.axis.description.TypeDesc getTypeDesc() {
+        return typeDesc;
+    }
+
+    /**
+     * Get Custom Serializer
+     */
+    public static org.apache.axis.encoding.Serializer getSerializer(
+           String mechType,
+           Class _javaType,
+           javax.xml.namespace.QName _xmlType) {
+        return 
+          new  org.apache.axis.encoding.ser.BeanSerializer(
+            _javaType, _xmlType, typeDesc);
+    }
+
+    /**
+     * Get Custom Deserializer
+     */
+    public static org.apache.axis.encoding.Deserializer getDeserializer(
+           String mechType,
+           Class _javaType,
+           javax.xml.namespace.QName _xmlType) {
+        return 
+          new  org.apache.axis.encoding.ser.BeanDeserializer(
+            _javaType, _xmlType, typeDesc);
+    }
+
+}

+ 689 - 0
mjava-ruisi/src/main/java/com/malk/ruisi/client/WSReceiveEntry.java

@@ -0,0 +1,689 @@
+/**
+ * WSReceiveEntry.java
+ *
+ * This file was auto-generated from WSDL
+ * by the Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java emitter.
+ */
+
+package com.malk.ruisi.client;
+
+public class WSReceiveEntry  extends com.malk.ruisi.client.WSBean  implements java.io.Serializable {
+    private double accountLocal;
+
+    private boolean agency;
+
+    private double amount;
+
+    private String amountType;
+
+    private String bank;
+
+    private String bankAccount;
+
+    private String bizDate;
+
+    private String bizType;
+
+    private String cssp;
+
+    private String currency;
+
+    private String decription;
+
+    private double exchangeRate;
+
+    private WSReceive parent;
+
+    private String payType;
+
+    private boolean revice;
+    
+    private String studentNumber ;
+
+    private String contractNumber ;
+
+    private String studentName ;
+    
+    private String company;
+    
+    public WSReceiveEntry() {
+    }
+
+    public WSReceiveEntry(
+           double accountLocal,
+           boolean agency,
+           double amount,
+           String amountType,
+           String bank,
+           String bankAccount,
+           String bizDate,
+           String bizType,
+           String cssp,
+           String currency,
+           String decription,
+           double exchangeRate,
+           WSReceive parent,
+           String payType,
+           boolean revice,
+           String studentNumber,
+           String studentName,
+           String contractNumber,
+           String company) {
+        this.accountLocal = accountLocal;
+        this.agency = agency;
+        this.amount = amount;
+        this.amountType = amountType;
+        this.bank = bank;
+        this.bankAccount = bankAccount;
+        this.bizDate = bizDate;
+        this.bizType = bizType;
+        this.cssp = cssp;
+        this.currency = currency;
+        this.decription = decription;
+        this.exchangeRate = exchangeRate;
+        this.parent = parent;
+        this.payType = payType;
+        this.revice = revice;
+        this.studentNumber = studentNumber;
+        this.studentName = studentName;
+        this.contractNumber = contractNumber;
+        this.company = company;
+    }
+
+
+    /**
+     * Gets the accountLocal value for this WSReceiveEntry.
+     * 
+     * @return accountLocal
+     */
+    public double getAccountLocal() {
+        return accountLocal;
+    }
+
+
+    /**
+     * Sets the accountLocal value for this WSReceiveEntry.
+     * 
+     * @param accountLocal
+     */
+    public void setAccountLocal(double accountLocal) {
+        this.accountLocal = accountLocal;
+    }
+
+
+    /**
+     * Gets the agency value for this WSReceiveEntry.
+     * 
+     * @return agency
+     */
+    public boolean isAgency() {
+        return agency;
+    }
+
+
+    /**
+     * Sets the agency value for this WSReceiveEntry.
+     * 
+     * @param agency
+     */
+    public void setAgency(boolean agency) {
+        this.agency = agency;
+    }
+
+
+    /**
+     * Gets the amount value for this WSReceiveEntry.
+     * 
+     * @return amount
+     */
+    public double getAmount() {
+        return amount;
+    }
+
+
+    /**
+     * Sets the amount value for this WSReceiveEntry.
+     * 
+     * @param amount
+     */
+    public void setAmount(double amount) {
+        this.amount = amount;
+    }
+
+
+    /**
+     * Gets the amountType value for this WSReceiveEntry.
+     * 
+     * @return amountType
+     */
+    public String getAmountType() {
+        return amountType;
+    }
+
+
+    /**
+     * Sets the amountType value for this WSReceiveEntry.
+     * 
+     * @param amountType
+     */
+    public void setAmountType(String amountType) {
+        this.amountType = amountType;
+    }
+
+
+    /**
+     * Gets the bank value for this WSReceiveEntry.
+     * 
+     * @return bank
+     */
+    public String getBank() {
+        return bank;
+    }
+
+
+    /**
+     * Sets the bank value for this WSReceiveEntry.
+     * 
+     * @param bank
+     */
+    public void setBank(String bank) {
+        this.bank = bank;
+    }
+
+
+    /**
+     * Gets the bankAccount value for this WSReceiveEntry.
+     * 
+     * @return bankAccount
+     */
+    public String getBankAccount() {
+        return bankAccount;
+    }
+
+
+    /**
+     * Sets the bankAccount value for this WSReceiveEntry.
+     * 
+     * @param bankAccount
+     */
+    public void setBankAccount(String bankAccount) {
+        this.bankAccount = bankAccount;
+    }
+
+
+    /**
+     * Gets the bizDate value for this WSReceiveEntry.
+     * 
+     * @return bizDate
+     */
+    public String getBizDate() {
+        return bizDate;
+    }
+
+
+    /**
+     * Sets the bizDate value for this WSReceiveEntry.
+     * 
+     * @param bizDate
+     */
+    public void setBizDate(String bizDate) {
+        this.bizDate = bizDate;
+    }
+
+
+    /**
+     * Gets the bizType value for this WSReceiveEntry.
+     * 
+     * @return bizType
+     */
+    public String getBizType() {
+        return bizType;
+    }
+
+
+    /**
+     * Sets the bizType value for this WSReceiveEntry.
+     * 
+     * @param bizType
+     */
+    public void setBizType(String bizType) {
+        this.bizType = bizType;
+    }
+
+
+    /**
+     * Gets the cssp value for this WSReceiveEntry.
+     * 
+     * @return cssp
+     */
+    public String getCssp() {
+        return cssp;
+    }
+
+
+    /**
+     * Sets the cssp value for this WSReceiveEntry.
+     * 
+     * @param cssp
+     */
+    public void setCssp(String cssp) {
+        this.cssp = cssp;
+    }
+
+
+    /**
+     * Gets the currency value for this WSReceiveEntry.
+     * 
+     * @return currency
+     */
+    public String getCurrency() {
+        return currency;
+    }
+
+
+    /**
+     * Sets the currency value for this WSReceiveEntry.
+     * 
+     * @param currency
+     */
+    public void setCurrency(String currency) {
+        this.currency = currency;
+    }
+
+
+    /**
+     * Gets the decription value for this WSReceiveEntry.
+     * 
+     * @return decription
+     */
+    public String getDecription() {
+        return decription;
+    }
+
+
+    /**
+     * Sets the decription value for this WSReceiveEntry.
+     * 
+     * @param decription
+     */
+    public void setDecription(String decription) {
+        this.decription = decription;
+    }
+
+
+    /**
+     * Gets the exchangeRate value for this WSReceiveEntry.
+     * 
+     * @return exchangeRate
+     */
+    public double getExchangeRate() {
+        return exchangeRate;
+    }
+
+
+    /**
+     * Sets the exchangeRate value for this WSReceiveEntry.
+     * 
+     * @param exchangeRate
+     */
+    public void setExchangeRate(double exchangeRate) {
+        this.exchangeRate = exchangeRate;
+    }
+
+
+    /**
+     * Gets the parent value for this WSReceiveEntry.
+     * 
+     * @return parent
+     */
+    public WSReceive getParent() {
+        return parent;
+    }
+
+
+    /**
+     * Sets the parent value for this WSReceiveEntry.
+     * 
+     * @param parent
+     */
+    public void setParent(WSReceive parent) {
+        this.parent = parent;
+    }
+
+
+    /**
+     * Gets the payType value for this WSReceiveEntry.
+     * 
+     * @return payType
+     */
+    public String getPayType() {
+        return payType;
+    }
+
+
+    /**
+     * Sets the payType value for this WSReceiveEntry.
+     * 
+     * @param payType
+     */
+    public void setPayType(String payType) {
+        this.payType = payType;
+    }
+
+
+    /**
+     * Gets the revice value for this WSReceiveEntry.
+     * 
+     * @return revice
+     */
+    public boolean isRevice() {
+        return revice;
+    }
+
+
+    /**
+     * Sets the revice value for this WSReceiveEntry.
+     * 
+     * @param revice
+     */
+    public void setRevice(boolean revice) {
+        this.revice = revice;
+    }
+
+    public String getStudentNumber() {
+		return studentNumber;
+	}
+
+	public void setStudentNumber(String studentNumber) {
+		this.studentNumber = studentNumber;
+	}
+
+	public String getContractNumber() {
+		return contractNumber;
+	}
+
+	public void setContractNumber(String contractNumber) {
+		this.contractNumber = contractNumber;
+	}
+
+	public String getStudentName() {
+		return studentName;
+	}
+
+	public void setStudentName(String studentName) {
+		this.studentName = studentName;
+	}
+
+	 /**
+     * Gets the tocompany value for this WSReceive.
+     * 
+     * @return tocompany
+     */
+    public String getCompany() {
+		return company;
+	}
+
+    /**
+     * Sets the tocompany value for this WSReceive.
+     * 
+     * @param tocompany
+     */
+	public void setCompany(String company) {
+		this.company = company;
+	}
+
+	private Object __equalsCalc = null;
+    public synchronized boolean equals(Object obj) {
+        if (!(obj instanceof WSReceiveEntry)) return false;
+        WSReceiveEntry other = (WSReceiveEntry) obj;
+        if (obj == null) return false;
+        if (this == obj) return true;
+        if (__equalsCalc != null) {
+            return (__equalsCalc == obj);
+        }
+        __equalsCalc = obj;
+        boolean _equals;
+        _equals = super.equals(obj) && 
+            this.accountLocal == other.getAccountLocal() &&
+            this.agency == other.isAgency() &&
+            this.amount == other.getAmount() &&
+            ((this.amountType==null && other.getAmountType()==null) || 
+             (this.amountType!=null &&
+              this.amountType.equals(other.getAmountType()))) &&
+            ((this.bank==null && other.getBank()==null) || 
+             (this.bank!=null &&
+              this.bank.equals(other.getBank()))) &&
+            ((this.bankAccount==null && other.getBankAccount()==null) || 
+             (this.bankAccount!=null &&
+              this.bankAccount.equals(other.getBankAccount()))) &&
+            ((this.bizDate==null && other.getBizDate()==null) || 
+             (this.bizDate!=null &&
+              this.bizDate.equals(other.getBizDate()))) &&
+            ((this.bizType==null && other.getBizType()==null) || 
+             (this.bizType!=null &&
+              this.bizType.equals(other.getBizType()))) &&
+            ((this.cssp==null && other.getCssp()==null) || 
+             (this.cssp!=null &&
+              this.cssp.equals(other.getCssp()))) &&
+            ((this.currency==null && other.getCurrency()==null) || 
+             (this.currency!=null &&
+              this.currency.equals(other.getCurrency()))) &&
+            ((this.decription==null && other.getDecription()==null) || 
+             (this.decription!=null &&
+              this.decription.equals(other.getDecription()))) &&
+            this.exchangeRate == other.getExchangeRate() &&
+            ((this.parent==null && other.getParent()==null) || 
+             (this.parent!=null &&
+              this.parent.equals(other.getParent()))) &&
+            ((this.payType==null && other.getPayType()==null) || 
+             (this.payType!=null &&
+              this.payType.equals(other.getPayType()))) &&
+            this.revice == other.isRevice() &&
+            ((this.studentNumber==null && other.getStudentNumber()==null) || 
+             (this.studentNumber!=null &&
+              this.studentNumber.equals(other.getStudentNumber()))) &&
+            ((this.studentName==null && other.getStudentName()==null) || 
+             (this.studentName!=null &&
+              this.studentName.equals(other.getStudentName()))) &&
+            ((this.contractNumber==null && other.getContractNumber()==null) || 
+             (this.contractNumber!=null &&
+              this.contractNumber.equals(other.getContractNumber())));
+            ;
+        __equalsCalc = null;
+        return _equals;
+    }
+
+    private boolean __hashCodeCalc = false;
+    public synchronized int hashCode() {
+        if (__hashCodeCalc) {
+            return 0;
+        }
+        __hashCodeCalc = true;
+        int _hashCode = super.hashCode();
+        _hashCode += new Double(getAccountLocal()).hashCode();
+        _hashCode += (isAgency() ? Boolean.TRUE : Boolean.FALSE).hashCode();
+        _hashCode += new Double(getAmount()).hashCode();
+        if (getAmountType() != null) {
+            _hashCode += getAmountType().hashCode();
+        }
+        if (getBank() != null) {
+            _hashCode += getBank().hashCode();
+        }
+        if (getBankAccount() != null) {
+            _hashCode += getBankAccount().hashCode();
+        }
+        if (getBizDate() != null) {
+            _hashCode += getBizDate().hashCode();
+        }
+        if (getBizType() != null) {
+            _hashCode += getBizType().hashCode();
+        }
+        if (getCssp() != null) {
+            _hashCode += getCssp().hashCode();
+        }
+        if (getCurrency() != null) {
+            _hashCode += getCurrency().hashCode();
+        }
+        if (getDecription() != null) {
+            _hashCode += getDecription().hashCode();
+        }
+        _hashCode += new Double(getExchangeRate()).hashCode();
+        if (getParent() != null) {
+            _hashCode += getParent().hashCode();
+        }
+        if (getPayType() != null) {
+            _hashCode += getPayType().hashCode();
+        }
+        _hashCode += (isRevice() ? Boolean.TRUE : Boolean.FALSE).hashCode();
+        __hashCodeCalc = false;
+        return _hashCode;
+    }
+
+    // Type metadata
+    private static org.apache.axis.description.TypeDesc typeDesc =
+        new org.apache.axis.description.TypeDesc(WSReceiveEntry.class, true);
+
+    static {
+        typeDesc.setXmlType(new javax.xml.namespace.QName("urn:client.receive", "WSReceiveEntry"));
+        org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc();
+        elemField.setFieldName("accountLocal");
+        elemField.setXmlName(new javax.xml.namespace.QName("", "accountLocal"));
+        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "double"));
+        elemField.setNillable(false);
+        typeDesc.addFieldDesc(elemField);
+        elemField = new org.apache.axis.description.ElementDesc();
+        elemField.setFieldName("agency");
+        elemField.setXmlName(new javax.xml.namespace.QName("", "agency"));
+        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "boolean"));
+        elemField.setNillable(false);
+        typeDesc.addFieldDesc(elemField);
+        elemField = new org.apache.axis.description.ElementDesc();
+        elemField.setFieldName("amount");
+        elemField.setXmlName(new javax.xml.namespace.QName("", "amount"));
+        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "double"));
+        elemField.setNillable(false);
+        typeDesc.addFieldDesc(elemField);
+        elemField = new org.apache.axis.description.ElementDesc();
+        elemField.setFieldName("amountType");
+        elemField.setXmlName(new javax.xml.namespace.QName("", "amountType"));
+        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
+        elemField.setNillable(true);
+        typeDesc.addFieldDesc(elemField);
+        elemField = new org.apache.axis.description.ElementDesc();
+        elemField.setFieldName("bank");
+        elemField.setXmlName(new javax.xml.namespace.QName("", "bank"));
+        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
+        elemField.setNillable(true);
+        typeDesc.addFieldDesc(elemField);
+        elemField = new org.apache.axis.description.ElementDesc();
+        elemField.setFieldName("bankAccount");
+        elemField.setXmlName(new javax.xml.namespace.QName("", "bankAccount"));
+        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
+        elemField.setNillable(true);
+        typeDesc.addFieldDesc(elemField);
+        elemField = new org.apache.axis.description.ElementDesc();
+        elemField.setFieldName("bizDate");
+        elemField.setXmlName(new javax.xml.namespace.QName("", "bizDate"));
+        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
+        elemField.setNillable(true);
+        typeDesc.addFieldDesc(elemField);
+        elemField = new org.apache.axis.description.ElementDesc();
+        elemField.setFieldName("bizType");
+        elemField.setXmlName(new javax.xml.namespace.QName("", "bizType"));
+        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
+        elemField.setNillable(true);
+        typeDesc.addFieldDesc(elemField);
+        elemField = new org.apache.axis.description.ElementDesc();
+        elemField.setFieldName("cssp");
+        elemField.setXmlName(new javax.xml.namespace.QName("", "cssp"));
+        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
+        elemField.setNillable(true);
+        typeDesc.addFieldDesc(elemField);
+        elemField = new org.apache.axis.description.ElementDesc();
+        elemField.setFieldName("currency");
+        elemField.setXmlName(new javax.xml.namespace.QName("", "currency"));
+        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
+        elemField.setNillable(true);
+        typeDesc.addFieldDesc(elemField);
+        elemField = new org.apache.axis.description.ElementDesc();
+        elemField.setFieldName("decription");
+        elemField.setXmlName(new javax.xml.namespace.QName("", "decription"));
+        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
+        elemField.setNillable(true);
+        typeDesc.addFieldDesc(elemField);
+        elemField = new org.apache.axis.description.ElementDesc();
+        elemField.setFieldName("exchangeRate");
+        elemField.setXmlName(new javax.xml.namespace.QName("", "exchangeRate"));
+        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "double"));
+        elemField.setNillable(false);
+        typeDesc.addFieldDesc(elemField);
+        elemField = new org.apache.axis.description.ElementDesc();
+        elemField.setFieldName("parent");
+        elemField.setXmlName(new javax.xml.namespace.QName("", "parent"));
+        elemField.setXmlType(new javax.xml.namespace.QName("urn:client.receive", "WSReceive"));
+        elemField.setNillable(true);
+        typeDesc.addFieldDesc(elemField);
+        elemField = new org.apache.axis.description.ElementDesc();
+        elemField.setFieldName("payType");
+        elemField.setXmlName(new javax.xml.namespace.QName("", "payType"));
+        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
+        elemField.setNillable(true);
+        typeDesc.addFieldDesc(elemField);
+        elemField = new org.apache.axis.description.ElementDesc();
+        elemField.setFieldName("revice");
+        elemField.setXmlName(new javax.xml.namespace.QName("", "revice"));
+        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "boolean"));
+        elemField.setNillable(false);
+        typeDesc.addFieldDesc(elemField);
+        elemField = new org.apache.axis.description.ElementDesc();
+        elemField.setFieldName("studentNumber");
+        elemField.setXmlName(new javax.xml.namespace.QName("", "studentNumber"));
+        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
+        elemField.setNillable(true);
+        typeDesc.addFieldDesc(elemField);
+        elemField = new org.apache.axis.description.ElementDesc();
+        elemField.setFieldName("studentName");
+        elemField.setXmlName(new javax.xml.namespace.QName("", "studentName"));
+        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
+        elemField.setNillable(true);
+        typeDesc.addFieldDesc(elemField);
+        elemField = new org.apache.axis.description.ElementDesc();
+        elemField.setFieldName("contractNumber");
+        elemField.setXmlName(new javax.xml.namespace.QName("", "contractNumber"));
+        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
+        elemField.setNillable(true);
+        typeDesc.addFieldDesc(elemField);
+    }
+
+    /**
+     * Return type metadata object
+     */
+    public static org.apache.axis.description.TypeDesc getTypeDesc() {
+        return typeDesc;
+    }
+
+    /**
+     * Get Custom Serializer
+     */
+    public static org.apache.axis.encoding.Serializer getSerializer(
+           String mechType,
+           Class _javaType,
+           javax.xml.namespace.QName _xmlType) {
+        return 
+          new  org.apache.axis.encoding.ser.BeanSerializer(
+            _javaType, _xmlType, typeDesc);
+    }
+
+    /**
+     * Get Custom Deserializer
+     */
+    public static org.apache.axis.encoding.Deserializer getDeserializer(
+           String mechType,
+           Class _javaType,
+           javax.xml.namespace.QName _xmlType) {
+        return 
+          new  org.apache.axis.encoding.ser.BeanDeserializer(
+            _javaType, _xmlType, typeDesc);
+    }
+
+}

+ 92 - 0
mjava-ruisi/src/main/java/com/malk/ruisi/config/load-config.properties

@@ -0,0 +1,92 @@
+#for execel rebuilt file
+EXECEL_TMPFILE_PATH = D\:\\new\\templatefile\\
+UPDATE_PATH=D\:\\uploadFolder
+#for execel template file
+EXECEL_TEMPLATE_FILE_PATH = D\:\\new\\tempfile\\
+#must under tomcat webapp
+RCK_PHOTO_FILE_PATH= D\:\\Workspaces\\last\\WebContent\\photo\\
+#xlbz/xljd img #must under tomcat webapp
+JD_IMG_PATH=D\:\\tomcat80\\webapps\\new\\WebContent\\photo\\
+PREPROC_LIKE_SQL=true
+#HR Synchronization
+MASTER_SERVICE=true
+SOURCEDB_DRIVER_STR=com.microsoft.sqlserver.jdbc.SQLServerDriver
+#SOURCEDB_CONN_STR=jdbc:oracle:thin:@10.10.68.238:1521:orcl
+SOURCEDB_CONN_STR=jdbc\:sqlserver\://10.16.131.65\:1433;databaseName\=bms192
+SOURCEDB_USERNAME=sa
+SOURCEDB_PWD=Server123
+#jdbc:oracle:thin:@localhost:1521:orcl
+#oracle.jdbc.driver.OracleDriver
+
+TARGERTDB_DRIVER_STR=com.microsoft.sqlserver.jdbc.SQLServerDriver
+TARGERTDB_CONN_STR=jdbc\:sqlserver\://10.16.131.65\:1433;databaseName\=bms192
+TARGERTDB_USERNAME=sa
+TARGERTDB_PWD=Server123
+
+
+
+#below for HR Synchronization test
+#MASTER_SERVICE=true
+#SOURCEDB_DRIVER_STR=oracle.jdbc.driver.OracleDriver
+#SOURCEDB_CONN_STR=jdbc:oracle:thin:@localhost:1521:orcl
+#SOURCEDB_USERNAME=system
+#SOURCEDB_PWD=123
+
+#TARGERTDB_DRIVER_STR=com.microsoft.sqlserver.jdbc.SQLServerDriver
+#TARGERTDB_CONN_STR=jdbc:sqlserver://10.10.65.178:1433;databaseName=rise_hr_exchange
+#TARGERTDB_USERNAME=sa
+#TARGERTDB_PWD=111
+
+#webservice_username=user
+#webservice_password=qwer1212
+
+#Eas online
+#webservice_username=748
+#webservice_password=riverdeepqwer12
+#webservice_slnName=eas
+#webservice_dcName=river001
+#webservice_language=L2
+#webservice_dbType=2
+#webservice_EASLogin_address=http\://10.10.10.90\:8888/ormrpc/services/EASLogin
+#webservice_WSWebServiceProvideFacade_address=http\://10.10.10.90\:8888/ormrpc/services/WSWebServiceProvideFacade
+#webservice_WSWebServiceProvideFacade_NewAddress=http\://10.10.10.90\:8888/ormrpc/services/WSWebServiceProvideFacade
+
+#Eas test
+webservice_username=748
+webservice_password=123456
+webservice_slnName=eas
+webservice_dcName=test001
+webservice_language=L2
+webservice_dbType=2
+webservice_EASLogin_address=http://10.10.10.18:8888/ormrpc/services/EASLogin
+webservice_WSWebServiceProvideFacade_address=http\://10.10.10.18\:8888/ormrpc/services/WSWebServiceProvideFacade
+webservice_WSWebServiceProvideFacade_NewAddress=http\://10.10.10.18\:8888/ormrpc/services/WSWebServiceProvideFacade
+
+
+#webservice_EASLogin_address=http\://119.254.3.142\:8888/ormrpc/services/EASLogin
+#webservice_WSWebServiceProvideFacade_address=http\://119.254.3.142\:8888/ormrpc/services/WSWebServiceProvideFacade
+
+#��ʽ����
+#webservice_EASLogin_address=http\://10.10.10.90\:8888/ormrpc/services/EASLogin
+#webservice_WSWebServiceProvideFacade_address=http\://10.10.10.90\:8888/ormrpc/services/WSWebServiceProvideFacade
+#webservice_WSWebServiceProvideFacade_NewAddress=http\://10.10.10.18\:8888/ormrpc/services/WSWebServiceProvideFacade
+
+#webservice_EASLogin_address=http\://192.168.8.80\:6888/ormrpc/services/EASLogin
+#webservice_WSWebServiceProvideFacade_address=http\://192.168.8.80\:6888/ormrpc/services/WSWebServiceProvideFacade
+
+
+#���Ի���
+
+handfeepercent=0.0077
+
+
+#考勤正式环境
+#attendance_host=106.75.91.252
+#attendance_host_username=admin
+#attendance_host_password=12345678
+
+#考勤测试环境
+attendance_host=10.10.10.231
+attendance_host_username=admin
+attendance_host_password=12345678
+is_partner_on=false

+ 23 - 0
mjava-ruisi/src/main/java/com/malk/ruisi/controller/ActivityProjectController.java

@@ -0,0 +1,23 @@
+package com.malk.ruisi.controller;
+
+import com.malk.ruisi.service.ActivityProjectService;
+import com.malk.server.common.McR;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+@RestController
+@RequestMapping("/activity")
+public class ActivityProjectController {
+    @Autowired
+    private ActivityProjectService activityProjectService;
+
+    /*活动项目新增*/
+    @PostMapping("/addActivity")
+    McR addActivity(String instanceId){
+        activityProjectService.addActivity(instanceId);
+        return McR.success();
+    }
+
+}

+ 27 - 0
mjava-ruisi/src/main/java/com/malk/ruisi/controller/ExpenseAccrualController.java

@@ -0,0 +1,27 @@
+package com.malk.ruisi.controller;
+
+import com.malk.delegate.McDelegate;
+import com.malk.ruisi.service.ExpenseAccrualService;
+import com.malk.ruisi.service.WriteKingDeeService;
+import com.malk.server.common.McR;
+import lombok.SneakyThrows;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+@RestController
+@RequestMapping("/expenseAccrual")
+public class ExpenseAccrualController {
+    @Autowired
+    private ExpenseAccrualService expenseAccrualService;
+
+    /*费用计提接口*/
+    @SneakyThrows
+    @PostMapping("/getValue")
+    //从表单中拿到实例ID,传入参数
+    McR insetXMC(String instanceId) {
+        expenseAccrualService.insetXMC(instanceId);
+        return McR.success();
+    }
+}

+ 24 - 0
mjava-ruisi/src/main/java/com/malk/ruisi/controller/MaterialController.java

@@ -0,0 +1,24 @@
+package com.malk.ruisi.controller;
+
+import com.malk.ruisi.service.MaterialService;
+import com.malk.server.common.McR;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+@RestController
+@RequestMapping("/material")
+public class MaterialController {
+    @Autowired
+    private MaterialService materialService;
+
+    //查询物料信息根据供应商名称进行匹配
+    @GetMapping("/findMaterial")
+    McR findMaterial(String formUuid){
+        materialService.findMaterial(formUuid);
+        return McR.success();
+    }
+
+}

+ 23 - 0
mjava-ruisi/src/main/java/com/malk/ruisi/controller/NewSupplierAdditionController.java

@@ -0,0 +1,23 @@
+package com.malk.ruisi.controller;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.malk.ruisi.entity.NewsSupplier;
+import com.malk.ruisi.service.NewSupplierAdditionService;
+import com.malk.server.common.McR;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+@RestController
+@RequestMapping("/supplier")
+public class NewSupplierAdditionController {
+    @Autowired
+    private NewSupplierAdditionService newSupplierAdditionService;
+
+    /*供应商新增*/
+    @PostMapping("/addAndUpdate")
+    McR addAndUpdate(String instanceId) throws JsonProcessingException {
+        newSupplierAdditionService.addAndUpdate(instanceId);
+        return McR.success();
+    }
+
+}

+ 24 - 0
mjava-ruisi/src/main/java/com/malk/ruisi/controller/TravelWriteKingDeeController.java

@@ -0,0 +1,24 @@
+package com.malk.ruisi.controller;
+
+import com.malk.ruisi.service.TravelWriteKingDeeService;
+import com.malk.server.common.McR;
+import lombok.SneakyThrows;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+@RestController
+@RequestMapping("/travelWriteKingDee")
+public class TravelWriteKingDeeController {
+    @Autowired
+    private TravelWriteKingDeeService travelWriteKingDeeService;
+
+    /*差旅报销生成付款申请单*/
+    @SneakyThrows
+    @PostMapping("/getValue")
+    McR insetXMC(String instanceId) {
+        travelWriteKingDeeService.insetXMC(instanceId);
+        return McR.success();
+    }
+}

+ 30 - 0
mjava-ruisi/src/main/java/com/malk/ruisi/controller/WriteKingDeeController.java

@@ -0,0 +1,30 @@
+package com.malk.ruisi.controller;
+
+import cn.hutool.core.text.replacer.StrReplacer;
+import com.malk.delegate.McDelegate;
+import com.malk.ruisi.service.WriteKingDeeService;
+import com.malk.server.common.McR;
+import lombok.SneakyThrows;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+@RestController
+@RequestMapping("/kingDee")
+public class WriteKingDeeController {
+    @Autowired
+    private WriteKingDeeService writeKingDeeService;
+    @Autowired
+    private McDelegate mcDelegate;
+
+    /*对公付款生成付款申请单*/
+    @SneakyThrows
+    @PostMapping("/getValue")
+    //从表单中拿到实例ID,传入参数
+    McR insetXMC(String instanceId) {
+        writeKingDeeService.insetXMC(instanceId);
+        return McR.success();
+    }
+}

+ 42 - 0
mjava-ruisi/src/main/java/com/malk/ruisi/demo/FinancialService.java

@@ -0,0 +1,42 @@
+package com.malk.ruisi.demo;
+
+import java.io.IOException;
+import java.rmi.RemoteException;
+import java.util.Properties;
+
+import com.malk.ruisi.client.WSContext;
+import com.malk.ruisi.services.EASLogin.EASLoginProxyProxy;
+import com.malk.ruisi.services.EASLogin.EASLoginProxy;
+import com.malk.ruisi.services.WSWebServiceProvideFacade.WSWebServiceProvideFacadeSrvProxyProxy;
+//import org.springframework.stereotype.Service;
+//
+//@Service
+public class FinancialService {
+
+    private static String EASLogin_address = "http://10.31.52.8:7890/ormrpc/services/EASLogin?wsdl";
+    private static String WSWebServiceProvideFacade_address = "http://10.31.52.8:7890/ormrpc/services/WSWebServiceProvideFacade";
+
+//    private static Properties p = new Properties();
+//
+//    static {
+//        try {
+//            p.load(FinancialService.class.getResourceAsStream("com.malk.ruisi.config.load-config.properties"));
+//        } catch (IOException e) {
+//            // TODO Auto-generated catch block
+//            e.printStackTrace();
+//        }
+//    }
+
+    public static void main(String[] args) throws RemoteException {
+
+            EASLoginProxy proxy = new EASLoginProxyProxy(EASLogin_address);
+            WSContext ctx = proxy.login("user", "1234", "eas", "test0624", "L2", 2);
+            //调用成功后返回SessionId
+            System.out.println(ctx.getSessionId());
+            //任何操作EAS提供的任何方法,都需要先登录,在进行接下来的操作
+            // WSWebServiceProvideFacadeSrvProxyProxy ws = new WSWebServiceProvideFacadeSrvProxyProxy(WSWebServiceProvideFacade_address);
+
+    }
+
+
+}

+ 29 - 0
mjava-ruisi/src/main/java/com/malk/ruisi/entity/NewsSupplier.java

@@ -0,0 +1,29 @@
+package com.malk.ruisi.entity;
+
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+@AllArgsConstructor
+@NoArgsConstructor
+@Data
+public class NewsSupplier {
+    /*供应商编码*/
+    private String number;
+    /*供应商名称*/
+    private String name;
+    /*简称*/
+    private String abbr;
+    /*供应商分类编码*/
+    private String classifyNo;
+    /*税率*/
+    private String taxRate;
+    /*户名*/
+    private String accountName;
+    /*开户银行*/
+    private String bankName;
+    /*账号*/
+    private String accountNumber;
+    /*银行行号*/
+    private String bankBranchNumber;
+}

+ 8 - 0
mjava-ruisi/src/main/java/com/malk/ruisi/mapper/BankNameMapper.java

@@ -0,0 +1,8 @@
+package com.malk.ruisi.mapper;
+
+import org.apache.ibatis.annotations.Mapper;
+
+@Mapper
+public interface BankNameMapper {
+    void BankName();
+}

+ 8 - 0
mjava-ruisi/src/main/java/com/malk/ruisi/mapper/CostCenterMapper.java

@@ -0,0 +1,8 @@
+package com.malk.ruisi.mapper;
+
+import org.apache.ibatis.annotations.Mapper;
+
+@Mapper
+public interface CostCenterMapper {
+    void CostCenter();
+}

+ 10 - 0
mjava-ruisi/src/main/java/com/malk/ruisi/mapper/WriteKingDeeMapper.java

@@ -0,0 +1,10 @@
+package com.malk.ruisi.mapper;
+
+import org.apache.ibatis.annotations.Mapper;
+
+
+@Mapper
+public interface WriteKingDeeMapper {
+
+    void insertXMC(String instanceId);
+}

+ 81 - 0
mjava-ruisi/src/main/java/com/malk/ruisi/portalmainfacade/WSInvokeException.java

@@ -0,0 +1,81 @@
+package com.malk.ruisi.portalmainfacade;
+
+public class WSInvokeException extends org.apache.axis.AxisFault implements java.io.Serializable{
+    public WSInvokeException() {
+    }
+
+    private java.lang.Object __equalsCalc = null;
+    public synchronized boolean equals(java.lang.Object obj) {
+        if (!(obj instanceof WSInvokeException)) return false;
+        WSInvokeException other = (WSInvokeException) obj;
+        if (obj == null) return false;
+        if (this == obj) return true;
+        if (__equalsCalc != null) {
+            return (__equalsCalc == obj);
+        }
+        __equalsCalc = obj;
+        boolean _equals;
+        _equals = true;
+        __equalsCalc = null;
+        return _equals;
+    }
+
+    private boolean __hashCodeCalc = false;
+    public synchronized int hashCode() {
+        if (__hashCodeCalc) {
+            return 0;
+        }
+        __hashCodeCalc = true;
+        int _hashCode = 1;
+        __hashCodeCalc = false;
+        return _hashCode;
+    }
+
+    // Type metadata
+    private static org.apache.axis.description.TypeDesc typeDesc =
+            new org.apache.axis.description.TypeDesc(WSInvokeException.class, true);
+
+    static {
+        typeDesc.setXmlType(new javax.xml.namespace.QName("urn:client.portalmainfacade", "WSInvokeException"));
+    }
+
+    /**
+     * Return type metadata object
+     */
+    public static org.apache.axis.description.TypeDesc getTypeDesc() {
+        return typeDesc;
+    }
+
+    /**
+     * Get Custom Serializer
+     */
+    public static org.apache.axis.encoding.Serializer getSerializer(
+            java.lang.String mechType,
+            java.lang.Class _javaType,
+            javax.xml.namespace.QName _xmlType) {
+        return
+                new  org.apache.axis.encoding.ser.BeanSerializer(
+                        _javaType, _xmlType, typeDesc);
+    }
+
+    /**
+     * Get Custom Deserializer
+     */
+    public static org.apache.axis.encoding.Deserializer getDeserializer(
+            java.lang.String mechType,
+            java.lang.Class _javaType,
+            javax.xml.namespace.QName _xmlType) {
+        return
+                new  org.apache.axis.encoding.ser.BeanDeserializer(
+                        _javaType, _xmlType, typeDesc);
+    }
+
+
+    /**
+     * Writes the exception data to the faultDetails
+     */
+    public void writeDetails(javax.xml.namespace.QName qname, org.apache.axis.encoding.SerializationContext context) throws java.io.IOException {
+        context.serialize(qname, null, this);
+    }
+
+}

+ 115 - 0
mjava-ruisi/src/main/java/com/malk/ruisi/schedule/ScheduleTask.java

@@ -0,0 +1,115 @@
+package com.malk.ruisi.schedule;
+
+import com.malk.ruisi.service.*;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.scheduling.annotation.EnableScheduling;
+import org.springframework.scheduling.annotation.Scheduled;
+
+/**
+ * @EnableScheduling 开启定时任务 [配置参考McScheduleTask]
+ */
+@Slf4j
+@Configuration
+@EnableScheduling
+@ConditionalOnProperty(name = {"enable.scheduling"})
+public class ScheduleTask {
+
+    @Autowired
+    private LegalEntityService legalEntityService;
+    /*公司_法人主体定时器*/
+    //每周一晚上凌晨同步数据
+    @Scheduled(cron = "0 0 0 * * 1")
+    public void LegalEntityList(){
+        log.info("开始同步法人主体到本周");
+        try{
+            legalEntityService.LegalEntity();
+            System.out.println("法人主体同步完成");
+        }catch (Exception e){
+            //记录错误信息
+            e.printStackTrace();
+        }
+
+    }
+
+    @Autowired
+    private ActivityProjectService activityProjectService;
+    /*活动项目信息定时器(新增项目接口在ActivityProjectController里)*/
+    @Scheduled(cron = "0 0 1 * * 1")
+    public void ActivityProjectList(){
+        log.info("开始同步活动项目信息到本周");
+        try{
+            activityProjectService.Activity();
+            System.out.println("活动项目信息同步完成");
+        }catch (Exception e){
+            //记录错误信息
+            e.printStackTrace();
+        }
+    }
+
+    @Autowired
+    private BankNameService bankNameService;
+    /*行号定时器*/
+    @Scheduled(cron = "0 0 4 * * 1")
+    public void BankNameList(){
+        log.info("开始同步行号信息到本周");
+        System.out.println("行号同步完成");
+        try{
+            bankNameService.BankName();
+        }catch (Exception e){
+            //记录错误信息
+            e.printStackTrace();
+        }
+    }
+
+    @Autowired
+    private CostBearerService costBearerService;
+    /*费用承担主体定时器*/
+    @Scheduled(cron = "0 0 3 * * 1")
+    public void CostBearerList(){
+        log.info("开始同步费用承担主体到本周");
+        try{
+            costBearerService.CostBearer();
+            System.out.println("费用承担主体同步完成");
+        }catch (Exception e){
+            //记录错误信息
+            e.printStackTrace();
+        }
+    }
+
+    @Autowired
+    private CostCenterService costCenterService;
+    /*成本中心定时器*/
+    @Scheduled(cron = "0 40 3 * * 1")
+    public void CostCenterList(){
+        log.info("开始同步成本中心定时器");
+        try {
+            costCenterService.CostCenter();
+            System.out.println("成本中心同步完成");
+        }catch (Exception e){
+            //记录错误信息
+            e.printStackTrace();
+        }
+    }
+
+
+
+    @Autowired
+    private DeleteYDDataService deleteYDDataService;
+    /*批量删除宜搭表单数据*/
+//    @Scheduled(cron = "0/1 * * * * ?")
+    public void DeleteYDData(){
+        log.info("开始批量删除宜搭数据");
+        try {
+            deleteYDDataService.syncDelete();
+            System.out.println("批量删除完成");
+        }catch (Exception e){
+            //记录错误数据
+            e.printStackTrace();
+        }
+    }
+
+
+}

+ 8 - 0
mjava-ruisi/src/main/java/com/malk/ruisi/service/ActivityProjectService.java

@@ -0,0 +1,8 @@
+package com.malk.ruisi.service;
+
+import com.malk.server.common.McR;
+
+public interface ActivityProjectService {
+    McR addActivity(String instanceId);
+    public  void Activity();
+}

+ 9 - 0
mjava-ruisi/src/main/java/com/malk/ruisi/service/BankNameService.java

@@ -0,0 +1,9 @@
+package com.malk.ruisi.service;
+
+import com.malk.server.common.McR;
+import org.apache.ibatis.annotations.Select;
+
+public interface BankNameService {
+    /*行号抓取数据*/
+    public void BankName();
+}

+ 6 - 0
mjava-ruisi/src/main/java/com/malk/ruisi/service/CostBearerService.java

@@ -0,0 +1,6 @@
+package com.malk.ruisi.service;
+
+/*费用承担主体*/
+public interface CostBearerService {
+    public void CostBearer();
+}

+ 6 - 0
mjava-ruisi/src/main/java/com/malk/ruisi/service/CostCenterService.java

@@ -0,0 +1,6 @@
+package com.malk.ruisi.service;
+
+public interface CostCenterService {
+    /*抓取成本中心数据*/
+    public void CostCenter();
+}

+ 6 - 0
mjava-ruisi/src/main/java/com/malk/ruisi/service/DeleteYDDataService.java

@@ -0,0 +1,6 @@
+package com.malk.ruisi.service;
+
+public interface DeleteYDDataService {
+    /*批量删除宜搭数据*/
+    void syncDelete() throws Exception;
+}

+ 9 - 0
mjava-ruisi/src/main/java/com/malk/ruisi/service/ExpenseAccrualService.java

@@ -0,0 +1,9 @@
+package com.malk.ruisi.service;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.malk.server.common.McR;
+
+public interface ExpenseAccrualService {
+    /*费用计提*/
+    McR insetXMC(String instanceId) throws JsonProcessingException;
+}

+ 7 - 0
mjava-ruisi/src/main/java/com/malk/ruisi/service/LegalEntityService.java

@@ -0,0 +1,7 @@
+package com.malk.ruisi.service;
+
+/*公司_法人主体*/
+
+public interface LegalEntityService {
+    public void LegalEntity();
+}

+ 8 - 0
mjava-ruisi/src/main/java/com/malk/ruisi/service/MaterialService.java

@@ -0,0 +1,8 @@
+package com.malk.ruisi.service;
+
+import com.malk.server.common.McR;
+
+public interface MaterialService {
+    /*查询供应商*/
+    McR findMaterial(String formUuid);
+}

+ 11 - 0
mjava-ruisi/src/main/java/com/malk/ruisi/service/NewSupplierAdditionService.java

@@ -0,0 +1,11 @@
+package com.malk.ruisi.service;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.malk.ruisi.entity.NewsSupplier;
+import com.malk.server.common.McR;
+
+public interface NewSupplierAdditionService {
+    /*供应商新增*/
+    McR addAndUpdate(String instanceId) throws JsonProcessingException;
+
+}

+ 8 - 0
mjava-ruisi/src/main/java/com/malk/ruisi/service/TravelWriteKingDeeService.java

@@ -0,0 +1,8 @@
+package com.malk.ruisi.service;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.malk.server.common.McR;
+
+public interface TravelWriteKingDeeService {
+    McR insetXMC(String instanceId) throws JsonProcessingException;
+}

+ 6 - 0
mjava-ruisi/src/main/java/com/malk/ruisi/service/UfHzqyService.java

@@ -0,0 +1,6 @@
+package com.malk.ruisi.service;
+
+/*合作区域*/
+public interface UfHzqyService {
+    public void UfHzqy();
+}

+ 11 - 0
mjava-ruisi/src/main/java/com/malk/ruisi/service/WriteKingDeeService.java

@@ -0,0 +1,11 @@
+package com.malk.ruisi.service;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.malk.server.common.McR;
+import org.apache.ibatis.annotations.Insert;
+
+public interface WriteKingDeeService {
+
+    /*向金蝶系统写入付款申请单*/
+    McR insetXMC(String instanceId) throws JsonProcessingException;
+}

+ 237 - 0
mjava-ruisi/src/main/java/com/malk/ruisi/service/impl/ActivityProjectServiceImpl.java

@@ -0,0 +1,237 @@
+package com.malk.ruisi.service.impl;
+
+import com.alibaba.fastjson.JSONObject;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.malk.ruisi.client.WSContext;
+import com.malk.ruisi.service.ActivityProjectService;
+import com.malk.ruisi.services.EASLogin.EASLoginProxyProxy;
+import com.malk.ruisi.services.WSPortalMainFacade.WSPortalMainFacadeSrvProxyProxy;
+import com.malk.server.aliwork.YDConf;
+import com.malk.server.aliwork.YDParam;
+import com.malk.server.common.McR;
+import com.malk.server.dingtalk.DDConf;
+import com.malk.service.aliwork.YDClient;
+import com.malk.utils.UtilMap;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+import lombok.SneakyThrows;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.scheduling.annotation.Scheduled;
+import org.springframework.stereotype.Service;
+
+import java.io.IOException;
+import java.sql.Connection;
+import java.sql.DriverManager;
+import java.sql.ResultSet;
+import java.sql.Statement;
+import java.util.*;
+
+@Slf4j
+@Service
+public class ActivityProjectServiceImpl implements ActivityProjectService {
+    @Autowired
+    private YDClient ydClient;
+    @Autowired
+    private YDConf ydConf;
+    @Autowired
+    private DDConf ddConf;
+    @SneakyThrows
+    @Override
+    public McR addActivity(String instanceId) {
+        if(instanceId != null){
+            System.out.println("表单实例ID:"+instanceId);
+            Map data = (Map) ydClient.queryData(YDParam.builder().formInstId(instanceId)
+                    .appType(ydConf.getAppType()).systemToken(ydConf.getSystemToken())
+                    .userId(ddConf.getOperator()).build(), YDConf.FORM_QUERY.retrieve_id).getFormData();
+            System.out.println(data);
+            //项目名称
+            String name = data.get("textField_lx9qwfan").toString();
+            String Actname = null;
+            int startIndex1 = name.indexOf("\"") + 1; // 找到第一个双引号后的位置
+            int endIndex1 = name.lastIndexOf("\""); // 找到最后一个双引号的位置
+            if (startIndex1 > 0 && endIndex1 > startIndex1) {
+                Actname = name.substring(startIndex1, endIndex1);
+            }
+            //项目编号
+            String Actnum = null;
+            String number = data.get("textField_lx9qwfas").toString();
+            int startIndex2 = number.indexOf("\"") + 1; // 找到第一个双引号后的位置
+            int endIndex2 = number.lastIndexOf("\""); // 找到最后一个双引号的位置
+            if (startIndex2 > 0 && endIndex2 > startIndex2) {
+                Actnum = number.substring(startIndex2, endIndex2);
+            }
+            //描述
+            String discption = data.get("textField_lx9qwfat").toString();
+            String disc = null;
+            int startIndex3 = discption.indexOf("\"") + 1; // 找到第一个双引号后的位置
+            int endIndex3 = discption.lastIndexOf("\""); // 找到最后一个双引号的位置
+            if (startIndex3 > 0 && endIndex3 > startIndex3) {
+                disc = discption.substring(startIndex3, endIndex3);
+            }
+            
+
+            //创建并填充数据:流水号-流水号  编码-项目编码  名称-项目名称  描述-描述
+            DataItem item =
+                    new DataItem(data.get("serialNumberField_lucci16z").toString(),Actnum, Actname, disc);
+            //创建外层对象并设置数据
+            RequestData requestData = new RequestData();
+            requestData.setType("PR01");
+            requestData.setData(new DataItem[]{item});
+            String datasource = requestData.toString();
+            //打印JSON
+            System.out.println(datasource);
+            //调先登录金蝶
+            EASLoginProxyProxy login = new EASLoginProxyProxy();
+            WSContext ctx = login.login("748", "riverdeepqwer12", "eas", "river001",
+                    "L2", 2);
+            System.out.println(ctx);
+            if (null != ctx.getSessionId() && !"".equals(ctx.getSessionId())) {
+                System.out.println("ctx.getSessionId():" + ctx.getSessionId());
+                WSPortalMainFacadeSrvProxyProxy portal = new WSPortalMainFacadeSrvProxyProxy();
+
+                String remsg = portal.portalToEas("PR01", datasource);
+                System.out.println("remsg:"+remsg);
+            }
+
+            //项目基本信息基础档案数据新增
+            //项目编号 项目名称 描述
+            String sc = "textField_lu7rme31, textField_lu7rme3a, textField_lu7rme3o";
+            ydClient.operateData(YDParam.builder()
+                    .formUuid("FORM-AD716D5C719B4EA18D3086F0EE2C2537JETI")
+                    .searchCondition(JSONObject.toJSONString(UtilMap.map("textField_lu7rme31",Actnum)))
+                    .formDataJson(JSONObject.toJSONString(UtilMap.map(sc,Actnum,Actname,disc)))
+                    .build(),YDConf.FORM_OPERATION.upsert).toString();
+        }
+        return McR.success();
+    }
+
+
+    /*用于抓取活动项目信息*/
+    public void Activity(){
+        //1、数据库
+        List<Map> activityList = new ArrayList<>();
+        String sql = "SELECT id,xmbh,xmmc,miao,xmlx,zt  FROM uf_xmjbxx where zt!=1";
+        String jdbcUrl = "jdbc:mysql://10.19.3.91:44071/ecology";
+        String userName = "root";
+        String password = "Portal_master_db002";
+        try{
+            Class.forName("com.mysql.cj.jdbc.Driver");
+            Connection conn = DriverManager.getConnection(jdbcUrl, userName, password);
+            Statement statement = conn.createStatement();
+            ResultSet resultSet = statement.executeQuery(sql);
+            int i=0;
+            while (resultSet.next()){
+                i++;
+                System.out.println(i+"-"+resultSet.getFetchSize());
+                System.out.println(resultSet.getString("id"));
+
+                String fid = resultSet.getString("id");//主键id
+                String xmbh = resultSet.getString("xmbh");//项目编号
+                String xmmc = resultSet.getString("xmmc");//项目名称
+                String miao = resultSet.getString("miao");//描述
+                String xmlx = resultSet.getString("xmlx");//项目类型
+//                String fisenabled = Objects.equals(resultSet.getString("FISENABLED"), "1") ?"是":"否";//是否启用:1-启用   0-不启用
+                HashMap<String, Object> activitymap = new HashMap<>();
+//                activitymap.put("id",fid);
+                activitymap.put("xmbh",xmbh);
+                activitymap.put("xmmc",xmmc);
+                activitymap.put("miao",miao);
+                activitymap.put("xmlx",xmlx);
+//                activitymap.put("FISENABLED",fisenabled);
+                activityList.add(activitymap);
+            }
+            resultSet.close();
+            statement.close();
+            conn.close();
+
+        }catch (Exception e){
+            e.printStackTrace();
+        }
+
+
+        //2、操作数据
+        for (Map activity : activityList) {
+            log.info("activity:{}",activity);
+            //项目编号  项目名称  描述   项目类型
+            String sc = "textField_lu7rme31, textField_lu7rme3a, textField_lu7rme3o, textField_lu7rme3k";
+            String id = (String) activity.get("id")!= null?(String) activity.get("id"):"数据库此字段为空";//唯一标识
+            String xmbh = (String) activity.get("xmbh")!= null?(String) activity.get("xmbh"):"数据库此字段为空";
+            String xmmc = (String) activity.get("xmmc") != null?(String) activity.get("xmmc"):"数据库此字段为空";
+//            String fisenabled = (String) activity.get("FISENABLED") != null?(String) activity.get("FISENABLED"):"数据库此字段为空";
+            String miao = activity.get("miao") != null ? (String) activity.get("miao") : "数据库此字段为空";
+            String xmlx = activity.get("xmlx") != null ? (String) activity.get("xmlx") : "数据库此字段为空";
+            /*List<Map> list=(List<Map>) ydClient.operateData(YDParam.builder()
+                    .formUuid("FORM-AD716D5C719B4EA18D3086F0EE2C2537JETI")
+                    .formDataJson(JSONObject.toJSONString(UtilMap.map("textField_lu7rme31, textField_lu7rme3a, textField_lu7rme3l",activity.get("FNUMBER"),activity.get("FNAME_L2"),activity.get("FISENABLED"))))
+                    .searchCondition(JSONObject.toJSONString(UtilMap.map("textField_lu7rme31, textField_lu7rme3a, textField_lu7rme3l",activity.get("FNUMBER"),activity.get("FNAME_L2"),activity.get("FISENABLED")))
+                            ., YDConf.FORM_OPERATION.upsert).toString());*/
+            String string = ydClient.operateData(YDParam.builder()
+                    .formUuid("FORM-AD716D5C719B4EA18D3086F0EE2C2537JETI")
+                    .searchCondition(JSONObject.toJSONString(UtilMap.map("textField_lw5tg4e5",id)))
+                    .formDataJson(JSONObject.toJSONString(UtilMap.map(sc, xmbh, xmmc, miao, xmlx)))
+                    .build(), YDConf.FORM_OPERATION.upsert).toString();
+            System.out.println("数据:"+string);
+
+            /*String s = convertToJson( activity.get("FNUMBER")!= null?activity.get("FNUMBER").toString() : "",
+                    activity.get("FNAME_L2")!= null?activity.get("FNAME_L2").toString() : "",
+                    activity.get("FISENABLED") != null ? activity.get("FISENABLED").toString(): "");
+            if(list!=null && !list.isEmpty()){
+                ydClient.operateData(YDParam.builder().formInstanceId(list.get(0).get("formInstanceId").toString()).updateFormDataJson(s).build(), YDConf.FORM_OPERATION.update);
+            }else{
+                ydClient.operateData(
+                        YDParam.builder().formUuid("FORM-AD716D5C719B4EA18D3086F0EE2C2537JETI").formDataJson(s).build(), YDConf.FORM_OPERATION.create);
+            }*/
+        }
+    }
+
+    /*字段封装方法*/
+    public static String convertToJson(String fnumber, String xmmc,String fisenabled) {
+        // 创建一个JSONObject来保存数据
+        JSONObject jsonObject = new JSONObject();
+        jsonObject.put("textField_lu7rme31", fnumber);
+        jsonObject.put("textField_lu7rme3a", xmmc);
+        jsonObject.put("textField_lu7rme3l",fisenabled);
+
+        // 将JSONObject转换为JSON字符串
+        String jsonString = jsonObject.toString();
+
+        // 返回JSON字符串
+        return jsonString;
+    }
+
+    //外层数据类
+    @AllArgsConstructor
+    @NoArgsConstructor
+    @Data
+    public static class RequestData{
+        private String type;
+        private DataItem[] data;
+
+        @Override
+        public String toString() {
+            try {
+                ObjectMapper mapper = new ObjectMapper();
+                return mapper.writeValueAsString(this);
+            } catch (IOException e) {
+                e.printStackTrace();
+                return "Error serializing to JSON";
+            }
+        }
+    }
+
+    //内部数据类
+    @AllArgsConstructor
+    @NoArgsConstructor
+    @Data
+    public static class DataItem{
+        private String seqNum;//流水号
+        private String number;//编码
+        private String name;//名称
+        private String description;//描述
+    }
+
+}
+
+

+ 135 - 0
mjava-ruisi/src/main/java/com/malk/ruisi/service/impl/BankNameServiceImpl.java

@@ -0,0 +1,135 @@
+package com.malk.ruisi.service.impl;
+
+import com.alibaba.fastjson.JSONObject;
+import com.malk.ruisi.service.BankNameService;
+import com.malk.server.aliwork.YDConf;
+import com.malk.server.aliwork.YDParam;
+import com.malk.server.aliwork.YDR;
+import com.malk.server.common.VenR;
+import com.malk.server.dingtalk.DDConf;
+import com.malk.server.dingtalk.DDR_New;
+import com.malk.service.aliwork.YDClient;
+import com.malk.service.dingtalk.DDClient;
+import com.malk.utils.UtilHttp;
+import com.malk.utils.UtilMap;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.ibatis.annotations.Select;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.sql.Connection;
+import java.sql.DriverManager;
+import java.sql.ResultSet;
+import java.sql.Statement;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+
+@Service
+@Slf4j
+public class BankNameServiceImpl implements BankNameService {
+    @Autowired
+    private YDClient ydClient;
+    @Autowired
+    private DDClient ddClient;
+    @Autowired
+    private YDConf ydConf;
+    @Autowired
+    private DDConf ddConf;
+
+    @Override
+    public void BankName() {
+        //1、数据库
+        List<Map> bankList = new ArrayList<>();
+        String sql = "SELECT * FROM V_BE_BEBANK";
+        String jdbcUrl = "jdbc:oracle:thin:@10.30.53.26:1521:orcldb";
+        String userName = "riverdeep86";
+        String password = "riverdeep86";
+        try{
+            Class.forName("oracle.jdbc.driver.OracleDriver");
+            Connection conn = DriverManager.getConnection(jdbcUrl, userName, password);
+            Statement statement = conn.createStatement();
+            ResultSet resultSet = statement.executeQuery(sql);
+            int i=0;
+            while (resultSet.next()){
+                i++;
+                System.out.println(i+"-"+resultSet.getFetchSize());
+                System.out.println(resultSet.getString("FNUMBER"));
+
+                String fid = resultSet.getString("FID");
+                String funmber = resultSet.getString("FNUMBER");
+                String fnameL2 = resultSet.getString("FNAME_L2");
+                String flastupdatetime = resultSet.getString("FLASTUPDATETIME");
+                HashMap<String, Object> bankmap = new HashMap<>();
+                bankmap.put("FID",fid);
+                bankmap.put("FNUMBER",funmber);
+                bankmap.put("FNAME_L2",fnameL2);
+                bankmap.put("FLASTUPDATETIME",flastupdatetime);
+                bankList.add(bankmap);
+
+            }
+            resultSet.close();
+            statement.close();
+            conn.close();
+
+        }catch (Exception e){
+            e.printStackTrace();
+        }
+
+        //异常处理集合
+        ArrayList<Object> list1 = new ArrayList<>();
+        int i=0;
+        //2、操作数据
+        for (Map bank : bankList) {
+            i++;
+            log.info("{}/{}",i,bankList.size());
+            String sc = "textField_lvkosqky, textField_luaz6x59, textField_luaz6x5a, textField_lvkosqkz";
+            String FID = bank.get("FID").toString()!=null?bank.get("FID").toString():"数据库此字段为空";
+            String FNUMBER = bank.get("FNUMBER").toString()!=null?bank.get("FNUMBER").toString():"数据库此字段为空";
+            String FNAME = bank.get("FNAME_L2").toString()!=null?bank.get("FNAME_L2").toString():"数据库此字段为空";
+            String FLASTUPDATETIME = bank.get("FLASTUPDATETIME").toString()!=null?bank.get("FLASTUPDATETIME").toString():"数据库此字段为空";
+            try{
+                /*List<Map> list=(List<Map>) ydClient.queryData(YDParam.builder().formUuid("FORM-72E05C080017421A8E22B36A8835847AARFT")
+                        .searchFieldJson(JSONObject.toJSONString(UtilMap.map("textField_lvkosqky",bank.get("FID"))))
+                        .build(), YDConf.FORM_QUERY.retrieve_list).getData();
+                String s = convertToJson(bank.get("FID").toString()!=null?bank.get("FID").toString():"数据库此字段为空", bank.get("FNUMBER").toString()!=null?bank.get("FNUMBER").toString():"数据库此字段为空",
+                        bank.get("FNAME_L2").toString()!=null?bank.get("FNAME_L2").toString():"数据库此字段为空", bank.get("FLASTUPDATETIME").toString()!= null?bank.get("FLASTUPDATETIME").toString():"数据库此字段为空");
+                if(list!=null&&list.size()>0){
+                    ydClient.operateData(YDParam.builder().formInstanceId(list.get(0).get("formInstanceId").toString()).updateFormDataJson(s).build(), YDConf.FORM_OPERATION.update);
+                }else{
+                    ydClient.operateData(YDParam.builder().formUuid("FORM-72E05C080017421A8E22B36A8835847AARFT").formDataJson(s).build(), YDConf.FORM_OPERATION.create);
+                }*/
+                String string = ydClient.operateData(YDParam.builder()
+                        .formUuid("FORM-72E05C080017421A8E22B36A8835847AARFT")
+                        .searchCondition(JSONObject.toJSONString(UtilMap.map("textField_lvkosqky",FID)))
+                        .formDataJson(JSONObject.toJSONString(UtilMap.map(sc, FID, FNUMBER, FNAME,FLASTUPDATETIME)))
+                        .build(), YDConf.FORM_OPERATION.upsert).toString();
+                System.out.println("数据:"+string);
+            }catch (Exception e){//异常处理-----------
+                e.printStackTrace();
+                log.info("bank:{}",bank);
+                list1.add(bank);//存放错误信息
+            }
+        }
+        log.info("异常数据集合:{}",list1);
+
+    }
+
+    /*字段封装方法*/
+    public static String convertToJson(String fid, String fnumber, String fnameL2, String flastupdatetime) {
+        // 创建一个JSONObject来保存数据
+        JSONObject jsonObject = new JSONObject();
+        jsonObject.put("textField_lvkosqky", fid);
+        jsonObject.put("textField_luaz6x59", fnumber);
+        jsonObject.put("textField_luaz6x5a", fnameL2);
+        jsonObject.put("textField_lvkosqkz", flastupdatetime);
+
+        // 将JSONObject转换为JSON字符串
+        String jsonString = jsonObject.toString();
+
+        // 返回JSON字符串
+        return jsonString;
+    }
+}

+ 90 - 0
mjava-ruisi/src/main/java/com/malk/ruisi/service/impl/CostBearerServiceImpl.java

@@ -0,0 +1,90 @@
+package com.malk.ruisi.service.impl;
+
+import com.alibaba.fastjson.JSONObject;
+import com.malk.ruisi.service.CostBearerService;
+import com.malk.server.aliwork.YDConf;
+import com.malk.server.aliwork.YDParam;
+import com.malk.service.aliwork.YDClient;
+import com.malk.utils.UtilMap;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.sql.Connection;
+import java.sql.DriverManager;
+import java.sql.ResultSet;
+import java.sql.Statement;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+@Service
+@Slf4j
+public class CostBearerServiceImpl implements CostBearerService {
+    @Autowired
+    private YDClient ydClient;
+    @Override
+    public void CostBearer() {
+        //1、数据库
+        List<Map> costList = new ArrayList<>();
+        String sql = "SELECT FID,FNAME,FNUMBER FROM V_ORG_COMPANY WHERE FNAME NOT LIKE '%rise-%'";
+        String jdbcUrl = "jdbc:oracle:thin:@10.30.53.26:1521:orcldb";
+        String userName = "riverdeep86";
+        String password = "riverdeep86";
+        try{
+            Class.forName("oracle.jdbc.driver.OracleDriver");
+            Connection conn = DriverManager.getConnection(jdbcUrl, userName, password);
+            Statement statement = conn.createStatement();
+            ResultSet resultSet = statement.executeQuery(sql);
+            int i=0;
+            while (resultSet.next()){
+                i++;
+                System.out.println(i+"-"+resultSet.getFetchSize());
+                System.out.println(resultSet.getString("FNUMBER"));//看进度用
+
+                String fid = resultSet.getString("FID");//唯一标识
+                String funmber = resultSet.getString("FNUMBER");//编号
+                String fnameL2 = resultSet.getString("FNAME");//名称
+                HashMap<String, Object> costmap = new HashMap<>();
+                costmap.put("FID",fid);
+                costmap.put("FNUMBER",funmber);
+                costmap.put("FNAME",fnameL2);
+                costList.add(costmap);
+
+            }
+            resultSet.close();
+            statement.close();
+            conn.close();
+
+        }catch (Exception e){
+            e.printStackTrace();
+        }
+        //异常处理集合
+        ArrayList<Object> list1 = new ArrayList<>();
+        int i = 0;
+        //2、操作数据
+        for (Map cost : costList) {
+            i++;
+            log.info("{}/{}",i,costList.size());
+            String sc = "textField_lw6knh66, textField_luam769z, textField_luam76a0";
+            String fid = (String) cost.get("FID");
+            String fnumber = (String) cost.get("FNUMBER");
+            String fname = (String) cost.get("FNAME");
+            try{
+                String string = ydClient.operateData(YDParam.builder()
+                        .formUuid("FORM-7F59BC3828E0401983525C4775C9E45DAZ4P")
+                        .searchCondition(JSONObject.toJSONString(UtilMap.map("textField_lw6knh66", fid)))
+                        .formDataJson(JSONObject.toJSONString(UtilMap.map(sc, fid, fnumber, fname)))
+                        .build(), YDConf.FORM_OPERATION.upsert).toString();
+                System.out.println("数据:"+string);
+            }catch (Exception e){
+                //异常处理----
+                log.info("cost{}",cost);
+                list1.add(cost);//错误信息存放
+            }
+
+        }
+
+    }
+}

+ 122 - 0
mjava-ruisi/src/main/java/com/malk/ruisi/service/impl/CostCenterServiceImpl.java

@@ -0,0 +1,122 @@
+package com.malk.ruisi.service.impl;
+
+import com.alibaba.fastjson.JSONObject;
+import com.malk.ruisi.service.CostCenterService;
+import com.malk.server.aliwork.YDConf;
+import com.malk.server.aliwork.YDParam;
+import com.malk.service.aliwork.YDClient;
+import com.malk.utils.UtilMap;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.sql.Connection;
+import java.sql.DriverManager;
+import java.sql.ResultSet;
+import java.sql.Statement;
+import java.time.LocalDate;
+import java.time.format.DateTimeFormatter;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+@Service
+@Slf4j
+public class CostCenterServiceImpl implements CostCenterService {
+    @Autowired
+    private YDClient ydClient;
+
+    @Override
+    public void CostCenter() {
+        //1、数据库
+        List<Map> costcenterList = new ArrayList<>();
+
+        /*获取当前年-月-日*/
+        LocalDate currentDate = LocalDate.now();
+        DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
+        String formattedDate = currentDate.format(formatter);
+        // 原始SQL模板,使用占位符替代具体日期
+        String sql  = "SELECT COSTCENTERNO,COSTCENTERNAME FROM T_COMPANYRELATION_VIEW WHERE COSTCENTERNAME NOT LIKE 'rise1%' "
+                + "AND EXPIREDDATE>= TO_DATE('"+formattedDate+"','yyyy-MM-dd') AND EFFECTIVEDATE<= TO_DATE('"+formattedDate+"','yyyy-MM-dd') "
+                + "GROUP BY COSTCENTERNO,COSTCENTERNAME ORDER BY COSTCENTERNAME";
+
+        String jdbcUrl = "jdbc:oracle:thin:@10.30.53.26:1521:orcldb";
+        String userName = "riverdeep86";
+        String password = "riverdeep86";
+        try{
+            Class.forName("oracle.jdbc.driver.OracleDriver");
+            Connection conn = DriverManager.getConnection(jdbcUrl, userName, password);
+            Statement statement = conn.createStatement();
+            ResultSet resultSet = statement.executeQuery(sql);
+            int i=0;
+            while (resultSet.next()) {
+                i++;
+                System.out.println(i + "-" + resultSet.getFetchSize());
+                System.out.println(resultSet.getString("COSTCENTERNO"));
+
+                String cbzxbm = resultSet.getString("COSTCENTERNO");//成本中心编码
+                String cbzxmc = resultSet.getString("COSTCENTERNAME");//成本中心名称
+
+                HashMap<String, Object> costmap = new HashMap<>();
+                costmap.put("COSTCENTERNO", cbzxbm);
+                costmap.put("COSTCENTERNAME", cbzxmc);
+                costcenterList.add(costmap);
+            }
+            resultSet.close();
+            statement.close();
+            conn.close();
+        }catch (Exception e){
+            e.printStackTrace();
+        }
+        //异常处理集合
+        ArrayList<Object> list1 = new ArrayList<>();
+        int i =0;
+        //2、操作数据
+        for (Map cost : costcenterList) {
+            i++;
+            log.info("{}/{}",i,costcenterList.size());
+            String sc = "textField_lu849afg, textField_lu849afh";
+            String cbzxbm = cost.get("COSTCENTERNO")!= null?cost.get("COSTCENTERNO").toString():"数据库此字段为空";//成本中心编码
+            String cbzxmc = cost.get("COSTCENTERNAME")!= null?cost.get("COSTCENTERNAME").toString():"数据库此字段为空";//成本中心名称
+            try{
+                String string = ydClient.operateData(YDParam.builder()
+                        .formUuid("FORM-814D1D64E7904473AD250E8C3CEBC248ZKFT")
+                        .searchCondition(JSONObject.toJSONString(UtilMap.map("textField_lu849afh", cbzxmc)))
+                        .formDataJson(JSONObject.toJSONString(UtilMap.map(sc, cbzxbm, cbzxmc)))
+                        .build(), YDConf.FORM_OPERATION.upsert).toString();
+                System.out.println("数据:"+string);
+            }catch (Exception e){
+                //异常处理
+                e.printStackTrace();
+                log.info("cost{}",cost);
+                list1.add(cost);//存放错误数据
+            }
+        }
+        log.info("异常数据集合:{}",list1);
+    }
+
+    public static String convertToJson(String id, String fnumber, String fname, String parentid,String parentno,String parentname,String flevel,
+            String companyid,String companyno,String companyname,String issealup,String altertime) {
+        // 创建一个JSONObject来保存数据
+        JSONObject jsonObject = new JSONObject();
+        jsonObject.put("textField_lvrqkou4", id);
+        jsonObject.put("textField_lu849afg", fnumber);
+        jsonObject.put("textField_lu849afh", fname);
+        jsonObject.put("textField_lvrqkou5", parentid);
+        jsonObject.put("textField_lvrqkou6", parentno);
+        jsonObject.put("textField_lvrqkou7", parentname);
+        jsonObject.put("textField_lvrqkou8", flevel);
+        jsonObject.put("textField_lvrqkou9", companyid);
+        jsonObject.put("textField_lvrqkoua", companyno);
+        jsonObject.put("textField_lvrqkoub", companyname);
+        jsonObject.put("textField_lvrqkouc", issealup);
+        jsonObject.put("textField_lvrqkoud", altertime);
+
+        // 将JSONObject转换为JSON字符串
+        String jsonString = jsonObject.toString();
+
+        // 返回JSON字符串
+        return jsonString;
+    }
+}

+ 34 - 0
mjava-ruisi/src/main/java/com/malk/ruisi/service/impl/DeleteYDDataServiceImpl.java

@@ -0,0 +1,34 @@
+package com.malk.ruisi.service.impl;
+
+import com.malk.ruisi.service.DeleteYDDataService;
+import com.malk.server.aliwork.YDConf;
+import com.malk.server.aliwork.YDParam;
+import com.malk.server.dingtalk.DDR_New;
+import com.malk.service.aliwork.YDClient;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+@Service
+@Slf4j
+public class DeleteYDDataServiceImpl implements DeleteYDDataService {
+    @Autowired
+    private YDClient ydClient;
+    @Override
+    public void syncDelete() throws Exception {
+        DDR_New ddrNew = ydClient.queryData(YDParam.builder()
+                .formUuid("FORM-814D1D64E7904473AD250E8C3CEBC248ZKFT")
+                .build(), YDConf.FORM_QUERY.retrieve_search_form_id);
+
+        System.out.println(ddrNew.getTotalCount());
+
+        ydClient.operateData(YDParam.builder()
+                .formUuid("FORM-814D1D64E7904473AD250E8C3CEBC248ZKFT")
+                .asynchronousExecution(true)
+                .formInstanceIdList((List<String>) ddrNew.getData())
+                .build(), YDConf.FORM_OPERATION.delete_batch);
+        System.out.println("宜搭数据删除完毕!");
+    }
+}

+ 303 - 0
mjava-ruisi/src/main/java/com/malk/ruisi/service/impl/ExpenseAccrualServiceImpl.java

@@ -0,0 +1,303 @@
+package com.malk.ruisi.service.impl;
+
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.google.gson.JsonArray;
+import com.malk.ruisi.client.WSContext;
+import com.malk.ruisi.service.ExpenseAccrualService;
+import com.malk.ruisi.services.EASLogin.EASLoginProxyProxy;
+import com.malk.ruisi.services.WSPortalMainFacade.WSPortalMainFacadeSrvProxyProxy;
+import com.malk.server.aliwork.YDConf;
+import com.malk.server.aliwork.YDParam;
+import com.malk.server.common.McR;
+import com.malk.server.dingtalk.DDConf;
+import com.malk.service.aliwork.YDClient;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+import lombok.SneakyThrows;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.math.BigDecimal;
+import java.time.Instant;
+import java.time.LocalDate;
+import java.time.ZoneId;
+import java.time.format.DateTimeFormatter;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+
+@Service
+public class ExpenseAccrualServiceImpl implements ExpenseAccrualService {
+    @Autowired
+    private YDClient ydClient;
+    @Autowired
+    private YDConf ydConf;
+    @Autowired
+    private DDConf ddConf;
+
+    @SneakyThrows
+    @Override
+    public McR insetXMC(String instanceId) throws JsonProcessingException {
+        if(instanceId !=null){
+            System.out.println("实例ID:"+instanceId);
+            Map data = (Map) ydClient.queryData(YDParam.builder().formInstId(instanceId)
+                    .appType(ydConf.getAppType()).systemToken(ydConf.getSystemToken())
+                    .userId(ddConf.getOperator()).build(), YDConf.FORM_QUERY.retrieve_id).getFormData();
+            System.out.println(data);//打印宜搭表单数据
+
+            //处理传入参数类型
+            ObjectMapper objectMapper = new ObjectMapper();
+            Head head = new Head();
+            //1、head表头传参
+            head.setSettlementType("5");//固定:不付款的编码5
+
+            head.setNumber(data.get("serialNumberField_lucde59d").toString());//流程编码
+
+            String s = data.get("serialNumberField_lucde59d").toString();
+            String requestId = s.substring(s.length() - 7);
+            head.setRequestId(requestId);//Portal做唯一性校验
+
+            long time = (long)data.get("dateField_lucde59g");
+            String utc = convertTimestampToDateString(time, "UTC", "yyyy-MM-dd");
+            head.setAppDate(utc);//申请日期
+
+            String company = data.get("textField_lweul68w").toString();
+            head.setCompany(company);//所属公司编码
+
+            head.setAppDepart(data.get("textField_lwa4ipaf").toString());//申请部门编码
+            head.setApplicant(data.get("textField_lwa4ipah").toString());//申请人编码
+            head.setStatus("审核");//审核状态
+
+            // 创建并设置entry对象列表
+            List<ExpenseAccrualServiceImpl.Entry> entries = new ArrayList<>();
+            Entry entry = new Entry();
+            //获取子表单中字段信息
+            List<Map> jsonString = (List<Map>)data.get("tableField_lucde59l");
+            System.out.println("jsonString:"+jsonString);
+            int num = 0;
+            for (Map map1 : jsonString) {
+                //财务摘要:"计提-年月-费用承担部门-费用内容"
+                LocalDate currentDate = LocalDate.now();
+                DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM");
+                String currentYearMonth = currentDate.format(formatter);
+                map1.get("textField_lx2omt23").toString();
+                map1.get("textField_lucde59m").toString();
+
+                entry.setSummary("计提-"+currentYearMonth+map1.get("textField_lx2omt23").toString()+map1.get("textField_lucde59m").toString());//财务摘要
+
+                num++;//子表单存在多条就+1
+                String entryOwnId = requestId.concat(String.valueOf(num));//分录唯一id
+                entry.setEntryOwnId(entryOwnId);//entryOwnId
+
+                String title = map1.get("textField_lucde59m").equals(null) ? " " : map1.get("textField_lucde59m").toString();
+                entry.setTitle(title);//费用内容
+
+                String s1 = map1.get("associationFormField_lucde59t_id").toString();
+                JSONArray jsonArray = JSONArray.parseArray(s1.substring(1, s1.length() - 1).replaceAll("\\\\",""));
+                Map map = (Map) jsonArray.get(0);
+                String lines = map.get("title").toString();
+                entry.setLines(lines);//产品线
+
+                String portalFeeType = map1.get("textField_lwf2vn9y").toString();
+                entry.setPortalFeeType(portalFeeType);//费用类型
+
+                String proNum = map1.get("textField_lweqdqnf").toString();
+                entry.setProNum(proNum);//活动项目编号
+
+                String costCenter = map1.get("textField_lweqdqng").toString();
+                entry.setCostCenter(costCenter);//成本中心编码
+
+                String campus = map1.get("textField_lx2niu81").toString();
+                entry.setCampus(campus);//校区部门编码
+
+                String payCompany = map1.get("textField_lwa4ipai").toString();
+                entry.setPayCompany(payCompany);//付款主体
+
+                String currency = map1.get("textField_lwerwbwv").toString();
+                entry.setCurrency(currency);//币别
+
+                String exchangeRate = new BigDecimal(map1.get("numberField_lucde59v").toString())
+                        .setScale(2, BigDecimal.ROUND_HALF_UP).toString();
+                entry.setExchangeRate(exchangeRate);//汇率
+
+                String amount = map1.get("numberField_lucde59w").toString();
+                entry.setAmount(amount);//原币金额
+
+                String realAmount = map1.get("numberField_lucde59x").toString();
+                entry.setRealAmount(realAmount);//折合人民币金额
+
+                String supplierNo = map1.get("textField_lx2niu82").toString();
+                entry.setSupplierNo(supplierNo);//供应商编码
+
+                entries.add(entry);
+
+            }
+            Data data1 = new Data();
+            data1.setHead(head);
+            data1.setEntry(entries);
+
+            MyJson json = new MyJson();
+            json.setType("CW13");//type
+            ArrayList<Data> dataList = new ArrayList<>();
+            dataList.add(data1);
+            json.setData(dataList);//data
+            // 序列化对象到JSON字符串
+            String jsonString1 = objectMapper.writeValueAsString(json);
+            String s1 = jsonString1.replaceAll("\"", "\\\"");
+            System.out.println(s1);//输出json,封装数据完毕!
+
+            //开始调用EAS接口操作:1、登录EAS(测试环境)  2、传参
+            EASLoginProxyProxy login = new EASLoginProxyProxy();
+            WSContext ctx = login.login("748", "riverdeepqwer12", "eas", "river001",
+                    "L2", 2);
+            System.out.println(ctx);
+            if (null != ctx.getSessionId() && !"".equals(ctx.getSessionId())) {
+                System.out.println("ctx.getSessionId():" + ctx.getSessionId());
+                WSPortalMainFacadeSrvProxyProxy portal = new WSPortalMainFacadeSrvProxyProxy();
+                String  remsg = portal.portalToEas("CW13",s1);
+                System.out.println(remsg);//打印返回结果
+            }
+        }
+
+        return McR.success();
+    }
+
+    //创建并设置整个JSON对象
+    public static class MyJson{
+        @JsonProperty("type")
+        private String type;
+        @JsonProperty("data")
+        private List<ExpenseAccrualServiceImpl.Data> data;
+        public String getType() {
+            return type;
+        }
+        public void setType(String type) {
+            this.type = type;
+        }
+        public List<ExpenseAccrualServiceImpl.Data> getData() {
+            return data;
+        }
+        public void setData(List<ExpenseAccrualServiceImpl.Data> data) {
+            this.data = data;
+        }
+    }
+
+    //Data对象
+    static class Data{
+        @JsonProperty("head")
+        private ExpenseAccrualServiceImpl.Head head;
+        @JsonProperty("entry")
+        private List<ExpenseAccrualServiceImpl.Entry> entry;
+        /*get,set方法*/
+        public ExpenseAccrualServiceImpl.Head getHead() {
+            return head;
+        }
+        public void setHead(ExpenseAccrualServiceImpl.Head head) {
+            this.head = head;
+        }
+        public List<ExpenseAccrualServiceImpl.Entry> getEntry() {
+            return entry;
+        }
+        public void setEntry(List<ExpenseAccrualServiceImpl.Entry> entry) {
+            this.entry = entry;
+        }
+    }
+
+    //Head对象
+    @AllArgsConstructor
+    @NoArgsConstructor
+    @lombok.Data
+    static class Head{
+        @JsonProperty("settlementType")
+        private String settlementType;//付款方式
+
+        @JsonProperty("number")
+        private String number;//流程编号
+
+        @JsonProperty("requestId")
+        private String requestId;//Portal唯一性校验=实例ID
+
+        @JsonProperty("appDate")
+        private String appDate;//申请日期
+
+        @JsonProperty("company")
+        private String company;//所属公司
+
+        @JsonProperty("appDepart")
+        private String appDepart;//申请部门
+
+        @JsonProperty("applicant")
+        private String applicant;//申请人
+
+        @JsonProperty("status")
+        private String status;//审核状态=审核(默认)
+
+    }
+
+    //Entry对象
+    @AllArgsConstructor
+    @NoArgsConstructor
+    @lombok.Data
+    static class Entry {
+        @JsonProperty("summary")
+        private String summary;//财务摘要
+        @JsonProperty("proNum")
+        private String proNum;//项目编号
+        @JsonProperty("amount")
+        private String amount;//原币金额
+        @JsonProperty("costCenter")
+        private String costCenter;//成本中心
+        @JsonProperty("campus")
+        private String campus;//校区部门编码
+        @JsonProperty("payCompany")
+        private String payCompany;//付款主体
+        @JsonProperty("title")
+        private String title;//费用内容
+        @JsonProperty("realAmount")
+        private String realAmount;//折合人民币金额
+        @JsonProperty("entryOwnId")
+        private String entryOwnId;//分录唯一ID: 表单唯一识别码UUID
+        @JsonProperty("exchangeRate")
+        private String exchangeRate;//汇率
+        @JsonProperty("currency")
+        private String currency;//币别
+        @JsonProperty("lines")
+        private String lines;//业务线
+        @JsonProperty("portalFeeType")
+        private String portalFeeType;//费用编号
+        @JsonProperty("supplierNo")
+        private String supplierNo;//供应商编码
+    }
+
+    /**
+     * 将时间戳转换为指定时区的格式化日期字符串。
+     *
+     * @param timestamp 时间戳(毫秒)
+     * @param timeZone  时区ID,例如 "UTC" 或 "Asia/Shanghai"
+     * @param pattern   日期格式,例如 "yyyy-MM-dd"
+     * @return 格式化后的日期字符串
+     */
+    public  String convertTimestampToDateString(long timestamp, String timeZone, String pattern) {
+        // 将时间戳转换为Instant
+        Instant instant = Instant.ofEpochMilli(timestamp);
+        // 将Instant转换为指定时区的日期
+        LocalDate date = instant.atZone(ZoneId.of(timeZone)).toLocalDate();
+        date = date.plusDays(1);
+        // 创建一个DateTimeFormatter来格式化日期
+        DateTimeFormatter formatter = DateTimeFormatter.ofPattern(pattern);
+        // 格式化LocalDate为字符串
+        String formattedDate = date.format(formatter);
+        // 返回格式化后的日期字符串
+        return formattedDate;
+    }
+
+
+
+}

+ 100 - 0
mjava-ruisi/src/main/java/com/malk/ruisi/service/impl/LegalEntityServiceImpl.java

@@ -0,0 +1,100 @@
+package com.malk.ruisi.service.impl;
+
+import com.alibaba.fastjson.JSONObject;
+import com.malk.ruisi.service.LegalEntityService;
+import com.malk.server.aliwork.YDConf;
+import com.malk.server.aliwork.YDParam;
+import com.malk.service.aliwork.YDClient;
+import com.malk.utils.UtilMap;
+import lombok.extern.slf4j.Slf4j;
+import org.checkerframework.checker.units.qual.A;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.sql.Connection;
+import java.sql.DriverManager;
+import java.sql.ResultSet;
+import java.sql.Statement;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+@Service
+@Slf4j
+public class LegalEntityServiceImpl implements LegalEntityService {
+    @Autowired
+    private YDClient ydClient;
+    @Override
+    public void LegalEntity() {
+        //1、数据库
+        List<Map> LegaltList = new ArrayList<>();
+        String sql = "SELECT FNAME,FNUMBER FROM V_ORG_COMPANY WHERE FNAME NOT LIKE '%rise-%'";
+        String jdbcUrl = "jdbc:oracle:thin:@10.30.53.26:1521:orcldb";
+        String userName = "riverdeep86";
+        String password = "riverdeep86";
+        try{
+            Class.forName("oracle.jdbc.driver.OracleDriver");
+            Connection conn = DriverManager.getConnection(jdbcUrl, userName, password);
+            Statement statement = conn.createStatement();
+            ResultSet resultSet = statement.executeQuery(sql);
+            int i=0;
+            while (resultSet.next()){
+                i++;
+                System.out.println(i+"-"+resultSet.getFetchSize());
+                System.out.println(resultSet.getString("FNUMBER"));//看进度用
+
+                String funmber = resultSet.getString("FNUMBER");//编号
+                String fnameL2 = resultSet.getString("FNAME");//名称
+                HashMap<String, Object> bankmap = new HashMap<>();
+                bankmap.put("FNUMBER",funmber);
+                bankmap.put("FNAME",fnameL2);
+                LegaltList.add(bankmap);
+
+            }
+            resultSet.close();
+            statement.close();
+            conn.close();
+
+        }catch (Exception e){
+            e.printStackTrace();
+        }
+        //异常处理集合
+        ArrayList<Object> list1 = new ArrayList<>();
+        int i =0;
+        //2、操作数据
+        for (Map legal : LegaltList) {
+            i++;
+            log.info("{}/{}",i,LegaltList.size());
+            String sc = "textField_lu84158s, textField_lu84158r";
+            String FNAME = legal.get("FNAME").toString()!=null?legal.get("FNAME").toString():"数据库此字段为空";
+            String FNUMBER = legal.get("FNUMBER").toString()!= null?legal.get("FNUMBER").toString():"数据库此字段为空";
+            try{
+                    String string = ydClient.operateData(YDParam.builder()
+                            .formUuid("FORM-182BA5120C5148E8B3EABA2BAE19C2AESMQB")
+                            .searchCondition(JSONObject.toJSONString(UtilMap.map("textField_lu84158s", FNUMBER)))
+                            .formDataJson(JSONObject.toJSONString(UtilMap.map(sc, FNUMBER, FNAME)))
+                            .build(), YDConf.FORM_OPERATION.upsert).toString();
+                    System.out.println("数据:"+string);
+            }catch (Exception e){//异常处理----
+                    e.printStackTrace();
+                    log.info("legal{}",legal);
+                    list1.add(legal);//存放错误信息
+            }
+
+        }
+        log.info("异常数据集合:{}",list1);
+    }
+    public static String convertToJson(String fnumber, String fnameL2) {
+        // 创建一个JSONObject来保存数据
+        JSONObject jsonObject = new JSONObject();
+        jsonObject.put("textField_lu84158s", fnumber);
+        jsonObject.put("textField_lu84158r", fnameL2);
+
+        // 将JSONObject转换为JSON字符串
+        String jsonString = jsonObject.toString();
+
+        // 返回JSON字符串
+        return jsonString;
+    }
+}

+ 83 - 0
mjava-ruisi/src/main/java/com/malk/ruisi/service/impl/MaterialServiceImpl.java

@@ -0,0 +1,83 @@
+package com.malk.ruisi.service.impl;
+
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONObject;
+import com.malk.ruisi.service.MaterialService;
+import com.malk.server.aliwork.YDConf;
+import com.malk.server.aliwork.YDParam;
+import com.malk.server.common.McR;
+import com.malk.server.dingtalk.DDConf;
+import com.malk.service.aliwork.YDClient;
+import com.malk.utils.UtilMap;
+import lombok.SneakyThrows;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+@Slf4j
+@Service
+public class MaterialServiceImpl implements MaterialService{
+    @Autowired
+    private YDConf ydConf;
+    @Autowired
+    private YDClient ydClient;
+    @Autowired
+    private DDConf ddConf;
+
+    @SneakyThrows
+    @Override
+    public McR findMaterial(String formUuid){
+        //分页查询,数据大于100
+        String instanceId = "FORM-AFC00FB98917492B9B094B0A1856C7FAI9BZ";
+        YDParam ydParam = YDParam.builder().formUuid(instanceId).build();
+        ydParam.setPageSize(1);
+        long totalCount = ydClient.queryData(ydParam, YDConf.FORM_QUERY.retrieve_search_form).getTotalCount();
+
+        List<Map> dataList = new ArrayList<>();
+        ydParam.setCurrentPage(1);
+        ydParam.setPageSize(100);
+        for (int page = 1; page <= (Math.ceil(totalCount / 100)!=0?Math.ceil(totalCount / 100):1); page++) {
+            ydParam.setCurrentPage(page);
+            dataList.addAll((List<Map>) ydClient.queryData(ydParam, YDConf.FORM_QUERY.retrieve_search_form).getData());
+        }
+        //对分页查询的数据业务处理
+        for(Map li: dataList){
+            String currentInstanceId = (String) li.get("formInstanceId");
+
+            Map map = (Map) li.get("formData");
+            String gysName= (String) map.get("textField_lw764w9i");
+//            System.out.println("供应商:"+gysName);
+
+
+                //供应商
+                List<Map>  supplierList= (List<Map>) ydClient.queryData(YDParam.builder().formUuid("FORM-11DE806A1543428FA9C18B5EED133779QUFD")
+                        .appType(ydConf.getAppType()).systemToken(ydConf.getSystemToken())
+                        .searchFieldJson(JSONObject.toJSONString(UtilMap.map("textField_lu248b7c",gysName)))
+                        .userId(ddConf.getOperator()).build(), YDConf.FORM_QUERY.retrieve_list).getData();
+                if(supplierList.size() >0 ){
+                    Map map1 = (Map) supplierList.get(0);
+
+                    String uuId = (String) map1.get("formInstanceId");
+
+                    Map hashMap = new HashMap();
+                    hashMap.put("associationFormField_lu24gdvc",YDConf.associationForm(ydConf.getAppType(),"FORM-11DE806A1543428FA9C18B5EED133779QUFD",
+                            uuId,gysName,"",false));
+                    if (!gysName.isEmpty()){
+                        ydClient.operateData(YDParam.builder()
+                                .formInstanceId(currentInstanceId)
+                                .updateFormDataJson(JSON.toJSONString(hashMap))
+                                .build(), YDConf.FORM_OPERATION.update);
+                    }
+
+                }
+        }
+        System.out.println("数据操作成功!");
+        return McR.success();
+    }
+
+}

+ 206 - 0
mjava-ruisi/src/main/java/com/malk/ruisi/service/impl/NewsSupplierAdditionServiceImpl.java

@@ -0,0 +1,206 @@
+package com.malk.ruisi.service.impl;
+
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONObject;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.malk.ruisi.client.WSContext;
+import com.malk.ruisi.entity.NewsSupplier;
+import com.malk.ruisi.service.NewSupplierAdditionService;
+import com.malk.ruisi.services.EASLogin.EASLoginProxyProxy;
+import com.malk.ruisi.services.WSPortalMainFacade.WSPortalMainFacadeSrvProxyProxy;
+import com.malk.server.aliwork.YDConf;
+import com.malk.server.aliwork.YDParam;
+import com.malk.server.common.McR;
+import com.malk.server.common.McREnum;
+import com.malk.server.dingtalk.DDConf;
+import com.malk.service.aliwork.YDClient;
+import com.malk.utils.UtilMap;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+import lombok.SneakyThrows;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.io.IOException;
+import java.sql.Connection;
+import java.sql.DriverManager;
+import java.sql.ResultSet;
+import java.sql.Statement;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+@Slf4j
+@Service
+public class NewsSupplierAdditionServiceImpl implements NewSupplierAdditionService {
+    @Autowired
+    private YDClient ydClient;
+    @Autowired
+    private YDConf ydConf;
+    @Autowired
+    private DDConf ddConf;
+
+    @SneakyThrows
+    @Override
+    public McR addAndUpdate(String instanceId) throws JsonProcessingException {
+        if(instanceId != null){
+            System.out.println("实例ID:"+instanceId);
+            /*流程表单字段信息*/
+            Map data = (Map) ydClient.queryData(YDParam.builder().formInstId(instanceId)
+                    .appType(ydConf.getAppType()).systemToken(ydConf.getSystemToken())
+                    .userId(ddConf.getOperator()).build(), YDConf.FORM_QUERY.retrieve_id).getFormData();
+            System.out.println(data);
+            /*类型做判断:新增(更新基础表并且对接EAS)----更新(只更新基础表不对接EAS)*/
+            if(data.get("selectField_luchp1e8").equals("新增")){
+                /*宜搭供应商编码命名规则:GYS202403290001,后面的四位数会依次增加*/
+                String number = data.get("serialNumberField_luchp1e2").toString();//number:流水号
+                String name = data.get("textField_lug9nktw").toString();//name:公司名称
+                String abbr = data.get("textField_lug9nktw").toString();//abbr:简称
+                DataItem item = new DataItem(number, name, abbr, "2");//classifyNo供应商分类编码,固定传2
+                RequestData requestData = new RequestData();
+                requestData.setType("SU01");
+                requestData.setData(new DataItem[]{item});
+                System.out.println(requestData.toString());//输出传参json
+                EASLoginProxyProxy login = new EASLoginProxyProxy();
+                WSContext ctx = login.login("748", "riverdeepqwer12", "eas", "river001",
+                        "L2", 2);
+                System.out.println(ctx);
+                if (null != ctx.getSessionId() && !"".equals(ctx.getSessionId())) {
+                    System.out.println("ctx.getSessionId():" + ctx.getSessionId());
+                    WSPortalMainFacadeSrvProxyProxy portal = new WSPortalMainFacadeSrvProxyProxy();
+
+                    String remsg = portal.portalToEas("SU01", requestData.toString());
+                    System.out.println("remsg:"+remsg);
+                }
+
+                //供应商基础档案表单数据新增
+                String sc="textField_lu248b7c, textField_lvjbkqxl, textField_lu248b7w, textField_lu248b85, textField_lu248b86, textField_lu248b8f, textField_lw6a4tne, textField_lw6a4tnf, textField_lw6a4tng";
+                String sc1="textField_lu248b7c, textField_lvjbkqxl, textField_lu248b7w, textField_lu248b85, textField_lu248b86, textField_lu248b8f, textField_lw6a4tne, textField_lw6a4tng";
+                //供应商名称 供应商编码 户名 开户银行 账号 银行联行行号 收款方国家 收款方省 收款方市县
+                String account = (String) data.get("textField_lug9nktx");//户名
+                String accountBank = (String) data.get("textField_lug9nku0");//开户银行
+                String accountID = (String) data.get("textField_lug9nkty");//账号
+                String BIN = (String) data.get("textField_lw7x4em5");//银行联行行号
+                ObjectMapper mapper = new ObjectMapper();
+
+                System.out.println(data.get("countrySelectField_lupb9rhd"));
+                String string = data.get("countrySelectField_lupb9rhd").toString();
+                JsonNode rootNode = mapper.readTree(string);
+                String country = rootNode.get(0).asText();//收款方国家
+                String city = (String) data.get("textField_lw6b3vjv");//收款方市县
+                /*是否境外公司*/
+                if(data.get("selectField_luchp1e9").equals("否")){
+                    String zhCN = null;
+                    System.out.println(data.get("addressField_lupb9rhf"));;//有收款方省市
+                    String jsonString = data.get("addressField_lupb9rhf").toString();
+                    ObjectMapper objectMapper = new ObjectMapper();
+                    JsonNode jsonNode = objectMapper.readTree(jsonString);
+                    JsonNode regionTextArray  = jsonNode.get("regionText");
+                    if (regionTextArray.isArray() && !regionTextArray.isEmpty()) {
+                        JsonNode regionTextObject = regionTextArray.get(0);
+                        zhCN = regionTextObject.get("zh_CN").asText();
+                        System.out.println(zhCN);
+                    }
+                    String province = zhCN;//收款方省市
+                    ydClient.operateData(YDParam.builder()
+                            .formUuid("FORM-11DE806A1543428FA9C18B5EED133779QUFD")
+                            .formDataJson(JSONObject.toJSONString(UtilMap.map(sc,name, number,account,accountBank,accountID,BIN,country,province,city)))
+                            .build(), YDConf.FORM_OPERATION.create).toString();
+                }else {
+                    //没有收款方省市
+                    ydClient.operateData(YDParam.builder()
+                            .formUuid("FORM-11DE806A1543428FA9C18B5EED133779QUFD")
+                            .formDataJson(JSONObject.toJSONString(UtilMap.map(sc1,name, number,account,accountBank,accountID,BIN,country,city)))
+                            .build(), YDConf.FORM_OPERATION.create).toString();
+                }
+
+            }else {
+                //户名 开户银行 账号 收款行国家 收款行省 收款行市县
+                String so = "textField_lu248b7w, textField_lu248b85, textField_lu248b86, textField_lw6a4tne, textField_lw6a4tnf, textField_lw6a4tng";
+                //户名 开户银行 账号 收款行国家 收款行市县
+                String so1 = "textField_lu248b7w, textField_lu248b85, textField_lu248b86, textField_lw6a4tne, textField_lw6a4tng";
+                String account = (String) data.get("textField_lug9nktx");//户名
+                String accountBank = (String) data.get("textField_lug9nku0");//开户银行
+                String accountID = (String) data.get("textField_lug9nkty");//账号
+                String string = data.get("countrySelectField_lupb9rhd").toString();
+                ObjectMapper mapper = new ObjectMapper();
+                JsonNode rootNode = mapper.readTree(string);
+                String country = rootNode.get(0).asText();//收款方国家
+                String city = (String) data.get("textField_lw6b3vjv");//收款方市县
+                String gysNo = data.get("textField_lx31ubkq").toString();//供应商编码
+                /*是否境外公司*/
+                if(data.get("selectField_luchp1e9").equals("否")){
+                    String zhCN = null;
+                    System.out.println(data.get("addressField_lupb9rhf"));;//有收款方省市
+                    String jsonString = data.get("addressField_lupb9rhf").toString();
+                    ObjectMapper objectMapper = new ObjectMapper();
+                    JsonNode jsonNode = objectMapper.readTree(jsonString);
+                    JsonNode regionTextArray  = jsonNode.get("regionText");
+                    if (regionTextArray.isArray() && !regionTextArray.isEmpty()) {
+                        JsonNode regionTextObject = regionTextArray.get(0);
+                        zhCN = regionTextObject.get("zh_CN").asText();
+                        System.out.println(zhCN);
+                    }
+                    String province = zhCN;//收款方省市
+
+                    ydClient.operateData(YDParam.builder()
+                            .formUuid("FORM-11DE806A1543428FA9C18B5EED133779QUFD")
+                            .searchCondition(JSONObject.toJSONString(UtilMap.map("textField_lvjbkqxl",gysNo)))
+                            .formDataJson(JSONObject.toJSONString(UtilMap.map(so,account,accountBank,accountID,country,province,city)))
+                            .build(),YDConf.FORM_OPERATION.upsert).toString();
+                }else {
+                    //没有收款方省市
+                    ydClient.operateData(YDParam.builder()
+                            .formUuid("FORM-11DE806A1543428FA9C18B5EED133779QUFD")
+                            .searchCondition(JSONObject.toJSONString(UtilMap.map("textField_lvjbkqxl",gysNo)))
+                            .formDataJson(JSONObject.toJSONString(UtilMap.map(so1,account,accountBank,accountID,country,city)))
+                            .build(), YDConf.FORM_OPERATION.upsert).toString();
+                }
+
+            }
+
+        }else {
+            return McR.error(McREnum.UNKNOWN_EXCEPTION.toString(),"参数未知");
+        }
+        return null;
+    }
+
+
+
+    //外层数据类
+    @AllArgsConstructor
+    @NoArgsConstructor
+    @Data
+    public static class RequestData{
+        private String type;
+        private NewsSupplierAdditionServiceImpl.DataItem[] data;
+
+        @Override
+        public String toString() {
+            try {
+                ObjectMapper mapper = new ObjectMapper();
+                return mapper.writeValueAsString(this);
+            } catch (IOException e) {
+                e.printStackTrace();
+                return "Error serializing to JSON";
+            }
+        }
+    }
+
+    //内部数据类
+    @AllArgsConstructor
+    @NoArgsConstructor
+    @Data
+    public static class DataItem{
+        private String number;
+        private String name;
+        private String abbr;
+        private String classifyNo;//固定传2
+    }
+
+}

+ 452 - 0
mjava-ruisi/src/main/java/com/malk/ruisi/service/impl/TravelWriteKingDeeServiceImpl.java

@@ -0,0 +1,452 @@
+package com.malk.ruisi.service.impl;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.malk.ruisi.client.WSContext;
+import com.malk.ruisi.service.TravelWriteKingDeeService;
+import com.malk.ruisi.services.EASLogin.EASLoginProxyProxy;
+import com.malk.ruisi.services.WSPortalMainFacade.WSPortalMainFacadeSrvProxyProxy;
+import com.malk.server.aliwork.YDConf;
+import com.malk.server.aliwork.YDParam;
+import com.malk.server.common.McR;
+import com.malk.server.common.McREnum;
+import com.malk.server.dingtalk.DDConf;
+import com.malk.service.aliwork.YDClient;
+import lombok.AllArgsConstructor;
+import lombok.NoArgsConstructor;
+import lombok.SneakyThrows;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.math.BigDecimal;
+import java.time.Instant;
+import java.time.LocalDate;
+import java.time.ZoneId;
+import java.time.format.DateTimeFormatter;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+@Service
+public class TravelWriteKingDeeServiceImpl implements TravelWriteKingDeeService {
+    @Autowired
+    private YDClient ydClient;
+    @Autowired
+    private YDConf ydConf;
+    @Autowired
+    private DDConf ddConf;
+
+    @SneakyThrows
+    @Override
+    public McR insetXMC(String instanceId) throws JsonProcessingException {
+        if(instanceId != null){
+            System.out.println("实例ID:"+instanceId);
+            //通过实例ID拿取宜搭表单数据
+            Map data = (Map) ydClient.queryData(YDParam.builder().formInstId(instanceId)
+                    .appType(ydConf.getAppType()).systemToken(ydConf.getSystemToken())
+                    .userId(ddConf.getOperator()).build(), YDConf.FORM_QUERY.retrieve_id).getFormData();
+            System.out.println(data);
+            if(data.get("radioField_luaxcrpq").toString().equals("差旅报销流程")){
+                ObjectMapper objectMapper = new ObjectMapper();
+                // 创建并设置head对象
+                Head head = new Head();
+                //根据是否境外公司判断head传参类型
+                String requestId = null;
+                if(data.get("selectField_luaxcrq1").toString().equals("是")){
+                    head.setReservedField2(instanceId);//申请单实例
+
+                    head.setTitle(data.get("textField_luaxcrpv").toString());//title
+
+                    String s = data.get("serialNumberField_luaxcrpw").toString();
+                    String prefix = "CW04-SLBX-";
+                    String result = prefix+s;
+                    head.setNumber(result);//number
+
+                    String string = data.get("serialNumberField_luaxcrpw").toString();
+                    requestId = string.substring(string.length() - 7);
+                    head.setRequestId(requestId);//requestId  Portal做唯一性校验
+
+                    head.setApplicant(data.get("textField_lwheukhv").toString());//申请人(编码)
+                    head.setAppDepart(data.get("textField_lwheukhw").toString());//申请部门(编码)
+
+                    long time = (long)data.get("dateField_luaxcrpz");
+                    String utc = convertTimestampToDateString(time, "UTC", "yyyy-MM-dd");
+                    head.setAppDate(utc);//申请日期
+
+                    String company = data.get("textField_lwheukhx").toString();
+                    head.setCompany(company);//所属公司(编码)
+
+                    if(data.get("selectField_luaxcrq1").toString().equals('是')){ //是否境外公司(0-是  1-否)
+                        head.setIsOffCompany("0");
+                    }else{
+                        head.setIsOffCompany("1");
+                    }
+
+                    if(data.get("selectField_luaxcrq2").toString().equals('是')){ //是否提供发票(0-是  1-否)
+                        head.setIsInvoice("0");
+                    }else{
+                        head.setIsInvoice("1");
+                    }
+
+                    head.setCurrency(data.get("textField_lwhkeuno").toString());//币种
+                    head.setExchangeRate(new BigDecimal(data.get("numberField_luaxcrq6").toString())
+                            .setScale(6,BigDecimal.ROUND_HALF_UP).toString());//汇率:保留6位小数
+                    head.setSettlementType(data.get("textField_lwhkeunp").toString());//付款方式(编码)
+                    head.setAmount(new BigDecimal(data.get("numberField_luaxcrq8").toString())
+                            .setScale(2,BigDecimal.ROUND_HALF_UP).toString());//折合人民币金额:保留2位小数
+                    head.setRealAmount(new BigDecimal(data.get("numberField_luaxcrq9").toString())
+                            .setScale(2,BigDecimal.ROUND_HALF_UP).toString());//本次付款金额:保留2位小数
+                    head.setAcctName(data.get("textField_luaxcrqd").toString());//收款人户名
+                    head.setAccount(data.get("textField_luaxcrqi").toString());//收款人账号
+
+                    ObjectMapper mapp = new ObjectMapper();
+                    String str = data.get("countrySelectField_lugqdy57").toString();
+                    JsonNode rootNode = mapp.readTree(str);
+                    String country = rootNode.get(0).asText();
+                    head.setCountry(country);//收款方国家
+
+                    head.setBank(data.get("textField_luaxcrqj").toString());//收款人开户银行bank
+                    head.setReservedField1(data.get("selectField_lx02gcaw").toString());//用途---财务审批节点填写
+                    head.setAddr(data.get("textField_luaxcrqm").toString());//地址
+                    head.setSwift(data.get("textField_luaxcrqn").toString());//SWIFT
+                    head.setInvoiceNum(data.get("textField_luaxcrqo").toString());//发票号码
+                    head.setStatus("审核");
+                }else {
+                    head.setReservedField2(instanceId);//申请单实例
+
+                    if(data.get("textField_luaxcrpv").toString() != null){
+                        head.setTitle(data.get("textField_luaxcrpv").toString());//title
+                    }
+
+                    String s = data.get("serialNumberField_luaxcrpw").toString();
+                    String prefix = "CW04-SLBX-";
+                    String result = prefix+s;
+                    head.setNumber(result);//number
+
+                    String ss = data.get("serialNumberField_luaxcrpw").toString();
+                    requestId = ss.substring(ss.length() - 7);
+                    head.setRequestId(requestId);//requestId  Portal做唯一性校验
+
+                    head.setApplicant(data.get("textField_lwheukhv").toString());//申请人(编码)
+                    head.setAppDepart(data.get("textField_lwheukhw").toString());//申请部门(编码)
+
+                    long time = (long)data.get("dateField_luaxcrpz");
+                    String utc = convertTimestampToDateString(time, "UTC", "yyyy-MM-dd");
+                    head.setAppDate(utc);//申请日期
+
+                    String company = data.get("textField_lwheukhx").toString();
+                    head.setCompany(company);//所属公司(编码)
+
+                    if(data.get("selectField_luaxcrq1").toString().equals("是")){ //是否境外公司(0-是  1-否)
+                        head.setIsOffCompany("0");
+                    }else{
+                        head.setIsOffCompany("1");
+                    }
+
+                    if(data.get("selectField_luaxcrq2").toString().equals("是")){ //是否提供发票(0-是  1-否)
+                        head.setIsInvoice("0");
+                    }else{
+                        head.setIsInvoice("1");
+                    }
+
+                    head.setCurrency(data.get("textField_lwhkeuno").toString());//币种
+                    head.setExchangeRate(new BigDecimal(data.get("numberField_luaxcrq6").toString())
+                            .setScale(6,BigDecimal.ROUND_HALF_UP).toString());//汇率:保留6位小数
+                    head.setSettlementType(data.get("textField_lwhkeunp").toString());//付款方式(编码)
+                    head.setAmount(new BigDecimal(data.get("numberField_luaxcrq8").toString())
+                            .setScale(2,BigDecimal.ROUND_HALF_UP).toString());//折合人民币金额:保留2位小数
+                    head.setRealAmount(new BigDecimal(data.get("numberField_luaxcrq9").toString())
+                            .setScale(2,BigDecimal.ROUND_HALF_UP).toString());//本次付款金额:保留2位小数
+                    head.setAcctName(data.get("textField_luaxcrqd").toString());//收款人户名
+                    head.setAccount(data.get("textField_luaxcrqi").toString());//收款人账号
+                    head.setBank(data.get("textField_luaxcrqj").toString());//收款人开户银行
+                    head.setReservedField1(data.get("selectField_lx02gcaw").toString());//用途
+                    head.setBankNum(data.get("textField_lwhkeunq").toString());//收款人银行联行号
+
+                    ObjectMapper mapper = new ObjectMapper();
+                    String string = data.get("countrySelectField_lugqdy57").toString();
+                    JsonNode rootNode = mapper.readTree(string);
+                    String country = rootNode.get(0).asText();//收款方国家
+                    head.setCountry(country);
+
+                    String jsonString = data.get("addressField_luqo3eo1").toString();
+                    ObjectMapper objectMapper1 = new ObjectMapper();
+                    JsonNode jsonNode = objectMapper1.readTree(jsonString);
+                    JsonNode regionTextArray  = jsonNode.get("regionText");
+                    if (regionTextArray.isArray() && !regionTextArray.isEmpty()) {
+                        JsonNode regionTextObject = regionTextArray.get(0);
+                        String zhCN = regionTextObject.get("zh_CN").asText();
+                        System.out.println(zhCN);
+                        head.setProvince(zhCN);//收款方省市
+                    }
+
+                    String city = data.get("textField_lwgkgvcm").toString();
+                    head.setCity(city);//收款方市县
+
+                    head.setStatus("审核");
+                }
+
+                // 创建并设置entry对象列表
+                ArrayList<Entry> entries = new ArrayList<>();
+                Entry entry1 = new Entry();
+
+                //获取子表单中字段信息
+                List<Map> jsonString = (List<Map>)data.get("tableField_luap0c8x");
+                System.out.println("jsonString:"+jsonString);
+                int num=0;
+                for (Map map1 : jsonString) {//遍历子表单数据
+                    num++;
+                    String entryOwnId = requestId.concat(String.valueOf(num));
+                    entry1.setEntryOwnId(entryOwnId);//entryOwnId:分录唯一ID
+
+                    String summary = data.get("textField_lx17qf5z").toString();
+                    entry1.setSummary("支付-"+summary);//财务摘要
+
+                    String lines = map1.get("textField_lwhkeunr").toString();//拿取到产品线【关联表单->文本】
+                    entry1.setLines(lines);
+
+                    String portalFeeType = map1.get("textField_lwhkeuns").toString();//费用编号【关联表单->文本】
+                    entry1.setPortalFeeType(portalFeeType);
+
+                    String proNum = map1.get("textField_lwhkeunt").toString();//拿取到项目编号【关联表单->文本】
+                    entry1.setProNum(proNum);
+
+                    String costCenter = map1.get("textField_lwhkeunu").toString();//成本中心
+                    entry1.setCostCenter(costCenter);
+
+                    if(map1.get("textField_lwhkeunv").toString() != null){
+                        entry1.setCampus(map1.get("textField_lwhkeunv").toString());//校区部门
+                    }
+
+                    String payCompany = map1.get("textField_lwhkeunw").toString();//付款主体
+                    entry1.setPayCompany(payCompany);
+
+                    String payAmount = new BigDecimal(map1.get("numberField_luap0c94").toString())
+                            .setScale(2,BigDecimal.ROUND_HALF_UP).toString();//付款金额
+                    entry1.setPayAmount(payAmount);
+
+                    String isSpeInvoice = map1.get("textField_lwhkeunx").toString();//是否增值税专用发票
+                    entry1.setIsSpeInvoice(isSpeInvoice);
+
+                    String taxAmount = new BigDecimal(map1.get("numberField_luap0c96").toString())
+                            .setScale(2,BigDecimal.ROUND_HALF_UP).toString();//含税金额
+                    entry1.setTaxAmount(taxAmount);
+
+                    String rate = new BigDecimal(map1.get("numberField_lu94kny9").toString())
+                            .setScale(2,BigDecimal.ROUND_HALF_UP).toString();//税率
+                    entry1.setRate(rate);
+
+                    String notTaxAmount = new BigDecimal(map1.get("numberField_lu94kny8").toString())
+                            .setScale(2,BigDecimal.ROUND_HALF_UP).toString();//不含税金额
+                    entry1.setNotTaxAmount(notTaxAmount);
+
+                    String tax = new BigDecimal(map1.get("numberField_lu94knya").toString())
+                            .setScale(2,BigDecimal.ROUND_HALF_UP).toString();//税额
+                    entry1.setTax(tax);
+
+                    entries.add(entry1);
+                    num++;
+                }
+
+                // 创建并设置data对象
+                Data data1 = new Data();
+                data1.setHead(head);
+                data1.setEntry(entries);
+                // 创建并设置整个JSON对象
+                MyJson json = new MyJson();
+                json.setType("CW04");
+                List<Data> dataList = new ArrayList<>();
+                dataList.add(data1);
+                json.setData(dataList);
+                // 序列化对象到JSON字符串
+                String jsonString1 = objectMapper.writeValueAsString(json);
+                // 输出JSON字符串(参数封装完毕!)
+                String s1 = jsonString1.replaceAll("\"", "\\\"");
+                System.out.println(s1);
+                //开始調用EAS系統接口
+                EASLoginProxyProxy login = new EASLoginProxyProxy();
+                WSContext ctx = login.login("748", "riverdeepqwer12", "eas", "river001",
+                        "L2", 2);
+                System.out.println(ctx);
+                if (null != ctx.getSessionId() && !"".equals(ctx.getSessionId())) {
+                    System.out.println("ctx.getSessionId():" + ctx.getSessionId());
+                    WSPortalMainFacadeSrvProxyProxy portal = new WSPortalMainFacadeSrvProxyProxy();
+                    try {
+                        String remsg = portal.portalToEas("CW04", s1);
+                        System.out.println("remsg:"+ remsg);
+                    }catch (Exception e){
+                        //异常处理
+                        e.printStackTrace();
+                    }
+                }
+
+            }
+
+        }else {
+            return McR.error(McREnum.UNKNOWN_EXCEPTION.toString(),"参数缺失");
+        }
+        return McR.success();
+    }
+
+    //创建并设置整个JSON对象
+    public static class MyJson{
+        @JsonProperty("type")
+        private String type;
+        @JsonProperty("data")
+        private List<TravelWriteKingDeeServiceImpl.Data> data;
+        public String getType() {
+            return type;
+        }
+        public void setType(String type) {
+            this.type = type;
+        }
+        public List<TravelWriteKingDeeServiceImpl.Data> getData() {
+            return data;
+        }
+        public void setData(List<TravelWriteKingDeeServiceImpl.Data> data) {
+            this.data = data;
+        }
+    }
+    //Data对象
+    static class Data{
+        @JsonProperty("head")
+        private TravelWriteKingDeeServiceImpl.Head head;
+        @JsonProperty("entry")
+        private List<TravelWriteKingDeeServiceImpl.Entry> entry;
+        /*get,set方法*/
+        public TravelWriteKingDeeServiceImpl.Head getHead() {
+            return head;
+        }
+        public void setHead(TravelWriteKingDeeServiceImpl.Head head) {
+            this.head = head;
+        }
+        public List<TravelWriteKingDeeServiceImpl.Entry> getEntry() {
+            return entry;
+        }
+        public void setEntry(List<TravelWriteKingDeeServiceImpl.Entry> entry) {
+            this.entry = entry;
+        }
+    }
+    //Head对象
+    @AllArgsConstructor
+    @NoArgsConstructor
+    @lombok.Data
+    static class Head{
+        @JsonProperty("reservedField2")
+        private String reservedField2;//申请单实例
+        @JsonProperty("title")
+        private String title;//流程标题
+        @JsonProperty("number")
+        private String number;//流程编号
+        @JsonProperty("requestId")
+        private String requestId;//Portal唯一性校验=实例ID
+        @JsonProperty("applicant")
+        private String applicant;//申请人
+        @JsonProperty("appDepart")
+        private String appDepart;//申请部门
+        @JsonProperty("appDate")
+        private String appDate;//申请日期
+        @JsonProperty("company")
+        private String company;//所属公司
+        @JsonProperty("isOffCompany")
+        private String isOffCompany;//是否境外公司
+        @JsonProperty("isInvoice")
+        private String isInvoice;//是否提供发票
+        @JsonProperty("currency")
+        private String currency;//币种
+        @JsonProperty("exchangeRate")
+        private String exchangeRate;//汇率
+        @JsonProperty("settlementType")
+        private String settlementType;//付款方式
+        @JsonProperty("amount")
+        private String amount;//折合人民币金额
+        @JsonProperty("realAmount")
+        private String realAmount;//本次付款金额
+        @JsonProperty("supplierNo")
+        private String supplierNo;//供应商名称
+        @JsonProperty("acctName")
+        private String acctName;//收款人户名
+        @JsonProperty("account")
+        private String account;//收款人账号
+        @JsonProperty("bank")
+        private String bank;//收款人开户银行
+        @JsonProperty("reservedField1")
+        private String reservedField1;//用途
+        @JsonProperty("bankNum")
+        private String bankNum;//收款人银行联行号
+        @JsonProperty("country")
+        private String country;//收款方国家
+        @JsonProperty("province")
+        private String province;//收款方省
+        @JsonProperty("city")
+        private String city;//收款方市县
+        @JsonProperty("addr")
+        private String addr;//地址
+        @JsonProperty("swift")
+        private String swift;//SWIFT
+        @JsonProperty("invoiceNum")
+        private String invoiceNum;//invoiceNum
+        @JsonProperty("status")
+        private String status;//单据状态
+
+    }
+    //Entry对象
+    @AllArgsConstructor
+    @NoArgsConstructor
+    @lombok.Data
+    static class Entry {
+        @JsonProperty("entryOwnId")
+        private String entryOwnId;//表单唯一识别码UUID
+        @JsonProperty("summary")
+        private String summary;//财务摘要
+        @JsonProperty("lines")
+        private String lines;//产品线
+        @JsonProperty("portalFeeType")
+        private String portalFeeType;//费用编号
+        @JsonProperty("proNum")
+        private String proNum;//项目编号
+        @JsonProperty("costCenter")
+        private String costCenter;//成本中心
+        @JsonProperty("campus")
+        private String campus;//校区部门
+        @JsonProperty("payCompany")
+        private String payCompany;//付款主体
+        @JsonProperty("payAmount")
+        private String payAmount;//付款金额
+        @JsonProperty("isSpeInvoice")
+        private String isSpeInvoice;//是否增值税专用发票
+        @JsonProperty("taxAmount")
+        private String taxAmount;//含税金额
+        @JsonProperty("rate")
+        private String rate;//税率
+        @JsonProperty("notTaxAmount")
+        private String notTaxAmount;//不含税金额
+        @JsonProperty("tax")
+        private String tax;//税额
+    }
+    /**
+     * 将时间戳转换为指定时区的格式化日期字符串。
+     *
+     * @param timestamp 时间戳(毫秒)
+     * @param timeZone  时区ID,例如 "UTC" 或 "Asia/Shanghai"
+     * @param pattern   日期格式,例如 "yyyy-MM-dd"
+     * @return 格式化后的日期字符串
+     */
+    public  String convertTimestampToDateString(long timestamp, String timeZone, String pattern) {
+        // 将时间戳转换为Instant
+        Instant instant = Instant.ofEpochMilli(timestamp);
+        // 将Instant转换为指定时区的日期
+        LocalDate date = instant.atZone(ZoneId.of(timeZone)).toLocalDate();
+        date = date.plusDays(1);
+        // 创建一个DateTimeFormatter来格式化日期
+        DateTimeFormatter formatter = DateTimeFormatter.ofPattern(pattern);
+        // 格式化LocalDate为字符串
+        String formattedDate = date.format(formatter);
+        // 返回格式化后的日期字符串
+        return formattedDate;
+    }
+
+
+}

+ 89 - 0
mjava-ruisi/src/main/java/com/malk/ruisi/service/impl/UfHzqyServiceImpl.java

@@ -0,0 +1,89 @@
+package com.malk.ruisi.service.impl;
+
+import com.malk.ruisi.service.UfHzqyService;
+import com.malk.server.aliwork.YDConf;
+import com.malk.service.aliwork.YDClient;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.sql.Connection;
+import java.sql.DriverManager;
+import java.sql.ResultSet;
+import java.sql.Statement;
+import java.util.ArrayList;
+import java.util.Map;
+
+@Service
+@Slf4j
+public class UfHzqyServiceImpl implements UfHzqyService {
+    @Autowired
+    private YDClient ydClient;
+
+    @Override
+    public void UfHzqy() {
+        //1、数据库
+        ArrayList<Map> list = new ArrayList<>();
+        String SQL = "SELECT\n" +
+                "\tb.org_code,\n" +
+                "\tb.org_name,\n" +
+                "\tme1.id AS invest_employee_id,\n" +
+                "\tme1.employee_name_cn AS invest_employee_name,\n" +
+                "\tDATE_FORMAT( a.updated_date, '%Y-%m-%d %H:%i:%S' ) AS update_time \n" +
+                "FROM\n" +
+                "\tm_manage_area_group_detail a,\n" +
+                "\tm_organization b,\n" +
+                "\tm_employee me1,\n" +
+                "\tm_employee me2,\n" +
+                "\tm_employee me3,\n" +
+                "\tm_employee me4,\n" +
+                "\tm_employee me5,\n" +
+                "\tm_employee me6,\n" +
+                "\tm_manage_area_group c,\n" +
+                "\tm_employee me7 \n" +
+                "WHERE\n" +
+                "\ta.org_id = b.id \n" +
+                "\tAND a.invest_employee_id = me1.id \n" +
+                "\tAND a.bus_adviser_employee_id = me2.id \n" +
+                "\tAND a.learn_direct_employee_id = me3.id \n" +
+                "\tAND a.devops_employee_id = me4.id \n" +
+                "\tAND a.learn_employee_id = me5.id \n" +
+                "\tAND a.learn_man_employee_id = me6.id \n" +
+                "\tAND a.area_group_id = c.id \n" +
+                "\tAND c.bus_employee_id = me7.id \n" +
+                "\tAND a.delete_flag = 0 \n" +
+                "\tAND c.delete_flag = 0 \n" +
+                "\tAND me1.delete_flag = 0 \n" +
+                "\tAND me2.delete_flag = 0 \n" +
+                "\tAND me3.delete_flag = 0 \n" +
+                "\tAND me4.delete_flag = 0 \n" +
+                "\tAND me5.delete_flag = 0 \n" +
+                "\tAND me6.delete_flag = 0 \n" +
+                "\tAND me7.delete_flag = 0";
+        String jdbcUrl = "jdbc:mysql://10.30.54.68:3306/cos?useSSL=false&charsetEncoding=utf8";
+        String userName = "cosuser";
+        String password = "AdminCos321!@#";
+        try{
+            Class.forName("com.mysql.cj.jdbc.Driver");
+            Connection conn = DriverManager.getConnection(jdbcUrl, userName, password);
+            Statement statement = conn.createStatement();
+            ResultSet resultSet = statement.executeQuery(SQL);
+            int i =0;
+            while (resultSet.next()) {
+                i++;
+                String hzqy = resultSet.getString("org_name");//合作区域 org_name
+                String hzqyCode = resultSet.getString("org_code");//区域代码 org_code
+                String yygw = resultSet.getString("bus_adviser_employee_name");//运营顾问 bus_adviser_employee_name
+                String yyzg = resultSet.getString("bus_employee_name");//运营主管 bus_employee_name
+                String tzr = resultSet.getString("invest_employee_name");//投资人 invest_employee_name
+                String tzrId = resultSet.getString("invest_employee_id");//投资人ID invest_employee_id
+                String xsdd = resultSet.getString("learn_direct_employee_name");//学术督导 learn_direct_employee_name
+                String xszg = resultSet.getString("learn_man_employee_name");//学术主管 learn_man_employee_name
+
+            }
+        }catch (Exception e){
+            e.printStackTrace();
+        }
+
+    }
+}

+ 474 - 0
mjava-ruisi/src/main/java/com/malk/ruisi/service/impl/WriteKingDeeServiceImpl.java

@@ -0,0 +1,474 @@
+package com.malk.ruisi.service.impl;
+
+import cn.hutool.json.JSONArray;
+import cn.hutool.json.JSONObject;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.malk.ruisi.client.WSContext;
+import com.malk.ruisi.mapper.WriteKingDeeMapper;
+import com.malk.ruisi.service.WriteKingDeeService;
+import com.malk.ruisi.services.EASLogin.EASLoginProxy;
+import com.malk.ruisi.services.EASLogin.EASLoginProxyProxy;
+import com.malk.ruisi.services.WSPortalMainFacade.WSPortalMainFacadeSrvProxyProxy;
+import com.malk.ruisi.utils.InterfaceClientUtil;
+import com.malk.server.aliwork.YDConf;
+import com.malk.server.aliwork.YDParam;
+import com.malk.server.common.McR;
+import com.malk.server.common.McREnum;
+import com.malk.server.dingtalk.DDConf;
+import com.malk.service.aliwork.YDClient;
+import com.malk.utils.UtilMap;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+import lombok.SneakyThrows;
+/*import org.apache.cxf.endpoint.Client;
+import org.apache.cxf.endpoint.dynamic.DynamicClientFactory;
+import org.apache.cxf.helpers.IOUtils;*/
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+
+import javax.xml.soap.*;
+import javax.xml.transform.Source;
+import javax.xml.transform.stream.StreamSource;
+import java.io.InputStream;
+import java.io.StringReader;
+import java.math.BigDecimal;
+import java.net.URL;
+import java.rmi.RemoteException;
+import java.time.Instant;
+import java.time.LocalDate;
+import java.time.ZoneId;
+import java.time.format.DateTimeFormatter;
+import java.util.*;
+
+
+@Service
+public class WriteKingDeeServiceImpl implements WriteKingDeeService {
+    @Autowired
+    private YDClient ydClient;
+    @Autowired
+    private YDConf ydConf;
+    @Autowired
+    private DDConf ddConf;
+
+    @SneakyThrows
+    @Override
+    public McR insetXMC(String instanceId) throws JsonProcessingException {
+        if(instanceId != null){
+
+            System.out.println("实例ID:"+instanceId);
+            //通过实例ID拿取宜搭表单数据,Object强制转为Map(java对象)
+            //获取主表字段信息
+            Map data = (Map) ydClient.queryData(YDParam.builder().formInstId(instanceId)
+                    .appType(ydConf.getAppType()).systemToken(ydConf.getSystemToken())
+                    .userId(ddConf.getOperator()).build(), YDConf.FORM_QUERY.retrieve_id).getFormData();
+            System.out.println(data);
+            if(data.get("radioField_luap0c75").toString().equals("对公付款申请流程")){
+                //处理传入参数类型
+                ObjectMapper objectMapper = new ObjectMapper();
+                // 创建并设置head对象
+                Head head = new Head();
+                //根据是否境外公司判断head传参类型
+                String requestId = null;
+                if(data.get("selectField_luap0c7j").toString().equals("是")){
+                    head.setReservedField2(instanceId);//申请单实例
+
+                    if(data.get("textField_luap0c7a").toString() != null){
+                        head.setTitle(data.get("textField_luap0c7a").toString());//title
+                    }
+                    head.setNumber(data.get("serialNumberField_luap0c7b").toString());//number
+
+                    String s = data.get("serialNumberField_luap0c7b").toString();
+                    requestId = s.substring(s.length() - 7);
+                    head.setRequestId(requestId);//requestId  Portal做唯一性校验
+
+                    head.setApplicant(data.get("textField_lveylvze").toString());//申请人(编码)
+                    head.setAppDepart(data.get("textField_lw1hew33").toString());//申请部门(编码)
+                    //调用时间戳函数
+                    long time = (long)data.get("dateField_luap0c7f");
+                    String utc = convertTimestampToDateString(time, "UTC", "yyyy-MM-dd");
+                    head.setAppDate(utc);//申请日期
+
+                    String company = data.get("textField_lveylvzr").toString();
+                    head.setCompany(company);//所属公司(编码)
+
+                    if(data.get("selectField_luap0c7j").toString().equals('是')){ //是否境外公司(0-是  1-否)
+                        head.setIsOffCompany("0");
+                    }else{
+                        head.setIsOffCompany("1");
+                    }
+
+                    if(data.get("selectField_luap0c7k").toString().equals('是')){ //是否提供发票(0-是  1-否)
+                        head.setIsInvoice("0");
+                    }else{
+                        head.setIsInvoice("1");
+                    }
+
+                    head.setCurrency(data.get("textField_lveylvzs").toString());//币种
+                    head.setExchangeRate(new BigDecimal(data.get("numberField_luap0c7p").toString())
+                            .setScale(6,BigDecimal.ROUND_HALF_UP).toString());//汇率:保留6位小数
+                    head.setSettlementType(data.get("textField_lveurhj1").toString());//付款方式(编码)
+                    head.setAmount(new BigDecimal(data.get("numberField_luap0c7r").toString())
+                            .setScale(2,BigDecimal.ROUND_HALF_UP).toString());//折合人民币金额:保留2位小数
+                    head.setRealAmount(new BigDecimal(data.get("numberField_luap0c80").toString())
+                            .setScale(2,BigDecimal.ROUND_HALF_UP).toString());//本次付款金额:保留2位小数
+                    head.setSupplierNo(data.get("textField_lveylvzt").toString());//供应商名称(编码)
+                    head.setAcctName(data.get("textField_luap0c87").toString());//收款人户名
+                    head.setAccount(data.get("textField_luap0c88").toString());//收款人账号
+
+                    ObjectMapper mapp = new ObjectMapper();
+                    String string = data.get("countrySelectField_lugpwtqv").toString();
+                    JsonNode rootNode = mapp.readTree(string);
+                    String country = rootNode.get(0).asText();
+                    head.setCountry(country);//收款方国家
+                    head.setBank(data.get("textField_luap0c8a").toString());//收款人开户银行bank
+//                    head.setReservedField1(data.get("selectField_lx00fus1").toString());//用途---财务审批节点填写
+                    head.setAddr(data.get("textField_lugpwtqw").toString());//地址
+                    head.setSwift(data.get("textField_luap0c8l").toString());//SWIFT
+                    head.setInvoiceNum(data.get("textField_luap0c8q").toString());//发票号码
+                    head.setStatus("审核");
+                }else {
+                    head.setReservedField2(instanceId);//申请单实例
+
+                    if(data.get("textField_luap0c7a").toString() != null){
+                        head.setTitle(data.get("textField_luap0c7a").toString());//title
+                    }
+                    head.setNumber(data.get("serialNumberField_luap0c7b").toString());//number
+
+                    String s = data.get("serialNumberField_luap0c7b").toString();
+                    requestId = s.substring(s.length() - 7);
+                    head.setRequestId(requestId);//requestId  Portal做唯一性校验
+
+                    head.setApplicant(data.get("textField_lveylvze").toString());//申请人(编码)
+                    head.setAppDepart(data.get("textField_lw1hew33").toString());//申请部门(编码)
+                    //调用时间戳函数
+                    long time = (long)data.get("dateField_luap0c7f");
+                    String utc = convertTimestampToDateString(time, "UTC", "yyyy-MM-dd");
+                    head.setAppDate(utc);//申请日期
+
+                    String company = data.get("textField_lveylvzr").toString();
+                    head.setCompany(company);//所属公司(编码)
+
+                    if(data.get("selectField_luap0c7j").toString().equals("是")){ //是否境外公司(0-是  1-否)
+                        head.setIsOffCompany("0");
+                    }else{
+                        head.setIsOffCompany("1");
+                    }
+
+                    if(data.get("selectField_luap0c7k").toString().equals("是")){ //是否提供发票(0-是  1-否)
+                        head.setIsInvoice("0");
+                    }else{
+                        head.setIsInvoice("1");
+                    }
+
+                    head.setCurrency(data.get("textField_lveylvzs").toString());//币种
+                    head.setExchangeRate(new BigDecimal(data.get("numberField_luap0c7p").toString())
+                            .setScale(6,BigDecimal.ROUND_HALF_UP).toString());//汇率:保留6位小数
+                    head.setSettlementType(data.get("textField_lveurhj1").toString());//付款方式(编码)
+                    head.setAmount(new BigDecimal(data.get("numberField_luap0c7r").toString())
+                            .setScale(2,BigDecimal.ROUND_HALF_UP).toString());//折合人民币金额:保留2位小数
+                    head.setRealAmount(new BigDecimal(data.get("numberField_luap0c80").toString())
+                            .setScale(2,BigDecimal.ROUND_HALF_UP).toString());//本次付款金额:保留2位小数
+                    head.setSupplierNo(data.get("textField_lveylvzt").toString());//供应商名称(编码)
+                    head.setAcctName(data.get("textField_luap0c87").toString());//收款人户名
+                    head.setAccount(data.get("textField_luap0c88").toString());//收款人账号
+                    head.setBank(data.get("textField_luap0c8a").toString());//收款人开户银行
+//                    head.setReservedField1(data.get("selectField_lx00fus1").toString());//用途---财务审批节点填写
+                    head.setBankNum(data.get("textField_luap0c89").toString());//收款人银行联行号
+
+                    ObjectMapper mapper = new ObjectMapper();
+                    String string = data.get("countrySelectField_lugpwtqv").toString();
+                    JsonNode rootNode = mapper.readTree(string);
+                    String country = rootNode.get(0).asText();//收款方国家
+                    head.setCountry(country);
+
+                    String jsonString = data.get("addressField_lugpwtqu").toString();
+                    ObjectMapper objectMapper1 = new ObjectMapper();
+                    JsonNode jsonNode = objectMapper1.readTree(jsonString);
+                    JsonNode regionTextArray  = jsonNode.get("regionText");
+                    if (regionTextArray.isArray() && !regionTextArray.isEmpty()) {
+                        JsonNode regionTextObject = regionTextArray.get(0);
+                        String zhCN = regionTextObject.get("zh_CN").asText();
+                        System.out.println(zhCN);
+                        head.setProvince(zhCN);//收款方省市
+                        JsonNode node = regionTextArray.get(1);
+                        String cn = node.get("zh_CN").asText();
+                        System.out.println(cn);
+                        head.setCity(cn);//收款方市县
+                    }
+//                    St ring city = data.get("textField_lwfzmjhu").toString();
+//                    head.setCity(city);//收款方市县
+                    head.setStatus("审核");
+                }
+
+
+
+                // 创建并设置entry对象列表
+                List<Entry> entries = new ArrayList<>();
+                Entry entry1 = new Entry();
+
+                //获取子表单中字段信息
+                List<Map> jsonString = (List<Map>)data.get("tableField_luap0c8x");
+                System.out.println("jsonString:"+jsonString);
+                int num=0;
+                for (Map map1 : jsonString) {//遍历子表单数据
+                    num++;
+                    String entryOwnId = requestId.concat(String.valueOf(num));
+                    entry1.setEntryOwnId(entryOwnId);//entryOwnId:分录唯一ID
+
+                    String title = data.get("textField_luap0c7a").toString();
+                    entry1.setSummary("支付-"+title);//财务摘要
+
+                    String lines = map1.get("textField_lven0htk").toString();//拿取到产品线【关联表单->文本】
+                    entry1.setLines(lines);
+
+                    String portalFeeType = map1.get("textField_lvenpmvb").toString();//费用编号【关联表单->文本】
+                    entry1.setPortalFeeType(portalFeeType);
+
+                    String proNum = map1.get("textField_lvenpmvc").toString();//拿取到项目编号【关联表单->文本】
+                    entry1.setProNum(proNum);
+
+                    String costCenter = map1.get("textField_lwftfjb8").toString();//成本中心
+                    entry1.setCostCenter(costCenter);
+
+                    if(map1.get("textField_lveylvzu").toString() != null){
+                        entry1.setCampus(map1.get("textField_lveylvzu").toString());//校区部门
+                    }
+
+                    String payCompany = map1.get("textField_lwftfjb9").toString();//付款主体
+                    entry1.setPayCompany(payCompany);
+
+                    String payAmount = new BigDecimal(map1.get("numberField_luap0c94").toString())
+                            .setScale(2,BigDecimal.ROUND_HALF_UP).toString();//付款金额
+                    entry1.setPayAmount(payAmount);
+
+                    String isSpeInvoice = map1.get("textField_lvfzuukd").toString();//是否增值税专用发票
+                    entry1.setIsSpeInvoice(isSpeInvoice);
+
+                    String taxAmount = new BigDecimal(map1.get("numberField_luap0c96").toString())
+                            .setScale(2,BigDecimal.ROUND_HALF_UP).toString();//含税金额
+                    entry1.setTaxAmount(taxAmount);
+
+                    if(!map1.get("numberField_lu94kny9_value").toString().isEmpty()){
+                        String rate = new BigDecimal(map1.get("numberField_lu94kny9").toString())
+                                .setScale(2,BigDecimal.ROUND_HALF_UP).toString();//税率
+                        entry1.setRate(rate);
+                    }
+
+                    String notTaxAmount = new BigDecimal(map1.get("numberField_lu94kny8").toString())
+                            .setScale(2,BigDecimal.ROUND_HALF_UP).toString();//不含税金额
+                    entry1.setNotTaxAmount(notTaxAmount);
+
+                    String tax = new BigDecimal(map1.get("numberField_lu94knya").toString())
+                            .setScale(2,BigDecimal.ROUND_HALF_UP).toString();//税额
+                    entry1.setTax(tax);
+
+                    entries.add(entry1);
+                    num++;
+                }
+
+                // 创建并设置data对象
+                Data data1 = new Data();
+                data1.setHead(head);
+                data1.setEntry(entries);
+                // 创建并设置整个JSON对象
+                MyJson json = new MyJson();
+                json.setType("CW01");
+                List<Data> dataList = new ArrayList<>();
+                dataList.add(data1);
+                json.setData(dataList);
+                // 序列化对象到JSON字符串
+                String jsonString1 = objectMapper.writeValueAsString(json);
+                // 输出JSON字符串(参数封装完毕!)
+                String s1 = jsonString1.replaceAll("\"", "\\\"");
+                System.out.println(s1);
+                //开始調用EAS系統接口
+                EASLoginProxyProxy login = new EASLoginProxyProxy();
+                WSContext ctx = login.login("748", "riverdeepqwer12", "eas", "river001",
+                        "L2", 2);
+                System.out.println(ctx);
+                if (null != ctx.getSessionId() && !"".equals(ctx.getSessionId())) {
+                    System.out.println("ctx.getSessionId():" + ctx.getSessionId());
+                    WSPortalMainFacadeSrvProxyProxy portal = new WSPortalMainFacadeSrvProxyProxy();
+                    try {
+                        String remsg = portal.portalToEas("CW01", s1);
+                        System.out.println("remsg:"+ remsg);
+                    }catch (Exception e){
+                        //异常处理
+                        e.printStackTrace();
+                    }
+                }
+            }
+        }else {
+            return McR.error(McREnum.UNKNOWN_EXCEPTION.toString(),"参数缺失");
+        }
+        return McR.success();
+    }
+
+    //创建并设置整个JSON对象
+    public static class MyJson{
+        @JsonProperty("type")
+        private String type;
+        @JsonProperty("data")
+        private List<Data> data;
+        public String getType() {
+            return type;
+        }
+        public void setType(String type) {
+            this.type = type;
+        }
+        public List<Data> getData() {
+            return data;
+        }
+        public void setData(List<Data> data) {
+            this.data = data;
+        }
+    }
+    //Data对象
+    static class Data{
+        @JsonProperty("head")
+        private Head head;
+        @JsonProperty("entry")
+        private List<Entry> entry;
+        /*get,set方法*/
+        public Head getHead() {
+            return head;
+        }
+        public void setHead(Head head) {
+            this.head = head;
+        }
+        public List<Entry> getEntry() {
+            return entry;
+        }
+        public void setEntry(List<Entry> entry) {
+            this.entry = entry;
+        }
+    }
+    //Head对象
+    @AllArgsConstructor
+    @NoArgsConstructor
+    @lombok.Data
+    static class Head{
+        @JsonProperty("reservedField2")
+        private String reservedField2;//申请单实例
+        @JsonProperty("title")
+        private String title;//流程标题
+        @JsonProperty("number")
+        private String number;//流程编号
+        @JsonProperty("requestId")
+        private String requestId;//Portal唯一性校验=实例ID
+        @JsonProperty("applicant")
+        private String applicant;//申请人
+        @JsonProperty("appDepart")
+        private String appDepart;//申请部门
+        @JsonProperty("appDate")
+        private String appDate;//申请日期
+        @JsonProperty("company")
+        private String company;//所属公司
+        @JsonProperty("isOffCompany")
+        private String isOffCompany;//是否境外公司
+        @JsonProperty("isInvoice")
+        private String isInvoice;//是否提供发票
+        @JsonProperty("currency")
+        private String currency;//币种
+        @JsonProperty("exchangeRate")
+        private String exchangeRate;//汇率
+        @JsonProperty("settlementType")
+        private String settlementType;//付款方式
+        @JsonProperty("amount")
+        private String amount;//折合人民币金额
+        @JsonProperty("realAmount")
+        private String realAmount;//本次付款金额
+        @JsonProperty("supplierNo")
+        private String supplierNo;//供应商名称
+        @JsonProperty("acctName")
+        private String acctName;//收款人户名
+        @JsonProperty("account")
+        private String account;//收款人账号
+        @JsonProperty("bank")
+        private String bank;//收款人开户银行
+        @JsonProperty("reservedField1")
+        private String reservedField1;//用途
+        @JsonProperty("bankNum")
+        private String bankNum;//收款人银行联行号
+        @JsonProperty("country")
+        private String country;//收款方国家
+        @JsonProperty("province")
+        private String province;//收款方省
+        @JsonProperty("city")
+        private String city;//收款方市县
+        @JsonProperty("addr")
+        private String addr;//地址
+        @JsonProperty("swift")
+        private String swift;//SWIFT
+        @JsonProperty("invoiceNum")
+        private String invoiceNum;//invoiceNum
+        @JsonProperty("status")
+        private String status;//单据状态
+
+    }
+    //Entry对象
+    @AllArgsConstructor
+    @NoArgsConstructor
+    @lombok.Data
+    static class Entry {
+        @JsonProperty("entryOwnId")
+        private String entryOwnId;//表单唯一识别码UUID
+        @JsonProperty("summary")
+        private String summary;//财务摘要
+        @JsonProperty("lines")
+        private String lines;//产品线
+        @JsonProperty("portalFeeType")
+        private String portalFeeType;//费用编号
+        @JsonProperty("proNum")
+        private String proNum;//项目编号
+        @JsonProperty("costCenter")
+        private String costCenter;//成本中心
+        @JsonProperty("campus")
+        private String campus;//校区部门
+        @JsonProperty("payCompany")
+        private String payCompany;//付款主体
+        @JsonProperty("payAmount")
+        private String payAmount;//付款金额
+        @JsonProperty("isSpeInvoice")
+        private String isSpeInvoice;//是否增值税专用发票
+        @JsonProperty("taxAmount")
+        private String taxAmount;//含税金额
+        @JsonProperty("rate")
+        private String rate;//税率
+        @JsonProperty("notTaxAmount")
+        private String notTaxAmount;//不含税金额
+        @JsonProperty("tax")
+        private String tax;//税额
+    }
+
+        /**
+         * 将时间戳转换为指定时区的格式化日期字符串。
+         *
+         * @param timestamp 时间戳(毫秒)
+         * @param timeZone  时区ID,例如 "UTC" 或 "Asia/Shanghai"
+         * @param pattern   日期格式,例如 "yyyy-MM-dd"
+         * @return 格式化后的日期字符串
+         */
+    public  String convertTimestampToDateString(long timestamp, String timeZone, String pattern) {
+            // 将时间戳转换为Instant
+            Instant instant = Instant.ofEpochMilli(timestamp);
+            // 将Instant转换为指定时区的日期
+            LocalDate date = instant.atZone(ZoneId.of(timeZone)).toLocalDate();
+            date = date.plusDays(1);
+            // 创建一个DateTimeFormatter来格式化日期
+            DateTimeFormatter formatter = DateTimeFormatter.ofPattern(pattern);
+            // 格式化LocalDate为字符串
+            String formattedDate = date.format(formatter);
+            // 返回格式化后的日期字符串
+            return formattedDate;
+    }
+
+
+}
+
+

+ 13 - 0
mjava-ruisi/src/main/java/com/malk/ruisi/services/EASLogin/EASLoginProxy.java

@@ -0,0 +1,13 @@
+/**
+ * EASLoginProxy.java
+ *
+ * This file was auto-generated from WSDL
+ * by the Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java emitter.
+ */
+
+package com.malk.ruisi.services.EASLogin;
+
+public interface EASLoginProxy extends java.rmi.Remote {
+    public com.malk.ruisi.client.WSContext login(String userName, String password, String slnName, String dcName, String language, int dbType, String authPattern) throws java.rmi.RemoteException;
+    public com.malk.ruisi.client.WSContext login(String userName, String password, String slnName, String dcName, String language, int dbType) throws java.rmi.RemoteException;
+}

+ 60 - 0
mjava-ruisi/src/main/java/com/malk/ruisi/services/EASLogin/EASLoginProxyProxy.java

@@ -0,0 +1,60 @@
+package com.malk.ruisi.services.EASLogin;
+
+public class EASLoginProxyProxy implements EASLoginProxy {
+  private String _endpoint = null;
+  private EASLoginProxy eASLoginProxy = null;
+  
+  public EASLoginProxyProxy() {
+    _initEASLoginProxyProxy();
+  }
+  
+  public EASLoginProxyProxy(String endpoint) {
+    _endpoint = endpoint;
+    _initEASLoginProxyProxy();
+  }
+  
+  private void _initEASLoginProxyProxy() {
+    try {
+      eASLoginProxy = (new com.malk.ruisi.services.EASLogin.EASLoginProxyServiceLocator()).getEASLogin();
+      if (eASLoginProxy != null) {
+        if (_endpoint != null)
+          ((javax.xml.rpc.Stub)eASLoginProxy)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
+        else
+          _endpoint = (String)((javax.xml.rpc.Stub)eASLoginProxy)._getProperty("javax.xml.rpc.service.endpoint.address");
+      }
+      
+    }
+    catch (javax.xml.rpc.ServiceException serviceException) {}
+  }
+  
+  public String getEndpoint() {
+    return _endpoint;
+  }
+  
+  public void setEndpoint(String endpoint) {
+    _endpoint = endpoint;
+    if (eASLoginProxy != null)
+      ((javax.xml.rpc.Stub)eASLoginProxy)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
+    
+  }
+  
+  public EASLoginProxy getEASLoginProxy() {
+    if (eASLoginProxy == null)
+      _initEASLoginProxyProxy();
+    return eASLoginProxy;
+  }
+  
+  public com.malk.ruisi.client.WSContext login(String userName, String password, String slnName, String dcName, String language, int dbType, String authPattern) throws java.rmi.RemoteException{
+    if (eASLoginProxy == null)
+      _initEASLoginProxyProxy();
+    return eASLoginProxy.login(userName, password, slnName, dcName, language, dbType, authPattern);
+  }
+  
+  public com.malk.ruisi.client.WSContext login(String userName, String password, String slnName, String dcName, String language, int dbType) throws java.rmi.RemoteException{
+    if (eASLoginProxy == null)
+      _initEASLoginProxyProxy();
+    return eASLoginProxy.login(userName, password, slnName, dcName, language, dbType);
+  }
+  
+  
+}

+ 16 - 0
mjava-ruisi/src/main/java/com/malk/ruisi/services/EASLogin/EASLoginProxyService.java

@@ -0,0 +1,16 @@
+/**
+ * EASLoginProxyService.java
+ *
+ * This file was auto-generated from WSDL
+ * by the Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java emitter.
+ */
+
+package com.malk.ruisi.services.EASLogin;
+
+public interface EASLoginProxyService extends javax.xml.rpc.Service {
+    public String getEASLoginAddress();
+
+    public EASLoginProxy getEASLogin() throws javax.xml.rpc.ServiceException;
+
+    public EASLoginProxy getEASLogin(java.net.URL portAddress) throws javax.xml.rpc.ServiceException;
+}

+ 144 - 0
mjava-ruisi/src/main/java/com/malk/ruisi/services/EASLogin/EASLoginProxyServiceLocator.java

@@ -0,0 +1,144 @@
+/**
+ * EASLoginProxyServiceLocator.java
+ *
+ * This file was auto-generated from WSDL
+ * by the Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java emitter.
+ */
+
+package com.malk.ruisi.services.EASLogin;
+
+public class EASLoginProxyServiceLocator extends org.apache.axis.client.Service implements EASLoginProxyService {
+
+    public EASLoginProxyServiceLocator() {
+    }
+
+
+    public EASLoginProxyServiceLocator(org.apache.axis.EngineConfiguration config) {
+        super(config);
+    }
+
+    public EASLoginProxyServiceLocator(String wsdlLoc, javax.xml.namespace.QName sName) throws javax.xml.rpc.ServiceException {
+        super(wsdlLoc, sName);
+    }
+
+    // Use to get a proxy class for EASLogin 这儿原先是106.75.63.251:6888
+    private String EASLogin_address = "http://10.30.52.251:7890/ormrpc/services/EASLogin?wsdl";
+
+    public String getEASLoginAddress() {
+        return EASLogin_address;
+    }
+
+    // The WSDD service name defaults to the port name.
+    private String EASLoginWSDDServiceName = "EASLogin";
+
+    public String getEASLoginWSDDServiceName() {
+        return EASLoginWSDDServiceName;
+    }
+
+    public void setEASLoginWSDDServiceName(String name) {
+        EASLoginWSDDServiceName = name;
+    }
+
+    public EASLoginProxy getEASLogin() throws javax.xml.rpc.ServiceException {
+       java.net.URL endpoint;
+        try {
+            endpoint = new java.net.URL(EASLogin_address);
+        }
+        catch (java.net.MalformedURLException e) {
+            throw new javax.xml.rpc.ServiceException(e);
+        }
+        return getEASLogin(endpoint);
+    }
+
+    public EASLoginProxy getEASLogin(java.net.URL portAddress) throws javax.xml.rpc.ServiceException {
+        try {
+            EASLoginSoapBindingStub _stub = new EASLoginSoapBindingStub(portAddress, this);
+            _stub.setPortName(getEASLoginWSDDServiceName());
+            return _stub;
+        }
+        catch (org.apache.axis.AxisFault e) {
+            return null;
+        }
+    }
+
+    public void setEASLoginEndpointAddress(String address) {
+        EASLogin_address = address;
+    }
+
+    /**
+     * For the given interface, get the stub implementation.
+     * If this service has no port for the given interface,
+     * then ServiceException is thrown.
+     */
+    public java.rmi.Remote getPort(Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {
+        try {
+            if (EASLoginProxy.class.isAssignableFrom(serviceEndpointInterface)) {
+                EASLoginSoapBindingStub _stub = new EASLoginSoapBindingStub(new java.net.URL(EASLogin_address), this);
+                _stub.setPortName(getEASLoginWSDDServiceName());
+                return _stub;
+            }
+        }
+        catch (Throwable t) {
+            throw new javax.xml.rpc.ServiceException(t);
+        }
+        throw new javax.xml.rpc.ServiceException("There is no stub implementation for the interface:  " + (serviceEndpointInterface == null ? "null" : serviceEndpointInterface.getName()));
+    }
+
+    /**
+     * For the given interface, get the stub implementation.
+     * If this service has no port for the given interface,
+     * then ServiceException is thrown.
+     */
+    public java.rmi.Remote getPort(javax.xml.namespace.QName portName, Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {
+        if (portName == null) {
+            return getPort(serviceEndpointInterface);
+        }
+        String inputPortName = portName.getLocalPart();
+        if ("EASLogin".equals(inputPortName)) {
+            return getEASLogin();
+        }
+        else  {
+            java.rmi.Remote _stub = getPort(serviceEndpointInterface);
+            ((org.apache.axis.client.Stub) _stub).setPortName(portName);
+            return _stub;
+        }
+    }
+
+    public javax.xml.namespace.QName getServiceName() {
+        return new javax.xml.namespace.QName("http://10.30.52.251:7890/ormrpc/services/EASLogin?wsdl", "EASLoginProxyService");
+    }
+    //192.168.2.191:6888
+
+    private java.util.HashSet ports = null;
+
+    public java.util.Iterator getPorts() {
+        if (ports == null) {
+            ports = new java.util.HashSet();
+            ports.add(new javax.xml.namespace.QName("http://10.30.52.251:7890/ormrpc/services/EASLogin?wsdl", "EASLogin"));
+        }
+        //192.168.2.191:6888
+        return ports.iterator();
+    }
+
+    /**
+    * Set the endpoint address for the specified port name.
+    */
+    public void setEndpointAddress(String portName, String address) throws javax.xml.rpc.ServiceException {
+        
+if ("EASLogin".equals(portName)) {
+            setEASLoginEndpointAddress(address);
+        }
+        else 
+{ // Unknown Port Name
+            throw new javax.xml.rpc.ServiceException(" Cannot set Endpoint Address for Unknown Port" + portName);
+        }
+    }
+
+    /**
+    * Set the endpoint address for the specified port name.
+    */
+    public void setEndpointAddress(javax.xml.namespace.QName portName, String address) throws javax.xml.rpc.ServiceException {
+        setEndpointAddress(portName.getLocalPart(), address);
+    }
+
+}

+ 237 - 0
mjava-ruisi/src/main/java/com/malk/ruisi/services/EASLogin/EASLoginSoapBindingStub.java

@@ -0,0 +1,237 @@
+/**
+ * EASLoginSoapBindingStub.java
+ *
+ * This file was auto-generated from WSDL
+ * by the Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java emitter.
+ */
+
+package com.malk.ruisi.services.EASLogin;
+
+public class EASLoginSoapBindingStub extends org.apache.axis.client.Stub implements EASLoginProxy {
+    private java.util.Vector cachedSerClasses = new java.util.Vector();
+    private java.util.Vector cachedSerQNames = new java.util.Vector();
+    private java.util.Vector cachedSerFactories = new java.util.Vector();
+    private java.util.Vector cachedDeserFactories = new java.util.Vector();
+
+    static org.apache.axis.description.OperationDesc [] _operations;
+
+    static {
+        _operations = new org.apache.axis.description.OperationDesc[2];
+        _initOperationDesc1();
+    }
+
+    private static void _initOperationDesc1(){
+        org.apache.axis.description.OperationDesc oper;
+        org.apache.axis.description.ParameterDesc param;
+        oper = new org.apache.axis.description.OperationDesc();
+        oper.setName("login");
+        param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("", "userName"), org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"), String.class, false, false);
+        oper.addParameter(param);
+        param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("", "password"), org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"), String.class, false, false);
+        oper.addParameter(param);
+        param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("", "slnName"), org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"), String.class, false, false);
+        oper.addParameter(param);
+        param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("", "dcName"), org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"), String.class, false, false);
+        oper.addParameter(param);
+        param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("", "language"), org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"), String.class, false, false);
+        oper.addParameter(param);
+        param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("", "dbType"), org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "int"), int.class, false, false);
+        oper.addParameter(param);
+        param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("", "authPattern"), org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"), String.class, false, false);
+        oper.addParameter(param);
+        oper.setReturnType(new javax.xml.namespace.QName("urn:client", "WSContext"));
+        oper.setReturnClass(com.malk.ruisi.client.WSContext.class);
+        oper.setReturnQName(new javax.xml.namespace.QName("", "loginReturn"));
+        oper.setStyle(org.apache.axis.constants.Style.RPC);
+        oper.setUse(org.apache.axis.constants.Use.ENCODED);
+        _operations[0] = oper;
+
+        oper = new org.apache.axis.description.OperationDesc();
+        oper.setName("login");
+        param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("", "userName"), org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"), String.class, false, false);
+        oper.addParameter(param);
+        param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("", "password"), org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"), String.class, false, false);
+        oper.addParameter(param);
+        param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("", "slnName"), org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"), String.class, false, false);
+        oper.addParameter(param);
+        param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("", "dcName"), org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"), String.class, false, false);
+        oper.addParameter(param);
+        param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("", "language"), org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"), String.class, false, false);
+        oper.addParameter(param);
+        param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("", "dbType"), org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "int"), int.class, false, false);
+        oper.addParameter(param);
+        oper.setReturnType(new javax.xml.namespace.QName("urn:client", "WSContext"));
+        oper.setReturnClass(com.malk.ruisi.client.WSContext.class);
+        oper.setReturnQName(new javax.xml.namespace.QName("", "loginReturn"));
+        oper.setStyle(org.apache.axis.constants.Style.RPC);
+        oper.setUse(org.apache.axis.constants.Use.ENCODED);
+        _operations[1] = oper;
+
+    }
+
+    public EASLoginSoapBindingStub() throws org.apache.axis.AxisFault {
+         this(null);
+    }
+
+    public EASLoginSoapBindingStub(java.net.URL endpointURL, javax.xml.rpc.Service service) throws org.apache.axis.AxisFault {
+         this(service);
+         super.cachedEndpoint = endpointURL;
+    }
+
+    public EASLoginSoapBindingStub(javax.xml.rpc.Service service) throws org.apache.axis.AxisFault {
+        if (service == null) {
+            super.service = new org.apache.axis.client.Service();
+        } else {
+            super.service = service;
+        }
+        ((org.apache.axis.client.Service)super.service).setTypeMappingVersion("1.2");
+            Class cls;
+            javax.xml.namespace.QName qName;
+            javax.xml.namespace.QName qName2;
+            Class beansf = org.apache.axis.encoding.ser.BeanSerializerFactory.class;
+            Class beandf = org.apache.axis.encoding.ser.BeanDeserializerFactory.class;
+            Class enumsf = org.apache.axis.encoding.ser.EnumSerializerFactory.class;
+            Class enumdf = org.apache.axis.encoding.ser.EnumDeserializerFactory.class;
+            Class arraysf = org.apache.axis.encoding.ser.ArraySerializerFactory.class;
+            Class arraydf = org.apache.axis.encoding.ser.ArrayDeserializerFactory.class;
+            Class simplesf = org.apache.axis.encoding.ser.SimpleSerializerFactory.class;
+            Class simpledf = org.apache.axis.encoding.ser.SimpleDeserializerFactory.class;
+            Class simplelistsf = org.apache.axis.encoding.ser.SimpleListSerializerFactory.class;
+            Class simplelistdf = org.apache.axis.encoding.ser.SimpleListDeserializerFactory.class;
+            qName = new javax.xml.namespace.QName("urn:client", "WSContext");
+            cachedSerQNames.add(qName);
+            cls = com.malk.ruisi.client.WSContext.class;
+            cachedSerClasses.add(cls);
+            cachedSerFactories.add(beansf);
+            cachedDeserFactories.add(beandf);
+
+    }
+
+    protected org.apache.axis.client.Call createCall() throws java.rmi.RemoteException {
+        try {
+            org.apache.axis.client.Call _call = super._createCall();
+            if (super.maintainSessionSet) {
+                _call.setMaintainSession(super.maintainSession);
+            }
+            if (super.cachedUsername != null) {
+                _call.setUsername(super.cachedUsername);
+            }
+            if (super.cachedPassword != null) {
+                _call.setPassword(super.cachedPassword);
+            }
+            if (super.cachedEndpoint != null) {
+                _call.setTargetEndpointAddress(super.cachedEndpoint);
+            }
+            if (super.cachedTimeout != null) {
+                _call.setTimeout(super.cachedTimeout);
+            }
+            if (super.cachedPortName != null) {
+                _call.setPortName(super.cachedPortName);
+            }
+            java.util.Enumeration keys = super.cachedProperties.keys();
+            while (keys.hasMoreElements()) {
+                String key = (String) keys.nextElement();
+                _call.setProperty(key, super.cachedProperties.get(key));
+            }
+            // All the type mapping information is registered
+            // when the first call is made.
+            // The type mapping information is actually registered in
+            // the TypeMappingRegistry of the service, which
+            // is the reason why registration is only needed for the first call.
+            synchronized (this) {
+                if (firstCall()) {
+                    // must set encoding style before registering serializers
+                    _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
+                    _call.setEncodingStyle(org.apache.axis.Constants.URI_SOAP11_ENC);
+                    for (int i = 0; i < cachedSerFactories.size(); ++i) {
+                        Class cls = (Class) cachedSerClasses.get(i);
+                        javax.xml.namespace.QName qName =
+                                (javax.xml.namespace.QName) cachedSerQNames.get(i);
+                        Object x = cachedSerFactories.get(i);
+                        if (x instanceof Class) {
+                            Class sf = (Class)
+                                 cachedSerFactories.get(i);
+                            Class df = (Class)
+                                 cachedDeserFactories.get(i);
+                            _call.registerTypeMapping(cls, qName, sf, df, false);
+                        }
+                        else if (x instanceof javax.xml.rpc.encoding.SerializerFactory) {
+                            org.apache.axis.encoding.SerializerFactory sf = (org.apache.axis.encoding.SerializerFactory)
+                                 cachedSerFactories.get(i);
+                            org.apache.axis.encoding.DeserializerFactory df = (org.apache.axis.encoding.DeserializerFactory)
+                                 cachedDeserFactories.get(i);
+                            _call.registerTypeMapping(cls, qName, sf, df, false);
+                        }
+                    }
+                }
+            }
+            return _call;
+        }
+        catch (Throwable _t) {
+            throw new org.apache.axis.AxisFault("Failure trying to get the Call object", _t);
+        }
+    }
+
+    public com.malk.ruisi.client.WSContext login(String userName, String password, String slnName, String dcName, String language, int dbType, String authPattern) throws java.rmi.RemoteException {
+        if (super.cachedEndpoint == null) {
+            throw new org.apache.axis.NoEndPointException();
+        }
+        org.apache.axis.client.Call _call = createCall();
+        _call.setOperation(_operations[0]);
+        _call.setUseSOAPAction(true);
+        _call.setSOAPActionURI("");
+        _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
+        _call.setOperationName(new javax.xml.namespace.QName("http://login.webservice.bos.kingdee.com", "login"));
+
+        setRequestHeaders(_call);
+        setAttachments(_call);
+ try {        Object _resp = _call.invoke(new Object[] {userName, password, slnName, dcName, language, new Integer(dbType), authPattern});
+
+        if (_resp instanceof java.rmi.RemoteException) {
+            throw (java.rmi.RemoteException)_resp;
+        }
+        else {
+            extractAttachments(_call);
+            try {
+                return (com.malk.ruisi.client.WSContext) _resp;
+            } catch (Exception _exception) {
+                return (com.malk.ruisi.client.WSContext) org.apache.axis.utils.JavaUtils.convert(_resp, com.malk.ruisi.client.WSContext.class);
+            }
+        }
+  } catch (org.apache.axis.AxisFault axisFaultException) {
+  throw axisFaultException;
+}
+    }
+
+    public com.malk.ruisi.client.WSContext login(String userName, String password, String slnName, String dcName, String language, int dbType) throws java.rmi.RemoteException {
+        if (super.cachedEndpoint == null) {
+            throw new org.apache.axis.NoEndPointException();
+        }
+        org.apache.axis.client.Call _call = createCall();
+        _call.setOperation(_operations[1]);
+        _call.setUseSOAPAction(true);
+        _call.setSOAPActionURI("");
+        _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
+        _call.setOperationName(new javax.xml.namespace.QName("http://login.webservice.bos.kingdee.com", "login"));
+
+        setRequestHeaders(_call);
+        setAttachments(_call);
+ try {        Object _resp = _call.invoke(new Object[] {userName, password, slnName, dcName, language, new Integer(dbType)});
+
+        if (_resp instanceof java.rmi.RemoteException) {
+            throw (java.rmi.RemoteException)_resp;
+        }
+        else {
+            extractAttachments(_call);
+            try {
+                return (com.malk.ruisi.client.WSContext) _resp;
+            } catch (Exception _exception) {
+                return (com.malk.ruisi.client.WSContext) org.apache.axis.utils.JavaUtils.convert(_resp, com.malk.ruisi.client.WSContext.class);
+            }
+        }
+  } catch (org.apache.axis.AxisFault axisFaultException) {
+  throw axisFaultException;
+}
+    }
+
+}

+ 183 - 0
mjava-ruisi/src/main/java/com/malk/ruisi/services/WSPortalMainFacade/WSPortalMainFacadeSoapBindingStub.java

@@ -0,0 +1,183 @@
+package com.malk.ruisi.services.WSPortalMainFacade;
+
+import com.malk.ruisi.portalmainfacade.WSInvokeException;
+
+public class WSPortalMainFacadeSoapBindingStub extends org.apache.axis.client.Stub implements WSPortalMainFacadeSrvProxy{
+    private java.util.Vector cachedSerClasses = new java.util.Vector();
+    private java.util.Vector cachedSerQNames = new java.util.Vector();
+    private java.util.Vector cachedSerFactories = new java.util.Vector();
+    private java.util.Vector cachedDeserFactories = new java.util.Vector();
+
+    static org.apache.axis.description.OperationDesc [] _operations;
+
+    static {
+        _operations = new org.apache.axis.description.OperationDesc[1];
+        _initOperationDesc1();
+    }
+
+    private static void _initOperationDesc1(){
+        org.apache.axis.description.OperationDesc oper;
+        org.apache.axis.description.ParameterDesc param;
+        oper = new org.apache.axis.description.OperationDesc();
+        oper.setName("portalToEas");
+        param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("", "type"), org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"), java.lang.String.class, false, false);
+        oper.addParameter(param);
+        param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("", "jsonObject"), org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"), java.lang.String.class, false, false);
+        oper.addParameter(param);
+        oper.setReturnType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
+        oper.setReturnClass(java.lang.String.class);
+        oper.setReturnQName(new javax.xml.namespace.QName("", "portalToEasReturn"));
+        oper.setStyle(org.apache.axis.constants.Style.RPC);
+        oper.setUse(org.apache.axis.constants.Use.ENCODED);
+        oper.addFault(new org.apache.axis.description.FaultDesc(
+                new javax.xml.namespace.QName("http://10.31.52.8:7890/ormrpc/services/WSPortalMainFacade", "fault"),
+                "portalmainfacade.client.WSInvokeException",
+                new javax.xml.namespace.QName("urn:client.portalmainfacade", "WSInvokeException"),
+                true
+        ));
+        _operations[0] = oper;
+
+    }
+
+    public WSPortalMainFacadeSoapBindingStub() throws org.apache.axis.AxisFault {
+        this(null);
+    }
+
+    public WSPortalMainFacadeSoapBindingStub(java.net.URL endpointURL, javax.xml.rpc.Service service) throws org.apache.axis.AxisFault {
+        this(service);
+        super.cachedEndpoint = endpointURL;
+    }
+
+    public WSPortalMainFacadeSoapBindingStub(javax.xml.rpc.Service service) throws org.apache.axis.AxisFault {
+        if (service == null) {
+            super.service = new org.apache.axis.client.Service();
+        } else {
+            super.service = service;
+        }
+        ((org.apache.axis.client.Service)super.service).setTypeMappingVersion("1.2");
+        java.lang.Class cls;
+        javax.xml.namespace.QName qName;
+        javax.xml.namespace.QName qName2;
+        java.lang.Class beansf = org.apache.axis.encoding.ser.BeanSerializerFactory.class;
+        java.lang.Class beandf = org.apache.axis.encoding.ser.BeanDeserializerFactory.class;
+        java.lang.Class enumsf = org.apache.axis.encoding.ser.EnumSerializerFactory.class;
+        java.lang.Class enumdf = org.apache.axis.encoding.ser.EnumDeserializerFactory.class;
+        java.lang.Class arraysf = org.apache.axis.encoding.ser.ArraySerializerFactory.class;
+        java.lang.Class arraydf = org.apache.axis.encoding.ser.ArrayDeserializerFactory.class;
+        java.lang.Class simplesf = org.apache.axis.encoding.ser.SimpleSerializerFactory.class;
+        java.lang.Class simpledf = org.apache.axis.encoding.ser.SimpleDeserializerFactory.class;
+        java.lang.Class simplelistsf = org.apache.axis.encoding.ser.SimpleListSerializerFactory.class;
+        java.lang.Class simplelistdf = org.apache.axis.encoding.ser.SimpleListDeserializerFactory.class;
+        qName = new javax.xml.namespace.QName("urn:client.portalmainfacade", "WSInvokeException");
+        cachedSerQNames.add(qName);
+        cls = WSInvokeException.class;
+        cachedSerClasses.add(cls);
+        cachedSerFactories.add(beansf);
+        cachedDeserFactories.add(beandf);
+
+    }
+
+    protected org.apache.axis.client.Call createCall() throws java.rmi.RemoteException {
+        try {
+            org.apache.axis.client.Call _call = super._createCall();
+            if (super.maintainSessionSet) {
+                _call.setMaintainSession(super.maintainSession);
+            }
+            if (super.cachedUsername != null) {
+                _call.setUsername(super.cachedUsername);
+            }
+            if (super.cachedPassword != null) {
+                _call.setPassword(super.cachedPassword);
+            }
+            if (super.cachedEndpoint != null) {
+                _call.setTargetEndpointAddress(super.cachedEndpoint);
+            }
+            if (super.cachedTimeout != null) {
+                _call.setTimeout(super.cachedTimeout);
+            }
+            if (super.cachedPortName != null) {
+                _call.setPortName(super.cachedPortName);
+            }
+            java.util.Enumeration keys = super.cachedProperties.keys();
+            while (keys.hasMoreElements()) {
+                java.lang.String key = (java.lang.String) keys.nextElement();
+                _call.setProperty(key, super.cachedProperties.get(key));
+            }
+            // All the type mapping information is registered
+            // when the first call is made.
+            // The type mapping information is actually registered in
+            // the TypeMappingRegistry of the service, which
+            // is the reason why registration is only needed for the first call.
+            synchronized (this) {
+                if (firstCall()) {
+                    // must set encoding style before registering serializers
+                    _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
+                    _call.setEncodingStyle(org.apache.axis.Constants.URI_SOAP11_ENC);
+                    for (int i = 0; i < cachedSerFactories.size(); ++i) {
+                        java.lang.Class cls = (java.lang.Class) cachedSerClasses.get(i);
+                        javax.xml.namespace.QName qName =
+                                (javax.xml.namespace.QName) cachedSerQNames.get(i);
+                        java.lang.Object x = cachedSerFactories.get(i);
+                        if (x instanceof Class) {
+                            java.lang.Class sf = (java.lang.Class)
+                                    cachedSerFactories.get(i);
+                            java.lang.Class df = (java.lang.Class)
+                                    cachedDeserFactories.get(i);
+                            _call.registerTypeMapping(cls, qName, sf, df, false);
+                        }
+                        else if (x instanceof javax.xml.rpc.encoding.SerializerFactory) {
+                            org.apache.axis.encoding.SerializerFactory sf = (org.apache.axis.encoding.SerializerFactory)
+                                    cachedSerFactories.get(i);
+                            org.apache.axis.encoding.DeserializerFactory df = (org.apache.axis.encoding.DeserializerFactory)
+                                    cachedDeserFactories.get(i);
+                            _call.registerTypeMapping(cls, qName, sf, df, false);
+                        }
+                    }
+                }
+            }
+            return _call;
+        }
+        catch (java.lang.Throwable _t) {
+            throw new org.apache.axis.AxisFault("Failure trying to get the Call object", _t);
+        }
+    }
+
+    public java.lang.String portalToEas(java.lang.String type, java.lang.String jsonObject) throws java.rmi.RemoteException, WSInvokeException {
+        if (super.cachedEndpoint == null) {
+            throw new org.apache.axis.NoEndPointException();
+        }
+        org.apache.axis.client.Call _call = createCall();
+        _call.setOperation(_operations[0]);
+        _call.setUseSOAPAction(true);
+        _call.setSOAPActionURI("");
+        _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
+        _call.setOperationName(new javax.xml.namespace.QName("http://webservice.app.portal.rise.custom.eas.kingdee.com", "portalToEas"));
+
+        setRequestHeaders(_call);
+        setAttachments(_call);
+        try {        java.lang.Object _resp = _call.invoke(new java.lang.Object[] {type, jsonObject});
+
+            if (_resp instanceof java.rmi.RemoteException) {
+                throw (java.rmi.RemoteException)_resp;
+            }
+            else {
+                extractAttachments(_call);
+                try {
+                    return (java.lang.String) _resp;
+                } catch (java.lang.Exception _exception) {
+                    return (java.lang.String) org.apache.axis.utils.JavaUtils.convert(_resp, java.lang.String.class);
+                }
+            }
+        } catch (org.apache.axis.AxisFault axisFaultException) {
+            if (axisFaultException.detail != null) {
+                if (axisFaultException.detail instanceof java.rmi.RemoteException) {
+                    throw (java.rmi.RemoteException) axisFaultException.detail;
+                }
+                if (axisFaultException.detail instanceof WSInvokeException) {
+                    throw (WSInvokeException) axisFaultException.detail;
+                }
+            }
+            throw axisFaultException;
+        }
+    }
+}

+ 7 - 0
mjava-ruisi/src/main/java/com/malk/ruisi/services/WSPortalMainFacade/WSPortalMainFacadeSrvProxy.java

@@ -0,0 +1,7 @@
+package com.malk.ruisi.services.WSPortalMainFacade;
+
+import com.malk.ruisi.portalmainfacade.WSInvokeException;
+
+public interface WSPortalMainFacadeSrvProxy extends java.rmi.Remote {
+    public java.lang.String portalToEas(java.lang.String type, java.lang.String jsonObject) throws java.rmi.RemoteException, WSInvokeException;
+}

+ 54 - 0
mjava-ruisi/src/main/java/com/malk/ruisi/services/WSPortalMainFacade/WSPortalMainFacadeSrvProxyProxy.java

@@ -0,0 +1,54 @@
+package com.malk.ruisi.services.WSPortalMainFacade;
+
+import com.malk.ruisi.portalmainfacade.WSInvokeException;
+
+public class WSPortalMainFacadeSrvProxyProxy implements WSPortalMainFacadeSrvProxy{
+    private String _endpoint = null;
+    private WSPortalMainFacadeSrvProxy wSPortalMainFacadeSrvProxy = null;
+
+    public WSPortalMainFacadeSrvProxyProxy() {
+        _initWSPortalMainFacadeSrvProxyProxy();
+    }
+
+    public WSPortalMainFacadeSrvProxyProxy(String endpoint) {
+        _endpoint = endpoint;
+        _initWSPortalMainFacadeSrvProxyProxy();
+    }
+
+    private void _initWSPortalMainFacadeSrvProxyProxy() {
+        try {
+            wSPortalMainFacadeSrvProxy = (new WSPortalMainFacadeSrvProxyServiceLocator()).getWSPortalMainFacade();
+            if (wSPortalMainFacadeSrvProxy != null) {
+                if (_endpoint != null)
+                    ((javax.xml.rpc.Stub)wSPortalMainFacadeSrvProxy)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
+                else
+                    _endpoint = (String)((javax.xml.rpc.Stub)wSPortalMainFacadeSrvProxy)._getProperty("javax.xml.rpc.service.endpoint.address");
+            }
+
+        }
+        catch (javax.xml.rpc.ServiceException serviceException) {}
+    }
+
+    public String getEndpoint() {
+        return _endpoint;
+    }
+
+    public void setEndpoint(String endpoint) {
+        _endpoint = endpoint;
+        if (wSPortalMainFacadeSrvProxy != null)
+            ((javax.xml.rpc.Stub)wSPortalMainFacadeSrvProxy)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
+
+    }
+
+    public WSPortalMainFacadeSrvProxy getWSPortalMainFacadeSrvProxy() {
+        if (wSPortalMainFacadeSrvProxy == null)
+            _initWSPortalMainFacadeSrvProxyProxy();
+        return wSPortalMainFacadeSrvProxy;
+    }
+
+    public java.lang.String portalToEas(java.lang.String type, java.lang.String jsonObject) throws java.rmi.RemoteException, WSInvokeException {
+        if (wSPortalMainFacadeSrvProxy == null)
+            _initWSPortalMainFacadeSrvProxyProxy();
+        return wSPortalMainFacadeSrvProxy.portalToEas(type, jsonObject);
+    }
+}

+ 10 - 0
mjava-ruisi/src/main/java/com/malk/ruisi/services/WSPortalMainFacade/WSPortalMainFacadeSrvProxyService.java

@@ -0,0 +1,10 @@
+package com.malk.ruisi.services.WSPortalMainFacade;
+
+public interface WSPortalMainFacadeSrvProxyService extends javax.xml.rpc.Service{
+    public java.lang.String getWSPortalMainFacadeAddress();
+
+    public WSPortalMainFacadeSrvProxy getWSPortalMainFacade() throws javax.xml.rpc.ServiceException;
+
+    public WSPortalMainFacadeSrvProxy getWSPortalMainFacade(java.net.URL portAddress) throws javax.xml.rpc.ServiceException;
+
+}

+ 133 - 0
mjava-ruisi/src/main/java/com/malk/ruisi/services/WSPortalMainFacade/WSPortalMainFacadeSrvProxyServiceLocator.java

@@ -0,0 +1,133 @@
+package com.malk.ruisi.services.WSPortalMainFacade;
+
+public class WSPortalMainFacadeSrvProxyServiceLocator extends org.apache.axis.client.Service implements WSPortalMainFacadeSrvProxyService{
+    public WSPortalMainFacadeSrvProxyServiceLocator() {
+    }
+
+
+    public WSPortalMainFacadeSrvProxyServiceLocator(org.apache.axis.EngineConfiguration config) {
+        super(config);
+    }
+
+    public WSPortalMainFacadeSrvProxyServiceLocator(java.lang.String wsdlLoc, javax.xml.namespace.QName sName) throws javax.xml.rpc.ServiceException {
+        super(wsdlLoc, sName);
+    }
+
+    // Use to get a proxy class for WSPortalMainFacade
+    private java.lang.String WSPortalMainFacade_address = "http://10.30.52.251:7890/ormrpc/services/WSPortalMainFacade";
+
+    public java.lang.String getWSPortalMainFacadeAddress() {
+        return WSPortalMainFacade_address;
+    }
+
+    // The WSDD service name defaults to the port name.
+    private java.lang.String WSPortalMainFacadeWSDDServiceName = "WSPortalMainFacade";
+
+    public java.lang.String getWSPortalMainFacadeWSDDServiceName() {
+        return WSPortalMainFacadeWSDDServiceName;
+    }
+
+    public void setWSPortalMainFacadeWSDDServiceName(java.lang.String name) {
+        WSPortalMainFacadeWSDDServiceName = name;
+    }
+
+    public WSPortalMainFacadeSrvProxy getWSPortalMainFacade() throws javax.xml.rpc.ServiceException {
+        java.net.URL endpoint;
+        try {
+            endpoint = new java.net.URL(WSPortalMainFacade_address);
+        }
+        catch (java.net.MalformedURLException e) {
+            throw new javax.xml.rpc.ServiceException(e);
+        }
+        return getWSPortalMainFacade(endpoint);
+    }
+
+    public WSPortalMainFacadeSrvProxy getWSPortalMainFacade(java.net.URL portAddress) throws javax.xml.rpc.ServiceException {
+        try {
+            WSPortalMainFacadeSoapBindingStub _stub = new WSPortalMainFacadeSoapBindingStub(portAddress, this);
+            _stub.setPortName(getWSPortalMainFacadeWSDDServiceName());
+            return _stub;
+        }
+        catch (org.apache.axis.AxisFault e) {
+            return null;
+        }
+    }
+
+    public void setWSPortalMainFacadeEndpointAddress(java.lang.String address) {
+        WSPortalMainFacade_address = address;
+    }
+
+    /**
+     * For the given interface, get the stub implementation.
+     * If this service has no port for the given interface,
+     * then ServiceException is thrown.
+     */
+    public java.rmi.Remote getPort(Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {
+        try {
+            if (WSPortalMainFacadeSrvProxy.class.isAssignableFrom(serviceEndpointInterface)) {
+                WSPortalMainFacadeSoapBindingStub _stub = new WSPortalMainFacadeSoapBindingStub(new java.net.URL(WSPortalMainFacade_address), this);
+                _stub.setPortName(getWSPortalMainFacadeWSDDServiceName());
+                return _stub;
+            }
+        }
+        catch (java.lang.Throwable t) {
+            throw new javax.xml.rpc.ServiceException(t);
+        }
+        throw new javax.xml.rpc.ServiceException("There is no stub implementation for the interface:  " + (serviceEndpointInterface == null ? "null" : serviceEndpointInterface.getName()));
+    }
+
+    /**
+     * For the given interface, get the stub implementation.
+     * If this service has no port for the given interface,
+     * then ServiceException is thrown.
+     */
+    public java.rmi.Remote getPort(javax.xml.namespace.QName portName, Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {
+        if (portName == null) {
+            return getPort(serviceEndpointInterface);
+        }
+        java.lang.String inputPortName = portName.getLocalPart();
+        if ("WSPortalMainFacade".equals(inputPortName)) {
+            return getWSPortalMainFacade();
+        }
+        else  {
+            java.rmi.Remote _stub = getPort(serviceEndpointInterface);
+            ((org.apache.axis.client.Stub) _stub).setPortName(portName);
+            return _stub;
+        }
+    }
+
+    public javax.xml.namespace.QName getServiceName() {
+        return new javax.xml.namespace.QName("http://10.31.52.8:7890/ormrpc/services/WSPortalMainFacade", "WSPortalMainFacadeSrvProxyService");
+    }
+
+    private java.util.HashSet ports = null;
+
+    public java.util.Iterator getPorts() {
+        if (ports == null) {
+            ports = new java.util.HashSet();
+            ports.add(new javax.xml.namespace.QName("http://10.31.52.8:7890/ormrpc/services/WSPortalMainFacade", "WSPortalMainFacade"));
+        }
+        return ports.iterator();
+    }
+
+    /**
+     * Set the endpoint address for the specified port name.
+     */
+    public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException {
+
+        if ("WSPortalMainFacade".equals(portName)) {
+            setWSPortalMainFacadeEndpointAddress(address);
+        }
+        else
+        { // Unknown Port Name
+            throw new javax.xml.rpc.ServiceException(" Cannot set Endpoint Address for Unknown Port" + portName);
+        }
+    }
+
+    /**
+     * Set the endpoint address for the specified port name.
+     */
+    public void setEndpointAddress(javax.xml.namespace.QName portName, java.lang.String address) throws javax.xml.rpc.ServiceException {
+        setEndpointAddress(portName.getLocalPart(), address);
+    }
+}

+ 359 - 0
mjava-ruisi/src/main/java/com/malk/ruisi/services/WSWebServiceProvideFacade/WSWebServiceProvideFacadeSoapBindingStub.java

@@ -0,0 +1,359 @@
+/**
+ * WSWebServiceProvideFacadeSoapBindingStub.java
+ *
+ * This file was auto-generated from WSDL
+ * by the Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java emitter.
+ */
+
+package com.malk.ruisi.services.WSWebServiceProvideFacade;
+
+public class WSWebServiceProvideFacadeSoapBindingStub extends org.apache.axis.client.Stub implements WSWebServiceProvideFacadeSrvProxy {
+    private java.util.Vector cachedSerClasses = new java.util.Vector();
+    private java.util.Vector cachedSerQNames = new java.util.Vector();
+    private java.util.Vector cachedSerFactories = new java.util.Vector();
+    private java.util.Vector cachedDeserFactories = new java.util.Vector();
+
+    static org.apache.axis.description.OperationDesc [] _operations;
+
+    static {
+        _operations = new org.apache.axis.description.OperationDesc[3];
+        _initOperationDesc1();
+    }
+
+    private static void _initOperationDesc1(){
+        org.apache.axis.description.OperationDesc oper;
+        org.apache.axis.description.ParameterDesc param;
+        oper = new org.apache.axis.description.OperationDesc();
+        oper.setName("updateReceiveDatas");
+        param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("", "model"), org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName("urn:client.receive", "WSReceive"), com.malk.ruisi.client.WSReceive.class, false, false);
+        oper.addParameter(param);
+        oper.setReturnType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
+        oper.setReturnClass(String.class);
+        oper.setReturnQName(new javax.xml.namespace.QName("", "updateReceiveDatasReturn"));
+        oper.setStyle(org.apache.axis.constants.Style.RPC);
+        oper.setUse(org.apache.axis.constants.Use.ENCODED);
+        oper.addFault(new org.apache.axis.description.FaultDesc(
+                //192.168.2.191
+                      new javax.xml.namespace.QName("http://192.168.2.191:6888/ormrpc/services/WSWebServiceProvideFacade", "fault"),
+                      "webserviceprovidefacade.client.WSInvokeException",
+                      new javax.xml.namespace.QName("urn:client.webserviceprovidefacade", "WSInvokeException"), 
+                      true
+                     ));
+        _operations[0] = oper;
+
+        oper = new org.apache.axis.description.OperationDesc();
+        oper.setName("confirmOrReturn");
+        param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("", "isOk"), org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "boolean"), boolean.class, false, false);
+        oper.addParameter(param);
+        param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("", "msg"), org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"), String.class, false, false);
+        oper.addParameter(param);
+        param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("", "key"), org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"), String.class, false, false);
+        oper.addParameter(param);
+        param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("", "bussinessType"), org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"), String.class, false, false);
+        oper.addParameter(param);
+        oper.setReturnType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
+        oper.setReturnClass(String.class);
+        oper.setReturnQName(new javax.xml.namespace.QName("", "confirmOrReturnReturn"));
+        oper.setStyle(org.apache.axis.constants.Style.RPC);
+        oper.setUse(org.apache.axis.constants.Use.ENCODED);
+        oper.addFault(new org.apache.axis.description.FaultDesc(
+                      new javax.xml.namespace.QName("http://192.168.2.191:6888/ormrpc/services/WSWebServiceProvideFacade", "fault"),
+                      "webserviceprovidefacade.client.WSInvokeException",
+                      new javax.xml.namespace.QName("urn:client.webserviceprovidefacade", "WSInvokeException"), 
+                      true
+                     ));
+        _operations[1] = oper;
+
+        oper = new org.apache.axis.description.OperationDesc();
+        oper.setName("uploadIncomeDatas");
+        param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("", "model"), org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName("urn:client.income", "WSIncome"), com.malk.ruisi.client.WSIncome.class, false, false);
+        oper.addParameter(param);
+        oper.setReturnType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
+        oper.setReturnClass(String.class);
+        oper.setReturnQName(new javax.xml.namespace.QName("", "uploadIncomeDatasReturn"));
+        oper.setStyle(org.apache.axis.constants.Style.RPC);
+        oper.setUse(org.apache.axis.constants.Use.ENCODED);
+        oper.addFault(new org.apache.axis.description.FaultDesc(
+                      new javax.xml.namespace.QName("http://192.168.2.191:6888/ormrpc/services/WSWebServiceProvideFacade", "fault"),
+                      "webserviceprovidefacade.client.WSInvokeException",
+                      new javax.xml.namespace.QName("urn:client.webserviceprovidefacade", "WSInvokeException"), 
+                      true
+                     ));
+        _operations[2] = oper;
+
+    }
+
+    public WSWebServiceProvideFacadeSoapBindingStub() throws org.apache.axis.AxisFault {
+         this(null);
+    }
+
+    public WSWebServiceProvideFacadeSoapBindingStub(java.net.URL endpointURL, javax.xml.rpc.Service service) throws org.apache.axis.AxisFault {
+         this(service);
+         super.cachedEndpoint = endpointURL;
+    }
+
+    public WSWebServiceProvideFacadeSoapBindingStub(javax.xml.rpc.Service service) throws org.apache.axis.AxisFault {
+        if (service == null) {
+            super.service = new org.apache.axis.client.Service();
+        } else {
+            super.service = service;
+        }
+        ((org.apache.axis.client.Service)super.service).setTypeMappingVersion("1.2");
+            Class cls;
+            javax.xml.namespace.QName qName;
+            javax.xml.namespace.QName qName2;
+            Class beansf = org.apache.axis.encoding.ser.BeanSerializerFactory.class;
+            Class beandf = org.apache.axis.encoding.ser.BeanDeserializerFactory.class;
+            Class enumsf = org.apache.axis.encoding.ser.EnumSerializerFactory.class;
+            Class enumdf = org.apache.axis.encoding.ser.EnumDeserializerFactory.class;
+            Class arraysf = org.apache.axis.encoding.ser.ArraySerializerFactory.class;
+            Class arraydf = org.apache.axis.encoding.ser.ArrayDeserializerFactory.class;
+            Class simplesf = org.apache.axis.encoding.ser.SimpleSerializerFactory.class;
+            Class simpledf = org.apache.axis.encoding.ser.SimpleDeserializerFactory.class;
+            Class simplelistsf = org.apache.axis.encoding.ser.SimpleListSerializerFactory.class;
+            Class simplelistdf = org.apache.axis.encoding.ser.SimpleListDeserializerFactory.class;
+            qName = new javax.xml.namespace.QName("http://192.168.2.191:6888/ormrpc/services/WSWebServiceProvideFacade", "ArrayOf_tns1_WSReceiveEntry");
+            cachedSerQNames.add(qName);
+            cls = com.malk.ruisi.client.WSReceiveEntry[].class;
+            cachedSerClasses.add(cls);
+            qName = new javax.xml.namespace.QName("urn:client.receive", "WSReceiveEntry");
+            qName2 = null;
+            cachedSerFactories.add(new org.apache.axis.encoding.ser.ArraySerializerFactory(qName, qName2));
+            cachedDeserFactories.add(new org.apache.axis.encoding.ser.ArrayDeserializerFactory());
+
+            qName = new javax.xml.namespace.QName("http://192.168.2.191:6888/ormrpc/services/WSWebServiceProvideFacade", "ArrayOf_tns3_WSIncomeEntry");
+            cachedSerQNames.add(qName);
+            cls = com.malk.ruisi.client.WSIncomeEntry[].class;
+            cachedSerClasses.add(cls);
+            qName = new javax.xml.namespace.QName("urn:client.income", "WSIncomeEntry");
+            qName2 = null;
+            cachedSerFactories.add(new org.apache.axis.encoding.ser.ArraySerializerFactory(qName, qName2));
+            cachedDeserFactories.add(new org.apache.axis.encoding.ser.ArrayDeserializerFactory());
+
+            qName = new javax.xml.namespace.QName("urn:client.income", "WSIncome");
+            cachedSerQNames.add(qName);
+            cls = com.malk.ruisi.client.WSIncome.class;
+            cachedSerClasses.add(cls);
+            cachedSerFactories.add(beansf);
+            cachedDeserFactories.add(beandf);
+
+            qName = new javax.xml.namespace.QName("urn:client.income", "WSIncomeEntry");
+            cachedSerQNames.add(qName);
+            cls = com.malk.ruisi.client.WSIncomeEntry.class;
+            cachedSerClasses.add(cls);
+            cachedSerFactories.add(beansf);
+            cachedDeserFactories.add(beandf);
+
+            qName = new javax.xml.namespace.QName("urn:client.receive", "WSReceive");
+            cachedSerQNames.add(qName);
+            cls = com.malk.ruisi.client.WSReceive.class;
+            cachedSerClasses.add(cls);
+            cachedSerFactories.add(beansf);
+            cachedDeserFactories.add(beandf);
+
+            qName = new javax.xml.namespace.QName("urn:client.receive", "WSReceiveEntry");
+            cachedSerQNames.add(qName);
+            cls = com.malk.ruisi.client.WSReceiveEntry.class;
+            cachedSerClasses.add(cls);
+            cachedSerFactories.add(beansf);
+            cachedDeserFactories.add(beandf);
+
+            qName = new javax.xml.namespace.QName("urn:client.webserviceprovidefacade", "WSBean");
+            cachedSerQNames.add(qName);
+            cls = com.malk.ruisi.client.WSBean.class;
+            cachedSerClasses.add(cls);
+            cachedSerFactories.add(beansf);
+            cachedDeserFactories.add(beandf);
+
+            qName = new javax.xml.namespace.QName("urn:client.webserviceprovidefacade", "WSInvokeException");
+            cachedSerQNames.add(qName);
+            cls = com.malk.ruisi.client.WSInvokeException.class;
+            cachedSerClasses.add(cls);
+            cachedSerFactories.add(beansf);
+            cachedDeserFactories.add(beandf);
+
+    }
+
+    protected org.apache.axis.client.Call createCall() throws java.rmi.RemoteException {
+        try {
+            org.apache.axis.client.Call _call = super._createCall();
+            if (super.maintainSessionSet) {
+                _call.setMaintainSession(super.maintainSession);
+            }
+            if (super.cachedUsername != null) {
+                _call.setUsername(super.cachedUsername);
+            }
+            if (super.cachedPassword != null) {
+                _call.setPassword(super.cachedPassword);
+            }
+            if (super.cachedEndpoint != null) {
+                _call.setTargetEndpointAddress(super.cachedEndpoint);
+            }
+            if (super.cachedTimeout != null) {
+                _call.setTimeout(super.cachedTimeout);
+            }
+            if (super.cachedPortName != null) {
+                _call.setPortName(super.cachedPortName);
+            }
+            java.util.Enumeration keys = super.cachedProperties.keys();
+            while (keys.hasMoreElements()) {
+                String key = (String) keys.nextElement();
+                _call.setProperty(key, super.cachedProperties.get(key));
+            }
+            // All the type mapping information is registered
+            // when the first call is made.
+            // The type mapping information is actually registered in
+            // the TypeMappingRegistry of the service, which
+            // is the reason why registration is only needed for the first call.
+            synchronized (this) {
+                if (firstCall()) {
+                    // must set encoding style before registering serializers
+                    _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
+                    _call.setEncodingStyle(org.apache.axis.Constants.URI_SOAP11_ENC);
+                    for (int i = 0; i < cachedSerFactories.size(); ++i) {
+                        Class cls = (Class) cachedSerClasses.get(i);
+                        javax.xml.namespace.QName qName =
+                                (javax.xml.namespace.QName) cachedSerQNames.get(i);
+                        Object x = cachedSerFactories.get(i);
+                        if (x instanceof Class) {
+                            Class sf = (Class)
+                                 cachedSerFactories.get(i);
+                            Class df = (Class)
+                                 cachedDeserFactories.get(i);
+                            _call.registerTypeMapping(cls, qName, sf, df, false);
+                        }
+                        else if (x instanceof javax.xml.rpc.encoding.SerializerFactory) {
+                            org.apache.axis.encoding.SerializerFactory sf = (org.apache.axis.encoding.SerializerFactory)
+                                 cachedSerFactories.get(i);
+                            org.apache.axis.encoding.DeserializerFactory df = (org.apache.axis.encoding.DeserializerFactory)
+                                 cachedDeserFactories.get(i);
+                            _call.registerTypeMapping(cls, qName, sf, df, false);
+                        }
+                    }
+                }
+            }
+            return _call;
+        }
+        catch (Throwable _t) {
+            throw new org.apache.axis.AxisFault("Failure trying to get the Call object", _t);
+        }
+    }
+
+    public String updateReceiveDatas(com.malk.ruisi.client.WSReceive model) throws java.rmi.RemoteException, com.malk.ruisi.client.WSInvokeException {
+        if (super.cachedEndpoint == null) {
+            throw new org.apache.axis.NoEndPointException();
+        }
+        org.apache.axis.client.Call _call = createCall();
+        _call.setOperation(_operations[0]);
+        _call.setUseSOAPAction(true);
+        _call.setSOAPActionURI("");
+        _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
+        _call.setOperationName(new javax.xml.namespace.QName("http://webservice.app.riverdeep.eas.kingdee.com", "updateReceiveDatas"));
+
+        setRequestHeaders(_call);
+        setAttachments(_call);
+ try {        Object _resp = _call.invoke(new Object[] {model});
+
+        if (_resp instanceof java.rmi.RemoteException) {
+            throw (java.rmi.RemoteException)_resp;
+        }
+        else {
+            extractAttachments(_call);
+            try {
+                return (String) _resp;
+            } catch (Exception _exception) {
+                return (String) org.apache.axis.utils.JavaUtils.convert(_resp, String.class);
+            }
+        }
+  } catch (org.apache.axis.AxisFault axisFaultException) {
+    if (axisFaultException.detail != null) {
+        if (axisFaultException.detail instanceof java.rmi.RemoteException) {
+              throw (java.rmi.RemoteException) axisFaultException.detail;
+         }
+        if (axisFaultException.detail instanceof com.malk.ruisi.client.WSInvokeException) {
+              throw (com.malk.ruisi.client.WSInvokeException) axisFaultException.detail;
+         }
+   }
+  throw axisFaultException;
+}
+    }
+
+    public String confirmOrReturn(boolean isOk, String msg, String key, String bussinessType) throws java.rmi.RemoteException, com.malk.ruisi.client.WSInvokeException {
+        if (super.cachedEndpoint == null) {
+            throw new org.apache.axis.NoEndPointException();
+        }
+        org.apache.axis.client.Call _call = createCall();
+        _call.setOperation(_operations[1]);
+        _call.setUseSOAPAction(true);
+        _call.setSOAPActionURI("");
+        _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
+        _call.setOperationName(new javax.xml.namespace.QName("http://webservice.app.riverdeep.eas.kingdee.com", "confirmOrReturn"));
+
+        setRequestHeaders(_call);
+        setAttachments(_call);
+ try {        Object _resp = _call.invoke(new Object[] {new Boolean(isOk), msg, key, bussinessType});
+
+        if (_resp instanceof java.rmi.RemoteException) {
+            throw (java.rmi.RemoteException)_resp;
+        }
+        else {
+            extractAttachments(_call);
+            try {
+                return (String) _resp;
+            } catch (Exception _exception) {
+                return (String) org.apache.axis.utils.JavaUtils.convert(_resp, String.class);
+            }
+        }
+  } catch (org.apache.axis.AxisFault axisFaultException) {
+    if (axisFaultException.detail != null) {
+        if (axisFaultException.detail instanceof java.rmi.RemoteException) {
+              throw (java.rmi.RemoteException) axisFaultException.detail;
+         }
+        if (axisFaultException.detail instanceof com.malk.ruisi.client.WSInvokeException) {
+              throw (com.malk.ruisi.client.WSInvokeException) axisFaultException.detail;
+         }
+   }
+  throw axisFaultException;
+}
+    }
+
+    public String uploadIncomeDatas(com.malk.ruisi.client.WSIncome model) throws java.rmi.RemoteException, com.malk.ruisi.client.WSInvokeException {
+        if (super.cachedEndpoint == null) {
+            throw new org.apache.axis.NoEndPointException();
+        }
+        org.apache.axis.client.Call _call = createCall();
+        _call.setOperation(_operations[2]);
+        _call.setUseSOAPAction(true);
+        _call.setSOAPActionURI("");
+        _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
+        _call.setOperationName(new javax.xml.namespace.QName("http://webservice.app.riverdeep.eas.kingdee.com", "uploadIncomeDatas"));
+
+        setRequestHeaders(_call);
+        setAttachments(_call);
+ try {        Object _resp = _call.invoke(new Object[] {model});
+
+        if (_resp instanceof java.rmi.RemoteException) {
+            throw (java.rmi.RemoteException)_resp;
+        }
+        else {
+            extractAttachments(_call);
+            try {
+                return (String) _resp;
+            } catch (Exception _exception) {
+                return (String) org.apache.axis.utils.JavaUtils.convert(_resp, String.class);
+            }
+        }
+  } catch (org.apache.axis.AxisFault axisFaultException) {
+    if (axisFaultException.detail != null) {
+        if (axisFaultException.detail instanceof java.rmi.RemoteException) {
+              throw (java.rmi.RemoteException) axisFaultException.detail;
+         }
+        if (axisFaultException.detail instanceof com.malk.ruisi.client.WSInvokeException) {
+              throw (com.malk.ruisi.client.WSInvokeException) axisFaultException.detail;
+         }
+   }
+  throw axisFaultException;
+}
+    }
+
+}

+ 14 - 0
mjava-ruisi/src/main/java/com/malk/ruisi/services/WSWebServiceProvideFacade/WSWebServiceProvideFacadeSrvProxy.java

@@ -0,0 +1,14 @@
+/**
+ * WSWebServiceProvideFacadeSrvProxy.java
+ *
+ * This file was auto-generated from WSDL
+ * by the Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java emitter.
+ */
+
+package com.malk.ruisi.services.WSWebServiceProvideFacade;
+
+public interface WSWebServiceProvideFacadeSrvProxy extends java.rmi.Remote {
+    public String updateReceiveDatas(com.malk.ruisi.client.WSReceive model) throws java.rmi.RemoteException, com.malk.ruisi.client.WSInvokeException;
+    public String confirmOrReturn(boolean isOk, String msg, String key, String bussinessType) throws java.rmi.RemoteException, com.malk.ruisi.client.WSInvokeException;
+    public String uploadIncomeDatas(com.malk.ruisi.client.WSIncome model) throws java.rmi.RemoteException, com.malk.ruisi.client.WSInvokeException;
+}

+ 66 - 0
mjava-ruisi/src/main/java/com/malk/ruisi/services/WSWebServiceProvideFacade/WSWebServiceProvideFacadeSrvProxyProxy.java

@@ -0,0 +1,66 @@
+package com.malk.ruisi.services.WSWebServiceProvideFacade;
+
+public class WSWebServiceProvideFacadeSrvProxyProxy implements WSWebServiceProvideFacadeSrvProxy {
+  private String _endpoint = null;
+  private WSWebServiceProvideFacadeSrvProxy wSWebServiceProvideFacadeSrvProxy = null;
+  
+  public WSWebServiceProvideFacadeSrvProxyProxy() {
+    _initWSWebServiceProvideFacadeSrvProxyProxy();
+  }
+  
+  public WSWebServiceProvideFacadeSrvProxyProxy(String endpoint) {
+    _endpoint = endpoint;
+    _initWSWebServiceProvideFacadeSrvProxyProxy();
+  }
+  
+  private void _initWSWebServiceProvideFacadeSrvProxyProxy() {
+    try {
+      wSWebServiceProvideFacadeSrvProxy = (new com.malk.ruisi.services.WSWebServiceProvideFacade.WSWebServiceProvideFacadeSrvProxyServiceLocator()).getWSWebServiceProvideFacade();
+      if (wSWebServiceProvideFacadeSrvProxy != null) {
+        if (_endpoint != null)
+          ((javax.xml.rpc.Stub)wSWebServiceProvideFacadeSrvProxy)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
+        else
+          _endpoint = (String)((javax.xml.rpc.Stub)wSWebServiceProvideFacadeSrvProxy)._getProperty("javax.xml.rpc.service.endpoint.address");
+      }
+      
+    }
+    catch (javax.xml.rpc.ServiceException serviceException) {}
+  }
+  
+  public String getEndpoint() {
+    return _endpoint;
+  }
+  
+  public void setEndpoint(String endpoint) {
+    _endpoint = endpoint;
+    if (wSWebServiceProvideFacadeSrvProxy != null)
+      ((javax.xml.rpc.Stub)wSWebServiceProvideFacadeSrvProxy)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
+    
+  }
+  
+  public WSWebServiceProvideFacadeSrvProxy getWSWebServiceProvideFacadeSrvProxy() {
+    if (wSWebServiceProvideFacadeSrvProxy == null)
+      _initWSWebServiceProvideFacadeSrvProxyProxy();
+    return wSWebServiceProvideFacadeSrvProxy;
+  }
+  
+  public String updateReceiveDatas(com.malk.ruisi.client.WSReceive model) throws java.rmi.RemoteException, com.malk.ruisi.client.WSInvokeException{
+    if (wSWebServiceProvideFacadeSrvProxy == null)
+      _initWSWebServiceProvideFacadeSrvProxyProxy();
+    return wSWebServiceProvideFacadeSrvProxy.updateReceiveDatas(model);
+  }
+  
+  public String confirmOrReturn(boolean isOk, String msg, String key, String bussinessType) throws java.rmi.RemoteException, com.malk.ruisi.client.WSInvokeException{
+    if (wSWebServiceProvideFacadeSrvProxy == null)
+      _initWSWebServiceProvideFacadeSrvProxyProxy();
+    return wSWebServiceProvideFacadeSrvProxy.confirmOrReturn(isOk, msg, key, bussinessType);
+  }
+  
+  public String uploadIncomeDatas(com.malk.ruisi.client.WSIncome model) throws java.rmi.RemoteException, com.malk.ruisi.client.WSInvokeException{
+    if (wSWebServiceProvideFacadeSrvProxy == null)
+      _initWSWebServiceProvideFacadeSrvProxyProxy();
+    return wSWebServiceProvideFacadeSrvProxy.uploadIncomeDatas(model);
+  }
+  
+  
+}

+ 16 - 0
mjava-ruisi/src/main/java/com/malk/ruisi/services/WSWebServiceProvideFacade/WSWebServiceProvideFacadeSrvProxyService.java

@@ -0,0 +1,16 @@
+/**
+ * WSWebServiceProvideFacadeSrvProxyService.java
+ *
+ * This file was auto-generated from WSDL
+ * by the Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java emitter.
+ */
+
+package com.malk.ruisi.services.WSWebServiceProvideFacade;
+
+public interface WSWebServiceProvideFacadeSrvProxyService extends javax.xml.rpc.Service {
+    public String getWSWebServiceProvideFacadeAddress();
+
+    public WSWebServiceProvideFacadeSrvProxy getWSWebServiceProvideFacade() throws javax.xml.rpc.ServiceException;
+
+    public WSWebServiceProvideFacadeSrvProxy getWSWebServiceProvideFacade(java.net.URL portAddress) throws javax.xml.rpc.ServiceException;
+}

+ 142 - 0
mjava-ruisi/src/main/java/com/malk/ruisi/services/WSWebServiceProvideFacade/WSWebServiceProvideFacadeSrvProxyServiceLocator.java

@@ -0,0 +1,142 @@
+/**
+ * WSWebServiceProvideFacadeSrvProxyServiceLocator.java
+ *
+ * This file was auto-generated from WSDL
+ * by the Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java emitter.
+ */
+
+package com.malk.ruisi.services.WSWebServiceProvideFacade;
+
+public class WSWebServiceProvideFacadeSrvProxyServiceLocator extends org.apache.axis.client.Service implements WSWebServiceProvideFacadeSrvProxyService {
+
+    public WSWebServiceProvideFacadeSrvProxyServiceLocator() {
+    }
+
+
+    public WSWebServiceProvideFacadeSrvProxyServiceLocator(org.apache.axis.EngineConfiguration config) {
+        super(config);
+    }
+
+    public WSWebServiceProvideFacadeSrvProxyServiceLocator(String wsdlLoc, javax.xml.namespace.QName sName) throws javax.xml.rpc.ServiceException {
+        super(wsdlLoc, sName);
+    }
+
+    // Use to get a proxy class for WSWebServiceProvideFacade
+    private String WSWebServiceProvideFacade_address = "http://192.168.2.191:6888/ormrpc/services/WSWebServiceProvideFacade";
+
+    public String getWSWebServiceProvideFacadeAddress() {
+        return WSWebServiceProvideFacade_address;
+    }
+
+    // The WSDD service name defaults to the port name.
+    private String WSWebServiceProvideFacadeWSDDServiceName = "WSWebServiceProvideFacade";
+
+    public String getWSWebServiceProvideFacadeWSDDServiceName() {
+        return WSWebServiceProvideFacadeWSDDServiceName;
+    }
+
+    public void setWSWebServiceProvideFacadeWSDDServiceName(String name) {
+        WSWebServiceProvideFacadeWSDDServiceName = name;
+    }
+
+    public WSWebServiceProvideFacadeSrvProxy getWSWebServiceProvideFacade() throws javax.xml.rpc.ServiceException {
+       java.net.URL endpoint;
+        try {
+            endpoint = new java.net.URL(WSWebServiceProvideFacade_address);
+        }
+        catch (java.net.MalformedURLException e) {
+            throw new javax.xml.rpc.ServiceException(e);
+        }
+        return getWSWebServiceProvideFacade(endpoint);
+    }
+
+    public WSWebServiceProvideFacadeSrvProxy getWSWebServiceProvideFacade(java.net.URL portAddress) throws javax.xml.rpc.ServiceException {
+        try {
+            WSWebServiceProvideFacadeSoapBindingStub _stub = new WSWebServiceProvideFacadeSoapBindingStub(portAddress, this);
+            _stub.setPortName(getWSWebServiceProvideFacadeWSDDServiceName());
+            return _stub;
+        }
+        catch (org.apache.axis.AxisFault e) {
+            return null;
+        }
+    }
+
+    public void setWSWebServiceProvideFacadeEndpointAddress(String address) {
+        WSWebServiceProvideFacade_address = address;
+    }
+
+    /**
+     * For the given interface, get the stub implementation.
+     * If this service has no port for the given interface,
+     * then ServiceException is thrown.
+     */
+    public java.rmi.Remote getPort(Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {
+        try {
+            if (WSWebServiceProvideFacadeSrvProxy.class.isAssignableFrom(serviceEndpointInterface)) {
+                WSWebServiceProvideFacadeSoapBindingStub _stub = new WSWebServiceProvideFacadeSoapBindingStub(new java.net.URL(WSWebServiceProvideFacade_address), this);
+                _stub.setPortName(getWSWebServiceProvideFacadeWSDDServiceName());
+                return _stub;
+            }
+        }
+        catch (Throwable t) {
+            throw new javax.xml.rpc.ServiceException(t);
+        }
+        throw new javax.xml.rpc.ServiceException("There is no stub implementation for the interface:  " + (serviceEndpointInterface == null ? "null" : serviceEndpointInterface.getName()));
+    }
+
+    /**
+     * For the given interface, get the stub implementation.
+     * If this service has no port for the given interface,
+     * then ServiceException is thrown.
+     */
+    public java.rmi.Remote getPort(javax.xml.namespace.QName portName, Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {
+        if (portName == null) {
+            return getPort(serviceEndpointInterface);
+        }
+        String inputPortName = portName.getLocalPart();
+        if ("WSWebServiceProvideFacade".equals(inputPortName)) {
+            return getWSWebServiceProvideFacade();
+        }
+        else  {
+            java.rmi.Remote _stub = getPort(serviceEndpointInterface);
+            ((org.apache.axis.client.Stub) _stub).setPortName(portName);
+            return _stub;
+        }
+    }
+
+    public javax.xml.namespace.QName getServiceName() {
+        return new javax.xml.namespace.QName("http://192.168.2.191:6888/ormrpc/services/WSWebServiceProvideFacade", "WSWebServiceProvideFacadeSrvProxyService");
+    }
+
+    private java.util.HashSet ports = null;
+
+    public java.util.Iterator getPorts() {
+        if (ports == null) {
+            ports = new java.util.HashSet();
+            ports.add(new javax.xml.namespace.QName("http://192.168.2.191:6888/ormrpc/services/WSWebServiceProvideFacade", "WSWebServiceProvideFacade"));
+        }
+        return ports.iterator();
+    }
+
+    /**
+    * Set the endpoint address for the specified port name.
+    */
+    public void setEndpointAddress(String portName, String address) throws javax.xml.rpc.ServiceException {
+        
+if ("WSWebServiceProvideFacade".equals(portName)) {
+            setWSWebServiceProvideFacadeEndpointAddress(address);
+        }
+        else 
+{ // Unknown Port Name
+            throw new javax.xml.rpc.ServiceException(" Cannot set Endpoint Address for Unknown Port" + portName);
+        }
+    }
+
+    /**
+    * Set the endpoint address for the specified port name.
+    */
+    public void setEndpointAddress(javax.xml.namespace.QName portName, String address) throws javax.xml.rpc.ServiceException {
+        setEndpointAddress(portName.getLocalPart(), address);
+    }
+
+}

File diff suppressed because it is too large
+ 173 - 0
mjava-ruisi/src/main/java/com/malk/ruisi/utils/InterfaceClientUtil.java


+ 69 - 0
mjava-ruisi/src/main/resources/application-dev.yml

@@ -0,0 +1,69 @@
+# 环境配置
+server:
+  port: 9001
+  servlet:
+    context-path: /api/ruisi
+
+# condition
+spel:
+  scheduling: false        # 定时任务是否执行
+  multiSource: false       # 是否多数据源配置
+
+spring:
+  # database
+  datasource:
+    hikari:
+#      connection-init-sql: SET NAMES utf8mb4 COLLATE utf8mb4_unicode_ci           # SqlServer, Oracle 无需设置类型
+    driver-class-name: oracle.jdbc.OracleDriver
+    username: riverdeep0624
+    password: riverdeep0624
+    url: jdbc:oracle:thin:@10.31.52.192:1521:orcldb
+
+
+#    # 主库
+#    primary:
+#      username: root
+#      password: mu123
+#      jdbc-url: jdbc:mysql://127.0.0.1:3306/mjava?serverTimezone=Asia/Shanghai&useUnicode=yes&characterEncoding=UTF-8&useSSL=true
+#    # 从库
+#    slave:
+#      username: root
+#      password: mu123
+#      jdbc-url: jdbc:mysql://127.0.0.1:3306/mjava_slave?serverTimezone=Asia/Shanghai&useUnicode=yes&characterEncoding=UTF-8&useSSL=true
+  jpa:
+    hibernate:
+      ddl-auto: none      # JPA对表没有任何操作
+    show-sql: true
+    database: ORACLE
+    database-platform: org.hibernate.dialect.Oracle12cDialect
+
+# filepath
+file:
+  path:
+    file: /Users/malk/server/_Tool/var/mjava/tmp/file/
+    image: /Users/malk/server/_Tool/var/mjava/tmp/image/
+    tmp: /Users/malk/server/_Tool/var/mjava/tmp/
+  source:
+    fonts: /Users/malk/server/_Tool/fonts/simsun.ttc
+logging:
+  file:
+    path: /Users/malk/server/_Tool/var/mjava/log
+
+# dingtalk 钉钉
+dingtalk:
+  agentId: 3080083197
+  appKey: dingwnds0gg0vpbu44cd
+  appSecret: B7tDWb3hPjP4rksRd_PqOsOVBv6QWY6F9gvn1X2aIoAIMFchRGw69aDeHly-6XXn
+  corpId: dingccd7fff754e440cf24f2f5cc6abecb85
+  aesKey:
+  token:
+  operator: 332051151139376769   # OA管理员账号:鲜明阳 [0开头需要转一下字符串]
+
+# aliwork 宜搭
+aliwork:
+  appType: APP_VCTRP6227CC8368NDOID
+  systemToken: 5H9662C1X8XJLFFCE841M5VBEBQ73DM5IBPULPI3
+
+#定时器
+enable:
+  scheduling: true

+ 69 - 0
mjava-ruisi/src/main/resources/application-prod.yml

@@ -0,0 +1,69 @@
+# 环境配置
+server:
+  port: 7878
+  servlet:
+    context-path: /api/ruisi
+
+# condition
+spel:
+  scheduling: false        # 定时任务是否执行
+  multiSource: false       # 是否多数据源配置
+
+spring:
+  # database
+  datasource:
+    hikari:
+    #      connection-init-sql: SET NAMES utf8mb4 COLLATE utf8mb4_unicode_ci           # SqlServer, Oracle 无需设置类型
+    driver-class-name: oracle.jdbc.OracleDriver
+    username: riverdeep0624
+    password: riverdeep0624
+    url: jdbc:oracle:thin:@10.31.52.192:1521:orcldb
+
+
+  #    # 主库
+  #    primary:
+  #      username: root
+  #      password: mu123
+  #      jdbc-url: jdbc:mysql://127.0.0.1:3306/mjava?serverTimezone=Asia/Shanghai&useUnicode=yes&characterEncoding=UTF-8&useSSL=true
+  #    # 从库
+  #    slave:
+  #      username: root
+  #      password: mu123
+  #      jdbc-url: jdbc:mysql://127.0.0.1:3306/mjava_slave?serverTimezone=Asia/Shanghai&useUnicode=yes&characterEncoding=UTF-8&useSSL=true
+  jpa:
+    hibernate:
+      ddl-auto: none      # JPA对表没有任何操作
+    show-sql: true
+    database: ORACLE
+    database-platform: org.hibernate.dialect.Oracle12cDialect
+
+# filepath
+file:
+  path:
+    file: /Users/malk/server/_Tool/var/mjava/tmp/file/
+    image: /Users/malk/server/_Tool/var/mjava/tmp/image/
+    tmp: /Users/malk/server/_Tool/var/mjava/tmp/
+  source:
+    fonts: /Users/malk/server/_Tool/fonts/simsun.ttc
+logging:
+  file:
+    path: /Users/malk/server/_Tool/var/mjava/log
+
+# dingtalk 钉钉
+dingtalk:
+  agentId: 3080083197
+  appKey: dingwnds0gg0vpbu44cd
+  appSecret: B7tDWb3hPjP4rksRd_PqOsOVBv6QWY6F9gvn1X2aIoAIMFchRGw69aDeHly-6XXn
+  corpId: dingccd7fff754e440cf24f2f5cc6abecb85
+  aesKey:
+  token:
+  operator: 332051151139376769   # OA管理员账号:鲜明阳 [0开头需要转一下字符串]
+
+# aliwork 宜搭
+aliwork:
+  appType: APP_VCTRP6227CC8368NDOID
+  systemToken: 5H9662C1X8XJLFFCE841M5VBEBQ73DM5IBPULPI3
+
+#定时器
+enable:
+  scheduling: true

+ 3 - 0
mjava-ruisi/src/main/resources/application.yml

@@ -0,0 +1,3 @@
+spring:
+  profiles:
+    active: prod

+ 82 - 0
mjava-ruisi/src/test/java/com.malk.tianhe/TbTest.java

@@ -0,0 +1,82 @@
+package com.malk.tianhe;
+
+import cn.hutool.json.JSONArray;
+import cn.hutool.json.JSONObject;
+import com.malk.ruisi.Boot;
+import com.malk.ruisi.service.*;
+import com.malk.ruisi.service.impl.ActivityProjectServiceImpl;
+import com.malk.ruisi.service.impl.BankNameServiceImpl;
+import com.malk.ruisi.utils.InterfaceClientUtil;
+import com.malk.server.aliwork.YDConf;
+import com.malk.server.aliwork.YDParam;
+import com.malk.server.dingtalk.DDConf;
+import com.malk.service.aliwork.YDClient;
+import com.malk.service.dingtalk.DDClient;
+import com.malk.service.teambition.TBClient;
+import lombok.extern.slf4j.Slf4j;
+import org.checkerframework.checker.units.qual.A;
+import org.junit.jupiter.api.Test;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.test.context.SpringBootTest;
+
+import java.sql.*;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+
+@Slf4j
+@SpringBootTest(classes = Boot.class)
+public class TbTest {
+
+
+    @Autowired
+    private BankNameService bankNameService;
+    @Autowired
+    private CostCenterService costCenterService;
+    @Autowired
+    private CostBearerService costBearerService;
+    @Autowired
+    private LegalEntityService legalEntityService;
+    @Autowired
+    private ActivityProjectServiceImpl activityProjectService;
+
+    @Test
+    public void test(){
+
+        /*行号拉取数据*/
+        bankNameService.BankName();
+        /*成本中心拉取数据*/
+        //costCenterService.CostCenter();
+        /*费用承担主体*/
+        //costBearerService.CostBearer();
+        /*法人主体*/
+        //legalEntityService.LegalEntity();
+        /*活动项目*/
+        activityProjectService.Activity();
+
+
+
+//        //1、数据库
+//        List<Map> activityList = new ArrayList<>();
+//        String sql = "SELECT * FROM T_BD_GeneralAsstActType";
+//        String jdbcUrl = "jdbc:oracle:thin:@10.31.52.192:1521:orcldb";
+//        String userName = "riverdeep0624";
+//        String password = "riverdeep0624";
+//
+//
+//        try {
+//            Class.forName("oracle.jdbc.driver.OracleDriver");
+//            Connection conn = DriverManager.getConnection(jdbcUrl, userName, password);
+//            Statement statement = conn.createStatement();
+//            ResultSet resultSet = statement.executeQuery(sql);
+//            System.out.println(resultSet);
+//        } catch (ClassNotFoundException e) {
+//            throw new RuntimeException(e);
+//        } catch (SQLException e) {
+//            throw new RuntimeException(e);
+//        }
+    }
+
+
+}

+ 39 - 0
mjava-ruisi/src/test/resource/server.sh

@@ -0,0 +1,39 @@
+#!/bin/bash
+
+appname='mjava-tianhe'
+
+if [ "$1" == "dev" ]; then
+  java -Xms256m -Xmx256m -jar $appname.jar --spring.profiles.active=dev
+else
+  if [ "$1" == "start" ]; then
+    nohup java -Xms256m -Xmx256m -jar $appname.jar &
+    echo "server prod is starting"
+    tail -f log/info.log
+  else
+    if [ "$1" == "test" ]; then
+      nohup java -Xms256m -Xmx256m -jar $appname.jar --spring.profiles.active=test &
+      echo "server test is starting"
+      tail -f log/info.log
+    else
+      if [ "$1" == "stop" ]; then
+        PID=$(ps -ef | grep $appname.jar | grep -v grep | awk '{ print $2 }')
+        if [ -z "$PID" ]; then
+          echo "server is already stopped"
+        else
+          echo kill $PID
+          kill $PID
+        fi
+      else
+        if [ "$1" == "status" ]; then
+          PID=$(ps -ef | grep $appname.jar | grep -v grep | awk '{ print $2 }')
+          if [ -z "$PID" ]; then
+            echo "server is stopped"
+          else
+            echo "server is running"
+            echo $PID
+          fi
+        fi
+      fi
+    fi
+  fi
+fi

+ 51 - 0
mjava/pom.xml

@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>java-mcli</artifactId>
+        <groupId>com.malk</groupId>
+        <version>1.0-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+    <!-- mjava版本, 不同java-cli项目区分底层依赖, 使用变量有警告 -->
+    <version>0.0.3</version>
+
+    <artifactId>mjava</artifactId>
+    <description>mjava framework</description>
+
+    <properties>
+        <maven.compiler.source>8</maven.compiler.source>
+        <maven.compiler.target>8</maven.compiler.target>
+    </properties>
+
+    <dependencies>
+
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-maven-plugin</artifactId>
+                <version>2.1.1.RELEASE</version>
+                <configuration>
+                    <includeSystemScope>true</includeSystemScope>
+                    <!-- 如果没有该配置,devtools不会生效: 打包时关闭 -->
+                    <fork>false</fork>
+                    <!-- 避免中文乱码 -->
+                    <jvmArguments>-Dfile.encoding=UTF-8</jvmArguments>
+                </configuration>
+                <!-- 允许生成可运行jar: 发布作为基础包提供, 注释 executions 再执行 install 到本地 maven. 若开启即可作为独立 jar 运行 -->
+                <executions>
+                    <execution>
+                        <goals>
+                            <!--                            <goal>repackage</goal>-->
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+        <finalName>${project.artifactId}</finalName>
+    </build>
+</project>

+ 29 - 0
mjava/src/main/java/com/malk/Boot.java

@@ -0,0 +1,29 @@
+package com.malk;
+
+import com.querydsl.jpa.impl.JPAQueryFactory;
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.context.annotation.Bean;
+import org.springframework.data.jpa.repository.config.EnableJpaAuditing;
+
+import javax.persistence.EntityManager;
+
+@EnableJpaAuditing
+@SpringBootApplication
+public class Boot {
+
+    public static void main(String... args) {
+        SpringApplication.run(Boot.class, args);
+    }
+
+    /**
+     * 让Spring管理JPAQueryFactory [多数据源配置详见DataSourceConfig]
+     *
+     * @Qualifier("entityManagerFactory") 单数据源指向
+     * @Qualifier("entityManagerFactoryPrimary") 多数据源指向
+     */
+    @Bean
+    public JPAQueryFactory jpaQueryFactory(EntityManager entityManager) {
+        return new JPAQueryFactory(entityManager);
+    }
+}

+ 29 - 0
mjava/src/main/java/com/malk/base/BaseDao.java

@@ -0,0 +1,29 @@
+package com.malk.base;
+
+
+import org.springframework.data.jpa.repository.JpaRepository;
+
+/**
+ * @EntityListeners 且需要在启动类添加 @EnableJpaAuditing 注解, 即可在字段上添加 @CreatedDate & @LastModifiedDate 实现 [Date 类型数据 - 自动插入创建 & 更新时间]
+ * -
+ * 项目绑定数据库后,进行分配。即可消除@Table、 在 idea 下不能匹配到信息的报错提示
+ * @Table指定表【下划线和小驼峰都可】, 若使用驼峰则依然会有报错提示. 若类名从驼峰转为下划线和表名相同则可不需要注解
+ * -
+ * 自定义查询
+ * @Query 当设置nativeQuery=true即可以使用原生SQL进行查询, 默认为false, 使用JPQL语法 [JPQL不支持insert语法, 注意: nativeQuery查询使用表名, 不能使用对象名]
+ * - 索引参数: 索引值从1开始,查询中"?X"个数需要与方法定义的参数个数相一致,并且顺序也要一致
+ * - 命名参数: 可以定义好参数名,赋值时使用@Param("参数名"), 而不用管顺序. 对入参使用 @Param("email") 修饰, @Query内使用 :email 进行取值
+ * - 关于返回值: update 语法, 返回值为 void. select 语法, 返回单个可用集合接收; 若返回多个用对象接收就会异常
+ * @Modifying注解 编写JPQL实现DELETE和UPDATE操作的时候必须加上@modifying注解,以通知Spring Data 这是一个DELETE或UPDATE操作
+ * -
+ * 事务管理 @Transactional注解,可以修饰类或方法
+ * - 配置 jpa.database-platform: org.hibernate.dialect.MySQL57Dialect, JPA建表的默认引擎修改为:InNoDB
+ * - 在启动类添加 @EnableTransactionManagement 注解, 开启事务支持后,然后在访问数据库的Service方法上添加注解 @Transactional 即可 [Service指dao, 或调用dao的地方]
+ * -
+ * 动态匹配, 注解于类
+ * @DynamicInsert : 默认true,指定用于INSERT的 SQL 将会在运行时动态生成,并且只包含那些非空值字段。(如果是)
+ * @DynamicUpdate : 默认true, 指定用于UPDATE 的SQL将会在运行时动态生成,并且只更新那些改变过的字段
+ */
+public interface BaseDao extends JpaRepository<BasePo, Long> {
+
+}

+ 112 - 0
mjava/src/main/java/com/malk/base/BaseDto.java

@@ -0,0 +1,112 @@
+package com.malk.base;
+
+import cn.hutool.core.util.ObjectUtil;
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.serializer.SerializerFeature;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+import lombok.SneakyThrows;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.BeanWrapper;
+import org.springframework.beans.BeanWrapperImpl;
+
+import java.beans.PropertyDescriptor;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+
+/**
+ * 基础对象
+ *
+ * @JsonInclude(JsonInclude.Include.NON_NULL):类注解过滤null字段,包含入参和返回值【参数类搭配 @Data,才可以实例化返回值以及ToString输出】
+ * -
+ * lombok
+ * @Data : 注在类上,提供类的get、set、equals、hashCode、canEqual、toString方法
+ * @AllArgsConstructor : 注在类上,提供类的全参构造
+ * @NoArgsConstructor : 注在类上,提供类的无参构造
+ * @Setter : 注在属性上,提供 set 方法
+ * @Getter : 注在属性上,提供 getDefault 方法
+ * @EqualsAndHashCode : 注在类上,提供对应的 equals 和 hashCode 方法
+ * @Log4j/@Slf4j : 注在类上,提供对应的 Logger 对象,变量名为 log
+ * @Builder:为类生成相对略微复杂的构建器API。来初始化实例对象::类名.属性(值).属性(值).build()
+ * @Singular:在使用@Singular注释注释一个集合字段(使用@Builder注释类),lombok会将该构建器节点视为一个集合,并生成两个adder方法而不是setter方法::点一次集合增加一个元素
+ * @Builder.Default:在类中id和insertTime上都添加注解@Builder.Default,当在使用这个实体对象时,就不需要在为这两个字段进行初始化值
+ */
+@Data
+@NoArgsConstructor
+@JsonInclude(JsonInclude.Include.NON_NULL)
+public abstract class BaseDto {
+
+    /**
+     * 对象拷贝: 若是复制一个对象, 建议使用 cloneParam 避免性能问题
+     */
+    @Deprecated
+    @SneakyThrows
+    public BaseDto copyParam() {
+        BaseDto dto = this.getClass().newInstance();
+        BeanUtils.copyProperties(this, dto);
+        return dto;
+    }
+
+    /**
+     * * todo: 4.11 继承Serializable后执行深拷贝, 不能类型转换, 不继承Serializable则返回
+     * 对象拷贝: 复制一个新的对象, 避免条件被修改, 尤其并发下分页混乱情况
+     */
+    public BaseDto cloneParam() {
+        return ObjectUtil.clone(this);
+    }
+
+    /**
+     * 对象属性合并: jda之save接口会以传入数据为准,若传入为空或不传入,更新会置空。目前解决办法两种,通过注解实现JPQL/SQL,或者查询出数据,将未传入字段属性拷贝后再更新【性能消耗】
+     */
+    public void mergeParam(BaseDto modifyDo) {
+        BeanUtils.copyProperties(this, modifyDo, getNotNullPropertyNames(modifyDo));
+    }
+
+    // 忽略有值的字段
+    private static String[] getNotNullPropertyNames(Object target) {
+        final BeanWrapper src = new BeanWrapperImpl(target);
+        PropertyDescriptor[] pds = src.getPropertyDescriptors();
+        Set<String> emptyNames = new HashSet();
+        for (PropertyDescriptor pd : pds) {
+            Object srcValue = src.getPropertyValue(pd.getName());
+            if (srcValue != null) {
+                // 此处判断可根据需求修改, 目前过滤不为null
+                emptyNames.add(pd.getName());
+            }
+        }
+        String[] result = new String[emptyNames.size()];
+        return emptyNames.toArray(result);
+    }
+
+    /**
+     * 传入映射的Map, 将实体属性和Map的key转换, 返回Map
+     */
+    public Map convertEntity(Map<String, String> reflect) {
+        Map map = JSON.parseObject(JSON.toJSONString(this, SerializerFeature.WriteNullStringAsEmpty), Map.class);
+        Map<String, String> formData = new HashMap();
+        for (String key : reflect.keySet()) {
+            String content = String.valueOf(map.get(key));
+            // json序列化已经将空字符串过滤, 若转换还有null字符串, 可能是key为null或SerializerFeature未指定到类型, 如Date
+            if (StringUtils.isNotBlank(content) && !content.equals("null")) formData.put(reflect.get(key), content);
+        }
+        return formData;
+    }
+
+
+    /**
+     * Map时间格式化, 直接从数据库取值后Map会有市区差, 方法1见BasePo, @Temporal & @JsonFormat 注解
+     * -
+     * [单独时间格式化 [废弃]]
+     * * JSON.parseArray(JSON.toJSONString(data), Map.class).stream().map(item -> {
+     * *     item.put("tStoreInTime", UtilDateTime.formatDateTime(new Date(UtilMap.getLong(item, "tStoreInTime"))));
+     * *     return item;
+     * * });
+     */
+    public static final Object jsonFormatDateTime(Object data) {
+        return JSON.parse(JSON.toJSONString(data, SerializerFeature.WriteNullStringAsEmpty, SerializerFeature.DisableCircularReferenceDetect, SerializerFeature.WriteDateUseDateFormat));
+    }
+}

+ 64 - 0
mjava/src/main/java/com/malk/base/BasePo.java

@@ -0,0 +1,64 @@
+package com.malk.base;
+
+import cn.hutool.core.util.ObjectUtil;
+import com.alibaba.excel.annotation.ExcelIgnore;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+import org.springframework.data.annotation.CreatedDate;
+import org.springframework.data.annotation.LastModifiedDate;
+import org.springframework.data.jpa.domain.support.AuditingEntityListener;
+
+import javax.persistence.*;
+import java.util.Date;
+
+/**
+ * 实体基类
+ *
+ * @MappedSuperclass 作为公共属性场景. 类注解, 标注后该类将不是一个完整的实体类,也不会映射到数据库表,但其的属性都将映射到其子类的数据库字段中
+ * @Cloumn java为小驼峰命名,数据库为下划线命名,若有差异,通过name指定表字段. 若相同则可不用指定name [直接设置字段值即可,无效额外注解]
+ * -
+ * 功能使用自带
+ * -
+ * @JsonFormat(pattern = "yyyy-MM-dd HH:smm:ss", timezone = "GMT+8"),数据库 Date 类型序列化后转到前台的指定格式【jackjson】
+ * @DateTimeFormat @DateTimeFormat(pattern = "yyyy-MM-dd"),使用和@jsonFormat差不多,前台传入的按照指定格式自动转为Date储存
+ * @JsonIgnoreProperties 类注解,作用是json序列化时将bean中的一些属性忽略掉,序列化和反序列化都受影响。支持多个属性 [也用于双向绑定解决循环序列化]
+ * @JsonIgnore 此注解用于属性或者方法上(最好是属性上),作用和上面的@JsonIgnoreProperties一样,屏蔽该字段在序列化和数据发挥会自动忽略
+ * @JsonGetter 用于序列化, 还可指定返回属性名,@JsonSetter 用于反序列化。注意@JsonGetter比@JsonProperty的优先级高,同时存在属性忽略会失效
+ * @Transient ORM框架将忽略该属性,不入库。如果一个属性并非数据库表的字段映射,就务必将其标示为@Transient,否则ORM框架默认其注解为@Basic
+ * @Temporal & @JsonFormat: fixme: 指定时区, new Date 会默认当前系统时区, 不添加 json 时区注解, 会出现序列化后的对象时间不是 GMT 时区 [方法2见BaseDto, jsonFormatDateTime]
+ */
+@MappedSuperclass
+@Data
+@NoArgsConstructor
+@EntityListeners(AuditingEntityListener.class)
+public abstract class BasePo extends BaseDto {
+
+    // 若是实体若不直接在 com.malk 下, 可声明继承id, 避免编辑器提示 [不加也不影响编译以及运行] [ppExt: 现有表如u8, 不继承 BaseDto, 避免默认id与时间字段匹配异常]
+    @ExcelIgnore
+    @Id
+    @JsonIgnore
+    @GeneratedValue(strategy = GenerationType.IDENTITY)
+    public Long id;
+
+    @ExcelIgnore
+    @CreatedDate
+    @Temporal(TemporalType.TIMESTAMP)
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    private Date createTime;
+
+    @ExcelIgnore
+    @LastModifiedDate
+    @Temporal(TemporalType.TIMESTAMP)
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    private Date updateTime;
+
+    public void upsert(BasePo po_old) {
+
+        if (ObjectUtil.isNotNull(po_old)) {
+            this.id = po_old.id;
+            this.setCreateTime(po_old.getCreateTime());
+        }
+    }
+}

+ 9 - 0
mjava/src/main/java/com/malk/base/BaseRepository.java

@@ -0,0 +1,9 @@
+package com.malk.base;
+
+import org.springframework.data.jpa.repository.JpaRepository;
+import org.springframework.data.querydsl.QuerydslPredicateExecutor;
+
+public interface BaseRepository extends JpaRepository<BasePo, Long>, QuerydslPredicateExecutor<BasePo> {
+
+}
+

+ 78 - 0
mjava/src/main/java/com/malk/base/JpaMap.java

@@ -0,0 +1,78 @@
+package com.malk.base;
+
+
+import cn.hutool.core.util.ObjectUtil;
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.serializer.SerializerFeature;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.data.jpa.domain.Specification;
+
+import javax.persistence.Entity;
+import javax.persistence.Id;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 查询map [不指定表名]
+ * 通过Map实现, 无需定义实体, 主键设置Long即可: public interface HSViewDao extends CrudRepository<JpaMap, Long>
+ * -
+ * 使用native查询,返回Map. 直接查询表名 + 列名 + 条件, 可不做实体映射场景
+ * 时间的时区处理: 方法1见BasePo, @Temporal & @JsonFormat 注解; 方法2见BaseDto, jsonFormatDateTime
+ * 空条件jpa实现, 查询全部数据, 通过 like LTRIM('%' + ?x + '%') 进行实现 [dsl适用于复杂场景, Specification谓词需要依赖于实体]
+ * -
+ * 多条件查询
+ * 1. sql + if [SqlServer不支持if条件]
+ * * @Query(value = "select * from vwpbCommonDataOrderPlan where if (?1 is not null, dPlanDate >= ?1, 1=1) and if (?2 is not null, dPlanDate <= ?2, 1=1) and sOrderNo like LTRIM('%' + ?3 + '%')", nativeQuery = true)
+ * * Page<Map> queryOrderPlan(Date start, Date end, String sOrderNo, Pageable pageable);
+ * 2. Specification, 谓词需要依赖于实体 [参考示例, 如下 test 方法实现]
+ * - 说明
+ * 1. @Query: nativeQuery查询使用表名, 不能使用对象名
+ * 2. ppExt: 现有表如u8, 不继承 BaseDto, 避免默认id与时间字段匹配异常
+ */
+
+@Entity
+public class JpaMap {
+
+    @Id
+    private String id;
+
+    /**
+     * 时间的时区处理
+     */
+    public static final List<Map> jsonFormatDateTime(List<Map> data) {
+        return JSON.parseArray(JSON.toJSONString(data, SerializerFeature.WriteNullStringAsEmpty, SerializerFeature.DisableCircularReferenceDetect, SerializerFeature.WriteDateUseDateFormat), Map.class);
+    }
+
+    // 示例: Specification, 谓词需要依赖于实体
+    private void test() {
+        //Page<Map> findAll (Specification < T > spec, Pageable pageable);
+
+        String sOrderNo = "";
+        Date sTime = null;
+        Date eTime = null;
+
+        Specification spec = (root, criteriaQuery, criteriaBuilder) -> {
+            List<javax.persistence.criteria.Predicate> predicates = new ArrayList<>();
+            if (StringUtils.isNotBlank(sOrderNo)) {
+                javax.persistence.criteria.Predicate predicate = criteriaBuilder.like(root.get("sOrderNo"), "%" + sOrderNo + "%");
+                predicates.add(predicate);
+            }
+
+            if (ObjectUtil.isNotNull(sTime)) {
+//            javax.persistence.criteria.Predicate predicate = criteriaBuilder.greaterThanOrEqualTo(root.getDefault("dPlanDate").as(String.class), "2023-06-03 00:00:00");
+                javax.persistence.criteria.Predicate predicate = criteriaBuilder.greaterThanOrEqualTo(root.get("dPlanDate"), sTime);
+                predicates.add(predicate);
+            }
+
+            if (ObjectUtil.isNotNull(eTime)) {
+                javax.persistence.criteria.Predicate predicate = criteriaBuilder.lessThanOrEqualTo(root.get("dPlanDate"), eTime);
+                predicates.add(predicate);
+            }
+            return criteriaBuilder.and(predicates.toArray(new javax.persistence.criteria.Predicate[predicates.size()]));
+            /// 或
+            ///return criteriaQuery.where(predicates.toArray(new javax.persistence.criteria.Predicate[predicates.size()])).getRestriction();
+        };
+    }
+}

+ 35 - 0
mjava/src/main/java/com/malk/config/JpaConfiguration.java

@@ -0,0 +1,35 @@
+package com.malk.config;
+
+import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
+import org.springframework.boot.autoconfigure.domain.EntityScan;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor;
+import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
+
+/**
+ * JPA [错误抛出与拦截详见CatchException, 多数据源配置参考DataSourceConfig]
+ * -
+ * 1. 关键字语法: save find, exists, count [单表操作 - 若数据库列和对象属性字段一致, 直接使用 jpa 自带查询匹配不到启动报错]
+ * 2. 自定义查询: @Query, 通过 nativeQuery 区分 jpql 和 sql 语法 [简单查询]
+ * 3. 表关联关系: @OneToMany, @ManyToOne, @ManyToMany, @OneToOne [耦合关联]
+ * 4. Specification: Predicate 与 CriteriaBuilder 组合 [谓词, 需要依赖于实体]
+ * 5. QueryDSL: 基于ORM框架以及SQL之上的一个通用的查询框架, 分页, 关联查询原生支持 [查询框架] (通过查询关联, 而不是如 @OneToMany 等建立表关联)
+ * 6. DSL: 项目在 compile 会执行 apt-maven-plugin 插件, 将 @Entity 注解类, 添加 Q 前缀, 存放到 target 下 generated-source 目录
+ * 7. 配置: 扫描基础路径, 涉及子项目也能注册到, 避免启动报错. 子项目 Boot 配置 @SpringBootApplication(scanBasePackages = {"com.mcli"})
+ * 8. 查询: 使用native,查询列不匹配实体属性,会报错The column name xxx is not valid,返回Map可解决 (Map是Jpa的TupleBackedMap, 通过try取值)
+ * 9. 单数据源切换: 在dao与entity均添加mutual作为公共模块, 单数据源下服务于JpaConfiguration, 若是多数据源与PrimaryConfig一起作为主数据源配置
+ * 10 主子项目, 在单数据源情况下, 扫描全部. [需要注意的是, 在多数据源下同名dao是可以通过指定数据源使用, 此时若开启单数据源启动报错, 会扫描全部]
+ */
+@ConditionalOnProperty(name = "spel.multiSource", havingValue = "false")
+@Configuration
+// 单数据源, 扫描子项目与主项目primary [子项目可以访问到主项目primary]
+@EnableJpaRepositories(basePackages = {"com.malk.*.repository.dao", "com.malk.repository.dao.primary"})
+@EntityScan(basePackages = {"com.malk.*.repository.entity", "com.malk.repository.entity.primary"})
+public class JpaConfiguration {
+
+    @Bean
+    PersistenceExceptionTranslationPostProcessor persistenceExceptionTranslationPostProcessor() {
+        return new PersistenceExceptionTranslationPostProcessor();
+    }
+}

+ 58 - 0
mjava/src/main/java/com/malk/config/WebConfiguration.java

@@ -0,0 +1,58 @@
+package com.malk.config;
+
+import com.malk.filter.RequestInterceptor;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.web.servlet.config.annotation.CorsRegistry;
+import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
+import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
+import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
+
+@Configuration
+public class WebConfiguration implements WebMvcConfigurer {
+
+    // 指定类输出日志到指定文件夹
+    private static final Logger logger = LoggerFactory.getLogger("point");
+
+    // 请求拦截
+    @Override
+    public void addInterceptors(InterceptorRegistry registry) {
+        logger.info("拦截器 ▷ 初始化");
+        registry.addInterceptor(new RequestInterceptor())
+                .addPathPatterns("/**")
+                // ppExt: 若无需对外访问, 不用添加路径. static/public 为默认
+                .excludePathPatterns("/assets/**", "/templates/**");
+    }
+
+    // 跨域支持: 端口不匹配也会报跨域, 若是单个控制器开放, 可使用 @CrossOrigin 注解
+    @Override
+    public void addCorsMappings(CorsRegistry registry) {
+        logger.info("拦截器 ▷ 开启CORS");
+        registry.addMapping("/**")  // 添加映射路径
+                .allowedOrigins("*")  // 放行哪些原始
+                .allowCredentials(true)  // 是否发送Cookie信息
+                .allowedMethods("GET", "POST", "PUT", "DELETE", "PATCH")  // 放行哪些原始域(请求方式)
+                .allowedHeaders("*")  // 放行哪些原始域(头部信息)
+                .allowCredentials(true);  // 放行证书
+    }
+
+    /**
+     * 静态资源映射
+     * -
+     * 默认的静态资源路径为: classpath:/META-INF/resources/, classpath:/resources/,classpath:/static/, classpath:/public [默认路径不会进拦截器]
+     * 读取的是target内容, 访问路径 assets: http://localhost:9001/api/assets/logo/logo-text.png [自定义拦截器添加路径排除: excludePathPatterns]
+     * web网页路径: http://localhost:9011/api/项目路径/web2/index.html#/模块名称/home [前后端模块化, 不配置Nginx从Tomcat透出vue页面]
+     * 当在SpringBoot项目内添加网页资源时,在windows服务器,需要C:\Windows\System32下添加tomcat-native-1.2.14-win32-bin.zip内x64下两个文件, 重启项目
+     * -
+     * ppExt: ClassPathResource, 需要打包/编译后才能访问到. 识别不是架包内内容 [static 可自动过滤, 自动识别子文件夹作为 path]
+     * [两个示例]: mjs http://localhost:9001/api/项目路径/mjs/mjs.min.js / http://localhost:9001/api/项目路径/json/personnel.json
+     */
+    @Override
+    public void addResourceHandlers(ResourceHandlerRegistry registry) {
+        registry.addResourceHandler("/static/**").addResourceLocations("classpath:/static/");
+        registry.addResourceHandler("/web2/**").addResourceLocations("classpath:/static/web2/");
+        registry.addResourceHandler("/assets/**").addResourceLocations("classpath:/assets/");
+        registry.addResourceHandler("/templates/**").addResourceLocations("classpath:/templates/");
+    }
+}

+ 41 - 0
mjava/src/main/java/com/malk/config/mutilSource/DataSourceConfig.java

@@ -0,0 +1,41 @@
+package com.malk.config.mutilSource;
+
+import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
+import org.springframework.boot.context.properties.ConfigurationProperties;
+import org.springframework.boot.jdbc.DataSourceBuilder;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.Primary;
+
+import javax.sql.DataSource;
+
+/**
+ * 数据源配置
+ * -
+ * AOP多数据源切换:
+ * - 1. pom文件添加spring-boot-starter-jdbc依赖
+ * - 2. yml配置多主从数据库, 数据库地址从url修改为jdbc-url
+ * - 3. 通过spel.multiSource控制是否多数据源, 屏蔽JpaConfiguration, 加载DataSourceConfig
+ * 不同数据源存在同名表:
+ * - 1. 实体只需要在dao层区分即可, 作用域下实体包路径是不同的
+ * - 2. 同名的dao通过@Repository("slaveMcTableDao")定义区分; 在Autowired引用时候属性上添加@Qualifier("slaveMcTableDao")注解
+ * -
+ * 单数据源切换: 在dao与entity均添加mutual作为公共模块, 单数据源下服务于JpaConfiguration, 若是多数据源与PrimaryConfig一起作为主数据源配置
+ */
+@ConditionalOnProperty(name = "spel.multiSource", havingValue = "true")
+@Configuration
+public class DataSourceConfig {
+
+    @Bean(name = "primaryDataSource")
+    @ConfigurationProperties(prefix = "spring.datasource.primary")
+    @Primary
+    public DataSource primaryDataSource() {
+        return DataSourceBuilder.create().build();
+    }
+
+    @Bean(name = "slaveDataSource")
+    @ConfigurationProperties(prefix = "spring.datasource.slave")
+    public DataSource slaveDataSource() {
+        return DataSourceBuilder.create().build();
+    }
+}

+ 80 - 0
mjava/src/main/java/com/malk/config/mutilSource/PrimaryConfig.java

@@ -0,0 +1,80 @@
+package com.malk.config.mutilSource;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Qualifier;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
+import org.springframework.boot.autoconfigure.orm.jpa.HibernateProperties;
+import org.springframework.boot.autoconfigure.orm.jpa.HibernateSettings;
+import org.springframework.boot.autoconfigure.orm.jpa.JpaProperties;
+import org.springframework.boot.orm.jpa.EntityManagerFactoryBuilder;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.Primary;
+import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
+import org.springframework.orm.jpa.JpaTransactionManager;
+import org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean;
+import org.springframework.transaction.PlatformTransactionManager;
+import org.springframework.transaction.annotation.EnableTransactionManagement;
+
+import javax.persistence.EntityManager;
+import javax.sql.DataSource;
+import java.util.Map;
+import java.util.Objects;
+
+/**
+ * 主数据源配置,多数据源必须设置一个主数据源, 通过 @Primary 注解 [包含公共部分]
+ * -
+ * 主子项目, 在多数据源情况下, 子项目需要匹配主项目目录结构, 且符合命名规范. 配置对应扫描 EnableJpaRepositories / EntityScan 添加子项目路径
+ */
+@ConditionalOnProperty(name = "spel.multiSource", havingValue = "true")
+@Configuration
+@EnableTransactionManagement
+@EnableJpaRepositories(
+        entityManagerFactoryRef = "entityManagerFactoryPrimary", // 配置连接工厂 entityManagerFactory
+        transactionManagerRef = "transactionManagerPrimary", // 配置事物管理器  transactionManager
+        basePackages = {"com.malk.repository.dao.primary", "com.malk.*.repository.dao.primary", "com.malk.base"}  // dao层配置主数据 & 公共所在目录 [子项目可以访问到主项目primary]
+)
+public class PrimaryConfig {
+
+    @Autowired
+    @Qualifier("primaryDataSource")  // 指定这是主数据源,为了和从(其他)数据源区别开,因为@Autowired不能导入名称相同的是bean
+    private DataSource dataSourcePrimary;
+
+    @Autowired
+    private JpaProperties jpaProperties;
+
+    @Autowired
+    private HibernateProperties hibernateProperties;
+
+    @Primary
+    @Bean("entityManagerPrimary")
+    public EntityManager entityManager(EntityManagerFactoryBuilder builder) {
+        return Objects.requireNonNull(entityManagerFactoryBean(builder).getObject()).createEntityManager();
+    }
+
+    @Primary
+    @Bean("entityManagerFactoryPrimary")
+    public LocalContainerEntityManagerFactoryBean entityManagerFactoryBean(EntityManagerFactoryBuilder builder) {
+        return builder.dataSource(dataSourcePrimary)
+                .properties(getVendorProperties())
+                // 设置实体类所在目录: 包含主数据源与公共 [子项目可以访问到主项目primary]
+                .packages("com.malk.repository.entity.primary", "com.malk.*.repository.entity.primary", "com.zhuogao.base")
+                // 持久化单元名称,当存在多个EntityManagerFactory时,需要制定此名称
+                .persistenceUnit("primaryPersistenceUnit")
+                .build();
+    }
+
+    private Map<String, Object> getVendorProperties() {
+        return hibernateProperties.determineHibernateProperties(
+                jpaProperties.getProperties(),
+                new HibernateSettings()
+        );
+    }
+
+    @Primary
+    @Bean("transactionManagerPrimary")
+    public PlatformTransactionManager transactionManager(EntityManagerFactoryBuilder builder) {
+        return new JpaTransactionManager(Objects.requireNonNull(entityManagerFactoryBean(builder).getObject()));
+    }
+}
+

+ 76 - 0
mjava/src/main/java/com/malk/config/mutilSource/SlaveConfig.java

@@ -0,0 +1,76 @@
+package com.malk.config.mutilSource;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Qualifier;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
+import org.springframework.boot.autoconfigure.orm.jpa.HibernateProperties;
+import org.springframework.boot.autoconfigure.orm.jpa.HibernateSettings;
+import org.springframework.boot.autoconfigure.orm.jpa.JpaProperties;
+import org.springframework.boot.orm.jpa.EntityManagerFactoryBuilder;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
+import org.springframework.orm.jpa.JpaTransactionManager;
+import org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean;
+import org.springframework.transaction.PlatformTransactionManager;
+import org.springframework.transaction.annotation.EnableTransactionManagement;
+
+import javax.persistence.EntityManager;
+import javax.sql.DataSource;
+import java.util.Map;
+import java.util.Objects;
+
+/**
+ * 从数据源配置
+ * -
+ * 主子项目, 在多数据源情况下, 子项目需要匹配主项目目录结构, 且符合命名规范. 配置对应扫描 EnableJpaRepositories / EntityScan 添加子项目路径
+ */
+@ConditionalOnProperty(name = "spel.multiSource", havingValue = "true")
+@Configuration
+@EnableTransactionManagement
+@EnableJpaRepositories(
+        entityManagerFactoryRef = "entityManagerFactorySlave",
+        transactionManagerRef = "transactionManagerSlave",
+        basePackages = {"com.malk.repository.dao.slave", "com.malk.*.repository.dao.slave"} // slave无公共类, 需单独添加 [子项目可以访问到主项目primary]
+)
+public class SlaveConfig {
+
+    @Autowired
+    @Qualifier("slaveDataSource")
+    private DataSource dataSourceSlave;
+
+    @Autowired
+    private JpaProperties jpaProperties;
+
+    @Autowired
+    private HibernateProperties hibernateProperties;
+
+    @Bean("entityManagerSlave")
+    public EntityManager entityManager(EntityManagerFactoryBuilder builder) {
+        return Objects.requireNonNull(localContainerEntityManagerFactoryBean(builder).getObject()).createEntityManager();
+    }
+
+    @Bean("entityManagerFactorySlave")
+    public LocalContainerEntityManagerFactoryBean localContainerEntityManagerFactoryBean(EntityManagerFactoryBuilder builder) {
+        return builder.dataSource(dataSourceSlave)
+                .properties(getVendorProperties())
+                // 设置实体类所在目录 [slave无公共类, 需单独添加, 如 JpaMapSlave]
+                .packages("com.malk.repository.entity.slave", "com.malk.*.repository.entity.slave")
+                // 持久化单元名称,当存在多个EntityManagerFactory时,需要制定此名称
+                .persistenceUnit("slavePersistenceUnit")
+                .build();
+    }
+
+    private Map<String, Object> getVendorProperties() {
+        return hibernateProperties.determineHibernateProperties(
+                jpaProperties.getProperties(),
+                new HibernateSettings()
+        );
+    }
+
+    @Bean("transactionManagerSlave")
+    public PlatformTransactionManager transactionManager(EntityManagerFactoryBuilder builder) {
+        return new JpaTransactionManager(Objects.requireNonNull(localContainerEntityManagerFactoryBean(builder).getObject()));
+    }
+}
+

+ 73 - 0
mjava/src/main/java/com/malk/controller/DDCallbackController.java

@@ -0,0 +1,73 @@
+package com.malk.controller;
+
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONObject;
+import com.malk.server.common.McR;
+import com.malk.server.dingtalk.DDConf;
+import com.malk.server.dingtalk.crypto.DingCallbackCrypto;
+import com.malk.service.dingtalk.DDClient_Event;
+import lombok.SneakyThrows;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.Arrays;
+import java.util.Map;
+
+/**
+ * 钉钉事件回调 3_1
+ * -
+ * [子项目直接继承即可有调用, 无需实现]
+ * -
+ * 注解 @RequestMapping 路径不能重复 [主子项目属同一个项目];
+ * 获取项目回调请求地址, https://mc.cloudpure.cn/frp/mc/dd/callback [调试代理: frp + nginx]
+ */
+@Slf4j
+@RestController
+@RequestMapping("/mc/dd")
+public class DDCallbackController {
+
+    @Autowired
+    private DDConf ddConf;
+
+    @Autowired
+    private DDClient_Event ddClient_event;
+
+    /**
+     * 钉钉审批回调: [依赖包方案已弃用]
+     * -
+     * DingCallbackCrypto 方案: 官网案例 DingCallbackCrypto 不在钉钉架包, 需要单独引用
+     * 在钉钉开放平台重新保存回调地址后, 所有的注册事件会被关闭:: 通过代码注册不成功; 官方回复, 要么使用调用注册的方式 要么是后台的方式, 二选一
+     */
+    @SneakyThrows
+    @RequestMapping(value = "/callback", method = RequestMethod.POST)
+    public Map<String, String> invokeCallback(@RequestParam(value = "signature", required = false) String signature,
+                                              @RequestParam(value = "timestamp", required = false) String timestamp,
+                                              @RequestParam(value = "nonce", required = false) String nonce,
+                                              @RequestBody(required = false) JSONObject json) {
+
+        DingCallbackCrypto callbackCrypto = new DingCallbackCrypto(ddConf.getToken(), ddConf.getAesKey(), ddConf.getAppKey());
+        final String decryptMsg = callbackCrypto.getDecryptMsg(signature, timestamp, nonce, json.getString("encrypt"));
+        JSONObject eventJson = JSON.parseObject(decryptMsg);
+        Map success = callbackCrypto.getEncryptedMap(DDConf.CALLBACK_RESPONSE, System.currentTimeMillis(), DingCallbackCrypto.Utils.getRandomStr(8));
+        String eventType = eventJson.getString("EventType");
+        if (DDConf.CALLBACK_CHECK.equals(eventType)) {
+            log.info("----- [DD]验证注册 -----");
+            return success;
+        }
+        // [回调任务执行逻辑: 异步] 钉钉超时3s未返回会被记录为失败, 可通过失败接口获取记录
+        if (Arrays.asList(DDConf.BPMS_INSTANCE_CHANGE, DDConf.BPMS_TASK_CHANGE).contains(eventType)) {
+            log.info("[DD]审批回调, {}", eventJson);
+            ddClient_event.callBackEvent_Workflow(eventJson);
+            return success;
+        }
+        log.info("----- [DD]已注册, 未处理的其它回调 -----, {}", eventJson);
+        return success;
+    }
+
+    @PostMapping("robot")
+    McR robot(@RequestBody Map data) {
+        log.info("xxx, {}", data);
+        return McR.success();
+    }
+}

+ 61 - 0
mjava/src/main/java/com/malk/controller/TBCallBackController.java

@@ -0,0 +1,61 @@
+package com.malk.controller;
+
+import com.alibaba.fastjson.JSONObject;
+import com.malk.delegate.TBEvent;
+import com.malk.server.teambition.TBConf;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * TB事件回调 3_1
+ * 1. 回调可选择加密与不加密方式, tb发送成功为上游, 注册服务为下游
+ * 2. 绑定回调需要安装后才会生效, 且回调范围更新后需要重新安装才会生效 [另外接口调用修改配置需要重新发布后生效]
+ */
+@Slf4j
+@RestController
+@RequestMapping("/mc/tb")
+public class TBCallBackController {
+
+    @Autowired
+    private TBEvent tbEvent;
+
+    /**
+     * * 回调说明 [ppExt: 字段更新回调, 判定字段ID, 避免循坏触发问题, 接口修改也会触发webhook]
+     * * 1. 通过接口更操作的数据,也会与手动创建一样触发相同的回调, 除了项目更新接口调用实测不会触发回调, 手动修改正常回调
+     * * 2. 项目创建会推送两次
+     * * - 1. 在第二次推送多 { data: { project: { operatorId, url }} } 这两个字段内容
+     * * - 2. 若是通过模板创建的项目,在两次项目更新回调中会回调一次 project.enable 回调, 其中任务只会回调创建, 不会回调更新
+     * * 3. 任务创建, 会先回调创建事件, 接着立即回调任务更新事件 [若是通过模板创建, 任务只会回调创建, 不会回调更新]
+     * * 4. 项目移入回收站,不会触发回调,删除后会触发项目与任务的 remove 事件; 若是将任务移入回收站, 会触发任务更新回调
+     */
+    @PostMapping("callback")
+    public String callback(@RequestBody JSONObject eventJson) {
+
+        String success = "success";
+        String eventName = eventJson.getString("event");
+
+        if (TBConf.EVENT_VERIFY_HOOK.equals(eventName)) {
+            log.info("----- [TB]验证注册 -----");
+            return success;
+        }
+
+        if (eventName.contains("task")) {
+            log.info("[TB]任务回调, {}, {}", eventName, eventJson);
+            tbEvent.callBackTask(eventJson);
+            return success;
+        }
+
+        if (eventName.contains("project")) {
+            log.info("[TB]项目回调, {}, {}", eventName, eventJson);
+            tbEvent.callBackProject(eventJson);
+            return success;
+        }
+
+        log.info("----- [TB]已注册, 未处理的其它回调 -----, {}, {}", eventName, eventJson);
+        return success;
+    }
+}

+ 101 - 0
mjava/src/main/java/com/malk/core/AsyncConfig.java

@@ -0,0 +1,101 @@
+package com.malk.core;
+
+//import com.mcli.filter.ExceptionNotice;
+
+import lombok.extern.slf4j.Slf4j;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.aop.interceptor.AsyncUncaughtExceptionHandler;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.scheduling.annotation.AsyncConfigurer;
+import org.springframework.scheduling.annotation.EnableAsync;
+import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
+
+import java.util.concurrent.Executor;
+import java.util.concurrent.ThreadPoolExecutor;
+
+/**
+ * 线程池配置 [函数式编程:详见YDClient/YDService使用说明]
+ * -
+ * 前提: 1. 必须仅适用于 public 实例方法; 2.在同一个类中调用异步方法将无法正常工作(self-invocation); 3. 访问对象必须通过 @Autowired 进行注入, 否则无效
+ * 返回: 1. 一般为 void, 若需要返回值, 使用Future. 2. 不建议使用回调函数: 回调函数没有状态, 若执行过程中出现数据增删, 简单的通过数量判断不可取 [YDService]
+ * 备注: 开启异步在配置类添加 @EnableAsync 类注解, 无需在启动类添加 [非必要]
+ * 扩展:
+ * - 1. 可以搭配 lombok 的 @Synchronized, 实现异步情况下的线程安全. 会等到前一次执行成功后执行后一次线程调用 [若是不使用 @Async, 可能会超时失败, 宜搭不稳定]
+ * - 2. 指定线程 @Async("aliworkConcurrence") 配置, 统一配置调用上限避免超并发 [宜搭, YDClient内并发公共一个@Async配置]
+ */
+@Slf4j
+@Configuration
+@EnableAsync
+public class AsyncConfig implements AsyncConfigurer {
+
+    // 指定类输出日志到指定文件夹
+    private static final Logger logger = LoggerFactory.getLogger("point");
+
+//    @Autowired
+//    private ExceptionNotice notice;
+
+    /**
+     * 异步执行配置
+     *
+     * @async 更建议是为了实现异步, 若有并发等待也可满足
+     * Delayed 函数回调存在线程死锁, 导致内存问题, 已弃用
+     */
+    @Override
+    public Executor getAsyncExecutor() {
+        logger.info("asyncExecutor ▷ 多线程执行");
+        ThreadPoolTaskExecutor taskExecutor = new ThreadPoolTaskExecutor();  // 定义线程池
+        taskExecutor.setCorePoolSize(3);  // 设置核心线程
+        taskExecutor.setMaxPoolSize(10);  // 设置最大线程
+        taskExecutor.setQueueCapacity(200);  // 设置线程队列最大线程数
+        taskExecutor.setKeepAliveSeconds(10);  // 允许线程的空闲时间 [勿动]
+        taskExecutor.setThreadNamePrefix("async-executor-");  // 线程池名的前缀
+        taskExecutor.initialize();  // 初始化
+        return taskExecutor;
+    }
+
+    /**
+     * 并发线程配置: 宜搭 [统一配置调用上限避免超过并发, YDClient内并发公共一个@Async配置]
+     *
+     * @Async("aliworkConcurrence") 指定线程
+     */
+    @Bean("aliworkConcurrence")
+    public ThreadPoolTaskExecutor aliworkTaskExecutor() {
+        logger.info("aliworkConcurrence ▷ 多线程初始化");
+        ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
+        // 核心线程数:线程池创建时候初始化的线程数 ==> 宜搭并发200次/s, 限流配置 [4核偶尔出现, 3核极其偶尔]
+        executor.setCorePoolSize(2);
+        // 最大线程数:线程池最大的线程数,只有在缓冲队列满了之后才会申请超过核心线程数的线程
+        executor.setMaxPoolSize(2);
+        // 缓冲队列:用来缓冲执行任务的队列
+        executor.setQueueCapacity(200);
+        // 允许线程的空闲时间60秒:当超过了核心线程之外的线程在空闲时间到达之后会被销毁
+        executor.setKeepAliveSeconds(60);
+        // 线程池名的前缀:设置好了之后可以方便我们定位处理任务所在的线程池
+        executor.setThreadNamePrefix("aliwork-concurrence-");
+        // 缓冲队列满了之后的拒绝策略:由调用线程处理(一般是主线程)
+        executor.setRejectedExecutionHandler(new ThreadPoolExecutor.DiscardPolicy());
+        executor.initialize();
+        return executor;
+    }
+
+    /**
+     * 处理异步方法中未捕获的异常
+     * -
+     * ppExt 重要声明
+     * 1. @Async 内若调用了不能并发的方法, 如查询限流, 需要在调用的方法上添加 @Synchronized, 避免异步情况下执行触发限流导致抛出错误到多线程
+     * 2. @Async 方法上建议要添加 @Synchronized, 否则就在多次连续调用的时候, 入参需要做拷贝, 若同一个入参对象连续调用 @Async 会读取最后一次赋值
+     */
+    @Override
+    public AsyncUncaughtExceptionHandler getAsyncUncaughtExceptionHandler() {
+        return (ex, method, params) -> {
+            log.error("Async反馈异常 {}. {}. {}", ex, method, params);  // 记录错误日志
+            try {
+                throw ex;
+            } catch (Throwable throwable) {
+                throwable.printStackTrace();
+            }
+        };
+    }
+}

+ 36 - 0
mjava/src/main/java/com/malk/delegate/DDEvent.java

@@ -0,0 +1,36 @@
+package com.malk.delegate;
+
+import org.springframework.scheduling.annotation.Async;
+
+/**
+ * 钉钉事件回调 3_2
+ * -
+ * [主项目若无实现, 项目启动异常; 若子项目有订阅需添加 @Primary 以实现优先注入]
+ * -
+ * 子项目实现接口 [静态代理], 添加对应 processCode 单据业务逻辑
+ * OA审批, 撤销和拒绝流程不继续执行连接器, 通过事件订阅实现实时同步
+ */
+public interface DDEvent {
+
+
+    // todo, 回调做try, 失败记录做存储, 提供查询接口
+
+    // todo, 回调参数统一, 宜搭查询接口统一
+
+    // 审批任务回调执行业务逻辑
+    @Async
+    void executeEvent_Task_Finish(String processInstanceId, String processCode, boolean isAgree, String remark);
+
+    @Async
+    void executeEvent_Task_Start(String processInstanceId, String processCode);
+
+    @Async
+    void executeEvent_Task_Redirect(String processInstanceId, String processCode);
+
+    // 审批实例回调执行业务逻辑
+    @Async
+    void executeEvent_Instance_Finish(String processInstanceId, String processCode, boolean isAgree, boolean isTerminate, String staffId);
+
+    @Async
+    void executeEvent_Instance_Start(String processInstanceId, String processCode);
+}

+ 17 - 0
mjava/src/main/java/com/malk/delegate/McDelegate.java

@@ -0,0 +1,17 @@
+package com.malk.delegate;
+
+import org.springframework.scheduling.annotation.Async;
+
+public interface McDelegate {
+
+    /**
+     * 异步线程回调
+     */
+    @Async
+    void setTimeout(Invoke fn, long millis);
+
+    @FunctionalInterface
+    interface Invoke {
+        void execute();
+    }
+}

+ 25 - 0
mjava/src/main/java/com/malk/delegate/TBEvent.java

@@ -0,0 +1,25 @@
+package com.malk.delegate;
+
+import com.alibaba.fastjson.JSONObject;
+
+/**
+ * TB事件回调 3_2
+ * -
+ * [主项目若无实现, 项目启动异常; 若子项目有订阅需添加 @Primary 以实现优先注入]
+ * -
+ * 子项目实现接口 [静态代理], 添加对应 processCode 单据业务逻辑
+ */
+public interface TBEvent {
+
+    /**
+     * 任务回调事件  [异步]
+     * ppExt
+     * 1. 若存在前后置, 未完成子任务, 点击完成TB会自动切换为未完成, 此种状态下不会触发任务回调
+     */
+    void callBackTask(JSONObject eventJson);
+
+    /**
+     * 项目回调事件  [异步]
+     */
+    void callBackProject(JSONObject eventJson);
+}

+ 49 - 0
mjava/src/main/java/com/malk/delegate/impl/DDImplEvent.java

@@ -0,0 +1,49 @@
+package com.malk.delegate.impl;
+
+import com.malk.delegate.DDEvent;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.scheduling.annotation.Async;
+import org.springframework.stereotype.Service;
+
+/**
+ * OA审批事件 [主项目若无实现, 项目启动异常; 若子项目有订阅需添加 @Primary 以实现优先注入]
+ * -
+ * 取消方案: 撤销和拒绝流程不继续执行连接器, 因此不使用连接器与轮询审批记录方案 [低效而且占用较高钉钉api调次数];
+ * 优化方案: 通过事件订阅实现实时同步所有审批状态, 定时查询钉钉回调失败记录 [配置钉钉事件Delegate, 添加定时任务]
+ */
+@Slf4j
+@Service
+public class DDImplEvent implements DDEvent {
+
+    // 审批任务回调执行业务逻辑
+    @Async
+    @Override
+    public void executeEvent_Task_Finish(String processInstanceId, String processCode, boolean isAgree, String remark) {
+        log.info("executeEvent_Task_Finish: 未被代理");
+    }
+
+    @Async
+    @Override
+    public void executeEvent_Task_Start(String processInstanceId, String processCode) {
+        log.info("executeEvent_Task_Start: 未被代理");
+    }
+
+    @Async
+    @Override
+    public void executeEvent_Task_Redirect(String processInstanceId, String processCode) {
+        log.info("executeEvent_Task_Redirect: 未被代理");
+    }
+
+    @Async
+    @Override
+    public void executeEvent_Instance_Start(String processInstanceId, String processCode) {
+        log.info("executeEvent_Instance_Start: 未被代理");
+    }
+
+    // 审批实例回调执行业务逻辑
+    @Async
+    @Override
+    public void executeEvent_Instance_Finish(String processInstanceId, String processCode, boolean isAgree, boolean isTerminate, String staffId) {
+        log.info("executeEvent_Instance_Finish: 未被代理");
+    }
+}

+ 0 - 0
mjava/src/main/java/com/malk/delegate/impl/McImplDelegate.java


Some files were not shown because too many files changed in this diff