Przeglądaj źródła

自定义审核模板类型

user5 3 lat temu
rodzic
commit
727e7c838c

+ 9 - 0
src/main/java/com/jeeplus/modules/identification/web/AuditTemplateTypeController.java

@@ -0,0 +1,9 @@
+package com.jeeplus.modules.identification.web;
+
+/**
+ * 自定义审核模板类型controller
+ * @author: 徐滕
+ * @create: 2022-03-17 13:47
+ **/
+public class AuditTemplateTypeController {
+}

+ 44 - 1
src/main/java/com/jeeplus/modules/ruralprojectrecords/web/RuralProjectSignatureOldMessageDisposeController.java

@@ -215,7 +215,7 @@ public class RuralProjectSignatureOldMessageDisposeController extends BaseContro
 
 
     /**
-     * 下载附件
+     * 物理签章申请demo
      */
     @RequestMapping(value = "/getPhysicsSeal", method=RequestMethod.GET)
     public HashMap getPhysicsSeal() {
@@ -245,4 +245,47 @@ public class RuralProjectSignatureOldMessageDisposeController extends BaseContro
         return hashMap;
     }
 
+    /**
+     * 物理签章信息获取详情demo
+     */
+    @RequestMapping(value = "/getPhysicsSealParticulars", method=RequestMethod.GET)
+    public HashMap getPhysicsSealParticulars() {
+        HashMap hashMap = new HashMap();
+        //根据contractId将文件下载下来 并上传到阿里云服务种
+        //添加请求头
+        Map<String,String> requestHeaderMap = new HashMap<>();
+        requestHeaderMap.put("x-qys-accesstoken", apptoken);
+        requestHeaderMap.put("x-qys-signature", signature);
+        requestHeaderMap.put("x-qys-timestamp", "0");
+
+        Map postMap = new HashMap();
+        postMap.put("businessId","2941600812628489057");
+
+        String resultStr = SignaturePostUtil.doGet(postMap,HTTPTOP + "/seal/apply/detail");
+        hashMap = JSON.parseObject(resultStr, HashMap.class);
+        return hashMap;
+    }
+
+    /**
+     * 物理签章拍照图片下载demo
+     */
+    @RequestMapping(value = "/downloadPhysicsSealImgs", method=RequestMethod.GET)
+    public HashMap downloadPhysicsSealImgs() {
+        HashMap hashMap = new HashMap();
+        //根据contractId将文件下载下来 并上传到阿里云服务种
+        //添加请求头
+        Map<String,String> requestHeaderMap = new HashMap<>();
+        requestHeaderMap.put("x-qys-accesstoken", apptoken);
+        requestHeaderMap.put("x-qys-signature", signature);
+        requestHeaderMap.put("x-qys-timestamp", "0");
+
+        Map postMap = new HashMap();
+        postMap.put("businessId","2941600812628489057");
+
+        net.sf.json.JSONObject json = net.sf.json.JSONObject.fromObject(postMap);
+        String resultStr = SignaturePostUtil.sendPostImagePng(HTTPTOP + "/seal/apply/images/download", json.toString());
+        hashMap = JSON.parseObject(resultStr, HashMap.class);
+        return hashMap;
+    }
+
 }

+ 18 - 62
src/main/java/com/jeeplus/modules/tools/utils/SignaturePostUtil.java

@@ -518,70 +518,26 @@ public class SignaturePostUtil {
         return result;
     }
 
-    private static String decodeUnicode(String theString) {
-        char aChar;
-        int len = theString.length();
-        StringBuffer outBuffer = new StringBuffer(len);
-        for (int x = 0; x < len;) {
-            aChar = theString.charAt(x++);
-            if (aChar == '\\') {
-                aChar = theString.charAt(x++);
-                if (aChar == 'u') {
-                    // Read the xxxx
-                    int value = 0;
-                    for (int i = 0; i < 4; i++) {
-                        aChar = theString.charAt(x++);
-                        switch (aChar) {
-                            case '0':
-                            case '1':
-                            case '2':
-                            case '3':
-                            case '4':
-                            case '5':
-                            case '6':
-                            case '7':
-                            case '8':
-                            case '9':
-                                value = (value << 4) + aChar - '0';
-                                break;
-                            case 'a':
-                            case 'b':
-                            case 'c':
-                            case 'd':
-                            case 'e':
-                            case 'f':
-                                value = (value << 4) + 10 + aChar - 'a';
-                                break;
-                            case 'A':
-                            case 'B':
-                            case 'C':
-                            case 'D':
-                            case 'E':
-                            case 'F':
-                                value = (value << 4) + 10 + aChar - 'A';
-                                break;
-                            default:
-                                throw new IllegalArgumentException(
-                                        "Malformed   \\uxxxx   encoding.");
-                        }
-
-                    }
-                    outBuffer.append((char) value);
-                } else {
-                    if (aChar == 't')
-                        aChar = '\t';
-                    else if (aChar == 'r')
-                        aChar = '\r';
-                    else if (aChar == 'n')
-                        aChar = '\n';
-                    else if (aChar == 'f')
-                        aChar = '\f';
-                    outBuffer.append(aChar);
+    public static String decodeUnicode(String asciicode) {
+        String[] asciis = asciicode.split ("\\\\u");
+        String nativeValue = asciis[0];
+        try
+        {
+            for ( int i = 1; i < asciis.length; i++ )
+            {
+                String code = asciis[i];
+                nativeValue += (char) Integer.parseInt (code.substring (0, 4), 16);
+                if (code.length () > 4)
+                {
+                    nativeValue += code.substring (4, code.length ());
                 }
-            } else
-                outBuffer.append(aChar);
+            }
+        }
+        catch (NumberFormatException e)
+        {
+            return asciicode;
         }
-        return outBuffer.toString();
+        return nativeValue;
     }
 
     /**