Forráskód Böngészése

全国一体化政务服务平台接口

Administrator 2 éve
szülő
commit
b1f64065c5

+ 37 - 0
boman-api/boman-domain/src/main/java/com.boman.domain/constant/ProxyConstants.java

@@ -0,0 +1,37 @@
+package com.boman.domain.constant;
+
+/**
+ * @Author: tjf
+ * @Date: 2022/9/21 14:43
+ * @Describe:
+ */
+public class ProxyConstants {
+    public static final class RID {
+        // 请求者标识
+        public static final String QSBDC_RID = "TE3400003400000001@f6eae674bdc840d2b0474dd3d736faf1";
+    }
+
+    public static final class SID {
+        public static final String GJCSYYZMCXSJJK = "s_1200002500000_2922";
+        public static final String BZFWHHXXCX = "s_12100000000018032A_3939";
+        public static final String HYDJXXHYGR = "s_X01201000200000000_4817";
+        public static final String HYDJXXHYGRX = "751cde33ed5d46e7ba7f47f18d2b23c3";
+        public static final String HYDJXXHYSF = "s_X01201000200000000_4818";
+        public static final String HYDJXXHYSFX = "ab7584434a0e4873bda98bc029f79391";
+        public static final String MBFQYDWDJZSCXXX = "de97c1178cde4307bdcacfd68ae9349f";
+        public static final String SHZZXXCXFWJKX = "b507c8845a58446eb3d1d1e4adca5fd2";
+        public static final String MBFQYMCBGDJJLCXX = "aa87c45e56fe47b7b5b55a74a1d6abb8";
+        public static final String SHTTFRDJZSCXX = "aa6af3ad8a144547a1f90c2de6e12ed7";
+        public static final String SHTTMCBGDJJLCX = "s_111000000000131433_5628";
+        public static final String SWHYDJXXCX = "s_111000000000131433_5630";
+        public static final String SWHYDJXXHYGRX = "9ee0218bc615459780a271410fde3c13";
+        public static final String SWHYDJXXHYSF = "s_111000000000131433_5633";
+        public static final String SWHYDJXXHYSFX = "7aa991a53cb04ea7a3f5c48fb119ddfd";
+        public static final String SYDJXXGNCX = "s_111000000000131433_5629";
+    }
+
+    public static final class URL {
+        public static final String REST_URL = "http://59.255.22.70:8443/gateway/httpproxy";
+        public static final String WEB_URL = "http://59.255.22.70:8443/gateway/wsproxy";
+    }
+}

+ 5 - 1
boman-web-core/pom.xml

@@ -31,7 +31,11 @@
 
     <dependencies>
 
-
+        <dependency>
+            <groupId>cn.hutool</groupId>
+            <artifactId>hutool-all</artifactId>
+            <version>5.8.7</version>
+        </dependency>
         <!-- RSA+AES实现接口验签和参数加密   -->
         <!--RSA依赖-->
         <dependency>

+ 503 - 0
boman-web-core/src/main/java/com/boman/web/core/controller/CountryProxyQsBdcController.java

