|
|
@ -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<CrmCustomerTempMa |
|
|
|
private SysStaffOrgFeign sysStaffOrgFeign; |
|
|
|
@Autowired |
|
|
|
private SysOrganizationFeign sysOrganizationFeign; |
|
|
|
@Autowired |
|
|
|
private FinKingDeeFeign finKingDeeFeign; |
|
|
|
|
|
|
|
|
|
|
|
public PagerVo<CrmCustomerTemp> listPage(PagerQuery<CrmCustomerTempQuery> pq) { |
|
|
@ -1095,4 +1100,20 @@ public class CrmCustomerTempService extends MybatisBaseService<CrmCustomerTempMa |
|
|
|
return rb.success().setData(list); |
|
|
|
} |
|
|
|
|
|
|
|
public ResultBean sendFinCustomer(String[] customerSids) { |
|
|
|
ResultBean rb = ResultBean.fireFail(); |
|
|
|
List<BdCustomer> 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(); |
|
|
|
} |
|
|
|
} |