|
|
@@ -1,7 +1,9 @@
|
|
|
package com.uas.credit.controller;
|
|
|
|
|
|
import com.uas.credit.model.EnterpriseQuery;
|
|
|
+import com.uas.credit.model.EnterpriseQueryResult;
|
|
|
import com.uas.credit.model.PersonQuery;
|
|
|
+import com.uas.credit.model.PersonQueryResult;
|
|
|
import com.uas.credit.model.abnormalinfo.AbnormalRoot;
|
|
|
import com.uas.credit.model.corpcreditinfo.EncreditinfoRoot;
|
|
|
import com.uas.credit.model.corpriskinfo.EnRiskInfoRoot;
|
|
|
@@ -11,7 +13,6 @@ import com.uas.credit.model.personal.PoliceCheckRoot;
|
|
|
import com.uas.credit.service.*;
|
|
|
import com.uas.credit.util.FlexJsonUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
-import org.springframework.ui.ModelMap;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestMethod;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
@@ -46,9 +47,9 @@ public class ErpQueryController {
|
|
|
* ERP对企业进行查询
|
|
|
*/
|
|
|
@RequestMapping(value = "/queryEn", method = RequestMethod.POST)
|
|
|
- public ModelMap queryEn(String data) {
|
|
|
+ public EnterpriseQueryResult queryEn(String data) {
|
|
|
EnterpriseQuery erpQuery = FlexJsonUtils.fromJson(data, EnterpriseQuery.class);
|
|
|
- ModelMap modelMap = new ModelMap();
|
|
|
+ EnterpriseQueryResult enQuery = new EnterpriseQueryResult();
|
|
|
if (erpQuery != null) {
|
|
|
// 查询企业债务信息
|
|
|
EndeptinfoRoot endeptinfoRoot = enterpriseDeptService.queryAndSave(erpQuery);
|
|
|
@@ -58,29 +59,30 @@ public class ErpQueryController {
|
|
|
EncreditinfoRoot encreditinfoRoot = creditInfoService.queryAndSave(erpQuery);
|
|
|
// 查询企业风险信息
|
|
|
EnRiskInfoRoot enRiskInfoRoot = enRiskInfoService.queryAndSave(erpQuery);
|
|
|
- modelMap.put("endept", endeptinfoRoot);
|
|
|
- modelMap.put("enexception", abnormalRoot);
|
|
|
- modelMap.put("enrisk", encreditinfoRoot);
|
|
|
- modelMap.put("encredit", enRiskInfoRoot);
|
|
|
+ enQuery.setEndept(endeptinfoRoot);
|
|
|
+ enQuery.setEnexception(abnormalRoot);
|
|
|
+ enQuery.setEnrisk(enRiskInfoRoot);
|
|
|
+ enQuery.setEncredit(encreditinfoRoot);
|
|
|
+
|
|
|
}
|
|
|
- return modelMap;
|
|
|
+ return enQuery;
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* erp对个人进行查询
|
|
|
*/
|
|
|
@RequestMapping(value = "/queryPe", method = RequestMethod.POST)
|
|
|
- public ModelMap queryPerson(String data) {
|
|
|
+ public PersonQueryResult queryPerson(String data) {
|
|
|
PersonQuery erpQuery = FlexJsonUtils.fromJson(data, PersonQuery.class);
|
|
|
- ModelMap modelMap = new ModelMap();
|
|
|
+ PersonQueryResult result = new PersonQueryResult();
|
|
|
if (erpQuery != null) {
|
|
|
// 查询个人身份信息
|
|
|
PoliceCheckRoot policeCheckRoot = personalService.queryAndSave(erpQuery);
|
|
|
// 查询个人股东信息
|
|
|
PersonCorporationRoot personCorporationRoot = personCorporationService.queryAndSave(erpQuery);
|
|
|
- modelMap.put("pnidentity", policeCheckRoot);
|
|
|
- modelMap.put("pnshareholder", personCorporationRoot);
|
|
|
+ result.setPnidentity(policeCheckRoot);
|
|
|
+ result.setPnshareholder(personCorporationRoot);
|
|
|
}
|
|
|
- return modelMap;
|
|
|
+ return result;
|
|
|
}
|
|
|
}
|