|
@@ -1,9 +1,14 @@
|
|
|
package com.ruoyi.system.service.impl.projectV2;
|
|
|
|
|
|
+import com.alibaba.fastjson2.JSONArray;
|
|
|
+import com.alibaba.fastjson2.JSONObject;
|
|
|
import com.ruoyi.common.annotation.DataScope;
|
|
|
+import com.ruoyi.common.core.domain.AjaxResult;
|
|
|
import com.ruoyi.common.core.domain.entity.SysUser;
|
|
|
import com.ruoyi.common.utils.DateUtils;
|
|
|
import com.ruoyi.common.utils.SecurityUtils;
|
|
|
+import com.ruoyi.common.utils.http.HttpUtils;
|
|
|
+import com.ruoyi.common.utils.sign.Md5Utils;
|
|
|
import com.ruoyi.system.domain.projectV2.ZsyzFj;
|
|
|
import com.ruoyi.system.domain.projectV2.ZsyzSbbzb;
|
|
|
import com.ruoyi.system.mapper.projectV2.XmProjectInvestorMapper;
|
|
@@ -16,7 +21,9 @@ import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
import java.util.ArrayList;
|
|
|
+import java.util.HashMap;
|
|
|
import java.util.List;
|
|
|
+import java.util.Map;
|
|
|
|
|
|
/**
|
|
|
* 招商引资_申报_首谈信息_主Service业务层处理
|
|
@@ -38,6 +45,12 @@ public class ZsyzSbbzbServiceImpl implements IZsyzSbbzbService {
|
|
|
@Autowired
|
|
|
private XmProjectInvestorMapper xmProjectInvestorMapper;
|
|
|
|
|
|
+ /**
|
|
|
+ * 企查查
|
|
|
+ */
|
|
|
+ private static final String KEY = "e50f4b2011ea41a3ad489f0476160041";
|
|
|
+ private static final String SECRET_KEY = "BD8D23FCD36CDEE7E0B25DAB28588163";
|
|
|
+
|
|
|
/**
|
|
|
* 查询招商引资_申报_首谈信息_主
|
|
|
*
|
|
@@ -204,4 +217,72 @@ public class ZsyzSbbzbServiceImpl implements IZsyzSbbzbService {
|
|
|
public long selectZsyzSbbzbListCount(ZsyzSbbzb zsyzSbbzb) {
|
|
|
return zsyzSbbzbMapper.selectZsyzSbbzbListCount(zsyzSbbzb);
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 通过企查查,查询企业信息
|
|
|
+ * @param searchKey
|
|
|
+ * @return
|
|
|
+ *
|
|
|
+ * {
|
|
|
+ * "Paging": {
|
|
|
+ * "PageSize": 1,
|
|
|
+ * "PageIndex": 1,
|
|
|
+ * "TotalRecords": 19
|
|
|
+ * },
|
|
|
+ * "Result": [
|
|
|
+ * {
|
|
|
+ * "KeyNo": "f625a5b661058ba5082ca508f99ffe1b",
|
|
|
+ * "Name": "企查查科技有限公司",
|
|
|
+ * "CreditCode": "91320594088140947F",
|
|
|
+ * "StartDate": "2014-03-12",
|
|
|
+ * "OperName": "陈德强",
|
|
|
+ * "Status": "存续",
|
|
|
+ * "No": "320594000299470"
|
|
|
+ * }
|
|
|
+ * ],
|
|
|
+ * "Status": "200",
|
|
|
+ * "Message": "【有效请求】查询成功",
|
|
|
+ * "OrderNumber": "FUZZYSEARCH2021070316421997519956"
|
|
|
+ * }
|
|
|
+ * key:e50f4b2011ea41a3ad489f0476160041
|
|
|
+ * SecretKey:BD8D23FCD36CDEE7E0B25DAB28588163
|
|
|
+ */
|
|
|
+ @Override
|
|
|
+ public AjaxResult qichachaSearch(String searchKey) {
|
|
|
+ //Headers头信息
|
|
|
+ Map<String,String> map = new HashMap<>();
|
|
|
+ StringBuilder sb = new StringBuilder();
|
|
|
+ String unix = DateUtils.getUnix();
|
|
|
+ map.put("Timespan", unix);
|
|
|
+ sb.append(KEY).append(unix).append(SECRET_KEY);
|
|
|
+ map.put("Token", Md5Utils.hash(sb.toString()).toUpperCase());
|
|
|
+ StringBuilder sbd = new StringBuilder();
|
|
|
+ sbd.append("key=").append(KEY).append("&").append("searchKey=").append(searchKey);
|
|
|
+ String s = HttpUtils.sendGetMap("http://api.qichacha.com/FuzzySearch/GetList",sbd.toString(),map);
|
|
|
+ JSONObject result = JSONObject.parseObject(s);
|
|
|
+ JSONArray resultOut = result.getJSONArray("Result");
|
|
|
+ if (resultOut != null){
|
|
|
+ return AjaxResult.success(resultOut);
|
|
|
+ }
|
|
|
+/* List<Map<String,String>> list = new ArrayList<>();
|
|
|
+ Map<String,String> mapHash = new HashMap<>();
|
|
|
+ mapHash.put("KeyNo","dca20a8e527f6a9e0810fa27e62d6aeb");
|
|
|
+ mapHash.put("StartDate","2018-07-11");
|
|
|
+ mapHash.put("Status","存续");
|
|
|
+ mapHash.put("CreditCode","91340100MA2RWTYA7C");
|
|
|
+ mapHash.put("No","");
|
|
|
+ mapHash.put("OperName","江瑾");
|
|
|
+ mapHash.put("Name","安徽博曼网络科技有限公司");
|
|
|
+ list.add(mapHash);
|
|
|
+ Map<String,String> mapHash2 = new HashMap<>();
|
|
|
+ mapHash2.put("KeyNo","499ede50895e9be65d93c88dc1c67143");
|
|
|
+ mapHash2.put("StartDate","2018-07-11");
|
|
|
+ mapHash2.put("Status","存续");
|
|
|
+ mapHash2.put("CreditCode","91340124MA2UYAET7U");
|
|
|
+ mapHash2.put("No","");
|
|
|
+ mapHash2.put("OperName","谈家强");
|
|
|
+ mapHash2.put("Name","安徽博曼装饰工程有限公司");
|
|
|
+ list.add(mapHash2);*/
|
|
|
+ return AjaxResult.success(new ArrayList<>());
|
|
|
+ }
|
|
|
}
|