|
@@ -1,9 +1,6 @@
|
|
|
package com.uas.credit.controller;
|
|
package com.uas.credit.controller;
|
|
|
|
|
|
|
|
-import com.uas.credit.model.EnterpriseJson;
|
|
|
|
|
-import com.uas.credit.model.EnterpriseQuery;
|
|
|
|
|
-import com.uas.credit.model.PersonJson;
|
|
|
|
|
-import com.uas.credit.model.PersonQuery;
|
|
|
|
|
|
|
+import com.uas.credit.model.*;
|
|
|
import com.uas.credit.service.*;
|
|
import com.uas.credit.service.*;
|
|
|
import com.uas.credit.util.FlexJsonUtils;
|
|
import com.uas.credit.util.FlexJsonUtils;
|
|
|
import org.apache.commons.lang3.StringEscapeUtils;
|
|
import org.apache.commons.lang3.StringEscapeUtils;
|
|
@@ -46,13 +43,16 @@ public class ErpQueryController {
|
|
|
@Autowired
|
|
@Autowired
|
|
|
private EnterpriseJsonService enterpriseJsonService;
|
|
private EnterpriseJsonService enterpriseJsonService;
|
|
|
|
|
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ private CreditLogService creditLogService;
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* ERP对企业进行查询
|
|
* ERP对企业进行查询
|
|
|
*/
|
|
*/
|
|
|
@RequestMapping(value = "/queryEn", method = RequestMethod.POST)
|
|
@RequestMapping(value = "/queryEn", method = RequestMethod.POST)
|
|
|
public EnterpriseJson queryEn(String data) {
|
|
public EnterpriseJson queryEn(String data) {
|
|
|
EnterpriseQuery erpQuery = FlexJsonUtils.fromJson(data, EnterpriseQuery.class);
|
|
EnterpriseQuery erpQuery = FlexJsonUtils.fromJson(data, EnterpriseQuery.class);
|
|
|
-
|
|
|
|
|
|
|
+ creditLogService.save(new CreditLog("enterprise", new Date()));
|
|
|
EnterpriseJson enterpriseJson = enterpriseJsonService.findByCreateTime(new Date());
|
|
EnterpriseJson enterpriseJson = enterpriseJsonService.findByCreateTime(new Date());
|
|
|
if (enterpriseJson != null && enterpriseJson.getEndept() != null) {
|
|
if (enterpriseJson != null && enterpriseJson.getEndept() != null) {
|
|
|
return enterpriseJson;
|
|
return enterpriseJson;
|
|
@@ -79,6 +79,7 @@ public class ErpQueryController {
|
|
|
@RequestMapping(value = "/queryPe", method = RequestMethod.POST)
|
|
@RequestMapping(value = "/queryPe", method = RequestMethod.POST)
|
|
|
public PersonJson queryPerson(String data) {
|
|
public PersonJson queryPerson(String data) {
|
|
|
PersonQuery erpQuery = FlexJsonUtils.fromJson(data, PersonQuery.class);
|
|
PersonQuery erpQuery = FlexJsonUtils.fromJson(data, PersonQuery.class);
|
|
|
|
|
+ creditLogService.save(new CreditLog("person", new Date()));
|
|
|
PersonJson personJson = personJsonService.findByCreateTime(new Date());
|
|
PersonJson personJson = personJsonService.findByCreateTime(new Date());
|
|
|
if (personJson != null && personJson.getPnidentity() != null) {
|
|
if (personJson != null && personJson.getPnidentity() != null) {
|
|
|
return personJson;
|
|
return personJson;
|