Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
T
topsun-bpm
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
鲁鑫
topsun-bpm
Commits
2dbfb7d7
Commit
2dbfb7d7
authored
Jan 09, 2024
by
全洪江
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
重构客户模块
parent
827d32b7
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
390 additions
and
122 deletions
+390
-122
customerDetail.jsp
...xt/src/main/webapp/biz/topsun/customer/customerDetail.jsp
+4
-50
CustomerApplication.java
...igou/topsun/customer/application/CustomerApplication.java
+2
-1
CustomerApplicationImpl.java
...un/customer/application/Impl/CustomerApplicationImpl.java
+16
-15
SapCustomerApplicationImpl.java
...customer/application/Impl/SapCustomerApplicationImpl.java
+45
-45
SapCustomerApplication.java
...u/topsun/customer/application/SapCustomerApplication.java
+2
-2
CustomerController.java
...huigou/topsun/customer/controller/CustomerController.java
+7
-7
CustomerDto.java
...va/com/huigou/topsun/customer/domain/dto/CustomerDto.java
+312
-0
SapCustomerDto.java
...com/huigou/topsun/customer/domain/dto/SapCustomerDto.java
+2
-2
No files found.
topsun-xt/src/main/webapp/biz/topsun/customer/customerDetail.jsp
View file @
2dbfb7d7
...
...
@@ -35,10 +35,10 @@
<li
id=
"customerBaseInfo"
divid=
"customerBaseInfoDiv"
>
客户基本信息
</li>
<li
id=
"customerDebtContact"
divid=
"customerDebtContactDiv"
>
催货款通知邮箱
</li>
<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=
"customerBrand"
divid=
"customerBrandDiv"
>
品牌信息
表
</li>
<li
id=
"customerBank"
divid=
"customerBankDiv"
>
银行数据表
</li>
<li
id=
"customerCompany"
divid=
"customerCompanyDiv"
>
公司代码
表
</li>
<li
id=
"customerSale"
divid=
"customerSaleDiv"
>
销售组织
表
</li>
</ul>
</div>
...
...
@@ -116,17 +116,8 @@
<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=
"deduction"
label=
"扣款百分比"
maxLength=
"32"
labelCol=
"1"
fieldCol=
"2"
/>
<%--金库--%>
<x:selectC
name=
"quotationCurrency"
label=
"币别"
dictionary=
"currency"
labelCol=
"1"
fieldCol=
"2"
/>
<%--金库、sap销售组织字段--%>
...
...
@@ -137,54 +128,17 @@
<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"/>--%>
...
...
topsun/src/main/java/com/huigou/topsun/customer/application/CustomerApplication.java
View file @
2dbfb7d7
package
com
.
huigou
.
topsun
.
customer
.
application
;
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.vo.CustomerListVo
;
import
com.huigou.topsun.customer.domain.vo.CustomerVo
;
...
...
@@ -20,7 +21,7 @@ public interface CustomerApplication {
void
deleteContactByIds
(
List
<
String
>
ids
);
Customer
Vo
saveCustomer
(
CustomerVo
customerV
o
,
List
<
CustomerContact
>
customerContactList
,
List
<
CustomerDebtContact
>
baoshenEmailList
,
List
<
CustomerDebtContact
>
customerEmailList
,
List
<
CustomerRelated
>
customerRelatedList
,
List
<
CustomerPayInfo
>
customerPayInfoList
);
Customer
Dto
saveCustomer
(
CustomerDto
customerDt
o
,
List
<
CustomerContact
>
customerContactList
,
List
<
CustomerDebtContact
>
baoshenEmailList
,
List
<
CustomerDebtContact
>
customerEmailList
,
List
<
CustomerRelated
>
customerRelatedList
,
List
<
CustomerPayInfo
>
customerPayInfoList
);
void
deleteCustomerAndAffiliatedInfoByCustomerId
(
List
<
String
>
customerIds
);
...
...
topsun/src/main/java/com/huigou/topsun/customer/application/Impl/CustomerApplicationImpl.java
View file @
2dbfb7d7
...
...
@@ -6,6 +6,7 @@ import com.huigou.data.query.model.QueryDescriptor;
import
com.huigou.data.query.model.QueryModel
;
import
com.huigou.topsun.customer.application.*
;
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.vo.CustomerContactVo
;
import
com.huigou.topsun.customer.domain.vo.CustomerListVo
;
...
...
@@ -118,10 +119,10 @@ public class CustomerApplicationImpl extends BaseApplication implements Customer
*/
@Override
public
Customer
Vo
saveCustomer
(
CustomerVo
customerV
o
,
List
<
CustomerContact
>
customerContactList
,
List
<
CustomerDebtContact
>
baoshenEmailList
,
List
<
CustomerDebtContact
>
customerEmailList
,
List
<
CustomerRelated
>
customerRelatedList
,
List
<
CustomerPayInfo
>
customerPayInfoList
)
{
Customer
customer
=
getCustomer
(
customer
V
o
);
CustomerBank
customerBank
=
getCustomerBank
(
customer
V
o
);
CustomerOrder
customerOrder
=
getCustomerOrder
(
customer
V
o
);
public
Customer
Dto
saveCustomer
(
CustomerDto
customerDt
o
,
List
<
CustomerContact
>
customerContactList
,
List
<
CustomerDebtContact
>
baoshenEmailList
,
List
<
CustomerDebtContact
>
customerEmailList
,
List
<
CustomerRelated
>
customerRelatedList
,
List
<
CustomerPayInfo
>
customerPayInfoList
)
{
Customer
customer
=
getCustomer
(
customer
Dt
o
);
CustomerBank
customerBank
=
getCustomerBank
(
customer
Dt
o
);
CustomerOrder
customerOrder
=
getCustomerOrder
(
customer
Dt
o
);
Customer
saveCustomer
=
customerRepository
.
saveAndFlush
(
customer
);
String
customerId
=
saveCustomer
.
getCustomerId
();
customerBank
.
setCustomerId
(
customerId
);
...
...
@@ -154,11 +155,11 @@ public class CustomerApplicationImpl extends BaseApplication implements Customer
customerPayInfo
.
setCustomerId
(
customerId
);
customerPayInfoRepository
.
saveAndFlush
(
customerPayInfo
);
});
Customer
Vo
saveCustomerVo
=
new
CustomerV
o
();
BeanUtils
.
copyProperties
(
saveCustomer
,
saveCustomer
V
o
);
BeanUtils
.
copyProperties
(
saveCustomerBank
,
saveCustomer
V
o
);
BeanUtils
.
copyProperties
(
saveCustomerOrder
,
saveCustomer
V
o
);
return
saveCustomer
V
o
;
Customer
Dto
saveCustomerDto
=
new
CustomerDt
o
();
BeanUtils
.
copyProperties
(
saveCustomer
,
saveCustomer
Dt
o
);
BeanUtils
.
copyProperties
(
saveCustomerBank
,
saveCustomer
Dt
o
);
BeanUtils
.
copyProperties
(
saveCustomerOrder
,
saveCustomer
Dt
o
);
return
saveCustomer
Dt
o
;
}
@Override
...
...
@@ -233,21 +234,21 @@ public class CustomerApplicationImpl extends BaseApplication implements Customer
}
public
Customer
getCustomer
(
Customer
Vo
customerV
o
)
{
public
Customer
getCustomer
(
Customer
Dto
customerDt
o
)
{
Customer
customer
=
new
Customer
();
BeanUtils
.
copyProperties
(
customer
V
o
,
customer
);
BeanUtils
.
copyProperties
(
customer
Dt
o
,
customer
);
return
customer
;
}
public
CustomerBank
getCustomerBank
(
Customer
Vo
customerV
o
)
{
public
CustomerBank
getCustomerBank
(
Customer
Dto
customerDt
o
)
{
CustomerBank
customerBank
=
new
CustomerBank
();
BeanUtils
.
copyProperties
(
customer
V
o
,
customerBank
);
BeanUtils
.
copyProperties
(
customer
Dt
o
,
customerBank
);
return
customerBank
;
}
public
CustomerOrder
getCustomerOrder
(
Customer
Vo
customerV
o
)
{
public
CustomerOrder
getCustomerOrder
(
Customer
Dto
customerDt
o
)
{
CustomerOrder
customerOrder
=
new
CustomerOrder
();
BeanUtils
.
copyProperties
(
customer
V
o
,
customerOrder
);
BeanUtils
.
copyProperties
(
customer
Dt
o
,
customerOrder
);
return
customerOrder
;
}
}
topsun/src/main/java/com/huigou/topsun/customer/application/Impl/SapCustomerApplicationImpl.java
View file @
2dbfb7d7
...
...
@@ -2,7 +2,7 @@ package com.huigou.topsun.customer.application.Impl;
import
com.huigou.topsun.customer.application.SapCustomerApplication
;
import
com.huigou.topsun.customer.domain.CustomerContact
;
import
com.huigou.topsun.customer.domain.
sap.
CustomerDto
;
import
com.huigou.topsun.customer.domain.
dto.Sap
CustomerDto
;
import
com.huigou.topsun.customer.domain.vo.CustomerVo
;
import
com.huigou.uasp.bmp.common.application.AbstractApplication
;
import
org.springframework.stereotype.Service
;
...
...
@@ -13,8 +13,8 @@ import java.util.Date;
public
class
SapCustomerApplicationImpl
extends
AbstractApplication
implements
SapCustomerApplication
{
@Override
public
CustomerDto
submitCustomerToSAP
(
CustomerVo
customerVo
,
CustomerContact
customerContact
)
{
CustomerDto
customerDto
=
new
CustomerDto
();
public
Sap
CustomerDto
submitCustomerToSAP
(
CustomerVo
customerVo
,
CustomerContact
customerContact
)
{
SapCustomerDto
sapCustomerDto
=
new
Sap
CustomerDto
();
//账目组
// customerDto.setBU_GROUP();
...
...
@@ -27,22 +27,22 @@ public class SapCustomerApplicationImpl extends AbstractApplication implements S
//客户名称
String
customerName
=
customerVo
.
getCustomerName
();
c
ustomerDto
.
setNAME1
(
customerName
);
sapC
ustomerDto
.
setNAME1
(
customerName
);
//客户简称
String
customerShortName
=
customerVo
.
getCustomerShortName
();
c
ustomerDto
.
setBU_SORT
(
customerShortName
);
sapC
ustomerDto
.
setBU_SORT
(
customerShortName
);
//收货地址
String
customerAddress
=
customerVo
.
getCustomerAddress
();
c
ustomerDto
.
setSTRAS
(
customerAddress
);
sapC
ustomerDto
.
setSTRAS
(
customerAddress
);
//客户送货地址(固定)
// customerDto.setSTR_SUPPL3();
//城市
String
city
=
customerVo
.
getCity
();
c
ustomerDto
.
setCITY1
(
city
);
sapC
ustomerDto
.
setCITY1
(
city
);
//国家
// customerDto.setLAND1();
...
...
@@ -50,14 +50,14 @@ public class SapCustomerApplicationImpl extends AbstractApplication implements S
//地区
String
province
=
customerVo
.
getProvince
();
String
region
=
province
+
city
;
c
ustomerDto
.
setREGIO
(
region
);
sapC
ustomerDto
.
setREGIO
(
region
);
//语言
// customerDto.setSPRAS();
//邮政编码
String
customerZipCode
=
customerVo
.
getCustomerZipCode
();
c
ustomerDto
.
setPOST_CODE1
(
customerZipCode
);
sapC
ustomerDto
.
setPOST_CODE1
(
customerZipCode
);
//公司电话号码
// customerDto.setTELF1();
...
...
@@ -73,145 +73,145 @@ public class SapCustomerApplicationImpl extends AbstractApplication implements S
//开户银行代码(?)
String
customerBankId
=
customerVo
.
getCustomerBankId
();
c
ustomerDto
.
setBANKL
(
customerBankId
);
sapC
ustomerDto
.
setBANKL
(
customerBankId
);
//银行账号
String
customerAccountNo
=
customerVo
.
getCustomerAccountNo
();
c
ustomerDto
.
setBANKN
(
customerAccountNo
);
sapC
ustomerDto
.
setBANKN
(
customerAccountNo
);
//做账难度等级
String
accountDifficultLevel
=
customerVo
.
getAccountDifficultLevel
();
c
ustomerDto
.
setKUKLA
(
accountDifficultLevel
);
sapC
ustomerDto
.
setKUKLA
(
accountDifficultLevel
);
//要求用客户系统货单(是、否)
String
customerSysOrder
=
customerVo
.
getCustomerSysOrder
();
c
ustomerDto
.
setKATR1
(
customerSysOrder
);
sapC
ustomerDto
.
setKATR1
(
customerSysOrder
);
//盖章方式(传key)
String
stampMethod
=
customerVo
.
getStampMethod
();
c
ustomerDto
.
setKATR2
(
stampMethod
);
sapC
ustomerDto
.
setKATR2
(
stampMethod
);
//请款联(传key,key是sap字典的数字编码)
String
paymentRequestForm
=
customerVo
.
getPaymentRequestForm
();
c
ustomerDto
.
setKATR3
(
paymentRequestForm
);
sapC
ustomerDto
.
setKATR3
(
paymentRequestForm
);
//客户联(传key,key是sap字典的数字编码)
String
customerReceipt
=
customerVo
.
getCustomerReceipt
();
c
ustomerDto
.
setKATR4
(
customerReceipt
);
sapC
ustomerDto
.
setKATR4
(
customerReceipt
);
//订单要求(sap数据字典)
String
orderRequire
=
customerVo
.
getOrderRequire
();
c
ustomerDto
.
setKATR5
(
orderRequire
);
sapC
ustomerDto
.
setKATR5
(
orderRequire
);
//验收单要求(sap数据字典)
String
acceptanceRequire
=
customerVo
.
getAcceptanceRequire
();
c
ustomerDto
.
setKATR6
(
acceptanceRequire
);
sapC
ustomerDto
.
setKATR6
(
acceptanceRequire
);
//客户系统验收要求()
String
customerSysAcceptanceRequire
=
customerVo
.
getCustomerSysAcceptanceRequire
();
c
ustomerDto
.
setKATR7
(
customerSysAcceptanceRequire
);
sapC
ustomerDto
.
setKATR7
(
customerSysAcceptanceRequire
);
//要求签回货单
String
signedBack
=
customerVo
.
getSignedBack
();
c
ustomerDto
.
setKATR8
(
signedBack
);
sapC
ustomerDto
.
setKATR8
(
signedBack
);
//货单是否打印送货日期
String
isPrintDeliveryDate
=
customerVo
.
getIsPrintDeliveryDate
();
c
ustomerDto
.
setKATR9
(
isPrintDeliveryDate
);
sapC
ustomerDto
.
setKATR9
(
isPrintDeliveryDate
);
//不开发票
String
needInvoice
=
customerVo
.
getNeedInvoice
();
c
ustomerDto
.
setKATR10
(
needInvoice
);
sapC
ustomerDto
.
setKATR10
(
needInvoice
);
//请款要求
String
paymentRequest
=
customerVo
.
getPaymentRequest
();
c
ustomerDto
.
setZT01
(
paymentRequest
);
sapC
ustomerDto
.
setZT01
(
paymentRequest
);
//客户工作时间
Date
customerWorkTime
=
customerVo
.
getCustomerWorkTime
();
c
ustomerDto
.
setZT02
(
String
.
valueOf
(
customerWorkTime
));
sapC
ustomerDto
.
setZT02
(
String
.
valueOf
(
customerWorkTime
));
//收货方签字要求
String
receiverSignatureRequire
=
customerVo
.
getReceiverSignatureRequire
();
c
ustomerDto
.
setZT03
(
receiverSignatureRequire
);
sapC
ustomerDto
.
setZT03
(
receiverSignatureRequire
);
//货单打印要求
String
shipPrintRequire
=
customerVo
.
getShipPrintRequire
();
c
ustomerDto
.
setZT04
(
shipPrintRequire
);
sapC
ustomerDto
.
setZT04
(
shipPrintRequire
);
//品牌
String
customerBrand
=
customerVo
.
getCustomerBrand
();
c
ustomerDto
.
setZF01
(
customerBrand
);
sapC
ustomerDto
.
setZF01
(
customerBrand
);
//职位
String
contactPosition
=
customerContact
.
getContactPosition
();
c
ustomerDto
.
setZF02
(
contactPosition
);
sapC
ustomerDto
.
setZF02
(
contactPosition
);
//联系人
String
contactName
=
customerContact
.
getContactName
();
c
ustomerDto
.
setZF03
(
contactName
);
sapC
ustomerDto
.
setZF03
(
contactName
);
//电话号码
String
contactPhone
=
customerContact
.
getContactPhone
();
c
ustomerDto
.
setZF04
(
contactPhone
);
sapC
ustomerDto
.
setZF04
(
contactPhone
);
//e_Mail
String
contactEmail
=
customerContact
.
getContactEmail
();
c
ustomerDto
.
setZF05
(
contactEmail
);
sapC
ustomerDto
.
setZF05
(
contactEmail
);
//经营类型
// customerDto.setZF06();
//工厂代号
String
customerFactoryCode
=
customerVo
.
getCustomerFactoryCode
();
c
ustomerDto
.
setZF07
(
customerFactoryCode
);
sapC
ustomerDto
.
setZF07
(
customerFactoryCode
);
//产品检验报告类型
String
productInspectionReportType
=
customerVo
.
getProductInspectionReportType
();
c
ustomerDto
.
setZF08
(
productInspectionReportType
);
sapC
ustomerDto
.
setZF08
(
productInspectionReportType
);
//货单签回方式
String
signedStyle
=
customerVo
.
getSignedStyle
();
c
ustomerDto
.
setZF09
(
signedStyle
);
sapC
ustomerDto
.
setZF09
(
signedStyle
);
//出货方式
String
shipMethod
=
customerVo
.
getShipMethod
();
c
ustomerDto
.
setZF10
(
shipMethod
);
sapC
ustomerDto
.
setZF10
(
shipMethod
);
//路线
String
route
=
customerVo
.
getRoute
();
c
ustomerDto
.
setZF11
(
route
);
sapC
ustomerDto
.
setZF11
(
route
);
//送货单打印默认设置
// customerDto.setZF12();
//送货单统计异常期限
Integer
shipAbnormalDeadline
=
customerVo
.
getShipAbnormalDeadline
();
c
ustomerDto
.
setZF13
(
String
.
valueOf
(
shipAbnormalDeadline
));
sapC
ustomerDto
.
setZF13
(
String
.
valueOf
(
shipAbnormalDeadline
));
//生产发货方式
String
productionDeliveryMethod
=
customerVo
.
getProductionDeliveryMethod
();
c
ustomerDto
.
setZF14
(
productionDeliveryMethod
);
sapC
ustomerDto
.
setZF14
(
productionDeliveryMethod
);
//月结方式
String
monthlySettlementMethod
=
customerVo
.
getMonthlySettlementMethod
();
c
ustomerDto
.
setZF15
(
monthlySettlementMethod
);
sapC
ustomerDto
.
setZF15
(
monthlySettlementMethod
);
//请款期限
Integer
paymentDeadline
=
customerVo
.
getPaymentDeadline
();
c
ustomerDto
.
setZF16
(
String
.
valueOf
(
paymentDeadline
));
sapC
ustomerDto
.
setZF16
(
String
.
valueOf
(
paymentDeadline
));
//做账截止日
Integer
accountDeadline
=
customerVo
.
getAccountDeadline
();
c
ustomerDto
.
setZF17
(
String
.
valueOf
(
accountDeadline
));
sapC
ustomerDto
.
setZF17
(
String
.
valueOf
(
accountDeadline
));
//客户收账截止日
Integer
customerCollectionDeadline
=
customerVo
.
getCustomerCollectionDeadline
();
c
ustomerDto
.
setZF18
(
String
.
valueOf
(
customerCollectionDeadline
));
sapC
ustomerDto
.
setZF18
(
String
.
valueOf
(
customerCollectionDeadline
));
//订单统计异常期限
Integer
orderAbnormalDeadline
=
customerVo
.
getOrderAbnormalDeadline
();
c
ustomerDto
.
setZF19
(
String
.
valueOf
(
orderAbnormalDeadline
));
sapC
ustomerDto
.
setZF19
(
String
.
valueOf
(
orderAbnormalDeadline
));
//公司代码
// customerDto.setBUKRS();
...
...
@@ -242,7 +242,7 @@ public class SapCustomerApplicationImpl extends AbstractApplication implements S
//币别
String
quotationCurrency
=
customerVo
.
getQuotationCurrency
();
c
ustomerDto
.
setWAERS
(
quotationCurrency
);
sapC
ustomerDto
.
setWAERS
(
quotationCurrency
);
//汇率类型
// customerDto.setKURST();
...
...
@@ -267,6 +267,6 @@ public class SapCustomerApplicationImpl extends AbstractApplication implements S
//客户税分类
// customerDto.setTAXKD();
return
c
ustomerDto
;
return
sapC
ustomerDto
;
}
}
topsun/src/main/java/com/huigou/topsun/customer/application/SapCustomerApplication.java
View file @
2dbfb7d7
package
com
.
huigou
.
topsun
.
customer
.
application
;
import
com.huigou.topsun.customer.domain.CustomerContact
;
import
com.huigou.topsun.customer.domain.
sap.
CustomerDto
;
import
com.huigou.topsun.customer.domain.
dto.Sap
CustomerDto
;
import
com.huigou.topsun.customer.domain.vo.CustomerVo
;
public
interface
SapCustomerApplication
{
CustomerDto
submitCustomerToSAP
(
CustomerVo
customerVo
,
CustomerContact
customerContact
);
Sap
CustomerDto
submitCustomerToSAP
(
CustomerVo
customerVo
,
CustomerContact
customerContact
);
}
topsun/src/main/java/com/huigou/topsun/customer/controller/CustomerController.java
View file @
2dbfb7d7
...
...
@@ -4,8 +4,9 @@ import com.huigou.topsun.customer.application.CustomerBaseInfoApplication;
import
com.huigou.topsun.customer.application.CustomerApplication
;
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.
sap.
CustomerDto
;
import
com.huigou.topsun.customer.domain.
dto.Sap
CustomerDto
;
import
com.huigou.topsun.customer.domain.vo.CustomerListVo
;
import
com.huigou.topsun.customer.domain.vo.CustomerVo
;
import
com.huigou.topsun.customer.domain.vo.ReturnCustomerListVo
;
...
...
@@ -129,15 +130,14 @@ public class CustomerController extends CommonController {
*/
public
String
saveCustomer
()
{
SDO
sdo
=
getSDO
();
Customer
Vo
customerVo
=
sdo
.
toObject
(
CustomerV
o
.
class
);
Customer
Dto
customerDto
=
sdo
.
toObject
(
CustomerDt
o
.
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
);
customerVo
=
customerApplication
.
saveCustomer
(
customerVo
,
customerContactList
,
baoshenEmailList
,
customerEmailList
,
customerRelatedList
,
customerPayInfoList
);
return
success
(
customerVo
);
customerDto
=
customerApplication
.
saveCustomer
(
customerDto
,
customerContactList
,
baoshenEmailList
,
customerEmailList
,
customerRelatedList
,
customerPayInfoList
);
return
success
(
customerDto
);
}
...
...
@@ -147,8 +147,8 @@ public class CustomerController extends CommonController {
CustomerVo
customerVo
=
sdo
.
toObject
(
CustomerVo
.
class
);
List
<
CustomerContact
>
customerContactList
=
sdo
.
getList
(
"contactList"
,
CustomerContact
.
class
);
CustomerContact
customerContact
=
customerContactList
.
get
(
0
);
CustomerDto
c
ustomerDto
=
sapCustomerApplication
.
submitCustomerToSAP
(
customerVo
,
customerContact
);
return
JSONUtil
.
toString
(
c
ustomerDto
);
SapCustomerDto
sapC
ustomerDto
=
sapCustomerApplication
.
submitCustomerToSAP
(
customerVo
,
customerContact
);
return
JSONUtil
.
toString
(
sapC
ustomerDto
);
}
// /**
...
...
topsun/src/main/java/com/huigou/topsun/customer/domain/dto/CustomerDto.java
0 → 100644
View file @
2dbfb7d7
package
com
.
huigou
.
topsun
.
customer
.
domain
.
dto
;
import
com.alibaba.fastjson.JSON
;
import
com.huigou.topsun.customer.domain.Customer
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.util.Date
;
@Data
public
class
CustomerDto
implements
Serializable
{
/**
* 客户id
*/
private
String
customerId
;
/**
* 客户编码
*/
private
String
customerCode
;
/**
* 客户全称
*/
private
String
customerName
;
/**
* 客户简称
*/
private
String
customerShortName
;
/**
* 客户工作时间
*/
private
Date
customerWorkTime
;
/**
* 客户英文名称
*/
private
String
customerEnName
;
/**
* 客户英文名称简称
*/
private
String
customerEnShortName
;
/**
* 省份编码
*/
private
String
provinceCode
;
/**
* 一级省份编码
*/
private
String
primaryProvinceCode
;
/**
* 二级省份编码
*/
private
String
secondProvinceCode
;
/**
* 省份
*/
private
String
province
;
/**
* 地级市
*/
private
String
city
;
/**
* 区县
*/
private
String
county
;
// /**
// * 省份信息
// */
// private String provinceInfo;
/**
* 客户等级
*/
private
String
customerLevel
;
/**
* 工厂代号
*/
private
String
customerFactoryCode
;
/**
* 地址
*/
private
String
customerAddress
;
/**
* 所属集团
*/
private
String
customerGroup
;
/**
* 邮编
*/
private
String
customerZipCode
;
/**
* 开户银行id
*/
private
String
customerBankId
;
/**
* 开户银行
*/
private
String
customerBankDeposit
;
/**
* 银行账号
*/
private
String
customerAccountNo
;
/**
* 户名
*/
private
String
customerAccountName
;
/**
* 公司法人
*/
private
String
customerCorporation
;
/**
* 工商注册号
*/
private
String
businessRegistrationNumber
;
/**
* 国税注册号
*/
private
String
nationalTaxRegistrationNumber
;
/**
* 客户订单信息id
*/
private
String
customerOrderId
;
/**
* 请款要求
*/
private
String
paymentRequest
;
/**
* 扣款百分比
*/
private
Integer
deduction
;
/**
* 是否要求签回货单
*/
private
String
signedBack
;
/**
* 是否用客户系统货单
*/
private
String
customerSysOrder
;
/**
* 报价币别(currency)
*/
private
String
quotationCurrency
;
/**
* 金额小数位数
*/
private
Integer
decimalPlaces
;
/**
* 签回方式(signedStyle)
*/
private
String
signedStyle
;
/**
* 月结方式(monthlySettlementMethod)
*/
private
String
monthlySettlementMethod
;
/**
* 做账难度等级(accountDifficultLevel)
*/
private
String
accountDifficultLevel
;
/**
* 盖章方式(stampMethod)
*/
private
String
stampMethod
;
/**
* 请款联(paymentRequestForm)
*/
private
String
paymentRequestForm
;
/**
* 客户联(customerReceipt)
*/
private
String
customerReceipt
;
/**
* 订单性质(orderKind)
*/
private
String
orderKind
;
/**
* 品牌
*/
private
String
customerBrand
;
/**
* 收货方签字要求
*/
private
String
receiverSignatureRequire
;
/**
* 出货方式(shipMethod)
*/
private
String
shipMethod
;
/**
* 路线(route)
*/
private
String
route
;
/**
* 备注
*/
private
String
remark
;
/**
* 订单要求(orderRequire)
*/
private
String
orderRequire
;
/**
* 验收要求
*/
private
String
acceptanceRequire
;
/**
* 客户系统验收要求
*/
private
String
customerSysAcceptanceRequire
;
/**
* 做账截止日期
*/
private
Integer
accountDeadline
;
/**
* 客户收账单截止日
*/
private
Integer
customerCollectionDeadline
;
/**
* 订单统计异常期限
*/
private
Integer
orderAbnormalDeadline
;
/**
* 送货单统计异常期限
*/
private
Integer
shipAbnormalDeadline
;
/**
* 请款期限
*/
private
Integer
paymentDeadline
;
/**
* 产品检验报告类型(productInspectionReportType)
*/
private
String
productInspectionReportType
;
/**
* 货单打印要求(shipPrintRequire)
*/
private
String
shipPrintRequire
;
/**
* 货单是否打印送货日期
*/
private
String
isPrintDeliveryDate
;
/**
* 是否开发票
*/
private
String
needInvoice
;
/**
* 生产发货方式(productionDeliveryMethod)
*/
private
String
productionDeliveryMethod
;
public
String
getCustomerId
()
{
return
customerId
;
}
public
static
CustomerDto
getCustomerDto
(
Customer
customer
){
return
JSON
.
parseObject
(
JSON
.
toJSONString
(
customer
),
CustomerDto
.
class
);
}
public
static
Customer
getCustomer
(
CustomerDto
customerDto
){
return
JSON
.
parseObject
(
JSON
.
toJSONString
(
customerDto
),
Customer
.
class
);
}
}
topsun/src/main/java/com/huigou/topsun/customer/domain/
sap/
CustomerDto.java
→
topsun/src/main/java/com/huigou/topsun/customer/domain/
dto/Sap
CustomerDto.java
View file @
2dbfb7d7
package
com
.
huigou
.
topsun
.
customer
.
domain
.
sap
;
package
com
.
huigou
.
topsun
.
customer
.
domain
.
dto
;
import
lombok.Data
;
@Data
public
class
CustomerDto
{
public
class
Sap
CustomerDto
{
/**
* 账目组
*/
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment