3 Commits 7e5fecb90a ... b26e27c39e

Author SHA1 Message Date
  juxin_zhenghao b26e27c39e 去除数据库相关代码 仅保留client功能 1 month ago
  juxin_zhenghao 5bf85d897c Merge remote-tracking branch 'origin/master' 1 month ago
  juxin_zhenghao 73617941a8 添加类型 数字人民币主体 1 month ago

+ 11 - 11
pom.xml

@@ -65,17 +65,17 @@
             <version>5.8.1</version>
         </dependency>
 
-        <dependency>
-            <groupId>mysql</groupId>
-            <artifactId>mysql-connector-java</artifactId>
-        </dependency>
-
-        <!-- 阿里数据库连接池 -->
-        <dependency>
-            <groupId>com.alibaba</groupId>
-            <artifactId>druid-spring-boot-starter</artifactId>
-            <version>1.2.11</version>
-        </dependency>
+<!--        <dependency>-->
+<!--            <groupId>mysql</groupId>-->
+<!--            <artifactId>mysql-connector-java</artifactId>-->
+<!--        </dependency>-->
+
+<!--        &lt;!&ndash; 阿里数据库连接池 &ndash;&gt;-->
+<!--        <dependency>-->
+<!--            <groupId>com.alibaba</groupId>-->
+<!--            <artifactId>druid-spring-boot-starter</artifactId>-->
+<!--            <version>1.2.11</version>-->
+<!--        </dependency>-->
 
         <dependency>
             <groupId>junit</groupId>

+ 10 - 2
src/main/java/com/juxin/client/ClientApplication.java

@@ -3,11 +3,19 @@ package com.juxin.client;
 import org.mybatis.spring.annotation.MapperScan;
 import org.springframework.boot.SpringApplication;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
+import org.springframework.boot.autoconfigure.jdbc.DataSourceTransactionManagerAutoConfiguration;
+import org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration;
 import org.springframework.scheduling.annotation.EnableScheduling;
 
-@SpringBootApplication
+
 @EnableScheduling
-@MapperScan(basePackages = "com.juxin.**.mapper")
+//@MapperScan(basePackages = "com.juxin.**.mapper")
+@SpringBootApplication(exclude = {
+        DataSourceAutoConfiguration.class,
+        DataSourceTransactionManagerAutoConfiguration.class,
+        HibernateJpaAutoConfiguration.class
+})
 public class ClientApplication {
 
     public static void main(String[] args) {

+ 17 - 17
src/main/java/com/juxin/client/rpa/mapper/MachineLicenseMapper.java

@@ -1,17 +1,17 @@
-package com.juxin.client.rpa.mapper;
-
-import com.juxin.client.rpa.dto.MachineLicenseFilterDto;
-import com.juxin.client.rpa.dto.MachineLicensePo;
-import org.apache.ibatis.annotations.Mapper;
-import org.springframework.stereotype.Repository;
-
-import java.util.List;
-
-@Mapper
-public interface MachineLicenseMapper {
-    void insert(MachineLicensePo po);
-
-    List<MachineLicensePo> selectMachineLicense(MachineLicenseFilterDto dto);
-    void update(MachineLicensePo po);
-    void deleteByPrimaryKey(Long id);
-}
+//package com.juxin.client.rpa.mapper;
+//
+//import com.juxin.client.rpa.dto.MachineLicenseFilterDto;
+//import com.juxin.client.rpa.dto.MachineLicensePo;
+//import org.apache.ibatis.annotations.Mapper;
+//import org.springframework.stereotype.Repository;
+//
+//import java.util.List;
+//
+//@Mapper
+//public interface MachineLicenseMapper {
+//    void insert(MachineLicensePo po);
+//
+//    List<MachineLicensePo> selectMachineLicense(MachineLicenseFilterDto dto);
+//    void update(MachineLicensePo po);
+//    void deleteByPrimaryKey(Long id);
+//}

+ 79 - 79
src/main/java/com/juxin/client/rpa/test/LicenseManager.java

@@ -1,84 +1,84 @@
-package com.juxin.client.rpa.test;
-
-import com.google.gson.Gson;
-import com.juxin.client.rpa.constant.TaieOcConstants;
-import com.juxin.client.rpa.constant.TaieOcManageCode;
-import com.juxin.client.rpa.dto.DubboResult;
-import com.juxin.client.rpa.dto.MachineLicenseAcquireReqDto;
-import com.juxin.client.rpa.dto.MachineLicensePo;
-import com.juxin.client.rpa.dto.MachineLicenseRespDto;
-import com.juxin.client.rpa.mapper.MachineLicenseMapper;
-import com.juxin.client.rpa.utils.SM2Utils;
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.interceptor.TransactionAspectSupport;
-
-import java.text.SimpleDateFormat;
-import java.util.Calendar;
-import java.util.Date;
-
-@Service
-@Slf4j
-public class LicenseManager {
-    private static final Gson gson = new Gson();
-
-    @Autowired
-    private MachineLicenseMapper machineLicenseMapper;
-
-    public DubboResult<MachineLicenseRespDto> createLicense(MachineLicenseAcquireReqDto reqDto, String datetime) {
-        // 根据机器信息判定是否需要登录
-        DubboResult<MachineLicenseRespDto> result;
-        try {
-            SimpleDateFormat sdf = new SimpleDateFormat(TaieOcConstants.DATE_LONG_FORMAT);
-//            Calendar cal = Calendar.getInstance();
-//            cal.add(Calendar.YEAR, licenseExpireDate);
-//          时间戳毫秒设置为零,对应处理入库时间预防 秒级四舍五入情况,导致入库时间+1s,导致rpa登录校验失败
-//            cal.set(Calendar.MILLISECOND, 0); //毫秒
+//package com.juxin.client.rpa.test;
+//
+//import com.google.gson.Gson;
+//import com.juxin.client.rpa.constant.TaieOcConstants;
+//import com.juxin.client.rpa.constant.TaieOcManageCode;
+//import com.juxin.client.rpa.dto.DubboResult;
+//import com.juxin.client.rpa.dto.MachineLicenseAcquireReqDto;
+//import com.juxin.client.rpa.dto.MachineLicensePo;
+//import com.juxin.client.rpa.dto.MachineLicenseRespDto;
+//import com.juxin.client.rpa.mapper.MachineLicenseMapper;
+//import com.juxin.client.rpa.utils.SM2Utils;
+//import lombok.extern.slf4j.Slf4j;
+//import org.springframework.beans.factory.annotation.Autowired;
+//import org.springframework.stereotype.Service;
+//import org.springframework.transaction.interceptor.TransactionAspectSupport;
+//
+//import java.text.SimpleDateFormat;
+//import java.util.Calendar;
+//import java.util.Date;
+//
+//@Service
+//@Slf4j
+//public class LicenseManager {
+//    private static final Gson gson = new Gson();
+//
+//    @Autowired
+//    private MachineLicenseMapper machineLicenseMapper;
+//
+//    public DubboResult<MachineLicenseRespDto> createLicense(MachineLicenseAcquireReqDto reqDto, String datetime) {
+//        // 根据机器信息判定是否需要登录
+//        DubboResult<MachineLicenseRespDto> result;
+//        try {
 //            SimpleDateFormat sdf = new SimpleDateFormat(TaieOcConstants.DATE_LONG_FORMAT);
-//            DubboResult<SmartRobotDto> smartRobotResult = robotManager.queryRobotByKey(reqDto.getMachineCode() + reqDto.getUser());
-//            if (!smartRobotResult.success()) {
-//                return DubboResult.newFailure(smartRobotResult.getCode(), smartRobotResult.getMessage());
-//            }
-            // 先判断是否获取过license信息
-//            List<MachineLicensePo> machineLicensePos = machineLicenseMapper.selectMachineLicense(MachineLicenseFilterDto.MachineLicenseFilterBuilder()
+////            Calendar cal = Calendar.getInstance();
+////            cal.add(Calendar.YEAR, licenseExpireDate);
+////          时间戳毫秒设置为零,对应处理入库时间预防 秒级四舍五入情况,导致入库时间+1s,导致rpa登录校验失败
+////            cal.set(Calendar.MILLISECOND, 0); //毫秒
+////            SimpleDateFormat sdf = new SimpleDateFormat(TaieOcConstants.DATE_LONG_FORMAT);
+////            DubboResult<SmartRobotDto> smartRobotResult = robotManager.queryRobotByKey(reqDto.getMachineCode() + reqDto.getUser());
+////            if (!smartRobotResult.success()) {
+////                return DubboResult.newFailure(smartRobotResult.getCode(), smartRobotResult.getMessage());
+////            }
+//            // 先判断是否获取过license信息
+////            List<MachineLicensePo> machineLicensePos = machineLicenseMapper.selectMachineLicense(MachineLicenseFilterDto.MachineLicenseFilterBuilder()
+////                    .machineKey(reqDto.getMachineCode() + reqDto.getUser())
+////                    .licenseType(reqDto.getLicenseType())
+////                    .machineType(reqDto.getMachineType())
+////                    .requestParam(reqDto.getParamsMap() == null ? TaieOcConstants.EMPTY_STRING : gson.toJson(reqDto.getParamsMap()))
+////                    .build());
+////            if (CollectionUtils.isNotEmpty(machineLicensePos)) {
+////                return DubboResult.newSuccess(machineLicensePos.get(0).createRespDto(smartRobotResult.getObject().getAuthState()));
+////            }
+//            // 获取license信息
+////            Date endTime = cal.getTime();
+//            Date endTime = sdf.parse(datetime);
+//            String license = SM2Utils.generateLicense(reqDto.getLicenseType(), reqDto.getMachineType()
+//                    , sdf.format(endTime), reqDto.getParamsMap());
+//
+//            // license申请信息落库
+//            MachineLicensePo licensePo = MachineLicensePo.builder()
+//                    .license(license)
 //                    .machineKey(reqDto.getMachineCode() + reqDto.getUser())
-//                    .licenseType(reqDto.getLicenseType())
 //                    .machineType(reqDto.getMachineType())
 //                    .requestParam(reqDto.getParamsMap() == null ? TaieOcConstants.EMPTY_STRING : gson.toJson(reqDto.getParamsMap()))
+//                    .startTime(Calendar.getInstance().getTime())
+//                    .endTime(endTime)
+//                    .licenseType(reqDto.getLicenseType())
+//                    .build();
+//            machineLicenseMapper.insert(licensePo);
+//            log.info("入库许可数据信息licensePo = {MachineLicensePo@7487} \"MachineLicensePo(id=null, machineKey=PE3ZVJ9NS9592TJS6XG06CREWC3ZP9T3FHAD5TVCXSPAN50872M0admin, machineType=design, license=3045022054ae9fe57b7bb8c0489bd435e7c1c18e128d9fb0a6351ea381065226060c2bc6022100a2882713d129f247d30cef9a80a57f55810215997f9a4c4005c4f2d9cf90b219==2026-01-01 00:00:00, licenseType=local, startTime=Thu Aug 28 17:49:00 GMT+08:00 2025, endTime=Thu Jan 01 00:00:00 GMT+08:00 2026, isValid=0, requestParam=)\":" + licensePo);
+//            result = DubboResult.newSuccess(MachineLicenseRespDto.builder()
+//                    .license(license)
+//                    .licenseType(reqDto.getLicenseType())
+//                    .expireTime(sdf.format(endTime))
 //                    .build());
-//            if (CollectionUtils.isNotEmpty(machineLicensePos)) {
-//                return DubboResult.newSuccess(machineLicensePos.get(0).createRespDto(smartRobotResult.getObject().getAuthState()));
-//            }
-            // 获取license信息
-//            Date endTime = cal.getTime();
-            Date endTime = sdf.parse(datetime);
-            String license = SM2Utils.generateLicense(reqDto.getLicenseType(), reqDto.getMachineType()
-                    , sdf.format(endTime), reqDto.getParamsMap());
-
-            // license申请信息落库
-            MachineLicensePo licensePo = MachineLicensePo.builder()
-                    .license(license)
-                    .machineKey(reqDto.getMachineCode() + reqDto.getUser())
-                    .machineType(reqDto.getMachineType())
-                    .requestParam(reqDto.getParamsMap() == null ? TaieOcConstants.EMPTY_STRING : gson.toJson(reqDto.getParamsMap()))
-                    .startTime(Calendar.getInstance().getTime())
-                    .endTime(endTime)
-                    .licenseType(reqDto.getLicenseType())
-                    .build();
-            machineLicenseMapper.insert(licensePo);
-            log.info("入库许可数据信息licensePo = {MachineLicensePo@7487} \"MachineLicensePo(id=null, machineKey=PE3ZVJ9NS9592TJS6XG06CREWC3ZP9T3FHAD5TVCXSPAN50872M0admin, machineType=design, license=3045022054ae9fe57b7bb8c0489bd435e7c1c18e128d9fb0a6351ea381065226060c2bc6022100a2882713d129f247d30cef9a80a57f55810215997f9a4c4005c4f2d9cf90b219==2026-01-01 00:00:00, licenseType=local, startTime=Thu Aug 28 17:49:00 GMT+08:00 2025, endTime=Thu Jan 01 00:00:00 GMT+08:00 2026, isValid=0, requestParam=)\":" + licensePo);
-            result = DubboResult.newSuccess(MachineLicenseRespDto.builder()
-                    .license(license)
-                    .licenseType(reqDto.getLicenseType())
-                    .expireTime(sdf.format(endTime))
-                    .build());
-            return result;
-        } catch (Exception e) {
-            e.printStackTrace();
-            log.error(e.getMessage(), e);
-            TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
-            return DubboResult.newFailure(TaieOcManageCode.LICENSE_AQUIRE.getCode(), TaieOcManageCode.LICENSE_AQUIRE.getMessage());
-        }
-    }
-}
+//            return result;
+//        } catch (Exception e) {
+//            e.printStackTrace();
+//            log.error(e.getMessage(), e);
+//            TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
+//            return DubboResult.newFailure(TaieOcManageCode.LICENSE_AQUIRE.getCode(), TaieOcManageCode.LICENSE_AQUIRE.getMessage());
+//        }
+//    }
+//}

+ 44 - 44
src/main/java/com/juxin/client/rpa/test/Test.java

@@ -1,44 +1,44 @@
-package com.juxin.client.rpa.test;
-
-import com.juxin.client.rpa.dto.DubboResult;
-import com.juxin.client.rpa.dto.MachineLicenseAcquireReqDto;
-import com.juxin.client.rpa.dto.MachineLicenseRespDto;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.scheduling.annotation.Scheduled;
-import org.springframework.stereotype.Component;
-
-@Component
-
-public class Test {
-    @Autowired
-    private  LicenseManager licenseManager;
-
-    //@Scheduled(cron = "30 19 18 * * ?")
-    public void test() {
-        MachineLicenseAcquireReqDto reqDto = new MachineLicenseAcquireReqDto();
-        reqDto.setMachineCode("72QXCN8B79JZZC40DKZPJVXTFEFJ4F8Z1BT039R555FT37C1J3Q0");
-        reqDto.setUser("adminstrator");
-        String datetime = "2026-01-01 00:00:00";
-//        designLocal
-        reqDto.setLicenseType("local");
-        reqDto.setMachineType("design");
-        System.out.println("执行入参:" + reqDto);
-        DubboResult<MachineLicenseRespDto> designLocal = licenseManager.createLicense(reqDto,datetime);
-
-        //design remote
-        reqDto.setLicenseType("remote");
-        System.out.println("执行入参:" + reqDto);
-        DubboResult<MachineLicenseRespDto> designRemote = licenseManager.createLicense(reqDto,datetime);
-
-//        executor remote
-        reqDto.setMachineType("executor");
-        System.out.println("执行入参:" + reqDto);
-        DubboResult<MachineLicenseRespDto> executorRemote = licenseManager.createLicense(reqDto,datetime);
-
-//        executor local
-        reqDto.setLicenseType("local");
-        System.out.println("执行入参:" + reqDto);
-        DubboResult<MachineLicenseRespDto> executorLocal = licenseManager.createLicense(reqDto,datetime);
-        //Assert.assertNotNull(1);
-    }
-}
+//package com.juxin.client.rpa.test;
+//
+//import com.juxin.client.rpa.dto.DubboResult;
+//import com.juxin.client.rpa.dto.MachineLicenseAcquireReqDto;
+//import com.juxin.client.rpa.dto.MachineLicenseRespDto;
+//import org.springframework.beans.factory.annotation.Autowired;
+//import org.springframework.scheduling.annotation.Scheduled;
+//import org.springframework.stereotype.Component;
+//
+//@Component
+//
+//public class Test {
+//    @Autowired
+//    private  LicenseManager licenseManager;
+//
+//    //@Scheduled(cron = "30 19 18 * * ?")
+//    public void test() {
+//        MachineLicenseAcquireReqDto reqDto = new MachineLicenseAcquireReqDto();
+//        reqDto.setMachineCode("72QXCN8B79JZZC40DKZPJVXTFEFJ4F8Z1BT039R555FT37C1J3Q0");
+//        reqDto.setUser("adminstrator");
+//        String datetime = "2026-01-01 00:00:00";
+////        designLocal
+//        reqDto.setLicenseType("local");
+//        reqDto.setMachineType("design");
+//        System.out.println("执行入参:" + reqDto);
+//        DubboResult<MachineLicenseRespDto> designLocal = licenseManager.createLicense(reqDto,datetime);
+//
+//        //design remote
+//        reqDto.setLicenseType("remote");
+//        System.out.println("执行入参:" + reqDto);
+//        DubboResult<MachineLicenseRespDto> designRemote = licenseManager.createLicense(reqDto,datetime);
+//
+////        executor remote
+//        reqDto.setMachineType("executor");
+//        System.out.println("执行入参:" + reqDto);
+//        DubboResult<MachineLicenseRespDto> executorRemote = licenseManager.createLicense(reqDto,datetime);
+//
+////        executor local
+//        reqDto.setLicenseType("local");
+//        System.out.println("执行入参:" + reqDto);
+//        DubboResult<MachineLicenseRespDto> executorLocal = licenseManager.createLicense(reqDto,datetime);
+//        //Assert.assertNotNull(1);
+//    }
+//}

+ 107 - 10
src/main/java/com/juxin/client/websocket/FindTask.java

@@ -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;
@@ -179,7 +180,7 @@ public class FindTask {
             }
         } catch (Exception e) {
             System.out.println("出现位置异常*******************:" + message);
-            throw new RuntimeException(e);
+//            throw new RuntimeException(e);
         }
 
     }
@@ -232,6 +233,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;
         }
@@ -474,13 +479,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("")) {
@@ -510,6 +547,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;
         }
@@ -536,9 +579,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);
     }
@@ -610,17 +653,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);
         }
@@ -650,9 +694,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);
     }
@@ -771,6 +815,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")

+ 69 - 0
src/main/java/com/juxin/client/websocket/ppojo/DigitalRmbSubjectResult.java

@@ -0,0 +1,69 @@
+package com.juxin.client.websocket.ppojo;
+
+import lombok.Data;
+
+@Data
+public class DigitalRmbSubjectResult {
+
+    private String applicationId; // 业务id 对应splitId
+
+
+    private String queryResult; // 查询结果
+
+
+    private String customerName; // 客户名称
+
+
+    private String walletName; // 钱包名称
+
+
+    private String walletType; // 钱包类型
+
+
+    private String walletOpenTime; // 钱包开户时间
+
+
+    private String walletOrgCode; // 钱包运营机构号
+
+
+    private String imei; // IMEI
+
+
+    private String licenseType; // 证照类型
+
+
+    private String walletId; // 钱包ID
+
+
+    private String walletStatus; // 钱包状态
+
+
+    private String walletCloseTime; // 钱包注销时间
+
+
+    private String walletPhone; // 钱包手机号
+
+
+    private String mac; // MAC
+
+
+    private String idNumber; // 证件号
+
+
+    private String parentWalletId; // 母钱包ID
+
+
+    private String frozenAmount; // 钱包实际冻结金额
+
+
+    private String openMethod; // 钱包开立方式
+
+
+    private String ip; // IP
+
+
+    private String boundBankCardJson; // 绑定银行卡json
+
+
+    private String registeredBankCardJson; // 注册银行卡json
+}

