diff --git a/anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/basevehiclecertificate/BaseVehicleCertificateMapper.xml b/anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/basevehiclecertificate/BaseVehicleCertificateMapper.xml index cda55cb0b0..7508e128f7 100644 --- a/anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/basevehiclecertificate/BaseVehicleCertificateMapper.xml +++ b/anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/basevehiclecertificate/BaseVehicleCertificateMapper.xml @@ -144,7 +144,7 @@ bvc.tyreNum, - bvb.brandName carBrand, + bvc.carBrand, bvc.power, diff --git a/anrui-crm/anrui-crm-api/src/main/java/com/yxt/anrui/crm/api/crmcustomertemp/CrmCustomerTempFeign.java b/anrui-crm/anrui-crm-api/src/main/java/com/yxt/anrui/crm/api/crmcustomertemp/CrmCustomerTempFeign.java index 5a69a1c9c6..d177378861 100644 --- a/anrui-crm/anrui-crm-api/src/main/java/com/yxt/anrui/crm/api/crmcustomertemp/CrmCustomerTempFeign.java +++ b/anrui-crm/anrui-crm-api/src/main/java/com/yxt/anrui/crm/api/crmcustomertemp/CrmCustomerTempFeign.java @@ -55,6 +55,10 @@ public interface CrmCustomerTempFeign { @PostMapping("/listPageByOrgPathSid") public ResultBean> listPageByOrgPathSid(@RequestBody PagerQuery pq); + @ApiOperation("推送财务客户") + @PostMapping("/sendFinCustomer") + public ResultBean sendFinCustomer(@RequestBody String[] customerSids); + @ApiOperation("根据条件查询所有数据列表") @PostMapping("/listAll") public ResultBean> listAll(@RequestBody CrmCustomerTempQuery query); diff --git a/anrui-crm/anrui-crm-api/src/main/java/com/yxt/anrui/crm/api/crmcustomertemp/CrmCustomerTempFeignFallback.java b/anrui-crm/anrui-crm-api/src/main/java/com/yxt/anrui/crm/api/crmcustomertemp/CrmCustomerTempFeignFallback.java index 2fa8ac5f1d..3d910e6e21 100644 --- a/anrui-crm/anrui-crm-api/src/main/java/com/yxt/anrui/crm/api/crmcustomertemp/CrmCustomerTempFeignFallback.java +++ b/anrui-crm/anrui-crm-api/src/main/java/com/yxt/anrui/crm/api/crmcustomertemp/CrmCustomerTempFeignFallback.java @@ -36,6 +36,11 @@ public class CrmCustomerTempFeignFallback implements CrmCustomerTempFeign { return null; } + @Override + public ResultBean sendFinCustomer(String[] customerSids) { + return null; + } + @Override public ResultBean> listAll(CrmCustomerTempQuery query){ ResultBean rb = ResultBean.fireFail(); diff --git a/anrui-crm/anrui-crm-biz/pom.xml b/anrui-crm/anrui-crm-biz/pom.xml index f022d74f08..b19e56980d 100644 --- a/anrui-crm/anrui-crm-biz/pom.xml +++ b/anrui-crm/anrui-crm-biz/pom.xml @@ -90,6 +90,12 @@ 4.0.1 compile + + com.yxt.anrui.fin + anrui-fin-api + 0.0.1-SNAPSHOT + compile + diff --git a/anrui-crm/anrui-crm-biz/src/main/java/com/yxt/anrui/crm/CrmApplication.java b/anrui-crm/anrui-crm-biz/src/main/java/com/yxt/anrui/crm/CrmApplication.java index c9d7087353..acb993ad2d 100644 --- a/anrui-crm/anrui-crm-biz/src/main/java/com/yxt/anrui/crm/CrmApplication.java +++ b/anrui-crm/anrui-crm-biz/src/main/java/com/yxt/anrui/crm/CrmApplication.java @@ -16,7 +16,7 @@ import org.springframework.scheduling.annotation.EnableScheduling; }) @EnableScheduling @EnableDiscoveryClient -@EnableFeignClients(basePackages = {"com.yxt.anrui.portal", "com.yxt.anrui.base", "com.yxt.anrui.buscenter", "com.yxt.anrui.riskcenter", "com.yxt.messagecenter"}) +@EnableFeignClients(basePackages = {"com.yxt.anrui.portal", "com.yxt.anrui.base", "com.yxt.anrui.buscenter", "com.yxt.anrui.riskcenter", "com.yxt.messagecenter", "com.yxt.anrui.fin"}) public class CrmApplication { public static void main(String[] args) { diff --git a/anrui-crm/anrui-crm-biz/src/main/java/com/yxt/anrui/crm/biz/crmcustomertemp/CrmCustomerTempRest.java b/anrui-crm/anrui-crm-biz/src/main/java/com/yxt/anrui/crm/biz/crmcustomertemp/CrmCustomerTempRest.java index aded4f2374..b6479cf73f 100644 --- a/anrui-crm/anrui-crm-biz/src/main/java/com/yxt/anrui/crm/biz/crmcustomertemp/CrmCustomerTempRest.java +++ b/anrui-crm/anrui-crm-biz/src/main/java/com/yxt/anrui/crm/biz/crmcustomertemp/CrmCustomerTempRest.java @@ -6,6 +6,7 @@ import com.yxt.anrui.crm.api.crmcustomerfile.AppCrmCustomerTempArchivesDto; import com.yxt.anrui.crm.api.crmcustomerfile.AppCrmCustomerTempArchivesVo; import com.yxt.anrui.crm.api.crmcustomertemp.*; import com.yxt.anrui.crm.biz.crmcustomerfile.CrmCustomerFileService; +import com.yxt.anrui.fin.api.kingdee.FinKingDeeFeign; import com.yxt.anrui.portal.api.sysuser.SysUserFeign; import com.yxt.common.base.utils.PagerUtil; import com.yxt.common.core.query.PagerQuery; @@ -72,6 +73,11 @@ public class CrmCustomerTempRest implements CrmCustomerTempFeign { return rb.success().setData(pv); } + @Override + public ResultBean sendFinCustomer(String[] customerSids) { + return crmCustomerTempService.sendFinCustomer(customerSids); + } + @Override public ResultBean> listAll(@RequestBody CrmCustomerTempQuery query) { ResultBean rb = ResultBean.fireFail(); diff --git a/anrui-crm/anrui-crm-biz/src/main/java/com/yxt/anrui/crm/biz/crmcustomertemp/CrmCustomerTempService.java b/anrui-crm/anrui-crm-biz/src/main/java/com/yxt/anrui/crm/biz/crmcustomertemp/CrmCustomerTempService.java index 38b1710f57..9227506aa6 100644 --- a/anrui-crm/anrui-crm-biz/src/main/java/com/yxt/anrui/crm/biz/crmcustomertemp/CrmCustomerTempService.java +++ b/anrui-crm/anrui-crm-biz/src/main/java/com/yxt/anrui/crm/biz/crmcustomertemp/CrmCustomerTempService.java @@ -21,6 +21,9 @@ import com.yxt.anrui.crm.biz.crmcustomerfile.CrmCustomerFileService; import com.yxt.anrui.crm.biz.crmfile.CrmFileService; import com.yxt.anrui.crm.biz.crmvehicledemand.CrmVehicledemandService; import com.yxt.anrui.crm.biz.crmvisit.CrmVisitService; +import com.yxt.anrui.fin.api.kingdee.FinKingDeeFeign; +import com.yxt.anrui.fin.api.kingdee.bdcustomer.BdCustomer; +import com.yxt.anrui.fin.api.kingdee.bdmaterial.BdMaterial; import com.yxt.anrui.portal.api.dictcommon.DictCommonFeign; import com.yxt.anrui.portal.api.dictcommon.DictCommonVo; import com.yxt.anrui.portal.api.sysorganization.SysOrganizationFeign; @@ -94,6 +97,8 @@ public class CrmCustomerTempService extends MybatisBaseService listPage(PagerQuery pq) { @@ -1095,4 +1100,20 @@ public class CrmCustomerTempService extends MybatisBaseService bdCustomers = new ArrayList<>(); + BdCustomer bdCustomer = new BdCustomer(); + for (String customerSid : customerSids) { + CrmCustomerTemp crmCustomerTemp = fetchBySid(customerSid); + String createOrgSid = crmCustomerTemp.getCreateOrgSid(); + SysOrganizationVo sysOrganizationVo = sysOrganizationFeign.fetchBySid(createOrgSid).getData(); + bdCustomer.setTOrgIds(sysOrganizationVo.getOrgCode()); + bdCustomer.setFName(crmCustomerTemp.getName() + crmCustomerTemp.getMobile()); + bdCustomer.setFNumber(crmCustomerTemp.getCustomerNo()); + bdCustomers.add(bdCustomer); + } + finKingDeeFeign.saveBdCustomers(bdCustomers); + return rb.success(); + } } \ No newline at end of file