|
@@ -1,9 +1,6 @@
|
|
|
package com.uas.credit.controller;
|
|
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.*;
|
|
|
import com.uas.credit.model.abnormalinfo.AbnormalRoot;
|
|
import com.uas.credit.model.abnormalinfo.AbnormalRoot;
|
|
|
import com.uas.credit.model.corpcreditinfo.EncreditinfoRoot;
|
|
import com.uas.credit.model.corpcreditinfo.EncreditinfoRoot;
|
|
|
import com.uas.credit.model.corpriskinfo.EnRiskInfoRoot;
|
|
import com.uas.credit.model.corpriskinfo.EnRiskInfoRoot;
|
|
@@ -43,6 +40,12 @@ public class ErpQueryController {
|
|
|
@Autowired
|
|
@Autowired
|
|
|
private PersonCorporationService personCorporationService;
|
|
private PersonCorporationService personCorporationService;
|
|
|
|
|
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ private PersonJsonService personJsonService;
|
|
|
|
|
+
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ private EnterpriseJsonService enterpriseJsonService;
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* ERP对企业进行查询
|
|
* ERP对企业进行查询
|
|
|
*/
|
|
*/
|
|
@@ -64,6 +67,10 @@ public class ErpQueryController {
|
|
|
enQuery.setEnrisk(enRiskInfoRoot);
|
|
enQuery.setEnrisk(enRiskInfoRoot);
|
|
|
enQuery.setEncredit(encreditinfoRoot);
|
|
enQuery.setEncredit(encreditinfoRoot);
|
|
|
|
|
|
|
|
|
|
+ // 将调用接口返回数据保存到数据库
|
|
|
|
|
+ String json = FlexJsonUtils.toJson(enQuery);
|
|
|
|
|
+ EnterpriseJson enterpriseJson = new EnterpriseJson(json);
|
|
|
|
|
+ enterpriseJsonService.save(enterpriseJson);
|
|
|
}
|
|
}
|
|
|
return enQuery;
|
|
return enQuery;
|
|
|
}
|
|
}
|
|
@@ -82,6 +89,10 @@ public class ErpQueryController {
|
|
|
PersonCorporationRoot personCorporationRoot = personCorporationService.queryAndSave(erpQuery);
|
|
PersonCorporationRoot personCorporationRoot = personCorporationService.queryAndSave(erpQuery);
|
|
|
result.setPnidentity(policeCheckRoot);
|
|
result.setPnidentity(policeCheckRoot);
|
|
|
result.setPnshareholder(personCorporationRoot);
|
|
result.setPnshareholder(personCorporationRoot);
|
|
|
|
|
+
|
|
|
|
|
+ String json = FlexJsonUtils.toJson(result);
|
|
|
|
|
+ PersonJson personJson = new PersonJson(json);
|
|
|
|
|
+ personJsonService.save(personJson);
|
|
|
}
|
|
}
|
|
|
return result;
|
|
return result;
|
|
|
}
|
|
}
|