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

客户模块后端

parent 2dbfb7d7
......@@ -3,9 +3,14 @@ var baoshenEmailGridManager = null;
var customerEmailGridManager = null;
var customerRelatedGridManager = null;
var customerPayInfoGridManager = null;
var customerBrandGridManager = null;
var customerBankGridManager = null;
var companyCodeGridManager = null;
var salesOrganizationGridManager = null;
var provinceCode = null;
var cityCode = null;
var countyCode = null;
var currentTabId = UICtrl.getCurrentTabId();
$(document).ready(function () {
provinceCode = getPrimaryProvinceCode();
cityCode = getSecondProvinceCode();
......@@ -18,6 +23,16 @@ $(document).ready(function () {
loadCustomerEmailListGrid();
loadCustomerRelatedListGrid();
loadCustomerPayInfoListGrid();
loadCustomerBrandListGrid();
loadCustomerBankListGrid();
loadCompanyCodeListGrid(currentTabId);
loadSalesOrganizationGrid(currentTabId);
// //添加客户操作
// if (currentTabId="addCustomerDetail"){
//
// }
});
......@@ -205,21 +220,7 @@ function loadBaoshenEmailListGrid() {
},
deleteHandler: function () {
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() {
},
deleteHandler: function () {
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() {
},
deleteHandler: function () {
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() {
deleteHandler: function () {
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() {
});
}
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() {
var _grid = UICtrl.getGridManager('#customerPayInfoListGrid');
DataUtil.delSelectedRows(
......
......@@ -37,8 +37,8 @@
<li id="customerOtherInfo" divid="customerOtherInfoDiv">其他信息</li>
<li id="customerBrand" divid="customerBrandDiv">品牌信息表</li>
<li id="customerBank" divid="customerBankDiv">银行数据表</li>
<li id="customerCompany" divid="customerCompanyDiv">公司代码表</li>
<li id="customerSale" divid="customerSaleDiv">销售组织表</li>
<li id="companyCode" divid="companyCodeDiv">公司代码表</li>
<li id="salesOrganization" divid="salesOrganizationDiv">销售组织表</li>
</ul>
</div>
......@@ -50,42 +50,36 @@
<x:hidden name="provinceCode"/>
<x:hidden name="primaryProvinceCode"/>
<x:hidden name="secondProvinceCode"/>
<%-- sap字段开始--%>
<x:inputC name="BU_GROUP" label="账户组" labelCol="1" fieldCol="2" required="true"/>
<x:inputC name="KUNNR" label="客户编号" labelCol="1" fieldCol="2" readonly="true" maxLength="10"/>
<x:inputC name="RLTYP" label="业务伙伴角色" labelCol="1" fieldCol="2" required="true"/>
<%-- sap字段结束--%>
<x:inputC name="customerCode" label="客户编码" labelCol="1" fieldCol="2"/><%--金库--%>
<%-- sap字段开始--%>
<x:inputC name="customerName" label="客户名称" required="true" labelCol="1" fieldCol="2" maxLength="35"/>
<x:inputC name="customerShortName" label="客户简称" required="true" labelCol="1" fieldCol="2" maxLength="25"/>
<x:inputC name="STRAS" label="开票地址" required="true" labelCol="1" fieldCol="2" maxLength="140"/>
<x:inputC name="STR_SUPPL3" label="客户送货地址(固定)" labelCol="1" fieldCol="2" required="true" maxLength="80"/>
<%-- sap字段结束--%>
<x:inputC name="customerAccountGroup" label="账户组" labelCol="1" fieldCol="2" required="true"/><%--sap--%>
<x:inputC name="customerCode" label="客户编号" labelCol="1" fieldCol="2" readonly="true"/><%--sap--%>
<x:inputC name="customerBusinessPartnerRole" label="业务伙伴角色" labelCol="1" fieldCol="2" required="true"/><%--sap--%>
<x:inputC name="customerName" label="客户名称" required="true" labelCol="1" fieldCol="2" maxLength="35"/><%--sap、金库查询接口--%>
<x:inputC name="customerShortName" label="客户简称" required="true" labelCol="1" fieldCol="2" maxLength="20"/><%--sap、金库--%>
<x:inputC name="customerEnName" label="英文名称" labelCol="1" required="true" fieldCol="2"/><%--金库--%>
<x:inputC name="customerEnShortName" label="英文名简称" labelCol="1" fieldCol="2" required="true"/><%--金库--%>
<x:selectC name="customerLevel" label="客户等级" dictionary="customerLevel" labelCol="1" fieldCol="2"/><%--金库--%>
<x:inputC name="customerBillingAddress" label="开票地址" required="true" labelCol="1" fieldCol="2" maxLength="140"/><%--sap--%>
<x:inputC name="customerDeliveryAddress" label="客户送货地址(固定)" labelCol="1" fieldCol="2" required="true" maxLength="80"/><%--sap--%>
<x:inputC name="LAND1" label="国家" labelCol="1" fieldCol="2" required="true"/><%--sap--%>
<x:inputC name="province" label="客户所在省份" wrapper="select" id="selectProvince" labelCol="1" fieldCol="2" required="true"/><%--金库--%>
<x:inputC name="city" label="(地级)市、地区、盟、自治州" wrapper="select" id="selectCity" labelCol="1" fieldCol="2" required="true"/><%--金库--%>
<x:inputC name="county" label="县、(县级)市、(市辖)区" wrapper="select" id="selectCounty" labelCol="1" fieldCol="2" /><%--金库--%>
<x:inputC name="CITY1" label="城市" labelCol="1" fieldCol="2" maxLength="40"/><%--sap--%>
<x:inputC name="LAND1" label="国家" labelCol="1" fieldCol="2" maxLength="2"/><%--sap--%>
<x:inputC name="REGIO" label="地区" labelCol="1" fieldCol="2" maxLength="3"/><%--sap--%>
<x:inputC name="customerCountry" label="国家" labelCol="1" fieldCol="2" required="true"/><%--sap--%>
<x:inputC name="province" label="省" wrapper="select" id="selectProvince" labelCol="1" fieldCol="2" required="true"/><%--金库--%>
<x:inputC name="city" label="市" wrapper="select" id="selectCity" labelCol="1" fieldCol="2" required="true"/><%--金库--%>
<x:inputC name="county" label="区(县)" wrapper="select" id="selectCounty" labelCol="1" fieldCol="2" /><%--金库--%>
<x:inputC name="customerCity" label="城市" labelCol="1" fieldCol="2" maxLength="40"/><%--sap--%>
<x:inputC name="customerRegion" label="地区" labelCol="1" fieldCol="2" /><%--sap--%>
<x:inputC name="SPRAS" label="语言" labelCol="1" fieldCol="2" required="true"/><%--sap--%>
<x:inputC name="customerZipCode" label="邮政编码" labelCol="1" fieldCol="2"/><%--sap、金库--%>
<x:inputC name="TELF1" label="电话号码" labelCol="1" fieldCol="2" required="true" maxLength="30"/><%--sap--%>
<x:inputC name="TEL_NUMBER" label="移动电话" labelCol="1" fieldCol="2" required="true" maxLength="30"/><%--sap--%>
<x:inputC name="SMTP_ADDR" label="Email" labelCol="1" fieldCol="2" required="true" maxLength="24"/><%--sap--%>
<x:inputC name="customerLanguage" label="语言" labelCol="1" fieldCol="2" required="true"/><%--sap--%>
<x:inputC name="customerZipCode" label="邮政编码" labelCol="1" fieldCol="2" required="true"/><%--sap、金库--%>
<x:inputC name="customerTelNumber" label="电话号码" labelCol="1" fieldCol="2" required="true" maxLength="30"/><%--sap--%>
<x:inputC name="customerMobNumber" label="移动电话" labelCol="1" fieldCol="2" required="true" maxLength="30"/><%--sap--%>
<x:inputC name="customerSmtpAddr" label="Email" labelCol="1" fieldCol="2" required="true" maxLength="24"/><%--sap--%>
<x:inputC name="accountDifficultLevel" label="做账难度等级" labelCol="1" fieldCol="2"/><!--sap、金库-->
<x:selectC name="customerSysOrder" label="要求用客户系统货单" dictionary="customerSysOrder" labelCol="1" fieldCol="2"/><!--sap、金库-->
......@@ -99,7 +93,7 @@
<x:selectC name="isPrintDeliveryDate" label="货单是否打印送货日期" dictionary="productInspectionReportType" labelCol="1" fieldCol="2"/><!--sap、金库-->
<x:inputC name="needInvoice" label="不开发票" labelCol="1" fieldCol="2"/><!--sap、金库-->
<x:inputC name="paymentRequest" label="请款要求" labelCol="1" fieldCol="2" maxLength="200"/><%--sap、金库--%>
<x:inputC name="customerWorkTime" label="客户工作时间" labelCol="1" fieldCol="2" maxLength="20"/><%--sap、金库--%>
<x:inputC name="customerWorkTime" label="客户工作时间" labelCol="1" fieldCol="2" maxLength="50"/><%--sap、金库--%>
<x:inputC name="receiverSignatureRequire" label="收货方签字要求" required="true" labelCol="1" fieldCol="2" maxLength="200"/><%--sap、金库--%>
<x:inputC name="shipPrintRequire" label="货单打印要求" required="true" labelCol="1" fieldCol="2" maxLength="200"/><%--sap、金库--%>
<x:inputC name="customerGroup" label="所属集团" labelCol="1" fieldCol="2" maxLength="20"/><%--sap、金库--%>
......@@ -107,38 +101,38 @@
<x:inputC name="signedStyle" label="货单签回方式" required="true" labelCol="1" fieldCol="2"/><%--sap、金库--%>
<x:selectC name="shipMethod" label="出货方式" required="true" dictionary="shipMethod" labelCol="1" fieldCol="2"/><%--sap、金库--%>
<x:selectC name="route" label="路线" required="true" dictionary="route" labelCol="1" fieldCol="2"/><%--sap、金库--%>
<x:inputC name="ZF12" label="送货单打印默认设置" required="true" labelCol="1" fieldCol="2"/><%--sap--%>
<x:inputC name="defaultSettingsOfPrintingDeliveryNotes" label="送货单打印默认设置" required="true" labelCol="1" fieldCol="2"/><%--sap--%>
<x:inputC name="shipAbnormalDeadline" label="送货单统计异常期限" required="true" labelCol="1" fieldCol="2"/><%--sap、金库--%>
<x:inputC name="productionDeliveryMethod" label="生产发货方式" labelCol="1" fieldCol="2" required="true"/><%--sap、金库--%>
<x:inputC name="monthlySettlementMethod" label="月结方式" id="selectedMonthlySettlementMethod" wrapper="select" required="true" labelCol="1" fieldCol="2"/><%--sap、金库--%>
<x:inputC name="monthlySettlementMethod" label="月结方式" id="selectedMonthlySettlementMethod" wrapper="select" required="true" labelCol="1" fieldCol="2"/><%--sap、金库查询接口--%>
<x:inputC name="paymentDeadline" label="请款期限" required="true" labelCol="1" fieldCol="2"/><%--sap、金库--%>
<x:inputC name="accountDeadline" label="做账截止日" required="true" labelCol="1" fieldCol="2"/><%--sap、金库--%>
<x:inputC name="customerCollectionDeadline" label="客户收账截止日" required="true" labelCol="1" fieldCol="2"/><%--sap、金库--%>
<x:inputC name="orderAbnormalDeadline" label="订单统计异常期限" required="true" labelCol="1" fieldCol="2"/><%--sap、金库--%>
<x:inputC name="customerFactoryCode" label="工厂代号" labelCol="1" fieldCol="2" maxLength="50"/><%--sap品牌、金库--%>
<x:selectC name="quotationCurrency" label="币别" dictionary="currency" labelCol="1" fieldCol="2"/><%--金库查询接口、sap销售组织字段--%>
<x:inputC name="deduction" label="扣款百分比" labelCol="1" fieldCol="2"/><%--金库--%>
<x:inputC name="decimalPlaces" label="金额小数位数" labelCol="1" fieldCol="2"/><%--金库--%>
<x:inputC name="customerCorporation" label="公司法人" labelCol="1" fieldCol="2"/>
<x:inputC name="businessRegistrationNumber" label="工商注册号" labelCol="1" fieldCol="2"/>
<x:inputC name="nationalTaxRegistrationNumber" label="国税注册号" labelCol="1" fieldCol="2"/>
<x:selectC name="orderKind" label="订单性质" dictionary="orderKind" labelCol="1" fieldCol="2"/>
<%-- <x:inputC name="customerAddress" label="收货地址" labelCol="1" fieldCol="2" required="true"/>--%>
<x:inputC name="remark" label="备注" labelCol="1" fieldCol="2"/><%--金库查询接口--%>
<x:inputC name="deduction" label="扣款百分比" maxLength="32" labelCol="1" fieldCol="2"/><%--金库--%>
<x:selectC name="quotationCurrency" label="币别" dictionary="currency" labelCol="1" fieldCol="2"/><%--金库、sap销售组织字段--%>
<x:inputC name="decimalPlaces" label="金额小数位数" labelCol="1" fieldCol="2"/><%--金库--%>
<x:inputC name="ZF06" label="经营类型" labelCol="1" fieldCol="2" required="true" maxLength="10"/><%--sap品牌--%>
<x:inputC name="customerFactoryCode" label="工厂代号" labelCol="1" fieldCol="2" maxLength="50"/><%--sap品牌--%>
<x:inputC name="BANKL" label="开户银行代码" labelCol="1" fieldCol="2"/>
<x:inputC name="customerBankDeposit" label="开户银行" labelCol="1" fieldCol="2"/>
<x:inputC name="customerAccountNo" label="银行账户" labelCol="1" fieldCol="2"/>
<x:inputC name="customerAccountName" label="户名" labelCol="1" fieldCol="2"/>
<x:inputC name="customerCorporation" label="公司法人" labelCol="1" fieldCol="2"/>
<x:inputC name="businessRegistrationNumber" label="工商注册号" labelCol="1" fieldCol="2"/>
<x:inputC name="nationalTaxRegistrationNumber" label="国税注册号" labelCol="1" fieldCol="2"/>
<x:selectC name="orderKind" label="订单性质" dictionary="orderKind" labelCol="1" fieldCol="2"/>
<x:inputC name="customerBrand" label="品牌" labelCol="1" fieldCol="2"/>
<x:inputC name="customerAddress" label="收货地址" labelCol="1" fieldCol="2" required="true"/>
<x:inputC name="remark" label="备注" labelCol="1" fieldCol="2"/>
<%--sap--%>
<%-- <x:inputC name="BUKRS" label="公司代码" labelCol="1" fieldCol="2"/>--%>
......@@ -220,7 +214,7 @@
<div class="layout" id="customerBrandDiv">
<div id="customerBrandGrid">
<x:title title="客户品牌信息表"/>
<x:title title="客户品牌信息表" name="group"/>
<div id="customerBrandListGrid" style="margin: 2px;">
<hr/>
</div>
......@@ -229,13 +223,30 @@
</div>
<div class="layout" id="customerBankDiv">
<div id="customerBankGrid">
<x:title title="客户银行数据表"/>
<div id="customerBrandListGrid" style="margin: 2px;">
<x:title title="客户银行数据表" name="group"/>
<div id="customerBankListGrid" style="margin: 2px;">
<hr/>
</div>
</div>
</div>
<div class="layout" id="companyCodeDiv">
<div id="companyCodeGrid">
<x:title title="公司代码表" name="group"/>
<div id="companyCodeListGrid" style="margin: 2px;">
<hr/>
</div>
</div>
</div><div class="layout" id="salesOrganizationDiv">
<div id="salesOrganizationGrid">
<x:title title="销售组织表" name="group"/>
<div id="salesOrganizationListGrid" style="margin: 2px;">
<hr/>
</div>
</div>
</div>
</div>
</div>
......
......@@ -21,7 +21,7 @@ public interface CustomerApplication {
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);
......
......@@ -119,10 +119,10 @@ public class CustomerApplicationImpl extends BaseApplication implements Customer
*/
@Override
public CustomerDto saveCustomer(CustomerDto customerDto, List<CustomerContact> customerContactList, List<CustomerDebtContact> baoshenEmailList, List<CustomerDebtContact> customerEmailList, List<CustomerRelated> customerRelatedList, List<CustomerPayInfo> customerPayInfoList) {
Customer customer = getCustomer(customerDto);
CustomerBank customerBank = getCustomerBank(customerDto);
CustomerOrder customerOrder = getCustomerOrder(customerDto);
public CustomerVo saveCustomer(CustomerVo customerVo, List<CustomerContact> customerContactList, List<CustomerDebtContact> baoshenEmailList, List<CustomerDebtContact> customerEmailList, List<CustomerRelated> customerRelatedList, List<CustomerPayInfo> customerPayInfoList) {
Customer customer = getCustomer(customerVo);
CustomerBank customerBank = getCustomerBank(customerVo);
CustomerOrder customerOrder = getCustomerOrder(customerVo);
Customer saveCustomer = customerRepository.saveAndFlush(customer);
String customerId = saveCustomer.getCustomerId();
customerBank.setCustomerId(customerId);
......@@ -155,11 +155,11 @@ public class CustomerApplicationImpl extends BaseApplication implements Customer
customerPayInfo.setCustomerId(customerId);
customerPayInfoRepository.saveAndFlush(customerPayInfo);
});
CustomerDto saveCustomerDto = new CustomerDto();
BeanUtils.copyProperties(saveCustomer, saveCustomerDto);
BeanUtils.copyProperties(saveCustomerBank, saveCustomerDto);
BeanUtils.copyProperties(saveCustomerOrder, saveCustomerDto);
return saveCustomerDto;
CustomerVo saveCustomerVo = new CustomerVo();
BeanUtils.copyProperties(saveCustomer, saveCustomerVo);
BeanUtils.copyProperties(saveCustomerBank, saveCustomerVo);
BeanUtils.copyProperties(saveCustomerOrder, saveCustomerVo);
return saveCustomerVo;
}
@Override
......@@ -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();
BeanUtils.copyProperties(customerDto, customer);
BeanUtils.copyProperties(customerVo, customer);
return customer;
}
public CustomerBank getCustomerBank(CustomerDto customerDto) {
public CustomerBank getCustomerBank(CustomerVo customerVo) {
CustomerBank customerBank = new CustomerBank();
BeanUtils.copyProperties(customerDto, customerBank);
BeanUtils.copyProperties(customerVo, customerBank);
return customerBank;
}
public CustomerOrder getCustomerOrder(CustomerDto customerDto) {
public CustomerOrder getCustomerOrder(CustomerVo customerVo) {
CustomerOrder customerOrder = new CustomerOrder();
BeanUtils.copyProperties(customerDto, customerOrder);
BeanUtils.copyProperties(customerVo, customerOrder);
return customerOrder;
}
}
package com.huigou.topsun.customer.application.Impl;
import cn.hutool.core.bean.BeanUtil;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.huigou.topsun.customer.application.SapCustomerApplication;
import com.huigou.topsun.customer.domain.CustomerContact;
import com.huigou.topsun.customer.domain.dto.SapCustomerDto;
import com.huigou.topsun.customer.domain.*;
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.uasp.bmp.common.application.AbstractApplication;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
import java.util.Date;
import java.util.List;
@Service
public class SapCustomerApplicationImpl extends AbstractApplication implements SapCustomerApplication {
@Override
public SapCustomerDto submitCustomerToSAP(CustomerVo customerVo, CustomerContact customerContact) {
SapCustomerDto sapCustomerDto = new SapCustomerDto();
//账目组
// customerDto.setBU_GROUP();
//sap:客户编号customerCode 金库:客户编码KUNNR
// customerDto.setKUNNR();
//业务伙伴角色
// customerDto.setPLTYP();
//客户名称
String customerName = customerVo.getCustomerName();
sapCustomerDto.setNAME1(customerName);
//客户简称
String customerShortName = customerVo.getCustomerShortName();
sapCustomerDto.setBU_SORT(customerShortName);
//收货地址
String customerAddress = customerVo.getCustomerAddress();
sapCustomerDto.setSTRAS(customerAddress);
//客户送货地址(固定)
// customerDto.setSTR_SUPPL3();
//城市
String city = customerVo.getCity();
sapCustomerDto.setCITY1(city);
//国家
// customerDto.setLAND1();
//地区
String province = customerVo.getProvince();
String region = province + city;
sapCustomerDto.setREGIO(region);
//语言
// customerDto.setSPRAS();
//邮政编码
String customerZipCode = customerVo.getCustomerZipCode();
sapCustomerDto.setPOST_CODE1(customerZipCode);
//公司电话号码
// customerDto.setTELF1();
//公司移动电话
// customerDto.setTEL_NUMBER();
//公司传真
// customerDto.setTELFX();
//公司邮箱
// customerDto.setSMTP_ADDR();
//开户银行代码(?)
String customerBankId = customerVo.getCustomerBankId();
sapCustomerDto.setBANKL(customerBankId);
//银行账号
String customerAccountNo = customerVo.getCustomerAccountNo();
sapCustomerDto.setBANKN(customerAccountNo);
//做账难度等级
String accountDifficultLevel = customerVo.getAccountDifficultLevel();
sapCustomerDto.setKUKLA(accountDifficultLevel);
//要求用客户系统货单(是、否)
String customerSysOrder = customerVo.getCustomerSysOrder();
sapCustomerDto.setKATR1(customerSysOrder);
//盖章方式(传key)
String stampMethod = customerVo.getStampMethod();
sapCustomerDto.setKATR2(stampMethod);
//请款联(传key,key是sap字典的数字编码)
String paymentRequestForm = customerVo.getPaymentRequestForm();
sapCustomerDto.setKATR3(paymentRequestForm);
//客户联(传key,key是sap字典的数字编码)
String customerReceipt = customerVo.getCustomerReceipt();
sapCustomerDto.setKATR4(customerReceipt);
//订单要求(sap数据字典)
String orderRequire = customerVo.getOrderRequire();
sapCustomerDto.setKATR5(orderRequire);
//验收单要求(sap数据字典)
String acceptanceRequire = customerVo.getAcceptanceRequire();
sapCustomerDto.setKATR6(acceptanceRequire);
//客户系统验收要求()
String customerSysAcceptanceRequire = customerVo.getCustomerSysAcceptanceRequire();
sapCustomerDto.setKATR7(customerSysAcceptanceRequire);
//要求签回货单
String signedBack = customerVo.getSignedBack();
sapCustomerDto.setKATR8(signedBack);
//货单是否打印送货日期
String isPrintDeliveryDate = customerVo.getIsPrintDeliveryDate();
sapCustomerDto.setKATR9(isPrintDeliveryDate);
//不开发票
String needInvoice = customerVo.getNeedInvoice();
sapCustomerDto.setKATR10(needInvoice);
//请款要求
String paymentRequest = customerVo.getPaymentRequest();
sapCustomerDto.setZT01(paymentRequest);
//客户工作时间
Date customerWorkTime = customerVo.getCustomerWorkTime();
sapCustomerDto.setZT02(String.valueOf(customerWorkTime));
//收货方签字要求
String receiverSignatureRequire = customerVo.getReceiverSignatureRequire();
sapCustomerDto.setZT03(receiverSignatureRequire);
//货单打印要求
String shipPrintRequire = customerVo.getShipPrintRequire();
sapCustomerDto.setZT04(shipPrintRequire);
//品牌
String customerBrand = customerVo.getCustomerBrand();
sapCustomerDto.setZF01(customerBrand);
//职位
String contactPosition = customerContact.getContactPosition();
sapCustomerDto.setZF02(contactPosition);
//联系人
String contactName = customerContact.getContactName();
sapCustomerDto.setZF03(contactName);
//电话号码
String contactPhone = customerContact.getContactPhone();
sapCustomerDto.setZF04(contactPhone);
//e_Mail
String contactEmail = customerContact.getContactEmail();
sapCustomerDto.setZF05(contactEmail);
//经营类型
// customerDto.setZF06();
//工厂代号
String customerFactoryCode = customerVo.getCustomerFactoryCode();
sapCustomerDto.setZF07(customerFactoryCode);
//产品检验报告类型
String productInspectionReportType = customerVo.getProductInspectionReportType();
sapCustomerDto.setZF08(productInspectionReportType);
//货单签回方式
String signedStyle = customerVo.getSignedStyle();
sapCustomerDto.setZF09(signedStyle);
//出货方式
String shipMethod = customerVo.getShipMethod();
sapCustomerDto.setZF10(shipMethod);
//路线
String route = customerVo.getRoute();
sapCustomerDto.setZF11(route);
//送货单打印默认设置
// customerDto.setZF12();
//送货单统计异常期限
Integer shipAbnormalDeadline = customerVo.getShipAbnormalDeadline();
sapCustomerDto.setZF13(String.valueOf(shipAbnormalDeadline));
//生产发货方式
String productionDeliveryMethod = customerVo.getProductionDeliveryMethod();
sapCustomerDto.setZF14(productionDeliveryMethod);
//月结方式
String monthlySettlementMethod = customerVo.getMonthlySettlementMethod();
sapCustomerDto.setZF15(monthlySettlementMethod);
//请款期限
Integer paymentDeadline = customerVo.getPaymentDeadline();
sapCustomerDto.setZF16(String.valueOf(paymentDeadline));
//做账截止日
Integer accountDeadline = customerVo.getAccountDeadline();
sapCustomerDto.setZF17(String.valueOf(accountDeadline));
//客户收账截止日
Integer customerCollectionDeadline = customerVo.getCustomerCollectionDeadline();
sapCustomerDto.setZF18(String.valueOf(customerCollectionDeadline));
//订单统计异常期限
Integer orderAbnormalDeadline = customerVo.getOrderAbnormalDeadline();
sapCustomerDto.setZF19(String.valueOf(orderAbnormalDeadline));
//公司代码
// customerDto.setBUKRS();
//统驭科目
// customerDto.setAKONT();
//销售组织
// customerDto.setVKORG();
//分销渠道
// customerDto.setVTWEG();
//产品组
// customerDto.setSPART();
//客户组
// customerDto.setKDGRP();
//销售办公室
// customerDto.setVKBUR();
//销售小组
// customerDto.setVKGRP();
//客户分类
// customerDto.setKLABC();
//币别
String quotationCurrency = customerVo.getQuotationCurrency();
sapCustomerDto.setWAERS(quotationCurrency);
//汇率类型
// customerDto.setKURST();
//价格清单
// customerDto.setPLTYP();
//国际贸易条款
// customerDto.setINCO1();
//国际贸易条款位置
// customerDto.setINCO2();
//付款条件
// customerDto.setZTERM();
@Override
public String submitCustomerToSAP(CustomerVo customerVo, List<CustomerBrandVo> customerBrandList, List<CustomerBankListVo> sapCustomerBankList, CustomerCompanyCode customerCompanyCode, CustomerSalesOrganization customerSalesOrganization) {
SapCustomerDto sapCustomerDto = new SapCustomerDto();
if (!BeanUtil.isEmpty(customerVo)) {
BeanUtils.copyProperties(customerVo, sapCustomerDto);
}
//转JSON
ObjectMapper objectMapper = new ObjectMapper();
String sapCustomerDtoJson;
try {
sapCustomerDtoJson = objectMapper.writeValueAsString(sapCustomerDto);
} catch (JsonProcessingException e) {
throw new RuntimeException(e);
}
//客户科目分配组
// customerDto.setKTGRD();
//税收类别
// customerDto.setTATYP();
//客户税分类
// customerDto.setTAXKD();
return sapCustomerDto;
return sapCustomerDtoJson;
}
}
package com.huigou.topsun.customer.application;
import com.huigou.topsun.customer.domain.CustomerContact;
import com.huigou.topsun.customer.domain.dto.SapCustomerDto;
import com.huigou.topsun.customer.domain.*;
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 java.util.List;
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;
import com.huigou.topsun.customer.domain.*;
import com.huigou.topsun.customer.domain.dto.CustomerDto;
import com.huigou.topsun.customer.domain.query.CustomerQueryRequest;
import com.huigou.topsun.customer.domain.dto.SapCustomerDto;
import com.huigou.topsun.customer.domain.vo.CustomerListVo;
import com.huigou.topsun.customer.domain.vo.CustomerVo;
import com.huigou.topsun.customer.domain.vo.ReturnCustomerListVo;
import com.huigou.topsun.customer.domain.sap.dto.SapCustomerDto;
import com.huigou.topsun.customer.domain.vo.*;
import com.huigou.uasp.annotation.ControllerMapping;
import com.huigou.uasp.annotation.SkipAuth;
import com.huigou.uasp.client.CommonController;
......@@ -130,25 +128,31 @@ public class CustomerController extends CommonController {
*/
public String saveCustomer() {
SDO sdo = getSDO();
CustomerDto customerDto = sdo.toObject(CustomerDto.class);
CustomerVo customerVo = sdo.toObject(CustomerVo.class);
List<CustomerContact> customerContactList = sdo.getList("contactList", CustomerContact.class);
List<CustomerDebtContact> baoshenEmailList = sdo.getList("baoshenEmailList", CustomerDebtContact.class);
List<CustomerDebtContact> customerEmailList = sdo.getList("customerEmailList", CustomerDebtContact.class);
List<CustomerRelated> customerRelatedList = sdo.getList("customerRelatedList", CustomerRelated.class);
List<CustomerPayInfo> customerPayInfoList = sdo.getList("customerPayInfoList", CustomerPayInfo.class);
customerDto = customerApplication.saveCustomer(customerDto, customerContactList, baoshenEmailList, customerEmailList, customerRelatedList, customerPayInfoList);
return success(customerDto);
customerVo = customerApplication.saveCustomer(customerVo, customerContactList, baoshenEmailList, customerEmailList, customerRelatedList, customerPayInfoList);
return success(customerVo);
}
public String submitCustomerToSAP() {
SDO sdo = getSDO();
/**
* 向sap新建客户
* @return
*/
@SkipAuth
public String addCustomerToSAP() {
SDO sdo = getUploadSDO();
CustomerVo customerVo = sdo.toObject(CustomerVo.class);
List<CustomerContact> customerContactList = sdo.getList("contactList", CustomerContact.class);
CustomerContact customerContact = customerContactList.get(0);
SapCustomerDto sapCustomerDto = sapCustomerApplication.submitCustomerToSAP(customerVo, customerContact);
return JSONUtil.toString(sapCustomerDto);
List<CustomerBrandVo> customerBrandList = sdo.getList("brandList", CustomerBrandVo.class);
List<CustomerBankListVo> sapCustomerBankList = sdo.getList("sapBankList", CustomerBankListVo.class);
CustomerCompanyCode customerCompanyCode = sdo.toObject(CustomerCompanyCode.class);
CustomerSalesOrganization customerSalesOrganization = sdo.toObject(CustomerSalesOrganization.class);
String sapCustomerDtoJsonString = sapCustomerApplication.submitCustomerToSAP(customerVo, customerBrandList,sapCustomerBankList,customerCompanyCode,customerSalesOrganization);
return sapCustomerDtoJsonString;
}
// /**
......
package com.huigou.topsun.customer.domain;
import java.io.Serializable;
import java.util.Date;
import javax.persistence.*;
import lombok.Data;
......@@ -46,7 +45,7 @@ public class Customer implements Serializable {
* 客户工作时间
*/
@Column(name = "customer_work_time")
private Date customerWorkTime;
private String customerWorkTime;
/**
* 客户英文名称
......@@ -96,5 +95,77 @@ public class Customer implements Serializable {
@Column(name = "customer_zip_code")
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;
}
\ 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 {
/**
* 客户工作时间
*/
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;
import java.io.Serializable;
@Data
public class CustomerContactVo implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 联系人
*/
......
......@@ -17,6 +17,7 @@ import java.util.Date;
*/
@Data
public class CustomerDebtContactVo implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 催货款通知邮箱id
*/
......
......@@ -7,6 +7,7 @@ import java.io.Serializable;
@Data
public class CustomerListVo implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 客户id
*/
......
......@@ -15,6 +15,7 @@ import java.util.Date;
*/
@Data
public class CustomerPayInfoVo implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 客户付款信息表id
*/
......
......@@ -15,6 +15,7 @@ import java.util.Date;
*/
@Data
public class CustomerRelatedVo implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 关联客户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;
@Data
public class CustomerVo implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 客户id
*/
......@@ -33,7 +34,7 @@ public class CustomerVo implements Serializable {
/**
* 客户工作时间
*/
private Date customerWorkTime;
private String customerWorkTime;
/**
* 客户英文名称
......@@ -102,6 +103,66 @@ public class CustomerVo implements Serializable {
*/
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
*/
......
......@@ -14,6 +14,7 @@ import java.io.Serializable;
*/
@Data
public class MonthlySettlementMethodVo implements Serializable {
private static final long serialVersionUID = 1L;
private String methodId;
private String method;
private String status;
......
......@@ -7,6 +7,7 @@ import java.util.List;
@Data
public class ReturnCustomerListVo implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 客户全称
*/
......
package com.huigou.topsun.sap.purchase.controller;
import com.huigou.uasp.annotation.ControllerMapping;
import com.huigou.uasp.annotation.SkipAuth;
import com.huigou.uasp.client.CommonController;
import com.huigou.util.JSONUtil;
import com.huigou.util.SDO;
import org.springframework.stereotype.Controller;
import java.util.HashMap;
/**
* @Auther: xin.lu
* @Date: 2024/01/05/15:01
* @Description:
*/
@Controller
@ControllerMapping("/sapPurchaseApproval")
public class SapPurchaseApprovalController extends CommonController {
@SkipAuth
public String getSapPurchaseApproval(){
SDO sdo = this.getSDO();
HashMap<String, Object> messageMap = new HashMap<>();
messageMap.put("Message_Status","S");
messageMap.put("Message_Text","成功");
return toResult(messageMap);
}
}
//package com.huigou.topsun.sap.purchase.controller;
//
//import com.huigou.uasp.annotation.ControllerMapping;
//import com.huigou.uasp.annotation.SkipAuth;
//import com.huigou.uasp.client.CommonController;
//import com.huigou.util.JSONUtil;
//import com.huigou.util.SDO;
//import org.springframework.stereotype.Controller;
//
//import java.util.HashMap;
//
///**
// * @Auther: xin.lu
// * @Date: 2024/01/05/15:01
// * @Description:
// */
//@Controller
//@ControllerMapping("/sapPurchaseApproval")
//public class SapPurchaseApprovalController extends CommonController {
//
// @SkipAuth
// public String getSapPurchaseApproval(){
// SDO sdo = this.getSDO();
// HashMap<String, Object> messageMap = new HashMap<>();
// messageMap.put("Message_Status","S");
// messageMap.put("Message_Text","成功");
// 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