+ 24 - 24
src/main/resources/application.yml

@@ -1,26 +1,26 @@
 server:
   port: 9995
-spring:
-  datasource:
-    type: com.alibaba.druid.pool.DruidDataSource
-    driverClassName: com.mysql.cj.jdbc.Driver
-    druid:
-      url: jdbc:mysql://localhost:9994/driver?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai&allowMultiQueries=true
-      username: root
-      password: hS#$Fik8g9f2d0a6ie
-      # 初始连接数
-      initialSize: 10
-      # 最小连接池数量
-      minIdle: 5
-      # 最大连接池数量
-      maxActive: 50
-      # 配置获取连接等待超时的时间
-      maxWait: 60000
-      # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
-      timeBetweenEvictionRunsMillis: 60000
-      # 配置一个连接在池中最小生存的时间,单位是毫秒
-      minEvictableIdleTimeMillis: 300000
-      # 配置一个连接在池中最大生存的时间,单位是毫秒
-      maxEvictableIdleTimeMillis: 900000
-mybatis-plus:
-  mapper-locations: classpath:mapper/*.xml
+#spring:
+#  datasource:
+#    type: com.alibaba.druid.pool.DruidDataSource
+#    driverClassName: com.mysql.cj.jdbc.Driver
+#    druid:
+#      url: jdbc:mysql://localhost:9994/driver?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai&allowMultiQueries=true
+#      username: root
+#      password: hS#$Fik8g9f2d0a6ie
+#      # 初始连接数
+#      initialSize: 10
+#      # 最小连接池数量
+#      minIdle: 5
+#      # 最大连接池数量
+#      maxActive: 50
+#      # 配置获取连接等待超时的时间
+#      maxWait: 60000
+#      # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
+#      timeBetweenEvictionRunsMillis: 60000
+#      # 配置一个连接在池中最小生存的时间,单位是毫秒
+#      minEvictableIdleTimeMillis: 300000
+#      # 配置一个连接在池中最大生存的时间,单位是毫秒
+#      maxEvictableIdleTimeMillis: 900000
+#mybatis-plus:
+#  mapper-locations: classpath:mapper/*.xml

+ 40 - 40
src/main/resources/com/juxin/client/rpa/mapper/MachineLicenseMapper.xml

@@ -1,43 +1,43 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
-<mapper namespace="com.juxin.client.rpa.mapper.MachineLicenseMapper">
-    <resultMap id="MachineLicensePo" type="com.juxin.client.rpa.dto.MachineLicensePo">
-        <id column="id" jdbcType="BIGINT" property="id" />
-        <result column="machine_key" jdbcType="VARCHAR" property="machineKey" />
-        <result column="machine_type" jdbcType="VARCHAR" property="machineType" />
-        <result column="license" jdbcType="VARCHAR" property="license"/>
-        <result column="license_type" jdbcType="VARCHAR" property="licenseType" />
-        <result column="start_time" jdbcType="TIMESTAMP" property="startTime" />
-        <result column="end_time" jdbcType="TIMESTAMP" property="endTime" />
-        <result column="is_valid" jdbcType="BIT" property="isValid" />
-        <result column="request_param" jdbcType="VARCHAR" property="requestParam" />
-    </resultMap>
+<!--<?xml version="1.0" encoding="UTF-8" ?>-->
+<!--<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >-->
+<!--<mapper namespace="com.juxin.client.rpa.mapper.MachineLicenseMapper">-->
+<!--    <resultMap id="MachineLicensePo" type="com.juxin.client.rpa.dto.MachineLicensePo">-->
+<!--        <id column="id" jdbcType="BIGINT" property="id" />-->
+<!--        <result column="machine_key" jdbcType="VARCHAR" property="machineKey" />-->
+<!--        <result column="machine_type" jdbcType="VARCHAR" property="machineType" />-->
+<!--        <result column="license" jdbcType="VARCHAR" property="license"/>-->
+<!--        <result column="license_type" jdbcType="VARCHAR" property="licenseType" />-->
+<!--        <result column="start_time" jdbcType="TIMESTAMP" property="startTime" />-->
+<!--        <result column="end_time" jdbcType="TIMESTAMP" property="endTime" />-->
+<!--        <result column="is_valid" jdbcType="BIT" property="isValid" />-->
+<!--        <result column="request_param" jdbcType="VARCHAR" property="requestParam" />-->
+<!--    </resultMap>-->
 
-    <sql id="Base_Column_List">
-        `id`, `machine_key`, `machine_type`, `license`, `license_type`, `start_time`,`end_time`, `is_valid`, `request_param`
-    </sql>
+<!--    <sql id="Base_Column_List">-->
+<!--        `id`, `machine_key`, `machine_type`, `license`, `license_type`, `start_time`,`end_time`, `is_valid`, `request_param`-->
+<!--    </sql>-->
 
-    <insert id="insert" parameterType="com.juxin.client.rpa.dto.MachineLicensePo">
-        insert into smart_rpa_machine_license_info (`machine_key`, `machine_type`, `license`, `license_type`, `start_time`,`end_time`, `is_valid`,`request_param`)
-            values (#{machineKey},#{machineType},#{license},#{licenseType},#{startTime},#{endTime},1,#{requestParam})
-    </insert>
+<!--    <insert id="insert" parameterType="com.juxin.client.rpa.dto.MachineLicensePo">-->
+<!--        insert into smart_rpa_machine_license_info (`machine_key`, `machine_type`, `license`, `license_type`, `start_time`,`end_time`, `is_valid`,`request_param`)-->
+<!--            values (#{machineKey},#{machineType},#{license},#{licenseType},#{startTime},#{endTime},1,#{requestParam})-->
+<!--    </insert>-->
 
-    <update id="deleteByPrimaryKey" parameterType="java.lang.Long">
-        update smart_rpa_machine_license_info
-          set is_valid = 0
-        where id = #{id} and is_valid = 1
-    </update>
-    <sql id="filter">
-        <if test="machineKey != null">and machine_key = #{machineKey}</if>
-        <if test="license != null">and license = #{license}</if>
-        <if test="licenseType != null">and license_type = #{licenseType}</if>
-        <if test="requestParam != null">and request_param = #{requestParam}</if>
-        <if test="machineType != null">and machine_type = #{machineType}</if>
-    </sql>
-    <select id = "selectMachineLicense" parameterType="com.juxin.client.rpa.dto.MachineLicenseFilterDto" resultMap="MachineLicensePo">
-        select <include refid="Base_Column_List" />
-            from smart_rpa_machine_license_info where is_valid and end_time > now()
-        <include refid="filter"></include>
-         order by start_time desc
-    </select>
-</mapper>
+<!--    <update id="deleteByPrimaryKey" parameterType="java.lang.Long">-->
+<!--        update smart_rpa_machine_license_info-->
+<!--          set is_valid = 0-->
+<!--        where id = #{id} and is_valid = 1-->
+<!--    </update>-->
+<!--    <sql id="filter">-->
+<!--        <if test="machineKey != null">and machine_key = #{machineKey}</if>-->
+<!--        <if test="license != null">and license = #{license}</if>-->
+<!--        <if test="licenseType != null">and license_type = #{licenseType}</if>-->
+<!--        <if test="requestParam != null">and request_param = #{requestParam}</if>-->
+<!--        <if test="machineType != null">and machine_type = #{machineType}</if>-->
+<!--    </sql>-->
+<!--    <select id = "selectMachineLicense" parameterType="com.juxin.client.rpa.dto.MachineLicenseFilterDto" resultMap="MachineLicensePo">-->
+<!--        select <include refid="Base_Column_List" />-->
+<!--            from smart_rpa_machine_license_info where is_valid and end_time > now()-->
+<!--        <include refid="filter"></include>-->
+<!--         order by start_time desc-->
+<!--    </select>-->
+<!--</mapper>-->