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
d7fda5d3
Commit
d7fda5d3
authored
May 21, 2024
by
lanbaoming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2024-05-21提交
parent
d1deecee
Changes
64
Show whitespace changes
Inline
Side-by-side
Showing
64 changed files
with
1358 additions
and
201 deletions
+1358
-201
SchedulerManager.java
...dao/framework/quartz/core/scheduler/SchedulerManager.java
+2
-1
BpmTaskController.java
...o/module/bpm/controller/admin/task/BpmTaskController.java
+60
-2
BpmTaskServiceImpl.java
...der/yudao/module/bpm/service/task/BpmTaskServiceImpl.java
+13
-9
CustomerServiceImpl.java
...module/customer/service/customer/CustomerServiceImpl.java
+2
-1
CustomerAnalysisControl.java
...le/delivery/controller/admin/CustomerAnalysisControl.java
+0
-5
EcwVzController.java
...dao/module/delivery/controller/admin/EcwVzController.java
+45
-1
EmployeeController.java
.../module/delivery/controller/admin/EmployeeController.java
+18
-1
zTest.java
...cn/iocoder/yudao/module/delivery/entity/deptex/zTest.java
+17
-0
AllWriteOffJob.java
.../cn/iocoder/yudao/module/delivery/job/AllWriteOffJob.java
+24
-7
CalculateCustomerType.java
...yudao/module/delivery/listener/CalculateCustomerType.java
+15
-0
CalculateOrderVValueListener.java
...odule/delivery/listener/CalculateOrderVValueListener.java
+17
-1
CalculateOrderYeJiTypeListener.java
...ule/delivery/listener/CalculateOrderYeJiTypeListener.java
+22
-2
ReceiveCustomerCalTypeListener.java
...ule/delivery/listener/ReceiveCustomerCalTypeListener.java
+15
-0
AllWriteOffMapper.java
...coder/yudao/module/delivery/mapper/AllWriteOffMapper.java
+11
-0
ZTestMapper.java
.../cn/iocoder/yudao/module/delivery/mapper/ZTestMapper.java
+9
-0
AllWriteOffService.java
...der/yudao/module/delivery/service/AllWriteOffService.java
+8
-0
AllWriteOffImpl.java
...r/yudao/module/delivery/service/Impl/AllWriteOffImpl.java
+27
-0
ZTestImpl.java
...iocoder/yudao/module/delivery/service/Impl/ZTestImpl.java
+13
-0
ZTestService.java
...n/iocoder/yudao/module/delivery/service/ZTestService.java
+7
-0
AllWriteOffMapper.xml
...very-rest/src/main/resources/mapper/AllWriteOffMapper.xml
+26
-0
ZTestMapper.xml
...e-delivery-rest/src/main/resources/mapper/ZTestMapper.xml
+8
-0
JobController.java
...udao/module/infra/controller/admin/job/JobController.java
+4
-0
JobServiceImpl.java
...ocoder/yudao/module/infra/service/job/JobServiceImpl.java
+3
-1
BoxCostDO.java
...coder/yudao/module/shipment/dal/dataobject/BoxCostDO.java
+7
-2
BoxCostServiceImpl.java
...o/module/shipment/service/boxCost/BoxCostServiceImpl.java
+2
-0
BoxCostBackVO.java
...coder/yudao/module/shipment/vo/boxCost/BoxCostBackVO.java
+2
-2
BoxCostBaseVO.java
...coder/yudao/module/shipment/vo/boxCost/BoxCostBaseVO.java
+13
-3
BoxCostController.java
...o/module/shipment/controller/admin/BoxCostController.java
+5
-1
LogClearJob.java
...a/cn/iocoder/yudao/module/system/job/log/LogClearJob.java
+1
-1
AdminUserService.java
...er/yudao/module/system/service/user/AdminUserService.java
+5
-0
AdminUserServiceImpl.java
...udao/module/system/service/user/AdminUserServiceImpl.java
+7
-0
pom.xml
yudao-module-wealth/yudao-module-wealth-core/pom.xml
+6
-0
PayableDO.java
...yudao/module/wealth/dal/dataobject/payable/PayableDO.java
+7
-0
PaymentDO.java
...yudao/module/wealth/dal/dataobject/payment/PaymentDO.java
+20
-0
ReceiptDO.java
...yudao/module/wealth/dal/dataobject/receipt/ReceiptDO.java
+10
-0
BankReceiptDetailsMapper.java
...ealth/dal/mysql/receiptItem/BankReceiptDetailsMapper.java
+20
-0
BoxAirStatusEnum.java
...n/iocoder/yudao/module/wealth/enums/BoxAirStatusEnum.java
+98
-0
BoxApprovalTypeEnum.java
...ocoder/yudao/module/wealth/enums/BoxApprovalTypeEnum.java
+81
-0
BoxStatusEnum.java
...a/cn/iocoder/yudao/module/wealth/enums/BoxStatusEnum.java
+71
-0
ErrorCodeConstants.java
...iocoder/yudao/module/wealth/enums/ErrorCodeConstants.java
+5
-0
TransportTypeEnum.java
.../iocoder/yudao/module/wealth/enums/TransportTypeEnum.java
+37
-0
FinanceReceiptApproveService.java
...o/module/wealth/service/FinanceReceiptApproveService.java
+12
-1
PayableServiceImpl.java
...dao/module/wealth/service/payable/PayableServiceImpl.java
+46
-0
PaymentServiceImpl.java
...dao/module/wealth/service/payment/PaymentServiceImpl.java
+11
-57
ReceiptServiceImpl.java
...dao/module/wealth/service/receipt/ReceiptServiceImpl.java
+35
-14
BankReceiptDetailsImpl.java
...le/wealth/service/receiptItem/BankReceiptDetailsImpl.java
+46
-0
BankReceiptDetailsService.java
...wealth/service/receiptItem/BankReceiptDetailsService.java
+16
-0
ReceiptItemService.java
...module/wealth/service/receiptItem/ReceiptItemService.java
+2
-0
ReceiptItemServiceImpl.java
...le/wealth/service/receiptItem/ReceiptItemServiceImpl.java
+2
-0
PayableBackVO.java
...iocoder/yudao/module/wealth/vo/payable/PayableBackVO.java
+71
-2
PayableBaseVO.java
...iocoder/yudao/module/wealth/vo/payable/PayableBaseVO.java
+12
-3
PayableOrderBackVo.java
...er/yudao/module/wealth/vo/payable/PayableOrderBackVo.java
+2
-0
FinancePaymentVo.java
...oder/yudao/module/wealth/vo/payment/FinancePaymentVo.java
+25
-1
PaymentBackVO.java
...iocoder/yudao/module/wealth/vo/payment/PaymentBackVO.java
+25
-1
ReceiptBaseVO.java
...iocoder/yudao/module/wealth/vo/receipt/ReceiptBaseVO.java
+10
-11
ReceiptItemReq.java
...er/yudao/module/wealth/vo/receiptItem/ReceiptItemReq.java
+31
-0
ReceiptItemResp.java
...r/yudao/module/wealth/vo/receiptItem/ReceiptItemResp.java
+115
-0
PayableController.java
...le/wealth/controller/admin/payable/PayableController.java
+3
-0
PaymentController.java
...le/wealth/controller/admin/payment/PaymentController.java
+30
-34
ReceiptController.java
...le/wealth/controller/admin/receipt/ReceiptController.java
+1
-0
BankReceiptDetailsControl.java
...ntroller/admin/receiptItem/BankReceiptDetailsControl.java
+61
-0
ReceiptItemController.java
...h/controller/admin/receiptItem/ReceiptItemController.java
+0
-36
BankReceiptDetailsMapper.xml
...resources/mapper/ReceiptItem/BankReceiptDetailsMapper.xml
+36
-0
PayableMapper.xml
...-rest/src/main/resources/mapper/payable/PayableMapper.xml
+3
-1
No files found.
yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/quartz/core/scheduler/SchedulerManager.java
View file @
d7fda5d3
...
@@ -108,7 +108,8 @@ public class SchedulerManager {
...
@@ -108,7 +108,8 @@ public class SchedulerManager {
*/
*/
public
void
triggerJob
(
Long
jobId
,
String
jobHandlerName
,
String
jobHandlerParam
)
public
void
triggerJob
(
Long
jobId
,
String
jobHandlerName
,
String
jobHandlerParam
)
throws
SchedulerException
{
throws
SchedulerException
{
JobDataMap
data
=
new
JobDataMap
();
// 无需重试,所以不设置 retryCount 和 retryInterval
JobDataMap
data
=
new
JobDataMap
();
// 无需重试,所以不设置 retryCount 和 retryInterval
data
.
put
(
JobDataKeyEnum
.
JOB_ID
.
name
(),
jobId
);
data
.
put
(
JobDataKeyEnum
.
JOB_ID
.
name
(),
jobId
);
data
.
put
(
JobDataKeyEnum
.
JOB_HANDLER_NAME
.
name
(),
jobHandlerName
);
data
.
put
(
JobDataKeyEnum
.
JOB_HANDLER_NAME
.
name
(),
jobHandlerName
);
data
.
put
(
JobDataKeyEnum
.
JOB_HANDLER_PARAM
.
name
(),
jobHandlerParam
);
data
.
put
(
JobDataKeyEnum
.
JOB_HANDLER_PARAM
.
name
(),
jobHandlerParam
);
...
...
yudao-module-bpm/yudao-module-bpm-impl-flowable/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/BpmTaskController.java
View file @
d7fda5d3
...
@@ -2,11 +2,14 @@ package cn.iocoder.yudao.module.bpm.controller.admin.task;
...
@@ -2,11 +2,14 @@ package cn.iocoder.yudao.module.bpm.controller.admin.task;
import
cn.iocoder.yudao.framework.common.pojo.CommonResult
;
import
cn.iocoder.yudao.framework.common.pojo.CommonResult
;
import
cn.iocoder.yudao.framework.common.pojo.PageResult
;
import
cn.iocoder.yudao.framework.common.pojo.PageResult
;
import
cn.iocoder.yudao.framework.common.util.json.JsonUtils
;
import
cn.iocoder.yudao.framework.idempotent.core.annotation.Idempotent
;
import
cn.iocoder.yudao.framework.idempotent.core.annotation.Idempotent
;
import
cn.iocoder.yudao.framework.security.core.LoginUser
;
import
cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils
;
import
cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils
;
import
cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.copy.ProcessCopyPageReqVO
;
import
cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.copy.ProcessCopyPageReqVO
;
import
cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.copy.ProcessCopyRespVO
;
import
cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.copy.ProcessCopyRespVO
;
import
cn.iocoder.yudao.module.bpm.controller.admin.task.vo.task.*
;
import
cn.iocoder.yudao.module.bpm.controller.admin.task.vo.task.*
;
import
cn.iocoder.yudao.module.bpm.service.task.BpmProcessInstanceService
;
import
cn.iocoder.yudao.module.bpm.service.task.BpmTaskService
;
import
cn.iocoder.yudao.module.bpm.service.task.BpmTaskService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParam
;
...
@@ -36,6 +39,9 @@ public class BpmTaskController {
...
@@ -36,6 +39,9 @@ public class BpmTaskController {
@Resource
@Resource
private
BpmTaskService
taskService
;
private
BpmTaskService
taskService
;
@Resource
private
BpmProcessInstanceService
processInstanceService
;
@GetMapping
(
"todo-page"
)
@GetMapping
(
"todo-page"
)
@ApiOperation
(
"获取 Todo 待办任务分页"
)
@ApiOperation
(
"获取 Todo 待办任务分页"
)
@PreAuthorize
(
"@ss.hasPermission('bpm:task:query')"
)
@PreAuthorize
(
"@ss.hasPermission('bpm:task:query')"
)
...
@@ -77,16 +83,68 @@ public class BpmTaskController {
...
@@ -77,16 +83,68 @@ public class BpmTaskController {
@Idempotent
(
timeout
=
5
)
@Idempotent
(
timeout
=
5
)
@PreAuthorize
(
"@ss.hasPermission('bpm:task:update')"
)
@PreAuthorize
(
"@ss.hasPermission('bpm:task:update')"
)
public
CommonResult
<
Boolean
>
approveTask
(
@Valid
@RequestBody
BpmTaskApproveReqVO
reqVO
)
{
public
CommonResult
<
Boolean
>
approveTask
(
@Valid
@RequestBody
BpmTaskApproveReqVO
reqVO
)
{
//String jsonStr = JsonUtils.toJsonString(reqVO);
//JsonUtils.SaveLog("参数为:"+jsonStr);
taskService
.
approveTask
(
getLoginUserId
(),
reqVO
);
taskService
.
approveTask
(
getLoginUserId
(),
reqVO
);
return
success
(
true
);
return
success
(
true
);
}
}
/*
lanbm 2024-05-20 add
*/
@PutMapping
(
"/approve2"
)
@ApiOperation
(
"批量审批通过任务"
)
@Idempotent
(
timeout
=
20
)
@PreAuthorize
(
"@ss.hasPermission('bpm:task:update')"
)
public
CommonResult
<
Boolean
>
approveTask2
(
@Valid
@RequestBody
List
<
BpmTaskApproveReqVO
>
BpmList
)
{
//先校验流程是否同一类,然后批量审批
//String jsonStr = JsonUtils.toJsonString(BpmList);
//JsonUtils.SaveLog("参数为:"+jsonStr);
long
id
=
getLoginUserId
();
for
(
BpmTaskApproveReqVO
ReqVO
:
BpmList
)
{
List
<
BpmTaskRespVO
>
taskList
=
taskService
.
getTaskListByProcessInstanceId
(
ReqVO
.
getId
());
if
(
taskList
.
size
()>
0
)
{
String
sid
=
taskList
.
get
(
0
).
getId
();
ReqVO
.
setId
(
sid
);
//String jsonStr = JsonUtils.toJsonString(ReqVO);
//JsonUtils.SaveLog("参数为:"+jsonStr);
taskService
.
approveTask
(
id
,
ReqVO
);
}
}
return
success
(
true
);
}
/*
批量审批不通过 lanbm 2024-05-20 add
*/
@PutMapping
(
"/reject2"
)
@ApiOperation
(
"不通过任务"
)
@Idempotent
(
timeout
=
20
)
@PreAuthorize
(
"@ss.hasPermission('bpm:task:update')"
)
public
CommonResult
<
Boolean
>
rejectTask2
(
@Valid
@RequestBody
List
<
BpmTaskRejectReqVO
>
BpmList
)
{
//先校验流程是否同一类,然后批量审批
LoginUser
l
=
SecurityFrameworkUtils
.
getLoginUser
();
for
(
BpmTaskRejectReqVO
reqVO
:
BpmList
)
{
List
<
BpmTaskRespVO
>
taskList
=
taskService
.
getTaskListByProcessInstanceId
(
reqVO
.
getId
());
if
(
taskList
.
size
()>
0
)
{
String
sid
=
taskList
.
get
(
0
).
getId
();
reqVO
.
setId
(
sid
);
taskService
.
rejectTask
(
l
,
reqVO
);
}
}
return
success
(
true
);
}
@PutMapping
(
"/reject"
)
@PutMapping
(
"/reject"
)
@ApiOperation
(
"不通过任务"
)
@ApiOperation
(
"不通过任务"
)
@Idempotent
(
timeout
=
5
)
@Idempotent
(
timeout
=
5
)
@PreAuthorize
(
"@ss.hasPermission('bpm:task:update')"
)
@PreAuthorize
(
"@ss.hasPermission('bpm:task:update')"
)
public
CommonResult
<
Boolean
>
rejectTask
(
@Valid
@RequestBody
BpmTaskRejectReqVO
reqVO
)
{
public
CommonResult
<
Boolean
>
rejectTask
(
@Valid
@RequestBody
BpmTaskRejectReqVO
reqVO
)
{
taskService
.
rejectTask
(
SecurityFrameworkUtils
.
getLoginUser
(),
reqVO
);
taskService
.
rejectTask
(
SecurityFrameworkUtils
.
getLoginUser
(),
reqVO
);
return
success
(
true
);
return
success
(
true
);
}
}
...
...
yudao-module-bpm/yudao-module-bpm-impl-flowable/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmTaskServiceImpl.java
View file @
d7fda5d3
...
@@ -97,7 +97,8 @@ public class BpmTaskServiceImpl implements BpmTaskService {
...
@@ -97,7 +97,8 @@ public class BpmTaskServiceImpl implements BpmTaskService {
taskQuery
.
taskCreatedBefore
(
pageVO
.
getEndCreateTime
());
taskQuery
.
taskCreatedBefore
(
pageVO
.
getEndCreateTime
());
}
}
if
(
StrUtil
.
isNotBlank
(
pageVO
.
getBusinessNo
()))
{
if
(
StrUtil
.
isNotBlank
(
pageVO
.
getBusinessNo
()))
{
taskQuery
.
processVariableValueLike
(
"businessNo"
,
"%"
+
pageVO
.
getBusinessNo
()
+
"%"
);
taskQuery
.
processVariableValueLike
(
"businessNo"
,
"%"
+
pageVO
.
getBusinessNo
()
+
"%"
);
}
}
if
(
StrUtil
.
isNotBlank
(
pageVO
.
getCategory
()))
{
if
(
StrUtil
.
isNotBlank
(
pageVO
.
getCategory
()))
{
List
<
String
>
category
=
new
ArrayList
<>();
List
<
String
>
category
=
new
ArrayList
<>();
...
@@ -109,13 +110,15 @@ public class BpmTaskServiceImpl implements BpmTaskService {
...
@@ -109,13 +110,15 @@ public class BpmTaskServiceImpl implements BpmTaskService {
}
}
// 执行查询
// 执行查询
List
<
Task
>
tasks
=
taskQuery
.
listPage
(
PageUtils
.
getStart
(
pageVO
),
pageVO
.
getPageSize
());
List
<
Task
>
tasks
=
taskQuery
.
listPage
(
PageUtils
.
getStart
(
pageVO
),
pageVO
.
getPageSize
());
if
(
CollUtil
.
isEmpty
(
tasks
))
{
if
(
CollUtil
.
isEmpty
(
tasks
))
{
return
PageResult
.
empty
(
taskQuery
.
count
());
return
PageResult
.
empty
(
taskQuery
.
count
());
}
}
// 获得 ProcessInstance Map
// 获得 ProcessInstance Map
Map
<
String
,
ProcessInstance
>
processInstanceMap
=
processInstanceService
.
getProcessInstanceMap
(
Map
<
String
,
ProcessInstance
>
processInstanceMap
=
processInstanceService
.
getProcessInstanceMap
(
convertSet
(
tasks
,
Task:
:
getProcessInstanceId
));
convertSet
(
tasks
,
Task:
:
getProcessInstanceId
));
...
@@ -125,17 +128,16 @@ public class BpmTaskServiceImpl implements BpmTaskService {
...
@@ -125,17 +128,16 @@ public class BpmTaskServiceImpl implements BpmTaskService {
dtoMap
.
put
(
processInstance
.
getProcessInstanceId
(),
processInstanceExt
);
dtoMap
.
put
(
processInstance
.
getProcessInstanceId
(),
processInstanceExt
);
}
}
/* BpmProcessDefinitionExtDO processDefinitionExt = processDefinitionService.getProcessDefinitionExt(
/* BpmProcessDefinitionExtDO processDefinitionExt = processDefinitionService.getProcessDefinitionExt(
processInstance.getProcessDefinitionId());*/
processInstance.getProcessDefinitionId());*/
// 获得 User Map
// 获得 User Map
Map
<
Long
,
AdminUserRespDTO
>
userMap
=
adminUserApi
.
getUserMap
(
Map
<
Long
,
AdminUserRespDTO
>
userMap
=
adminUserApi
.
getUserMap
(
convertSet
(
processInstanceMap
.
values
(),
instance
->
Long
.
valueOf
(
instance
.
getStartUserId
())));
convertSet
(
processInstanceMap
.
values
(),
instance
->
Long
.
valueOf
(
instance
.
getStartUserId
())));
// 拼接结果
// 拼接结果
return
new
PageResult
<>(
BpmTaskConvert
.
INSTANCE
.
convertList1
(
tasks
,
processInstanceMap
,
dtoMap
,
userMap
),
return
new
PageResult
<>(
BpmTaskConvert
.
INSTANCE
.
convertList1
(
tasks
,
processInstanceMap
,
dtoMap
,
userMap
),
taskQuery
.
count
());
taskQuery
.
count
());
}
}
...
@@ -262,7 +264,9 @@ public class BpmTaskServiceImpl implements BpmTaskService {
...
@@ -262,7 +264,9 @@ public class BpmTaskServiceImpl implements BpmTaskService {
.
setResult
(
BpmProcessInstanceResultEnum
.
APPROVE
.
getResult
()).
setComment
(
reqVO
.
getComment
()));
.
setResult
(
BpmProcessInstanceResultEnum
.
APPROVE
.
getResult
()).
setComment
(
reqVO
.
getComment
()));
// 完成任务,审批通过
// 完成任务,审批通过
taskService
.
addComment
(
task
.
getId
(),
task
.
getProcessInstanceId
(),
BpmProcessInstanceResultEnum
.
APPROVE
.
getDesc
(),
reqVO
.
getComment
());
taskService
.
addComment
(
task
.
getId
(),
task
.
getProcessInstanceId
(),
BpmProcessInstanceResultEnum
.
APPROVE
.
getDesc
(),
reqVO
.
getComment
());
taskService
.
complete
(
task
.
getId
(),
instance
.
getProcessVariables
());
taskService
.
complete
(
task
.
getId
(),
instance
.
getProcessVariables
());
// 是否有抄送
// 是否有抄送
...
...
yudao-module-customer/yudao-module-customer-core/src/main/java/cn/iocoder/yudao/module/customer/service/customer/CustomerServiceImpl.java
View file @
d7fda5d3
...
@@ -2582,7 +2582,8 @@ public class CustomerServiceImpl extends AbstractService<CustomerMapper, Custome
...
@@ -2582,7 +2582,8 @@ public class CustomerServiceImpl extends AbstractService<CustomerMapper, Custome
customerPublicCatchLogMapper
.
insert
(
new
CustomerPublicCatchLogDO
(
null
,
customer
.
getId
(),
loginUserId
));
customerPublicCatchLogMapper
.
insert
(
new
CustomerPublicCatchLogDO
(
null
,
customer
.
getId
(),
loginUserId
));
//捞取完后 自动处理未分配客户经理异常
//捞取完后 自动处理未分配客户经理异常
applicationContext
.
publishEvent
(
new
AutoProcessNotCustomerServiceExceptionEvent
(
customer
.
getNumber
()));
applicationContext
.
publishEvent
(
new
AutoProcessNotCustomerServiceExceptionEvent
(
customer
.
getNumber
()));
//lanbm 2024-05-07 添加捞取后修改客户是否为新客户的相关逻辑
//lanbm 2024-05-07 添加捞取后修改客户是否为新客户的相关逻辑
...
...
yudao-module-delivery/yudao-module-delivery-rest/src/main/java/cn/iocoder/yudao/module/delivery/controller/admin/CustomerAnalysisControl.java
View file @
d7fda5d3
...
@@ -62,17 +62,12 @@ public class CustomerAnalysisControl {
...
@@ -62,17 +62,12 @@ public class CustomerAnalysisControl {
@Autowired
@Autowired
private
CustomerAnalysisService
customerAnalysisService
;
private
CustomerAnalysisService
customerAnalysisService
;
//报表权限信息
//报表权限信息
@Resource
@Resource
private
EcwReportPermissionService
ecwReportPermissionService
;
private
EcwReportPermissionService
ecwReportPermissionService
;
@Resource
@Resource
private
RedisHelper
redisHelper
;
private
RedisHelper
redisHelper
;
private
List
<
view_order_businesstime
>
listBData
=
null
;
private
List
<
view_order_businesstime
>
listBData
=
null
;
private
List
<
CustomerAnalysisResp
>
objListResult
=
null
;
private
List
<
CustomerAnalysisResp
>
objListResult
=
null
;
...
...
yudao-module-delivery/yudao-module-delivery-rest/src/main/java/cn/iocoder/yudao/module/delivery/controller/admin/EcwVzController.java
View file @
d7fda5d3
...
@@ -3,18 +3,29 @@ package cn.iocoder.yudao.module.delivery.controller.admin;
...
@@ -3,18 +3,29 @@ package cn.iocoder.yudao.module.delivery.controller.admin;
import
cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX
;
import
cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX
;
import
cn.iocoder.yudao.module.delivery.entity.EcwVz
;
import
cn.iocoder.yudao.module.delivery.entity.EcwVz
;
import
cn.iocoder.yudao.module.delivery.entity.EcwVzPageReq
;
import
cn.iocoder.yudao.module.delivery.entity.EcwVzPageReq
;
import
cn.iocoder.yudao.module.delivery.entity.deptex.zTest
;
import
cn.iocoder.yudao.module.delivery.listener.TestEvent
;
import
cn.iocoder.yudao.module.delivery.listener.TestEvent
;
import
cn.iocoder.yudao.module.delivery.service.EcwVzService
;
import
cn.iocoder.yudao.module.delivery.service.EcwVzService
;
import
cn.iocoder.yudao.framework.common.pojo.PageResult
;
import
cn.iocoder.yudao.framework.common.pojo.PageResult
;
import
cn.iocoder.yudao.framework.common.pojo.CommonResult
;
import
cn.iocoder.yudao.framework.common.pojo.CommonResult
;
import
cn.iocoder.yudao.module.delivery.service.ZTestService
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
org.springframework.context.ApplicationContext
;
import
org.springframework.context.ApplicationContext
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
import
static
cn
.
iocoder
.
yudao
.
framework
.
common
.
pojo
.
CommonResult
.
success
;
import
static
cn
.
iocoder
.
yudao
.
framework
.
common
.
pojo
.
CommonResult
.
success
;
import
javax.validation.*
;
import
javax.validation.*
;
import
io.swagger.v3.oas.annotations.Operation
;
import
io.swagger.v3.oas.annotations.Operation
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
/**
/**
* V值转换配置参数(EcwVz)表控制层
* V值转换配置参数(EcwVz)表控制层
*
*
...
@@ -30,6 +41,9 @@ public class EcwVzController {
...
@@ -30,6 +41,9 @@ public class EcwVzController {
@Resource
@Resource
private
EcwVzService
ecwVzService
;
private
EcwVzService
ecwVzService
;
@Resource
private
ZTestService
zTestService
;
@Resource
@Resource
private
ApplicationContext
applicationContext
;
private
ApplicationContext
applicationContext
;
...
@@ -124,11 +138,41 @@ public class EcwVzController {
...
@@ -124,11 +138,41 @@ public class EcwVzController {
@Operation
(
summary
=
"测试功能"
)
@Operation
(
summary
=
"测试功能"
)
public
CommonResult
<
Boolean
>
Test
()
{
public
CommonResult
<
Boolean
>
Test
()
{
TestEvent
even
=
new
TestEvent
();
/*
TestEvent even = new TestEvent();
even.setName("测试事件监听");
even.setName("测试事件监听");
applicationContext.publishEvent(even);
applicationContext.publishEvent(even);
*/
zTest
m
=
new
zTest
();
m
.
setTestname
(
"111"
);
m
.
setCreatedate
(
new
Date
());
zTestService
.
save
(
m
);
return
success
(
true
);
return
success
(
true
);
}
}
/*
JSON 和字符串的相互转换
*/
private
void
Test2
()
{
EcwVz
user1
=
new
EcwVz
();
EcwVz
user2
=
new
EcwVz
();
//1、List 转 Json
List
<
EcwVz
>
list
=
new
ArrayList
<>();
list
.
add
(
user1
);
list
.
add
(
user2
);
String
listToString
=
JSON
.
toJSONString
(
list
);
System
.
out
.
println
(
"--------List转Json--------"
);
System
.
out
.
println
(
listToString
);
//4、Json转List
List
<
EcwVz
>
jsonToList
=
JSONArray
.
parseArray
(
listToString
,
EcwVz
.
class
);
System
.
out
.
println
(
"--------Json转List--------"
);
for
(
int
i
=
0
;
i
<
jsonToList
.
size
();
i
++)
{
System
.
out
.
println
(
jsonToList
.
get
(
i
));
}
}
}
}
yudao-module-delivery/yudao-module-delivery-rest/src/main/java/cn/iocoder/yudao/module/delivery/controller/admin/EmployeeController.java
View file @
d7fda5d3
...
@@ -2,13 +2,18 @@ package cn.iocoder.yudao.module.delivery.controller.admin;
...
@@ -2,13 +2,18 @@ package cn.iocoder.yudao.module.delivery.controller.admin;
import
cn.iocoder.yudao.module.delivery.entity.Employee
;
import
cn.iocoder.yudao.module.delivery.entity.Employee
;
import
cn.iocoder.yudao.module.delivery.entity.EmployeePageReq
;
import
cn.iocoder.yudao.module.delivery.entity.EmployeePageReq
;
import
cn.iocoder.yudao.module.delivery.service.AllWriteOffService
;
import
cn.iocoder.yudao.module.delivery.service.EmployeeService
;
import
cn.iocoder.yudao.module.delivery.service.EmployeeService
;
import
cn.iocoder.yudao.framework.common.pojo.PageResult
;
import
cn.iocoder.yudao.framework.common.pojo.PageResult
;
import
cn.iocoder.yudao.framework.common.pojo.CommonResult
;
import
cn.iocoder.yudao.framework.common.pojo.CommonResult
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
import
static
cn
.
iocoder
.
yudao
.
framework
.
common
.
pojo
.
CommonResult
.
success
;
import
static
cn
.
iocoder
.
yudao
.
framework
.
common
.
pojo
.
CommonResult
.
success
;
import
javax.validation.*
;
import
javax.validation.*
;
import
io.swagger.v3.oas.annotations.Operation
;
import
io.swagger.v3.oas.annotations.Operation
;
...
@@ -19,7 +24,7 @@ import io.swagger.v3.oas.annotations.Operation;
...
@@ -19,7 +24,7 @@ import io.swagger.v3.oas.annotations.Operation;
* @since 2024-03-27 21:25:55
* @since 2024-03-27 21:25:55
*/
*/
@RestController
@RestController
@RequestMapping
(
"
employee
"
)
@RequestMapping
(
"
/my/test
"
)
public
class
EmployeeController
{
public
class
EmployeeController
{
/**
/**
* 服务对象
* 服务对象
...
@@ -27,6 +32,9 @@ public class EmployeeController {
...
@@ -27,6 +32,9 @@ public class EmployeeController {
@Resource
@Resource
private
EmployeeService
employeeService
;
private
EmployeeService
employeeService
;
@Resource
private
AllWriteOffService
allWriteOffService
;
/**
/**
* 新增数据
* 新增数据
...
@@ -100,5 +108,14 @@ public class EmployeeController {
...
@@ -100,5 +108,14 @@ public class EmployeeController {
return
success
(
this
.
employeeService
.
getListPage
(
PageReq
));
return
success
(
this
.
employeeService
.
getListPage
(
PageReq
));
}
}
/*
测试调用无参数的存储过程
*/
@GetMapping
(
"/1"
)
public
CommonResult
test
()
{
return
success
(
allWriteOffService
.
ttest
());
}
}
}
yudao-module-delivery/yudao-module-delivery-rest/src/main/java/cn/iocoder/yudao/module/delivery/entity/deptex/zTest.java
0 → 100644
View file @
d7fda5d3
package
cn
.
iocoder
.
yudao
.
module
.
delivery
.
entity
.
deptex
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
java.util.Date
;
@TableName
(
"z_test"
)
@Data
public
class
zTest
{
private
Long
id
;
private
String
testname
;
private
Date
createdate
;
}
yudao-module-delivery/yudao-module-delivery-rest/src/main/java/cn/iocoder/yudao/module/delivery/job/AllWriteOffJob.java
View file @
d7fda5d3
package
cn
.
iocoder
.
yudao
.
module
.
delivery
.
job
;
package
cn
.
iocoder
.
yudao
.
module
.
delivery
.
job
;
import
cn.hutool.core.util.StrUtil
;
import
cn.hutool.core.util.StrUtil
;
import
cn.iocoder.yudao.framework.common.util.json.JsonUtils
;
import
cn.iocoder.yudao.framework.quartz.core.handler.JobHandler
;
import
cn.iocoder.yudao.framework.quartz.core.handler.JobHandler
;
import
cn.iocoder.yudao.framework.tenant.core.job.TenantJob
;
import
cn.iocoder.yudao.framework.tenant.core.job.TenantJob
;
import
cn.iocoder.yudao.module.delivery.service.AllWriteOffService
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
import
javax.annotation.Resource
;
/*
/*
财务收款单 全部核销定时任务
财务收款单 全部核销定时任务
lanbm 2024-05-14 add
lanbm 2024-05-14 add
myBatis调用存储过程参考
https://blog.csdn.net/dwenxue/article/details/82257944
*/
*/
@Component
@Component
@TenantJob
@TenantJob
@Slf4j
@Slf4j
public
class
AllWriteOffJob
implements
JobHandler
{
public
class
AllWriteOffJob
implements
JobHandler
{
//在服务器上配置任务名时,此类的名称要小写,否则无法识别。
//lanbm 2024-05-19 添加注释
@Resource
private
AllWriteOffService
allWriteOffService
;
@Override
@Override
public
String
execute
(
String
param
)
throws
Exception
{
public
String
execute
(
String
param
)
throws
Exception
{
int
var1
=
30
;
int
var1
=
24
;
int
var2
=
3
;
int
var2
=
5
;
int
var3
=
6
;
int
var3
=
19
;
if
(
StringUtils
.
isNotBlank
(
param
)){
if
(
StringUtils
.
isNotBlank
(
param
))
{
String
[]
vars
=
param
.
split
(
StrUtil
.
COMMA
);
String
[]
vars
=
param
.
split
(
StrUtil
.
COMMA
);
if
(
vars
.
length
>
0
){
if
(
vars
.
length
>
0
)
{
var1
=
Integer
.
parseInt
(
vars
[
0
]);
var1
=
Integer
.
parseInt
(
vars
[
0
]);
}
}
if
(
vars
.
length
>
1
){
if
(
vars
.
length
>
1
)
{
var2
=
Integer
.
parseInt
(
vars
[
1
]);
var2
=
Integer
.
parseInt
(
vars
[
1
]);
}
}
if
(
vars
.
length
>
2
){
if
(
vars
.
length
>
2
)
{
var3
=
Integer
.
parseInt
(
vars
[
2
]);
var3
=
Integer
.
parseInt
(
vars
[
2
]);
}
}
if
(
var1
==
24
&&
var2
==
5
&&
var3
==
19
)
{
//String jsonStr = JsonUtils.toJsonString(param);
//JsonUtils.SaveLog("定时任务参数为:"+jsonStr);
//调用存储过程自动核销
allWriteOffService
.
auto_writeoff
();
}
}
}
return
""
;
return
""
;
}
}
...
...
yudao-module-delivery/yudao-module-delivery-rest/src/main/java/cn/iocoder/yudao/module/delivery/listener/CalculateCustomerType.java
View file @
d7fda5d3
...
@@ -2,12 +2,15 @@ package cn.iocoder.yudao.module.delivery.listener;
...
@@ -2,12 +2,15 @@ package cn.iocoder.yudao.module.delivery.listener;
import
cn.iocoder.yudao.framework.apollo.core.event.Customer.CalculateCustomerTypeEvent
;
import
cn.iocoder.yudao.framework.apollo.core.event.Customer.CalculateCustomerTypeEvent
;
import
cn.iocoder.yudao.module.customer.service.customer.CustomerService
;
import
cn.iocoder.yudao.module.customer.service.customer.CustomerService
;
import
cn.iocoder.yudao.module.delivery.entity.deptex.zTest
;
import
cn.iocoder.yudao.module.delivery.service.ZTestService
;
import
lombok.AllArgsConstructor
;
import
lombok.AllArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.context.event.EventListener
;
import
org.springframework.context.event.EventListener
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
import
java.util.Date
;
/*
/*
lanbm 2024-05-07 add
lanbm 2024-05-07 add
...
@@ -20,6 +23,9 @@ public class CalculateCustomerType {
...
@@ -20,6 +23,9 @@ public class CalculateCustomerType {
@Resource
@Resource
private
CustomerService
customerService
;
private
CustomerService
customerService
;
@Resource
private
ZTestService
zTestService
;
/**
/**
* 客户捞取监听事件 lanbm 2024-05-07 add
* 客户捞取监听事件 lanbm 2024-05-07 add
* @param event
* @param event
...
@@ -27,26 +33,35 @@ public class CalculateCustomerType {
...
@@ -27,26 +33,35 @@ public class CalculateCustomerType {
@EventListener
(
CalculateCustomerTypeEvent
.
class
)
@EventListener
(
CalculateCustomerTypeEvent
.
class
)
public
void
CalculateCustomerTypePushEvent
(
public
void
CalculateCustomerTypePushEvent
(
CalculateCustomerTypeEvent
event
)
{
CalculateCustomerTypeEvent
event
)
{
zTest
m
=
new
zTest
();
String
sMsg
=
"计算开始"
;
if
(
event
.
getNewCustomerService
()
==
event
.
getOldCustomerService
())
{
if
(
event
.
getNewCustomerService
()
==
event
.
getOldCustomerService
())
{
//新客户经理和老客户经理是同一客户经理
//新客户经理和老客户经理是同一客户经理
//继续判断有无成交记录
//继续判断有无成交记录
//有成交记录 客户业绩类型=老客户
//有成交记录 客户业绩类型=老客户
//没成交记录 客户业绩类型=新客户
//没成交记录 客户业绩类型=新客户
sMsg
+=
",新老一致"
;
boolean
bR
=
isHaving_TransactionRecords
(
event
);
boolean
bR
=
isHaving_TransactionRecords
(
event
);
if
(
bR
==
true
)
{
if
(
bR
==
true
)
{
//有成交记录
//有成交记录
sMsg
+=
",有成交"
;
customerService
.
updateCustomerNewOrOld
(
event
.
getCustomerId
(),
customerService
.
updateCustomerNewOrOld
(
event
.
getCustomerId
(),
false
);
false
);
}
else
{
}
else
{
//无成交记录
//无成交记录
sMsg
+=
",无成交"
;
customerService
.
updateCustomerNewOrOld
(
event
.
getCustomerId
(),
customerService
.
updateCustomerNewOrOld
(
event
.
getCustomerId
(),
true
);
true
);
}
}
}
else
{
}
else
{
//新客户经理和老客户经理不是同一客户经理
//新客户经理和老客户经理不是同一客户经理
//客户业绩类型=新客户
//客户业绩类型=新客户
sMsg
+=
",新老不一致"
;
customerService
.
updateCustomerNewOrOld
(
event
.
getCustomerId
(),
true
);
customerService
.
updateCustomerNewOrOld
(
event
.
getCustomerId
(),
true
);
}
}
m
.
setTestname
(
sMsg
);
m
.
setCreatedate
(
new
Date
());
zTestService
.
save
(
m
);
}
}
/*
/*
...
...
yudao-module-delivery/yudao-module-delivery-rest/src/main/java/cn/iocoder/yudao/module/delivery/listener/CalculateOrderVValueListener.java
View file @
d7fda5d3
...
@@ -3,7 +3,9 @@ package cn.iocoder.yudao.module.delivery.listener;
...
@@ -3,7 +3,9 @@ package cn.iocoder.yudao.module.delivery.listener;
import
cn.iocoder.yudao.framework.apollo.core.event.Order.CalculateOrderVValueEvent
;
import
cn.iocoder.yudao.framework.apollo.core.event.Order.CalculateOrderVValueEvent
;
import
cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX
;
import
cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX
;
import
cn.iocoder.yudao.module.delivery.entity.EcwVz
;
import
cn.iocoder.yudao.module.delivery.entity.EcwVz
;
import
cn.iocoder.yudao.module.delivery.entity.deptex.zTest
;
import
cn.iocoder.yudao.module.delivery.service.EcwVzService
;
import
cn.iocoder.yudao.module.delivery.service.EcwVzService
;
import
cn.iocoder.yudao.module.delivery.service.ZTestService
;
import
cn.iocoder.yudao.module.order.dal.dataobject.order.OrderDO
;
import
cn.iocoder.yudao.module.order.dal.dataobject.order.OrderDO
;
import
cn.iocoder.yudao.module.order.service.order.OrderService
;
import
cn.iocoder.yudao.module.order.service.order.OrderService
;
import
lombok.AllArgsConstructor
;
import
lombok.AllArgsConstructor
;
...
@@ -12,6 +14,7 @@ import org.springframework.beans.factory.annotation.Autowired;
...
@@ -12,6 +14,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.context.event.EventListener
;
import
org.springframework.context.event.EventListener
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
import
javax.annotation.Resource
;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
import
java.util.Date
;
import
java.util.Date
;
...
@@ -33,10 +36,14 @@ public class CalculateOrderVValueListener {
...
@@ -33,10 +36,14 @@ public class CalculateOrderVValueListener {
@Autowired
@Autowired
private
EcwVzService
ecwVzService
;
private
EcwVzService
ecwVzService
;
@Resource
private
ZTestService
zTestService
;
@EventListener
(
CalculateOrderVValueEvent
.
class
)
@EventListener
(
CalculateOrderVValueEvent
.
class
)
public
void
CalculateOrderVValuePushEvent
(
public
void
CalculateOrderVValuePushEvent
(
CalculateOrderVValueEvent
event
)
{
CalculateOrderVValueEvent
event
)
{
zTest
m
=
new
zTest
();
String
sMsg
=
"计算V值"
;
OrderDO
orderDO
=
orderService
.
getById
(
event
.
getOrderId
());
OrderDO
orderDO
=
orderService
.
getById
(
event
.
getOrderId
());
if
(
orderDO
==
null
)
{
if
(
orderDO
==
null
)
{
throw
exception
(
ORDER_NOT_EXISTS
);
throw
exception
(
ORDER_NOT_EXISTS
);
...
@@ -44,6 +51,7 @@ public class CalculateOrderVValueListener {
...
@@ -44,6 +51,7 @@ public class CalculateOrderVValueListener {
//订单状态为已入仓之后的状态,其他状态是否排除,后续和客户确认,先按此逻辑处理
//订单状态为已入仓之后的状态,其他状态是否排除,后续和客户确认,先按此逻辑处理
int
nS
=
orderDO
.
getStatus
();
int
nS
=
orderDO
.
getStatus
();
if
(
nS
>=
5
)
{
if
(
nS
>=
5
)
{
sMsg
+=
",已入仓"
;
//查询配置参数信息
//查询配置参数信息
EcwVz
temp
=
null
;
EcwVz
temp
=
null
;
BigDecimal
CalVvalue
=
new
BigDecimal
(
0
);
BigDecimal
CalVvalue
=
new
BigDecimal
(
0
);
...
@@ -74,6 +82,14 @@ public class CalculateOrderVValueListener {
...
@@ -74,6 +82,14 @@ public class CalculateOrderVValueListener {
orderService
.
UpdateOrderVValue
(
event
.
getOrderId
(),
CalVvalue
,
orderService
.
UpdateOrderVValue
(
event
.
getOrderId
(),
CalVvalue
,
event
.
getYejiCreateDate
());
event
.
getYejiCreateDate
());
}
}
else
{
sMsg
+=
",未入仓"
;
}
m
.
setTestname
(
sMsg
);
m
.
setCreatedate
(
new
Date
());
zTestService
.
save
(
m
);
}
}
}
}
yudao-module-delivery/yudao-module-delivery-rest/src/main/java/cn/iocoder/yudao/module/delivery/listener/CalculateOrderYeJiTypeListener.java
View file @
d7fda5d3
...
@@ -4,6 +4,8 @@ import cn.iocoder.yudao.framework.apollo.core.event.Customer.CalculateCustomerTy
...
@@ -4,6 +4,8 @@ import cn.iocoder.yudao.framework.apollo.core.event.Customer.CalculateCustomerTy
import
cn.iocoder.yudao.framework.apollo.core.event.Order.CalculateOrderYeJiTypeEvent
;
import
cn.iocoder.yudao.framework.apollo.core.event.Order.CalculateOrderYeJiTypeEvent
;
import
cn.iocoder.yudao.module.customer.dal.dataobject.customer.CustomerDO
;
import
cn.iocoder.yudao.module.customer.dal.dataobject.customer.CustomerDO
;
import
cn.iocoder.yudao.module.customer.service.customer.CustomerService
;
import
cn.iocoder.yudao.module.customer.service.customer.CustomerService
;
import
cn.iocoder.yudao.module.delivery.entity.deptex.zTest
;
import
cn.iocoder.yudao.module.delivery.service.ZTestService
;
import
cn.iocoder.yudao.module.order.dal.dataobject.order.OrderDO
;
import
cn.iocoder.yudao.module.order.dal.dataobject.order.OrderDO
;
import
cn.iocoder.yudao.module.order.service.order.OrderService
;
import
cn.iocoder.yudao.module.order.service.order.OrderService
;
import
lombok.AllArgsConstructor
;
import
lombok.AllArgsConstructor
;
...
@@ -12,6 +14,10 @@ import org.springframework.beans.factory.annotation.Autowired;
...
@@ -12,6 +14,10 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.context.event.EventListener
;
import
org.springframework.context.event.EventListener
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
import
javax.annotation.Resource
;
import
java.util.Date
;
import
static
cn
.
iocoder
.
yudao
.
framework
.
common
.
exception
.
util
.
ServiceExceptionUtil
.
exception
;
import
static
cn
.
iocoder
.
yudao
.
framework
.
common
.
exception
.
util
.
ServiceExceptionUtil
.
exception
;
import
static
cn
.
iocoder
.
yudao
.
module
.
delivery
.
enums
.
ErrorCodeConstants
.
CUSTOMER_NOT_EXISTS
;
import
static
cn
.
iocoder
.
yudao
.
module
.
delivery
.
enums
.
ErrorCodeConstants
.
CUSTOMER_NOT_EXISTS
;
import
static
cn
.
iocoder
.
yudao
.
module
.
order
.
enums
.
ErrorCodeConstants
.
ORDER_NOT_EXISTS
;
import
static
cn
.
iocoder
.
yudao
.
module
.
order
.
enums
.
ErrorCodeConstants
.
ORDER_NOT_EXISTS
;
...
@@ -31,10 +37,16 @@ public class CalculateOrderYeJiTypeListener {
...
@@ -31,10 +37,16 @@ public class CalculateOrderYeJiTypeListener {
@Autowired
@Autowired
private
CustomerService
customerService
;
private
CustomerService
customerService
;
@Resource
private
ZTestService
zTestService
;
@EventListener
(
CalculateOrderYeJiTypeEvent
.
class
)
@EventListener
(
CalculateOrderYeJiTypeEvent
.
class
)
public
void
CalculateOrderYeJiTypePushEvent
(
public
void
CalculateOrderYeJiTypePushEvent
(
CalculateOrderYeJiTypeEvent
event
)
{
CalculateOrderYeJiTypeEvent
event
)
{
zTest
m
=
new
zTest
();
String
sMsg
=
"计算业绩类型"
;
OrderDO
orderDO
=
orderService
.
getById
(
event
.
getOrderId
());
OrderDO
orderDO
=
orderService
.
getById
(
event
.
getOrderId
());
if
(
orderDO
==
null
)
{
if
(
orderDO
==
null
)
{
throw
exception
(
ORDER_NOT_EXISTS
);
throw
exception
(
ORDER_NOT_EXISTS
);
...
@@ -47,13 +59,21 @@ public class CalculateOrderYeJiTypeListener {
...
@@ -47,13 +59,21 @@ public class CalculateOrderYeJiTypeListener {
}
}
int
isNew
=
0
;
int
isNew
=
0
;
if
(
customerDO
.
getIsNew
()
==
true
)
if
(
customerDO
.
getIsNew
()
==
true
)
{
isNew
=
1
;
//新客户业绩类型
isNew
=
1
;
//新客户业绩类型
else
sMsg
+=
",新业绩"
;
}
else
{
isNew
=
0
;
//老客户业绩类型
isNew
=
0
;
//老客户业绩类型
sMsg
+=
",老业绩"
;
}
orderService
.
UpdateOrderYeJiType
(
event
.
getOrderId
(),
isNew
);
orderService
.
UpdateOrderYeJiType
(
event
.
getOrderId
(),
isNew
);
m
.
setTestname
(
sMsg
);
m
.
setCreatedate
(
new
Date
());
zTestService
.
save
(
m
);
}
}
}
}
yudao-module-delivery/yudao-module-delivery-rest/src/main/java/cn/iocoder/yudao/module/delivery/listener/ReceiveCustomerCalTypeListener.java
View file @
d7fda5d3
...
@@ -2,14 +2,17 @@ package cn.iocoder.yudao.module.delivery.listener;
...
@@ -2,14 +2,17 @@ package cn.iocoder.yudao.module.delivery.listener;
import
cn.iocoder.yudao.framework.apollo.core.event.Customer.ReceiveCustomerCalTypeEvent
;
import
cn.iocoder.yudao.framework.apollo.core.event.Customer.ReceiveCustomerCalTypeEvent
;
import
cn.iocoder.yudao.module.customer.service.customer.CustomerService
;
import
cn.iocoder.yudao.module.customer.service.customer.CustomerService
;
import
cn.iocoder.yudao.module.delivery.entity.deptex.zTest
;
import
cn.iocoder.yudao.module.delivery.service.Impl.OrderServiceExtImpl
;
import
cn.iocoder.yudao.module.delivery.service.Impl.OrderServiceExtImpl
;
import
cn.iocoder.yudao.module.delivery.service.OrderServiceExt
;
import
cn.iocoder.yudao.module.delivery.service.OrderServiceExt
;
import
cn.iocoder.yudao.module.delivery.service.ZTestService
;
import
lombok.AllArgsConstructor
;
import
lombok.AllArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.context.event.EventListener
;
import
org.springframework.context.event.EventListener
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
import
java.util.Date
;
/*
/*
移交,接收客户是计算客户业绩类型
移交,接收客户是计算客户业绩类型
...
@@ -26,27 +29,39 @@ public class ReceiveCustomerCalTypeListener {
...
@@ -26,27 +29,39 @@ public class ReceiveCustomerCalTypeListener {
@Resource
@Resource
private
OrderServiceExt
orderServiceExt
;
private
OrderServiceExt
orderServiceExt
;
@Resource
private
ZTestService
zTestService
;
@EventListener
(
ReceiveCustomerCalTypeEvent
.
class
)
@EventListener
(
ReceiveCustomerCalTypeEvent
.
class
)
public
void
CalculateCustomerTypePushEvent
(
public
void
CalculateCustomerTypePushEvent
(
ReceiveCustomerCalTypeEvent
event
)
{
ReceiveCustomerCalTypeEvent
event
)
{
//CustomerServiceImpl confirmCustomer 函数中触发事件 客户经理直接确认接收
//CustomerServiceImpl confirmCustomer 函数中触发事件 客户经理直接确认接收
//CustomerServiceImpl receiveCustomer 函数中触发,移交,系统分配,接收时判断
//CustomerServiceImpl receiveCustomer 函数中触发,移交,系统分配,接收时判断
//CustomerServiceImpl updateCustomer 函数中触发,完善客户信息
//CustomerServiceImpl updateCustomer 函数中触发,完善客户信息
zTest
m
=
new
zTest
();
String
sMsg
=
"接收客户"
;
if
(
event
.
getIsNew
()
==
true
)
{
if
(
event
.
getIsNew
()
==
true
)
{
//移交接收前是新客户
//移交接收前是新客户
sMsg
+=
",新客户"
;
boolean
bR
=
IsHavingRuCanOrder
(
event
);
boolean
bR
=
IsHavingRuCanOrder
(
event
);
if
(
bR
==
true
)
{
if
(
bR
==
true
)
{
sMsg
+=
",有业绩"
;
//客户有订单已入仓且业绩归属客户方,接收后客户业绩类型,变更为老客户
//客户有订单已入仓且业绩归属客户方,接收后客户业绩类型,变更为老客户
customerService
.
updateCustomerNewOrOld
(
event
.
getCustomerId
(),
customerService
.
updateCustomerNewOrOld
(
event
.
getCustomerId
(),
false
);
false
);
}
else
{
}
else
{
sMsg
+=
",无业绩"
;
//客户没有订单已入仓,变更为新客户
//客户没有订单已入仓,变更为新客户
//维持老客户不变,可不做任何逻辑操作
//维持老客户不变,可不做任何逻辑操作
}
}
}
else
{
}
else
{
//移交接收前是老客户
//移交接收前是老客户
//维持老客户不变,可不做任何逻辑操作
//维持老客户不变,可不做任何逻辑操作
sMsg
+=
",老客户"
;
}
}
m
.
setTestname
(
sMsg
);
m
.
setCreatedate
(
new
Date
());
zTestService
.
save
(
m
);
}
}
/*
/*
...
...
yudao-module-delivery/yudao-module-delivery-rest/src/main/java/cn/iocoder/yudao/module/delivery/mapper/AllWriteOffMapper.java
0 → 100644
View file @
d7fda5d3
package
cn
.
iocoder
.
yudao
.
module
.
delivery
.
mapper
;
import
org.apache.ibatis.annotations.Mapper
;
@Mapper
public
interface
AllWriteOffMapper
{
String
ttest
();
String
auto_writeoff
();
}
yudao-module-delivery/yudao-module-delivery-rest/src/main/java/cn/iocoder/yudao/module/delivery/mapper/ZTestMapper.java
0 → 100644
View file @
d7fda5d3
package
cn
.
iocoder
.
yudao
.
module
.
delivery
.
mapper
;
import
cn.iocoder.yudao.module.delivery.entity.deptex.zTest
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
org.apache.ibatis.annotations.Mapper
;
@Mapper
public
interface
ZTestMapper
extends
BaseMapper
<
zTest
>
{
}
yudao-module-delivery/yudao-module-delivery-rest/src/main/java/cn/iocoder/yudao/module/delivery/service/AllWriteOffService.java
0 → 100644
View file @
d7fda5d3
package
cn
.
iocoder
.
yudao
.
module
.
delivery
.
service
;
public
interface
AllWriteOffService
{
String
ttest
();
String
auto_writeoff
();
}
yudao-module-delivery/yudao-module-delivery-rest/src/main/java/cn/iocoder/yudao/module/delivery/service/Impl/AllWriteOffImpl.java
0 → 100644
View file @
d7fda5d3
package
cn
.
iocoder
.
yudao
.
module
.
delivery
.
service
.
Impl
;
import
cn.iocoder.yudao.module.delivery.mapper.AllWriteOffMapper
;
import
cn.iocoder.yudao.module.delivery.mapper.EcwVzMapper
;
import
cn.iocoder.yudao.module.delivery.service.AllWriteOffService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
@Service
(
"AllWriteOffImpl"
)
public
class
AllWriteOffImpl
implements
AllWriteOffService
{
@Autowired
private
AllWriteOffMapper
allWriteOffMapper
;
public
String
ttest
()
{
return
allWriteOffMapper
.
ttest
();
}
/*
调用自动核销存储过程
lanbm 2024-05-19 add
*/
public
String
auto_writeoff
()
{
return
allWriteOffMapper
.
auto_writeoff
();
}
}
yudao-module-delivery/yudao-module-delivery-rest/src/main/java/cn/iocoder/yudao/module/delivery/service/Impl/ZTestImpl.java
0 → 100644
View file @
d7fda5d3
package
cn
.
iocoder
.
yudao
.
module
.
delivery
.
service
.
Impl
;
import
cn.iocoder.yudao.module.delivery.entity.deptex.zTest
;
import
cn.iocoder.yudao.module.delivery.mapper.ZTestMapper
;
import
cn.iocoder.yudao.module.delivery.service.ZTestService
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
org.springframework.stereotype.Service
;
@Service
(
"ZTestService"
)
public
class
ZTestImpl
extends
ServiceImpl
<
ZTestMapper
,
zTest
>
implements
ZTestService
{
}
yudao-module-delivery/yudao-module-delivery-rest/src/main/java/cn/iocoder/yudao/module/delivery/service/ZTestService.java
0 → 100644
View file @
d7fda5d3
package
cn
.
iocoder
.
yudao
.
module
.
delivery
.
service
;
import
cn.iocoder.yudao.module.delivery.entity.deptex.zTest
;
import
com.baomidou.mybatisplus.extension.service.IService
;
public
interface
ZTestService
extends
IService
<
zTest
>
{
}
yudao-module-delivery/yudao-module-delivery-rest/src/main/resources/mapper/AllWriteOffMapper.xml
0 → 100644
View file @
d7fda5d3
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"cn.iocoder.yudao.module.delivery.mapper.AllWriteOffMapper"
>
<!-- 测试调用无参数的存储过程 -->
<select
id=
"ttest"
statementType=
"CALLABLE"
resultType=
"java.lang.String"
>
{call t_test()}
</select>
<!--调用自动核销存储过程-->
<select
id=
"auto_writeoff"
statementType=
"CALLABLE"
resultType=
"java.lang.String"
>
{call auto_writeoff()}
</select>
<!--mybatis调用存储过程-->
<!--
<select id="deleteFrient" statementType="CALLABLE">
call deleteFrient(
#{userIdOne,jdbcType=VARCHAR,mode=IN},
#{userIdTwo,jdbcType=VARCHAR,mode=IN}
)
</select>-->
</mapper>
yudao-module-delivery/yudao-module-delivery-rest/src/main/resources/mapper/ZTestMapper.xml
0 → 100644
View file @
d7fda5d3
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"cn.iocoder.yudao.module.delivery.mapper.ZTestMapper"
>
</mapper>
yudao-module-infra/yudao-module-infra-impl/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/job/JobController.java
View file @
d7fda5d3
...
@@ -30,6 +30,10 @@ import java.util.List;
...
@@ -30,6 +30,10 @@ import java.util.List;
import
static
cn
.
iocoder
.
yudao
.
framework
.
common
.
pojo
.
CommonResult
.
success
;
import
static
cn
.
iocoder
.
yudao
.
framework
.
common
.
pojo
.
CommonResult
.
success
;
import
static
cn
.
iocoder
.
yudao
.
framework
.
operatelog
.
core
.
enums
.
OperateTypeEnum
.
EXPORT
;
import
static
cn
.
iocoder
.
yudao
.
framework
.
operatelog
.
core
.
enums
.
OperateTypeEnum
.
EXPORT
;
/*
定时任务相关逻辑 lanbm 2024-05-19
添加注释
*/
@Api
(
tags
=
"管理后台 - 定时任务"
)
@Api
(
tags
=
"管理后台 - 定时任务"
)
@RestController
@RestController
@RequestMapping
(
"/infra/job"
)
@RequestMapping
(
"/infra/job"
)
...
...
yudao-module-infra/yudao-module-infra-impl/src/main/java/cn/iocoder/yudao/module/infra/service/job/JobServiceImpl.java
View file @
d7fda5d3
...
@@ -115,7 +115,9 @@ public class JobServiceImpl implements JobService {
...
@@ -115,7 +115,9 @@ public class JobServiceImpl implements JobService {
JobDO
job
=
this
.
validateJobExists
(
id
);
JobDO
job
=
this
.
validateJobExists
(
id
);
// 触发 Quartz 中的 Job
// 触发 Quartz 中的 Job
schedulerManager
.
triggerJob
(
job
.
getId
(),
job
.
getHandlerName
(),
job
.
getHandlerParam
());
schedulerManager
.
triggerJob
(
job
.
getId
(),
job
.
getHandlerName
(),
job
.
getHandlerParam
());
}
}
@Override
@Override
...
...
yudao-module-shipment/yudao-module-shipment-core/src/main/java/cn/iocoder/yudao/module/shipment/dal/dataobject/BoxCostDO.java
View file @
d7fda5d3
...
@@ -53,4 +53,9 @@ public class BoxCostDO extends BaseDO {
...
@@ -53,4 +53,9 @@ public class BoxCostDO extends BaseDO {
*/
*/
private
String
remarks
;
private
String
remarks
;
/*
费用产生时间 lanbm 2024-05-17 add
*/
private
Date
freecsdate
;
}
}
yudao-module-shipment/yudao-module-shipment-core/src/main/java/cn/iocoder/yudao/module/shipment/service/boxCost/BoxCostServiceImpl.java
View file @
d7fda5d3
...
@@ -71,6 +71,8 @@ public class BoxCostServiceImpl extends AbstractService<BoxCostMapper, BoxCostDO
...
@@ -71,6 +71,8 @@ public class BoxCostServiceImpl extends AbstractService<BoxCostMapper, BoxCostDO
req
.
setDestWarehouseId
(
boxDO
.
getDestWarehouseId
());
req
.
setDestWarehouseId
(
boxDO
.
getDestWarehouseId
());
req
.
setTransportId
(
Long
.
valueOf
(
boxDO
.
getTransportType
()));
req
.
setTransportId
(
Long
.
valueOf
(
boxDO
.
getTransportType
()));
req
.
setShippingFeeId
(
boxCost
.
getId
());
req
.
setShippingFeeId
(
boxCost
.
getId
());
//lanbm 2024-05-17 add 费用产生日期
req
.
setFreecsdate
(
boxCost
.
getFreecsdate
());
payableService
.
createPayable
(
req
);
payableService
.
createPayable
(
req
);
return
boxCost
.
getId
();
return
boxCost
.
getId
();
}
}
...
...
yudao-module-shipment/yudao-module-shipment-core/src/main/java/cn/iocoder/yudao/module/shipment/vo/boxCost/BoxCostBackVO.java
View file @
d7fda5d3
...
@@ -83,11 +83,11 @@ public class BoxCostBackVO {
...
@@ -83,11 +83,11 @@ public class BoxCostBackVO {
*/
*/
private
long
payableId
;
private
long
payableId
;
@
DateTime
Format
(
pattern
=
FORMAT_YEAR_MONTH_DAY
)
@
Json
Format
(
pattern
=
FORMAT_YEAR_MONTH_DAY
)
@ApiModelProperty
(
value
=
"实付时间"
,
required
=
true
)
@ApiModelProperty
(
value
=
"实付时间"
,
required
=
true
)
private
Date
payTime
;
private
Date
payTime
;
@
DateTime
Format
(
pattern
=
FORMAT_YEAR_MONTH_DAY
)
@
Json
Format
(
pattern
=
FORMAT_YEAR_MONTH_DAY
)
private
Date
updateTime
;
private
Date
updateTime
;
private
String
updater
;
private
String
updater
;
...
...
yudao-module-shipment/yudao-module-shipment-core/src/main/java/cn/iocoder/yudao/module/shipment/vo/boxCost/BoxCostBaseVO.java
View file @
d7fda5d3
package
cn
.
iocoder
.
yudao
.
module
.
shipment
.
vo
.
boxCost
;
package
cn
.
iocoder
.
yudao
.
module
.
shipment
.
vo
.
boxCost
;
import
lombok.*
;
import
lombok.*
;
import
java.util.*
;
import
java.util.*
;
import
io.swagger.annotations.*
;
import
io.swagger.annotations.*
;
import
javax.validation.constraints.*
;
import
javax.validation.constraints.*
;
/**
/**
* 费用登记 Base VO,提供给添加、修改、详细的子 VO 使用
* 费用登记 Base VO,提供给添加、修改、详细的子 VO 使用
* 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成
* 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成
*/
*/
@Data
@Data
public
class
BoxCostBaseVO
{
public
class
BoxCostBaseVO
{
...
@@ -39,4 +42,11 @@ public class BoxCostBaseVO {
...
@@ -39,4 +42,11 @@ public class BoxCostBaseVO {
@ApiModelProperty
(
value
=
"备注"
)
@ApiModelProperty
(
value
=
"备注"
)
private
String
remarks
;
private
String
remarks
;
/*
费用产生时间 lanbm 2024-05-17 add
*/
@ApiModelProperty
(
value
=
"费用产生日期"
)
@NotNull
(
message
=
"费用产生日期不能为空"
)
private
Date
freecsdate
;
}
}
yudao-module-shipment/yudao-module-shipment-rest/src/main/java/cn/iocoder/yudao/module/shipment/controller/admin/BoxCostController.java
View file @
d7fda5d3
...
@@ -68,8 +68,10 @@ public class BoxCostController {
...
@@ -68,8 +68,10 @@ public class BoxCostController {
@PostMapping
(
"/create"
)
@PostMapping
(
"/create"
)
@ApiOperation
(
"创建费用登记, use this"
)
@ApiOperation
(
"创建费用登记, use this"
)
//
@PreAuthorize("@ss.hasPermission('ecw:box-cost:create')")
//
@PreAuthorize("@ss.hasPermission('ecw:box-cost:create')")
public
CommonResult
<
Long
>
createBoxCost
(
@Valid
@RequestBody
BoxCostCreateReqVO
createReqVO
)
{
public
CommonResult
<
Long
>
createBoxCost
(
@Valid
@RequestBody
BoxCostCreateReqVO
createReqVO
)
{
//lanbm 2024-05-17 添加费用产生日期字段
String
s
=
""
;
return
success
(
boxCostService
.
createBoxCost
(
createReqVO
));
return
success
(
boxCostService
.
createBoxCost
(
createReqVO
));
}
}
...
@@ -77,6 +79,8 @@ public class BoxCostController {
...
@@ -77,6 +79,8 @@ public class BoxCostController {
@ApiOperation
(
"更新费用登记, use this"
)
@ApiOperation
(
"更新费用登记, use this"
)
// @PreAuthorize("@ss.hasPermission('ecw:box-cost:update')")
// @PreAuthorize("@ss.hasPermission('ecw:box-cost:update')")
public
CommonResult
<
Boolean
>
updateBoxCost
(
@Valid
@RequestBody
BoxCostUpdateReqVO
updateReqVO
)
{
public
CommonResult
<
Boolean
>
updateBoxCost
(
@Valid
@RequestBody
BoxCostUpdateReqVO
updateReqVO
)
{
//lanbm 2024-05-17 添加费用产生日期字段
String
s
=
""
;
boxCostService
.
updateBoxCost
(
updateReqVO
);
boxCostService
.
updateBoxCost
(
updateReqVO
);
return
success
(
true
);
return
success
(
true
);
}
}
...
...
yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/job/log/LogClearJob.java
View file @
d7fda5d3
...
@@ -15,7 +15,7 @@ import javax.annotation.Resource;
...
@@ -15,7 +15,7 @@ import javax.annotation.Resource;
/**
/**
* 删除30天前的系统相关日志 Job
* 删除30天前的系统相关日志 Job
*
*
* @author
願
* @author
*/
*/
@Component
@Component
@TenantJob
@TenantJob
...
...
yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/user/AdminUserService.java
View file @
d7fda5d3
...
@@ -200,6 +200,11 @@ public interface AdminUserService {
...
@@ -200,6 +200,11 @@ public interface AdminUserService {
*/
*/
List
<
AdminUserDO
>
getUsersByStatus
(
Integer
status
);
List
<
AdminUserDO
>
getUsersByStatus
(
Integer
status
);
/*
获取所有用户信息 lanbm 2024-05-17 add
*/
List
<
AdminUserDO
>
getUsersList
();
/**
/**
* 获取生效的客户经理岗位id
* 获取生效的客户经理岗位id
*
*
...
...
yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/user/AdminUserServiceImpl.java
View file @
d7fda5d3
...
@@ -444,4 +444,11 @@ public class AdminUserServiceImpl implements AdminUserService {
...
@@ -444,4 +444,11 @@ public class AdminUserServiceImpl implements AdminUserService {
}
}
return
false
;
return
false
;
}
}
/*
lanbm 2024-05-17 add
*/
public
List
<
AdminUserDO
>
getUsersList
()
{
return
userMapper
.
selectList
();
}
}
}
yudao-module-wealth/yudao-module-wealth-core/pom.xml
View file @
d7fda5d3
...
@@ -31,6 +31,11 @@
...
@@ -31,6 +31,11 @@
<artifactId>
yudao-module-system-api
</artifactId>
<artifactId>
yudao-module-system-api
</artifactId>
<version>
${revision}
</version>
<version>
${revision}
</version>
</dependency>
</dependency>
<dependency>
<groupId>
cn.iocoder.boot
</groupId>
<artifactId>
yudao-module-system-impl
</artifactId>
<version>
${revision}
</version>
</dependency>
<dependency>
<dependency>
<groupId>
cn.iocoder.boot
</groupId>
<groupId>
cn.iocoder.boot
</groupId>
<artifactId>
yudao-module-bpm-api
</artifactId>
<artifactId>
yudao-module-bpm-api
</artifactId>
...
@@ -43,5 +48,6 @@
...
@@ -43,5 +48,6 @@
<scope>
compile
</scope>
<scope>
compile
</scope>
</dependency>
</dependency>
</dependencies>
</dependencies>
</project>
</project>
yudao-module-wealth/yudao-module-wealth-core/src/main/java/cn/iocoder/yudao/module/wealth/dal/dataobject/payable/PayableDO.java
View file @
d7fda5d3
...
@@ -5,6 +5,8 @@ import com.baomidou.mybatisplus.annotation.TableId;
...
@@ -5,6 +5,8 @@ import com.baomidou.mybatisplus.annotation.TableId;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
lombok.*
;
import
lombok.*
;
import
java.util.Date
;
/**
/**
* 应付款 DO
* 应付款 DO
*
*
...
@@ -131,4 +133,9 @@ public class PayableDO extends BaseDO {
...
@@ -131,4 +133,9 @@ public class PayableDO extends BaseDO {
*/
*/
private
Long
shippingFeeId
;
private
Long
shippingFeeId
;
/*
费用产生时间 lanbm 2024-05-17 add
*/
private
Date
freecsdate
;
}
}
yudao-module-wealth/yudao-module-wealth-core/src/main/java/cn/iocoder/yudao/module/wealth/dal/dataobject/payment/PaymentDO.java
View file @
d7fda5d3
...
@@ -3,6 +3,7 @@ package cn.iocoder.yudao.module.wealth.dal.dataobject.payment;
...
@@ -3,6 +3,7 @@ package cn.iocoder.yudao.module.wealth.dal.dataobject.payment;
import
cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO
;
import
cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.*
;
import
lombok.*
;
import
java.util.Date
;
import
java.util.Date
;
...
@@ -144,4 +145,23 @@ public class PaymentDO extends BaseDO {
...
@@ -144,4 +145,23 @@ public class PaymentDO extends BaseDO {
*/
*/
private
String
comment
;
private
String
comment
;
/*
lanbm 2024-05-17 add
原来的付款备注没有保存
*/
@ApiModelProperty
(
value
=
"付款备注"
)
private
String
reason
;
/*
实际付款时间
*/
private
Date
sjfkdate
;
private
String
fkren
;
/*
核销时间 lanbm 2024-05-17 add
*/
private
Date
hexiaodate
;
}
}
yudao-module-wealth/yudao-module-wealth-core/src/main/java/cn/iocoder/yudao/module/wealth/dal/dataobject/receipt/ReceiptDO.java
View file @
d7fda5d3
...
@@ -209,4 +209,14 @@ public class ReceiptDO extends BaseDO {
...
@@ -209,4 +209,14 @@ public class ReceiptDO extends BaseDO {
* 财务备注
* 财务备注
*/
*/
private
String
financeRemark
;
private
String
financeRemark
;
/*
订单ID lanbm 2024-05-20 add
*/
private
long
orderId
;
/*
订单编号 lanbm 2024-05-20 add
*/
private
String
orderNo
;
}
}
yudao-module-wealth/yudao-module-wealth-core/src/main/java/cn/iocoder/yudao/module/wealth/dal/mysql/receiptItem/BankReceiptDetailsMapper.java
0 → 100644
View file @
d7fda5d3
package
cn
.
iocoder
.
yudao
.
module
.
wealth
.
dal
.
mysql
.
receiptItem
;
import
cn.iocoder.yudao.module.wealth.vo.receiptItem.ReceiptItemReq
;
import
cn.iocoder.yudao.module.wealth.vo.receiptItem.ReceiptItemResp
;
import
org.apache.ibatis.annotations.Mapper
;
import
java.util.List
;
/*
lanbm 2024-05-18 add
*/
@Mapper
public
interface
BankReceiptDetailsMapper
{
List
<
ReceiptItemResp
>
getBankReceiptDetailsList
(
ReceiptItemReq
req
);
/*
获取记录总数
*/
long
GetCount
(
ReceiptItemReq
req
);
}
yudao-module-wealth/yudao-module-wealth-core/src/main/java/cn/iocoder/yudao/module/wealth/enums/BoxAirStatusEnum.java
0 → 100644
View file @
d7fda5d3
package
cn
.
iocoder
.
yudao
.
module
.
wealth
.
enums
;
import
cn.hutool.core.util.ArrayUtil
;
public
enum
BoxAirStatusEnum
{
//待订舱
WAIT_FOR_BOOKING
(
401
,
"shipment.status.wait.booking"
),
//已订舱,待分拣
BOOKING_FOR_SORTING
(
403
,
"shipment.air.status.booking.already"
),
//分拣中
SORTING
(
404
,
"shipment.status.sorting"
),
//分拣审核中
SORTING_EXAMINE
(
405
,
"shipment.status.sorting.review"
),
//分拣审核失败
SORTING_EXAMINE_FAIL
(
406
,
"shipment.status.sorting.fail"
),
//分拣审核通过,待理货
SORTING_EXAMINE_SUCCESS
(
407
,
"shipment.air.status.sorting.success"
),
//完成理货、待出货
TALLY_COMPLETE
(
409
,
"shipment.air.status.tally.complete"
),
//已出货,待出仓
AIR_SHIPPED
(
411
,
"shipment.air.status.wait.warehouse"
),
//已出仓
WAREHOUSED
(
412
,
"shipment.status.out.warehoused"
),
//报关中
CUSTOMSING
(
413
,
"shipment.status.customs"
),
//报关-查验失败-部分退场
CUSTOMS_PART_EXIT
(
414
,
"shipment.status.customs.part.exit"
),
//报关-查验失败-全部退场
CUSTOMS_FULL_EXIT
(
415
,
"shipment.status.customs.full.exit"
),
//报关-查验后放行
CUSTOMS_CHECK_PASS
(
416
,
"shipment.status.customs.check.pass"
),
//报关-放行
CUSTOMS_PASS
(
417
,
"shipment.status.customs.pass"
),
//过机异常-删单退场审核中
CUSTOMS_ABNORMAL_EXAMINE
(
418
,
"shipment.status.customs.abnormal.exam"
),
//报关-过机重量异常
CUSTOMS_ABNORMAL_WEIGHT
(
419
,
"shipment.status.customs.abnormal"
),
//过机异常-删单退场审核成功
CUSTOMS_ABNORMAL_EXAMINE_SUCCESS
(
420
,
"shipment.status.customs.abnormal.pass"
),
//已报关
CUSTOMS_COMPLETE
(
421
,
"shipment.status.customsed"
),
//已起飞
FLYING
(
426
,
"shipment.status.flying"
),
//已到目的港
ARRIVAL_WAIT_DISCHARGE
(
428
,
"shipment.air.status.arrival"
),
//已清关
CLEARANCE_WAIT_WAREHOUSE
(
430
,
"shipment.status.customs.cleared"
),
//到仓审核中
TO_WAREHOUSE_EXAMINE
(
432
,
"shipment.status.warehouse.review"
),
//到仓审核失败
TO_WAREHOUSE_EXAMINE_FAIL
(
433
,
"shipment.status.warehouse.fail"
),
//到仓审核通过
TO_WAREHOUSE_EXAMINE_SUCCESS
(
434
,
"shipment.status.warehouse.pass"
),
//已到仓
TO_WAREHOUSED
(
435
,
"shipment.status.warehoused"
),
//待结算
WAIT_SETTLEMENT
(
436
,
"shipment.air.status.wait.settled"
),
//结算中
SETTLEMENTING
(
437
,
"shipment.air.status.settling"
),
//已结算
SETTLEMENTED
(
438
,
"shipment.air.status.settled"
);
private
int
status
;
private
String
text
;
BoxAirStatusEnum
(
int
status
,
String
text
)
{
this
.
status
=
status
;
this
.
text
=
text
;
}
public
int
getStatus
()
{
return
status
;
}
public
void
setStatus
(
int
status
)
{
this
.
status
=
status
;
}
public
String
getText
()
{
return
text
;
}
public
void
setText
(
String
text
)
{
this
.
text
=
text
;
}
public
static
BoxAirStatusEnum
getStatusEnumByStatus
(
Integer
shipmentStatus
)
{
return
ArrayUtil
.
firstMatch
(
o
->
(
o
.
getStatus
()
==
shipmentStatus
),
values
());
}
}
yudao-module-wealth/yudao-module-wealth-core/src/main/java/cn/iocoder/yudao/module/wealth/enums/BoxApprovalTypeEnum.java
0 → 100644
View file @
d7fda5d3
package
cn
.
iocoder
.
yudao
.
module
.
wealth
.
enums
;
//1预装,2封柜,3卸柜,4预装反审,5报关全退,6报关部分退,7卸柜反审核
public
enum
BoxApprovalTypeEnum
{
//预装
PRELOAD
(
1
,
"预装"
),
//装柜
SEALING_CABINET
(
2
,
"装柜"
),
//卸柜
UNLOAD_CABINET
(
3
,
"卸柜"
),
//预装反审
PRELOAD_UMPIRE
(
4
,
"预装反审"
),
//报关全退
CUSTOMS_FULL_REFUND
(
5
,
"报关全退"
),
//报关部分退
CUSTOMS_PART_REFUND
(
6
,
"报关部分退"
),
//卸柜反审
UNLOAD_UMPIRE
(
7
,
"卸柜反审"
),
//拆单
SPLIT_ORDER
(
8
,
"拆单"
),
//封柜反审
SEALING_CABINET_UMPIRE
(
9
,
"封柜反审"
),
// 报关部分退场后,对部分退场订单进行可能的拆单业务
PART_REFUND_SPLIT_ORDER
(
10
,
"部分退场拆单"
),
//删单退场审核
DELETE_EXIT
(
11
,
"删单退场"
),
AIR_SORTING
(
13
,
"排单分拣"
),
AIR_SORTING_BACK
(
14
,
"排单分拣反审"
),
AIR_TO_WAREHOUSE
(
15
,
"到仓"
),
AIR_TO_WAREHOUSE_BACK
(
16
,
"到仓反审"
),
AIR_SHIPMENT
(
17
,
"出货"
),
BATCH_ADD_PRICE
(
18
,
"批量加价"
),
AIR_SHIPMENT_BACK
(
19
,
"出货反审"
),
DELETE_EXIT_SPLIT_ORDER
(
20
,
"删单退场拆单"
),
CLEARANCE_BACK
(
21
,
"撤销清关"
),
;
private
int
type
;
private
String
text
;
BoxApprovalTypeEnum
(
int
type
,
String
text
)
{
this
.
type
=
type
;
this
.
text
=
text
;
}
public
int
getType
()
{
return
type
;
}
public
void
setType
(
int
type
)
{
this
.
type
=
type
;
}
public
String
getText
()
{
return
text
;
}
public
void
setText
(
String
text
)
{
this
.
text
=
text
;
}
public
static
BoxApprovalTypeEnum
getApprovalTypeByTypeValue
(
int
typeValue
)
{
BoxApprovalTypeEnum
[]
values
=
BoxApprovalTypeEnum
.
values
();
for
(
BoxApprovalTypeEnum
boxApprovalTypeEnum
:
values
)
{
if
(
boxApprovalTypeEnum
.
getType
()
==
typeValue
)
{
return
boxApprovalTypeEnum
;
}
}
return
null
;
}
}
yudao-module-wealth/yudao-module-wealth-core/src/main/java/cn/iocoder/yudao/module/wealth/enums/BoxStatusEnum.java
0 → 100644
View file @
d7fda5d3
package
cn
.
iocoder
.
yudao
.
module
.
wealth
.
enums
;
import
cn.hutool.core.util.ArrayUtil
;
public
enum
BoxStatusEnum
{
WAIT_FOR_BOOKING
(
301
,
"shipment.status.wait.booking"
),
BOOKING_FOR_PREINSTALL
(
303
,
"shipment.status.booking.already"
),
PREINSTALLING
(
304
,
"shipment.status.peloading"
),
PREINSTALL_EXAMINE
(
305
,
"shipment.status.preload.review"
),
PREINSTALL_EXAMINE_FAIL
(
306
,
"shipment.status.preload.fail"
),
PREINSTALL_EXAMINE_SUCCESS
(
307
,
"shipment.status.preload.success"
),
DISPATCHED_WAIT_CABINETS
(
309
,
"shipment.status.car.dispatched"
),
LIFTED_WAIT_RETURN
(
310
,
"shipment.status.cabinet.withdrawn"
),
CABINETS_RETURNED
(
311
,
"shipment.status.cabinet.returned"
),
IN_THE_CABINETS
(
313
,
"shipment.status.in.cabinet"
),
INSTALLED_WAIT_SEALED
(
314
,
"shipment.status.contained"
),
SEAL_EXAMINE
(
315
,
"shipment.status.cabinet.review"
),
SEAL_EXAMINE_FAIL
(
316
,
"shipment.status.cabinet.review.fail"
),
SEAL_EXAMINE_SUCCESS
(
317
,
"shipment.status.cabinet.review.success"
),
SEALED
(
318
,
"shipment.status.closed.cabinet"
),
CUSTOMSING
(
320
,
"shipment.status.customs"
),
CUSTOMS_PART_EXIT
(
322
,
"shipment.status.customs.part.exit"
),
CUSTOMS_FULL_EXIT
(
323
,
"shipment.status.customs.full.exit"
),
CUSTOMS_CHECK_PASS
(
324
,
"shipment.status.customs.check.pass"
),
CUSTOMS_PASS
(
325
,
"shipment.status.customs.pass"
),
SHIPPING
(
326
,
"shipment.status.shipping"
),
ARRIVAL_WAIT_DISCHARGE
(
328
,
"shipment.status.arrival"
),
DISCHARGE_WAIT_CLEARANCE
(
329
,
"shipment.status.unload"
),
CLEARANCE_WAIT_UNLOAD
(
330
,
"shipment.status.customs.cleared"
),
UNLOAD_EXAMINE
(
332
,
"shipment.status.unload.review"
),
UNLOAD_EXAMINE_FAIL
(
333
,
"shipment.status.unload.review.fail"
),
UNLOAD_EXAMINE_SUCCESS
(
334
,
"shipment.status.unload.review.success"
),
UNLOADED
(
335
,
"shipment.status.unload.cabinet"
),
WAIT_SETTLEMENT
(
336
,
"shipment.status.wait.settled"
),
SETTLEMENTING
(
337
,
"shipment.status.settling"
),
SETTLEMENTED
(
338
,
"shipment.status.settled"
),
TWO_WAY_TAKEOFF
(
391
,
"shipment.status.two.way.takeoff"
),
TWO_WAY_ARRIVAL
(
392
,
"shipment.status.two.way.arrival"
);
private
int
status
;
private
String
text
;
BoxStatusEnum
(
int
status
,
String
text
)
{
this
.
status
=
status
;
this
.
text
=
text
;
}
public
int
getStatus
()
{
return
status
;
}
public
void
setStatus
(
int
status
)
{
this
.
status
=
status
;
}
public
String
getText
()
{
return
text
;
}
public
void
setText
(
String
text
)
{
this
.
text
=
text
;
}
public
static
BoxStatusEnum
getStatusEnumByStatus
(
Integer
shipmentStatus
)
{
return
ArrayUtil
.
firstMatch
(
o
->
(
o
.
getStatus
()
==
shipmentStatus
),
values
());
}
}
yudao-module-wealth/yudao-module-wealth-core/src/main/java/cn/iocoder/yudao/module/wealth/enums/ErrorCodeConstants.java
View file @
d7fda5d3
...
@@ -31,6 +31,11 @@ public interface ErrorCodeConstants {
...
@@ -31,6 +31,11 @@ public interface ErrorCodeConstants {
ErrorCode
RECEIVABLE_NOT_NULL
=
new
ErrorCode
(
1004520011
,
"wealth.receivable_not_null"
);
ErrorCode
RECEIVABLE_NOT_NULL
=
new
ErrorCode
(
1004520011
,
"wealth.receivable_not_null"
);
/*
lanbm 2024-05-20 add
*/
ErrorCode
ORDER_ID_NULL
=
new
ErrorCode
(
1004520011
,
"订单编号为空"
);
ErrorCode
BILLING_INFO_NOT_COMPLETE
=
new
ErrorCode
(
1004520012
,
"wealth.billing_info_not_complete"
);
ErrorCode
BILLING_INFO_NOT_COMPLETE
=
new
ErrorCode
(
1004520012
,
"wealth.billing_info_not_complete"
);
ErrorCode
THIS_RECEIPT_NOT_STAY_INVOICE_STATE
=
new
ErrorCode
(
1004520013
,
"wealth.this_receipt_not_stay_invoice_state"
);
ErrorCode
THIS_RECEIPT_NOT_STAY_INVOICE_STATE
=
new
ErrorCode
(
1004520013
,
"wealth.this_receipt_not_stay_invoice_state"
);
...
...
yudao-module-wealth/yudao-module-wealth-core/src/main/java/cn/iocoder/yudao/module/wealth/enums/TransportTypeEnum.java
0 → 100644
View file @
d7fda5d3
package
cn
.
iocoder
.
yudao
.
module
.
wealth
.
enums
;
/*
lanbm 2024-05-17 移植过来的变量
*/
public
enum
TransportTypeEnum
{
SEA_COMBINED_CABINET
(
"1"
,
"海运拼柜"
),
SEA_WHOLE_CABINET
(
"2"
,
"海运整柜"
),
AIR
(
"3"
,
"空运"
),
SEA_AIR
(
"4"
,
"海空联运"
);
private
String
type
;
private
String
text
;
TransportTypeEnum
(
String
type
,
String
text
)
{
this
.
type
=
type
;
this
.
text
=
text
;
}
public
String
getType
()
{
return
type
;
}
public
void
setType
(
String
type
)
{
this
.
type
=
type
;
}
public
String
getText
()
{
return
text
;
}
public
void
setText
(
String
text
)
{
this
.
text
=
text
;
}
}
yudao-module-wealth/yudao-module-wealth-core/src/main/java/cn/iocoder/yudao/module/wealth/service/FinanceReceiptApproveService.java
View file @
d7fda5d3
...
@@ -59,7 +59,9 @@ public class FinanceReceiptApproveService {
...
@@ -59,7 +59,9 @@ public class FinanceReceiptApproveService {
public
void
financeApproveCallBack
(
String
bmpKey
,
String
businessKey
,
Integer
result
)
{
public
void
financeApproveCallBack
(
String
bmpKey
,
String
businessKey
,
Integer
result
)
{
ReceiptApprovalDO
receiptApprovalDO
=
receiptApprovalService
.
getReceiptApproval
(
Long
.
parseLong
(
businessKey
));
ReceiptApprovalDO
receiptApprovalDO
=
receiptApprovalService
.
getReceiptApproval
(
Long
.
parseLong
(
businessKey
));
// 查询最后审核的详细信息
// 查询最后审核的详细信息
TaskResp
taskResp
=
bpmCreateServiceFactory
.
getLastTaskByProcessInstanceId
(
receiptApprovalDO
.
getBmpId
());
TaskResp
taskResp
=
bpmCreateServiceFactory
.
getLastTaskByProcessInstanceId
(
receiptApprovalDO
.
getBmpId
());
String
comment
=
""
;
String
comment
=
""
;
if
(
Objects
.
nonNull
(
taskResp
))
{
if
(
Objects
.
nonNull
(
taskResp
))
{
comment
=
taskResp
.
getComment
();
comment
=
taskResp
.
getComment
();
...
@@ -75,6 +77,9 @@ public class FinanceReceiptApproveService {
...
@@ -75,6 +77,9 @@ public class FinanceReceiptApproveService {
throw
exception
(
RECEIPT_NOT_FOUND
);
throw
exception
(
RECEIPT_NOT_FOUND
);
}
}
ReceiptDO
updateReceipt
=
new
ReceiptDO
();
ReceiptDO
updateReceipt
=
new
ReceiptDO
();
//lanbm 2024-05-20 add 添加订单ID的修改,不然订单ID就丢失了
updateReceipt
.
setOrderId
(
receiptDO
.
getOrderId
());
updateReceipt
.
setId
(
receiptDO
.
getId
());
updateReceipt
.
setId
(
receiptDO
.
getId
());
updateReceipt
.
setBmpStatus
(
result
);
updateReceipt
.
setBmpStatus
(
result
);
if
(
result
==
BpmProcessInstanceResultEnum
.
APPROVE
.
getResult
())
{
if
(
result
==
BpmProcessInstanceResultEnum
.
APPROVE
.
getResult
())
{
...
@@ -103,6 +108,8 @@ public class FinanceReceiptApproveService {
...
@@ -103,6 +108,8 @@ public class FinanceReceiptApproveService {
throw
exception
(
RECEIPT_NOT_FOUND
);
throw
exception
(
RECEIPT_NOT_FOUND
);
}
}
ReceiptDO
updateReceipt
=
new
ReceiptDO
();
ReceiptDO
updateReceipt
=
new
ReceiptDO
();
//lanbm 2024-05-20 add 添加订单ID的修改,不然订单ID就丢失了
updateReceipt
.
setOrderId
(
receiptDO
.
getOrderId
());
updateReceipt
.
setId
(
receiptDO
.
getId
());
updateReceipt
.
setId
(
receiptDO
.
getId
());
updateReceipt
.
setBmpStatus
(
result
);
updateReceipt
.
setBmpStatus
(
result
);
if
(
result
==
BpmProcessInstanceResultEnum
.
APPROVE
.
getResult
())
{
if
(
result
==
BpmProcessInstanceResultEnum
.
APPROVE
.
getResult
())
{
...
@@ -124,6 +131,8 @@ public class FinanceReceiptApproveService {
...
@@ -124,6 +131,8 @@ public class FinanceReceiptApproveService {
throw
exception
(
RECEIPT_NOT_FOUND
);
throw
exception
(
RECEIPT_NOT_FOUND
);
}
}
ReceiptDO
updateReceipt
=
new
ReceiptDO
();
ReceiptDO
updateReceipt
=
new
ReceiptDO
();
//lanbm 2024-05-20 add 添加订单ID的修改,不然订单ID就丢失了
updateReceipt
.
setOrderId
(
receiptDO
.
getOrderId
());
updateReceipt
.
setId
(
receiptDO
.
getId
());
updateReceipt
.
setId
(
receiptDO
.
getId
());
updateReceipt
.
setBmpStatus
(
result
);
updateReceipt
.
setBmpStatus
(
result
);
if
(
result
==
BpmProcessInstanceResultEnum
.
APPROVE
.
getResult
())
{
if
(
result
==
BpmProcessInstanceResultEnum
.
APPROVE
.
getResult
())
{
...
@@ -170,6 +179,8 @@ public class FinanceReceiptApproveService {
...
@@ -170,6 +179,8 @@ public class FinanceReceiptApproveService {
throw
exception
(
RECEIPT_NOT_FOUND
);
throw
exception
(
RECEIPT_NOT_FOUND
);
}
}
ReceiptDO
updateReceipt
=
new
ReceiptDO
();
ReceiptDO
updateReceipt
=
new
ReceiptDO
();
//lanbm 2024-05-20 add 添加订单ID的修改,不然订单ID就丢失了
updateReceipt
.
setOrderId
(
receiptDO
.
getOrderId
());
updateReceipt
.
setId
(
receiptDO
.
getId
());
updateReceipt
.
setId
(
receiptDO
.
getId
());
updateReceipt
.
setBmpStatus
(
result
);
updateReceipt
.
setBmpStatus
(
result
);
if
(
result
==
BpmProcessInstanceResultEnum
.
APPROVE
.
getResult
())
{
if
(
result
==
BpmProcessInstanceResultEnum
.
APPROVE
.
getResult
())
{
...
...
yudao-module-wealth/yudao-module-wealth-core/src/main/java/cn/iocoder/yudao/module/wealth/service/payable/PayableServiceImpl.java
View file @
d7fda5d3
...
@@ -6,6 +6,9 @@ import cn.iocoder.yudao.framework.mybatis.core.util.MyBatisUtils;
...
@@ -6,6 +6,9 @@ import cn.iocoder.yudao.framework.mybatis.core.util.MyBatisUtils;
import
cn.iocoder.yudao.framework.mybatis.core.vo.PageVO
;
import
cn.iocoder.yudao.framework.mybatis.core.vo.PageVO
;
import
cn.iocoder.yudao.framework.security.core.LoginUser
;
import
cn.iocoder.yudao.framework.security.core.LoginUser
;
import
cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils
;
import
cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils
;
import
cn.iocoder.yudao.module.ecw.dal.dataobject.currency.CurrencyDO
;
import
cn.iocoder.yudao.module.system.dal.dataobject.user.AdminUserDO
;
import
cn.iocoder.yudao.module.system.service.user.AdminUserService
;
import
cn.iocoder.yudao.module.wealth.convert.payable.PayableConvert
;
import
cn.iocoder.yudao.module.wealth.convert.payable.PayableConvert
;
import
cn.iocoder.yudao.module.wealth.dal.dataobject.payable.PayableDO
;
import
cn.iocoder.yudao.module.wealth.dal.dataobject.payable.PayableDO
;
import
cn.iocoder.yudao.module.wealth.dal.mysql.payable.PayableMapper
;
import
cn.iocoder.yudao.module.wealth.dal.mysql.payable.PayableMapper
;
...
@@ -23,6 +26,8 @@ import org.springframework.validation.annotation.Validated;
...
@@ -23,6 +26,8 @@ import org.springframework.validation.annotation.Validated;
import
java.util.Collection
;
import
java.util.Collection
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
import
static
cn
.
iocoder
.
yudao
.
framework
.
common
.
exception
.
util
.
ServiceExceptionUtil
.
exception
;
import
static
cn
.
iocoder
.
yudao
.
framework
.
common
.
exception
.
util
.
ServiceExceptionUtil
.
exception
;
import
static
cn
.
iocoder
.
yudao
.
module
.
wealth
.
enums
.
ErrorCodeConstants
.
PAYABLE_NOT_EXISTS
;
import
static
cn
.
iocoder
.
yudao
.
module
.
wealth
.
enums
.
ErrorCodeConstants
.
PAYABLE_NOT_EXISTS
;
...
@@ -39,6 +44,12 @@ public class PayableServiceImpl extends AbstractService<PayableMapper, PayableDO
...
@@ -39,6 +44,12 @@ public class PayableServiceImpl extends AbstractService<PayableMapper, PayableDO
@Autowired
@Autowired
private
PayableMapper
payableMapper
;
private
PayableMapper
payableMapper
;
/*
lanbm 2024-05-17 add
*/
@Autowired
private
AdminUserService
adminUserService
;
@Override
@Override
public
Long
createPayable
(
PayableCreateReqVO
createReqVO
)
{
public
Long
createPayable
(
PayableCreateReqVO
createReqVO
)
{
LoginUser
user
=
SecurityFrameworkUtils
.
getLoginUser
();
LoginUser
user
=
SecurityFrameworkUtils
.
getLoginUser
();
...
@@ -90,6 +101,12 @@ public class PayableServiceImpl extends AbstractService<PayableMapper, PayableDO
...
@@ -90,6 +101,12 @@ public class PayableServiceImpl extends AbstractService<PayableMapper, PayableDO
@Override
@Override
public
PageResult
<
PayableOrderBackVo
>
getPayablePage
(
PayableQueryVO
query
,
PageVO
page
)
{
public
PageResult
<
PayableOrderBackVo
>
getPayablePage
(
PayableQueryVO
query
,
PageVO
page
)
{
List
<
AdminUserDO
>
ListUser
=
adminUserService
.
getUsersList
();
Map
<
Long
,
String
>
userMap
=
ListUser
.
stream
().
collect
(
Collectors
.
toMap
((
AdminUserDO:
:
getId
),
AdminUserDO:
:
getNickname
));
IPage
<
PayableOrderBackVo
>
mpPage
=
MyBatisUtils
.
buildPage
(
page
);
IPage
<
PayableOrderBackVo
>
mpPage
=
MyBatisUtils
.
buildPage
(
page
);
QueryWrapper
queryWrapper
=
new
QueryWrapper
();
QueryWrapper
queryWrapper
=
new
QueryWrapper
();
queryWrapper
.
eq
(
"a.deleted"
,
"0"
);
queryWrapper
.
eq
(
"a.deleted"
,
"0"
);
...
@@ -102,6 +119,35 @@ public class PayableServiceImpl extends AbstractService<PayableMapper, PayableDO
...
@@ -102,6 +119,35 @@ public class PayableServiceImpl extends AbstractService<PayableMapper, PayableDO
queryWrapper
.
eq
(
StringUtils
.
isNotBlank
(
query
.
getDepartureId
()),
"a.start_warehouse_id"
,
query
.
getDepartureId
());
queryWrapper
.
eq
(
StringUtils
.
isNotBlank
(
query
.
getDepartureId
()),
"a.start_warehouse_id"
,
query
.
getDepartureId
());
queryWrapper
.
eq
(
StringUtils
.
isNotBlank
(
query
.
getObjectiveId
()),
"a.dest_warehouse_id"
,
query
.
getObjectiveId
());
queryWrapper
.
eq
(
StringUtils
.
isNotBlank
(
query
.
getObjectiveId
()),
"a.dest_warehouse_id"
,
query
.
getObjectiveId
());
payableMapper
.
selectListPage
(
mpPage
,
queryWrapper
);
payableMapper
.
selectListPage
(
mpPage
,
queryWrapper
);
//lanbm 2024-05-17 add
for
(
PayableOrderBackVo
v
:
mpPage
.
getRecords
()
)
{
if
(
v
.
getTransportId
()
==
1
)
{
v
.
setTransportTypeName
(
"海运拼柜"
);
}
else
if
(
v
.
getTransportId
()
==
3
)
{
v
.
setTransportTypeName
(
"专线空运"
);
}
String
sCreator
=
""
;
if
(
v
.
getCreator
()==
null
)
{
v
.
setCreator
(
""
);
}
else
{
long
l
=
Long
.
parseLong
(
v
.
getCreator
());
v
.
setCreator
(
userMap
.
get
(
l
));
}
if
(
v
.
getUpdater
()==
null
)
{
v
.
setUpdater
(
""
);
}
else
{
long
l
=
Long
.
parseLong
(
v
.
getUpdater
());
v
.
setUpdater
(
userMap
.
get
(
l
));
}
}
return
PageResult
.
of
(
mpPage
);
return
PageResult
.
of
(
mpPage
);
}
}
...
...
yudao-module-wealth/yudao-module-wealth-core/src/main/java/cn/iocoder/yudao/module/wealth/service/payment/PaymentServiceImpl.java
View file @
d7fda5d3
...
@@ -259,13 +259,13 @@ public class PaymentServiceImpl extends AbstractService<PaymentMapper, PaymentDO
...
@@ -259,13 +259,13 @@ public class PaymentServiceImpl extends AbstractService<PaymentMapper, PaymentDO
@Override
@Override
public
void
verifyPaymentCancel
(
FinancePaymentVo
financePaymentVo
)
{
public
void
verifyPaymentCancel
(
FinancePaymentVo
financePaymentVo
)
{
validatePaymentBmpStatus
(
financePaymentVo
.
getPaymentId
());
validatePaymentBmpStatus
(
financePaymentVo
.
getPaymentId
());
//创建付款单反审核流程
//创建付款单反审核流程
PaymentApprovalDO
approvalDO
=
new
PaymentApprovalDO
();
PaymentApprovalDO
approvalDO
=
new
PaymentApprovalDO
();
approvalDO
.
setPaymentId
(
financePaymentVo
.
getPaymentId
());
approvalDO
.
setPaymentId
(
financePaymentVo
.
getPaymentId
());
approvalDO
.
setPaymentNo
(
financePaymentVo
.
getPaymentNo
());
approvalDO
.
setPaymentNo
(
financePaymentVo
.
getPaymentNo
());
approvalDO
.
setBmpKey
(
WorkFlowEmus
.
FINANCE_PAYMENT_APPROVE_NO
.
getKey
());
approvalDO
.
setBmpKey
(
WorkFlowEmus
.
FINANCE_PAYMENT_APPROVE_NO
.
getKey
());
approvalDO
.
setStatus
(
BpmProcessInstanceResultEnum
.
PROCESS
.
getResult
());
approvalDO
.
setStatus
(
BpmProcessInstanceResultEnum
.
PROCESS
.
getResult
());
//反审核理由 lanbm 2024-05-17 添加注释
approvalDO
.
setReason
(
financePaymentVo
.
getReason
());
approvalDO
.
setReason
(
financePaymentVo
.
getReason
());
paymentApprovalService
.
save
(
approvalDO
);
paymentApprovalService
.
save
(
approvalDO
);
Long
userId
=
SecurityFrameworkUtils
.
getLoginUserId
();
Long
userId
=
SecurityFrameworkUtils
.
getLoginUserId
();
...
@@ -279,71 +279,26 @@ public class PaymentServiceImpl extends AbstractService<PaymentMapper, PaymentDO
...
@@ -279,71 +279,26 @@ public class PaymentServiceImpl extends AbstractService<PaymentMapper, PaymentDO
update
.
setState
(
PaymentStatusEnum
.
APPROVE_NEGATION
.
getValue
());
update
.
setState
(
PaymentStatusEnum
.
APPROVE_NEGATION
.
getValue
());
update
.
setBmpId
(
bpmId
);
update
.
setBmpId
(
bpmId
);
this
.
updateById
(
update
);
this
.
updateById
(
update
);
/* PaymentDO paymentDO = this.getById(id);
if (paymentDO == null) {
throw exception(PAYMENT_NOT_EXISTS);
}
if (paymentDO.getState() == 2) {
LoginUser user = SecurityFrameworkUtils.getLoginUser();
String creator = String.valueOf(null == user ? "" : user.getId());
PaymentDO updatePaymentDO = new PaymentDO();
updatePaymentDO.setId(id);
updatePaymentDO.setState(1);
updatePaymentDO.setUpdateTime(new Date());
updatePaymentDO.setUpdater(creator);
this.updateById(updatePaymentDO);
} else {
throw exception(PAYMENT_VERIFY_STATUS_ERROR);
}*/
}
}
@Override
@Override
public
void
verification
(
FinancePaymentVo
financePaymentVo
)
{
public
void
verification
(
FinancePaymentVo
financePaymentVo
)
{
validatePaymentBmpStatus
(
financePaymentVo
.
getPaymentId
());
validatePaymentBmpStatus
(
financePaymentVo
.
getPaymentId
());
/*//创建付款单核销流程
PaymentApprovalDO approvalDO = new PaymentApprovalDO();
approvalDO.setPaymentId(financePaymentVo.getPaymentId());
approvalDO.setPaymentNo(financePaymentVo.getPaymentNo());
approvalDO.setBmpKey(WorkFlowEmus.FINANCE_PAYMENT_WRITE_OFF.getKey());
approvalDO.setStatus(BpmProcessInstanceResultEnum.PROCESS.getResult());
approvalDO.setReason(financePaymentVo.getReason());
paymentApprovalService.save(approvalDO);
Long userId = SecurityFrameworkUtils.getLoginUserId();
String bpmId = bpmCreateServiceFactory.createBmp(userId, approvalDO.getId(), WorkFlowEmus.FINANCE_PAYMENT_WRITE_OFF.getKey(), financePaymentVo.getPaymentNo(), financePaymentVo.getCopyUserList());
approvalDO.setBmpId(bpmId);
paymentApprovalService.updateById(approvalDO);*/
PaymentDO
update
=
new
PaymentDO
();
PaymentDO
update
=
new
PaymentDO
();
update
.
setId
(
financePaymentVo
.
getPaymentId
());
update
.
setId
(
financePaymentVo
.
getPaymentId
());
//update.setBmpStatus(BpmProcessInstanceResultEnum.PROCESS.getResult());
//update.setState(PaymentStatusEnum.WRITE_OFF_APPROVE_ING.getValue());
//update.setBmpId(bpmId);
update
.
setState
(
PaymentStatusEnum
.
WRITE_OFF
.
getValue
());
update
.
setState
(
PaymentStatusEnum
.
WRITE_OFF
.
getValue
());
//lanbm 2024-05-17 添加字段
//付款备注
update
.
setReason
(
financePaymentVo
.
getReason
());
//实际付款日期
update
.
setSjfkdate
(
financePaymentVo
.
getSjfkdate
());
//付款人取核销人,就是当前操作的用户
update
.
setFkren
(
financePaymentVo
.
getFkren
());
//核销日期
update
.
setHexiaodate
(
new
Date
());
this
.
updateById
(
update
);
this
.
updateById
(
update
);
/*PaymentDO paymentDO = this.getById(id);
if (paymentDO == null) {
throw exception(PAYMENT_NOT_EXISTS);
}
if (paymentDO.getState() == 2) {
LoginUser user = SecurityFrameworkUtils.getLoginUser();
PaymentDO updatePaymentDO = new PaymentDO();
updatePaymentDO.setId(id);
updatePaymentDO.setState(4);
updatePaymentDO.setWriteOffId(user.getId());
updatePaymentDO.setWriteOffName(user.getUsername());
updatePaymentDO.setWriteOffAt(new Date());
this.updateById(updatePaymentDO);
} else {
throw exception(PAYMENT_VERIFICATION);
}*/
}
}
@Override
@Override
...
@@ -433,7 +388,6 @@ public class PaymentServiceImpl extends AbstractService<PaymentMapper, PaymentDO
...
@@ -433,7 +388,6 @@ public class PaymentServiceImpl extends AbstractService<PaymentMapper, PaymentDO
throw
exception
(
PAYMENT_NOT_EXISTS
);
throw
exception
(
PAYMENT_NOT_EXISTS
);
}
}
if
(
null
==
paymentDO
.
getBmpStatus
())
{
if
(
null
==
paymentDO
.
getBmpStatus
())
{
throw
exception
(
BMP_NOT
);
throw
exception
(
BMP_NOT
);
}
}
...
...
yudao-module-wealth/yudao-module-wealth-core/src/main/java/cn/iocoder/yudao/module/wealth/service/receipt/ReceiptServiceImpl.java
View file @
d7fda5d3
...
@@ -92,16 +92,26 @@ public class ReceiptServiceImpl extends AbstractService<ReceiptMapper, ReceiptDO
...
@@ -92,16 +92,26 @@ public class ReceiptServiceImpl extends AbstractService<ReceiptMapper, ReceiptDO
@Override
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
Long
createReceipt
(
ReceiptCreateReqVO
createReqVO
)
{
public
Long
createReceipt
(
ReceiptCreateReqVO
createReqVO
)
{
List
<
ReceivableUpdateReqVO
>
receivableUpdateReqVOList
=
createReqVO
.
getReceivableVOList
();
List
<
ReceivableUpdateReqVO
>
receivableUpdateReqVOList
=
createReqVO
.
getReceivableVOList
();
if
(
CollectionUtil
.
isEmpty
(
receivableUpdateReqVOList
))
{
if
(
CollectionUtil
.
isEmpty
(
receivableUpdateReqVOList
))
{
throw
exception
(
RECEIVABLE_NOT_NULL
);
throw
exception
(
RECEIVABLE_NOT_NULL
);
}
}
//校验应收明细为同一客户同一自编号同目的国下的应收明细。当自编号为空(某些预付款未装柜的订单),则校验为同一客户同意目的国,忽略自编号规则,视为同一自编号
/*
lanbm 2024-05-20 add
*/
if
(
createReqVO
.
getOrderId
()
==
0
)
{
throw
exception
(
ORDER_ID_NULL
);
}
//校验应收明细为同一客户同一自编号同目的国下的应收明细。
//当自编号为空(某些预付款未装柜的订单),则校验为同一客户同意目的国,忽略自编号规则,视为同一自编号
validateSameCustomerReceivable
(
createReqVO
.
getReceivableVOList
());
validateSameCustomerReceivable
(
createReqVO
.
getReceivableVOList
());
List
<
ReceiptAccountCreateReqVO
>
receiptAccountCreateReqVOList
=
createReqVO
.
getReceiptAccountList
();
List
<
ReceiptAccountCreateReqVO
>
receiptAccountCreateReqVOList
=
createReqVO
.
getReceiptAccountList
();
if
(
CollectionUtil
.
isEmpty
(
receiptAccountCreateReqVOList
))
{
if
(
CollectionUtil
.
isEmpty
(
receiptAccountCreateReqVOList
))
{
throw
exception
(
RECEIPT_ACCOUNT_NOT_EXISTS
);
throw
exception
(
RECEIPT_ACCOUNT_NOT_EXISTS
);
...
@@ -111,6 +121,7 @@ public class ReceiptServiceImpl extends AbstractService<ReceiptMapper, ReceiptDO
...
@@ -111,6 +121,7 @@ public class ReceiptServiceImpl extends AbstractService<ReceiptMapper, ReceiptDO
LoginUser
user
=
SecurityFrameworkUtils
.
getLoginUser
();
LoginUser
user
=
SecurityFrameworkUtils
.
getLoginUser
();
String
creator
=
String
.
valueOf
(
null
==
user
?
""
:
user
.
getId
());
String
creator
=
String
.
valueOf
(
null
==
user
?
""
:
user
.
getId
());
ReceiptDO
receipt
=
ReceiptConvert
.
INSTANCE
.
convert
(
createReqVO
);
ReceiptDO
receipt
=
ReceiptConvert
.
INSTANCE
.
convert
(
createReqVO
);
//OrderNumberLogListener
OrderNumberLogEvent
event
=
new
OrderNumberLogEvent
();
OrderNumberLogEvent
event
=
new
OrderNumberLogEvent
();
event
.
setType
(
3
);
event
.
setType
(
3
);
event
.
setNumberKey
(
RECEIPT_NEW_NUMBER
);
event
.
setNumberKey
(
RECEIPT_NEW_NUMBER
);
...
@@ -128,7 +139,10 @@ public class ReceiptServiceImpl extends AbstractService<ReceiptMapper, ReceiptDO
...
@@ -128,7 +139,10 @@ public class ReceiptServiceImpl extends AbstractService<ReceiptMapper, ReceiptDO
receipt
.
setState
(
ReceiptStatusEnum
.
DRAFT
.
getValue
());
receipt
.
setState
(
ReceiptStatusEnum
.
DRAFT
.
getValue
());
}
}
/*
lanbm 2024-05-20 添加订单ID关联字段
*/
receipt
.
setOrderId
(
createReqVO
.
getOrderId
());
receiptMapper
.
insert
(
receipt
);
receiptMapper
.
insert
(
receipt
);
if
(
StringUtils
.
equals
(
createReqVO
.
getAddType
(),
"0"
))
{
if
(
StringUtils
.
equals
(
createReqVO
.
getAddType
(),
"0"
))
{
...
@@ -151,11 +165,16 @@ public class ReceiptServiceImpl extends AbstractService<ReceiptMapper, ReceiptDO
...
@@ -151,11 +165,16 @@ public class ReceiptServiceImpl extends AbstractService<ReceiptMapper, ReceiptDO
update
.
setBmpStatus
(
BpmProcessInstanceResultEnum
.
PROCESS
.
getResult
());
update
.
setBmpStatus
(
BpmProcessInstanceResultEnum
.
PROCESS
.
getResult
());
update
.
setState
(
ReceiptStatusEnum
.
APPROVE_ING
.
getValue
());
update
.
setState
(
ReceiptStatusEnum
.
APPROVE_ING
.
getValue
());
update
.
setBmpId
(
bpmId
);
update
.
setBmpId
(
bpmId
);
//lanbm 2024-05-20 添加关联的订单ID
update
.
setOrderId
(
createReqVO
.
getOrderId
());
receiptMapper
.
updateById
(
update
);
receiptMapper
.
updateById
(
update
);
}
}
List
<
ReceivableDO
>
receivableDOList
=
receivableUpdateReqVOList
.
stream
().
filter
(
re
->
null
!=
re
.
getId
()).
map
(
re
->
{
List
<
ReceivableDO
>
receivableDOList
=
ReceivableDO
receivableDO
=
ReceivableConvert
.
INSTANCE
.
convert
(
re
);
receivableUpdateReqVOList
.
stream
().
filter
(
re
->
null
!=
re
.
getId
()).
map
(
re
->
{
ReceivableDO
receivableDO
=
ReceivableConvert
.
INSTANCE
.
convert
(
re
);
receivableDO
.
setReceiptNo
(
receipt
.
getReceiptNo
());
receivableDO
.
setReceiptNo
(
receipt
.
getReceiptNo
());
receivableDO
.
setReceiptId
(
receipt
.
getId
());
receivableDO
.
setReceiptId
(
receipt
.
getId
());
receivableDO
.
setState
(
1
);
receivableDO
.
setState
(
1
);
...
@@ -163,9 +182,11 @@ public class ReceiptServiceImpl extends AbstractService<ReceiptMapper, ReceiptDO
...
@@ -163,9 +182,11 @@ public class ReceiptServiceImpl extends AbstractService<ReceiptMapper, ReceiptDO
receivableDO
.
setUpdateTime
(
new
Date
());
receivableDO
.
setUpdateTime
(
new
Date
());
return
receivableDO
;
return
receivableDO
;
}).
collect
(
Collectors
.
toList
());
}).
collect
(
Collectors
.
toList
());
receivableService
.
updateBatchById
(
receivableDOList
);
receivableService
.
updateBatchById
(
receivableDOList
);
List
<
ReceiptAccountDO
>
receiptAccountDOList
=
receiptAccountCreateReqVOList
.
stream
().
map
(
re
->
{
List
<
ReceiptAccountDO
>
receiptAccountDOList
=
receiptAccountCreateReqVOList
.
stream
().
map
(
re
->
{
ReceiptAccountDO
receivableDO
=
ReceiptAccountConvert
.
INSTANCE
.
convert
(
re
);
ReceiptAccountDO
receivableDO
=
ReceiptAccountConvert
.
INSTANCE
.
convert
(
re
);
receivableDO
.
setReceiptId
(
receipt
.
getId
());
receivableDO
.
setReceiptId
(
receipt
.
getId
());
receivableDO
.
setUpdater
(
creator
);
receivableDO
.
setUpdater
(
creator
);
...
...
yudao-module-wealth/yudao-module-wealth-core/src/main/java/cn/iocoder/yudao/module/wealth/service/receiptItem/BankReceiptDetailsImpl.java
0 → 100644
View file @
d7fda5d3
package
cn
.
iocoder
.
yudao
.
module
.
wealth
.
service
.
receiptItem
;
import
cn.iocoder.yudao.framework.common.pojo.PageResult
;
import
cn.iocoder.yudao.framework.mybatis.core.util.MyBatisUtils
;
import
cn.iocoder.yudao.module.wealth.dal.mysql.receiptItem.BankReceiptDetailsMapper
;
import
cn.iocoder.yudao.module.wealth.vo.receiptItem.ReceiptItemReq
;
import
cn.iocoder.yudao.module.wealth.vo.receiptItem.ReceiptItemResp
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.stereotype.Service
;
import
org.springframework.validation.annotation.Validated
;
import
javax.annotation.Resource
;
import
java.util.List
;
/*
lanbm 2024-05-18 add
银行收款明细列表
*/
@Service
@Validated
@Slf4j
public
class
BankReceiptDetailsImpl
implements
BankReceiptDetailsService
{
@Resource
private
BankReceiptDetailsMapper
bankReceiptDetailsMapper
;
/*
获取分页数据
*/
public
PageResult
<
ReceiptItemResp
>
getBankReceiptDetailsList
(
ReceiptItemReq
req
)
{
IPage
<
ReceiptItemResp
>
mpPage
=
MyBatisUtils
.
buildPage
(
req
);
long
total
=
bankReceiptDetailsMapper
.
GetCount
(
req
);
int
start
=
(
req
.
getPageNo
()
-
1
)
*
req
.
getPageSize
();
req
.
setStart
(
start
);
List
<
ReceiptItemResp
>
list
=
bankReceiptDetailsMapper
.
getBankReceiptDetailsList
(
req
);
return
new
PageResult
<>(
list
,
total
,
mpPage
.
getSize
(),
req
.
getPageNo
(),
(
total
+
mpPage
.
getSize
()
-
1
)
/
mpPage
.
getSize
());
}
}
yudao-module-wealth/yudao-module-wealth-core/src/main/java/cn/iocoder/yudao/module/wealth/service/receiptItem/BankReceiptDetailsService.java
0 → 100644
View file @
d7fda5d3
package
cn
.
iocoder
.
yudao
.
module
.
wealth
.
service
.
receiptItem
;
import
cn.iocoder.yudao.framework.common.pojo.PageResult
;
import
cn.iocoder.yudao.module.wealth.dal.dataobject.receiptItem.ReceiptItemDO
;
import
cn.iocoder.yudao.module.wealth.vo.receiptItem.ReceiptItemReq
;
import
cn.iocoder.yudao.module.wealth.vo.receiptItem.ReceiptItemResp
;
import
java.util.List
;
/*
lanbm 2024-05-18 add
*/
public
interface
BankReceiptDetailsService
{
PageResult
<
ReceiptItemResp
>
getBankReceiptDetailsList
(
ReceiptItemReq
req
);
}
yudao-module-wealth/yudao-module-wealth-core/src/main/java/cn/iocoder/yudao/module/wealth/service/receiptItem/ReceiptItemService.java
View file @
d7fda5d3
...
@@ -56,6 +56,8 @@ public interface ReceiptItemService extends IService<ReceiptItemDO> {
...
@@ -56,6 +56,8 @@ public interface ReceiptItemService extends IService<ReceiptItemDO> {
*/
*/
List
<
ReceiptItemDO
>
getReceiptItemList
(
Collection
<
Long
>
ids
);
List
<
ReceiptItemDO
>
getReceiptItemList
(
Collection
<
Long
>
ids
);
/**
/**
* 核销
* 核销
*
*
...
...
yudao-module-wealth/yudao-module-wealth-core/src/main/java/cn/iocoder/yudao/module/wealth/service/receiptItem/ReceiptItemServiceImpl.java
View file @
d7fda5d3
...
@@ -86,6 +86,8 @@ public class ReceiptItemServiceImpl extends AbstractService<ReceiptItemMapper, R
...
@@ -86,6 +86,8 @@ public class ReceiptItemServiceImpl extends AbstractService<ReceiptItemMapper, R
ReceiptDO
update
=
new
ReceiptDO
();
ReceiptDO
update
=
new
ReceiptDO
();
update
.
setId
(
receiptDO
.
getId
());
update
.
setId
(
receiptDO
.
getId
());
update
.
setState
(
2
);
update
.
setState
(
2
);
//lanbm 2024-05-20 add
update
.
setOrderId
(
receiptDO
.
getOrderId
());
receiptService
.
updateById
(
update
);
receiptService
.
updateById
(
update
);
}
}
}
}
...
...
yudao-module-wealth/yudao-module-wealth-core/src/main/java/cn/iocoder/yudao/module/wealth/vo/payable/PayableBackVO.java
View file @
d7fda5d3
package
cn
.
iocoder
.
yudao
.
module
.
wealth
.
vo
.
payable
;
package
cn
.
iocoder
.
yudao
.
module
.
wealth
.
vo
.
payable
;
import
cn.iocoder.yudao.framework.i18n.core.I18nMessage
;
import
cn.iocoder.yudao.module.wealth.enums.BoxAirStatusEnum
;
import
cn.iocoder.yudao.module.wealth.enums.BoxApprovalTypeEnum
;
import
cn.iocoder.yudao.module.wealth.enums.BoxStatusEnum
;
import
cn.iocoder.yudao.module.wealth.enums.TransportTypeEnum
;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
com.baomidou.mybatisplus.annotation.FieldFill
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.Data
;
import
org.springframework.format.annotation.DateTimeFormat
;
import
org.springframework.format.annotation.DateTimeFormat
;
import
javax.validation.constraints.NotNull
;
import
java.util.Date
;
import
java.util.Date
;
import
static
cn
.
iocoder
.
yudao
.
framework
.
common
.
util
.
date
.
DateUtils
.
FORMAT_YEAR_MONTH_DAY
;
import
static
cn
.
iocoder
.
yudao
.
framework
.
common
.
util
.
date
.
DateUtils
.
FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND
;
import
static
cn
.
iocoder
.
yudao
.
framework
.
common
.
util
.
date
.
DateUtils
.
FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND
;
/**
/**
...
@@ -108,7 +117,7 @@ public class PayableBackVO {
...
@@ -108,7 +117,7 @@ public class PayableBackVO {
private
String
invoiceNumber
;
private
String
invoiceNumber
;
@ExcelProperty
(
"创建时间"
)
@ExcelProperty
(
"创建时间"
)
@
DateTimeFormat
(
pattern
=
FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND
)
@
JsonFormat
(
pattern
=
FORMAT_YEAR_MONTH_DAY
)
@ApiModelProperty
(
value
=
"创建时间"
,
required
=
true
)
@ApiModelProperty
(
value
=
"创建时间"
,
required
=
true
)
private
Date
createTime
;
private
Date
createTime
;
...
@@ -124,5 +133,65 @@ public class PayableBackVO {
...
@@ -124,5 +133,65 @@ public class PayableBackVO {
@ApiModelProperty
(
value
=
"出货费ID"
)
@ApiModelProperty
(
value
=
"出货费ID"
)
private
Long
shippingFeeId
;
private
Long
shippingFeeId
;
/**
* 最后更新时间
*/
@JsonFormat
(
pattern
=
FORMAT_YEAR_MONTH_DAY
)
private
Date
updateTime
;
private
String
creator
;
/**
* 更新者,目前使用 SysUser 的 id 编
**/
private
String
updater
;
/*
运输方式 lanbm 2024-05-17 add
*/
private
String
transportTypeName
;
@ApiModelProperty
(
value
=
"正在反审的类型"
)
private
Integer
backApprovalType
;
private
String
shipmentStatusText
;
@ApiModelProperty
(
value
=
"出货状态"
)
private
Integer
shipmentStatus
;
@ApiModelProperty
(
value
=
"空运出货状态"
)
private
Integer
shipmentStatusAir
;
/*
费用产生时间 lanbm 2024-05-17 add
日期格式转换
*/
@ApiModelProperty
(
value
=
"费用产生日期"
)
@NotNull
(
message
=
"费用产生日期不能为空"
)
@JsonFormat
(
pattern
=
FORMAT_YEAR_MONTH_DAY
)
private
Date
freecsdate
;
public
String
getShipmentStatusText
()
{
if
(
backApprovalType
!=
null
)
{
shipmentStatusText
=
BoxApprovalTypeEnum
.
getApprovalTypeByTypeValue
(
backApprovalType
).
getText
();
}
else
{
if
(
TransportTypeEnum
.
AIR
.
getType
().
equals
(
transportId
))
{
if
(
null
!=
shipmentStatusAir
)
{
shipmentStatusText
=
I18nMessage
.
getMessage
(
BoxAirStatusEnum
.
getStatusEnumByStatus
(
shipmentStatusAir
).
getText
());
}
}
else
{
if
(
null
!=
shipmentStatus
)
{
shipmentStatusText
=
I18nMessage
.
getMessage
(
BoxStatusEnum
.
getStatusEnumByStatus
(
shipmentStatus
).
getText
());
}
}
}
return
shipmentStatusText
;
}
public
void
setShipmentStatusText
(
String
shipmentStatusText
)
{
this
.
shipmentStatusText
=
shipmentStatusText
;
}
}
}
yudao-module-wealth/yudao-module-wealth-core/src/main/java/cn/iocoder/yudao/module/wealth/vo/payable/PayableBaseVO.java
View file @
d7fda5d3
package
cn
.
iocoder
.
yudao
.
module
.
wealth
.
vo
.
payable
;
package
cn
.
iocoder
.
yudao
.
module
.
wealth
.
vo
.
payable
;
import
lombok.*
;
import
lombok.*
;
import
java.util.*
;
import
java.util.*
;
import
io.swagger.annotations.*
;
import
io.swagger.annotations.*
;
import
javax.validation.constraints.*
;
import
javax.validation.constraints.*
;
/**
/**
* 应付款 Base VO,提供给添加、修改、详细的子 VO 使用
* 应付款 Base VO,提供给添加、修改、详细的子 VO 使用
* 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成
* 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成
*/
*/
@Data
@Data
public
class
PayableBaseVO
{
public
class
PayableBaseVO
{
...
@@ -89,4 +92,10 @@ public class PayableBaseVO {
...
@@ -89,4 +92,10 @@ public class PayableBaseVO {
@ApiModelProperty
(
value
=
"出货费ID"
)
@ApiModelProperty
(
value
=
"出货费ID"
)
private
Long
shippingFeeId
;
private
Long
shippingFeeId
;
/*
费用产生时间 lanbm 2024-05-17 add
*/
private
Date
freecsdate
;
}
}
yudao-module-wealth/yudao-module-wealth-core/src/main/java/cn/iocoder/yudao/module/wealth/vo/payable/PayableOrderBackVo.java
View file @
d7fda5d3
package
cn
.
iocoder
.
yudao
.
module
.
wealth
.
vo
.
payable
;
package
cn
.
iocoder
.
yudao
.
module
.
wealth
.
vo
.
payable
;
import
cn.iocoder.yudao.framework.i18n.core.I18nMessage
;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
...
@@ -9,4 +10,5 @@ import lombok.Data;
...
@@ -9,4 +10,5 @@ import lombok.Data;
@ApiModel
(
"管理后台 - 应付款包含订单信息 Response VO"
)
@ApiModel
(
"管理后台 - 应付款包含订单信息 Response VO"
)
public
class
PayableOrderBackVo
extends
PayableBackVO
{
public
class
PayableOrderBackVo
extends
PayableBackVO
{
}
}
yudao-module-wealth/yudao-module-wealth-core/src/main/java/cn/iocoder/yudao/module/wealth/vo/payment/FinancePaymentVo.java
View file @
d7fda5d3
...
@@ -5,6 +5,7 @@ import io.swagger.annotations.ApiModelProperty;
...
@@ -5,6 +5,7 @@ import io.swagger.annotations.ApiModelProperty;
import
lombok.Data
;
import
lombok.Data
;
import
javax.validation.constraints.NotNull
;
import
javax.validation.constraints.NotNull
;
import
java.util.Date
;
@Data
@Data
@ApiModel
(
"付款单审核"
)
@ApiModel
(
"付款单审核"
)
...
@@ -17,9 +18,32 @@ public class FinancePaymentVo {
...
@@ -17,9 +18,32 @@ public class FinancePaymentVo {
@NotNull
(
message
=
"付款单编号不能为空"
)
@NotNull
(
message
=
"付款单编号不能为空"
)
private
String
paymentNo
;
private
String
paymentNo
;
@ApiModelProperty
(
value
=
"申请理由"
)
/*
lanbm 2024-05-17 add
原来的付款备注没有保存
*/
@ApiModelProperty
(
value
=
"付款备注"
)
private
String
reason
;
private
String
reason
;
@ApiModelProperty
(
value
=
"抄送人"
)
@ApiModelProperty
(
value
=
"抄送人"
)
private
String
[]
copyUserList
;
private
String
[]
copyUserList
;
/*
实际付款时间 lanbm 2024-05-17 add
*/
@ApiModelProperty
(
value
=
"实际付款时间"
)
private
Date
sjfkdate
;
/*
付款人,核销操作人 lanbm 2024-05-17 add
*/
@ApiModelProperty
(
value
=
"付款人"
)
private
String
fkren
;
/*
核销时间 lanbm 2024-05-17 add
*/
@ApiModelProperty
(
value
=
"核销时间"
)
private
Date
hexiaodate
;
}
}
yudao-module-wealth/yudao-module-wealth-core/src/main/java/cn/iocoder/yudao/module/wealth/vo/payment/PaymentBackVO.java
View file @
d7fda5d3
package
cn
.
iocoder
.
yudao
.
module
.
wealth
.
vo
.
payment
;
package
cn
.
iocoder
.
yudao
.
module
.
wealth
.
vo
.
payment
;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.Data
;
...
@@ -8,6 +9,7 @@ import org.springframework.format.annotation.DateTimeFormat;
...
@@ -8,6 +9,7 @@ import org.springframework.format.annotation.DateTimeFormat;
import
java.util.Date
;
import
java.util.Date
;
import
static
cn
.
iocoder
.
yudao
.
framework
.
common
.
util
.
date
.
DateUtils
.
FORMAT_YEAR_MONTH_DAY
;
import
static
cn
.
iocoder
.
yudao
.
framework
.
common
.
util
.
date
.
DateUtils
.
FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND
;
import
static
cn
.
iocoder
.
yudao
.
framework
.
common
.
util
.
date
.
DateUtils
.
FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND
;
/**
/**
...
@@ -129,7 +131,7 @@ public class PaymentBackVO {
...
@@ -129,7 +131,7 @@ public class PaymentBackVO {
private
Integer
settlementType
;
private
Integer
settlementType
;
@ExcelProperty
(
"创建时间"
)
@ExcelProperty
(
"创建时间"
)
@
DateTime
Format
(
pattern
=
FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND
)
@
Json
Format
(
pattern
=
FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND
)
@ApiModelProperty
(
value
=
"创建时间"
,
required
=
true
)
@ApiModelProperty
(
value
=
"创建时间"
,
required
=
true
)
private
Date
createTime
;
private
Date
createTime
;
...
@@ -139,4 +141,26 @@ public class PaymentBackVO {
...
@@ -139,4 +141,26 @@ public class PaymentBackVO {
@ApiModelProperty
(
value
=
"驳回原因"
)
@ApiModelProperty
(
value
=
"驳回原因"
)
private
String
comment
;
private
String
comment
;
/*
实际付款时间 lanbm 2024-05-17 add
*/
@JsonFormat
(
pattern
=
FORMAT_YEAR_MONTH_DAY
)
private
Date
sjfkdate
;
/*
lanbm 2024-05-17 add
原来的付款备注没有保存
*/
@ApiModelProperty
(
value
=
"付款备注"
)
private
String
reason
;
private
String
fkren
;
/*
核销时间 lanbm 2024-05-17 add
*/
@JsonFormat
(
pattern
=
FORMAT_YEAR_MONTH_DAY
)
private
Date
hexiaodate
;
}
}
yudao-module-wealth/yudao-module-wealth-core/src/main/java/cn/iocoder/yudao/module/wealth/vo/receipt/ReceiptBaseVO.java
View file @
d7fda5d3
package
cn
.
iocoder
.
yudao
.
module
.
wealth
.
vo
.
receipt
;
package
cn
.
iocoder
.
yudao
.
module
.
wealth
.
vo
.
receipt
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.Data
;
import
org.springframework.format.annotation.DateTimeFormat
;
import
org.springframework.format.annotation.DateTimeFormat
;
...
@@ -127,7 +128,7 @@ public class ReceiptBaseVO {
...
@@ -127,7 +128,7 @@ public class ReceiptBaseVO {
private
Integer
state
;
private
Integer
state
;
@ApiModelProperty
(
value
=
"核销时间"
)
@ApiModelProperty
(
value
=
"核销时间"
)
@
DateTime
Format
(
pattern
=
FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND
)
@
Json
Format
(
pattern
=
FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND
)
private
Date
writeOffAt
;
private
Date
writeOffAt
;
@ApiModelProperty
(
value
=
"开票时间"
)
@ApiModelProperty
(
value
=
"开票时间"
)
...
@@ -150,17 +151,15 @@ public class ReceiptBaseVO {
...
@@ -150,17 +151,15 @@ public class ReceiptBaseVO {
@ApiModelProperty
(
value
=
"财务备注"
)
@ApiModelProperty
(
value
=
"财务备注"
)
private
String
financeRemark
;
private
String
financeRemark
;
/*@ApiModelProperty(value = "应收明细列表")
private List<ReceivableDetail> receivableDetailList;
@ApiModelProperty(value = "应收明细")
/*
private String receivableDetail;
订单ID lanbm 2024-05-20 add
*/
private
long
orderId
;
public void setReceivableDetail(String receivableDetail) {
/*
this.receivableDetail = receivableDetail;
订单编号 lanbm 2024-05-20 add
if (StringUtils.isNotBlank(receivableDetail)) {
*/
this.receivableDetailList = JSONObject.parseArray(receivableDetail, ReceivableDetail.class);
private
String
orderNo
;
}
}*/
}
}
yudao-module-wealth/yudao-module-wealth-core/src/main/java/cn/iocoder/yudao/module/wealth/vo/receiptItem/ReceiptItemReq.java
0 → 100644
View file @
d7fda5d3
package
cn
.
iocoder
.
yudao
.
module
.
wealth
.
vo
.
receiptItem
;
import
cn.iocoder.yudao.framework.common.pojo.PageParam
;
import
io.swagger.annotations.ApiModel
;
import
lombok.Data
;
/*
lanbm 2024-05-18 add
*/
@Data
@ApiModel
(
"管理后台 - 银行收款单明细列表"
)
public
class
ReceiptItemReq
extends
PageParam
{
private
int
start
;
/*
主表中的收款单编号
*/
private
String
receiptNo
;
/*
订单编号
*/
private
String
orderNo
;
/*
提单编号
*/
private
String
tidanNo
;
}
yudao-module-wealth/yudao-module-wealth-core/src/main/java/cn/iocoder/yudao/module/wealth/vo/receiptItem/ReceiptItemResp.java
0 → 100644
View file @
d7fda5d3
package
cn
.
iocoder
.
yudao
.
module
.
wealth
.
vo
.
receiptItem
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
io.swagger.annotations.ApiModel
;
import
lombok.Data
;
import
java.util.Date
;
import
static
cn
.
iocoder
.
yudao
.
framework
.
common
.
util
.
date
.
DateUtils
.
FORMAT_YEAR_MONTH_DAY
;
import
static
cn
.
iocoder
.
yudao
.
framework
.
common
.
util
.
date
.
DateUtils
.
FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND
;
/*
lanbm 2024-05-18 add
*/
@Data
@ApiModel
(
"管理后台 - 银行收款单明细列表返回结果"
)
public
class
ReceiptItemResp
{
/**
* 主键
*/
@TableId
private
Long
id
;
/**
* 收款单id
*/
private
Long
receiptId
;
/**
* 收款账号
*/
private
String
accountNo
;
/**
* 当次实收金额不含税
*/
private
java
.
math
.
BigDecimal
amount
;
/**
* 税点
*/
private
java
.
math
.
BigDecimal
taxPoint
;
/**
* 当次实收金额含税
*/
private
java
.
math
.
BigDecimal
taxAmount
;
/**
* 收款账号名称
*/
private
String
accountName
;
/**
* 收款账号银行名称
*/
private
String
accountBankName
;
/**
* 货币id
*/
private
Long
currencyId
;
/**
* 收款汇率
*/
private
String
rate
;
/**
* 实收日期
*/
@JsonFormat
(
pattern
=
FORMAT_YEAR_MONTH_DAY
)
private
Date
amountDate
;
/**
* 水单号
*/
private
String
billNo
;
/**
* 附件多个,分隔
*/
private
String
attr
;
/**
* 状态0待核销,1已核销
*/
private
Integer
status
;
/**
* 核销货币id
*/
private
Long
writeOffCurrencyId
;
/**
* 核销金额
*/
private
java
.
math
.
BigDecimal
writeOffAmount
;
/**
* 流程审核状态
*/
private
Integer
bmpStatus
;
/**
* 当前流程ID
*/
private
String
bmpId
;
/*
主表中的收款单编号
*/
private
String
receiptNo
;
/*
订单ID
*/
private
long
orderId
;
/*
订单编号
*/
private
String
orderNo
;
/*
提单编号
*/
private
String
tidanNo
;
}
yudao-module-wealth/yudao-module-wealth-rest/src/main/java/cn/iocoder/yudao/module/wealth/controller/admin/payable/PayableController.java
View file @
d7fda5d3
...
@@ -34,6 +34,8 @@ public class PayableController {
...
@@ -34,6 +34,8 @@ public class PayableController {
@ApiOperation
(
"创建应付款"
)
@ApiOperation
(
"创建应付款"
)
//@PreAuthorize("@ss.hasPermission('ecw:payable:create')")
//@PreAuthorize("@ss.hasPermission('ecw:payable:create')")
public
CommonResult
<
Long
>
createPayable
(
@Valid
@RequestBody
PayableCreateReqVO
createReqVO
)
{
public
CommonResult
<
Long
>
createPayable
(
@Valid
@RequestBody
PayableCreateReqVO
createReqVO
)
{
//lanbm 2024-05-17 添加费用产生时间字段
String
s
=
""
;
return
success
(
payableService
.
createPayable
(
createReqVO
));
return
success
(
payableService
.
createPayable
(
createReqVO
));
}
}
...
@@ -78,6 +80,7 @@ public class PayableController {
...
@@ -78,6 +80,7 @@ public class PayableController {
@ApiOperation
(
"应付款分页列表,添加供应商未付款项列表 两个用这一个查询"
)
@ApiOperation
(
"应付款分页列表,添加供应商未付款项列表 两个用这一个查询"
)
//@PreAuthorize("@ss.hasPermission('ecw:payable:query')")
//@PreAuthorize("@ss.hasPermission('ecw:payable:query')")
public
CommonResult
<
PageResult
<
PayableOrderBackVo
>>
getPayablePage
(
@Valid
PayableQueryVO
query
,
PageVO
page
)
{
public
CommonResult
<
PageResult
<
PayableOrderBackVo
>>
getPayablePage
(
@Valid
PayableQueryVO
query
,
PageVO
page
)
{
//lanbm 2024-05-17 修改问题点
PageResult
<
PayableOrderBackVo
>
result
=
payableService
.
getPayablePage
(
query
,
page
);
PageResult
<
PayableOrderBackVo
>
result
=
payableService
.
getPayablePage
(
query
,
page
);
return
success
(
result
);
return
success
(
result
);
}
}
...
...
yudao-module-wealth/yudao-module-wealth-rest/src/main/java/cn/iocoder/yudao/module/wealth/controller/admin/payment/PaymentController.java
View file @
d7fda5d3
...
@@ -4,6 +4,9 @@ import cn.iocoder.yudao.framework.common.pojo.CommonResult;
...
@@ -4,6 +4,9 @@ import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import
cn.iocoder.yudao.framework.common.pojo.PageResult
;
import
cn.iocoder.yudao.framework.common.pojo.PageResult
;
import
cn.iocoder.yudao.framework.idempotent.core.annotation.Idempotent
;
import
cn.iocoder.yudao.framework.idempotent.core.annotation.Idempotent
;
import
cn.iocoder.yudao.framework.mybatis.core.vo.PageVO
;
import
cn.iocoder.yudao.framework.mybatis.core.vo.PageVO
;
import
cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils
;
import
cn.iocoder.yudao.module.system.dal.dataobject.user.AdminUserDO
;
import
cn.iocoder.yudao.module.system.service.user.AdminUserService
;
import
cn.iocoder.yudao.module.wealth.convert.payable.PayableConvert
;
import
cn.iocoder.yudao.module.wealth.convert.payable.PayableConvert
;
import
cn.iocoder.yudao.module.wealth.convert.payment.PaymentConvert
;
import
cn.iocoder.yudao.module.wealth.convert.payment.PaymentConvert
;
import
cn.iocoder.yudao.module.wealth.convert.paymentApproval.PaymentApprovalConvert
;
import
cn.iocoder.yudao.module.wealth.convert.paymentApproval.PaymentApprovalConvert
;
...
@@ -21,12 +24,15 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
...
@@ -21,12 +24,15 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
import
javax.validation.Valid
;
import
javax.validation.Valid
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
import
static
cn
.
iocoder
.
yudao
.
framework
.
common
.
pojo
.
CommonResult
.
success
;
import
static
cn
.
iocoder
.
yudao
.
framework
.
common
.
pojo
.
CommonResult
.
success
;
...
@@ -45,6 +51,12 @@ public class PaymentController {
...
@@ -45,6 +51,12 @@ public class PaymentController {
@Resource
@Resource
private
PaymentApprovalService
paymentApprovalService
;
private
PaymentApprovalService
paymentApprovalService
;
/*
lanbm 2024-05-17 add
*/
@Autowired
private
AdminUserService
adminUserService
;
@PostMapping
(
"/create"
)
@PostMapping
(
"/create"
)
@ApiOperation
(
"创建付款单"
)
@ApiOperation
(
"创建付款单"
)
...
@@ -75,9 +87,20 @@ public class PaymentController {
...
@@ -75,9 +87,20 @@ public class PaymentController {
@GetMapping
(
"/get"
)
@GetMapping
(
"/get"
)
@ApiOperation
(
"获得付款单详细信息"
)
@ApiOperation
(
"获得付款单详细信息"
)
@ApiImplicitParam
(
name
=
"id"
,
value
=
"编号"
,
required
=
true
,
example
=
"1024"
,
dataTypeClass
=
Long
.
class
)
@ApiImplicitParam
(
name
=
"id"
,
value
=
"编号"
,
required
=
true
,
example
=
"1024"
,
dataTypeClass
=
Long
.
class
)
//@PreAuthorize("@ss.hasPermission('ecw:payment:query')")
public
CommonResult
<
PaymentBackVO
>
getPayment
(
@RequestParam
(
"id"
)
Long
id
)
{
public
CommonResult
<
PaymentBackVO
>
getPayment
(
@RequestParam
(
"id"
)
Long
id
)
{
List
<
AdminUserDO
>
ListUser
=
adminUserService
.
getUsersList
();
Map
<
Long
,
String
>
userMap
=
ListUser
.
stream
().
collect
(
Collectors
.
toMap
((
AdminUserDO:
:
getId
),
AdminUserDO:
:
getNickname
));
//lanbm 2024-05-17 修改问题点
PaymentDO
payment
=
paymentService
.
getPayment
(
id
);
PaymentDO
payment
=
paymentService
.
getPayment
(
id
);
if
(
payment
.
getFkren
()!=
null
&&
payment
.
getFkren
().
length
()
>
0
)
{
payment
.
setFkren
(
userMap
.
get
(
Long
.
parseLong
(
payment
.
getFkren
())));
}
else
{
payment
.
setFkren
(
""
);
}
return
success
(
PaymentConvert
.
INSTANCE
.
convert
(
payment
));
return
success
(
PaymentConvert
.
INSTANCE
.
convert
(
payment
));
}
}
...
@@ -90,14 +113,6 @@ public class PaymentController {
...
@@ -90,14 +113,6 @@ public class PaymentController {
return
success
(
PayableConvert
.
INSTANCE
.
convertList
(
payableService
.
list
(
lambdaQueryWrapper
)));
return
success
(
PayableConvert
.
INSTANCE
.
convertList
(
payableService
.
list
(
lambdaQueryWrapper
)));
}
}
/* @GetMapping("/list")
@ApiOperation("获得付款单列表")
@ApiImplicitParam(name = "ids", value = "编号列表", required = true, example = "1024,2048", dataTypeClass = List.class)
//@PreAuthorize("@ss.hasPermission('ecw:payment:query')")
public CommonResult<List<PaymentBackVO>> getPaymentList(@RequestParam("ids") Collection<Long> ids) {
List<PaymentDO> list = paymentService.getPaymentList(ids);
return success(PaymentConvert.INSTANCE.convertList(list));
}*/
@GetMapping
(
"/page"
)
@GetMapping
(
"/page"
)
@ApiOperation
(
"获得付款单分页"
)
@ApiOperation
(
"获得付款单分页"
)
...
@@ -107,15 +122,6 @@ public class PaymentController {
...
@@ -107,15 +122,6 @@ public class PaymentController {
return
success
(
PaymentConvert
.
INSTANCE
.
convertPage
(
pageResult
));
return
success
(
PaymentConvert
.
INSTANCE
.
convertPage
(
pageResult
));
}
}
/* @PostMapping("/verify")
@ApiOperation("审核付款单")
//@PreAuthorize("@ss.hasPermission('ecw:receipt:query')")
public CommonResult<Boolean> verifyPayment(@Valid @RequestBody PaymentVerifyVo paymentVerifyVo) {
paymentService.verifyPayment(paymentVerifyVo);
return success(true);
}*/
@GetMapping
(
"/getPaymentApprove"
)
@GetMapping
(
"/getPaymentApprove"
)
@ApiOperation
(
"根据流程主键获取付款单流程审核信息"
)
@ApiOperation
(
"根据流程主键获取付款单流程审核信息"
)
@ApiImplicitParam
(
name
=
"id"
,
value
=
"编号"
,
required
=
true
,
example
=
"1024"
,
dataTypeClass
=
Long
.
class
)
@ApiImplicitParam
(
name
=
"id"
,
value
=
"编号"
,
required
=
true
,
example
=
"1024"
,
dataTypeClass
=
Long
.
class
)
...
@@ -123,6 +129,7 @@ public class PaymentController {
...
@@ -123,6 +129,7 @@ public class PaymentController {
PaymentApprovalDO
paymentApprovalDO
=
paymentApprovalService
.
getPaymentApproval
(
id
);
PaymentApprovalDO
paymentApprovalDO
=
paymentApprovalService
.
getPaymentApproval
(
id
);
return
success
(
PaymentApprovalConvert
.
INSTANCE
.
convert
(
paymentApprovalDO
));
return
success
(
PaymentApprovalConvert
.
INSTANCE
.
convert
(
paymentApprovalDO
));
}
}
@PostMapping
(
"/cancelFinancePaymentApproval"
)
@PostMapping
(
"/cancelFinancePaymentApproval"
)
@ApiOperation
(
"取消付款单审核"
)
@ApiOperation
(
"取消付款单审核"
)
@Idempotent
(
timeout
=
5
)
@Idempotent
(
timeout
=
5
)
...
@@ -150,8 +157,11 @@ public class PaymentController {
...
@@ -150,8 +157,11 @@ public class PaymentController {
@PostMapping
(
"/verification"
)
@PostMapping
(
"/verification"
)
@ApiOperation
(
"付款单核销"
)
@ApiOperation
(
"付款单核销"
)
@Idempotent
(
timeout
=
5
)
@Idempotent
(
timeout
=
5
)
/*//@PreAuthorize("@ss.hasPermission('ecw:receipt:query')")*/
/*//@PreAuthorize("@ss.hasPermission('ecw:receipt:query')")*/
public
CommonResult
<
Boolean
>
verification
(
@RequestBody
FinancePaymentVo
financePaymentVo
)
{
public
CommonResult
<
Boolean
>
verification
(
@RequestBody
FinancePaymentVo
financePaymentVo
)
{
//核销 lanbm 2024-05-17 update
Long
loginUserId
=
SecurityFrameworkUtils
.
getLoginUserId
();
financePaymentVo
.
setFkren
(
loginUserId
.
toString
());
paymentService
.
verification
(
financePaymentVo
);
paymentService
.
verification
(
financePaymentVo
);
return
success
(
true
);
return
success
(
true
);
}
}
...
@@ -180,18 +190,4 @@ public class PaymentController {
...
@@ -180,18 +190,4 @@ public class PaymentController {
paymentService
.
cancelFinancePaymentWriteOffNo
(
createReqVO
);
paymentService
.
cancelFinancePaymentWriteOffNo
(
createReqVO
);
return
success
(
true
);
return
success
(
true
);
}
}
/* @GetMapping("/export-excel")
@ApiOperation("导出付款单 Excel")
//@PreAuthorize("@ss.hasPermission('ecw:payment:export')")
@OperateLog(type = EXPORT)
public void exportPaymentExcel(@Valid PaymentQueryVO query,
HttpServletResponse response) throws IOException {
List<PaymentDO> list = paymentService.getPaymentList(query);
// 导出 Excel
List<PaymentBackVO> datas = PaymentConvert.INSTANCE.convertList(list);
ExcelUtils.write(response, "付款单.xls", "数据", PaymentBackVO.class, datas);
}*/
}
}
yudao-module-wealth/yudao-module-wealth-rest/src/main/java/cn/iocoder/yudao/module/wealth/controller/admin/receipt/ReceiptController.java
View file @
d7fda5d3
...
@@ -107,6 +107,7 @@ public class ReceiptController {
...
@@ -107,6 +107,7 @@ public class ReceiptController {
@ApiOperation
(
"创建收款单"
)
@ApiOperation
(
"创建收款单"
)
@Idempotent
(
timeout
=
5
)
@Idempotent
(
timeout
=
5
)
public
CommonResult
<
Long
>
createReceipt
(
@Valid
@RequestBody
ReceiptCreateReqVO
createReqVO
)
{
public
CommonResult
<
Long
>
createReceipt
(
@Valid
@RequestBody
ReceiptCreateReqVO
createReqVO
)
{
//lanbm 2024-05-19 添加注释
return
success
(
receiptService
.
createReceipt
(
createReqVO
));
return
success
(
receiptService
.
createReceipt
(
createReqVO
));
}
}
...
...
yudao-module-wealth/yudao-module-wealth-rest/src/main/java/cn/iocoder/yudao/module/wealth/controller/admin/receiptItem/BankReceiptDetailsControl.java
0 → 100644
View file @
d7fda5d3
package
cn
.
iocoder
.
yudao
.
module
.
wealth
.
controller
.
admin
.
receiptItem
;
import
cn.iocoder.yudao.framework.common.pojo.CommonResult
;
import
cn.iocoder.yudao.framework.common.pojo.PageResult
;
import
cn.iocoder.yudao.module.wealth.convert.receiptItem.ReceiptItemConvert
;
import
cn.iocoder.yudao.module.wealth.dal.dataobject.receipt.ReceiptDO
;
import
cn.iocoder.yudao.module.wealth.dal.dataobject.receiptItem.ReceiptItemDO
;
import
cn.iocoder.yudao.module.wealth.dal.mysql.receipt.ReceiptMapper
;
import
cn.iocoder.yudao.module.wealth.service.receiptItem.BankReceiptDetailsService
;
import
cn.iocoder.yudao.module.wealth.service.receiptItem.ReceiptItemService
;
import
cn.iocoder.yudao.module.wealth.vo.receiptItem.ReceiptItemBackVO
;
import
cn.iocoder.yudao.module.wealth.vo.receiptItem.ReceiptItemReq
;
import
cn.iocoder.yudao.module.wealth.vo.receiptItem.ReceiptItemResp
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
javax.annotation.Resource
;
import
java.util.List
;
import
static
cn
.
iocoder
.
yudao
.
framework
.
common
.
pojo
.
CommonResult
.
success
;
@Validated
@RestController
@Api
(
tags
=
"管理后台 - 收款明细"
)
@RequestMapping
(
"/ecw/BankReceiptDetails"
)
public
class
BankReceiptDetailsControl
{
@Resource
private
BankReceiptDetailsService
bankReceiptDetailsService
;
@Autowired
private
ReceiptMapper
receiptMapper
;
@GetMapping
(
"/list"
)
@ApiOperation
(
"收款明细列表"
)
public
CommonResult
<
PageResult
<
ReceiptItemResp
>>
getBankReceiptDetailsList
(
ReceiptItemReq
req
)
{
return
success
(
bankReceiptDetailsService
.
getBankReceiptDetailsList
(
req
));
}
@GetMapping
(
"/test"
)
@ApiOperation
(
"测试"
)
public
CommonResult
<
Boolean
>
doTest
(
ReceiptItemReq
req
)
{
ReceiptDO
r
=
new
ReceiptDO
();
r
.
setOrderId
(
123
);
r
.
setReceiptNo
(
"ww"
);
receiptMapper
.
insert
(
r
);
return
success
(
true
);
}
}
yudao-module-wealth/yudao-module-wealth-rest/src/main/java/cn/iocoder/yudao/module/wealth/controller/admin/receiptItem/ReceiptItemController.java
View file @
d7fda5d3
...
@@ -107,40 +107,4 @@ public class ReceiptItemController {
...
@@ -107,40 +107,4 @@ public class ReceiptItemController {
return
success
(
true
);
return
success
(
true
);
}
}
/*@GetMapping("/verification/{id}")
@ApiOperation("收款明细核销")
@ApiImplicitParam(name = "id", value = "收款明细ID", required = true, example = "1024", dataTypeClass = Long.class)
public CommonResult<Boolean> verification(@PathVariable("id") Long id) {
receiptItemService.verification(id);
return success(true);
}
@GetMapping("/batchVerification")
@ApiOperation("收款明细批量核销 ")
@ApiImplicitParam(name = "ids", value = "编号列表", required = true, example = "1024,2048", dataTypeClass = List.class)
public CommonResult<Boolean> batchVerification(@RequestParam("ids") Collection<Long> ids) {
if (ids.size() == 0) {
return success(true);
}
receiptItemService.batchVerification(ids);
return success(true);
}
@GetMapping("/allVerification/{id}")
@ApiOperation("收款单全部核销 ")
@ApiImplicitParam(name = "id", value = "收款单ID", required = true, example = "1024", dataTypeClass = Long.class)
public CommonResult<Boolean> allVerification(@PathVariable("id") Long id) {
receiptItemService.allVerification(id);
return success(true);
}
@GetMapping("/verificationCancel/{id}")
@ApiOperation("收款明细反核销")
@ApiImplicitParam(name = "id", value = "收款明细ID", required = true, example = "1024", dataTypeClass = Long.class)
public CommonResult<Boolean> verificationCancel(@PathVariable("id") Long id) {
receiptItemService.verificationCancel(id);
return success(true);
}*/
}
}
yudao-module-wealth/yudao-module-wealth-rest/src/main/resources/mapper/ReceiptItem/BankReceiptDetailsMapper.xml
0 → 100644
View file @
d7fda5d3
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"cn.iocoder.yudao.module.wealth.dal.mysql.receiptItem.BankReceiptDetailsMapper"
>
<select
id=
"getBankReceiptDetailsList"
resultType=
"cn.iocoder.yudao.module.wealth.vo.receiptItem.ReceiptItemResp"
>
SELECT p.*,m.receipt_no,m.order_id,
r.order_no,r.tidan_no
from ecw_receipt_item p
left join ecw_receipt m on p.receipt_id=m.id and m.deleted=0
left join ecw_order r on r.order_id=m.order_id and r.deleted=0
<include
refid=
"WherePage"
/>
ORDER BY p.create_time asc limit #{start}, #{pageSize}
</select>
<sql
id=
"WherePage"
>
<where>
p.deleted=0
<if
test=
"receiptNo != null"
>
AND m.receipt_no like concat('%',#{receiptNo},'%')
</if>
<if
test=
"orderNo != null"
>
AND m.order_no like concat('%',#{orderNo},'%')
</if>
</where>
</sql>
<select
id=
"GetCount"
resultType=
"java.lang.Long"
>
SELECT count(p.id)
from ecw_receipt_item p
left join ecw_receipt m on p.receipt_id=m.id and m.deleted=0
left join ecw_order r on r.order_id=m.order_id and r.deleted=0
<include
refid=
"WherePage"
/>
</select>
</mapper>
yudao-module-wealth/yudao-module-wealth-rest/src/main/resources/mapper/payable/PayableMapper.xml
View file @
d7fda5d3
...
@@ -9,8 +9,10 @@
...
@@ -9,8 +9,10 @@
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/
-->
-->
<select
id=
"selectListPage"
resultType=
"cn.iocoder.yudao.module.wealth.vo.payable.PayableOrderBackVo"
>
<select
id=
"selectListPage"
resultType=
"cn.iocoder.yudao.module.wealth.vo.payable.PayableOrderBackVo"
>
select a.*
select a.*,b.shipment_status_air as shipmentStatusAir,
b.shipment_status as shipmentStatus
from ecw_payable a
from ecw_payable a
left join ecw_box b on a.payable_no =b.self_no and b.deleted=0
${ew.customSqlSegment}
${ew.customSqlSegment}
</select>
</select>
</mapper>
</mapper>
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