Compare commits
52 Commits
Author | SHA1 | Date |
---|---|---|
|
a14706e2a3 | |
|
bd9c7b166d | |
|
a0ab2e87ba | |
|
3796a24b94 | |
|
97840df6a1 | |
|
adb4a566d4 | |
|
257e7c2235 | |
|
bfd18dce39 | |
|
70c6f8adf3 | |
|
6e3a47706a | |
|
4c40538ae1 | |
|
234a2e4efb | |
|
d2c824e64d | |
|
d9feee5a28 | |
|
6b0232e12d | |
|
f9b2ebaa7f | |
|
ffb86f43fa | |
|
f73d39fe1c | |
|
5a63afd7d8 | |
|
21007598a9 | |
|
c943cd82fb | |
|
ed5d7fff69 | |
|
1d979524f3 | |
|
23d06b59bb | |
|
5eea8dfb96 | |
|
90386c59a5 | |
|
aa591dc1ff | |
|
ae266436d9 | |
|
62cf866111 | |
|
351a7e7a7a | |
|
5f6648144c | |
|
f582a9601c | |
|
c398ecde8b | |
|
0baa4e0bf3 | |
|
3bddc46c9a | |
|
5ff781e133 | |
|
cff92f2399 | |
|
a778197694 | |
|
61b0cdfaee | |
|
fa2583176e | |
|
165e548056 | |
|
d9405aad90 | |
|
2874005465 | |
|
6e0b588959 | |
|
55aa4c4a92 | |
|
44fb1eaca1 | |
|
f0db5772a2 | |
|
482f0533c4 | |
|
6e6d219719 | |
|
0e471d20a3 | |
|
f33447e4f2 | |
|
cb58463319 |
|
@ -60,3 +60,9 @@ $RECYCLE.BIN/
|
|||
/common/target/
|
||||
/buildpackage/target/
|
||||
/webapp/target/
|
||||
/base-buildpackage/target/
|
||||
/base-common/target/
|
||||
/base-core/target/
|
||||
/base-webapp/target/classes/com/hzya/frame/
|
||||
/fw-weixin/target/
|
||||
/E:/yongansystem/log/2024-10-15/
|
||||
|
|
|
@ -0,0 +1,59 @@
|
|||
<?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>kangarooDataCenterV3</artifactId>
|
||||
<groupId>com.hzya.frame</groupId>
|
||||
<version>${revision}</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>base-buildpackage</artifactId>
|
||||
<packaging>war</packaging>
|
||||
<version>${revision}</version>
|
||||
<!-- 统一管理依赖版本-->
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.hzya.frame</groupId>
|
||||
<artifactId>base-webapp</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<profiles>
|
||||
<profile>
|
||||
<id>dev</id> <!--开发环境-->
|
||||
<properties>
|
||||
<profile.active>dev</profile.active>
|
||||
</properties>
|
||||
<activation>
|
||||
<activeByDefault>true</activeByDefault>
|
||||
</activation>
|
||||
</profile>
|
||||
|
||||
|
||||
<profile>
|
||||
<id>llg</id> <!--吕磊钢-->
|
||||
<properties>
|
||||
<profile.active>llg</profile.active>
|
||||
</properties>
|
||||
</profile>
|
||||
<profile>
|
||||
<id>xel</id> <!--xel-->
|
||||
<properties>
|
||||
<profile.active>xel</profile.active>
|
||||
</properties>
|
||||
</profile>
|
||||
<profile>
|
||||
<id>zqtlocal</id> <!--曾庆拓-->
|
||||
<properties>
|
||||
<profile.active>zqtlocal</profile.active>
|
||||
</properties>
|
||||
</profile>
|
||||
|
||||
</profiles>
|
||||
<build>
|
||||
<finalName>kangarooDataCenterV3</finalName>
|
||||
</build>
|
||||
|
||||
</project>
|
|
@ -452,6 +452,7 @@ public class MdmModulePluginInitializer extends PluginBaseEntity {
|
|||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.info("执行异常错误原因:"+e);
|
||||
logger.error("新增返回脚本解析保存三方id错误"+jsonResultEntity.getAttribute());
|
||||
taskDetailEntity.setResult("新增返回脚本解析保存三方id错误");
|
||||
taskLivingDetailsService.updateLogFailToSuccess(taskDetailEntity);
|
||||
|
@ -543,7 +544,7 @@ public class MdmModulePluginInitializer extends PluginBaseEntity {
|
|||
map1.put("tableName",mainDb);
|
||||
map1.put("dataStatus", "N");
|
||||
map1.put("deleteStatus", "0");
|
||||
map1.put("size", 10);
|
||||
map1.put("size", 50);
|
||||
objects = mdmModuleDao.queryMdmSTs(map1);
|
||||
objects = toLowerCaseKeys(objects);
|
||||
|
||||
|
@ -738,7 +739,7 @@ public class MdmModulePluginInitializer extends PluginBaseEntity {
|
|||
map1.put("tableName",mainDb);
|
||||
//map1.put("dataStatus", "F");
|
||||
map1.put("updateStatus", "0");
|
||||
map1.put("size", 10);
|
||||
map1.put("size", 50);
|
||||
objects = mdmModuleDao.queryMdmSTs(map1);
|
||||
objects = toLowerCaseKeys(objects);
|
||||
|
||||
|
@ -926,7 +927,7 @@ public class MdmModulePluginInitializer extends PluginBaseEntity {
|
|||
map1.put("tableName",mainDb);
|
||||
//map1.put("dataStatus", "Y");
|
||||
map1.put("addStatus", "0");
|
||||
map1.put("size", 100);
|
||||
map1.put("size", 50);
|
||||
objects = mdmModuleDao.queryMdmSTs(map1);
|
||||
objects = toLowerCaseKeys(objects);
|
||||
|
||||
|
@ -991,6 +992,7 @@ public class MdmModulePluginInitializer extends PluginBaseEntity {
|
|||
mdmModuleSendLogEntity.setTableName(mainDb+"_send_log");
|
||||
mdmModuleSendLogEntity.setFormmainId(doObjects.get(i).getString("id"));
|
||||
mdmModuleSendLogEntity.setSts("Y");
|
||||
mdmModuleSendLogEntity.setDataType("1");
|
||||
mdmModuleSendLogEntity.setAppId(sysApplicationEntity.getId());
|
||||
mdmModuleSendLogEntity.setApiId(apiEntity.getId());
|
||||
//mdmModuleSendLogEntity.setDistributeId(mdmModuleDistributeEntities.get(i1).getId());
|
||||
|
@ -1121,10 +1123,12 @@ public class MdmModulePluginInitializer extends PluginBaseEntity {
|
|||
}
|
||||
//保存日志
|
||||
saveMdmModuleSendLogEntity(mainCode,mdmModuleDistributeEntities.get(i1).getId(),"1","发送成功",mainDb,objects.get(i).getString("id"),sysApplicationEntity.getName(),sysApplicationEntity.getId(),apiEntity.getApiName(),apiEntity.getId(),doObjects.get(i).toJSONString(),"1");
|
||||
objects.get(i).put("sendsanfzt123",true);
|
||||
continue;
|
||||
}else {
|
||||
//保存日志
|
||||
saveMdmModuleSendLogEntity(mainCode,mdmModuleDistributeEntities.get(i1).getId(),"2","转发失败:"+jsonResultEntity.getAttribute(),mainDb,objects.get(i).getString("id"),sysApplicationEntity.getName(),sysApplicationEntity.getId(),apiEntity.getApiName(),apiEntity.getId(),doObjects.get(i).toJSONString(),"1");
|
||||
objects.get(i).put("sendsanfzt123",false);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
@ -1132,6 +1136,7 @@ public class MdmModulePluginInitializer extends PluginBaseEntity {
|
|||
|
||||
//所有下发发送完成,修改数据状态
|
||||
for (int i = 0; i < objects.size(); i++) {
|
||||
if(objects.get(i).getBoolean("sendsanfzt123")){
|
||||
Map<String, Object> updateMap = new HashMap<>();
|
||||
updateMap.put("tableName",mainDb);
|
||||
//updateMap.put("dataStatus", "Y");
|
||||
|
@ -1140,6 +1145,7 @@ public class MdmModulePluginInitializer extends PluginBaseEntity {
|
|||
mdmModuleDao.updateMdmSTs(updateMap);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void saveMdmModuleSendLogEntity(Long mdmCode,String distributeId,String dataType,String remark,String dbname,String formmain_id, String target_app, String appId, String target_api,String apiID, String source_data, String option_type) throws Exception {
|
||||
MdmModuleSendLogEntity mdmModuleSendLogEntity = new MdmModuleSendLogEntity();
|
|
@ -45,7 +45,7 @@ savefile:
|
|||
tomcatpath: /Users/apple/Desktop/log/local
|
||||
pluginpath: /Users/apple/Desktop/log/local
|
||||
zt:
|
||||
url: http://127.0.0.1:9999/kangarooDataCenterV3/entranceController/externalCallInterface
|
||||
url: http://127.0.0.1:10086/kangarooDataCenterV3/entranceController/externalCallInterface
|
||||
cbs8:
|
||||
appId: 1P4AGrpz
|
||||
appSecret: 2c2369ae5dc04382844bbe3a5abf39e1bea9cd3a
|
||||
|
@ -60,6 +60,10 @@ cbs8:
|
|||
elec_path: /Users/xiangerlin/Downloads/
|
||||
OA:
|
||||
data_source_code: yc_oa
|
||||
server:
|
||||
port: 10086
|
||||
|
||||
# mysqldump -d mylm -hhzya.ufyct.com -p9096 -uroot -phzya1314 >%dirName%\table_view.sql
|
||||
|
||||
|
||||
database:
|
|
@ -14,24 +14,10 @@ spring:
|
|||
master:
|
||||
url: jdbc:mysql://ufidahz.com.cn:9014/businesscenter?serverTimezone=UTC&useUnicode=true&characterEncoding=UTF8&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowLoadLocalInfile=false&autoReconnect=true&failOverReadOnly=false&connectTimeout=30000&socketTimeout=30000&autoReconnectForPools=true
|
||||
username: root
|
||||
password: 62e4295b615a30dbf3b8ee96f41c820b
|
||||
password: bd993088e8a7c3dc5f44441617f9b4bf
|
||||
driver-class-name: com.mysql.jdbc.Driver # 3.2.0开始支持SPI可省略此配置
|
||||
savefile:
|
||||
# 文件保存路径
|
||||
path: /Users/xiangerlin/work/app/file/dev
|
||||
tomcatpath: /Users/xiangerlin/work/app/file/dev
|
||||
pluginpath: /Users/xiangerlin/work/app/file/dev
|
||||
cbs8:
|
||||
appId: 1P4AGrpz
|
||||
appSecret: 2c2369ae5dc04382844bbe3a5abf39e1bea9cd3a
|
||||
url: https://cbs8-openapi-reprd.csuat.cmburl.cn
|
||||
# 测试用这个 这个是银行给的,和下面的公钥不是一对密钥
|
||||
ya_private_key: 83BA7EC821D35F4CB31FF9A51C1EFA520FC52AF828C2337F88E91CF119B07F44
|
||||
# 这个私钥到时候上传到cbs,和下面到是同一对
|
||||
#ya_private_key: e1eacfdee9b8d4184437d5a2071e17ce31befc3d93395f9f05709ed562e8dc46
|
||||
ya_public_key: 044fa399d2223760f17b81b863cb482b009294c4516f8a605dea1475ec09e720eaa98468715e5ad509a592a0b426061551c5a3df236966c23253a7d894eac0dcde
|
||||
cbs_public_key: 0469146F06BF3B01236E84632441E826F3067A6B93BC3839C836A06007869CD351FBBE388B51F742859388BBC1DE089923AAFBC69E448F15141DDF30EE6CE90185
|
||||
#电子回单下载临时存放位置
|
||||
elec_path: /Users/xiangerlin/Downloads/
|
||||
OA:
|
||||
data_source_code: yc-test
|
||||
tomcatpath: /Users/xiangerlin/work/app/file/dev
|
|
@ -36,4 +36,4 @@ cbs8:
|
|||
OA:
|
||||
data_source_code: yc_oa
|
||||
zt:
|
||||
url: http://127.0.0.1:9999/kangarooDataCenterV3/entranceController/externalCallInterface
|
||||
url: http://127.0.0.1:10086/kangarooDataCenterV3/entranceController/externalCallInterface
|
|
@ -1,5 +1,5 @@
|
|||
server:
|
||||
port: 9999
|
||||
port: 10086
|
||||
servlet:
|
||||
context-path: /kangarooDataCenterV3
|
||||
localIP: 127.0.0.1
|
||||
|
@ -93,7 +93,7 @@ mybatis-plus:
|
|||
db-config:
|
||||
id-type: auto # 主键策略
|
||||
zt:
|
||||
url: http://127.0.0.1:9999/kangarooDataCenterV3/entranceController/externalCallInterface
|
||||
url: http://127.0.0.1:10086/kangarooDataCenterV3/entranceController/externalCallInterface
|
||||
#JimuReport[minidao配置]
|
||||
minidao :
|
||||
base-package: org.jeecg.modules.jmreport.desreport.dao*
|
||||
|
@ -126,3 +126,17 @@ jeecg :
|
|||
bucketName: ??
|
||||
data:
|
||||
use: true
|
||||
database:
|
||||
databaseName:
|
||||
host:
|
||||
port:
|
||||
username:
|
||||
password:
|
||||
filePase:
|
||||
fileName:
|
||||
sftp:
|
||||
host:
|
||||
port:
|
||||
username:
|
||||
password:
|
||||
filePase:
|
|
@ -0,0 +1,146 @@
|
|||
package com.hzya.frame;
|
||||
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.hzya.frame.util.AESUtil;
|
||||
import org.apache.http.HttpEntity;
|
||||
import org.apache.http.client.config.RequestConfig;
|
||||
import org.apache.http.client.methods.CloseableHttpResponse;
|
||||
import org.apache.http.client.methods.HttpGet;
|
||||
import org.apache.http.client.methods.HttpPut;
|
||||
import org.apache.http.entity.StringEntity;
|
||||
import org.apache.http.impl.client.CloseableHttpClient;
|
||||
import org.apache.http.impl.client.HttpClientBuilder;
|
||||
import org.apache.http.impl.client.HttpClients;
|
||||
import org.apache.http.util.EntityUtils;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.test.context.junit4.SpringRunner;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @ClassName dsasas
|
||||
* @Description
|
||||
* @Author llg
|
||||
* Date 2023/7/16 8:18 上午
|
||||
*/
|
||||
//@RunWith(SpringRunner.class)
|
||||
//@SpringBootTest(classes = {WebappApplication.class})
|
||||
public class temButtom {
|
||||
|
||||
@Test
|
||||
public void test01() {
|
||||
String a = AESUtil.encrypt("hzya@1314");
|
||||
System.out.println(a);
|
||||
String b = AESUtil.decrypt("62e4295b615a30dbf3b8ee96f41c820b");
|
||||
System.out.println(b);
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void test02() {
|
||||
// 1056162015172640840 -7858803986346327947 3178176833471791293 合同评审-待办测试(bdmanager 2024-10-22 16:45) 7743552636545550897 bdmanager 18058147870 pending start success 新增成功!
|
||||
// success 更新待办为已办成功!
|
||||
// task7803207f54ff047d6008dcce31c2628f 新增成功!
|
||||
// 2024-10-24 2024-10-24
|
||||
|
||||
String phone ="19357235324";
|
||||
String taskid ="task8b0c7ca72439bc9b0c1c89e8866c8275";
|
||||
//token
|
||||
Map<String, String> headers = new HashMap<>();
|
||||
String token ="https://oapi.dingtalk.com/gettoken?appkey=dingxewtjaserj292ggu&appsecret=DuRw6EEEvhGXfr6Q8wN_x4025qKjrffIGCXF9KeCKKIID-LVSsR6_8KWMei6sug1";
|
||||
String body = sendGet(token,headers);
|
||||
JSONObject tokenobject = JSONObject.parseObject(body);
|
||||
|
||||
//钉钉id
|
||||
headers = new HashMap<>();
|
||||
//https://oapi.dingtalk.com/user/get_by_mobile?access_token=9abd3996cb103ba48dd8c69fea5473e7&mobile=15700100840
|
||||
String ddid ="https://oapi.dingtalk.com/user/get_by_mobile?access_token="+tokenobject.get("access_token")+"&mobile="+phone;
|
||||
String ddidbody = sendGet(ddid,headers);
|
||||
JSONObject ddidobject = JSONObject.parseObject(ddidbody);
|
||||
|
||||
//人员id
|
||||
headers = new HashMap<>();
|
||||
//https://oapi.dingtalk.com/user/get?userid=111336474727636213&access_token=3d21a6614fb037a98542a537336e8149
|
||||
String userid ="https://oapi.dingtalk.com/user/get?userid="+ddidobject.get("userid")+"&access_token="+tokenobject.get("access_token");
|
||||
String useridbody = sendGet(userid,headers);
|
||||
JSONObject useridobject = JSONObject.parseObject(useridbody);
|
||||
|
||||
|
||||
|
||||
CloseableHttpClient httpClient = HttpClients.createDefault();
|
||||
HttpPut httpPut = new HttpPut("https://api.dingtalk.com/v1.0/todo/users/"+useridobject.get("unionid")+"/tasks/"+taskid);
|
||||
RequestConfig requestConfig = RequestConfig.custom().setConnectTimeout(35000).setConnectionRequestTimeout(35000).setSocketTimeout(60000).build();
|
||||
httpPut.setConfig(requestConfig);
|
||||
httpPut.setHeader("Content-type", "application/json");
|
||||
httpPut.setHeader("x-acs-dingtalk-access-token", tokenobject.getString("access_token"));
|
||||
Map<String, Object> dataMap = new HashMap();
|
||||
dataMap.put("done", true);
|
||||
CloseableHttpResponse httpResponse = null;
|
||||
|
||||
try {
|
||||
httpPut.setEntity(new StringEntity("{\"done\": true}"));
|
||||
httpResponse = httpClient.execute(httpPut);
|
||||
HttpEntity entity = httpResponse.getEntity();
|
||||
String results = EntityUtils.toString(entity);
|
||||
System.out.println(results);
|
||||
} catch (Exception var15) {
|
||||
} finally {
|
||||
try {
|
||||
httpResponse.close();
|
||||
httpClient.close();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private String sendGet(String url, Map<String, String> headers) {
|
||||
HttpClientBuilder httpClientBuilder = HttpClientBuilder.create();
|
||||
// HttpClient
|
||||
CloseableHttpClient closeableHttpClient = httpClientBuilder.disableCookieManagement().build();
|
||||
HttpGet get = new HttpGet(url.toString());
|
||||
CloseableHttpResponse response = null;
|
||||
|
||||
RequestConfig requestConfig = RequestConfig.custom().setConnectTimeout(60000).build();
|
||||
get.setConfig(requestConfig);//设置请求参数【超时时间】
|
||||
if (headers != null && headers.size() > 0) {
|
||||
for (String key : headers.keySet()) {
|
||||
get.setHeader(key, headers.get(key));
|
||||
}
|
||||
}
|
||||
StringBuilder body = new StringBuilder();
|
||||
|
||||
try {
|
||||
|
||||
response = closeableHttpClient.execute(get);
|
||||
HttpEntity entity = response.getEntity();
|
||||
body.append(EntityUtils.toString(entity,"UTF-8"));
|
||||
} catch (Exception e) {
|
||||
body.append(e.getMessage());
|
||||
} finally {
|
||||
try {
|
||||
// 关闭响应对象
|
||||
if (response != null) {
|
||||
response.close();
|
||||
}
|
||||
// 关闭响应对象
|
||||
if (closeableHttpClient != null) {
|
||||
closeableHttpClient.close();
|
||||
}
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
return body.toString();
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -8,8 +8,9 @@
|
|||
<version>${revision}</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>common</artifactId>
|
||||
<artifactId>base-common</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<version>${revision}</version>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue