Parcourir la source

feat: qcc update2

shc il y a 1 an
Parent
commit
ca6f8fa7fd

+ 11 - 11
hnqz-upms/hnqz-upms-api/src/main/java/com/qunzhixinxi/hnqz/admin/api/entity/WmQccInfo.java

@@ -57,21 +57,21 @@ public class WmQccInfo implements Serializable {
 
 
     @TableField(typeHandler = JacksonTypeHandler.class)
-    private  List<Map<String, Object>> actualControllerList;
+    private List<Map<String, Object>> actualControllerList;
 
     @TableField(typeHandler = JacksonTypeHandler.class)
-    private  List<Map<String, Object>> adminLicenseList;
+    private List<Map<String, Object>> adminLicenseList;
 
     @TableField(typeHandler = JacksonTypeHandler.class)
-    private  List<Map<String, Object>> taxCreditList;
+    private List<Map<String, Object>> taxCreditList;
 
 
     @TableField(typeHandler = JacksonTypeHandler.class)
-    private Map<String, Object> shiXin;
+    private List<Map<String, Object>> shiXin;
 
 
     @TableField(typeHandler = JacksonTypeHandler.class)
-    private Map<String, Object> zhiXing;
+    private List<Map<String, Object>> zhiXing;
 
 
     @TableField(typeHandler = JacksonTypeHandler.class)
@@ -79,27 +79,27 @@ public class WmQccInfo implements Serializable {
 
 
     @TableField(value = "exp", typeHandler = JacksonTypeHandler.class)
-    private  Map<String, Object> exp;
+    private List<Map<String, Object>> exp;
 
 
     @TableField(typeHandler = JacksonTypeHandler.class)
-    private Map<String, Object> chattelMortgage;
+    private List<Map<String, Object>> chattelMortgage;
 
 
     @TableField(typeHandler = JacksonTypeHandler.class)
     private Map<String, Object> liquidation;
 
     @TableField(typeHandler = JacksonTypeHandler.class)
-    private Map<String, Object> seriousIllegal;
+    private List<Map<String, Object>> seriousIllegal;
 
     @TableField(typeHandler = JacksonTypeHandler.class)
-    private Map<String, Object> bankruptcy;
+    private List<Map<String, Object>> bankruptcy;
 
     @TableField(typeHandler = JacksonTypeHandler.class)
-    private Map<String, Object> sumptuary;
+    private List<Map<String, Object>> sumptuary;
 
     @TableField(typeHandler = JacksonTypeHandler.class)
-    private Map<String, Object> taxIllegal;
+    private List<Map<String, Object>> taxIllegal;
 
     @TableField(typeHandler = JacksonTypeHandler.class)
     private Map<String, Object> taxAbnormal;

+ 185 - 18
hnqz-upms/hnqz-upms-biz/src/main/java/com/qunzhixinxi/hnqz/admin/service/impl/WmQccInfoServiceImpl.java

@@ -20,6 +20,7 @@ import java.util.Collections;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
+import java.util.Set;
 import java.util.stream.Collectors;
 
 /**
@@ -79,7 +80,11 @@ public class WmQccInfoServiceImpl extends ServiceImpl<WmQccInfoMapper, WmQccInfo
             bizInfo.put("StockType", resp.getStr("StockType"));
             bizInfo.put("RecCap", resp.getStr("RecCap"));
             bizInfo.put("AreaCode", resp.getStr("AreaCode"));
+            bizInfo.put("No", resp.getStr("No"));
+            bizInfo.put("Province", resp.getStr("Province"));
+            bizInfo.put("UpdatedDate", resp.getStr("UpdatedDate"));
             bizInfo.put("ImageUrl", resp.getStr("ImageUrl"));
+            bizInfo.put("EntType", resp.getStr("EntType"));
             qccInfo.setBizInfo(bizInfo);
 
             // qccInfo.setRevokeInfo((Map<String, Object>) resp.get("RevokeInfo"));
@@ -121,24 +126,70 @@ public class WmQccInfoServiceImpl extends ServiceImpl<WmQccInfoMapper, WmQccInfo
             qccInfo.setChangeList(changeRecord1);
 
 
-            // qccInfo.setBankInfo();
+            qccInfo.setBankInfo(Collections.emptyMap());
             // qccInfo.setScale();
-            // qccInfo.setTaxAbnormal();
+            qccInfo.setTaxAbnormal(Collections.emptyMap());
 
             // 严重违法查询
             JSONObject seriousIllegalList = QccUtils.getSeriousIllegalList(regCode);
             if (QccUtils.ok(seriousIllegalList)) {
                 JSONObject result1 = QccUtils.getResult(seriousIllegalList);
-                Object data = result1.get("Data");
-                qccInfo.setSeriousIllegal(data instanceof JSONNull ? Collections.emptyMap() : (Map<String, Object>) result1.get("Data"));
+
+                Object data1 = result1.get("Data");
+
+                List<Map<String, Object>> collect;
+                if (data1 instanceof JSONNull) {
+                    collect = Collections.emptyList();
+                } else {
+                    JSONArray data = (JSONArray) data1;
+                    collect = data.stream().map(item -> {
+                        JSONObject itemInfo = (JSONObject) item;
+                        Map<String, Object> itemInfoMap = new HashMap<>(6);
+                        itemInfoMap.put("Type", itemInfo.getStr("Type"));
+                        itemInfoMap.put("AddReason", itemInfo.getStr("AddReason"));
+                        itemInfoMap.put("AddDate", itemInfo.getStr("AddDate"));
+                        itemInfoMap.put("AddOffice", itemInfo.getStr("AddOffice"));
+                        itemInfoMap.put("RemoveReason", itemInfo.getStr("RemoveReason"));
+                        itemInfoMap.put("RemoveDate", itemInfo.getStr("RemoveDate"));
+                        itemInfoMap.put("RemoveOffice", itemInfo.getStr("RemoveOffice"));
+                        return itemInfoMap;
+                    }).collect(Collectors.toList());
+                }
+
+
+                qccInfo.setSeriousIllegal(collect);
             }
 
             // 失信查询
             JSONObject shixinList = QccUtils.getShixinList(regCode);
             if (QccUtils.ok(shixinList)) {
                 JSONObject result1 = QccUtils.getResult(shixinList);
-                Object data = result1.get("Data");
-                qccInfo.setShiXin(data instanceof JSONNull ? Collections.emptyMap() : (Map<String, Object>) result1.get("Data"));
+
+                Object data1 = result1.get("Data");
+
+                List<Map<String, Object>> collect;
+                if (data1 instanceof JSONNull) {
+                    collect = Collections.emptyList();
+                } else {
+                    JSONArray data = (JSONArray) data1;
+                    collect = data.stream().map(sx -> {
+                        JSONObject sxInfo = (JSONObject) sx;
+                        Map<String, Object> sxInfoMap = new HashMap<>(9);
+                        sxInfoMap.put("Id", sxInfo.getStr("Id"));
+                        sxInfoMap.put("Liandate", sxInfo.getStr("Liandate"));
+                        sxInfoMap.put("Anno", sxInfo.getStr("Anno"));
+                        sxInfoMap.put("Executegov", sxInfo.getStr("Executegov"));
+                        sxInfoMap.put("Executestatus", sxInfo.getStr("Executestatus"));
+                        sxInfoMap.put("Publicdate", sxInfo.getStr("Publicdate"));
+                        sxInfoMap.put("Executeno", sxInfo.getStr("Executeno"));
+                        sxInfoMap.put("ActionRemark", sxInfo.getStr("ActionRemark"));
+                        sxInfoMap.put("Amount", sxInfo.getStr("Amount"));
+                        return sxInfoMap;
+                    }).collect(Collectors.toList());
+                }
+
+
+                qccInfo.setShiXin(collect);
             }
 
             // 实际控制人
@@ -170,40 +221,134 @@ public class WmQccInfoServiceImpl extends ServiceImpl<WmQccInfoMapper, WmQccInfo
             JSONObject exceptionList = QccUtils.getExceptionList(regCode);
             if (QccUtils.ok(exceptionList)) {
                 JSONObject result1 = QccUtils.getResult(exceptionList);
-                Object data = result1.get("Data");
-                qccInfo.setExp(data instanceof JSONNull ? Collections.emptyMap() : (Map<String, Object>) result1.get("Data"));
+
+                Object data1 = result1.get("Data");
+
+                List<Map<String, Object>> collect;
+                if (data1 instanceof JSONNull) {
+                    collect = Collections.emptyList();
+                } else {
+                    JSONArray data = (JSONArray) data1;
+                    collect = data.stream().map(item -> {
+                        JSONObject itemInfo = (JSONObject) item;
+                        Map<String, Object> itemInfoMap = new HashMap<>(6);
+                        itemInfoMap.put("AddReason", itemInfo.getStr("AddReason"));
+                        itemInfoMap.put("AddDate", itemInfo.getStr("AddDate"));
+                        itemInfoMap.put("RomoveReason", itemInfo.getStr("RomoveReason"));
+                        itemInfoMap.put("RemoveDate", itemInfo.getStr("RemoveDate"));
+                        itemInfoMap.put("DecisionOffice", itemInfo.getStr("DecisionOffice"));
+                        itemInfoMap.put("RemoveDecisionOffice", itemInfo.getStr("RemoveDecisionOffice"));
+                        return itemInfoMap;
+                    }).collect(Collectors.toList());
+                }
+
+                qccInfo.setExp(collect);
             }
 
             // 执行人
             JSONObject zhixingList = QccUtils.getZhixingList(regCode);
             if (QccUtils.ok(zhixingList)) {
                 JSONObject result1 = QccUtils.getResult(zhixingList);
-                Object data = result1.get("Data");
-                qccInfo.setZhiXing(data instanceof JSONNull ? Collections.emptyMap() : (Map<String, Object>) result1.get("Data"));
+                Object data1 = result1.get("Data");
+
+                List<Map<String, Object>> collect;
+                if (data1 instanceof JSONNull) {
+                    collect = Collections.emptyList();
+                } else {
+                    JSONArray data = (JSONArray) data1;
+
+                    collect = data.stream().map(zx -> {
+                        JSONObject zxInfo = (JSONObject) zx;
+                        Map<String, Object> zxInfoMap = new HashMap<>(6);
+                        zxInfoMap.put("Id", zxInfo.getStr("Id"));
+                        zxInfoMap.put("Liandate", zxInfo.getStr("Liandate"));
+                        zxInfoMap.put("Anno", zxInfo.getStr("Anno"));
+                        zxInfoMap.put("ExecuteGov", zxInfo.getStr("ExecuteGov"));
+                        zxInfoMap.put("Biaodi", zxInfo.getStr("Biaodi"));
+                        zxInfoMap.put("SuspectedApplicant", zxInfo.getStr("SuspectedApplicant"));
+                        return zxInfoMap;
+                    }).collect(Collectors.toList());
+                }
+
+                qccInfo.setZhiXing(collect);
             }
 
             // 税收违法
             JSONObject taxIllegalList = QccUtils.getTaxIllegalList(regCode);
             if (QccUtils.ok(taxIllegalList)) {
                 JSONObject result1 = QccUtils.getResult(taxIllegalList);
-                Object data = result1.get("Data");
-                qccInfo.setTaxIllegal(data instanceof JSONNull ? Collections.emptyMap() : (Map<String, Object>) result1.get("Data"));
+                Object data1 = result1.get("Data");
+
+                List<Map<String, Object>> collect;
+                if (data1 instanceof JSONNull) {
+                    collect = Collections.emptyList();
+                } else {
+                    JSONArray data = (JSONArray) data1;
+                    collect = data.stream().map(item -> {
+                        JSONObject itemInfo = (JSONObject) item;
+                        Map<String, Object> itemInfoMap = new HashMap<>(6);
+                        itemInfoMap.put("Id", itemInfo.getStr("Id"));
+                        itemInfoMap.put("PublishDate", itemInfo.getStr("PublishDate"));
+                        itemInfoMap.put("CaseNature", itemInfo.getStr("CaseNature"));
+                        itemInfoMap.put("TaxGov", itemInfo.getStr("TaxGov"));
+                        itemInfoMap.put("IllegalContent", itemInfo.getStr("IllegalContent"));
+                        itemInfoMap.put("PunishContent", itemInfo.getStr("PunishContent"));
+                        return itemInfoMap;
+                    }).collect(Collectors.toList());
+                }
+                qccInfo.setTaxIllegal(collect);
             }
 
             // 破产重组
             JSONObject bankruptcyList = QccUtils.getBankruptcyList(regCode);
             if (QccUtils.ok(bankruptcyList)) {
                 JSONObject result1 = QccUtils.getResult(bankruptcyList);
-                Object data = result1.get("Data");
-                qccInfo.setBankruptcy(data instanceof JSONNull ? Collections.emptyMap() : (Map<String, Object>) result1.get("Data"));
+                Object data1 = result1.get("Data");
+
+                List<Map<String, Object>> collect;
+                if (data1 instanceof JSONNull) {
+                    collect = Collections.emptyList();
+                } else {
+                    JSONArray data = (JSONArray) data1;
+                    collect = data.stream().map(item -> {
+                        JSONObject itemInfo = (JSONObject) item;
+                        Map<String, Object> itemInfoMap = new HashMap<>(5);
+                        itemInfoMap.put("Id", itemInfo.getStr("Id"));
+                        itemInfoMap.put("CaseNo", itemInfo.getStr("CaseNo"));
+                        itemInfoMap.put("PublicDate", itemInfo.getStr("PublicDate"));
+                        itemInfoMap.put("ApplicantList", itemInfo.get("ApplicantList"));
+                        itemInfoMap.put("RespondentList", itemInfo.get("RespondentList"));
+                        return itemInfoMap;
+                    }).collect(Collectors.toList());
+                }
+                qccInfo.setBankruptcy(collect);
             }
 
             // 动产抵押
             JSONObject chattelMortgageList = QccUtils.getChattelMortgageList(regCode);
             if (QccUtils.ok(chattelMortgageList)) {
                 JSONObject result1 = QccUtils.getResult(chattelMortgageList);
-                Object data = result1.get("Data");
-                qccInfo.setChattelMortgage(data instanceof JSONNull ? Collections.emptyMap() : (Map<String, Object>) result1.get("Data"));
+                Object data1 = result1.get("Data");
+
+                List<Map<String, Object>> collect;
+                if (data1 instanceof JSONNull) {
+                    collect = Collections.emptyList();
+                } else {
+                    JSONArray data = (JSONArray) data1;
+                    collect = data.stream().map(item -> {
+                        JSONObject itemInfo = (JSONObject) item;
+                        Map<String, Object> itemInfoMap = new HashMap<>(6);
+                        itemInfoMap.put("RegisterNo", itemInfo.getStr("RegisterNo"));
+                        itemInfoMap.put("RegisterDate", itemInfo.getStr("RegisterDate"));
+                        itemInfoMap.put("RegisterOffice", itemInfo.getStr("RegisterOffice"));
+                        itemInfoMap.put("DebtSecuredAmount", itemInfo.getStr("DebtSecuredAmount"));
+                        itemInfoMap.put("Status", itemInfo.getStr("Status"));
+                        itemInfoMap.put("Detail", itemInfo.getStr("Detail"));
+                        itemInfoMap.put("DebtorInfo", itemInfo.getStr("DebtorInfo"));
+                        return itemInfoMap;
+                    }).collect(Collectors.toList());
+                }
+                qccInfo.setChattelMortgage(collect);
             }
 
             // 行政处罚
@@ -218,8 +363,30 @@ public class WmQccInfoServiceImpl extends ServiceImpl<WmQccInfoMapper, WmQccInfo
             JSONObject sumptuaryList = QccUtils.getSumptuaryList(regCode);
             if (QccUtils.ok(sumptuaryList)) {
                 JSONObject result1 = QccUtils.getResult(sumptuaryList);
-                Object data = result1.get("Data");
-                qccInfo.setSumptuary(data instanceof JSONNull ? Collections.emptyMap() : (Map<String, Object>) result1.get("Data"));
+                Object data1 = result1.get("Data");
+
+                List<Map<String, Object>> collect;
+                if (data1 instanceof JSONNull) {
+                    collect = Collections.emptyList();
+                } else {
+                    JSONArray data = (JSONArray) data1;
+                    collect = data.stream().map(item -> {
+                        JSONObject itemInfo = (JSONObject) item;
+                        Map<String, Object> itemInfoMap = new HashMap<>(10);
+                        itemInfoMap.put("Id", itemInfo.getStr("Id"));
+                        itemInfoMap.put("CaseNo", itemInfo.getStr("CaseNo"));
+                        itemInfoMap.put("PersonName", itemInfo.getStr("PersonName"));
+                        itemInfoMap.put("PersonId", itemInfo.getStr("PersonId"));
+                        itemInfoMap.put("JudgeDate", itemInfo.getStr("JudgeDate"));
+                        itemInfoMap.put("PublishDate", itemInfo.getStr("PublishDate"));
+                        itemInfoMap.put("KeyNo", itemInfo.getStr("KeyNo"));
+                        itemInfoMap.put("CompanyName", itemInfo.getStr("CompanyName"));
+                        itemInfoMap.put("Applicant", itemInfo.getStr("Applicant"));
+                        itemInfoMap.put("ApplicantNo", itemInfo.getStr("ApplicantNo"));
+                        return itemInfoMap;
+                    }).collect(Collectors.toList());
+                }
+                qccInfo.setSumptuary(collect);
             }
 
             // 行政许可