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