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
afd95b1e
Commit
afd95b1e
authored
Dec 27, 2023
by
wanghang
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev' into dev
parents
d48aa997
a0cab296
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
570 additions
and
70 deletions
+570
-70
listeningFromData.js
...xt/src/main/webapp/biz/topsun/common/listeningFromData.js
+4
-0
customerDetail.js
...-xt/src/main/webapp/biz/topsun/customer/customerDetail.js
+14
-0
customerDetail.jsp
...xt/src/main/webapp/biz/topsun/customer/customerDetail.jsp
+71
-17
productDetail.js
...un-xt/src/main/webapp/biz/topsun/product/productDetail.js
+4
-3
CustomerBaseInfoApplication.java
...sun/customer/application/CustomerBaseInfoApplication.java
+3
-0
CustomerApplicationImpl.java
...un/customer/application/Impl/CustomerApplicationImpl.java
+13
-1
CustomerBaseInfoApplicationImpl.java
...mer/application/Impl/CustomerBaseInfoApplicationImpl.java
+10
-14
CustomerController.java
...huigou/topsun/customer/controller/CustomerController.java
+15
-12
CustomerOrder.java
...java/com/huigou/topsun/customer/domain/CustomerOrder.java
+216
-0
CustomerVo.java
...java/com/huigou/topsun/customer/domain/vo/CustomerVo.java
+163
-0
CustomerOrderRepository.java
...u/topsun/customer/repository/CustomerOrderRepository.java
+8
-0
ProductApplicationImpl.java
...psun/product/application/impl/ProductApplicationImpl.java
+14
-7
ProductDetail.java
.../java/com/huigou/topsun/product/domain/ProductDetail.java
+8
-8
ProductFace.java
...in/java/com/huigou/topsun/product/domain/ProductFace.java
+16
-1
ProductFaceColor.java
...va/com/huigou/topsun/product/domain/ProductFaceColor.java
+6
-6
ProductFaceColorRepository.java
...topsun/product/repository/ProductFaceColorRepository.java
+2
-1
ProductFaceRepository.java
...igou/topsun/product/repository/ProductFaceRepository.java
+3
-0
No files found.
topsun-xt/src/main/webapp/biz/topsun/common/listeningFromData.js
View file @
afd95b1e
...
...
@@ -54,6 +54,10 @@ function mapping(dataMapping, rawData) {
return
;
}
let
listMap
=
{},
ids
=
[],
rowId
=
''
;
//tryForEach 变量作用域注意
if
(
!
entityData
instanceof
Array
)
{
console
.
error
(
"映射配置的是 Grid, 传入数据类型是 Form。 请检查: "
+
beanName
);
return
;
}
entityData
.
forEach
(
rowData
=>
{
rowId
=
rowData
[
propertyNames
.
id
];
rowData
[
'rowIndex'
]
=
rowId
;
...
...
topsun-xt/src/main/webapp/biz/topsun/customer/customerDetail.js
View file @
afd95b1e
...
...
@@ -6,6 +6,7 @@ var customerPayInfoGridManager = null;
$
(
document
).
ready
(
function
()
{
initializeTab
();
initializeUI
();
initializeSelectMethod
();
loadContactListGrid
();
bindEvent
();
loadBaoshenEmailListGrid
();
...
...
@@ -24,6 +25,19 @@ function initializeTab() {
$
(
'#emailTab'
).
tab
()
}
function
initializeSelectMethod
()
{
$
(
'#selectedMonthlySettlementMethod'
).
searchbox
({
type
:
"monthlySettlementMethod"
,
name
:
"monthlySettlementMethodApplyCode"
,
onChange
:
function
(
value
,
data
)
{
$
(
'#selectedMonthlySettlementMethod'
).
val
(
data
.
method
)
}
})
}
function
loadContactListGrid
()
{
//增删改控件
...
...
topsun-xt/src/main/webapp/biz/topsun/customer/customerDetail.jsp
View file @
afd95b1e
...
...
@@ -41,28 +41,82 @@
<div
class=
"layout"
id=
"customerBaseInfoDiv"
>
<x:hidden
name=
"customerId"
/>
<x:hidden
name=
"customerBankId"
/>
<x:hidden
name=
"customerOrderId"
/>
<x:inputC
name=
"customerCode"
label=
"客户编码"
labelCol=
"1"
fieldCol=
"2"
/>
<x:inputC
name=
"customerName"
label=
"客户全称"
labelCol=
"1"
fieldCol=
"2"
/>
<x:inputC
name=
"customerShortName"
label=
"客户简称"
labelCol=
"1"
fieldCol=
"2"
/>
<x:inputC
name=
"customerName"
label=
"客户全称"
required=
"true"
labelCol=
"1"
fieldCol=
"2"
/>
<x:inputC
name=
"paymentRequest"
label=
"请款要求"
labelCol=
"1"
fieldCol=
"2"
/>
<x:inputC
name=
"customerShortName"
label=
"客户简称"
required=
"true"
labelCol=
"1"
fieldCol=
"2"
/>
<x:inputC
name=
"customerWorkTime"
label=
"客户工作时间"
wrapper=
"dateTime"
labelCol=
"1"
fieldCol=
"2"
/>
<x:inputC
name=
"customerEnName"
label=
"英文名称"
labelCol=
"1"
fieldCol=
"2"
/>
<x:inputC
name=
"customerEnName"
label=
"英文名称"
labelCol=
"1"
required=
"true"
fieldCol=
"2"
/>
<x:inputC
name=
"customerEnShortName"
label=
"英文名简称"
labelCol=
"1"
fieldCol=
"2"
/>
<x:inputC
name=
"provinceInfo"
label=
"所属地区"
maxLength=
"32"
labelCol=
"1"
fieldCol=
"2"
readonly=
"true"
/>
<x:inputC
name=
"provinceInfo"
label=
"所属地区"
maxLength=
"32"
labelCol=
"1"
fieldCol=
"2"
readonly=
"true"
/>
<x:hidden
name=
"provinceCode"
></x:hidden>
<x:selectC
name=
"customerLevel"
label=
"客户等级"
dictionary=
"customerLevel"
labelCol=
"1"
fieldCol=
"2"
/>
<x:inputC
name=
"customerFactoryCode"
label=
"工厂代号"
maxLength=
"32"
labelCol=
"1"
fieldCol=
"2"
/>
<x:inputC
name=
"customerAddress"
label=
"地址"
maxLength=
"32"
labelCol=
"1"
fieldCol=
"2"
/>
<x:inputC
name=
"customerGroup"
label=
"所属集团"
maxLength=
"32"
labelCol=
"1"
fieldCol=
"2"
/>
<x:inputC
name=
"customerZipCode"
label=
"邮编"
maxLength=
"32"
labelCol=
"1"
fieldCol=
"2"
/>
<x:inputC
name=
"customerBankDeposit"
label=
"开户银行"
maxLength=
"32"
labelCol=
"1"
fieldCol=
"2"
/>
<x:inputC
name=
"customerAccountNo"
label=
"银行账户"
maxLength=
"32"
labelCol=
"1"
fieldCol=
"2"
/>
<x:inputC
name=
"customerAccountName"
label=
"户名"
maxLength=
"32"
labelCol=
"1"
fieldCol=
"2"
/>
<x:inputC
name=
"customerCorporation"
label=
"公司法人"
maxLength=
"32"
labelCol=
"1"
fieldCol=
"2"
/>
<x:inputC
name=
"businessRegistrationNumber"
label=
"工商注册号"
maxLength=
"32"
labelCol=
"1"
fieldCol=
"2"
/>
<x:inputC
name=
"nationalTaxRegistrationNumber"
label=
"国税注册号"
maxLength=
"32"
labelCol=
"1"
fieldCol=
"2"
/>
<x:inputC
name=
"deduction"
label=
"扣款百分比"
maxLength=
"32"
labelCol=
"1"
fieldCol=
"2"
/>
<x:selectC
name=
"signedBack"
label=
"是否要求签回货单"
dictionary=
"signedBack"
labelCol=
"1"
fieldCol=
"2"
/>
<x:selectC
name=
"customerSysOrder"
label=
"是否用客户系统货单"
dictionary=
"customerSysOrder"
labelCol=
"1"
fieldCol=
"2"
/>
<x:selectC
name=
"quotationCurrency"
label=
"报价币别"
dictionary=
"currency"
labelCol=
"1"
fieldCol=
"2"
/>
<x:inputC
name=
"decimalPlaces"
label=
"金额小数位数"
labelCol=
"1"
fieldCol=
"2"
/>
<x:inputC
name=
"customerFactoryCode"
label=
"工厂代号"
labelCol=
"1"
fieldCol=
"2"
/>
<x:inputC
name=
"signedStyle"
label=
"签回方式"
required=
"true"
labelCol=
"1"
fieldCol=
"2"
/>
<x:inputC
name=
"monthlySettlementMethod"
label=
"月结方式"
id=
"selectedMonthlySettlementMethod"
wrapper=
"select"
labelCol=
"1"
fieldCol=
"2"
/>
<x:inputC
name=
"customerZipCode"
label=
"邮编"
labelCol=
"1"
fieldCol=
"2"
/>
<%--后续添加数据字典--%>
<x:inputC
name=
"accountDifficultLevel"
label=
"做账难度等级"
labelCol=
"1"
fieldCol=
"2"
/>
<x:inputC
name=
"customerBankDeposit"
label=
"开户银行"
labelCol=
"1"
fieldCol=
"2"
/>
<x:inputC
name=
"customerAccountNo"
label=
"银行账户"
labelCol=
"1"
fieldCol=
"2"
/>
<x:selectC
name=
"stampMethod"
label=
"盖章方式"
required=
"true"
dictionary=
"stampMethod"
labelCol=
"1"
fieldCol=
"2"
/>
<x:inputC
name=
"customerAccountName"
label=
"户名"
labelCol=
"1"
fieldCol=
"2"
/>
<x:inputC
name=
"customerCorporation"
label=
"公司法人"
labelCol=
"1"
fieldCol=
"2"
/>
<x:selectC
name=
"paymentRequestForm"
label=
"请款联"
dictionary=
"paymentRequestFrom"
required=
"true"
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=
"customerReceipt"
label=
"客户联"
required=
"true"
dictionary=
"customerReceipt"
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"
/>
<x:inputC
name=
"customerGroup"
label=
"所属集团"
labelCol=
"1"
fieldCol=
"2"
/>
<x:inputC
name=
"receiverSignatureRequire"
label=
"收货方签字要求"
required=
"true"
labelCol=
"1"
fieldCol=
"2"
/>
<x:selectC
name=
"shipMethod"
label=
"出货方式"
required=
"true"
dictionary=
"shipMethod"
labelCol=
"1"
fieldCol=
"2"
/>
<x:selectC
name=
"route"
label=
"路线"
required=
"true"
dictionary=
"route"
labelCol=
"1"
fieldCol=
"2"
/>
<x:inputC
name=
"remark"
label=
"备注"
labelCol=
"1"
fieldCol=
"2"
/>
<%--后续添加数据字典--%>
<x:inputC
name=
"orderRequire"
label=
"订单要求"
required=
"true"
labelCol=
"1"
fieldCol=
"2"
/>
<%--后续添加数据字典--%>
<x:inputC
name=
"acceptanceRequire"
label=
"验收单要求"
required=
"true"
labelCol=
"1"
fieldCol=
"2"
/>
<%--后续添加数据字典--%>
<x:inputC
name=
"customerSysAcceptanceRequire"
label=
"客户系统验收要求"
required=
"true"
labelCol=
"1"
fieldCol=
"2"
/>
<x:inputC
name=
"accountDeadline"
label=
"做账截止日"
required=
"true"
labelCol=
"1"
fieldCol=
"2"
/>
<x:inputC
name=
"customerCollectionDeadline"
label=
"客户收账单截止日"
required=
"true"
labelCol=
"1"
fieldCol=
"2"
/>
<x:inputC
name=
"orderAbnormalDeadline"
label=
"订单统计异常期限"
required=
"true"
labelCol=
"1"
fieldCol=
"2"
/>
<x:inputC
name=
"shipAbnormalDeadline"
label=
"送货单统计异常期限"
required=
"true"
labelCol=
"1"
fieldCol=
"2"
/>
<x:inputC
name=
"paymentDeadline"
label=
"请款期限"
required=
"true"
labelCol=
"1"
fieldCol=
"2"
/>
<x:selectC
name=
"productInspectionReportType"
label=
"产品检验报告类型"
dictionary=
"productInspectionReportType"
labelCol=
"1"
fieldCol=
"2"
/>
<%--后续添加数据字典--%>
<x:inputC
name=
"shipPrintRequire"
label=
"货单打印要求"
required=
"true"
labelCol=
"1"
fieldCol=
"2"
/>
<x:selectC
name=
"isPrintDeliveryDate"
label=
"货单是否打印送货日期"
dictionary=
"productInspectionReportType"
labelCol=
"1"
fieldCol=
"2"
/>
<%--后续添加数据字典--%>
<x:inputC
name=
"needInvoice"
label=
"是否开发票"
labelCol=
"1"
fieldCol=
"2"
/>
<%--后续添加数据字典--%>
<x:inputC
name=
"productionDeliveryMethod"
label=
"生产交货方式"
labelCol=
"1"
fieldCol=
"2"
/>
<div
id=
"contact"
position=
"center"
>
<x:title
title=
"联系人列表"
name=
"group"
/>
<div
id=
"contactListGrid"
style=
"margin: 2px;"
>
...
...
topsun-xt/src/main/webapp/biz/topsun/product/productDetail.js
View file @
afd95b1e
...
...
@@ -162,7 +162,7 @@ var dataMapping = {
"modulus"
,
"columnNum"
,
"rowNum"
,
"contactNum"
,
"columnDoubleBlade"
,
"rowDoubleBlade"
,
"dispatchMultiple"
,
"sheetLength"
,
"sheetWidth"
,
"productSheetConf"
],
productFace
:
{
frontFaces
:
{
id
:
"productFaceId"
,
columns
:
[
"productFaceId"
,
"productImage"
]
},
...
...
@@ -187,6 +187,7 @@ var dataMapping = {
function
faceGrid
(
elId
,
data
)
{
var
toolbarOptions
=
UICtrl
.
getDefaultToolbarOptions
({
addHandler
:
function
(
rawData
){
debugger
;
},
updateHandler
:
function
(){
updateHandler
();
...
...
@@ -209,8 +210,8 @@ function faceGrid(elId, data) {
enabledEdit
:
true
,
checkbox
:
true
,
usePager
:
false
,
width
:
"
100
%"
,
height
:
150
,
width
:
"
98
%"
,
height
:
"98%"
,
onBeforeEdit
:
function
(
editParm
,
gg
)
{
console
.
log
(
'original run onBeforeEdit()'
);
},
...
...
topsun/src/main/java/com/huigou/topsun/customer/application/CustomerBaseInfoApplication.java
View file @
afd95b1e
...
...
@@ -2,6 +2,7 @@ package com.huigou.topsun.customer.application;
import
com.huigou.topsun.customer.domain.CustomerBank
;
import
com.huigou.topsun.customer.domain.CustomerContact
;
import
com.huigou.topsun.customer.domain.CustomerOrder
;
import
com.huigou.topsun.customer.domain.Province
;
import
com.huigou.topsun.customer.domain.vo.CustomerVo
;
...
...
@@ -21,4 +22,6 @@ public interface CustomerBaseInfoApplication {
List
<
CustomerContact
>
findCustomerContactByCustomerId
(
String
customerId
);
void
deleteByCustomerId
(
String
customerId
);
CustomerOrder
findCustomerOrderByCustomerId
(
String
customerId
);
}
topsun/src/main/java/com/huigou/topsun/customer/application/Impl/CustomerApplicationImpl.java
View file @
afd95b1e
...
...
@@ -15,7 +15,7 @@ import org.springframework.stereotype.Service;
import
org.springframework.transaction.annotation.Propagation
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -45,6 +45,8 @@ public class CustomerApplicationImpl extends BaseApplication implements Customer
private
CustomerPayInfoRepository
customerPayInfoRepository
;
@Autowired
private
CustomerPayInfoApplication
customerPayInfoApplication
;
@Autowired
private
CustomerOrderRepository
customerOrderRepository
;
/**
...
...
@@ -112,10 +114,13 @@ public class CustomerApplicationImpl extends BaseApplication implements Customer
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
);
CustomerBank
saveCustomerBank
=
customerBankRepository
.
saveAndFlush
(
customerBank
);
customerOrder
.
setCustomerId
(
customerId
);
CustomerOrder
saveCustomerOrder
=
customerOrderRepository
.
saveAndFlush
(
customerOrder
);
customerContactList
.
forEach
(
customerContact
->
{
customerContact
.
setCustomerId
(
customerId
);
customerContactRepository
.
saveAndFlush
(
customerContact
);
...
...
@@ -145,6 +150,7 @@ public class CustomerApplicationImpl extends BaseApplication implements Customer
CustomerVo
saveCustomerVo
=
new
CustomerVo
();
BeanUtils
.
copyProperties
(
saveCustomer
,
saveCustomerVo
);
BeanUtils
.
copyProperties
(
saveCustomerBank
,
saveCustomerVo
);
BeanUtils
.
copyProperties
(
saveCustomerOrder
,
saveCustomerVo
);
return
saveCustomerVo
;
}
...
...
@@ -174,4 +180,10 @@ public class CustomerApplicationImpl extends BaseApplication implements Customer
BeanUtils
.
copyProperties
(
customerVo
,
customerBank
);
return
customerBank
;
}
public
CustomerOrder
getCustomerOrder
(
CustomerVo
customerVo
)
{
CustomerOrder
customerOrder
=
new
CustomerOrder
();
BeanUtils
.
copyProperties
(
customerVo
,
customerOrder
);
return
customerOrder
;
}
}
topsun/src/main/java/com/huigou/topsun/customer/application/Impl/CustomerBaseInfoApplicationImpl.java
View file @
afd95b1e
...
...
@@ -4,10 +4,7 @@ import com.huigou.data.query.model.QueryDescriptor;
import
com.huigou.topsun.customer.application.CustomerBaseInfoApplication
;
import
com.huigou.topsun.customer.domain.*
;
import
com.huigou.topsun.customer.domain.vo.CustomerVo
;
import
com.huigou.topsun.customer.repository.CustomerBankRepository
;
import
com.huigou.topsun.customer.repository.CustomerContactRepository
;
import
com.huigou.topsun.customer.repository.CustomerRepository
;
import
com.huigou.topsun.customer.repository.ProvinceRepository
;
import
com.huigou.topsun.customer.repository.*
;
import
com.huigou.uasp.bmp.common.application.BaseApplication
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -28,6 +25,8 @@ public class CustomerBaseInfoApplicationImpl extends BaseApplication implements
private
CustomerBankRepository
customerBankRepository
;
@Autowired
private
CustomerContactRepository
customerContactRepository
;
@Autowired
private
CustomerOrderRepository
customerOrderRepository
;
@Override
...
...
@@ -89,16 +88,13 @@ public class CustomerBaseInfoApplicationImpl extends BaseApplication implements
this
.
sqlExecutorDao
.
executeUpdate
(
queryDescriptor
.
getSql
(),
customerId
);
}
// /**
// * @param provinceCode
// * @return provinceList
// */
// @Override
// public Province findByProvinceParentId(String provinceCode) {
//
// Province province = provinceRepository.findByProvinceParentId(provinceCode);
// return province;
// }
@Override
public
CustomerOrder
findCustomerOrderByCustomerId
(
String
customerId
)
{
CustomerOrder
customerOrder
=
customerOrderRepository
.
findCustomerBankByCustomerId
(
customerId
);
return
customerOrder
;
}
}
topsun/src/main/java/com/huigou/topsun/customer/controller/CustomerController.java
View file @
afd95b1e
...
...
@@ -76,9 +76,13 @@ public class CustomerController extends CommonController {
CustomerVo
customerVo
=
loadCustomerDetail
();
CustomerBank
customerBank
=
loadCustomerBank
();
CustomerOrder
customerOrder
=
loadCustomerOrder
();
if
(
customerBank
!=
null
)
{
BeanUtils
.
copyProperties
(
customerBank
,
customerVo
);
}
if
(
customerOrder
!=
null
)
{
BeanUtils
.
copyProperties
(
customerOrder
,
customerVo
);
}
return
forward
(
"customerDetail"
,
customerVo
);
}
...
...
@@ -91,19 +95,7 @@ public class CustomerController extends CommonController {
return
forward
(
"customerDetail"
);
}
/**
* 根据id列表删除用户
*
* @return
*/
public
String
deleteCustomer
()
{
SDO
sdo
=
getSDO
();
List
<
String
>
ids
=
sdo
.
getIds
();
//TODO
//删除操作
return
success
();
}
/**
* 保存客户信息(多表保存,添加事务)
...
...
@@ -168,6 +160,17 @@ public class CustomerController extends CommonController {
return
customerBank
;
}
/**
* 加载订单信息
* @return
*/
public
CustomerOrder
loadCustomerOrder
()
{
SDO
sdo
=
getSDO
();
String
customerId
=
sdo
.
getString
(
"customerId"
);
CustomerOrder
customerOrder
=
customerBaseInfoApplication
.
findCustomerOrderByCustomerId
(
customerId
);
return
customerOrder
;
}
/**
* 根据id列表删除联系人
*
...
...
topsun/src/main/java/com/huigou/topsun/customer/domain/CustomerOrder.java
0 → 100644
View file @
afd95b1e
package
com
.
huigou
.
topsun
.
customer
.
domain
;
import
java.io.Serializable
;
import
javax.persistence.*
;
import
lombok.Data
;
import
org.hibernate.annotations.GenericGenerator
;
/**
* 客户订单信息
* @TableName customer_order
*/
@Table
(
name
=
"customer_order"
)
@Entity
@Data
public
class
CustomerOrder
implements
Serializable
{
/**
* 客户订单信息
*/
@Id
@GeneratedValue
(
generator
=
"system-uuid"
)
@GenericGenerator
(
name
=
"system-uuid"
,
strategy
=
"guid"
)
@Column
(
name
=
"customer_order_id"
)
private
String
customerOrderId
;
/**
* 客户id
*/
@Column
(
name
=
"customer_id"
)
private
String
customerId
;
/**
* 请款要求
*/
@Column
(
name
=
"payment_request"
)
private
String
paymentRequest
;
/**
* 扣款百分比
*/
private
Integer
deduction
;
/**
* 是否要求签回货单
*/
@Column
(
name
=
"signed_back"
)
private
String
signedBack
;
/**
* 是否用客户系统货单
*/
@Column
(
name
=
"customer_sys_order"
)
private
String
customerSysOrder
;
/**
* 报价币别(currency)
*/
@Column
(
name
=
"quotation_currency"
)
private
String
quotationCurrency
;
/**
* 金额小数位数
*/
@Column
(
name
=
"decimal_places"
)
private
Integer
decimalPlaces
;
/**
* 签回方式(signedStyle)
*/
@Column
(
name
=
"signed_style"
)
private
String
signedStyle
;
/**
* 月结方式(monthlySettlementMethod)
*/
@Column
(
name
=
"monthly_settlement_method"
)
private
String
monthlySettlementMethod
;
/**
* 做账难度等级(accountDifficultLevel)
*/
@Column
(
name
=
"account_difficult_level"
)
private
String
accountDifficultLevel
;
/**
* 盖章方式(stampMethod)
*/
@Column
(
name
=
"stamp_method"
)
private
String
stampMethod
;
/**
* 请款联(paymentRequestForm)
*/
@Column
(
name
=
"payment_request_form"
)
private
String
paymentRequestForm
;
/**
* 客户联(customerReceipt)
*/
@Column
(
name
=
"customer_receipt"
)
private
String
customerReceipt
;
/**
* 订单性质(orderKind)
*/
@Column
(
name
=
"order_kind"
)
private
String
orderKind
;
/**
* 品牌
*/
@Column
(
name
=
"customer_brand"
)
private
String
customerBrand
;
/**
* 收货方签字要求
*/
@Column
(
name
=
"receiver_signature_require"
)
private
String
receiverSignatureRequire
;
/**
* 出货方式(shipMethod)
*/
@Column
(
name
=
"ship_method"
)
private
String
shipMethod
;
/**
* 路线(route)
*/
private
String
route
;
/**
* 备注
*/
private
String
remark
;
/**
* 订单要求(orderRequire)
*/
@Column
(
name
=
"order_require"
)
private
String
orderRequire
;
/**
* 验收要求
*/
@Column
(
name
=
"acceptance_require"
)
private
String
acceptanceRequire
;
/**
* 客户系统验收要求
*/
@Column
(
name
=
"customer_sys_acceptance_require"
)
private
String
customerSysAcceptanceRequire
;
/**
* 做账截止日期
*/
@Column
(
name
=
"account_deadline"
)
private
Integer
accountDeadline
;
/**
* 客户收账单截止日
*/
@Column
(
name
=
"customer_collection_deadline"
)
private
Integer
customerCollectionDeadline
;
/**
* 订单统计异常期限
*/
@Column
(
name
=
"order_abnormal_deadline"
)
private
Integer
orderAbnormalDeadline
;
/**
* 送货单统计异常期限
*/
@Column
(
name
=
"ship_abnormal_deadline"
)
private
Integer
shipAbnormalDeadline
;
/**
* 请款期限
*/
@Column
(
name
=
"payment_deadline"
)
private
Integer
paymentDeadline
;
/**
* 产品检验报告类型(productInspectionReportType)
*/
@Column
(
name
=
"product_inspection_report_type"
)
private
String
productInspectionReportType
;
/**
* 货单打印要求(shipPrintRequire)
*/
@Column
(
name
=
"ship_print_require"
)
private
String
shipPrintRequire
;
/**
* 货单是否打印送货日期
*/
@Column
(
name
=
"is_print_delivery_date"
)
private
String
isPrintDeliveryDate
;
/**
* 是否开发票
*/
@Column
(
name
=
"need_invoice"
)
private
String
needInvoice
;
/**
* 生产交货方式(productionDeliveryMethod)
*/
@Column
(
name
=
"production_delivery_method"
)
private
String
productionDeliveryMethod
;
private
static
final
long
serialVersionUID
=
1L
;
}
\ No newline at end of file
topsun/src/main/java/com/huigou/topsun/customer/domain/vo/CustomerVo.java
View file @
afd95b1e
...
...
@@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSON;
import
com.huigou.topsun.customer.domain.Customer
;
import
lombok.Data
;
import
javax.persistence.Column
;
import
java.io.Serializable
;
import
java.util.Date
;
...
...
@@ -114,6 +115,168 @@ public class CustomerVo implements Serializable {
*/
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
;
}
...
...
topsun/src/main/java/com/huigou/topsun/customer/repository/CustomerOrderRepository.java
0 → 100644
View file @
afd95b1e
package
com
.
huigou
.
topsun
.
customer
.
repository
;
import
com.huigou.topsun.customer.domain.CustomerOrder
;
import
org.springframework.data.jpa.repository.JpaRepository
;
public
interface
CustomerOrderRepository
extends
JpaRepository
<
CustomerOrder
,
String
>
{
CustomerOrder
findCustomerBankByCustomerId
(
String
customerId
);
}
topsun/src/main/java/com/huigou/topsun/product/application/impl/ProductApplicationImpl.java
View file @
afd95b1e
...
...
@@ -105,11 +105,12 @@ public class ProductApplicationImpl implements ProductApplication {
// --------------------------------- 版面查询 ---------------------------------
if
(
productDetail
!=
null
)
{
ArrayList
<
ProductFace
>
frontFaces
=
new
ArrayList
<>();
if
(
productDetail
.
getBackProductFaceId
()
!=
null
)
{
ProductFace
frontFace
=
faceRepository
.
findByProductFaceId
Equals
(
productDetail
.
getBackProductFaceId
());
ProductFace
frontFace
=
faceRepository
.
findByProductFaceId
(
productDetail
.
getBackProductFaceId
());
ArrayList
<
ProductFaceColor
>
fronColors
=
(
ArrayList
<
ProductFaceColor
>)
faceColorRepository
.
findByProductFaceId
(
productDetail
.
getBackProductFaceId
());
assemble
.
put
(
"frontFace"
,
frontFace
);
frontFaces
.
add
(
frontFace
);
assemble
.
put
(
"fronColors"
,
fronColors
==
null
?
new
ArrayList
<>()
:
fronColors
);
}
else
{
ProductFaceColor
fc
=
new
ProductFaceColor
();
...
...
@@ -120,10 +121,10 @@ public class ProductApplicationImpl implements ProductApplication {
assemble
.
put
(
"fronColors"
,
fronColors
);
}
if
(
productDetail
.
getBackProductFaceId
()
!=
null
)
{
ProductFace
backFace
=
faceRepository
.
findByProductFaceId
Equals
(
productDetail
.
getBackProductFaceId
());
ProductFace
backFace
=
faceRepository
.
findByProductFaceId
(
productDetail
.
getBackProductFaceId
());
ArrayList
<
ProductFaceColor
>
backColors
=
(
ArrayList
<
ProductFaceColor
>)
faceColorRepository
.
findByProductFaceId
(
productDetail
.
getBackProductFaceId
());
assemble
.
put
(
"backFace"
,
backFace
);
frontFaces
.
add
(
backFace
);
assemble
.
put
(
"backColors"
,
backColors
==
null
?
new
ArrayList
<>()
:
backColors
);
}
else
{
ProductFaceColor
fc
=
new
ProductFaceColor
();
...
...
@@ -133,6 +134,7 @@ public class ProductApplicationImpl implements ProductApplication {
fronColors
.
add
(
fc
);
assemble
.
put
(
"backColors"
,
fronColors
);
}
assemble
.
put
(
"frontFaces"
,
frontFaces
);
}
...
...
@@ -174,6 +176,7 @@ public class ProductApplicationImpl implements ProductApplication {
Product
product
=
objectMapper
.
convertValue
(
newData
.
get
(
"Product"
),
Product
.
class
);
ProductDetail
productDetail
=
objectMapper
.
convertValue
(
newData
.
get
(
"ProductDetail"
),
ProductDetail
.
class
);
ProductLooked
productLooked
=
objectMapper
.
convertValue
(
newData
.
get
(
"ProductLooked"
),
ProductLooked
.
class
);
ProductFace
productFace
=
objectMapper
.
convertValue
(
newData
.
get
(
"frontFace"
),
ProductFace
.
class
);
ProductTechnology
productTechnology
=
objectMapper
.
convertValue
(
newData
.
get
(
"ProductTechnology"
),
ProductTechnology
.
class
);
ProductPublishedConf
productPublishedConf
=
objectMapper
.
convertValue
(
newData
.
get
(
"ProductPublishedConf"
),
...
...
@@ -198,6 +201,7 @@ public class ProductApplicationImpl implements ProductApplication {
entitys
.
add
(
mergedMap
);
entitys
.
add
(
product
);
entitys
.
add
(
productDetail
);
entitys
.
add
(
productFace
);
entitys
.
add
(
productLooked
);
entitys
.
add
(
productTechnology
);
entitys
.
add
(
productPublishedConf
);
...
...
@@ -208,10 +212,13 @@ public class ProductApplicationImpl implements ProductApplication {
entityManager
.
flush
();
String
str
=
null
;
str
.
length
();
//
String str = null;
//
str.length();
return
null
;
HashMap
<
String
,
Object
>
map
=
new
HashMap
<>(
5
);
map
.
put
(
"save"
,
"ok"
);
return
map
;
}
@SuppressWarnings
(
"unchecked"
)
...
...
topsun/src/main/java/com/huigou/topsun/product/domain/ProductDetail.java
View file @
afd95b1e
...
...
@@ -66,14 +66,14 @@ public class ProductDetail implements Serializable {
/**
* 产品背面ID
*/
@Column
(
name
=
"back_product_face_id"
,
nullable
=
true
,
length
=
32
)
private
String
backProductFaceId
;
@Column
(
name
=
"back_product_face_id"
,
nullable
=
true
)
private
BigDecimal
backProductFaceId
;
/**
* 产品正面ID
*/
@Column
(
name
=
"right_product_face_id"
,
nullable
=
true
,
length
=
32
)
private
String
rightProductFaceId
;
@Column
(
name
=
"right_product_face_id"
,
nullable
=
true
)
private
BigDecimal
rightProductFaceId
;
/**
* 产品承印物
...
...
@@ -190,20 +190,20 @@ public class ProductDetail implements Serializable {
this
.
productShortName
=
productShortName
;
}
public
String
getBackProductFaceId
()
{
public
BigDecimal
getBackProductFaceId
()
{
return
this
.
backProductFaceId
;
}
public
void
setBackProductFaceId
(
String
backProductFaceId
)
{
this
.
backProductFaceId
=
backProductFaceId
;
this
.
backProductFaceId
=
(
backProductFaceId
==
null
)
||
backProductFaceId
.
isEmpty
()
?
null
:
new
BigDecimal
(
backProductFaceId
)
;
}
public
String
getRightProductFaceId
()
{
public
BigDecimal
getRightProductFaceId
()
{
return
this
.
rightProductFaceId
;
}
public
void
setRightProductFaceId
(
String
rightProductFaceId
)
{
this
.
rightProductFaceId
=
rightProductFaceId
;
this
.
rightProductFaceId
=
(
rightProductFaceId
==
null
)
||
rightProductFaceId
.
isEmpty
()
?
null
:
new
BigDecimal
(
rightProductFaceId
)
;
}
public
String
getProductSubstrate
()
{
...
...
topsun/src/main/java/com/huigou/topsun/product/domain/ProductFace.java
View file @
afd95b1e
...
...
@@ -4,6 +4,8 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import
com.fasterxml.jackson.annotation.JsonInclude
;
import
com.fasterxml.jackson.databind.annotation.JsonSerialize
;
import
com.huigou.topsun.common.NumberToStringSerializer
;
import
org.apache.commons.lang.builder.EqualsBuilder
;
import
org.apache.commons.lang.builder.HashCodeBuilder
;
import
javax.persistence.Column
;
import
javax.persistence.Entity
;
...
...
@@ -35,7 +37,20 @@ public class ProductFace implements Serializable {
*/
@Column
(
name
=
"product_image"
,
nullable
=
true
,
length
=
512
)
private
String
productImage
;
@Override
public
boolean
equals
(
Object
o
)
{
if
(
this
==
o
)
return
true
;
if
(
o
==
null
||
getClass
()
!=
o
.
getClass
())
return
false
;
ProductFace
that
=
(
ProductFace
)
o
;
return
new
EqualsBuilder
().
append
(
productFaceId
,
that
.
productFaceId
).
append
(
productImage
,
that
.
productImage
).
isEquals
();
}
@Override
public
int
hashCode
()
{
return
new
HashCodeBuilder
(
17
,
37
).
append
(
productFaceId
).
append
(
productImage
).
toHashCode
();
}
public
BigDecimal
getProductFaceId
()
{
return
this
.
productFaceId
;
}
...
...
topsun/src/main/java/com/huigou/topsun/product/domain/ProductFaceColor.java
View file @
afd95b1e
...
...
@@ -34,13 +34,13 @@ public class ProductFaceColor implements Serializable {
* 产品版面ID
*/
@Column
(
name
=
"product_face_id"
,
nullable
=
true
,
length
=
32
)
private
String
productFaceId
;
private
BigDecimal
productFaceId
;
/**
* 颜色ID
*/
@Column
(
name
=
"color_id"
,
nullable
=
true
,
length
=
32
)
private
String
colorId
;
private
BigDecimal
colorId
;
/**
* 覆盖率(单位%)
...
...
@@ -62,20 +62,20 @@ public class ProductFaceColor implements Serializable {
this
.
productFaceColorId
=
(
productFaceColorId
==
null
)
||
productFaceColorId
.
isEmpty
()
?
null
:
new
BigDecimal
(
productFaceColorId
);
}
public
String
getProductFaceId
()
{
public
BigDecimal
getProductFaceId
()
{
return
this
.
productFaceId
;
}
public
void
setProductFaceId
(
String
productFaceId
)
{
this
.
productFaceId
=
productFaceId
;
this
.
productFaceId
=
(
productFaceId
==
null
)
||
productFaceId
.
isEmpty
()
?
null
:
new
BigDecimal
(
productFaceId
)
;
}
public
String
getColorId
()
{
public
BigDecimal
getColorId
()
{
return
this
.
colorId
;
}
public
void
setColorId
(
String
colorId
)
{
this
.
colorId
=
colorId
;
this
.
colorId
=
(
colorId
==
null
)
||
colorId
.
isEmpty
()
?
null
:
new
BigDecimal
(
colorId
)
;
}
public
Double
getCoverageRate
()
{
...
...
topsun/src/main/java/com/huigou/topsun/product/repository/ProductFaceColorRepository.java
View file @
afd95b1e
...
...
@@ -3,6 +3,7 @@ package com.huigou.topsun.product.repository;
import
com.huigou.topsun.product.domain.ProductFaceColor
;
import
org.springframework.data.jpa.repository.JpaRepository
;
import
java.math.BigDecimal
;
import
java.util.List
;
/**
...
...
@@ -11,5 +12,5 @@ import java.util.List;
* @Description:
*/
public
interface
ProductFaceColorRepository
extends
JpaRepository
<
ProductFaceColor
,
String
>
{
List
<
ProductFaceColor
>
findByProductFaceId
(
String
productFaceId
);
List
<
ProductFaceColor
>
findByProductFaceId
(
BigDecimal
productFaceId
);
}
topsun/src/main/java/com/huigou/topsun/product/repository/ProductFaceRepository.java
View file @
afd95b1e
...
...
@@ -3,11 +3,14 @@ package com.huigou.topsun.product.repository;
import
com.huigou.topsun.product.domain.ProductFace
;
import
org.springframework.data.jpa.repository.JpaRepository
;
import
java.math.BigDecimal
;
/**
* @Auther: xin.lu
* @Date: 2023/11/22/10:41
* @Description:
*/
public
interface
ProductFaceRepository
extends
JpaRepository
<
ProductFace
,
String
>
{
ProductFace
findByProductFaceId
(
BigDecimal
productFaceId
);
ProductFace
findByProductFaceIdEquals
(
String
productFaceId
);
}
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