@@ -0,0 +1,503 @@
+package com.boman.web.core.controller;
+
+import cn.hutool.core.date.DateUtil;
+import cn.hutool.http.HttpRequest;
+import cn.hutool.json.JSONObject;
+import com.boman.domain.constant.ProxyConstants;
+import com.boman.web.core.utils.GjzwfwptSignUtil;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * 全国一体化政务服务平台接口
+ * 安徽省安庆市潜山县不动产登记中心
+ * @author ZS
+ *
+ */
+@Api(description = "全国一体化政务服务平台接口【安徽省安庆市潜山县不动产登记中心】")
+@RestController
+@RequestMapping("/country/qsbdc")
+@CrossOrigin
+public class CountryProxyQsBdcController {
+    //国家卫生健康委_国家出生医学证明查询数据接口
+    @ApiOperation(value = "国家卫生健康委_国家出生医学证明查询数据接口")
+    @GetMapping("/gjcsyyzmcxsjjk")
+    public String gjcsyyzmcxsjjk(
+            @ApiParam(value = "请求机构编码") @RequestParam(required = false) String requestOrgCode,
+            @ApiParam(value = "请求机构组织机构名称") @RequestParam(required = false) String requestOrgName,
+            @ApiParam(value = "出生编号") @RequestParam String BirthCode,
+            @ApiParam(value = "母亲姓名") @RequestParam String MomName,
+            @ApiParam(value = "母亲身份证号") @RequestParam String MomIdCode) {
+        String appkey = "d33449a37af825ea4ae9c3a4fb169bb8"; //发送方签名
+        String gjzwfwpt_sign = GjzwfwptSignUtil.getGjzwfwptSign(ProxyConstants.SID.GJCSYYZMCXSJJK,
+                ProxyConstants.RID.QSBDC_RID, appkey);
+        String gjzwfwpt_rtime = GjzwfwptSignUtil.getGjzwfwptRtime(ProxyConstants.SID.GJCSYYZMCXSJJK);
+        // 接口调用
+        //Map<String, Object> postParams = new HashMap<>();
+        //组装参数
+        //公共请求参数
+//		postParams.put("version","1.0");
+        //请求查询条件参数
+        // 总体信息
+        String requestDate = DateUtil.now(); //请求时间
+        // 业务参数信息
+        String body = "<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:web=\"http://webservice.tongtech.com/\">\r\n"
+                + "    <soapenv:Header/>\r\n"
+                + "    <soapenv:Body>\r\n"
+                + "        <web:getBirthInfo>\r\n"
+                + "            <username>GJCSZM</username>\r\n"
+                + "            <password>888888</password>\r\n"
+                + "            <selectXml>\r\n"
+                + "                &lt;?xml version=\"1.0\" encoding=\"UTF-8\" ?&gt;\r\n"
+                + "                &lt;MDEML  templateVersion=\"1.0\"&gt;\r\n"
+                + "                &lt;requestinfo&gt;\r\n"
+                + "                &lt;requestDate&gt;" + requestDate + "&lt;/requestDate&gt;\r\n"
+                + "                &lt;requestOrgCode&gt;" + requestOrgCode + "&lt;/requestOrgCode&gt;\r\n"
+                + "                &lt;requestOrgName&gt;" + requestOrgName + "&lt;/requestOrgName&gt;\r\n"
+                + "                &lt;/requestinfo&gt;\r\n"
+                + "                &lt;body&gt;\r\n"
+                + "                &lt;data&gt;\r\n"
+                + "                &lt;BirthCode&gt;" + BirthCode + "&lt;/BirthCode&gt;\r\n"
+                + "                &lt;MomName&gt;" + MomName + "&lt;/MomName&gt;\r\n"
+                + "                &lt;MomIdCode&gt;" + MomIdCode + "&lt;/MomIdCode&gt;\r\n"
+                + "                &lt;/data&gt;\r\n"
+                + "                &lt;/body&gt;\r\n"
+                + "                &lt;/MDEML&gt;\r\n"
+                + "            </selectXml>\r\n"
+                + "        </web:getBirthInfo>\r\n"
+                + "    </soapenv:Body>\r\n"
+                + "</soapenv:Envelope>";
+        return postServiceRequest(ProxyConstants.SID.GJCSYYZMCXSJJK, gjzwfwpt_sign, gjzwfwpt_rtime, body);
+    }
+
+    //民政部_殡葬服务火化信息查询
+    @ApiOperation(value = "民政部_殡葬服务火化信息查询")
+    @GetMapping("/bzfwhhxxcx")
+    public String bzfwhhxxcx(
+            @ApiParam(value = "姓名") @RequestParam String name,
+            @ApiParam(value = "身份证号") @RequestParam String id_card) {
+        String appkey = "c40c921bea411f13377ea3548e6d1686"; //发送方签名
+        String gjzwfwpt_sign = GjzwfwptSignUtil.getGjzwfwptSign(ProxyConstants.SID.BZFWHHXXCX,
+                ProxyConstants.RID.QSBDC_RID, appkey);
+        String gjzwfwpt_rtime = GjzwfwptSignUtil.getGjzwfwptRtime(ProxyConstants.SID.BZFWHHXXCX);
+        // 接口调用
+        Map<String, Object> postParams = new HashMap<>();
+        //组装参数
+        //公共请求参数
+        postParams.put("version","1.0");
+        postParams.put("name", name);
+        postParams.put("id_card", id_card);
+        //请求查询条件参数
+        JSONObject params = new JSONObject();
+        params.putOnce("name", name);
+        params.putOnce("id_card", id_card);
+        postParams.put("biz_content", params.toString());
+        return postRequest(ProxyConstants.SID.BZFWHHXXCX, gjzwfwpt_sign, gjzwfwpt_rtime, postParams);
+    }
+    
+
+    // 民政部_婚姻登记信息核验(个人)
+    @ApiOperation(value = "民政部_婚姻登记信息核验(个人)")
+    @GetMapping("/hydjxxhygr")
+    public String hydjxxhygr(
+            @ApiParam(value = "男/女方姓名") @RequestParam String name_man,
+            @ApiParam(value = "男/女方身份证件号码") @RequestParam String cert_num_man) {
+        String appkey = "e72f935d839db74e407ca9fa13cc78b7"; //发送方签名
+        String gjzwfwpt_sign = GjzwfwptSignUtil.getGjzwfwptSign(ProxyConstants.SID.HYDJXXHYGR,
+                ProxyConstants.RID.QSBDC_RID, appkey);
+        String gjzwfwpt_rtime = GjzwfwptSignUtil.getGjzwfwptRtime(ProxyConstants.SID.HYDJXXHYGR);
+        // 接口调用
+        Map<String, Object> postParams = new HashMap<>();
+        //组装参数
+        //公共请求参数
+        postParams.put("version","1.0");
+//		postParams.put("cert_num_man", "34");
+//		postParams.put("name_man", "1");
+        postParams.put("name_man", name_man);
+        postParams.put("cert_num_man", cert_num_man);
+        //请求查询条件参数
+        JSONObject params = new JSONObject();
+//		params.put("name_man", "");
+//		params.put("cert_num_man", "34");
+        params.putOnce("name_man", name_man);
+        params.putOnce("cert_num_man", cert_num_man);
+        postParams.put("biz_content", params.toString());
+        return postRequest(ProxyConstants.SID.HYDJXXHYGR, gjzwfwpt_sign, gjzwfwpt_rtime, postParams);
+    }
+
+    //	民政部_婚姻登记信息核验(个人)(新)
+    @ApiOperation(value = "民政部_婚姻登记信息核验(个人)(新)")
+    @GetMapping("/hydjxxhygrx")
+    public String hydjxxhygrx(
+            @ApiParam(value = "男/女方姓名") @RequestParam String name_man,
+            @ApiParam(value = "男/女方身份证件号码") @RequestParam String cert_num_man) {
+        String appkey = "e6f421141633fa9dce093f17e7763112"; //发送方签名
+        String gjzwfwpt_sign = GjzwfwptSignUtil.getGjzwfwptSign(ProxyConstants.SID.HYDJXXHYGRX,
+                ProxyConstants.RID.QSBDC_RID, appkey);
+        String gjzwfwpt_rtime = GjzwfwptSignUtil.getGjzwfwptRtime(ProxyConstants.SID.HYDJXXHYGRX);
+        // 接口调用
+        Map<String, Object> postParams = new HashMap<>();
+        //组装参数
+        //公共请求参数
+        postParams.put("version","1.0");
+        //请求查询条件参数
+        JSONObject params = new JSONObject();
+//		params.put("name_man", "xxx");
+//		params.put("cert_num_man", "34");
+        params.putOnce("name_man", name_man);
+        params.putOnce("cert_num_man", cert_num_man);
+        postParams.put("biz_content", params.toString());
+        return postRequest(ProxyConstants.SID.HYDJXXHYGRX, gjzwfwpt_sign, gjzwfwpt_rtime, postParams);
+    }
+
+    //民政部_婚姻登记信息核验(双方)
+    @ApiOperation(value = "民政部_婚姻登记信息核验(双方)")
+    @GetMapping("/hydjxxhysf")
+    public String hydjxxhysf(
+            @ApiParam(value = "男方姓名") @RequestParam String name_man,
+            @ApiParam(value = "男方身份证件号码") @RequestParam String cert_num_man,
+            @ApiParam(value = "女方姓名") @RequestParam String name_woman,
+            @ApiParam(value = "女方身份证件号码") @RequestParam String cert_num_woman) {
+        String appkey = "30d5c47587af585d8acec5cb68b18ba9"; //发送方签名
+        String gjzwfwpt_sign = GjzwfwptSignUtil.getGjzwfwptSign(ProxyConstants.SID.HYDJXXHYSF,
+                ProxyConstants.RID.QSBDC_RID, appkey);
+        String gjzwfwpt_rtime = GjzwfwptSignUtil.getGjzwfwptRtime(ProxyConstants.SID.HYDJXXHYSF);
+        // 接口调用
+        Map<String, Object> postParams = new HashMap<>();
+        //组装参数
+        //公共请求参数
+        postParams.put("version","");
+        postParams.put("name_man", name_man);
+        postParams.put("cert_num_man", cert_num_man);
+        postParams.put("name_woman", name_woman);
+        postParams.put("cert_num_woman", cert_num_woman);
+        //请求查询条件参数
+        JSONObject params = new JSONObject();
+        params.putOnce("name_man", name_man);
+        params.putOnce("cert_num_man", cert_num_man);
+        params.putOnce("name_woman", name_woman);
+        params.putOnce("cert_num_woman", cert_num_woman);
+        postParams.put("biz_content", params.toString());
+        return postRequest(ProxyConstants.SID.HYDJXXHYSF, gjzwfwpt_sign, gjzwfwpt_rtime, postParams);
+    }
+
+    //民政部_婚姻登记信息核验(双方)(新)
+    @ApiOperation(value = "民政部_婚姻登记信息核验(双方)(新)")
+    @GetMapping("/hydjxxhysfx")
+    public String hydjxxhysfx(
+            @ApiParam(value = "男方姓名") @RequestParam String name_man,
+            @ApiParam(value = "男方身份证件号码") @RequestParam String cert_num_man,
+            @ApiParam(value = "女方姓名") @RequestParam String name_woman,
+            @ApiParam(value = "女方身份证件号码") @RequestParam String cert_num_woman) {
+        String appkey = "76746be3e436eb6ce84b63814ee9cd03"; //发送方签名
+        String gjzwfwpt_sign = GjzwfwptSignUtil.getGjzwfwptSign(ProxyConstants.SID.HYDJXXHYSFX,
+                ProxyConstants.RID.QSBDC_RID, appkey);
+        String gjzwfwpt_rtime = GjzwfwptSignUtil.getGjzwfwptRtime(ProxyConstants.SID.HYDJXXHYSFX);
+        // 接口调用
+        Map<String, Object> postParams = new HashMap<>();
+        //组装参数
+        //公共请求参数
+        postParams.put("version","1.0");
+        //请求查询条件参数
+        JSONObject params = new JSONObject();
+//		params.put("name_man", "周林松");
+//		params.put("cert_num_man", "342622760910565");
+//		params.put("name_woman", "邢应芝");
+//		params.put("cert_num_woman", "342622780503568");
+        params.putOnce("name_man", name_man);
+        params.putOnce("cert_num_man", cert_num_man);
+        params.putOnce("name_woman", name_woman);
+        params.putOnce("cert_num_woman", cert_num_woman);
+        postParams.put("biz_content", params.toString());
+        return postRequest(ProxyConstants.SID.HYDJXXHYSFX, gjzwfwpt_sign, gjzwfwpt_rtime, postParams);
+    }
+
+    //民政部_民办非企业单位登记证书查询(新)
+    @ApiOperation(value = "民政部_民办非企业单位登记证书查询(新)")
+    @GetMapping("/mbfqydwdjzscxxx")
+    public String mbfqydwdjzscxxx(
+            @ApiParam(value = "唯一社会信用代码") @RequestParam String usc_code,
+            @ApiParam(value = "组织名称") @RequestParam String org_name) {
+        String appkey = "8fcc6c4b9ea44aa6d63096db5cfed126"; //发送方签名
+        String gjzwfwpt_sign = GjzwfwptSignUtil.getGjzwfwptSign(ProxyConstants.SID.MBFQYDWDJZSCXXX,
+                ProxyConstants.RID.QSBDC_RID, appkey);
+        String gjzwfwpt_rtime = GjzwfwptSignUtil.getGjzwfwptRtime(ProxyConstants.SID.MBFQYDWDJZSCXXX);
+        // 接口调用
+        Map<String, Object> postParams = new HashMap<>();
+        //组装参数
+        //公共请求参数
+        postParams.put("version","");
+        //请求查询条件参数
+        JSONObject params = new JSONObject();
+        params.putOnce("usc_code", usc_code);
+        params.putOnce("org_name", org_name);
+        postParams.put("biz_content", params.toString());
+        return postRequest(ProxyConstants.SID.MBFQYDWDJZSCXXX, gjzwfwpt_sign, gjzwfwpt_rtime, postParams);
+    }
+
+    //民政部_社会组织信息查询服务接口(新)
+    @ApiOperation(value = "民政部_社会组织信息查询服务接口(新)")
+    @GetMapping("/shzzxxcxfwjkx")
+    public String shzzxxcxfwjkx(
+            @ApiParam(value = "唯一社会信用代码") @RequestParam String usc_code,
+            @ApiParam(value = "社会组织名称") @RequestParam String org_name) {
+        String appkey = "45596d6b8d24c9d51c037d77ff6451d6"; //发送方签名
+        String gjzwfwpt_sign = GjzwfwptSignUtil.getGjzwfwptSign(ProxyConstants.SID.SHZZXXCXFWJKX,
+                ProxyConstants.RID.QSBDC_RID, appkey);
+        String gjzwfwpt_rtime = GjzwfwptSignUtil.getGjzwfwptRtime(ProxyConstants.SID.SHZZXXCXFWJKX);
+        // 接口调用
+        Map<String, Object> postParams = new HashMap<>();
+        //组装参数
+        //公共请求参数
+        postParams.put("version","");
+        //请求查询条件参数
+        JSONObject params = new JSONObject();
+//		params.put("usc_code", "521000000886907386");
+//		params.put("org_name", "xxx");
+        params.putOnce("usc_code", usc_code);
+        params.putOnce("org_name", org_name);
+        postParams.put("biz_content", params.toString());
+        return postRequest(ProxyConstants.SID.SHZZXXCXFWJKX, gjzwfwpt_sign, gjzwfwpt_rtime, postParams);
+    }
+
+    //民政部_民办非企业名称变更登记记录查询(新)
+    @ApiOperation(value = "民政部_民办非企业名称变更登记记录查询(新)")
+    @GetMapping("/mbfqymcbgdjjlcxx")
+    public String mbfqymcbgdjjlcxx(@ApiParam(value = "统一社会信用代码") @RequestParam String tyxydm) {
+        String appkey = "3268f9654271addb14e01868f4350c5d"; //发送方签名
+        String gjzwfwpt_sign = GjzwfwptSignUtil.getGjzwfwptSign(ProxyConstants.SID.MBFQYMCBGDJJLCXX,
+                ProxyConstants.RID.QSBDC_RID, appkey);
+        String gjzwfwpt_rtime = GjzwfwptSignUtil.getGjzwfwptRtime(ProxyConstants.SID.MBFQYMCBGDJJLCXX);
+        // 接口调用
+        Map<String, Object> postParams = new HashMap<>();
+        //组装参数
+        //公共请求参数
+        postParams.put("version","");
+        //请求查询条件参数
+        JSONObject params = new JSONObject();
+//		params.put("tyxydm", "521000000886907386");
+        params.putOnce("tyxydm", tyxydm);
+        postParams.put("biz_content", params.toString());
+        return postRequest(ProxyConstants.SID.MBFQYMCBGDJJLCXX, gjzwfwpt_sign, gjzwfwpt_rtime, postParams);
+    }
+
+    //民政部_社会团体法人登记证书查询(新)
+    @ApiOperation(value = "民政部_社会团体法人登记证书查询(新)")
+    @GetMapping("/shttfrdjzscxx")
+    public String shttfrdjzscxx(
+            @ApiParam(value = "唯一社会信用代码") @RequestParam String usc_code,
+            @ApiParam(value = "组织名称") @RequestParam String org_name) {
+        String appkey = "81d1f6c7b58b098b542c979d52411426"; //发送方签名
+        String gjzwfwpt_sign = GjzwfwptSignUtil.getGjzwfwptSign(ProxyConstants.SID.SHTTFRDJZSCXX,
+                ProxyConstants.RID.QSBDC_RID, appkey);
+        String gjzwfwpt_rtime = GjzwfwptSignUtil.getGjzwfwptRtime(ProxyConstants.SID.SHTTFRDJZSCXX);
+        // 接口调用
+        Map<String, Object> postParams = new HashMap<>();
+        //组装参数
+        //公共请求参数
+        postParams.put("version","");
+        //请求查询条件参数
+        JSONObject params = new JSONObject();
+//		params.put("usc_code", "521000000886907386");
+//		params.put("org_name", "xxx");
+        params.putOnce("usc_code", usc_code);
+        params.putOnce("org_name", org_name);
+        postParams.put("biz_content", params.toString());
+        return postRequest(ProxyConstants.SID.SHTTFRDJZSCXX, gjzwfwpt_sign, gjzwfwpt_rtime, postParams);
+    }
+
+    //民政部_社会团体名称变更登记记录查询
+    @ApiOperation(value = "民政部_社会团体名称变更登记记录查询")
+    @GetMapping("/shttmcbgdjjlcx")
+    public String shttmcbgdjjlcx(@ApiParam(value = "统一社会信用代码") @RequestParam String tyxydm) {
+        String appkey = "b90f6831c8ee12e45d21f0fa9421de9b"; //发送方签名
+        String gjzwfwpt_sign = GjzwfwptSignUtil.getGjzwfwptSign(ProxyConstants.SID.SHTTMCBGDJJLCX,
+                ProxyConstants.RID.QSBDC_RID, appkey);
+        String gjzwfwpt_rtime = GjzwfwptSignUtil.getGjzwfwptRtime(ProxyConstants.SID.SHTTMCBGDJJLCX);
+        // 接口调用
+        Map<String, Object> postParams = new HashMap<>();
+        //组装参数
+        //公共请求参数
+        postParams.put("version","");
+        //请求查询条件参数
+        JSONObject params = new JSONObject();
+//		params.put("tyxydm", "521000000886907386");
+        params.putOnce("tyxydm", tyxydm);
+        postParams.put("biz_content", params.toString());
+        return postRequest(ProxyConstants.SID.SHTTMCBGDJJLCX, gjzwfwpt_sign, gjzwfwpt_rtime, postParams);
+    }
+
+    // 民政部_涉外婚姻登记信息查询
+    @ApiOperation("83民政部_涉外婚姻登记信息查询")
+    @GetMapping("/swhydjxxcx")
+    public String swhydjxxcx(
+            @ApiParam(value = "姓名") @RequestParam String name,
+            @ApiParam(value = "身份证号") @RequestParam String cert_num) {
+        String appkey = "d7ba1384d8c119823be782c20e2c3570"; //发送方签名
+        String gjzwfwpt_sign = GjzwfwptSignUtil.getGjzwfwptSign(ProxyConstants.SID.SWHYDJXXCX,
+                ProxyConstants.RID.QSBDC_RID, appkey);
+        String gjzwfwpt_rtime = GjzwfwptSignUtil.getGjzwfwptRtime(ProxyConstants.SID.SWHYDJXXCX);
+        // 接口调用
+        Map<String, Object> postParams = new HashMap<>();
+        //组装参数
+        //公共请求参数
+        postParams.put("version","1.0");
+        //请求查询条件参数
+        JSONObject params = new JSONObject();
+        params.putOnce("name", name);
+        params.putOnce("cert_num", cert_num);
+        postParams.put("biz_content", params.toString());
+        return postRequest(ProxyConstants.SID.SWHYDJXXCX, gjzwfwpt_sign, gjzwfwpt_rtime, postParams);
+    }
+
+    //民政部_涉外婚姻登记信息核验(个人)(新)
+    @ApiOperation(value = "民政部_涉外婚姻登记信息核验(个人)(新)")
+    @GetMapping("/swhydjxxhygrx")
+    public String swhydjxxhygrx(
+            @ApiParam(value = "姓名") @RequestParam String name,
+            @ApiParam(value = "身份证号码") @RequestParam String cert_num) {
+        String appkey = "ffd39c059ce081fd2debac66238d79cd"; //发送方签名
+        String gjzwfwpt_sign = GjzwfwptSignUtil.getGjzwfwptSign(ProxyConstants.SID.SWHYDJXXHYGRX,
+                ProxyConstants.RID.QSBDC_RID, appkey);
+        String gjzwfwpt_rtime = GjzwfwptSignUtil.getGjzwfwptRtime(ProxyConstants.SID.SWHYDJXXHYGRX);
+        // 接口调用
+        Map<String, Object> postParams = new HashMap<>();
+        //组装参数
+        //公共请求参数
+        postParams.put("version","1.0");
+        //请求查询条件参数
+        JSONObject params = new JSONObject();
+        params.putOnce("name", name);
+        params.putOnce("cert_num", cert_num);
+        postParams.put("biz_content", params.toString());
+        return postRequest(ProxyConstants.SID.SWHYDJXXHYGRX, gjzwfwpt_sign, gjzwfwpt_rtime, postParams);
+    }
+
+    //民政部_涉外婚姻登记信息核验(双方)
+    @ApiOperation(value = "94民政部_涉外婚姻登记信息核验(双方) ")
+    @GetMapping("/swhydjxxhysf")
+    public String swhydjxxhysf(
+            @ApiParam(value = "男方姓名") @RequestParam String name_man,
+            @ApiParam(value = "男方身份证件号码") @RequestParam String cert_num_man,
+            @ApiParam(value = "女方姓名") @RequestParam String name_woman,
+            @ApiParam(value = "女方身份证件号码") @RequestParam String cert_num_woman) {
+        String appkey = "2a1c4d5d191d692226aa3cd20861610b"; //发送方签名
+        String gjzwfwpt_sign = GjzwfwptSignUtil.getGjzwfwptSign(ProxyConstants.SID.SWHYDJXXHYSF,
+                ProxyConstants.RID.QSBDC_RID, appkey);
+        String gjzwfwpt_rtime = GjzwfwptSignUtil.getGjzwfwptRtime(ProxyConstants.SID.SWHYDJXXHYSF);
+        // 接口调用
+        Map<String, Object> postParams = new HashMap<>();
+        //组装参数
+        //公共请求参数
+        postParams.put("version","1.0");
+        //请求查询条件参数
+        JSONObject params = new JSONObject();
+        params.putOnce("name_man", name_man);
+        params.putOnce("cert_num_man", cert_num_man);
+        params.putOnce("name_woman", name_woman);
+        params.putOnce("cert_num_woman", cert_num_woman);
+        postParams.put("biz_content", params.toString());
+        return postRequest(ProxyConstants.SID.SWHYDJXXHYSF, gjzwfwpt_sign, gjzwfwpt_rtime, postParams);
+    }
+
+    //民政部_涉外婚姻登记信息核验(双方)(新)
+    @ApiOperation(value = "民政部_涉外婚姻登记信息核验(双方)(新) ")
+    @GetMapping("/swhydjxxhysfx")
+    public String swhydjxxhysfx(
+            @ApiParam(value = "男方姓名") @RequestParam String name_man,
+            @ApiParam(value = "男方身份证件号码") @RequestParam String cert_num_man,
+            @ApiParam(value = "女方姓名") @RequestParam String name_woman,
+            @ApiParam(value = "女方身份证件号码") @RequestParam String cert_num_woman) {
+        String appkey = "24289506f7b4b5c5f5708bbdd73cb761"; //发送方签名
+        String gjzwfwpt_sign = GjzwfwptSignUtil.getGjzwfwptSign(ProxyConstants.SID.SWHYDJXXHYSFX,
+                ProxyConstants.RID.QSBDC_RID, appkey);
+        String gjzwfwpt_rtime = GjzwfwptSignUtil.getGjzwfwptRtime(ProxyConstants.SID.SWHYDJXXHYSFX);
+        // 接口调用
+        Map<String, Object> postParams = new HashMap<>();
+        //组装参数
+        //公共请求参数
+        postParams.put("version","1.0");
+        //请求查询条件参数
+        JSONObject params = new JSONObject();
+        params.putOnce("name_man", name_man);
+        params.putOnce("cert_num_man", cert_num_man);
+        params.putOnce("name_woman", name_woman);
+        params.putOnce("cert_num_woman", cert_num_woman);
+        postParams.put("biz_content", params.toString());
+        return postRequest(ProxyConstants.SID.SWHYDJXXHYSFX, gjzwfwpt_sign, gjzwfwpt_rtime, postParams);
+    }
+
+    //民政部_收养登记证信息(国内)查询
+    @ApiOperation(value = "民政部_收养登记证信息(国内)查询")
+    @GetMapping("/sydjxxgncx")
+    public String sydjxxgncx(
+            @ApiParam(value = "查询方式:1	根据登记证号查询,\r\n"
+                    + "2	根据男收养人姓名和男收养人身份证号查询,\r\n"
+                    + "3	根据女收养人姓名和女收养人身份证号查询,\r\n"
+                    + "4	根据被收养人姓名和被收养人身份证号查询", allowableValues = "1,2,3,4") @RequestParam String querytype,
+            @ApiParam(value = "证件号码") @RequestParam String reqcert_num,
+            @ApiParam(value = "姓名") @RequestParam(required = false) String name) {
+        String appkey = "e8c6e754492a296ecad061a3917ad3c1"; //发送方签名
+        String gjzwfwpt_sign = GjzwfwptSignUtil.getGjzwfwptSign(ProxyConstants.SID.SYDJXXGNCX,
+                ProxyConstants.RID.QSBDC_RID, appkey);
+        String gjzwfwpt_rtime = GjzwfwptSignUtil.getGjzwfwptRtime(ProxyConstants.SID.SYDJXXGNCX);
+        // 接口调用
+        Map<String, Object> postParams = new HashMap<>();
+        //组装参数
+        //公共请求参数
+        postParams.put("version","");
+        //请求查询条件参数
+        JSONObject params = new JSONObject();
+        //查询条件,以下4种查询条件选择一种
+        //1.按登记证号查询
+        params.putOnce("querytype", querytype);
+        params.putOnce("cert_num", reqcert_num);
+        params.putOnce("name", name);
+        postParams.put("biz_content", params.toString());
+        return postRequest(ProxyConstants.SID.SYDJXXGNCX, gjzwfwpt_sign, gjzwfwpt_rtime, postParams);
+    }
+
+
+    // Rest post接口
+    private String postRequest(String sid, String gjzwfwpt_sign,
+                               String gjzwfwpt_rtime, Map<String, Object> postParams) {
+        postParams.put("access_key", "AH34");
+        postParams.put("format", "json");
+        postParams.put("request_id", "");
+        postParams.put("sign", "aaaa");
+        postParams.put("timestamp", gjzwfwpt_rtime);
+        return HttpRequest.post(ProxyConstants.URL.REST_URL)
+                .form(postParams)
+                .header("gjzwfwpt_rid", ProxyConstants.RID.QSBDC_RID)
+                .header("gjzwfwpt_sid", sid)
+                .header("gjzwfwpt_sign", gjzwfwpt_sign)
+                .header("gjzwfwpt_rtime", gjzwfwpt_rtime)
+                .header("connection", "Keep-Alive")
+                .header("user-agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;SV1)")
+                .header("Content-Type","application/x-www-form-urlencoded")
+                .timeout(20000)//超时,毫秒
+                .execute().body();
+    }
+
+    // webservice post接口
+    private String postServiceRequest(String sid, String gjzwfwpt_sign,
+                                      String gjzwfwpt_rtime, String body) {
+
+        return HttpRequest.post(ProxyConstants.URL.REST_URL)
+                .body(body)
+                .header("gjzwfwpt_rid", ProxyConstants.RID.QSBDC_RID)
+                .header("gjzwfwpt_sid", sid)
+                .header("gjzwfwpt_sign", gjzwfwpt_sign)
+                .header("gjzwfwpt_rtime", gjzwfwpt_rtime)
+                .header("connection", "Keep-Alive")
+                .header("user-agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;SV1)")
+                .header("Content-Type","text/xml")
+                .timeout(20000)//超时,毫秒
+                .execute().body();
+    }
+}

