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
48b44c53
Commit
48b44c53
authored
Sep 03, 2024
by
yanghao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: 添加默认开票的修改接口
parent
e641a573
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
77 additions
and
4 deletions
+77
-4
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
CustomerController.java
...ustomer/controller/admin/customer/CustomerController.java
+12
-4
CustomerOperateTypeEnum.java
...coder/yudao/module/ecw/enums/CustomerOperateTypeEnum.java
+2
-0
No files found.
sql/v2.1/20240903.sql
0 → 100644
View file @
48b44c53
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 @
48b44c53
...
@@ -419,6 +419,7 @@ public interface CustomerService extends IService<CustomerDO> {
...
@@ -419,6 +419,7 @@ public interface CustomerService extends IService<CustomerDO> {
void
changeCustomerNoConsignee
(
CustomerChangeNoConsigneeReqVO
customerChangeNoConsigneeReqVO
);
void
changeCustomerNoConsignee
(
CustomerChangeNoConsigneeReqVO
customerChangeNoConsigneeReqVO
);
void
changeCustomerDefaultPay
(
CustomerChangeDefaultPayReqVO
customerChangeDefaultPayReqVO
);
void
changeCustomerDefaultPay
(
CustomerChangeDefaultPayReqVO
customerChangeDefaultPayReqVO
);
void
changeCustomerDefaultBilling
(
CustomerChangeDefaultBillingReqVO
customerChangeDefaultBillingReqVO
);
/**
/**
* @param areaCode 区号 eg: 86
* @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 @
48b44c53
...
@@ -3528,6 +3528,33 @@ public class CustomerServiceImpl extends AbstractService<CustomerMapper,
...
@@ -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
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
recycleUnConfirmedCustomer
(
CustomerUnConfirmReqVO
customerUnConfirmReqVO
)
{
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 @
48b44c53
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-rest/src/main/java/cn/iocoder/yudao/module/customer/controller/admin/customer/CustomerController.java
View file @
48b44c53
...
@@ -1126,8 +1126,7 @@ public class CustomerController {
...
@@ -1126,8 +1126,7 @@ public class CustomerController {
@PutMapping
(
"/change-customer-no-consignee"
)
@PutMapping
(
"/change-customer-no-consignee"
)
@ApiOperation
(
"设置客户是否是默认付款无收货人"
)
@ApiOperation
(
"设置客户是否是默认控货无收货人"
)
@PreAuthorize
(
"@ss.hasPermission('ecw:customer:noconsignee')"
)
@Idempotent
(
timeout
=
5
)
@Idempotent
(
timeout
=
5
)
public
CommonResult
<
Boolean
>
changeCustomerNoConsignee
(
@Valid
@RequestBody
CustomerChangeNoConsigneeReqVO
customerChangeNoConsigneeReqVO
)
{
public
CommonResult
<
Boolean
>
changeCustomerNoConsignee
(
@Valid
@RequestBody
CustomerChangeNoConsigneeReqVO
customerChangeNoConsigneeReqVO
)
{
...
@@ -1137,8 +1136,7 @@ public class CustomerController {
...
@@ -1137,8 +1136,7 @@ public class CustomerController {
@PutMapping
(
"/change-customer-default-pay"
)
@PutMapping
(
"/change-customer-default-pay"
)
@ApiOperation
(
"设置客户是否是默认侍"
)
@ApiOperation
(
"设置客户是否是默认付款"
)
@PreAuthorize
(
"@ss.hasPermission('ecw:customer:defaultpay')"
)
@Idempotent
(
timeout
=
5
)
@Idempotent
(
timeout
=
5
)
public
CommonResult
<
Boolean
>
changeCustomerDefaultPay
(
@Valid
@RequestBody
CustomerChangeDefaultPayReqVO
customerChangeDefaultPayReqVO
)
{
public
CommonResult
<
Boolean
>
changeCustomerDefaultPay
(
@Valid
@RequestBody
CustomerChangeDefaultPayReqVO
customerChangeDefaultPayReqVO
)
{
...
@@ -1147,6 +1145,16 @@ public class CustomerController {
...
@@ -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"
)
@PutMapping
(
"/recycle-unconfirmed-customer"
)
@ApiOperation
(
"回收已分配未接收的客户"
)
@ApiOperation
(
"回收已分配未接收的客户"
)
// @PreAuthorize("@ss.hasPermission('ecw:customer:recycle:unconfirmed')")
// @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 @
48b44c53
...
@@ -52,6 +52,8 @@ public enum CustomerOperateTypeEnum {
...
@@ -52,6 +52,8 @@ public enum CustomerOperateTypeEnum {
CHANGE_NO_CONSIGNEE
(
22
,
"设置控货无收货人"
),
CHANGE_NO_CONSIGNEE
(
22
,
"设置控货无收货人"
),
CHANGE_DEFAULT_PAY
(
23
,
"设置默认付款"
),
CHANGE_DEFAULT_PAY
(
23
,
"设置默认付款"
),
CHANGE_DEFAULT_BILLING
(
24
,
"设置默认开票"
),
DELETE
(
100
,
"删除"
),
DELETE
(
100
,
"删除"
),
...
...
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