Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jiedao-api-boot-master
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
lanbaoming
jiedao-api-boot-master
Commits
ba433499
Commit
ba433499
authored
Sep 04, 2024
by
332784038@qq.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'release-fix' into dev
parents
1df742e0
501f413a
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
122 additions
and
53 deletions
+122
-53
20240903.sql
sql/v2.1/20240903.sql
+7
-0
CustomerService.java
...dao/module/customer/service/customer/CustomerService.java
+1
-0
CustomerServiceImpl.java
...module/customer/service/customer/CustomerServiceImpl.java
+27
-0
CustomerChangeDefaultBillingReqVO.java
...mer/vo/customer/vo/CustomerChangeDefaultBillingReqVO.java
+28
-0
CustomerDetailRespVO.java
.../module/customer/vo/customer/vo/CustomerDetailRespVO.java
+37
-14
CustomerController.java
...ustomer/controller/admin/customer/CustomerController.java
+12
-4
CustomerOperateTypeEnum.java
...coder/yudao/module/ecw/enums/CustomerOperateTypeEnum.java
+2
-0
OrderQueryVO.java
.../cn/iocoder/yudao/module/order/vo/order/OrderQueryVO.java
+8
-35
No files found.
sql/v2.1/20240903.sql
0 → 100644
View file @
ba433499
INSERT
INTO
`system_dict_data`
(
`sort`
,
`value`
,
`label`
,
`label_en`
,
`dict_type`
,
`status`
,
`color_type`
,
`css_class`
,
`remark`
,
`creator`
,
`create_time`
,
`updater`
,
`update_time`
,
`deleted`
)
VALUES
(
22
,
'22'
,
'设置控货无收货人'
,
'Set Customer NoConsigee'
,
'customer_operate_type'
,
0
,
'default'
,
''
,
NULL
,
'1'
,
now
(),
'115'
,
now
(),
b
'0'
);
INSERT
INTO
`system_dict_data`
(
`sort`
,
`value`
,
`label`
,
`label_en`
,
`dict_type`
,
`status`
,
`color_type`
,
`css_class`
,
`remark`
,
`creator`
,
`create_time`
,
`updater`
,
`update_time`
,
`deleted`
)
VALUES
(
23
,
'23'
,
'设置默认付款'
,
'Set Customer Default Pay'
,
'customer_operate_type'
,
0
,
'default'
,
''
,
NULL
,
'1'
,
now
(),
'115'
,
now
(),
b
'0'
);
INSERT
INTO
`system_dict_data`
(
`sort`
,
`value`
,
`label`
,
`label_en`
,
`dict_type`
,
`status`
,
`color_type`
,
`css_class`
,
`remark`
,
`creator`
,
`create_time`
,
`updater`
,
`update_time`
,
`deleted`
)
VALUES
(
24
,
'24'
,
'设置默认开票'
,
'Set Customer Default Billing'
,
'customer_operate_type'
,
0
,
'default'
,
''
,
NULL
,
'1'
,
now
(),
'115'
,
now
(),
b
'0'
);
yudao-module-customer/yudao-module-customer-core/src/main/java/cn/iocoder/yudao/module/customer/service/customer/CustomerService.java
View file @
ba433499
...
...
@@ -419,6 +419,7 @@ public interface CustomerService extends IService<CustomerDO> {
void
changeCustomerNoConsignee
(
CustomerChangeNoConsigneeReqVO
customerChangeNoConsigneeReqVO
);
void
changeCustomerDefaultPay
(
CustomerChangeDefaultPayReqVO
customerChangeDefaultPayReqVO
);
void
changeCustomerDefaultBilling
(
CustomerChangeDefaultBillingReqVO
customerChangeDefaultBillingReqVO
);
/**
* @param areaCode 区号 eg: 86
...
...
yudao-module-customer/yudao-module-customer-core/src/main/java/cn/iocoder/yudao/module/customer/service/customer/CustomerServiceImpl.java
View file @
ba433499
...
...
@@ -3528,6 +3528,33 @@ public class CustomerServiceImpl extends AbstractService<CustomerMapper,
}
}
@Override
public
void
changeCustomerDefaultBilling
(
CustomerChangeDefaultBillingReqVO
customerChangeDefaultBillingReqVO
)
{
List
<
CustomerDO
>
customerDOList
=
customerMapper
.
selectBatchIds
(
customerChangeDefaultBillingReqVO
.
getCustomerIdList
());
if
(
CollectionUtil
.
isNotEmpty
(
customerDOList
))
{
Boolean
defaultBilling
=
customerChangeDefaultBillingReqVO
.
getDefaultBilling
();
customerDOList
.
stream
()
.
filter
(
t
->
t
.
getDefaultPay
()
==
null
||
!
t
.
getDefaultPay
().
equals
(
defaultBilling
))
.
forEach
(
customerDO
->
{
customerDO
.
setDefaultBilling
(
defaultBilling
);
customerMapper
.
updateById
(
customerDO
);
LoginUser
loginUser
=
SecurityFrameworkUtils
.
getLoginUser
();
CustomerOperateLogCreateReqVO
customerOperateLogCreateReqVO
=
new
CustomerOperateLogCreateReqVO
()
.
setOperator
(
loginUser
==
null
?
null
:
loginUser
.
getId
())
.
setOperatorName
(
loginUser
==
null
?
null
:
loginUser
.
getNickname
())
.
setCustomerId
(
customerDO
.
getId
())
.
setNumber
(
customerDO
.
getNumber
())
.
setName
(
customerDO
.
getName
())
.
setOperateType
(
CustomerOperateTypeEnum
.
CHANGE_DEFAULT_PAY
.
getValue
())
.
setRemark
(
"设置客户的默认开票为:"
+
(
defaultBilling
?
"【是】"
:
"【否】"
));
customerOperateLogService
.
createOperateLog
(
customerOperateLogCreateReqVO
);
});
}
}
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
recycleUnConfirmedCustomer
(
CustomerUnConfirmReqVO
customerUnConfirmReqVO
)
{
...
...
yudao-module-customer/yudao-module-customer-core/src/main/java/cn/iocoder/yudao/module/customer/vo/customer/vo/CustomerChangeDefaultBillingReqVO.java
0 → 100644
View file @
ba433499
package
cn
.
iocoder
.
yudao
.
module
.
customer
.
vo
.
customer
.
vo
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.ToString
;
import
javax.validation.constraints.NotEmpty
;
import
javax.validation.constraints.NotNull
;
import
java.util.List
;
@ApiModel
(
"管理后台 - 默认开票切换 Request VO"
)
@Data
@EqualsAndHashCode
@ToString
public
class
CustomerChangeDefaultBillingReqVO
{
@ApiModelProperty
(
value
=
"客户ID列表"
,
required
=
true
)
@NotEmpty
(
message
=
"客户ID列表不能为空"
)
private
List
<
Long
>
customerIdList
;
@ApiModelProperty
(
value
=
"是否默认开票"
,
required
=
true
)
@NotNull
(
message
=
"默认开票值不能为空"
)
private
Boolean
defaultBilling
;
}
yudao-module-customer/yudao-module-customer-core/src/main/java/cn/iocoder/yudao/module/customer/vo/customer/vo/CustomerDetailRespVO.java
View file @
ba433499
...
...
@@ -36,14 +36,20 @@ public class CustomerDetailRespVO extends CustomerBaseVO {
@ApiModelProperty
(
value
=
"是否在公海"
)
private
Boolean
isInOpenSea
;
@JsonFormat
(
pattern
=
FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND
,
timezone
=
TIME_ZONE_DEFAULT
)
@DateTimeFormat
(
pattern
=
FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND
)
@ApiModelProperty
(
value
=
"进入公海时间"
)
private
Date
enterOpenSeaTime
;
@JsonFormat
(
pattern
=
FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND
,
timezone
=
TIME_ZONE_DEFAULT
)
@DateTimeFormat
(
pattern
=
FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND
)
@ApiModelProperty
(
value
=
"预计进入公海时间"
)
private
Date
estimateEnterOpenSeaTime
;
@JsonFormat
(
pattern
=
FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND
,
timezone
=
TIME_ZONE_DEFAULT
)
@DateTimeFormat
(
pattern
=
FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND
)
@ApiModelProperty
(
value
=
"公海池捞取时间"
)
private
Date
catchTime
;
...
...
@@ -72,6 +78,8 @@ public class CustomerDetailRespVO extends CustomerBaseVO {
@ApiModelProperty
(
value
=
"关联会员账号id"
)
private
Long
memberId
;
@JsonFormat
(
pattern
=
FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND
,
timezone
=
TIME_ZONE_DEFAULT
)
@ApiModelProperty
(
value
=
"客户生日"
,
example
=
"1652017501000"
)
private
Date
birthday
;
...
...
@@ -99,6 +107,7 @@ public class CustomerDetailRespVO extends CustomerBaseVO {
@JsonFormat
(
pattern
=
FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND
,
timezone
=
TIME_ZONE_DEFAULT
)
private
Date
createTime
;
@JsonFormat
(
pattern
=
FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND
,
timezone
=
TIME_ZONE_DEFAULT
)
private
Date
updateTime
;
...
...
@@ -193,25 +202,46 @@ public class CustomerDetailRespVO extends CustomerBaseVO {
// ======== 20240821 add start
@ApiModelProperty
(
value
=
"首次成交时间"
)
@JsonFormat
(
pattern
=
FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND
,
timezone
=
TIME_ZONE_DEFAULT
)
private
Date
firstDealTime
;
@ApiModelProperty
(
value
=
"获取方式"
)
private
Integer
getMethod
;
@ApiModelProperty
(
value
=
"创建入口"
)
private
Integer
createFrom
;
/**
* 归属时间
*/
@ApiModelProperty
(
value
=
"归属时间"
)
@JsonFormat
(
pattern
=
FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND
,
timezone
=
TIME_ZONE_DEFAULT
)
private
Date
customerServiceConfirmedTime
;
@ApiModelProperty
(
value
=
"客户角色"
)
private
String
roles
;
/**
* 默认付款,1-是,0-否
*/
@ApiModelProperty
(
value
=
"默认付款,1-是,0-否"
)
private
Boolean
defaultPay
;
private
Boolean
defaultPay
;
/**
* 控货无收货人,1-是,0-否
*/
@ApiModelProperty
(
value
=
"控货无收货人,1-是,0-否"
)
private
Boolean
noConsignee
;
private
Boolean
noConsignee
;
/**
* 客户角色
* <p>
* 枚举 {@link TODO customer_role 字典}
* 默认开票,1-是,0-否
*/
@ApiModelProperty
(
value
=
"
客户角色
"
)
private
String
roles
;
@ApiModelProperty
(
value
=
"
默认开票,1-是,0-否
"
)
private
Boolean
defaultBilling
;
/**
...
...
@@ -239,13 +269,6 @@ public class CustomerDetailRespVO extends CustomerBaseVO {
@ApiModelProperty
(
value
=
"年度发货次数"
)
private
Integer
numYearly
;
/**
* 默认开票,1-是,0-否
*/
@ApiModelProperty
(
value
=
"默认开票,1-是,0-否"
)
private
Boolean
defaultBilling
;
// ======== 20240821 add end
...
...
yudao-module-customer/yudao-module-customer-rest/src/main/java/cn/iocoder/yudao/module/customer/controller/admin/customer/CustomerController.java
View file @
ba433499
...
...
@@ -1126,8 +1126,7 @@ public class CustomerController {
@PutMapping
(
"/change-customer-no-consignee"
)
@ApiOperation
(
"设置客户是否是默认付款无收货人"
)
@PreAuthorize
(
"@ss.hasPermission('ecw:customer:noconsignee')"
)
@ApiOperation
(
"设置客户是否是默认控货无收货人"
)
@Idempotent
(
timeout
=
5
)
public
CommonResult
<
Boolean
>
changeCustomerNoConsignee
(
@Valid
@RequestBody
CustomerChangeNoConsigneeReqVO
customerChangeNoConsigneeReqVO
)
{
...
...
@@ -1137,8 +1136,7 @@ public class CustomerController {
@PutMapping
(
"/change-customer-default-pay"
)
@ApiOperation
(
"设置客户是否是默认侍"
)
@PreAuthorize
(
"@ss.hasPermission('ecw:customer:defaultpay')"
)
@ApiOperation
(
"设置客户是否是默认付款"
)
@Idempotent
(
timeout
=
5
)
public
CommonResult
<
Boolean
>
changeCustomerDefaultPay
(
@Valid
@RequestBody
CustomerChangeDefaultPayReqVO
customerChangeDefaultPayReqVO
)
{
...
...
@@ -1147,6 +1145,16 @@ public class CustomerController {
}
@PutMapping
(
"/change-customer-default-billing"
)
@ApiOperation
(
"设置客户是否是默认开票"
)
@Idempotent
(
timeout
=
5
)
public
CommonResult
<
Boolean
>
changeCustomerDefaultBilling
(
@Valid
@RequestBody
CustomerChangeDefaultBillingReqVO
customerChangeDefaultBillingReqVO
)
{
customerService
.
changeCustomerDefaultBilling
(
customerChangeDefaultBillingReqVO
);
return
success
(
true
);
}
@PutMapping
(
"/recycle-unconfirmed-customer"
)
@ApiOperation
(
"回收已分配未接收的客户"
)
// @PreAuthorize("@ss.hasPermission('ecw:customer:recycle:unconfirmed')")
...
...
yudao-module-ecw/yudao-module-ecw-api/src/main/java/cn/iocoder/yudao/module/ecw/enums/CustomerOperateTypeEnum.java
View file @
ba433499
...
...
@@ -52,6 +52,8 @@ public enum CustomerOperateTypeEnum {
CHANGE_NO_CONSIGNEE
(
22
,
"设置控货无收货人"
),
CHANGE_DEFAULT_PAY
(
23
,
"设置默认付款"
),
CHANGE_DEFAULT_BILLING
(
24
,
"设置默认开票"
),
DELETE
(
100
,
"删除"
),
...
...
yudao-module-order/yudao-module-order-core/src/main/java/cn/iocoder/yudao/module/order/vo/order/OrderQueryVO.java
View file @
ba433499
...
...
@@ -611,6 +611,7 @@ public class OrderQueryVO {
public
void
setAsStatusList
(
List
<
Integer
>
asStatusList
)
{
this
.
asStatusList
=
asStatusList
;
if
(
CollectionUtil
.
isNotEmpty
(
this
.
asStatusList
))
{
this
.
statusList
=
new
ArrayList
<>();
for
(
Integer
asStatus
:
asStatusList
)
{
combinedStateList
(
asStatus
,
this
.
transportId
);
}
...
...
@@ -619,6 +620,7 @@ public class OrderQueryVO {
public
void
setStatusList
(
List
<
Integer
>
statusList
)
{
this
.
asStatusList
=
statusList
;
if
(
CollectionUtil
.
isNotEmpty
(
this
.
asStatusList
))
{
this
.
statusList
=
new
ArrayList
<>();
for
(
Integer
asStatus
:
asStatusList
)
{
combinedStateList
(
asStatus
,
this
.
transportId
);
}
...
...
@@ -631,6 +633,7 @@ public class OrderQueryVO {
combinedState
(
this
.
asStatus
,
this
.
transportId
);
}
if
(
Objects
.
nonNull
(
transportId
)
&&
CollectionUtil
.
isNotEmpty
(
this
.
asStatusList
))
{
this
.
statusList
=
new
ArrayList
<>();
for
(
Integer
asStatus
:
asStatusList
)
{
combinedStateList
(
asStatus
,
this
.
transportId
);
}
...
...
@@ -706,9 +709,6 @@ public class OrderQueryVO {
private
void
combinedStateList
(
Integer
asStatus
,
Integer
transportId
)
{
switch
(
asStatus
)
{
case
12325
:
if
(
Objects
.
isNull
(
this
.
statusList
)){
this
.
statusList
=
new
ArrayList
<>();
}
if
(
Objects
.
isNull
(
this
.
shipmentStateList
)){
this
.
shipmentStateList
=
new
ArrayList
<>();
}
...
...
@@ -717,9 +717,6 @@ public class OrderQueryVO {
break
;
case
10501
:
// 空运待出
if
(
Objects
.
isNull
(
this
.
statusList
)){
this
.
statusList
=
new
ArrayList
<>();
}
if
(
Objects
.
isNull
(
this
.
airShipmentList
)){
this
.
airShipmentList
=
new
ArrayList
<>();
}
...
...
@@ -737,9 +734,6 @@ public class OrderQueryVO {
break
;
case
10502
:
// 空运可出
if
(
Objects
.
isNull
(
this
.
statusList
)){
this
.
statusList
=
new
ArrayList
<>();
}
if
(
Objects
.
isNull
(
this
.
airShipmentList
)){
this
.
airShipmentList
=
new
ArrayList
<>();
}
...
...
@@ -749,9 +743,6 @@ public class OrderQueryVO {
break
;
case
10503
:
// 空运已备货
if
(
Objects
.
isNull
(
this
.
statusList
)){
this
.
statusList
=
new
ArrayList
<>();
}
if
(
Objects
.
isNull
(
this
.
airShipmentList
)){
this
.
airShipmentList
=
new
ArrayList
<>();
}
...
...
@@ -761,9 +752,6 @@ public class OrderQueryVO {
break
;
case
10504
:
// 待排单
if
(
Objects
.
isNull
(
this
.
statusList
)){
this
.
statusList
=
new
ArrayList
<>();
}
if
(
Objects
.
isNull
(
this
.
airShipmentList
)){
this
.
airShipmentList
=
new
ArrayList
<>();
}
...
...
@@ -787,57 +775,42 @@ public class OrderQueryVO {
break
;
case
132411
:
// 空运已出货
if
(
Objects
.
isNull
(
this
.
statusList
)){
this
.
statusList
=
new
ArrayList
<>();
}
if
(
Objects
.
isNull
(
this
.
shipmentStateList
)){
this
.
shipmentStateList
=
new
ArrayList
<>();
}
this
.
statusList
.
add
(
32
);
this
.
shipmentStateList
.
add
(
411
);
this
.
transportId
=
3
;
// 空运待出查询,只查空运的订单
//
this.transportId = 3; // 空运待出查询,只查空运的订单
break
;
case
132412
:
// 空运已出仓
if
(
Objects
.
isNull
(
this
.
statusList
)){
this
.
statusList
=
new
ArrayList
<>();
}
if
(
Objects
.
isNull
(
this
.
shipmentStateList
)){
this
.
shipmentStateList
=
new
ArrayList
<>();
}
this
.
statusList
.
add
(
32
);
this
.
shipmentStateList
.
add
(
412
);
this
.
transportId
=
3
;
// 空运待出查询,只查空运的订单
//
this.transportId = 3; // 空运待出查询,只查空运的订单
break
;
case
132409
:
// 空运已理货
if
(
Objects
.
isNull
(
this
.
statusList
)){
this
.
statusList
=
new
ArrayList
<>();
}
if
(
Objects
.
isNull
(
this
.
shipmentStateList
)){
this
.
shipmentStateList
=
new
ArrayList
<>();
}
this
.
statusList
.
add
(
32
);
this
.
shipmentStateList
.
add
(
409
);
this
.
transportId
=
3
;
// 空运待出查询,只查空运的订单
//
this.transportId = 3; // 空运待出查询,只查空运的订单
break
;
case
118428
:
// 空运已到港
if
(
Objects
.
isNull
(
this
.
statusList
)){
this
.
statusList
=
new
ArrayList
<>();
}
if
(
Objects
.
isNull
(
this
.
shipmentStateList
)){
this
.
shipmentStateList
=
new
ArrayList
<>();
}
this
.
statusList
.
add
(
32
);
this
.
shipmentStateList
.
add
(
428
);
this
.
transportId
=
3
;
// 空运待出查询,只查空运的订单
//
this.transportId = 3; // 空运待出查询,只查空运的订单
break
;
default
:
if
(
Objects
.
isNull
(
this
.
statusList
)){
this
.
statusList
=
new
ArrayList
<>();
this
.
statusList
.
add
(
asStatus
);
}
this
.
statusList
.
add
(
asStatus
);
}
}
...
...
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