+ 1 - 0
boman-web-core/src/main/java/com/boman/web/core/service/TaskService.java

@@ -6,6 +6,7 @@ import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
 import com.alibaba.fastjson.TypeReference;
 import com.alibaba.nacos.common.http.HttpUtils;
+import com.aliyuncs.http.HttpRequest;
 import com.boman.common.core.utils.DateUtils;
 import com.boman.common.core.utils.IdUtils;
 import com.boman.common.core.utils.StringUtils;

+ 82 - 0
boman-web-core/src/main/java/com/boman/web/core/utils/GjzwfwptSignUtil.java

@@ -0,0 +1,82 @@
+package com.boman.web.core.utils;
+
+
+import cn.hutool.http.HttpRequest;
+import com.alibaba.fastjson.JSONObject;
+import com.boman.common.redis.service.RedisService;
+import javax.annotation.Resource;
+import java.util.concurrent.TimeUnit;
+/**
+ * 签名工具类
+ * @author 86150
+ *
+ */
+public class GjzwfwptSignUtil {
+
+	@Resource
+	static RedisService redisService;
+	/**
+	 * 获取签名
+	 * 1、sid+rid+rtime+appkey 加密生成gjzwfwpt_sign
+	 * 2、sid+rid+rtime+sign TOKENURL 获取appsecret
+	 * 3、使用解密示例代码,用appkey对appsecret进行解密
+	 * 4、将appkey换成步骤三解密后的字符串,重复步骤一,获取最终gjzwfwpt_sign;
+	 * @param sid
+	 * @param rid
+	 * @param appkey
+	 * @return
+	 */
+	public static String getGjzwfwptSign(String sid, String rid,
+			String appkey) {
+
+		String gjzwfwpt_sign = redisService.getCacheObject(appkey + ":gjzwfwpt_sign");
+		if (null == gjzwfwpt_sign) {
+			// 1、sid+rid+rtime+appkey 加密生成gjzwfwpt_sign
+			Long rtime = System.currentTimeMillis();
+			String content = sid + rid + rtime; // 内容拼接
+			String sign = AESUtil.sign(content, appkey); // 获取签名
+			boolean verifyFlag = AESUtil.verifySign(content, appkey, sign); // 签名验证
+			if (verifyFlag) {
+				// 2、sid+rid+rtime+sign TOKENURL 获取appsecret
+				JSONObject params = new JSONObject();
+				params.put("gjzwfwpt_rid", rid);
+				params.put("gjzwfwpt_sid", sid);
+				params.put("gjzwfwpt_rtime", rtime);
+				params.put("gjzwfwpt_sign", sign);
+				String http = "http://59.255.22.70:8443/authz/authSystem/getAppSecret";
+				String result = HttpRequest.post(http)
+						.body(params.toJSONString())
+						.timeout(20000)//超时,毫秒
+						.execute().body();
+				JSONObject resultObj = JSONObject.parseObject(result);
+				String code = resultObj.getString("code");
+				if ("0".equals(code)) {
+					// 3、使用解密示例代码,用appkey对appsecret进行解密
+					JSONObject dataObj = resultObj.getJSONObject("data");
+					String secret = dataObj.getString("secret");
+					String appsecret = AESUtil.AESDncode(appkey, secret);
+					// 4、将appkey换成步骤三解密后的字符串,重复步骤一,获取最终gjzwfwpt_sign;
+					if (appsecret != null) {
+						gjzwfwpt_sign = AESUtil.sign(content, appsecret);
+					}
+					// Tips:gjzwfwpt_sign有效期10分钟
+					redisService.setCacheObject(appkey + ":gjzwfwpt_sign",gjzwfwpt_sign, 600L, TimeUnit.SECONDS );
+					redisService.setCacheObject(appkey + ":gjzwfwpt_rtime",rtime.toString(), 600L, TimeUnit.SECONDS);
+					System.out.println("最终签名"+gjzwfwpt_sign);
+					return gjzwfwpt_sign;
+				} else {
+					System.out.println("resultObj:" + resultObj.toString());
+				}
+			} else {
+				System.out.println("签名错误,验证签名失败");
+			}
+		}
+		return gjzwfwpt_sign;
+	}
+	
+	public static String getGjzwfwptRtime(String appkey) {
+		String gjzwfwpt_rtime = redisService.getCacheObject(appkey + ":gjzwfwpt_rtime");
+		System.out.println(gjzwfwpt_rtime);
+		return gjzwfwpt_rtime;
+	}
+}