Commit 611cbad7 authored by 全洪江's avatar 全洪江

客户模块后端

parent 2dbfb7d7
...@@ -3,9 +3,14 @@ var baoshenEmailGridManager = null; ...@@ -3,9 +3,14 @@ var baoshenEmailGridManager = null;
var customerEmailGridManager = null; var customerEmailGridManager = null;
var customerRelatedGridManager = null; var customerRelatedGridManager = null;
var customerPayInfoGridManager = null; var customerPayInfoGridManager = null;
var customerBrandGridManager = null;
var customerBankGridManager = null;
var companyCodeGridManager = null;
var salesOrganizationGridManager = null;
var provinceCode = null; var provinceCode = null;
var cityCode = null; var cityCode = null;
var countyCode = null; var countyCode = null;
var currentTabId = UICtrl.getCurrentTabId();
$(document).ready(function () { $(document).ready(function () {
provinceCode = getPrimaryProvinceCode(); provinceCode = getPrimaryProvinceCode();
cityCode = getSecondProvinceCode(); cityCode = getSecondProvinceCode();
...@@ -18,6 +23,16 @@ $(document).ready(function () { ...@@ -18,6 +23,16 @@ $(document).ready(function () {
loadCustomerEmailListGrid(); loadCustomerEmailListGrid();
loadCustomerRelatedListGrid(); loadCustomerRelatedListGrid();
loadCustomerPayInfoListGrid(); loadCustomerPayInfoListGrid();
loadCustomerBrandListGrid();
loadCustomerBankListGrid();
loadCompanyCodeListGrid(currentTabId);
loadSalesOrganizationGrid(currentTabId);
// //添加客户操作
// if (currentTabId="addCustomerDetail"){
//
// }
}); });
...@@ -205,21 +220,7 @@ function loadBaoshenEmailListGrid() { ...@@ -205,21 +220,7 @@ function loadBaoshenEmailListGrid() {
}, },
deleteHandler: function () { deleteHandler: function () {
deleteBaoshenEmailHandler(); deleteBaoshenEmailHandler();
// var _grid = UICtrl.getGridManager('#baoshenEmailListGrid');
// DataUtil.delSelectedRows(
// {
// action: 'customerDebtContact/deleteCustomerDebtContact.ajax',
// param: {},
// gridManager: _grid,
// idFieldName: 'customerDebtContactId',
// onSuccess: function () {
// if (data == "1"){
// Public.successTip("删除成功!");
// }
// baoshenEmailGridManager.loadData();
// }
// }
// )
} }
} }
); );
...@@ -304,22 +305,7 @@ function loadCustomerEmailListGrid() { ...@@ -304,22 +305,7 @@ function loadCustomerEmailListGrid() {
}, },
deleteHandler: function () { deleteHandler: function () {
deleteCustomerEmailHandler(); deleteCustomerEmailHandler();
// var _grid = UICtrl.getGridManager('#customerEmailListGrid');
// DataUtil.delSelectedRows(
// {
// action: 'customerDebtContact/deleteCustomerDebtContact.ajax',
// param: {},
// gridManager: _grid,
// idFieldName: 'customerDebtContactId',
// onSuccess: function () {
// if (data == "1"){
// Public.successTip("删除成功!");
// }
// // customerEmailGridManager.loadData();
// loadCustomerEmailListGrid();
// }
// }
// )
} }
} }
); );
...@@ -403,22 +389,7 @@ function loadCustomerRelatedListGrid() { ...@@ -403,22 +389,7 @@ function loadCustomerRelatedListGrid() {
}, },
deleteHandler: function () { deleteHandler: function () {
deleteCustomerRelatedHandler(); deleteCustomerRelatedHandler();
// var _grid = UICtrl.getGridManager('#customerRelatedListGrid');
// DataUtil.delSelectedRows(
// {
// action: 'customerRelated/deleteCustomerRelated.ajax',
// param: {},
// gridManager: _grid,
// idFieldName: 'customerRelatedId',
// onSuccess: function () {
// if (data == "1"){
// Public.successTip("删除成功!");
// }
// // customerRelatedGridManager.loadData();
// loadCustomerRelatedListGrid();
// }
// }
// )
} }
} }
); );
...@@ -511,22 +482,7 @@ function loadCustomerPayInfoListGrid() { ...@@ -511,22 +482,7 @@ function loadCustomerPayInfoListGrid() {
deleteHandler: function () { deleteHandler: function () {
deleteCustomerPayInfoHandler(); deleteCustomerPayInfoHandler();
// var _grid = UICtrl.getGridManager('#customerPayInfoListGrid');
// DataUtil.delSelectedRows(
// {
// action: 'customerPayInfo/deleteCustomerPayInfo.ajax',
// param: {},
// gridManager: _grid,
// idFieldName: 'customerPayInfoId',
// onSuccess: function () {
// if (data == "1"){
// Public.successTip("删除成功!");
// }
// // customerPayInfoGridManager.loadData();
// loadCustomerPayInfoListGrid();
// }
// }
// )
} }
} }
); );
...@@ -575,6 +531,149 @@ function loadCustomerPayInfoListGrid() { ...@@ -575,6 +531,149 @@ function loadCustomerPayInfoListGrid() {
}); });
} }
function loadCustomerBrandListGrid() {
var toolbarOptions = UICtrl.getDefaultToolbarOptions(
{
addHandler: function () {
UICtrl.addGridRow(customerBrandGridManager);
},
deleteHandler: function () {
deleteCustomerBrandHandler();
}
}
);
customerPayInfoGridManager = UICtrl.grid("#customerPayInfoListGrid", {
columns: [
{
display: "支付方户名",
name: "customerPayAccountName",
width: 200,
minWidth: 60,
type: "string",
align: "left",
editor: {
required: true, type: "text",
}
},
{
display: "录入人", name: "createdByName", width: 200, minWidth: 60, type: "string", align: "left",
},
{
display: "录入时间", name: "createdDate", width: 200, minWidth: 60, type: "date", align: "left",
},
{
display: "修改人", name: "lastModifiedByName", width: 200, minWidth: 60, type: "string", align: "left",
},
{
display: "修改时间", name: "lastModifiedDate", width: 200, minWidth: 60, type: "date", align: "left",
}
],
dataAction: "server",
url: web_app.name + '/customerPayInfo/slicedCustomerPayInfoList.ajax',
parms: {customerId: $("#customerId").val()},
pageSize: 10,
usePager: true,
toolbar: toolbarOptions,
width: "100%",
height: "40%",
enabledEdit: true,
heightDiff: -8,
checkbox: true,
fixedCellHeight: true,
selectRowButtonOnly: true
});
}
function deleteCustomerBrandHandler() {
var _grid = UICtrl.getGridManager('#customerBrandListGrid');
DataUtil.delSelectedRows(
{
action: 'customerPayInfo/deleteCustomerPayInfo.ajax',
param: {},
gridManager: _grid,
idFieldName: 'customerPayInfoId',
onSuccess: function (data) {
if (data == "1") {
Public.successTip("删除成功!");
}
customerPayInfoGridManager.loadData();
}
}
)
}
function loadCustomerBankListGrid() {
var toolbarOptions = UICtrl.getDefaultToolbarOptions(
{
addHandler: function () {
UICtrl.addGridRow(customerPayInfoGridManager);
},
deleteHandler: function () {
deleteCustomerPayInfoHandler();
}
}
);
customerPayInfoGridManager = UICtrl.grid("#customerPayInfoListGrid", {
columns: [
{
display: "支付方户名",
name: "customerPayAccountName",
width: 200,
minWidth: 60,
type: "string",
align: "left",
editor: {
required: true, type: "text",
}
},
{
display: "录入人", name: "createdByName", width: 200, minWidth: 60, type: "string", align: "left",
},
{
display: "录入时间", name: "createdDate", width: 200, minWidth: 60, type: "date", align: "left",
},
{
display: "修改人", name: "lastModifiedByName", width: 200, minWidth: 60, type: "string", align: "left",
},
{
display: "修改时间", name: "lastModifiedDate", width: 200, minWidth: 60, type: "date", align: "left",
}
],
dataAction: "server",
url: web_app.name + '/customerPayInfo/slicedCustomerPayInfoList.ajax',
parms: {customerId: $("#customerId").val()},
pageSize: 10,
usePager: true,
toolbar: toolbarOptions,
width: "100%",
height: "40%",
enabledEdit: true,
heightDiff: -8,
checkbox: true,
fixedCellHeight: true,
selectRowButtonOnly: true
});
}
function loadCompanyCodeListGrid(currentTabId) {
}
function loadSalesOrganizationGrid(currentTabId) {
}
function deleteCustomerPayInfoHandler() { function deleteCustomerPayInfoHandler() {
var _grid = UICtrl.getGridManager('#customerPayInfoListGrid'); var _grid = UICtrl.getGridManager('#customerPayInfoListGrid');
DataUtil.delSelectedRows( DataUtil.delSelectedRows(
......
...@@ -21,7 +21,7 @@ public interface CustomerApplication { ...@@ -21,7 +21,7 @@ public interface CustomerApplication {
void deleteContactByIds(List<String> ids); void deleteContactByIds(List<String> ids);
CustomerDto saveCustomer(CustomerDto customerDto, List<CustomerContact> customerContactList, List<CustomerDebtContact> baoshenEmailList, List<CustomerDebtContact> customerEmailList, List<CustomerRelated> customerRelatedList, List<CustomerPayInfo> customerPayInfoList); CustomerVo saveCustomer(CustomerVo customerVo, List<CustomerContact> customerContactList, List<CustomerDebtContact> baoshenEmailList, List<CustomerDebtContact> customerEmailList, List<CustomerRelated> customerRelatedList, List<CustomerPayInfo> customerPayInfoList);
void deleteCustomerAndAffiliatedInfoByCustomerId(List<String> customerIds); void deleteCustomerAndAffiliatedInfoByCustomerId(List<String> customerIds);
......
...@@ -119,10 +119,10 @@ public class CustomerApplicationImpl extends BaseApplication implements Customer ...@@ -119,10 +119,10 @@ public class CustomerApplicationImpl extends BaseApplication implements Customer
*/ */
@Override @Override
public CustomerDto saveCustomer(CustomerDto customerDto, List<CustomerContact> customerContactList, List<CustomerDebtContact> baoshenEmailList, List<CustomerDebtContact> customerEmailList, List<CustomerRelated> customerRelatedList, List<CustomerPayInfo> customerPayInfoList) { public CustomerVo saveCustomer(CustomerVo customerVo, List<CustomerContact> customerContactList, List<CustomerDebtContact> baoshenEmailList, List<CustomerDebtContact> customerEmailList, List<CustomerRelated> customerRelatedList, List<CustomerPayInfo> customerPayInfoList) {
Customer customer = getCustomer(customerDto); Customer customer = getCustomer(customerVo);
CustomerBank customerBank = getCustomerBank(customerDto); CustomerBank customerBank = getCustomerBank(customerVo);
CustomerOrder customerOrder = getCustomerOrder(customerDto); CustomerOrder customerOrder = getCustomerOrder(customerVo);
Customer saveCustomer = customerRepository.saveAndFlush(customer); Customer saveCustomer = customerRepository.saveAndFlush(customer);
String customerId = saveCustomer.getCustomerId(); String customerId = saveCustomer.getCustomerId();
customerBank.setCustomerId(customerId); customerBank.setCustomerId(customerId);
...@@ -155,11 +155,11 @@ public class CustomerApplicationImpl extends BaseApplication implements Customer ...@@ -155,11 +155,11 @@ public class CustomerApplicationImpl extends BaseApplication implements Customer
customerPayInfo.setCustomerId(customerId); customerPayInfo.setCustomerId(customerId);
customerPayInfoRepository.saveAndFlush(customerPayInfo); customerPayInfoRepository.saveAndFlush(customerPayInfo);
}); });
CustomerDto saveCustomerDto = new CustomerDto(); CustomerVo saveCustomerVo = new CustomerVo();
BeanUtils.copyProperties(saveCustomer, saveCustomerDto); BeanUtils.copyProperties(saveCustomer, saveCustomerVo);
BeanUtils.copyProperties(saveCustomerBank, saveCustomerDto); BeanUtils.copyProperties(saveCustomerBank, saveCustomerVo);
BeanUtils.copyProperties(saveCustomerOrder, saveCustomerDto); BeanUtils.copyProperties(saveCustomerOrder, saveCustomerVo);
return saveCustomerDto; return saveCustomerVo;
} }
@Override @Override
...@@ -234,21 +234,21 @@ public class CustomerApplicationImpl extends BaseApplication implements Customer ...@@ -234,21 +234,21 @@ public class CustomerApplicationImpl extends BaseApplication implements Customer
} }
public Customer getCustomer(CustomerDto customerDto) { public Customer getCustomer(CustomerVo customerVo) {
Customer customer = new Customer(); Customer customer = new Customer();
BeanUtils.copyProperties(customerDto, customer); BeanUtils.copyProperties(customerVo, customer);
return customer; return customer;
} }
public CustomerBank getCustomerBank(CustomerDto customerDto) { public CustomerBank getCustomerBank(CustomerVo customerVo) {
CustomerBank customerBank = new CustomerBank(); CustomerBank customerBank = new CustomerBank();
BeanUtils.copyProperties(customerDto, customerBank); BeanUtils.copyProperties(customerVo, customerBank);
return customerBank; return customerBank;
} }
public CustomerOrder getCustomerOrder(CustomerDto customerDto) { public CustomerOrder getCustomerOrder(CustomerVo customerVo) {
CustomerOrder customerOrder = new CustomerOrder(); CustomerOrder customerOrder = new CustomerOrder();
BeanUtils.copyProperties(customerDto, customerOrder); BeanUtils.copyProperties(customerVo, customerOrder);
return customerOrder; return customerOrder;
} }
} }
package com.huigou.topsun.customer.application; package com.huigou.topsun.customer.application;
import com.huigou.topsun.customer.domain.CustomerContact; import com.huigou.topsun.customer.domain.*;
import com.huigou.topsun.customer.domain.dto.SapCustomerDto; import com.huigou.topsun.customer.domain.sap.dto.SapCustomerDto;
import com.huigou.topsun.customer.domain.vo.CustomerBankListVo;
import com.huigou.topsun.customer.domain.vo.CustomerBrandVo;
import com.huigou.topsun.customer.domain.vo.CustomerVo; import com.huigou.topsun.customer.domain.vo.CustomerVo;
import java.util.List;
public interface SapCustomerApplication { public interface SapCustomerApplication {
SapCustomerDto submitCustomerToSAP(CustomerVo customerVo, CustomerContact customerContact);
String submitCustomerToSAP(CustomerVo customerVo, List<CustomerBrandVo> customerBrandList, List<CustomerBankListVo> sapCustomerBankList, CustomerCompanyCode customerCompanyCode, CustomerSalesOrganization customerSalesOrganization);
} }
...@@ -6,10 +6,8 @@ import com.huigou.topsun.customer.application.SapCustomerApplication; ...@@ -6,10 +6,8 @@ import com.huigou.topsun.customer.application.SapCustomerApplication;
import com.huigou.topsun.customer.domain.*; import com.huigou.topsun.customer.domain.*;
import com.huigou.topsun.customer.domain.dto.CustomerDto; import com.huigou.topsun.customer.domain.dto.CustomerDto;
import com.huigou.topsun.customer.domain.query.CustomerQueryRequest; import com.huigou.topsun.customer.domain.query.CustomerQueryRequest;
import com.huigou.topsun.customer.domain.dto.SapCustomerDto; import com.huigou.topsun.customer.domain.sap.dto.SapCustomerDto;
import com.huigou.topsun.customer.domain.vo.CustomerListVo; import com.huigou.topsun.customer.domain.vo.*;
import com.huigou.topsun.customer.domain.vo.CustomerVo;
import com.huigou.topsun.customer.domain.vo.ReturnCustomerListVo;
import com.huigou.uasp.annotation.ControllerMapping; import com.huigou.uasp.annotation.ControllerMapping;
import com.huigou.uasp.annotation.SkipAuth; import com.huigou.uasp.annotation.SkipAuth;
import com.huigou.uasp.client.CommonController; import com.huigou.uasp.client.CommonController;
...@@ -130,25 +128,31 @@ public class CustomerController extends CommonController { ...@@ -130,25 +128,31 @@ public class CustomerController extends CommonController {
*/ */
public String saveCustomer() { public String saveCustomer() {
SDO sdo = getSDO(); SDO sdo = getSDO();
CustomerDto customerDto = sdo.toObject(CustomerDto.class); CustomerVo customerVo = sdo.toObject(CustomerVo.class);
List<CustomerContact> customerContactList = sdo.getList("contactList", CustomerContact.class); List<CustomerContact> customerContactList = sdo.getList("contactList", CustomerContact.class);
List<CustomerDebtContact> baoshenEmailList = sdo.getList("baoshenEmailList", CustomerDebtContact.class); List<CustomerDebtContact> baoshenEmailList = sdo.getList("baoshenEmailList", CustomerDebtContact.class);
List<CustomerDebtContact> customerEmailList = sdo.getList("customerEmailList", CustomerDebtContact.class); List<CustomerDebtContact> customerEmailList = sdo.getList("customerEmailList", CustomerDebtContact.class);
List<CustomerRelated> customerRelatedList = sdo.getList("customerRelatedList", CustomerRelated.class); List<CustomerRelated> customerRelatedList = sdo.getList("customerRelatedList", CustomerRelated.class);
List<CustomerPayInfo> customerPayInfoList = sdo.getList("customerPayInfoList", CustomerPayInfo.class); List<CustomerPayInfo> customerPayInfoList = sdo.getList("customerPayInfoList", CustomerPayInfo.class);
customerDto = customerApplication.saveCustomer(customerDto, customerContactList, baoshenEmailList, customerEmailList, customerRelatedList, customerPayInfoList); customerVo = customerApplication.saveCustomer(customerVo, customerContactList, baoshenEmailList, customerEmailList, customerRelatedList, customerPayInfoList);
return success(customerDto); return success(customerVo);
} }
/**
public String submitCustomerToSAP() { * 向sap新建客户
SDO sdo = getSDO(); * @return
*/
@SkipAuth
public String addCustomerToSAP() {
SDO sdo = getUploadSDO();
CustomerVo customerVo = sdo.toObject(CustomerVo.class); CustomerVo customerVo = sdo.toObject(CustomerVo.class);
List<CustomerContact> customerContactList = sdo.getList("contactList", CustomerContact.class); List<CustomerBrandVo> customerBrandList = sdo.getList("brandList", CustomerBrandVo.class);
CustomerContact customerContact = customerContactList.get(0); List<CustomerBankListVo> sapCustomerBankList = sdo.getList("sapBankList", CustomerBankListVo.class);
SapCustomerDto sapCustomerDto = sapCustomerApplication.submitCustomerToSAP(customerVo, customerContact); CustomerCompanyCode customerCompanyCode = sdo.toObject(CustomerCompanyCode.class);
return JSONUtil.toString(sapCustomerDto); CustomerSalesOrganization customerSalesOrganization = sdo.toObject(CustomerSalesOrganization.class);
String sapCustomerDtoJsonString = sapCustomerApplication.submitCustomerToSAP(customerVo, customerBrandList,sapCustomerBankList,customerCompanyCode,customerSalesOrganization);
return sapCustomerDtoJsonString;
} }
// /** // /**
......
package com.huigou.topsun.customer.domain; package com.huigou.topsun.customer.domain;
import java.io.Serializable; import java.io.Serializable;
import java.util.Date;
import javax.persistence.*; import javax.persistence.*;
import lombok.Data; import lombok.Data;
...@@ -46,7 +45,7 @@ public class Customer implements Serializable { ...@@ -46,7 +45,7 @@ public class Customer implements Serializable {
* 客户工作时间 * 客户工作时间
*/ */
@Column(name = "customer_work_time") @Column(name = "customer_work_time")
private Date customerWorkTime; private String customerWorkTime;
/** /**
* 客户英文名称 * 客户英文名称
...@@ -96,5 +95,77 @@ public class Customer implements Serializable { ...@@ -96,5 +95,77 @@ public class Customer implements Serializable {
@Column(name = "customer_zip_code") @Column(name = "customer_zip_code")
private String customerZipCode; private String customerZipCode;
/**
* 账户组
*/
@Column(name = "customer_account_group")
private String customerAccountGroup;
/**
* 业务伙伴角色
*/
@Column(name = "customer_business_partner_role")
private String customerBusinessPartnerRole;
/**
* 开票地址
*/
@Column(name = "customer_billing_address")
private String customerBillingAddress;
/**
* 客户送货地址(固定)
*/
@Column(name = "customer_delivery_address")
private String customerDeliveryAddress;
/**
* 国家
*/
@Column(name = "customer_country")
private String customerCountry;
/**
* 城市
*/
@Column(name = "customer_city")
private String customerCity;
/**
* 地区
*/
@Column(name = "customer_region")
private String customerRegion;
/**
* 语言
*/
@Column(name = "customer_language")
private String customerLanguage;
/**
* 电话号码
*/
@Column(name = "customer_tel_number")
private String customerTelNumber;
/**
* 移动电话
*/
@Column(name = "customer_mob_number")
private String customerMobNumber;
/**
* 邮箱地址
*/
@Column(name = "customer_smtp_addr")
private String customerSmtpAddr;
/**
* 送货单打印默认设置
*/
@Column(name = "default_settings_of_printing_delivery_notes")
private String defaultSettingsOfPrintingDeliveryNotes;
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
} }
\ No newline at end of file
package com.huigou.topsun.customer.domain;
import java.io.Serializable;
import javax.persistence.*;
import lombok.Data;
import org.hibernate.annotations.GenericGenerator;
/**
*
* @TableName customer_bank_list
*/
@Table(name="customer_bank_list")
@Data
@Entity
public class CustomerBankList implements Serializable {
/**
* 客户银行信息列表id
*/
@Id
@GeneratedValue(generator = "system-uuid")
@GenericGenerator(name = "system-uuid", strategy = "guid")
@Column(name = "customer_bank_list_id")
private String customerBankListId;
/**
* 客户id
*/
@Column(name = "customer_id")
private String customerId;
/**
* 开户银行代码
*/
@Column(name = "deposit_bank_code")
private String depositBankCode;
/**
* 银行账户
*/
@Column(name = "bank_account")
private String bankAccount;
/**
* 参考明细
*/
@Column(name = "reference_details")
private String referenceDetails;
private static final long serialVersionUID = 1L;
}
\ No newline at end of file
package com.huigou.topsun.customer.domain;
import java.io.Serializable;
import javax.persistence.*;
import lombok.Data;
import org.hibernate.annotations.GenericGenerator;
/**
*
* @TableName customer_brand
*/
@Table(name="customer_brand")
@Data
@Entity
public class CustomerBrand implements Serializable {
/**
* 品牌id
*/
@Id
@GeneratedValue(generator = "system-uuid")
@GenericGenerator(name = "system-uuid", strategy = "guid")
@Column(name = "brand_id")
private String brandId;
/**
* 客户id
*/
@Column(name = "customer_id")
private String customerId;
/**
* 品牌
*/
private String brand;
/**
* 联系人
*/
private String contact;
/**
* 电话号码
*/
private String tel;
/**
* e_Mail
*/
@Column(name = "e_mail")
private String eMail;
/**
* 经营类型
*/
@Column(name = "operate_type")
private String operateType;
/**
* 工厂代号
*/
@Column(name = "factory_code")
private String factoryCode;
/**
* 跟单员
*/
private String merchandiser;
private static final long serialVersionUID = 1L;
}
\ No newline at end of file
package com.huigou.topsun.customer.domain;
import java.io.Serializable;
import javax.persistence.*;
import lombok.Data;
import org.hibernate.annotations.GenericGenerator;
/**
*
* @TableName customer_company_code
*/
@Table(name="customer_company_code")
@Data
@Entity
public class CustomerCompanyCode implements Serializable {
/**
* 公司代码id
*/
@Id
@GeneratedValue(generator = "system-uuid")
@GenericGenerator(name = "system-uuid", strategy = "guid")
@Column(name = "company_code_id")
private String companyCodeId;
/**
* 客户id
*/
@Column(name = "customer_id")
private String customerId;
/**
* 公司代码
*/
@Column(name = "company_code")
private String companyCode;
/**
* 统驭科目
*/
@Column(name = "reconciliation_account")
private String reconciliationAccount;
/**
* 付款条件
*/
@Column(name = "company_payment_terms")
private String companyPaymentTerms;
/**
* 催款过程
*/
@Column(name = "collection_process")
private String collectionProcess;
private static final long serialVersionUID = 1L;
}
\ No newline at end of file
package com.huigou.topsun.customer.domain;
import java.io.Serializable;
import javax.persistence.*;
import lombok.Data;
import org.hibernate.annotations.GenericGenerator;
/**
*
* @TableName customer_sales_organization
*/
@Table(name="customer_sales_organization")
@Data
@Entity
public class CustomerSalesOrganization implements Serializable {
/**
* 销售组织id
*/
@Id
@GeneratedValue(generator = "system-uuid")
@GenericGenerator(name = "system-uuid", strategy = "guid")
@Column(name = "customer_sales_organization_id")
private String customerSalesOrganizationId;
/**
* 客户id
*/
@Column(name = "customer_id")
private String customerId;
/**
* 销售组织
*/
private String organization;
/**
* 分销渠道
*/
@Column(name = "distribution_channel")
private String distributionChannel;
/**
* 产品组
*/
@Column(name = "product_group")
private String productGroup;
/**
* 销售办公室
*/
@Column(name = "sales_office")
private String salesOffice;
/**
* 销售小组
*/
@Column(name = "sales_group")
private String salesGroup;
/**
* 客户等级(客户分类)
*/
@Column(name = "customer_grade")
private String customerGrade;
/**
* 币别
*/
private String currency;
/**
* 汇率类型
*/
@Column(name = "exchange_rate")
private String exchangeRate;
/**
* 国际贸易条款
*/
private String incoterm;
/**
* 国际贸易条款位置
*/
@Column(name = "incoterm_position")
private String incotermPosition;
/**
* 付款条件
*/
@Column(name = "sales_payment_terms")
private String salesPaymentTerms;
/**
* 客户科目分配组
*/
@Column(name = "customer_account_allocation_group")
private String customerAccountAllocationGroup;
/**
* 税收类别
*/
@Column(name = "tax_category")
private String taxCategory;
/**
* 客户税分类
*/
@Column(name = "customer_tax_classification")
private String customerTaxClassification;
/**
* 装运条件
*/
@Column(name = "shipping_conditions")
private String shippingConditions;
private static final long serialVersionUID = 1L;
}
\ No newline at end of file
...@@ -32,7 +32,7 @@ public class CustomerDto implements Serializable { ...@@ -32,7 +32,7 @@ public class CustomerDto implements Serializable {
/** /**
* 客户工作时间 * 客户工作时间
*/ */
private Date customerWorkTime; private String customerWorkTime;
/** /**
* 客户英文名称 * 客户英文名称
......
package com.huigou.topsun.customer.domain.dto;
import lombok.Data;
@Data
public class SapCustomerDto {
/**
* 账目组
*/
private String BU_GROUP;
/**
* 客户编号
*/
private String KUNNR;
/**
* 业务伙伴角色
*/
private String RLTYP;
/**
* 客户名称
*/
private String NAME1;
/**
* 客户简称
*/
private String BU_SORT;
/**
* 收货地址
*/
private String STRAS;
/**
* 客户送货地址(固定)
*/
private String STR_SUPPL3;
/**
* 城市
*/
private String CITY1;
/**
* 国家
*/
private String LAND1;
/**
* 地区
*/
private String REGIO;
/**
* 语言
*/
private String SPRAS;
/**
* 邮政编码
*/
private String POST_CODE1;
/**
* 电话号码
*/
private String TELF1;
/**
* 移动电话
*/
private String TEL_NUMBER;
/**
* 传真
*/
private String TELFX;
/**
* Email
*/
private String SMTP_ADDR;
/**
* 开户银行代码
*/
private String BANKL;
/**
* 银行账号
*/
private String BANKN;
/**
* 做帐难度等级
*/
private String KUKLA;
/**
* 要求用客户系统货单
*/
private String KATR1;
/**
* 盖章方式
*/
private String KATR2;
/**
* 请款联
*/
private String KATR3;
/**
* 客户联
*/
private String KATR4;
/**
* 订单要求
*/
private String KATR5;
/**
* 验收单要求
*/
private String KATR6;
/**
* 客户系统验收要求
*/
private String KATR7;
/**
* 要求签回货单
*/
private String KATR8;
/**
* 货单是否打印送货日期
*/
private String KATR9;
/**
* 不开发票
*/
private String KATR10;
/**
* 请款要求
*/
private String ZT01;
/**
* 客户工作时间
*/
private String ZT02;
/**
* 收货方签字要求
*/
private String ZT03;
/**
* 货单打印要求
*/
private String ZT04;
/**
* 品牌
*/
private String ZF01;
/**
* 职位
*/
private String ZF02;
/**
* 联系人
*/
private String ZF03;
/**
* 电话号码
*/
private String ZF04;
/**
* e_Mail
*/
private String ZF05;
/**
* 经营类型
*/
private String ZF06;
/**
* 工厂代号
*/
private String ZF07;
/**
* 产品检验报告类型
*/
private String ZF08;
/**
* 货单签回方式
*/
private String ZF09;
/**
* 出货方式
*/
private String ZF10;
/**
* 线路
*/
private String ZF11;
/**
* 送货单打印默认设置
*/
private String ZF12;
/**
* 送货单统计异常期限
*/
private String ZF13;
/**
* 生产发货方式
*/
private String ZF14;
/**
* 月结方式
*/
private String ZF15;
/**
* 请款期限
*/
private String ZF16;
/**
* 做账截止日
*/
private String ZF17;
/**
* 客户收账截止日
*/
private String ZF18;
/**
* 订单统计异常期限
*/
private String ZF19;
/**
* 公司代码
*/
private String BUKRS;
/**
* 统驭科目
*/
private String AKONT;
/**
* 销售组织
*/
private String VKORG;
/**
* 分销渠道
*/
private String VTWEG;
/**
* 产品组
*/
private String SPART;
/**
* 客户组
*/
private String KDGRP;
/**
* 销售办公室
*/
private String VKBUR;
/**
* 销售小组
*/
private String VKGRP;
/**
* 客户分类
*/
private String KLABC;
/**
* 币别
*/
private String WAERS;
/**
* 汇率类型
*/
private String KURST;
/**
* 价格清单
*/
private String PLTYP;
/**
* 国际贸易条款
*/
private String INCO1;
/**
* 国际贸易条款位置
*/
private String INCO2;
/**
* 付款条件
*/
private String ZTERM;
/**
* 客户科目分配组
*/
private String KTGRD;
/**
* 税收类别
*/
private String TATYP;
/**
* 客户税分类
*/
private String TAXKD;
/**
* 装运条件
*/
private String VSBED;
}
package com.huigou.topsun.customer.domain.sap.dto;
import lombok.Data;
import java.io.Serializable;
@Data
public class SapCustomerBankDto implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 开户银行代码
*/
private String BANKL;
/**
* 银行账号
*/
private String BANKN;
/**
* 参考明细
*/
private String BKREF;
/**
* 账户持有人姓名
*/
private String KOINH;
}
package com.huigou.topsun.customer.domain.sap.dto;
import lombok.Data;
import java.io.Serializable;
@Data
public class SapCustomerBrandDto implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 品牌
*/
private String ZF01;
/**
* 职位
*/
private String ZF02;
/**
* 联系人
*/
private String ZF03;
/**
* 电话号码
*/
private String ZF04;
/**
* e_Mail
*/
private String ZF05;
/**
* 经营类型
*/
private String ZF06;
/**
* 工厂代号
*/
private String ZF07;
/**
* 跟单员
*/
private String ZKUNR;
}
package com.huigou.topsun.customer.domain.sap.dto;
import lombok.Data;
@Data
public class SapCustomerCompanyCodeDto {
private static final long serialVersionUID = 1L;
/**
* 公司代码
*/
private String BUKRS;
/**
* 统驭科目
*/
private String AKONT;
/**
* 付款条件
*/
private String ZTERM;
/**
* 催款过程
*/
private String MAHNA;
}
package com.huigou.topsun.customer.domain.sap.dto;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
@Data
public class SapCustomerDto implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 客户编码
*/
@JsonProperty(value = "KUNNR")
private String customerCode;
/**
* 客户全称
*/
@JsonProperty(value = "NAME1")
private String customerName;
/**
* 客户简称
*/
@JsonProperty(value = "BU_SORT1")
private String customerShortName;
/**
* 客户工作时间
*/
@JsonProperty(value = "ZT02")
private String customerWorkTime;
/**
* 所属集团
*/
@JsonProperty(value = "ZCLIQUE")
private String customerGroup;
/**
* 邮编
*/
@JsonProperty(value = "POST_CODE1")
private String customerZipCode;
/**
* 账户组
*/
@JsonProperty(value = "BU_GROUP")
private String customerAccountGroup;
/**
* 业务伙伴角色
*/
@JsonProperty(value = "RLTYP")
private String customerBusinessPartnerRole;
/**
* 开票地址
*/
@JsonProperty(value = "STRAS")
private String customerBillingAddress;
/**
* 客户送货地址(固定)
*/
@JsonProperty(value = "STR_SUPPL3")
private String customerDeliveryAddress;
/**
* 国家
*/
@JsonProperty(value = "LAND1")
private String customerCountry;
/**
* 城市
*/
@JsonProperty(value = "CITY1")
private String customerCity;
/**
* 地区
*/
@JsonProperty(value = "REGIO")
private String customerRegion;
/**
* 语言
*/
@JsonProperty(value = "SPRAS")
private String customerLanguage;
/**
* 电话号码
*/
@JsonProperty(value = "TEL_NUMBER")
private String customerTelNumber;
/**
* 移动电话
*/
@JsonProperty(value = "MOB_NUMBER")
private String customerMobNumber;
/**
* 邮箱地址
*/
@JsonProperty(value = "SMTP_ADDR")
private String customerSmtpAddr;
/**
* 送货单打印默认设置
*/
@JsonProperty(value = "ZF12")
private String defaultSettingsOfPrintingDeliveryNotes;
/**
* 品牌列表
*/
@JsonProperty(value = "brandList")
private List<SapCustomerBrandDto> sapCustomerBrandDtoList;
/**
* 银行列表
*/
@JsonProperty(value = "bankList")
private List<SapCustomerBankDto> sapCustomerBankDtoList;
//公司代码字段
/**
* 公司代码
*/
@JsonProperty(value = "BUKRS")
private String companyCode;
/**
* 统驭科目
*/
@JsonProperty(value = "AKONT")
private String reconciliationAccount;
/**
* 付款条件
*/
@JsonProperty(value = "company_ZTERM")
private String companyPaymentTerms;
/**
* 催款过程
*/
@JsonProperty(value = "MAHNA")
private String collectionProcess;
//销售组织字段
/**
* 销售组织
*/
@JsonProperty(value = "VKORG")
private String organization;
/**
* 分销渠道
*/
@JsonProperty(value = "VTWEG")
private String distributionChannel;
/**
* 产品组
*/
@JsonProperty(value = "SPART")
private String productGroup;
/**
* 销售办公室
*/
@JsonProperty(value = "VKBUR")
private String salesOffice;
/**
* 销售小组
*/
@JsonProperty(value = "VKGRP")
private String salesGroup;
/**
* 客户等级(客户分类)
*/
@JsonProperty(value = "KLABC")
private String customerGrade;
/**
* 币别
*/
@JsonProperty(value = "WAERK")
private String currency;
/**
* 汇率类型
*/
@JsonProperty(value = "KURST")
private String exchangeRate;
/**
* 国际贸易条款
*/
@JsonProperty(value = "INCO1")
private String incoterm;
/**
* 国际贸易条款位置
*/
@JsonProperty(value = "INCO2")
private String incotermPosition;
/**
* 付款条件
*/
@JsonProperty(value = "sales_ZTERM")
private String salesPaymentTerms;
/**
* 客户科目分配组
*/
@JsonProperty(value = "KTGRD")
private String customerAccountAllocationGroup;
/**
* 税收类别
*/
@JsonProperty(value = "TATYP")
private String taxCategory;
/**
* 客户税分类
*/
@JsonProperty(value = "TAXKD")
private String customerTaxClassification;
/**
* 装运条件
*/
@JsonProperty(value = "VSBED")
private String shippingConditions;
}
package com.huigou.topsun.customer.domain.sap.dto;
import lombok.Data;
import java.io.Serializable;
@Data
public class SapCustomerSalesOrganizationDto implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 销售组织
*/
private String VKORG;
/**
* 分销渠道
*/
private String VTWEG;
/**
* 产品组
*/
private String SPART;
/**
* 销售办公室
*/
private String VKBUR;
/**
* 销售小组
*/
private String VKGRP;
/**
* 客户等级(客户分类)
*/
private String KLABC;
/**
* 币别
*/
private String WAERK;
/**
* 汇率类型
*/
private String KURST;
/**
* 国际贸易条款
*/
private String INCO1;
/**
* 国际贸易条款位置
*/
private String INCO2;
/**
* 付款条件
*/
private String ZTERM;
/**
* 客户科目分配组
*/
private String KTGRD;
/**
* 税收类别
*/
private String TATYP;
/**
* 客户税分类
*/
private String TAXKD;
/**
* 装运条件
*/
private String VSBED;
}
package com.huigou.topsun.customer.domain.vo;
import lombok.Data;
import java.io.Serializable;
@Data
public class CustomerBankListVo implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 客户银行信息列表id
*/
private String customerBankListId;
/**
* 客户id
*/
private String customerId;
/**
* 开户银行代码
*/
private String depositBankCode;
/**
* 银行账户
*/
private String bankAccount;
/**
* 参考明细
*/
private String referenceDetails;
}
package com.huigou.topsun.customer.domain.vo;
import lombok.Data;
@Data
public class CustomerBrandVo {
private static final long serialVersionUID = 1L;
/**
* 品牌id
*/
private String brandId;
/**
* 客户id
*/
private String customerId;
/**
* 品牌
*/
private String brand;
/**
* 联系人
*/
private String contact;
/**
* 电话号码
*/
private String tel;
/**
* e_Mail
*/
private String eMail;
/**
* 经营类型
*/
private String operateType;
/**
* 工厂代号
*/
private String factoryCode;
/**
* 跟单员
*/
private String merchandiser;
}
package com.huigou.topsun.customer.domain.vo;
import lombok.Data;
import org.hibernate.annotations.GenericGenerator;
import javax.persistence.Column;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import java.io.Serializable;
@Data
public class CustomerCompanyCodeVo implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 公司代码id
*/
private String companyCodeId;
/**
* 客户id
*/
private String customerId;
/**
* 公司代码
*/
private String companyCode;
/**
* 统驭科目
*/
private String reconciliationAccount;
/**
* 付款条件
*/
private String companyPaymentTerms;
/**
* 催款过程
*/
private String collectionProcess;
}
...@@ -5,6 +5,7 @@ import lombok.Data; ...@@ -5,6 +5,7 @@ import lombok.Data;
import java.io.Serializable; import java.io.Serializable;
@Data @Data
public class CustomerContactVo implements Serializable { public class CustomerContactVo implements Serializable {
private static final long serialVersionUID = 1L;
/** /**
* 联系人 * 联系人
*/ */
......
...@@ -17,6 +17,7 @@ import java.util.Date; ...@@ -17,6 +17,7 @@ import java.util.Date;
*/ */
@Data @Data
public class CustomerDebtContactVo implements Serializable { public class CustomerDebtContactVo implements Serializable {
private static final long serialVersionUID = 1L;
/** /**
* 催货款通知邮箱id * 催货款通知邮箱id
*/ */
......
...@@ -7,6 +7,7 @@ import java.io.Serializable; ...@@ -7,6 +7,7 @@ import java.io.Serializable;
@Data @Data
public class CustomerListVo implements Serializable { public class CustomerListVo implements Serializable {
private static final long serialVersionUID = 1L;
/** /**
* 客户id * 客户id
*/ */
......
...@@ -15,6 +15,7 @@ import java.util.Date; ...@@ -15,6 +15,7 @@ import java.util.Date;
*/ */
@Data @Data
public class CustomerPayInfoVo implements Serializable { public class CustomerPayInfoVo implements Serializable {
private static final long serialVersionUID = 1L;
/** /**
* 客户付款信息表id * 客户付款信息表id
*/ */
......
...@@ -15,6 +15,7 @@ import java.util.Date; ...@@ -15,6 +15,7 @@ import java.util.Date;
*/ */
@Data @Data
public class CustomerRelatedVo implements Serializable { public class CustomerRelatedVo implements Serializable {
private static final long serialVersionUID = 1L;
/** /**
* 关联客户id * 关联客户id
*/ */
......
package com.huigou.topsun.customer.domain.vo;
import lombok.Data;
import org.hibernate.annotations.GenericGenerator;
import javax.persistence.*;
import java.io.Serializable;
@Data
public class CustomerSalesOrganizationVo implements Serializable {
/**
* 销售组织id
*/
private String customerSalesOrganizationId;
/**
* 客户id
*/
private String customerId;
/**
* 销售组织
*/
private String organization;
/**
* 分销渠道
*/
private String distributionChannel;
/**
* 产品组
*/
private String productGroup;
/**
* 销售办公室
*/
private String salesOffice;
/**
* 销售小组
*/
private String salesGroup;
/**
* 客户等级(客户分类)
*/
private String customerGrade;
/**
* 币别
*/
private String currency;
/**
* 汇率类型
*/
private String exchangeRate;
/**
* 国际贸易条款
*/
private String incoterm;
/**
* 国际贸易条款位置
*/
private String incotermPosition;
/**
* 付款条件
*/
private String salesPaymentTerms;
/**
* 客户科目分配组
*/
private String customerAccountAllocationGroup;
/**
* 税收类别
*/
private String taxCategory;
/**
* 客户税分类
*/
private String customerTaxClassification;
/**
* 装运条件
*/
private String shippingConditions;
private static final long serialVersionUID = 1L;
}
\ No newline at end of file
...@@ -10,6 +10,7 @@ import java.util.Date; ...@@ -10,6 +10,7 @@ import java.util.Date;
@Data @Data
public class CustomerVo implements Serializable { public class CustomerVo implements Serializable {
private static final long serialVersionUID = 1L;
/** /**
* 客户id * 客户id
*/ */
...@@ -33,7 +34,7 @@ public class CustomerVo implements Serializable { ...@@ -33,7 +34,7 @@ public class CustomerVo implements Serializable {
/** /**
* 客户工作时间 * 客户工作时间
*/ */
private Date customerWorkTime; private String customerWorkTime;
/** /**
* 客户英文名称 * 客户英文名称
...@@ -102,6 +103,66 @@ public class CustomerVo implements Serializable { ...@@ -102,6 +103,66 @@ public class CustomerVo implements Serializable {
*/ */
private String customerZipCode; private String customerZipCode;
/**
* 账户组
*/
private String customerAccountGroup;
/**
* 业务伙伴角色
*/
private String customerBusinessPartnerRole;
/**
* 开票地址
*/
private String customerBillingAddress;
/**
* 客户送货地址(固定)
*/
private String customerDeliveryAddress;
/**
* 国家
*/
private String customerCountry;
/**
* 城市
*/
private String customerCity;
/**
* 地区
*/
private String customerRegion;
/**
* 语言
*/
private String customerLanguage;
/**
* 电话号码
*/
private String customerTelNumber;
/**
* 移动电话
*/
private String customerMobNumber;
/**
* 邮箱地址
*/
private String customerSmtpAddr;
/**
* 送货单打印默认设置
*/
private String defaultSettingsOfPrintingDeliveryNotes;
/** /**
* 开户银行id * 开户银行id
*/ */
......
...@@ -14,6 +14,7 @@ import java.io.Serializable; ...@@ -14,6 +14,7 @@ import java.io.Serializable;
*/ */
@Data @Data
public class MonthlySettlementMethodVo implements Serializable { public class MonthlySettlementMethodVo implements Serializable {
private static final long serialVersionUID = 1L;
private String methodId; private String methodId;
private String method; private String method;
private String status; private String status;
......
...@@ -7,6 +7,7 @@ import java.util.List; ...@@ -7,6 +7,7 @@ import java.util.List;
@Data @Data
public class ReturnCustomerListVo implements Serializable { public class ReturnCustomerListVo implements Serializable {
private static final long serialVersionUID = 1L;
/** /**
* 客户全称 * 客户全称
*/ */
......
package com.huigou.topsun.sap.purchase.controller; //package com.huigou.topsun.sap.purchase.controller;
//
import com.huigou.uasp.annotation.ControllerMapping; //import com.huigou.uasp.annotation.ControllerMapping;
import com.huigou.uasp.annotation.SkipAuth; //import com.huigou.uasp.annotation.SkipAuth;
import com.huigou.uasp.client.CommonController; //import com.huigou.uasp.client.CommonController;
import com.huigou.util.JSONUtil; //import com.huigou.util.JSONUtil;
import com.huigou.util.SDO; //import com.huigou.util.SDO;
import org.springframework.stereotype.Controller; //import org.springframework.stereotype.Controller;
//
import java.util.HashMap; //import java.util.HashMap;
//
/** ///**
* @Auther: xin.lu // * @Auther: xin.lu
* @Date: 2024/01/05/15:01 // * @Date: 2024/01/05/15:01
* @Description: // * @Description:
*/ // */
@Controller //@Controller
@ControllerMapping("/sapPurchaseApproval") //@ControllerMapping("/sapPurchaseApproval")
public class SapPurchaseApprovalController extends CommonController { //public class SapPurchaseApprovalController extends CommonController {
//
@SkipAuth // @SkipAuth
public String getSapPurchaseApproval(){ // public String getSapPurchaseApproval(){
SDO sdo = this.getSDO(); // SDO sdo = this.getSDO();
HashMap<String, Object> messageMap = new HashMap<>(); // HashMap<String, Object> messageMap = new HashMap<>();
messageMap.put("Message_Status","S"); // messageMap.put("Message_Status","S");
messageMap.put("Message_Text","成功"); // messageMap.put("Message_Text","成功");
return toResult(messageMap); // return toResult(messageMap);
} // }
} //}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment