修改1
This commit is contained in:
29
README.md
29
README.md
@ -1,29 +0,0 @@
|
||||
项目概述:
|
||||
此项目为纪元对接第三方ai客服项目,其中也包含905相关的逻辑,只要为机器人自动通话报警项目
|
||||
|
||||
对接人:
|
||||
王波涵 (如果需要接口文档以及业务逻辑上的问题请联系王波涵)
|
||||
|
||||
|
||||
项目主要为推送:
|
||||
|
||||
|
||||
以下为相关接口:
|
||||
@PostMapping("/biaoyang")
|
||||
@PostMapping("/cuikuan")
|
||||
@PostMapping("/dianhuajiaoche")
|
||||
@PostMapping("/dingdanjieshuhouyichang")
|
||||
@PostMapping("/jishidingdanchuli")
|
||||
@PostMapping("/panzeshensu")
|
||||
@PostMapping("/rengongfuwu")
|
||||
@PostMapping("/phone")
|
||||
@PostMapping("/shigujiebao")
|
||||
@PostMapping("/fangdaobaoqjing")
|
||||
@PostMapping("/shenqingtonghua")
|
||||
@PostMapping("/yujie")
|
||||
@PostMapping("/yishiwupin")
|
||||
@PostMapping("/zhitousu")
|
||||
|
||||
|
||||
|
||||
|
||||
@ -19,6 +19,7 @@ public class BiaoYang {
|
||||
jsonObject.put("app_id", "68215c6cbaccd58c66796bc5");
|
||||
jsonObject.put("entry_id", "68216bcfde8bbe9eed35a3bb");
|
||||
jsonObject.put("is_start_trigger", true);
|
||||
jsonObject.put("is_start_workflow", true);
|
||||
jsonObject.put("transaction_id", "transaction_id");
|
||||
JSONObject data = new JSONObject();
|
||||
|
||||
@ -70,8 +71,7 @@ public class BiaoYang {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if (stepFields != null && stepFields.size() != 0){
|
||||
for (Object o :stepFields ){
|
||||
JSONObject test = (JSONObject) o;
|
||||
String name = test.getString("name");
|
||||
@ -85,7 +85,7 @@ public class BiaoYang {
|
||||
|
||||
if (name.equals("联系电话")){
|
||||
JSONObject xm = new JSONObject();
|
||||
xm.put("value", test.getInteger("value"));
|
||||
xm.put("value", test.getString("value"));
|
||||
data.put("lxdh", xm );
|
||||
}
|
||||
|
||||
@ -201,6 +201,9 @@ public class BiaoYang {
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -2,6 +2,7 @@ package com.example.sso.controller;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.example.sso.dao.File;
|
||||
import com.example.sso.util.V5utils;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
@ -12,13 +13,14 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
@RestController
|
||||
public class CuiKuan {
|
||||
@PostMapping("/cuikuan")
|
||||
public String cuikuan(@RequestBody JSONObject datas) {
|
||||
public String cuikuan(@RequestBody JSONObject datas) throws Exception {
|
||||
log.info("数据 " + datas);
|
||||
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("app_id", "68215c6cbaccd58c66796bc5");
|
||||
jsonObject.put("entry_id", "68218464de8bbe9eed38500d");
|
||||
jsonObject.put("is_start_trigger", true);
|
||||
jsonObject.put("is_start_workflow", true);
|
||||
jsonObject.put("transaction_id", "transaction_id");
|
||||
JSONObject data = new JSONObject();
|
||||
|
||||
@ -70,8 +72,7 @@ public class CuiKuan {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if (stepFields != null && stepFields.size() != 0){
|
||||
for (Object o :stepFields ){
|
||||
JSONObject test = (JSONObject) o;
|
||||
String name = test.getString("name");
|
||||
@ -202,6 +203,33 @@ public class CuiKuan {
|
||||
|
||||
|
||||
|
||||
if (name.equals("欠款详情")){
|
||||
JSONObject xm = new JSONObject();
|
||||
xm.put("value", test.getString("value"));
|
||||
data.put("qkxq", xm );
|
||||
}
|
||||
|
||||
|
||||
if (name.equals("催收历史记录截图")){
|
||||
JSONObject xm = new JSONObject();
|
||||
// String string = test.getString("value");
|
||||
JSONArray jsonArray = new JSONArray();
|
||||
JSONArray value = test.getJSONArray("value");
|
||||
for (Object o1 : value) {
|
||||
JSONObject testa = (JSONObject) o1;
|
||||
String string = testa.getString("value");
|
||||
String file = File.filecuishoulishijietu(string);
|
||||
|
||||
jsonArray.add(file);
|
||||
|
||||
|
||||
}
|
||||
xm.put("value", jsonArray);
|
||||
data.put("fj", xm);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -213,6 +241,9 @@ public class CuiKuan {
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -20,6 +20,7 @@ public class DianHuaJiaoChe {
|
||||
jsonObject.put("app_id", "68215c6cbaccd58c66796bc5");
|
||||
jsonObject.put("entry_id", "68217205de8bbe9eed367e1f");
|
||||
jsonObject.put("is_start_trigger", true);
|
||||
jsonObject.put("is_start_workflow", true);
|
||||
jsonObject.put("transaction_id", "transaction_id");
|
||||
|
||||
JSONObject data = new JSONObject();
|
||||
@ -70,10 +71,7 @@ public class DianHuaJiaoChe {
|
||||
String flowInfo = datas.getString("flowInfo");
|
||||
JSONArray stepFields = datas.getJSONArray("stepFields");
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if (stepFields != null && stepFields.size() != 0){
|
||||
for (Object o :stepFields ){
|
||||
JSONObject test = (JSONObject) o;
|
||||
String name = test.getString("name");
|
||||
@ -187,6 +185,11 @@ public class DianHuaJiaoChe {
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -21,6 +21,7 @@ public class DingDanJieShuHouYiChang {
|
||||
jsonObject.put("app_id", "68215c6cbaccd58c66796bc5");
|
||||
jsonObject.put("entry_id", "68218467de8bbe9eed3850e0");
|
||||
jsonObject.put("is_start_trigger", true);
|
||||
jsonObject.put("is_start_workflow", true);
|
||||
jsonObject.put("transaction_id", "transaction_id");
|
||||
|
||||
JSONObject data = new JSONObject();
|
||||
@ -71,10 +72,7 @@ public class DingDanJieShuHouYiChang {
|
||||
String flowInfo = datas.getString("flowInfo");
|
||||
JSONArray stepFields = datas.getJSONArray("stepFields");
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if (stepFields != null && stepFields.size() != 0){
|
||||
for (Object o :stepFields ){
|
||||
JSONObject test = (JSONObject) o;
|
||||
String name = test.getString("name");
|
||||
@ -123,7 +121,7 @@ public class DingDanJieShuHouYiChang {
|
||||
|
||||
|
||||
|
||||
if (name.equals("详细描述图片上传")){
|
||||
if (name.equals("异常情况详情")){
|
||||
JSONObject xm = new JSONObject();
|
||||
// String string = test.getString("value");
|
||||
JSONArray jsonArray = new JSONArray();
|
||||
@ -189,6 +187,25 @@ public class DingDanJieShuHouYiChang {
|
||||
}
|
||||
|
||||
|
||||
if (name.equals("详细描述图片上传")){
|
||||
JSONObject xm = new JSONObject();
|
||||
// String string = test.getString("value");
|
||||
JSONArray jsonArray = new JSONArray();
|
||||
JSONArray value = test.getJSONArray("value");
|
||||
for (Object o1 : value) {
|
||||
JSONObject testa = (JSONObject) o1;
|
||||
String string = testa.getString("value");
|
||||
String file = File.filedingdanjieshuhouyiyangxxmstpsc(string);
|
||||
|
||||
jsonArray.add(file);
|
||||
|
||||
|
||||
}
|
||||
xm.put("value", jsonArray);
|
||||
data.put("xxmstpsc", xm);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -196,6 +213,11 @@ public class DingDanJieShuHouYiChang {
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
345
src/main/java/com/example/sso/controller/FaPiaoBuBan.java
Normal file
345
src/main/java/com/example/sso/controller/FaPiaoBuBan.java
Normal file
@ -0,0 +1,345 @@
|
||||
package com.example.sso.controller;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.example.sso.dao.File;
|
||||
import com.example.sso.util.V5utils;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@Slf4j
|
||||
@RestController
|
||||
public class FaPiaoBuBan {
|
||||
|
||||
@PostMapping("/fapiaobuban")
|
||||
public String biaoyang(@RequestBody JSONObject datas) throws Exception {
|
||||
log.info("发票补办数据 " + datas);
|
||||
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("app_id", "68215c6cbaccd58c66796bc5");
|
||||
jsonObject.put("entry_id", "689ee10d0499bc38081092d2");
|
||||
jsonObject.put("is_start_trigger", true);
|
||||
jsonObject.put("is_start_workflow", true);
|
||||
jsonObject.put("transaction_id", "transaction_id");
|
||||
JSONObject data = new JSONObject();
|
||||
|
||||
|
||||
|
||||
|
||||
String fields = "";
|
||||
String relatedBusiness = "";
|
||||
String followedAgents = "";
|
||||
String relatedCallSheet = "";
|
||||
String relatedWebchats = "";
|
||||
|
||||
String phone = datas.getString("phone");
|
||||
String _id = datas.getString("_id");
|
||||
String customerId = datas.getString("customerId");
|
||||
String user = datas.getString("user");
|
||||
JSONArray jsonArray1 = datas.getJSONArray("fields");
|
||||
if (jsonArray1 != null && jsonArray1.size() != 0){
|
||||
fields = jsonArray1.toJSONString();
|
||||
}
|
||||
String createTime = datas.getString("createTime");
|
||||
Integer createTimestamp = datas.getInteger("createTimestamp");
|
||||
String action = datas.getString("action");
|
||||
String stepName = datas.getString("stepName");
|
||||
String businessNumber = datas.getString("businessNumber");
|
||||
String priority = datas.getString("priority");
|
||||
String category = datas.getString("category");
|
||||
JSONArray jsonArray2 = datas.getJSONArray("relatedBusiness");
|
||||
if (jsonArray2 != null && jsonArray2.size() != 0){
|
||||
relatedBusiness = jsonArray2.toJSONString();
|
||||
}
|
||||
String createUser = datas.getString("createUser");
|
||||
String createMode = datas.getString("createMode");
|
||||
String visitorId = datas.getString("visitorId");
|
||||
JSONArray jsonArray3 = datas.getJSONArray("followedAgents");
|
||||
if (jsonArray3 != null && jsonArray3.size() != 0){
|
||||
followedAgents = jsonArray3.toJSONString();
|
||||
}
|
||||
JSONArray jsonArray4 = datas.getJSONArray("relatedCallSheet");
|
||||
if (jsonArray4 != null && jsonArray4.size() != 0){
|
||||
relatedCallSheet = jsonArray4.toJSONString();
|
||||
}
|
||||
JSONArray jsonArray5 = datas.getJSONArray("relatedWebchats");
|
||||
if (jsonArray5 != null && jsonArray5.size() != 0){
|
||||
relatedWebchats = jsonArray5.toJSONString();
|
||||
}
|
||||
String flowInfo = datas.getString("flowInfo");
|
||||
JSONArray stepFields = datas.getJSONArray("stepFields");
|
||||
|
||||
if (stepFields != null && stepFields.size() != 0){
|
||||
for (Object o :stepFields ){
|
||||
JSONObject test = (JSONObject) o;
|
||||
String name = test.getString("name");
|
||||
|
||||
|
||||
if (name.equals("出租车车牌号")){
|
||||
JSONObject xm = new JSONObject();
|
||||
xm.put("value", test.getString("value"));
|
||||
data.put("cph", xm );
|
||||
}
|
||||
|
||||
if (name.equals("司机姓名")){
|
||||
JSONObject xm = new JSONObject();
|
||||
xm.put("value", test.getString("value"));
|
||||
data.put("sjxm", xm );
|
||||
}
|
||||
|
||||
if (name.equals("司机服务卡监督号")){
|
||||
JSONObject xm = new JSONObject();
|
||||
xm.put("value", test.getString("value"));
|
||||
data.put("jdkh", xm );
|
||||
}
|
||||
|
||||
if (name.equals("司机电话")){
|
||||
JSONObject xm = new JSONObject();
|
||||
xm.put("value", test.getString("value"));
|
||||
data.put("sjdh", xm );
|
||||
}
|
||||
|
||||
if (name.equals("机构")){
|
||||
JSONObject xm = new JSONObject();
|
||||
xm.put("value", test.getString("value"));
|
||||
data.put("jg", xm );
|
||||
}
|
||||
|
||||
if (name.equals("分司")){
|
||||
JSONObject xm = new JSONObject();
|
||||
xm.put("value", test.getString("value"));
|
||||
data.put("fs", xm );
|
||||
}
|
||||
|
||||
if (name.equals("车队")){
|
||||
JSONObject xm = new JSONObject();
|
||||
xm.put("value", test.getString("value"));
|
||||
data.put("cd", xm );
|
||||
}
|
||||
|
||||
if (name.equals("分司负责人")){
|
||||
JSONObject xm = new JSONObject();
|
||||
xm.put("value", test.getString("value"));
|
||||
data.put("fsfz", xm );
|
||||
}
|
||||
|
||||
if (name.equals("乘车日期")){
|
||||
JSONObject xm = new JSONObject();
|
||||
xm.put("value", test.getString("value"));
|
||||
data.put("ccrq", xm );
|
||||
}
|
||||
|
||||
if (name.equals("开始时间")){
|
||||
JSONObject xm = new JSONObject();
|
||||
xm.put("value", test.getString("value"));
|
||||
data.put("kssj", xm );
|
||||
}
|
||||
|
||||
|
||||
if (name.equals("结束时间")){
|
||||
JSONObject xm = new JSONObject();
|
||||
xm.put("value", test.getString("value"));
|
||||
data.put("jssj", xm );
|
||||
}
|
||||
|
||||
if (name.equals("上车地点")){
|
||||
JSONObject xm = new JSONObject();
|
||||
xm.put("value", test.getString("value"));
|
||||
data.put("scdd", xm );
|
||||
}
|
||||
|
||||
if (name.equals("下车地点")){
|
||||
JSONObject xm = new JSONObject();
|
||||
xm.put("value", test.getString("value"));
|
||||
data.put("xcdd", xm );
|
||||
}
|
||||
|
||||
|
||||
if (name.equals("截图")){
|
||||
JSONObject xm = new JSONObject();
|
||||
// String string = test.getString("value");
|
||||
JSONArray jsonArray = new JSONArray();
|
||||
JSONArray value = test.getJSONArray("value");
|
||||
for (Object o1 : value) {
|
||||
JSONObject testa = (JSONObject) o1;
|
||||
String string = testa.getString("value");
|
||||
String file = File.filefapiaobuban(string);
|
||||
|
||||
jsonArray.add(file);
|
||||
|
||||
|
||||
}
|
||||
xm.put("value", jsonArray);
|
||||
data.put("fj", xm);
|
||||
}
|
||||
|
||||
|
||||
if (name.equals("详细描述(文本/截图)")){
|
||||
JSONObject xm = new JSONObject();
|
||||
xm.put("value", test.getString("value"));
|
||||
data.put("xxms", xm );
|
||||
}
|
||||
|
||||
if (name.equals("白龙马订单号")){
|
||||
JSONObject xm = new JSONObject();
|
||||
xm.put("value", test.getString("value"));
|
||||
data.put("blmddh", xm );
|
||||
}
|
||||
|
||||
if (name.equals("客服处理人")){
|
||||
JSONObject xm = new JSONObject();
|
||||
xm.put("value", test.getString("value"));
|
||||
data.put("kfclr", xm );
|
||||
}
|
||||
|
||||
|
||||
if (name.equals("当前状态")){
|
||||
JSONObject xm = new JSONObject();
|
||||
xm.put("value", test.getString("value"));
|
||||
data.put("zt", xm );
|
||||
}
|
||||
|
||||
|
||||
if (name.equals("备注")){
|
||||
JSONObject xm = new JSONObject();
|
||||
xm.put("value", test.getString("value"));
|
||||
data.put("bz", xm );
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
JSONObject fields1 = new JSONObject();
|
||||
fields1.put("value", fields);
|
||||
data.put("fields", fields1 );
|
||||
|
||||
JSONObject relatedBusiness1 = new JSONObject();
|
||||
relatedBusiness1.put("value", relatedBusiness);
|
||||
data.put("relatedbusiness", relatedBusiness1 );
|
||||
|
||||
JSONObject followedAgents1 = new JSONObject();
|
||||
followedAgents1.put("value", followedAgents);
|
||||
data.put("followedagents", followedAgents1 );
|
||||
|
||||
JSONObject relatedCallSheet1 = new JSONObject();
|
||||
relatedCallSheet1.put("value", relatedCallSheet);
|
||||
data.put("relatedcallsheet", relatedCallSheet1 );
|
||||
|
||||
JSONObject relatedWebchats1 = new JSONObject();
|
||||
relatedWebchats1.put("value", relatedWebchats);
|
||||
data.put("relatedwebchats", relatedWebchats1 );
|
||||
|
||||
JSONObject phone1 = new JSONObject();
|
||||
phone1.put("value", phone);
|
||||
data.put("phone", phone1 );
|
||||
|
||||
JSONObject id = new JSONObject();
|
||||
id.put("value", _id);
|
||||
data.put("id", id );
|
||||
|
||||
JSONObject customerId1 = new JSONObject();
|
||||
customerId1.put("value", customerId);
|
||||
data.put("customerid", customerId1 );
|
||||
|
||||
JSONObject user1 = new JSONObject();
|
||||
user1.put("value", user);
|
||||
data.put("user", user1 );
|
||||
|
||||
JSONObject createTime1 = new JSONObject();
|
||||
createTime1.put("value", createTime);
|
||||
data.put("createtime", createTime1 );
|
||||
|
||||
JSONObject createTimestamp1 = new JSONObject();
|
||||
createTimestamp1.put("value", createTimestamp);
|
||||
data.put("createtimestamp", createTimestamp1 );
|
||||
|
||||
JSONObject action1 = new JSONObject();
|
||||
action1.put("value", action);
|
||||
data.put("action", action1 );
|
||||
|
||||
JSONObject stepName1 = new JSONObject();
|
||||
stepName1.put("value", stepName);
|
||||
data.put("stepname", stepName1 );
|
||||
|
||||
JSONObject businessNumber1 = new JSONObject();
|
||||
businessNumber1.put("value", businessNumber);
|
||||
data.put("businessnumber", businessNumber1 );
|
||||
|
||||
JSONObject priority1 = new JSONObject();
|
||||
priority1.put("value", priority);
|
||||
data.put("priority", priority1 );
|
||||
|
||||
JSONObject category1 = new JSONObject();
|
||||
category1.put("value", category);
|
||||
data.put("category", category1 );
|
||||
|
||||
JSONObject createUser1 = new JSONObject();
|
||||
createUser1.put("value", createUser);
|
||||
data.put("createuser", createUser1 );
|
||||
|
||||
JSONObject createMode1 = new JSONObject();
|
||||
createMode1.put("value", createMode);
|
||||
data.put("createmode", createMode1 );
|
||||
|
||||
JSONObject visitorId1 = new JSONObject();
|
||||
visitorId1.put("value", visitorId);
|
||||
data.put("visitorid", visitorId1 );
|
||||
|
||||
JSONObject flowInfo1 = new JSONObject();
|
||||
flowInfo1.put("value", flowInfo);
|
||||
data.put("flowinfo", flowInfo1 );
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
jsonObject.put("data", data);
|
||||
String jsonString = jsonObject.toJSONString();
|
||||
V5utils.add(jsonString);
|
||||
|
||||
|
||||
|
||||
|
||||
return "200";
|
||||
}
|
||||
}
|
||||
@ -14,12 +14,13 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
public class JiShiDingDanChuLi {
|
||||
@PostMapping("/jishidingdanchuli")
|
||||
public String jishidingdanchuli(@RequestBody JSONObject datas) throws Exception {
|
||||
log.info("数据 " + datas);
|
||||
log.info("即使订单处理数据 " + datas);
|
||||
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("app_id", "68215c6cbaccd58c66796bc5");
|
||||
jsonObject.put("entry_id", "6821845bde8bbe9eed384eda");
|
||||
jsonObject.put("is_start_trigger", true);
|
||||
jsonObject.put("is_start_workflow", true);
|
||||
jsonObject.put("transaction_id", "transaction_id");
|
||||
JSONObject data = new JSONObject();
|
||||
|
||||
@ -70,8 +71,7 @@ public class JiShiDingDanChuLi {
|
||||
JSONArray stepFields = datas.getJSONArray("stepFields");
|
||||
|
||||
|
||||
|
||||
|
||||
if (stepFields != null && stepFields.size() != 0){
|
||||
|
||||
for (Object o :stepFields ){
|
||||
JSONObject test = (JSONObject) o;
|
||||
@ -158,6 +158,12 @@ public class JiShiDingDanChuLi {
|
||||
data.put("cd", xm );
|
||||
}
|
||||
|
||||
if (name.equals("订单情况")){
|
||||
JSONObject xm = new JSONObject();
|
||||
xm.put("value", test.getJSONArray("value"));
|
||||
data.put("ddqk", xm );
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@ -174,6 +180,9 @@ public class JiShiDingDanChuLi {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
315
src/main/java/com/example/sso/controller/NuoChe.java
Normal file
315
src/main/java/com/example/sso/controller/NuoChe.java
Normal file
@ -0,0 +1,315 @@
|
||||
package com.example.sso.controller;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.example.sso.dao.File;
|
||||
import com.example.sso.util.V5utils;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@Slf4j
|
||||
@RestController
|
||||
public class NuoChe {
|
||||
|
||||
@PostMapping("/nuoche")
|
||||
public String biaoyang(@RequestBody JSONObject datas) throws Exception {
|
||||
log.info("发票补办数据 " + datas);
|
||||
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("app_id", "68215c6cbaccd58c66796bc5");
|
||||
jsonObject.put("entry_id", "68a40ea50499bc38083b5ed8");
|
||||
jsonObject.put("is_start_trigger", true);
|
||||
jsonObject.put("is_start_workflow", true);
|
||||
jsonObject.put("transaction_id", "transaction_id");
|
||||
JSONObject data = new JSONObject();
|
||||
|
||||
|
||||
|
||||
|
||||
String fields = "";
|
||||
String relatedBusiness = "";
|
||||
String followedAgents = "";
|
||||
String relatedCallSheet = "";
|
||||
String relatedWebchats = "";
|
||||
|
||||
String phone = datas.getString("phone");
|
||||
String _id = datas.getString("_id");
|
||||
String customerId = datas.getString("customerId");
|
||||
String user = datas.getString("user");
|
||||
JSONArray jsonArray1 = datas.getJSONArray("fields");
|
||||
if (jsonArray1 != null && jsonArray1.size() != 0){
|
||||
fields = jsonArray1.toJSONString();
|
||||
}
|
||||
String createTime = datas.getString("createTime");
|
||||
Integer createTimestamp = datas.getInteger("createTimestamp");
|
||||
String action = datas.getString("action");
|
||||
String stepName = datas.getString("stepName");
|
||||
String businessNumber = datas.getString("businessNumber");
|
||||
String priority = datas.getString("priority");
|
||||
String category = datas.getString("category");
|
||||
JSONArray jsonArray2 = datas.getJSONArray("relatedBusiness");
|
||||
if (jsonArray2 != null && jsonArray2.size() != 0){
|
||||
relatedBusiness = jsonArray2.toJSONString();
|
||||
}
|
||||
String createUser = datas.getString("createUser");
|
||||
String createMode = datas.getString("createMode");
|
||||
String visitorId = datas.getString("visitorId");
|
||||
JSONArray jsonArray3 = datas.getJSONArray("followedAgents");
|
||||
if (jsonArray3 != null && jsonArray3.size() != 0){
|
||||
followedAgents = jsonArray3.toJSONString();
|
||||
}
|
||||
JSONArray jsonArray4 = datas.getJSONArray("relatedCallSheet");
|
||||
if (jsonArray4 != null && jsonArray4.size() != 0){
|
||||
relatedCallSheet = jsonArray4.toJSONString();
|
||||
}
|
||||
JSONArray jsonArray5 = datas.getJSONArray("relatedWebchats");
|
||||
if (jsonArray5 != null && jsonArray5.size() != 0){
|
||||
relatedWebchats = jsonArray5.toJSONString();
|
||||
}
|
||||
String flowInfo = datas.getString("flowInfo");
|
||||
JSONArray stepFields = datas.getJSONArray("stepFields");
|
||||
|
||||
if (stepFields != null && stepFields.size() != 0){
|
||||
for (Object o :stepFields ){
|
||||
JSONObject test = (JSONObject) o;
|
||||
String name = test.getString("name");
|
||||
|
||||
|
||||
if (name.equals("出租车车牌号")){
|
||||
JSONObject xm = new JSONObject();
|
||||
xm.put("value", test.getString("value"));
|
||||
data.put("cph", xm );
|
||||
}
|
||||
|
||||
if (name.equals("司机姓名")){
|
||||
JSONObject xm = new JSONObject();
|
||||
xm.put("value", test.getString("value"));
|
||||
data.put("sjxm", xm );
|
||||
}
|
||||
|
||||
if (name.equals("司机服务卡监督号")){
|
||||
JSONObject xm = new JSONObject();
|
||||
xm.put("value", test.getString("value"));
|
||||
data.put("jdkh", xm );
|
||||
}
|
||||
|
||||
if (name.equals("司机电话")){
|
||||
JSONObject xm = new JSONObject();
|
||||
xm.put("value", test.getString("value"));
|
||||
data.put("sjdh", xm );
|
||||
}
|
||||
|
||||
if (name.equals("机构")){
|
||||
JSONObject xm = new JSONObject();
|
||||
xm.put("value", test.getString("value"));
|
||||
data.put("jg", xm );
|
||||
}
|
||||
|
||||
if (name.equals("分司")){
|
||||
JSONObject xm = new JSONObject();
|
||||
xm.put("value", test.getString("value"));
|
||||
data.put("fs", xm );
|
||||
}
|
||||
|
||||
if (name.equals("车队")){
|
||||
JSONObject xm = new JSONObject();
|
||||
xm.put("value", test.getString("value"));
|
||||
data.put("cd", xm );
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
if (name.equals("服务情况详情")){
|
||||
JSONObject xm = new JSONObject();
|
||||
xm.put("value", test.getString("value"));
|
||||
data.put("xxms", xm );
|
||||
}
|
||||
|
||||
if (name.equals("分司负责人")){
|
||||
JSONObject xm = new JSONObject();
|
||||
xm.put("value", test.getString("value"));
|
||||
data.put("fsfz", xm );
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if (name.equals("截图")){
|
||||
JSONObject xm = new JSONObject();
|
||||
// String string = test.getString("value");
|
||||
JSONArray jsonArray = new JSONArray();
|
||||
JSONArray value = test.getJSONArray("value");
|
||||
for (Object o1 : value) {
|
||||
JSONObject testa = (JSONObject) o1;
|
||||
String string = testa.getString("value");
|
||||
String file = File.filebuoche(string);
|
||||
|
||||
jsonArray.add(file);
|
||||
|
||||
|
||||
}
|
||||
xm.put("value", jsonArray);
|
||||
data.put("fj", xm);
|
||||
}
|
||||
|
||||
|
||||
if (name.equals("客服处理人")){
|
||||
JSONObject xm = new JSONObject();
|
||||
xm.put("value", test.getString("value"));
|
||||
data.put("kfclr", xm );
|
||||
}
|
||||
|
||||
if (name.equals("当前状态")){
|
||||
JSONObject xm = new JSONObject();
|
||||
xm.put("value", test.getString("value"));
|
||||
data.put("now_state", xm );
|
||||
}
|
||||
|
||||
if (name.equals("备注")){
|
||||
JSONObject xm = new JSONObject();
|
||||
xm.put("value", test.getString("value"));
|
||||
data.put("bz", xm );
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
JSONObject fields1 = new JSONObject();
|
||||
fields1.put("value", fields);
|
||||
data.put("fields", fields1 );
|
||||
|
||||
JSONObject relatedBusiness1 = new JSONObject();
|
||||
relatedBusiness1.put("value", relatedBusiness);
|
||||
data.put("relatedbusiness", relatedBusiness1 );
|
||||
|
||||
JSONObject followedAgents1 = new JSONObject();
|
||||
followedAgents1.put("value", followedAgents);
|
||||
data.put("followedagents", followedAgents1 );
|
||||
|
||||
JSONObject relatedCallSheet1 = new JSONObject();
|
||||
relatedCallSheet1.put("value", relatedCallSheet);
|
||||
data.put("relatedcallsheet", relatedCallSheet1 );
|
||||
|
||||
JSONObject relatedWebchats1 = new JSONObject();
|
||||
relatedWebchats1.put("value", relatedWebchats);
|
||||
data.put("relatedwebchats", relatedWebchats1 );
|
||||
|
||||
JSONObject phone1 = new JSONObject();
|
||||
phone1.put("value", phone);
|
||||
data.put("phone", phone1 );
|
||||
|
||||
JSONObject id = new JSONObject();
|
||||
id.put("value", _id);
|
||||
data.put("id", id );
|
||||
|
||||
JSONObject customerId1 = new JSONObject();
|
||||
customerId1.put("value", customerId);
|
||||
data.put("customerid", customerId1 );
|
||||
|
||||
JSONObject user1 = new JSONObject();
|
||||
user1.put("value", user);
|
||||
data.put("user", user1 );
|
||||
|
||||
JSONObject createTime1 = new JSONObject();
|
||||
createTime1.put("value", createTime);
|
||||
data.put("createtime", createTime1 );
|
||||
|
||||
JSONObject createTimestamp1 = new JSONObject();
|
||||
createTimestamp1.put("value", createTimestamp);
|
||||
data.put("createtimestamp", createTimestamp1 );
|
||||
|
||||
JSONObject action1 = new JSONObject();
|
||||
action1.put("value", action);
|
||||
data.put("action", action1 );
|
||||
|
||||
JSONObject stepName1 = new JSONObject();
|
||||
stepName1.put("value", stepName);
|
||||
data.put("stepname", stepName1 );
|
||||
|
||||
JSONObject businessNumber1 = new JSONObject();
|
||||
businessNumber1.put("value", businessNumber);
|
||||
data.put("businessnumber", businessNumber1 );
|
||||
|
||||
JSONObject priority1 = new JSONObject();
|
||||
priority1.put("value", priority);
|
||||
data.put("priority", priority1 );
|
||||
|
||||
JSONObject category1 = new JSONObject();
|
||||
category1.put("value", category);
|
||||
data.put("category", category1 );
|
||||
|
||||
JSONObject createUser1 = new JSONObject();
|
||||
createUser1.put("value", createUser);
|
||||
data.put("createuser", createUser1 );
|
||||
|
||||
JSONObject createMode1 = new JSONObject();
|
||||
createMode1.put("value", createMode);
|
||||
data.put("createmode", createMode1 );
|
||||
|
||||
JSONObject visitorId1 = new JSONObject();
|
||||
visitorId1.put("value", visitorId);
|
||||
data.put("visitorid", visitorId1 );
|
||||
|
||||
JSONObject flowInfo1 = new JSONObject();
|
||||
flowInfo1.put("value", flowInfo);
|
||||
data.put("flowinfo", flowInfo1 );
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
jsonObject.put("data", data);
|
||||
String jsonString = jsonObject.toJSONString();
|
||||
V5utils.add(jsonString);
|
||||
|
||||
|
||||
|
||||
|
||||
return "200";
|
||||
}
|
||||
}
|
||||
259
src/main/java/com/example/sso/controller/OneOneSixChaBan.java
Normal file
259
src/main/java/com/example/sso/controller/OneOneSixChaBan.java
Normal file
@ -0,0 +1,259 @@
|
||||
package com.example.sso.controller;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.example.sso.dao.File;
|
||||
import com.example.sso.util.V5utils;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@Slf4j
|
||||
@RestController
|
||||
public class OneOneSixChaBan {
|
||||
|
||||
@PostMapping("/oneonesix")
|
||||
public String biaoyang(@RequestBody JSONObject datas) throws Exception {
|
||||
log.info("116数据 " + datas);
|
||||
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("app_id", "68215c6cbaccd58c66796bc5");
|
||||
jsonObject.put("entry_id", "68a40f160499bc38083b72a3");
|
||||
jsonObject.put("is_start_trigger", true);
|
||||
jsonObject.put("is_start_workflow", true);
|
||||
jsonObject.put("transaction_id", "transaction_id");
|
||||
JSONObject data = new JSONObject();
|
||||
|
||||
|
||||
|
||||
|
||||
String fields = "";
|
||||
String relatedBusiness = "";
|
||||
String followedAgents = "";
|
||||
String relatedCallSheet = "";
|
||||
String relatedWebchats = "";
|
||||
|
||||
String phone = datas.getString("phone");
|
||||
String _id = datas.getString("_id");
|
||||
String customerId = datas.getString("customerId");
|
||||
String user = datas.getString("user");
|
||||
JSONArray jsonArray1 = datas.getJSONArray("fields");
|
||||
if (jsonArray1 != null && jsonArray1.size() != 0){
|
||||
fields = jsonArray1.toJSONString();
|
||||
}
|
||||
String createTime = datas.getString("createTime");
|
||||
Integer createTimestamp = datas.getInteger("createTimestamp");
|
||||
String action = datas.getString("action");
|
||||
String stepName = datas.getString("stepName");
|
||||
String businessNumber = datas.getString("businessNumber");
|
||||
String priority = datas.getString("priority");
|
||||
String category = datas.getString("category");
|
||||
JSONArray jsonArray2 = datas.getJSONArray("relatedBusiness");
|
||||
if (jsonArray2 != null && jsonArray2.size() != 0){
|
||||
relatedBusiness = jsonArray2.toJSONString();
|
||||
}
|
||||
String createUser = datas.getString("createUser");
|
||||
String createMode = datas.getString("createMode");
|
||||
String visitorId = datas.getString("visitorId");
|
||||
JSONArray jsonArray3 = datas.getJSONArray("followedAgents");
|
||||
if (jsonArray3 != null && jsonArray3.size() != 0){
|
||||
followedAgents = jsonArray3.toJSONString();
|
||||
}
|
||||
JSONArray jsonArray4 = datas.getJSONArray("relatedCallSheet");
|
||||
if (jsonArray4 != null && jsonArray4.size() != 0){
|
||||
relatedCallSheet = jsonArray4.toJSONString();
|
||||
}
|
||||
JSONArray jsonArray5 = datas.getJSONArray("relatedWebchats");
|
||||
if (jsonArray5 != null && jsonArray5.size() != 0){
|
||||
relatedWebchats = jsonArray5.toJSONString();
|
||||
}
|
||||
String flowInfo = datas.getString("flowInfo");
|
||||
JSONArray stepFields = datas.getJSONArray("stepFields");
|
||||
|
||||
if (stepFields != null && stepFields.size() != 0){
|
||||
for (Object o :stepFields ){
|
||||
JSONObject test = (JSONObject) o;
|
||||
String name = test.getString("name");
|
||||
|
||||
|
||||
if (name.equals("详细描述(文本/截图)")){
|
||||
JSONObject xm = new JSONObject();
|
||||
xm.put("value", test.getString("value"));
|
||||
data.put("xxms", xm );
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if (name.equals("附件")){
|
||||
JSONObject xm = new JSONObject();
|
||||
// String string = test.getString("value");
|
||||
JSONArray jsonArray = new JSONArray();
|
||||
JSONArray value = test.getJSONArray("value");
|
||||
for (Object o1 : value) {
|
||||
JSONObject testa = (JSONObject) o1;
|
||||
String string = testa.getString("value");
|
||||
String file = File.fileoneonesix(string);
|
||||
|
||||
jsonArray.add(file);
|
||||
|
||||
|
||||
}
|
||||
xm.put("value", jsonArray);
|
||||
data.put("fj", xm);
|
||||
}
|
||||
|
||||
if (name.equals("客服处理人")){
|
||||
JSONObject xm = new JSONObject();
|
||||
xm.put("value", test.getString("value"));
|
||||
data.put("kfclr", xm );
|
||||
}
|
||||
|
||||
|
||||
if (name.equals("当前状态")){
|
||||
JSONObject xm = new JSONObject();
|
||||
xm.put("value", test.getString("value"));
|
||||
data.put("now_state", xm );
|
||||
}
|
||||
|
||||
if (name.equals("备注")){
|
||||
JSONObject xm = new JSONObject();
|
||||
xm.put("value", test.getString("value"));
|
||||
data.put("bz", xm );
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
JSONObject fields1 = new JSONObject();
|
||||
fields1.put("value", fields);
|
||||
data.put("fields", fields1 );
|
||||
|
||||
JSONObject relatedBusiness1 = new JSONObject();
|
||||
relatedBusiness1.put("value", relatedBusiness);
|
||||
data.put("relatedbusiness", relatedBusiness1 );
|
||||
|
||||
JSONObject followedAgents1 = new JSONObject();
|
||||
followedAgents1.put("value", followedAgents);
|
||||
data.put("followedagents", followedAgents1 );
|
||||
|
||||
JSONObject relatedCallSheet1 = new JSONObject();
|
||||
relatedCallSheet1.put("value", relatedCallSheet);
|
||||
data.put("relatedcallsheet", relatedCallSheet1 );
|
||||
|
||||
JSONObject relatedWebchats1 = new JSONObject();
|
||||
relatedWebchats1.put("value", relatedWebchats);
|
||||
data.put("relatedwebchats", relatedWebchats1 );
|
||||
|
||||
JSONObject phone1 = new JSONObject();
|
||||
phone1.put("value", phone);
|
||||
data.put("phone", phone1 );
|
||||
|
||||
JSONObject id = new JSONObject();
|
||||
id.put("value", _id);
|
||||
data.put("id", id );
|
||||
|
||||
JSONObject customerId1 = new JSONObject();
|
||||
customerId1.put("value", customerId);
|
||||
data.put("customerid", customerId1 );
|
||||
|
||||
JSONObject user1 = new JSONObject();
|
||||
user1.put("value", user);
|
||||
data.put("user", user1 );
|
||||
|
||||
JSONObject createTime1 = new JSONObject();
|
||||
createTime1.put("value", createTime);
|
||||
data.put("createtime", createTime1 );
|
||||
|
||||
JSONObject createTimestamp1 = new JSONObject();
|
||||
createTimestamp1.put("value", createTimestamp);
|
||||
data.put("createtimestamp", createTimestamp1 );
|
||||
|
||||
JSONObject action1 = new JSONObject();
|
||||
action1.put("value", action);
|
||||
data.put("action", action1 );
|
||||
|
||||
JSONObject stepName1 = new JSONObject();
|
||||
stepName1.put("value", stepName);
|
||||
data.put("stepname", stepName1 );
|
||||
|
||||
JSONObject businessNumber1 = new JSONObject();
|
||||
businessNumber1.put("value", businessNumber);
|
||||
data.put("businessnumber", businessNumber1 );
|
||||
|
||||
JSONObject priority1 = new JSONObject();
|
||||
priority1.put("value", priority);
|
||||
data.put("priority", priority1 );
|
||||
|
||||
JSONObject category1 = new JSONObject();
|
||||
category1.put("value", category);
|
||||
data.put("category", category1 );
|
||||
|
||||
JSONObject createUser1 = new JSONObject();
|
||||
createUser1.put("value", createUser);
|
||||
data.put("createuser", createUser1 );
|
||||
|
||||
JSONObject createMode1 = new JSONObject();
|
||||
createMode1.put("value", createMode);
|
||||
data.put("createmode", createMode1 );
|
||||
|
||||
JSONObject visitorId1 = new JSONObject();
|
||||
visitorId1.put("value", visitorId);
|
||||
data.put("visitorid", visitorId1 );
|
||||
|
||||
JSONObject flowInfo1 = new JSONObject();
|
||||
flowInfo1.put("value", flowInfo);
|
||||
data.put("flowinfo", flowInfo1 );
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
jsonObject.put("data", data);
|
||||
String jsonString = jsonObject.toJSONString();
|
||||
V5utils.add(jsonString);
|
||||
|
||||
|
||||
|
||||
|
||||
return "200";
|
||||
}
|
||||
}
|
||||
@ -20,6 +20,7 @@ public class PanZeShenSu {
|
||||
jsonObject.put("app_id", "68215c6cbaccd58c66796bc5");
|
||||
jsonObject.put("entry_id", "68218462baccd58c667ec3ab");
|
||||
jsonObject.put("is_start_trigger", true);
|
||||
jsonObject.put("is_start_workflow", true);
|
||||
jsonObject.put("transaction_id", "transaction_id");
|
||||
JSONObject data = new JSONObject();
|
||||
|
||||
@ -69,10 +70,7 @@ public class PanZeShenSu {
|
||||
String flowInfo = datas.getString("flowInfo");
|
||||
JSONArray stepFields = datas.getJSONArray("stepFields");
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if (stepFields != null && stepFields.size() != 0){
|
||||
for (Object o :stepFields ){
|
||||
JSONObject test = (JSONObject) o;
|
||||
String name = test.getString("name");
|
||||
@ -175,6 +173,14 @@ public class PanZeShenSu {
|
||||
}
|
||||
|
||||
|
||||
if (name.equals("申诉情况详情")){
|
||||
JSONObject xm = new JSONObject();
|
||||
xm.put("value", test.getString("value"));
|
||||
data.put("ssqkxq", xm );
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -189,6 +195,11 @@ public class PanZeShenSu {
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -20,6 +20,7 @@ public class RenGongFuWu {
|
||||
jsonObject.put("app_id", "68215c6cbaccd58c66796bc5");
|
||||
jsonObject.put("entry_id", "68218459baccd58c667ec2a3");
|
||||
jsonObject.put("is_start_trigger", true);
|
||||
jsonObject.put("is_start_workflow", true);
|
||||
jsonObject.put("transaction_id", "transaction_id");
|
||||
JSONObject data = new JSONObject();
|
||||
|
||||
@ -70,9 +71,7 @@ public class RenGongFuWu {
|
||||
JSONArray stepFields = datas.getJSONArray("stepFields");
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if (stepFields != null && stepFields.size() != 0){
|
||||
for (Object o :stepFields ){
|
||||
JSONObject test = (JSONObject) o;
|
||||
String name = test.getString("name");
|
||||
@ -108,7 +107,7 @@ public class RenGongFuWu {
|
||||
data.put("fsfz", xm );
|
||||
}
|
||||
|
||||
if (name.equals("详细描述截图")){
|
||||
if (name.equals("服务情况详情截图")){
|
||||
JSONObject xm = new JSONObject();
|
||||
// String string = test.getString("value");
|
||||
JSONArray jsonArray = new JSONArray();
|
||||
@ -176,6 +175,33 @@ public class RenGongFuWu {
|
||||
data.put("cd", xm );
|
||||
}
|
||||
|
||||
if (name.equals("服务情况详情")){
|
||||
JSONObject xm = new JSONObject();
|
||||
xm.put("value", test.getString("value"));
|
||||
data.put("fwqkxq", xm );
|
||||
}
|
||||
|
||||
|
||||
if (name.equals("详细描述截图")){
|
||||
JSONObject xm = new JSONObject();
|
||||
// String string = test.getString("value");
|
||||
JSONArray jsonArray = new JSONArray();
|
||||
JSONArray value = test.getJSONArray("value");
|
||||
for (Object o1 : value) {
|
||||
JSONObject testa = (JSONObject) o1;
|
||||
String string = testa.getString("value");
|
||||
String file = File.filexxmsjt(string);
|
||||
|
||||
jsonArray.add(file);
|
||||
|
||||
|
||||
}
|
||||
xm.put("value", jsonArray);
|
||||
log.info("人工服务截图 " + jsonArray);
|
||||
data.put("xxmsjt", xm);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -191,6 +217,10 @@ public class RenGongFuWu {
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -21,6 +21,7 @@ public class ShiGuJieBao {
|
||||
jsonObject.put("app_id", "68215c6cbaccd58c66796bc5");
|
||||
jsonObject.put("entry_id", "68218334baccd58c667e65a0");
|
||||
jsonObject.put("is_start_trigger", true);
|
||||
jsonObject.put("is_start_workflow", true);
|
||||
jsonObject.put("transaction_id", "transaction_id");
|
||||
|
||||
JSONObject data = new JSONObject();
|
||||
@ -39,7 +40,7 @@ public class ShiGuJieBao {
|
||||
String customerId = datas.getString("customerId");
|
||||
String user = datas.getString("user");
|
||||
JSONArray jsonArray1 = datas.getJSONArray("fields");
|
||||
if (jsonArray1.size() != 0){
|
||||
if (jsonArray1 != null && jsonArray1.size() != 0){
|
||||
fields = jsonArray1.toJSONString();
|
||||
}
|
||||
String createTime = datas.getString("createTime");
|
||||
@ -50,31 +51,29 @@ public class ShiGuJieBao {
|
||||
String priority = datas.getString("priority");
|
||||
String category = datas.getString("category");
|
||||
JSONArray jsonArray2 = datas.getJSONArray("relatedBusiness");
|
||||
if (jsonArray2.size() != 0){
|
||||
if (jsonArray2 != null && jsonArray2.size() != 0){
|
||||
relatedBusiness = jsonArray2.toJSONString();
|
||||
}
|
||||
String createUser = datas.getString("createUser");
|
||||
String createMode = datas.getString("createMode");
|
||||
String visitorId = datas.getString("visitorId");
|
||||
JSONArray jsonArray3 = datas.getJSONArray("followedAgents");
|
||||
if (jsonArray3.size() != 0){
|
||||
if (jsonArray3 != null && jsonArray3.size() != 0){
|
||||
followedAgents = jsonArray3.toJSONString();
|
||||
}
|
||||
JSONArray jsonArray4 = datas.getJSONArray("relatedCallSheet");
|
||||
if (jsonArray4.size() != 0){
|
||||
if (jsonArray4 != null && jsonArray4.size() != 0){
|
||||
relatedCallSheet = jsonArray4.toJSONString();
|
||||
}
|
||||
JSONArray jsonArray5 = datas.getJSONArray("relatedWebchats");
|
||||
if (jsonArray5.size() != 0){
|
||||
if (jsonArray5 != null && jsonArray5.size() != 0){
|
||||
relatedWebchats = jsonArray5.toJSONString();
|
||||
}
|
||||
String flowInfo = datas.getString("flowInfo");
|
||||
JSONArray stepFields = datas.getJSONArray("stepFields");
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if (stepFields != null && stepFields.size() != 0){
|
||||
for (Object o :stepFields ){
|
||||
JSONObject test = (JSONObject) o;
|
||||
String name = test.getString("name");
|
||||
@ -225,6 +224,10 @@ public class ShiGuJieBao {
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -33,7 +33,7 @@ public class SongHaoFangDaoBaoJing {
|
||||
jsonObject.put("vars",vars);
|
||||
jsonObject.put("count",1);
|
||||
String jsonString = jsonObject.toJSONString();
|
||||
System.out.println("我是参数 " +jsonString );
|
||||
System.out.println("我是fangdaobaoqjing参数 " +jsonString );
|
||||
String songhao = RongLianQiMo.songhao(jsonString);
|
||||
System.out.println(songhao);
|
||||
|
||||
|
||||
@ -34,7 +34,7 @@ public class SongHaoShenQingTongHua {
|
||||
jsonObject.put("vars",vars);
|
||||
jsonObject.put("count",1);
|
||||
String jsonString = jsonObject.toJSONString();
|
||||
System.out.println("我是参数 " +jsonString );
|
||||
System.out.println("我是shenqingtonghua参数 " +jsonString );
|
||||
String songhao = RongLianQiMo.songhao(jsonString);
|
||||
System.out.println(songhao);
|
||||
|
||||
|
||||
@ -34,7 +34,7 @@ public class SongHaoYuJieBaoJing {
|
||||
jsonObject.put("vars",vars);
|
||||
jsonObject.put("count",1);
|
||||
String jsonString = jsonObject.toJSONString();
|
||||
System.out.println("我是参数 " +jsonString );
|
||||
System.out.println("我是yujie参数 " +jsonString );
|
||||
String songhao = RongLianQiMo.songhao(jsonString);
|
||||
System.out.println(songhao);
|
||||
|
||||
|
||||
@ -20,6 +20,7 @@ public class YiShiWuPinZhaoHui {
|
||||
jsonObject.put("app_id", "68215c6cbaccd58c66796bc5");
|
||||
jsonObject.put("entry_id", "68215fcdde8bbe9eed3377d9");
|
||||
jsonObject.put("is_start_trigger", true);
|
||||
jsonObject.put("is_start_workflow", true);
|
||||
jsonObject.put("transaction_id", "transaction_id");
|
||||
JSONObject data = new JSONObject();
|
||||
|
||||
@ -70,9 +71,7 @@ public class YiShiWuPinZhaoHui {
|
||||
JSONArray stepFields = datas.getJSONArray("stepFields");
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if (stepFields != null && stepFields.size() != 0){
|
||||
for (Object o :stepFields ){
|
||||
JSONObject test = (JSONObject) o;
|
||||
String name = test.getString("name");
|
||||
@ -86,7 +85,7 @@ public class YiShiWuPinZhaoHui {
|
||||
|
||||
if (name.equals("联系电话")){
|
||||
JSONObject xm = new JSONObject();
|
||||
xm.put("value", test.getInteger("value"));
|
||||
xm.put("value", test.getString("value"));
|
||||
data.put("lxdh", xm );
|
||||
}
|
||||
|
||||
@ -230,6 +229,10 @@ public class YiShiWuPinZhaoHui {
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -13,12 +13,13 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
public class ZhiTouSu {
|
||||
@PostMapping("/zhitousu")
|
||||
public String zhitousu(@RequestBody JSONObject datas) {
|
||||
log.info("数据 " + datas);
|
||||
log.info("至投诉数据 " + datas);
|
||||
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("app_id", "68215c6cbaccd58c66796bc5");
|
||||
jsonObject.put("entry_id", "68216994de8bbe9eed354e6b");
|
||||
jsonObject.put("is_start_trigger", true);
|
||||
jsonObject.put("is_start_workflow", true);
|
||||
jsonObject.put("transaction_id", "transaction_id");
|
||||
JSONObject data = new JSONObject();
|
||||
|
||||
@ -68,10 +69,7 @@ public class ZhiTouSu {
|
||||
String flowInfo = datas.getString("flowInfo");
|
||||
JSONArray stepFields = datas.getJSONArray("stepFields");
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if (stepFields != null && stepFields.size() != 0){
|
||||
for (Object o :stepFields ){
|
||||
JSONObject test = (JSONObject) o;
|
||||
String name = test.getString("name");
|
||||
@ -85,7 +83,7 @@ public class ZhiTouSu {
|
||||
|
||||
if (name.equals("联系电话")){
|
||||
JSONObject xm = new JSONObject();
|
||||
xm.put("value", test.getInteger("value"));
|
||||
xm.put("value", test.getString("value"));
|
||||
data.put("lxdh", xm );
|
||||
}
|
||||
|
||||
@ -201,6 +199,11 @@ public class ZhiTouSu {
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -85,6 +85,51 @@ public class File {
|
||||
|
||||
|
||||
|
||||
//String imageUrl = "https://cc-kf-cos-tx.7moor-fs2.com/T00000001849/m7-business/2025-05-16/1747366015733/9e1bc250-3205-11f0-bef4-1bcbfb78473d/OIP-C.jpg"; // 替换为目标图片URL
|
||||
String substring = imageUrl.substring(imageUrl.lastIndexOf("/") + 1);
|
||||
String savePath = "/home/ai/file/"+substring; // 本地保存路径
|
||||
|
||||
URL url = new URL(imageUrl);
|
||||
InputStream in = url.openStream();
|
||||
FileOutputStream out = new FileOutputStream(savePath);
|
||||
|
||||
byte[] buffer = new byte[1024];
|
||||
int bytesRead;
|
||||
while ((bytesRead = in.read(buffer)) != -1) {
|
||||
out.write(buffer, 0, bytesRead);
|
||||
}
|
||||
|
||||
in.close();
|
||||
out.close();
|
||||
System.out.println("图片下载成功!");
|
||||
|
||||
|
||||
String keys = keys(substring, tokens);
|
||||
|
||||
|
||||
return keys;
|
||||
}
|
||||
|
||||
|
||||
public static String filecuishoulishijietu(String imageUrl) throws Exception {
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("app_id", "68215c6cbaccd58c66796bc5");
|
||||
jsonObject.put("entry_id", "68218464de8bbe9eed38500d");
|
||||
jsonObject.put("transaction_id", "transaction_id");
|
||||
String jsonString = jsonObject.toJSONString();
|
||||
String token = V5utils.token(jsonString);
|
||||
JSONObject jsonObject1 = JSON.parseObject(token);
|
||||
JSONArray tokenAndUrlList = jsonObject1.getJSONArray("token_and_url_list");
|
||||
String tokens = "";
|
||||
|
||||
for (Object o : tokenAndUrlList) {
|
||||
JSONObject test = (JSONObject) o;
|
||||
|
||||
tokens = test.getString("token");
|
||||
}
|
||||
|
||||
|
||||
|
||||
//String imageUrl = "https://cc-kf-cos-tx.7moor-fs2.com/T00000001849/m7-business/2025-05-16/1747366015733/9e1bc250-3205-11f0-bef4-1bcbfb78473d/OIP-C.jpg"; // 替换为目标图片URL
|
||||
String substring = imageUrl.substring(imageUrl.lastIndexOf("/") + 1);
|
||||
String savePath = "/home/ai/file/"+substring; // 本地保存路径
|
||||
@ -129,6 +174,50 @@ public class File {
|
||||
|
||||
|
||||
|
||||
//String imageUrl = "https://cc-kf-cos-tx.7moor-fs2.com/T00000001849/m7-business/2025-05-16/1747366015733/9e1bc250-3205-11f0-bef4-1bcbfb78473d/OIP-C.jpg"; // 替换为目标图片URL
|
||||
String substring = imageUrl.substring(imageUrl.lastIndexOf("/") + 1);
|
||||
String savePath = "/home/ai/file/"+substring; // 本地保存路径
|
||||
|
||||
URL url = new URL(imageUrl);
|
||||
InputStream in = url.openStream();
|
||||
FileOutputStream out = new FileOutputStream(savePath);
|
||||
|
||||
byte[] buffer = new byte[1024];
|
||||
int bytesRead;
|
||||
while ((bytesRead = in.read(buffer)) != -1) {
|
||||
out.write(buffer, 0, bytesRead);
|
||||
}
|
||||
|
||||
in.close();
|
||||
out.close();
|
||||
System.out.println("图片下载成功!");
|
||||
|
||||
|
||||
String keys = keys(substring, tokens);
|
||||
|
||||
|
||||
return keys;
|
||||
}
|
||||
|
||||
public static String filedingdanjieshuhouyiyangxxmstpsc(String imageUrl) throws Exception {
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("app_id", "68215c6cbaccd58c66796bc5");
|
||||
jsonObject.put("entry_id", "68218467de8bbe9eed3850e0");
|
||||
jsonObject.put("transaction_id", "transaction_id");
|
||||
String jsonString = jsonObject.toJSONString();
|
||||
String token = V5utils.token(jsonString);
|
||||
JSONObject jsonObject1 = JSON.parseObject(token);
|
||||
JSONArray tokenAndUrlList = jsonObject1.getJSONArray("token_and_url_list");
|
||||
String tokens = "";
|
||||
|
||||
for (Object o : tokenAndUrlList) {
|
||||
JSONObject test = (JSONObject) o;
|
||||
|
||||
tokens = test.getString("token");
|
||||
}
|
||||
|
||||
|
||||
|
||||
//String imageUrl = "https://cc-kf-cos-tx.7moor-fs2.com/T00000001849/m7-business/2025-05-16/1747366015733/9e1bc250-3205-11f0-bef4-1bcbfb78473d/OIP-C.jpg"; // 替换为目标图片URL
|
||||
String substring = imageUrl.substring(imageUrl.lastIndexOf("/") + 1);
|
||||
String savePath = "/home/ai/file/"+substring; // 本地保存路径
|
||||
@ -243,6 +332,51 @@ public class File {
|
||||
}
|
||||
|
||||
|
||||
public static String filexxmsjt(String imageUrl) throws Exception {
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("app_id", "68215c6cbaccd58c66796bc5");
|
||||
jsonObject.put("entry_id", "68218459baccd58c667ec2a3");
|
||||
jsonObject.put("transaction_id", "transaction_id");
|
||||
String jsonString = jsonObject.toJSONString();
|
||||
String token = V5utils.token(jsonString);
|
||||
JSONObject jsonObject1 = JSON.parseObject(token);
|
||||
JSONArray tokenAndUrlList = jsonObject1.getJSONArray("token_and_url_list");
|
||||
String tokens = "";
|
||||
|
||||
for (Object o : tokenAndUrlList) {
|
||||
JSONObject test = (JSONObject) o;
|
||||
|
||||
tokens = test.getString("token");
|
||||
}
|
||||
|
||||
|
||||
|
||||
//String imageUrl = "https://cc-kf-cos-tx.7moor-fs2.com/T00000001849/m7-business/2025-05-16/1747366015733/9e1bc250-3205-11f0-bef4-1bcbfb78473d/OIP-C.jpg"; // 替换为目标图片URL
|
||||
String substring = imageUrl.substring(imageUrl.lastIndexOf("/") + 1);
|
||||
String savePath = "/home/ai/file/"+substring; // 本地保存路径
|
||||
|
||||
URL url = new URL(imageUrl);
|
||||
InputStream in = url.openStream();
|
||||
FileOutputStream out = new FileOutputStream(savePath);
|
||||
|
||||
byte[] buffer = new byte[1024];
|
||||
int bytesRead;
|
||||
while ((bytesRead = in.read(buffer)) != -1) {
|
||||
out.write(buffer, 0, bytesRead);
|
||||
}
|
||||
|
||||
in.close();
|
||||
out.close();
|
||||
System.out.println("图片下载成功!");
|
||||
|
||||
|
||||
String keys = keys(substring, tokens);
|
||||
|
||||
|
||||
return keys;
|
||||
}
|
||||
|
||||
|
||||
public static String keys(String top, String token) throws Exception {
|
||||
CloseableHttpClient httpClient = HttpClients.createDefault();
|
||||
String url = "https://www.jiyuankeshang.com/_/file/upload/put_file";
|
||||
@ -269,4 +403,139 @@ public class File {
|
||||
return key;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
public static String filefapiaobuban(String imageUrl) throws Exception {
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("app_id", "68215c6cbaccd58c66796bc5");
|
||||
jsonObject.put("entry_id", "689ee10d0499bc38081092d2");
|
||||
jsonObject.put("transaction_id", "transaction_id");
|
||||
String jsonString = jsonObject.toJSONString();
|
||||
String token = V5utils.token(jsonString);
|
||||
JSONObject jsonObject1 = JSON.parseObject(token);
|
||||
JSONArray tokenAndUrlList = jsonObject1.getJSONArray("token_and_url_list");
|
||||
String tokens = "";
|
||||
|
||||
for (Object o : tokenAndUrlList) {
|
||||
JSONObject test = (JSONObject) o;
|
||||
|
||||
tokens = test.getString("token");
|
||||
}
|
||||
|
||||
|
||||
|
||||
//String imageUrl = "https://cc-kf-cos-tx.7moor-fs2.com/T00000001849/m7-business/2025-05-16/1747366015733/9e1bc250-3205-11f0-bef4-1bcbfb78473d/OIP-C.jpg"; // 替换为目标图片URL
|
||||
String substring = imageUrl.substring(imageUrl.lastIndexOf("/") + 1);
|
||||
String savePath = "/home/ai/file/"+substring; // 本地保存路径
|
||||
|
||||
URL url = new URL(imageUrl);
|
||||
InputStream in = url.openStream();
|
||||
FileOutputStream out = new FileOutputStream(savePath);
|
||||
|
||||
byte[] buffer = new byte[1024];
|
||||
int bytesRead;
|
||||
while ((bytesRead = in.read(buffer)) != -1) {
|
||||
out.write(buffer, 0, bytesRead);
|
||||
}
|
||||
|
||||
in.close();
|
||||
out.close();
|
||||
System.out.println("图片下载成功!");
|
||||
|
||||
|
||||
String keys = keys(substring, tokens);
|
||||
|
||||
|
||||
return keys;
|
||||
}
|
||||
|
||||
public static String filebuoche(String imageUrl) throws Exception {
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("app_id", "68215c6cbaccd58c66796bc5");
|
||||
jsonObject.put("entry_id", "68a40ea50499bc38083b5ed8");
|
||||
jsonObject.put("transaction_id", "transaction_id");
|
||||
String jsonString = jsonObject.toJSONString();
|
||||
String token = V5utils.token(jsonString);
|
||||
JSONObject jsonObject1 = JSON.parseObject(token);
|
||||
JSONArray tokenAndUrlList = jsonObject1.getJSONArray("token_and_url_list");
|
||||
String tokens = "";
|
||||
|
||||
for (Object o : tokenAndUrlList) {
|
||||
JSONObject test = (JSONObject) o;
|
||||
|
||||
tokens = test.getString("token");
|
||||
}
|
||||
|
||||
|
||||
|
||||
//String imageUrl = "https://cc-kf-cos-tx.7moor-fs2.com/T00000001849/m7-business/2025-05-16/1747366015733/9e1bc250-3205-11f0-bef4-1bcbfb78473d/OIP-C.jpg"; // 替换为目标图片URL
|
||||
String substring = imageUrl.substring(imageUrl.lastIndexOf("/") + 1);
|
||||
String savePath = "/home/ai/file/"+substring; // 本地保存路径
|
||||
|
||||
URL url = new URL(imageUrl);
|
||||
InputStream in = url.openStream();
|
||||
FileOutputStream out = new FileOutputStream(savePath);
|
||||
|
||||
byte[] buffer = new byte[1024];
|
||||
int bytesRead;
|
||||
while ((bytesRead = in.read(buffer)) != -1) {
|
||||
out.write(buffer, 0, bytesRead);
|
||||
}
|
||||
|
||||
in.close();
|
||||
out.close();
|
||||
System.out.println("图片下载成功!");
|
||||
|
||||
|
||||
String keys = keys(substring, tokens);
|
||||
|
||||
|
||||
return keys;
|
||||
}
|
||||
|
||||
|
||||
public static String fileoneonesix(String imageUrl) throws Exception {
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("app_id", "68215c6cbaccd58c66796bc5");
|
||||
jsonObject.put("entry_id", "68a40f160499bc38083b72a3");
|
||||
jsonObject.put("transaction_id", "transaction_id");
|
||||
String jsonString = jsonObject.toJSONString();
|
||||
String token = V5utils.token(jsonString);
|
||||
JSONObject jsonObject1 = JSON.parseObject(token);
|
||||
JSONArray tokenAndUrlList = jsonObject1.getJSONArray("token_and_url_list");
|
||||
String tokens = "";
|
||||
|
||||
for (Object o : tokenAndUrlList) {
|
||||
JSONObject test = (JSONObject) o;
|
||||
|
||||
tokens = test.getString("token");
|
||||
}
|
||||
|
||||
|
||||
|
||||
//String imageUrl = "https://cc-kf-cos-tx.7moor-fs2.com/T00000001849/m7-business/2025-05-16/1747366015733/9e1bc250-3205-11f0-bef4-1bcbfb78473d/OIP-C.jpg"; // 替换为目标图片URL
|
||||
String substring = imageUrl.substring(imageUrl.lastIndexOf("/") + 1);
|
||||
String savePath = "/home/ai/file/"+substring; // 本地保存路径
|
||||
|
||||
URL url = new URL(imageUrl);
|
||||
InputStream in = url.openStream();
|
||||
FileOutputStream out = new FileOutputStream(savePath);
|
||||
|
||||
byte[] buffer = new byte[1024];
|
||||
int bytesRead;
|
||||
while ((bytesRead = in.read(buffer)) != -1) {
|
||||
out.write(buffer, 0, bytesRead);
|
||||
}
|
||||
|
||||
in.close();
|
||||
out.close();
|
||||
System.out.println("图片下载成功!");
|
||||
|
||||
|
||||
String keys = keys(substring, tokens);
|
||||
|
||||
|
||||
return keys;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user