Browse Source

20240322_sun

15143018065 11 tháng trước cách đây
mục cha
commit
f2be650949

+ 27 - 17
ruoyi-modules/mz-lnst/src/main/java/com/ruoyi/lnst/service/impl/YlServer.java

@@ -30,9 +30,28 @@ import static com.ruoyi.common.core.utils.DateUtils.YYYY_MM_DD_HH_MM_SS;
 @Service
 public class YlServer {
 
+    public static void main(String[] args) {
+        TreeMap<String, Object> lr = new TreeMap<>();
+        try {
+            lr.put("memberName", RSAUtils.encryptByPublicKey("测试二用", ResourceUtil.getConfigByName("yl.enKey")));
+            lr.put("mobileNo", null);
+            lr.put("certNo", RSAUtils.encryptByPublicKey("220503193811137117", ResourceUtil.getConfigByName("yl.enKey")));
+            lr.put("remark", "吉林省 吉林市 舒兰市");
+            lr.put("householdAddress", "吉林省 吉林市 舒兰市");
+            lr.put("communityName", null);
+            lr.put("streetName", null);
+        } catch (Exception e) {
+            throw new ServiceException(e.getMessage());
+        }
+        TreeMap<String, Object> map = YlServer.publicSupport(ResourceUtil.getConfigByName("yl.hyzc"), null,
+                ResourceUtil.getConfigByName("yl.version"), lr);
+        JSONObject res = YlServer.httpsRequest(YlServer.Map2JSONStr(map));
+        System.out.println(res);
+    }
+
     // 2.1	会员信息新增
-    public String ylRegister(InLnstLrxx lrxx) {
-        String r = "";
+    public JSONObject ylRegister(InLnstLrxx lrxx) {
+        JSONObject r = null;
         TreeMap<String, Object> lr = new TreeMap<>();
         try {
             lr.put("memberName", RSAUtils.encryptByPublicKey(lrxx.getLrXm(), ResourceUtil.getConfigByName("yl.enKey")));
@@ -49,11 +68,11 @@ public class YlServer {
                 ResourceUtil.getConfigByName("yl.version"), lr);
         JSONObject res = YlServer.httpsRequest(YlServer.Map2JSONStr(map));
         if (res.containsKey("respCode") && StringUtils.equals(res.getString("respCode"), "0000")) {
-            r = res.getString("memberCode");
+            r = res;
+            ylDisabled(res.getString("memberCode"));
         } else {
             throw new ServiceException(res.toJSONString());
         }
-//        r = "1100302099";
         return r;
     }
 
@@ -112,9 +131,9 @@ public class YlServer {
     }
 
     // 2.4	会员禁用
-    public void ylDisabled(InLnstLrxx lrxx) {
+    public void ylDisabled(String memberCode) {
         TreeMap<String, Object> lr = new TreeMap<>();
-        lr.put("memberCode", lrxx.getYlcode());
+        lr.put("memberCode", memberCode);
         TreeMap<String, Object> map = YlServer.publicSupport(ResourceUtil.getConfigByName("yl.hyjy"), null,
                 null, lr);
         JSONObject res = YlServer.httpsRequest(YlServer.Map2JSONStr(map));
@@ -126,9 +145,9 @@ public class YlServer {
     }
 
     // 2.5	会员启用
-    public void ylEnabled(InLnstLrxx lrxx) {
+    public void ylEnabled(String memberCode) {
         TreeMap<String, Object> lr = new TreeMap<>();
-        lr.put("memberCode", lrxx.getYlcode());
+        lr.put("memberCode", memberCode);
         TreeMap<String, Object> map = YlServer.publicSupport(ResourceUtil.getConfigByName("yl.hyqy"), null,
                 null, lr);
         JSONObject res = YlServer.httpsRequest(YlServer.Map2JSONStr(map));
@@ -168,15 +187,6 @@ public class YlServer {
         }
     }
 
-    public static void main(String[] args) {
-        TreeMap<String, Object> test = new TreeMap<>();
-        test.put("storeCode", "100000444");
-        test.put("state", "1");
-        TreeMap<String, Object> map = publicSupport("plat.mchnt.store.stateswitch", null, null, test);
-        JSONObject res = httpsRequest(Map2JSONStr(map));
-        System.out.println(res);
-    }
-
     public static String Map2JSONStr(TreeMap<String, Object> params) {
         JSONObject jsonParams = new JSONObject();
         for (String key : params.keySet()) {

+ 4 - 0
ruoyi-modules/mz-lnst/src/main/java/com/ruoyi/lnst/service/impl/ZwywLrJbxxServiceImpl.java

@@ -285,6 +285,7 @@ public class ZwywLrJbxxServiceImpl implements IZwywLrJbxxService {
     @Override
     public int insertZwywLrJbxxWeb(InLnstLrxx zwywLrJbxx) {
         int res = 0;
+        // 重复性检测
         LoginUser loginUser = userService.getUserInfo(zwywLrJbxx.getLrZjhm(), SecurityConstants.INNER).getData();
         InLnstLrxx query = new InLnstLrxx();
         query.setLrZjhm(zwywLrJbxx.getLrZjhm());
@@ -292,12 +293,15 @@ public class ZwywLrJbxxServiceImpl implements IZwywLrJbxxService {
         if (ObjectUtils.isNotEmpty(loginUser) || ObjectUtils.isNotEmpty(check)) {
             throw new ServiceException("该证件号码账号已存在");
         }
+        // insert默认草稿属性,活体检测后才确定流转状态
         zwywLrJbxx.setLzzt("0");
+
         zwywLrJbxx.setYlcode("1100302099");
         zwywLrJbxx.setYlcard("1100302099");
         zwywLrJbxx.setLrJmzjhm(DigestUtils.md5Hex(zwywLrJbxx.getLrZjhm()));
         zwywLrJbxx.setLrHjdz(SecurityUtils.getAreaCode());
         zwywLrJbxx.setDjbh(String.valueOf(Long.parseLong(zwywLrJbxxMapper.selectMaxBh(zwywLrJbxx.getLrHjdz().substring(0, 6))) + 1));
+
         String userId = insertUser(zwywLrJbxx);
         zwywLrJbxx.setId(userId);
         res = zwywLrJbxxMapper.insert(zwywLrJbxx);