This commit is contained in:
磷叶 2024-10-26 18:04:13 +08:00
parent d921f2c6e7
commit 8918ad1f57
14 changed files with 126 additions and 8 deletions

View File

@ -5,7 +5,7 @@
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.ruoyi</groupId>
<artifactId>ruoyi-java</artifactId>
<artifactId>yh-java</artifactId>
<version>3.8.8</version>
</parent>

View File

@ -3,7 +3,7 @@
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>ruoyi-java</artifactId>
<artifactId>common-ruoyi</artifactId>
<groupId>com.ruoyi</groupId>
<version>3.8.8</version>
</parent>

View File

@ -3,7 +3,7 @@
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>ruoyi-java</artifactId>
<artifactId>common-ruoyi</artifactId>
<groupId>com.ruoyi</groupId>
<version>3.8.8</version>
</parent>

View File

@ -3,7 +3,7 @@
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>ruoyi-java</artifactId>
<artifactId>common-ruoyi</artifactId>
<groupId>com.ruoyi</groupId>
<version>3.8.8</version>
</parent>

View File

@ -3,7 +3,7 @@
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>ruoyi-java</artifactId>
<artifactId>common-ruoyi</artifactId>
<groupId>com.ruoyi</groupId>
<version>3.8.8</version>
</parent>

View File

@ -3,7 +3,7 @@
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>ruoyi-java</artifactId>
<artifactId>common-ruoyi</artifactId>
<groupId>com.ruoyi</groupId>
<version>3.8.8</version>
</parent>

20
kdwebapi.properties Normal file
View File

@ -0,0 +1,20 @@
# \u8D26\u5957ID
X-KDApi-AcctID=6708ecf34e20aa
# AppId
X-KDApi-AppID=293412_54doTclO2rHWR51FX/6sVZSLzsT8WprE
# \u79D8\u94A5
X-KDApi-AppSec=a30d9593a0d64c80898003447bfb3c2c
# \u7528\u6237\u540D
X-KDApi-UserName=\u521B\u7279\u7269\u8054
# \u8BED\u79CD
X-KDApi-LCID=2052
# \u8BF7\u6C42URL
X-KDApi-ServerUrl=http://cloud.fjyinghao.com:881/k3cloud/
#X-KDApi-AcctID =6304ba61219bf5
#X-KDApi-AppID=225649_7ZbM6dDO0qrVXXUKX/Xs09wH2u5d4rLE
#X-KDApi-AppSec =2bb1d972f3574a46aebee03cdc80aeae
#X-KDApi-UserName =demo
#X-KDApi-LCID=2052
#X-KDApi-ServerUrl=https://apiexp.open.kingdee.com/k3cloud/

View File

@ -5,7 +5,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.ruoyi</groupId>
<artifactId>ruoyi-java</artifactId>
<artifactId>yh-java</artifactId>
<version>3.8.8</version>
<name>ruoyi</name>

Binary file not shown.

Binary file not shown.

View File

@ -3,7 +3,7 @@
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>ruoyi-java</artifactId>
<artifactId>yh-java</artifactId>
<groupId>com.ruoyi</groupId>
<version>3.8.8</version>
</parent>
@ -17,6 +17,26 @@
<dependencies>
<!--金蝶云星空SDK-->
<dependency>
<groupId>com.k3cloud</groupId> <!--自定义-->
<artifactId>webapi-sdk</artifactId> <!--自定义-->
<version>8.0.6</version> <!--自定义-->
<scope>system</scope>
<!--jar包路径 注意:这里用的是 {pom.basedir}-->
<systemPath>${pom.basedir}/lib/k3cloud-webapi-sdk8.0.6.jar</systemPath>
</dependency>
<!--gson-->
<dependency>
<groupId>com.google</groupId> <!--自定义-->
<artifactId>gson</artifactId> <!--自定义-->
<version>2.8.0</version> <!--自定义-->
<scope>system</scope>
<!--jar包路径 注意:这里用的是 {pom.basedir}-->
<systemPath>${pom.basedir}/lib/gson-2.8.0.jar</systemPath>
</dependency>
<!-- spring-boot-devtools -->
<dependency>
<groupId>org.springframework.boot</groupId>
@ -57,6 +77,7 @@
<artifactId>spring-boot-maven-plugin</artifactId>
<version>2.5.15</version>
<configuration>
<includeSystemScope>true</includeSystemScope>
<fork>true</fork> <!-- 如果没有该配置devtools不会生效 -->
</configuration>
<executions>

View File

@ -0,0 +1,57 @@
package com.ruoyi.k3cloud;
import com.alibaba.fastjson2.JSONObject;
import com.google.gson.Gson;
import com.google.gson.JsonObject;
import com.kingdee.bos.webapi.entity.QueryParam;
import com.kingdee.bos.webapi.entity.RepoRet;
import com.kingdee.bos.webapi.sdk.K3CloudApi;
import com.ruoyi.common.annotation.Anonymous;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.ArrayList;
/**
* @author wjh
* 2024/10/25
*/
@RestController
@RequestMapping("/k3/test")
public class K3TestController extends BaseController {
@Autowired
private K3CloudApi k3CloudApi;
@GetMapping("/query")
@Anonymous
public String test() throws Exception {
K3CloudApi api = new K3CloudApi();
JSONObject obj = new JSONObject();
obj.put("FormId", "PRD_MO");
obj.put("FieldKeys", "FBillNo,FDocumentStatus");
obj.put("FilterString", "");
obj.put("OrderString", "");
obj.put("TopRowCount", 0);
obj.put("StartRow", 0);
obj.put("Limit", 2000);
obj.put("SubSystemId", "");
return api.executeBillQueryJson(JSONObject.toJSONString(obj));
}
@GetMapping("/del")
@Anonymous
public Object del() throws Exception {
K3CloudApi api = new K3CloudApi();
String data = "{\"CreateOrgId\": 0,\"Numbers\": ["+"\"123\""+"],\"Id\": \"\",\"IsSortBySeq\": \"false\"}";
String result = api.delete("PRD_MO", data);
Gson gson = new Gson();
RepoRet repoRet = gson.fromJson(result, RepoRet.class);
return repoRet;
}
}

View File

@ -0,0 +1,20 @@
package com.ruoyi.k3cloud.config;
import com.kingdee.bos.webapi.sdk.K3CloudApi;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
/**
* 金蝶云星空配置
* @author wjh
* 2024/10/25
*/
@Configuration
public class K3CloudConfig {
@Bean
public K3CloudApi k3CloudApi() {
return new K3CloudApi();
}
}

Binary file not shown.