|
|
@ -161,36 +161,36 @@ public class SysCustomerServiceImpl implements ISysCustomerService |
|
|
|
sysCustomer.setCreateTime(DateUtils.getNowDate()); |
|
|
|
SysContacts sysContacts = new SysContacts(); |
|
|
|
//添加联系人
|
|
|
|
sysContacts.setCustomerName(sysCustomer.getCustomerContact()); |
|
|
|
sysContacts.setCellPhone(sysCustomer.getContactNumber()); |
|
|
|
sysContacts.setCustomerPosition(sysCustomer.getCustomerOffice()); |
|
|
|
sysContacts.setCustomerFax(sysCustomer.getCustomerFax()); |
|
|
|
sysContacts.setCommonEmail(sysCustomer.getCustomerEmail()); |
|
|
|
sysContacts.setEnterpriseCode(sysCustomer.getEnterpriseCode()); |
|
|
|
sysContacts.setEnterpriseName(sysCustomer.getEnterpriseName()); |
|
|
|
sysContactsService.insertSysContacts(sysContacts); |
|
|
|
sysCustomer.setCustomerContactId(sysContacts.getContactid()); |
|
|
|
// sysContacts.setCustomerName(sysCustomer.getCustomerContact());
|
|
|
|
// sysContacts.setCellPhone(sysCustomer.getContactNumber());
|
|
|
|
// sysContacts.setCustomerPosition(sysCustomer.getCustomerOffice());
|
|
|
|
// sysContacts.setCustomerFax(sysCustomer.getCustomerFax());
|
|
|
|
// sysContacts.setCommonEmail(sysCustomer.getCustomerEmail());
|
|
|
|
// sysContacts.setEnterpriseCode(sysCustomer.getEnterpriseCode());
|
|
|
|
// sysContacts.setEnterpriseName(sysCustomer.getEnterpriseName());
|
|
|
|
// sysContactsService.insertSysContacts(sysContacts);
|
|
|
|
// sysCustomer.setCustomerContactId(sysContacts.getContactid());
|
|
|
|
//添加发货地址
|
|
|
|
SysShippingAddress sysShippingAddress = new SysShippingAddress(); |
|
|
|
sysShippingAddress.setCustomerName(sysCustomer.getCustomerContact()); |
|
|
|
sysShippingAddress.setCustomerPhone(sysCustomer.getDeliveryCustomerPhone()); |
|
|
|
sysShippingAddress.setCustomerName(sysCustomer.getDeliveryCustomerPerson()); |
|
|
|
sysShippingAddress.setPostalCode(sysCustomer.getDeliveryCustomerPostal()); |
|
|
|
sysShippingAddress.setDeliveryAddress(sysCustomer.getDeliveryAddress()); |
|
|
|
sysShippingAddress.setEnterpriseCode(sysCustomer.getEnterpriseCode()); |
|
|
|
sysShippingAddress.setEnterpriseName(sysCustomer.getEnterpriseName()); |
|
|
|
sysShippingAddressService.insertSysShippingAddress(sysShippingAddress); |
|
|
|
sysCustomer.setDeliveryAddressId(sysShippingAddress.getDeliveryId()); |
|
|
|
SysInvoice invoice = new SysInvoice(); |
|
|
|
invoice.setEnterpriseCode(sysCustomer.getEnterpriseCode()); |
|
|
|
invoice.setEnterpriseName(sysCustomer.getEnterpriseName()); |
|
|
|
invoice.setInvoiceCompanyCode(sysCustomer.getInvoiceCode()); |
|
|
|
invoice.setInvoiceCompanyName(sysCustomer.getInvoicingCompanyName()); |
|
|
|
invoice.setDepositBank(sysCustomer.getDepositBank()); |
|
|
|
invoice.setBankAccount(sysCustomer.getBankAccount()); |
|
|
|
invoice.setCreateBy(loginName); |
|
|
|
invoice.setCreateTime(DateUtils.getNowDate()); |
|
|
|
sysInvoiceService.insertSysInvoice(invoice); |
|
|
|
// SysShippingAddress sysShippingAddress = new SysShippingAddress();
|
|
|
|
// sysShippingAddress.setCustomerName(sysCustomer.getCustomerContact());
|
|
|
|
// sysShippingAddress.setCustomerPhone(sysCustomer.getDeliveryCustomerPhone());
|
|
|
|
// sysShippingAddress.setCustomerName(sysCustomer.getDeliveryCustomerPerson());
|
|
|
|
// sysShippingAddress.setPostalCode(sysCustomer.getDeliveryCustomerPostal());
|
|
|
|
// sysShippingAddress.setDeliveryAddress(sysCustomer.getDeliveryAddress());
|
|
|
|
// sysShippingAddress.setEnterpriseCode(sysCustomer.getEnterpriseCode());
|
|
|
|
// sysShippingAddress.setEnterpriseName(sysCustomer.getEnterpriseName());
|
|
|
|
// sysShippingAddressService.insertSysShippingAddress(sysShippingAddress);
|
|
|
|
// sysCustomer.setDeliveryAddressId(sysShippingAddress.getDeliveryId());
|
|
|
|
// SysInvoice invoice = new SysInvoice();
|
|
|
|
// invoice.setEnterpriseCode(sysCustomer.getEnterpriseCode());
|
|
|
|
// invoice.setEnterpriseName(sysCustomer.getEnterpriseName());
|
|
|
|
// invoice.setInvoiceCompanyCode(sysCustomer.getInvoiceCode());
|
|
|
|
// invoice.setInvoiceCompanyName(sysCustomer.getInvoicingCompanyName());
|
|
|
|
// invoice.setDepositBank(sysCustomer.getDepositBank());
|
|
|
|
// invoice.setBankAccount(sysCustomer.getBankAccount());
|
|
|
|
// invoice.setCreateBy(loginName);
|
|
|
|
// invoice.setCreateTime(DateUtils.getNowDate());
|
|
|
|
// sysInvoiceService.insertSysInvoice(invoice);
|
|
|
|
int result = sysCustomerMapper.insertSysCustomer(sysCustomer); |
|
|
|
sysCustomer.getCustomerId(); |
|
|
|
return result; |
|
|
|