|
|
@@ -11,6 +11,7 @@ import cn.hutool.json.JSONUtil;
|
|
|
import com.juxin.client.websocket.constant.GfConstants;
|
|
|
import com.juxin.client.websocket.enums.WebsocketTypeEnum;
|
|
|
import com.juxin.client.websocket.ppojo.BankCardSubjectResult;
|
|
|
+import com.juxin.client.websocket.ppojo.DigitalRmbSubjectResult;
|
|
|
import com.juxin.client.websocket.ppojo.WebsocketInfo;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.scheduling.annotation.Scheduled;
|
|
|
@@ -175,7 +176,7 @@ public class FindTask {
|
|
|
}
|
|
|
} catch (Exception e) {
|
|
|
System.out.println("出现位置异常*******************:" + message);
|
|
|
- throw new RuntimeException(e);
|
|
|
+// throw new RuntimeException(e);
|
|
|
}
|
|
|
|
|
|
}
|
|
|
@@ -219,6 +220,10 @@ public class FindTask {
|
|
|
System.out.println("开始bankOwnerCommit 银行卡主体提交1111111" + "*********************************************");
|
|
|
result = bankSubjectCommitTask(reqJson);
|
|
|
break;
|
|
|
+ case "digitalRmbSubjectCommit":
|
|
|
+ System.out.println("digitalRmbSubjectCommit 数字人民币主体提交1111111" + "*********************************************");
|
|
|
+ result = digitalRmbSubjectCommitTask(reqJson);
|
|
|
+ break;
|
|
|
default:
|
|
|
break;
|
|
|
}
|
|
|
@@ -461,13 +466,45 @@ public class FindTask {
|
|
|
return JSONUtil.toJsonStr(result);
|
|
|
}
|
|
|
|
|
|
+ public String digitalRmbSubjectCommitTask(Object reqJson) {
|
|
|
+ JSONObject jsonObject = JSONUtil.parseObj(reqJson);
|
|
|
+ Map<String, Object> result = new HashMap<>();
|
|
|
+ result.put("infoType", "over");
|
|
|
+ result.put("postType", "python");
|
|
|
+ result.put("methodType", "digitalRmbSubjectCommit");
|
|
|
+ Map<String, Object> req = new HashMap<>();
|
|
|
+ req.put("recordId", jsonObject.get("groupId"));
|
|
|
+ req.put("groupId", jsonObject.get("groupId"));
|
|
|
+ req.put("jobState", status[RandomUtil.randomInt(0, 6)]);
|
|
|
+ List<Map<String, String>> split = new ArrayList<>();
|
|
|
+ List<Map<String, String>> list = jsonObject.get("list", List.class);
|
|
|
+ String jobState = status[RandomUtil.randomInt(0, 6)];
|
|
|
+ jobState = "success";
|
|
|
+ req.put("jobState", jobState);
|
|
|
+ if (Objects.equals(jobState, "success")) {
|
|
|
+ list.forEach(e -> {
|
|
|
+ Map<String, String> map = new HashMap<>();
|
|
|
+ map.put("applicationid", IdUtil.fastSimpleUUID());
|
|
|
+ map.put("bankName", e.get("bankName"));
|
|
|
+ map.put("result", "0000");
|
|
|
+ map.put("account", e.get("walletId"));
|
|
|
+ split.add(map);
|
|
|
+ });
|
|
|
+ req.put("digitalRmbSubjectSplits", split);
|
|
|
+ } else {
|
|
|
+ req.put("errorMsg", ERR_MSG[RandomUtil.randomInt(0, 6)]);
|
|
|
+ }
|
|
|
+ result.put("reqJson", req);
|
|
|
+ return JSONUtil.toJsonStr(result);
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 回捞任务
|
|
|
*
|
|
|
* @param bean
|
|
|
* @return
|
|
|
*/
|
|
|
- public String searchTask(WebsocketInfo bean) {
|
|
|
+ public String searchTask(WebsocketInfo bean) throws Exception{
|
|
|
String result = "";
|
|
|
String methodType = bean.getMethodType();
|
|
|
if (methodType == null || methodType.equals("")) {
|
|
|
@@ -497,6 +534,12 @@ public class FindTask {
|
|
|
System.out.println("开始bankOwnerResult 银行卡主体结果回捞" + "--------------------------------------");
|
|
|
result = bankSubjectResultTask(reqJson);
|
|
|
break;
|
|
|
+ case "digitalRmbSubjectResult":
|
|
|
+ System.out.println("digitalRmbSubjectResult 数字人民币主体结果回捞" + "--------------------------------------");
|
|
|
+ Thread.sleep(1000 * 30);
|
|
|
+
|
|
|
+ result = digitalRmbSubjectResultTask(reqJson);
|
|
|
+ break;
|
|
|
default:
|
|
|
break;
|
|
|
}
|
|
|
@@ -523,9 +566,9 @@ public class FindTask {
|
|
|
} else {
|
|
|
req.put("valueCount", 0);
|
|
|
result.put("reqJson", req);
|
|
|
- FileUtil.copy(FileUtil.file("excel/流水空文件.xlsx")
|
|
|
- , FileUtil.file(Objects.toString(param.get("file_path")))
|
|
|
- , true);
|
|
|
+// FileUtil.copy(FileUtil.file("excel/流水空文件.xlsx")
|
|
|
+// , FileUtil.file(Objects.toString(param.get("file_path")))
|
|
|
+// , true);
|
|
|
}
|
|
|
return JSONUtil.toJsonStr(result);
|
|
|
}
|
|
|
@@ -597,17 +640,18 @@ public class FindTask {
|
|
|
Map<String, Object> req = new HashMap<>();
|
|
|
req.put("applicationId", param.get("applicationid"));
|
|
|
String splitResult = SPLIT_RESULT[RandomUtil.randomInt(0, 10)];
|
|
|
+ String filePath = "E:\\workspace\\jx\\workSpace\\rpaClient\\client\\excel\\第三方全账户.xlsx";
|
|
|
req.put("status", splitResult);
|
|
|
if (Objects.equals(splitResult, "机构已反馈")) {
|
|
|
req.put("valueCount", RandomUtil.randomInt(0, 10000));
|
|
|
result.put("reqJson", req);
|
|
|
- FileUtil.copy(FileUtil.file("excel/第三方全账户.xlsx")
|
|
|
+ FileUtil.copy(FileUtil.file(filePath)
|
|
|
, FileUtil.file(Objects.toString(param.get("file_path")))
|
|
|
, true);
|
|
|
} else {
|
|
|
req.put("valueCount", 0);
|
|
|
result.put("reqJson", req);
|
|
|
- FileUtil.copy(FileUtil.file("excel/第三方全账户空文件.xlsx")
|
|
|
+ FileUtil.copy(FileUtil.file(filePath)
|
|
|
, FileUtil.file(Objects.toString(param.get("file_path")))
|
|
|
, true);
|
|
|
}
|
|
|
@@ -637,9 +681,9 @@ public class FindTask {
|
|
|
} else {
|
|
|
req.put("valueCount", 0);
|
|
|
result.put("reqJson", req);
|
|
|
- FileUtil.copy(FileUtil.file("excel/银行卡全账户空文件.xlsx")
|
|
|
- , FileUtil.file(Objects.toString(param.get("file_path")))
|
|
|
- , true);
|
|
|
+// FileUtil.copy(FileUtil.file("excel/银行卡全账户空文件.xlsx")
|
|
|
+// , FileUtil.file(Objects.toString(param.get("file_path")))
|
|
|
+// , true);
|
|
|
}
|
|
|
return JSONUtil.toJsonStr(result);
|
|
|
}
|
|
|
@@ -758,6 +802,59 @@ public class FindTask {
|
|
|
return JSONUtil.toJsonStr(result);
|
|
|
}
|
|
|
|
|
|
+ public String digitalRmbSubjectResultTask(Object reqJson) {
|
|
|
+ JSONObject jsonObject = JSONUtil.parseObj(reqJson);
|
|
|
+ JSONObject param = jsonObject.get("params", JSONObject.class);
|
|
|
+ Map<String, Object> result = new HashMap<>();
|
|
|
+ result.put("infoType", "result");
|
|
|
+ result.put("postType", "python");
|
|
|
+ result.put("methodType", "digitalRmbSubjectResult");
|
|
|
+ Map<String, Object> req = new HashMap<>();
|
|
|
+ req.put("applicationId", param.get("applicationid"));
|
|
|
+ String splitResult = SPLIT_RESULT[RandomUtil.randomInt(0, 10)];
|
|
|
+ splitResult = "机构已反馈";
|
|
|
+ req.put("status", splitResult);
|
|
|
+ if (Objects.equals(splitResult, "机构已反馈")) {
|
|
|
+ req.put("valueCount", RandomUtil.randomInt(0, 10000));
|
|
|
+
|
|
|
+ DigitalRmbSubjectResult digitalRmbSubjectResult = new DigitalRmbSubjectResult();
|
|
|
+ digitalRmbSubjectResult.setApplicationId(String.valueOf(param.get("applicationid")));
|
|
|
+ digitalRmbSubjectResult.setIp("192.168.1.1");
|
|
|
+ digitalRmbSubjectResult.setImei("8080");
|
|
|
+ digitalRmbSubjectResult.setQueryResult("1");
|
|
|
+ digitalRmbSubjectResult.setMac("xx");
|
|
|
+ digitalRmbSubjectResult.setCustomerName("张三");
|
|
|
+ digitalRmbSubjectResult.setWalletName("数字钱包 001");
|
|
|
+ digitalRmbSubjectResult.setWalletType("01");
|
|
|
+ digitalRmbSubjectResult.setWalletOpenTime("2024-01-01 10:00:00");
|
|
|
+ digitalRmbSubjectResult.setWalletOrgCode("ORG001");
|
|
|
+ digitalRmbSubjectResult.setLicenseType("01");
|
|
|
+ digitalRmbSubjectResult.setWalletId("WALLET001");
|
|
|
+ digitalRmbSubjectResult.setWalletStatus("01");
|
|
|
+ digitalRmbSubjectResult.setWalletCloseTime("1111");
|
|
|
+ digitalRmbSubjectResult.setWalletPhone("13800138000");
|
|
|
+ digitalRmbSubjectResult.setIdNumber("110101199001011234");
|
|
|
+ digitalRmbSubjectResult.setParentWalletId("111");
|
|
|
+ digitalRmbSubjectResult.setFrozenAmount("0.00");
|
|
|
+ digitalRmbSubjectResult.setOpenMethod("01");
|
|
|
+ digitalRmbSubjectResult.setBoundBankCardJson("{}");
|
|
|
+ digitalRmbSubjectResult.setRegisteredBankCardJson("{}");
|
|
|
+
|
|
|
+ digitalRmbSubjectResult.setWalletOrgCode("ORG001");
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ req.put("digitalRmbSubjectResult", digitalRmbSubjectResult);
|
|
|
+ result.put("reqJson", req);
|
|
|
+
|
|
|
+ } else {
|
|
|
+ req.put("valueCount", 0);
|
|
|
+ result.put("reqJson", req);
|
|
|
+
|
|
|
+ }
|
|
|
+ return JSONUtil.toJsonStr(result);
|
|
|
+ }
|
|
|
+
|
|
|
public static void main(String[] args) {
|
|
|
FileUtil.copy(FileUtil.file("excel/6226890438342486.xlsx")
|
|
|
, FileUtil.file("C:\\Users\\EDY\\Desktop\\需求\\银行卡查询\\test.xlsx")
|