1
This commit is contained in:
parent
526bd7473c
commit
65eab9985b
@ -195,51 +195,88 @@ public class TestController {
|
|||||||
*/
|
*/
|
||||||
@GetMapping("/testAdapterSend")
|
@GetMapping("/testAdapterSend")
|
||||||
public AjaxResult testSend() throws ParseException {
|
public AjaxResult testSend() throws ParseException {
|
||||||
RestTemplate restTemplate = new RestTemplate();
|
// RestTemplate restTemplate = new RestTemplate();
|
||||||
MultiValueMap<String, Object> params = new LinkedMultiValueMap<>();
|
// MultiValueMap<String, Object> params = new LinkedMultiValueMap<>();
|
||||||
// 文件
|
// // 文件
|
||||||
// File file = new File("D:\\andy\\ideaWorker\\shangban12.png");
|
// File file = new File("D:\\andy\\车辆管理.png");
|
||||||
|
//// File file1 = new File("D:\\andy\\index.ts");
|
||||||
// FileSystemResource resource = new FileSystemResource(file);
|
// FileSystemResource resource = new FileSystemResource(file);
|
||||||
// params.add("file", resource);
|
//// FileSystemResource resource1 = new FileSystemResource(file1);
|
||||||
StringBuilder markdownMsg = new StringBuilder();
|
// params.add("files", resource);
|
||||||
markdownMsg.append("### 🚀 安全库存提醒\n\n")
|
//// params.add("files", resource1);
|
||||||
.append("今日暂无安全库存预警数据。\n\n");
|
// StringBuilder markdownMsg = new StringBuilder();
|
||||||
// 只显示前三个安全库存数据
|
// markdownMsg.append("### 🚀 安全库存提醒\n\n")
|
||||||
markdownMsg.append("**物料编号: ").append("123321").append("**\n")
|
// .append("今日暂无安全库存预警数据。\n\n");
|
||||||
.append("- 物料名称: ").append("测试测试567").append("\n")
|
// // 只显示前三个安全库存数据
|
||||||
.append("- 预计可用量: ").append("200").append("\n")
|
// markdownMsg.append("**物料编号: ").append("123321").append("**\n")
|
||||||
.append("- 即时库存: ").append("100").append("\n")
|
// .append("- 物料名称: ").append("测试测试567").append("\n")
|
||||||
.append("- 最大库存: ").append("50").append("\n")
|
// .append("- 预计可用量: ").append("200").append("\n")
|
||||||
.append("- 创建时间: ").append(DateUtil.formatDateTime(new Date())).append("\n")
|
// .append("- 即时库存: ").append("100").append("\n")
|
||||||
.append("---\n"); // 添加分隔线
|
// .append("- 最大库存: ").append("50").append("\n")
|
||||||
// 添加总数汇总
|
// .append("- 创建时间: ").append(DateUtil.formatDateTime(new Date())).append("\n")
|
||||||
markdownMsg.append("**总数汇总**\n")
|
// .append("---\n"); // 添加分隔线
|
||||||
.append("- 今日安全库存预警数据总数: **").append(50).append("**\n");
|
// // 添加总数汇总
|
||||||
|
// markdownMsg.append("**总数汇总**\n")
|
||||||
|
// .append("- 今日安全库存预警数据总数: **").append(50).append("**\n");
|
||||||
|
//
|
||||||
|
//
|
||||||
Map<String,String> dataMap = Collections.emptyMap();
|
//
|
||||||
dataMap.put("month", "sendMarkdownToUser");
|
//
|
||||||
dataMap.put("robotCode", "dingwoaeaozawfochwoo");
|
// Map<String,String> dataMap = Collections.emptyMap();
|
||||||
dataMap.put("clientId", "dingwoaeaozawfochwoo");
|
// dataMap.put("month", "sendMarkdownAndFileToUser");
|
||||||
dataMap.put("clientSecret", "rGrAQ7cReWeYzIK5j71l8d2qOLgUTyc-qnlacQcl3n0dKG3M8bgbbaSoc9AbKeUy");
|
// dataMap.put("robotCode","dinge794oclijuyxsyub");
|
||||||
dataMap.put("recipientType", "code");//00146
|
// dataMap.put("clientId", "dinge794oclijuyxsyub");
|
||||||
dataMap.put("users", JSON.toJSONString(Collections.asList("00272")));
|
// dataMap.put("clientSecret", "4ryzLl48I8ghhKqEMPCwablFqbs6PCmadqfDAPFWBNuIEBMJvPFQg-XHAe2oH2Fe");
|
||||||
dataMap.put("parameterTypes", JSON.toJSONString(Collections.asList("java.lang.String","java.lang.String")));
|
// dataMap.put("recipientType", "code");//00146
|
||||||
dataMap.put("parameters", JSON.toJSONString(Collections.asList("test测试",markdownMsg.toString())));
|
// dataMap.put("users", JSON.toJSONString(Collections.asList("00272")));
|
||||||
|
// dataMap.put("title", "test测试");
|
||||||
|
// dataMap.put("content", markdownMsg.toString());
|
||||||
params.add("data", JSON.toJSONString(dataMap));
|
//
|
||||||
|
//// dataMap.put("parameterTypes", JSON.toJSONString(Collections.asList("java.lang.String","java.lang.String")));
|
||||||
String url = "http://localhost:8089/ding/send";
|
//// dataMap.put("parameters", JSON.toJSONString(Collections.asList("test测试",markdownMsg.toString())));
|
||||||
return AjaxResult.success(restTemplate.postForObject(url, params, String.class));
|
// //推送数据类型
|
||||||
|
// params.add("data", JSON.toJSONString(dataMap));
|
||||||
|
//
|
||||||
|
// String url = "http://localhost:8089/ding/send";
|
||||||
|
// return AjaxResult.success(restTemplate.postForObject(url, params, String.class));
|
||||||
|
//
|
||||||
|
|
||||||
//String data = "{\"FormId\":\"BD_Empinfo\",\"FieldKeys\":\"FID\",\"FilterString\":[{\"Left\":\"\",\"FieldName\":\"FStaffNumber\",\"Compare\":\"17\",\"Value\":\"00046\",\"Right\":\"\",\"Logic\":0}],\"OrderString\":\"\",\"TopRowCount\":0,\"StartRow\":0,\"Limit\":2000,\"SubSystemId\":\"\"}";
|
//String data = "{\"FormId\":\"BD_Empinfo\",\"FieldKeys\":\"FID\",\"FilterString\":[{\"Left\":\"\",\"FieldName\":\"FStaffNumber\",\"Compare\":\"17\",\"Value\":\"00046\",\"Right\":\"\",\"Logic\":0}],\"OrderString\":\"\",\"TopRowCount\":0,\"StartRow\":0,\"Limit\":2000,\"SubSystemId\":\"\"}";
|
||||||
// return AjaxResult.success(HttpUtils.sendPost("http://localhost:8089/distribution/kingdee/send", JSONObject.toJSONString(
|
|
||||||
// Collections.asMap("fromId","BD_Empinfo", "month","executeBillQuery", "parameterTypes",Collections.asList(String.class),"data",Collections.asMap("data",data)))));
|
String data = "{\n" +
|
||||||
|
" \"FormId\" : \"PRD_MO\",\n" +
|
||||||
|
" \"FieldKeys\" : \"F_HBYT_SCLH,FBillNo,FWorkShopID.FName,FMaterialId.FNumber,FMaterialName,FPlanStartDate,FPlanFinishDate,FPickMtrlStatus\",\n" +
|
||||||
|
" \"FilterString\" : [ {\n" +
|
||||||
|
" \"FieldName\" : \"FStatus\",\n" +
|
||||||
|
" \"Compare\" : \"105\",\n" +
|
||||||
|
" \"Value\" : \"4\",\n" +
|
||||||
|
" \"Left\" : \"\",\n" +
|
||||||
|
" \"Right\" : \"\",\n" +
|
||||||
|
" \"Logic\" : 0\n" +
|
||||||
|
" }, {\n" +
|
||||||
|
" \"FieldName\" : \"FPickMtrlStatus\",\n" +
|
||||||
|
" \"Compare\" : \"29\",\n" +
|
||||||
|
" \"Value\" : \"1\",\n" +
|
||||||
|
" \"Left\" : \"\",\n" +
|
||||||
|
" \"Right\" : \"\",\n" +
|
||||||
|
" \"Logic\" : 0\n" +
|
||||||
|
" }, {\n" +
|
||||||
|
" \"FieldName\" : \"F_HBYT_SCLH\",\n" +
|
||||||
|
" \"Compare\" : \"67\",\n" +
|
||||||
|
" \"Value\" : \"QB-26-163-XCL\",\n" +
|
||||||
|
" \"Left\" : \"\",\n" +
|
||||||
|
" \"Right\" : \"\",\n" +
|
||||||
|
" \"Logic\" : 0\n" +
|
||||||
|
" } ],\n" +
|
||||||
|
" \"OrderString\" : \"\",\n" +
|
||||||
|
" \"TopRowCount\" : 0,\n" +
|
||||||
|
" \"StartRow\" : 0,\n" +
|
||||||
|
" \"Limit\" : 10000,\n" +
|
||||||
|
" \"SubSystemId\" : \"\"\n" +
|
||||||
|
"}";
|
||||||
|
|
||||||
|
return AjaxResult.success(HttpUtils.sendPost("http://localhost:8089/distribution/kingdee/send", JSONObject.toJSONString(
|
||||||
|
Collections.asMap("fromId","PRD_MO", "month","billQuery", "parameterTypes",Collections.asList(String.class),"data",Collections.asMap("123",data)))));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -32,7 +32,7 @@ spring:
|
|||||||
druid:
|
druid:
|
||||||
# 主库数据源
|
# 主库数据源
|
||||||
master:
|
master:
|
||||||
url: jdbc:mysql://192.168.5.230:3306/evo_cw_dev_ding?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
url: jdbc:mysql://localhost:3306/evo_cw_dev_ding?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||||
username: root
|
username: root
|
||||||
password: hbyt123456
|
password: hbyt123456
|
||||||
#username: root
|
#username: root
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user