Browse Source

处理转义字符

liuam 7 years ago
parent
commit
bb5463089a
1 changed files with 7 additions and 6 deletions
  1. 7 6
      src/main/java/com/uas/credit/controller/ErpQueryController.java

+ 7 - 6
src/main/java/com/uas/credit/controller/ErpQueryController.java

@@ -6,6 +6,7 @@ import com.uas.credit.model.PersonJson;
 import com.uas.credit.model.PersonQuery;
 import com.uas.credit.service.*;
 import com.uas.credit.util.FlexJsonUtils;
+import org.apache.commons.lang3.StringEscapeUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestMethod;
@@ -58,13 +59,13 @@ public class ErpQueryController {
         }
         if (erpQuery != null) {
             // 查询企业债务信息
-            String endeptinfoRoot = enterpriseDeptService.queryEnterpriseDept(erpQuery);
+            String endeptinfoRoot = StringEscapeUtils.unescapeJava(enterpriseDeptService.queryEnterpriseDept(erpQuery));
             // 查询企业经营异常信息
-            String abnormalRoot = enexceptionService.queryEnexception(erpQuery);
+            String abnormalRoot = StringEscapeUtils.unescapeJava(enexceptionService.queryEnexception(erpQuery));
             // 查询企业信用信息
-            String encreditinfoRoot = creditInfoService.queryEnCreditInfo(erpQuery);
+            String encreditinfoRoot = StringEscapeUtils.unescapeJava(creditInfoService.queryEnCreditInfo(erpQuery));
             // 查询企业风险信息
-            String enRiskInfoRoot = enRiskInfoService.queryEnRiskInfo(erpQuery);
+            String enRiskInfoRoot = StringEscapeUtils.unescapeJava(enRiskInfoService.queryEnRiskInfo(erpQuery));
             enterpriseJson = new EnterpriseJson(endeptinfoRoot, abnormalRoot, encreditinfoRoot, enRiskInfoRoot);
 
             enterpriseJsonService.save(enterpriseJson);
@@ -84,9 +85,9 @@ public class ErpQueryController {
         }
         if (erpQuery != null) {
             // 查询个人身份信息
-            String policeCheckRoot = personalService.queryPoliceCheck(erpQuery);
+            String policeCheckRoot = StringEscapeUtils.unescapeJava(personalService.queryPoliceCheck(erpQuery));
             // 查询个人股东信息
-            String personCorporationRoot = personCorporationService.queryPersonCorporation(erpQuery);
+            String personCorporationRoot = StringEscapeUtils.unescapeJava(personCorporationService.queryPersonCorporation(erpQuery));
 
 
             personJson = new PersonJson(policeCheckRoot, personCorporationRoot);