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
7126027d
Commit
7126027d
authored
Aug 28, 2024
by
zhengyi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
补充控货订单的新增审批任务操作日志
Signed-off-by:
zhengyi
<
landuo321@aliyun.com
>
parent
50f91b7c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
60 additions
and
8 deletions
+60
-8
OrderCargoControlServiceImpl.java
...rvice/orderCargoControl/OrderCargoControlServiceImpl.java
+60
-8
No files found.
yudao-module-order/yudao-module-order-core/src/main/java/cn/iocoder/yudao/module/order/service/orderCargoControl/OrderCargoControlServiceImpl.java
View file @
7126027d
...
...
@@ -486,35 +486,70 @@ public class OrderCargoControlServiceImpl extends AbstractService<OrderCargoCont
if
(
Objects
.
isNull
(
orderApprovalDO
))
{
throw
exception
(
ORDER_APPROVAL_INFO_NOT_FIND
);
}
OrderCargoControlApplyVO
applyVO
=
JSONObject
.
parseObject
(
orderApprovalDO
.
getDetails
(),
OrderCargoControlApplyVO
.
class
);
orderApprovalDO
.
setStatus
(
result
);
List
<
ApplyInfoVO
>
list
=
new
ArrayList
<>();
String
msg
=
""
;
if
(
result
==
1
)
{
// 进行中的审批直接返回
return
;
}
if
(
result
==
3
||
result
==
4
)
{
// TODO 审批取消、审批拒绝,待补充业务日志及其他细节
return
;
if
(
orderApprovalDO
.
getType
()
==
61
)
{
msg
=
result
==
3
?
"收货人限制修改申请取消"
:
"收货人限制修改申请拒绝"
;
ApplyInfoVO
applyInfoVO
=
new
ApplyInfoVO
();
applyInfoVO
.
setName
(
"是否限制修改收货人"
);
applyInfoVO
.
setOrgValue
(
applyVO
.
getIsLimitUpdateConsignee
()
?
"是"
:
"否"
);
applyInfoVO
.
setNewValue
(
applyVO
.
getNewIsLimitUpdateConsignee
()
?
"是"
:
"否"
);
list
.
add
(
applyInfoVO
);
applyInfoVO
=
new
ApplyInfoVO
();
applyInfoVO
.
setName
(
"锁定收货人天数"
);
applyInfoVO
.
setOrgValue
(
Objects
.
isNull
(
applyVO
.
getLockConsigneeDay
())
?
"空"
:
applyVO
.
getLockConsigneeDay
()
+
"天"
);
applyInfoVO
.
setNewValue
(
Objects
.
isNull
(
applyVO
.
getNewLockConsigneeDay
())
?
"空"
:
applyVO
.
getNewLockConsigneeDay
()
+
"天"
);
list
.
add
(
applyInfoVO
);
}
else
if
(
orderApprovalDO
.
getType
()
==
61
)
{
msg
=
result
==
3
?
"海外仓修改申请取消"
:
"海外仓修改申请拒绝"
;
ApplyInfoVO
applyInfoVO
=
new
ApplyInfoVO
();
applyInfoVO
.
setName
(
"订单修改为海外仓模式"
);
list
.
add
(
applyInfoVO
);
}
}
if
(
result
==
2
)
{
OrderCargoControlApplyVO
applyVO
=
JSONObject
.
parseObject
(
orderApprovalDO
.
getDetails
(),
OrderCargoControlApplyVO
.
class
);
if
(
orderApprovalDO
.
getType
()
==
61
)
{
// 修改放货限制
Integer
newLockConsigneeDay
=
applyVO
.
getNewIsLimitUpdateConsignee
()
?
applyVO
.
getNewLockConsigneeDay
()
:
null
;
OrderDO
orderDO
=
orderService
.
getById
(
applyVO
.
getOrderId
());
Date
newLockConsigneeTime
=
Objects
.
isNull
(
orderDO
.
getUnloadTime
())
||
Objects
.
isNull
(
newLockConsigneeDay
)
?
null
:
DateUtil
.
endOfDay
(
DateUtil
.
offsetDay
(
orderDO
.
getUnloadTime
(),
newLockConsigneeDay
));;
Date
newLockConsigneeTime
=
Objects
.
isNull
(
orderDO
.
getUnloadTime
())
||
Objects
.
isNull
(
newLockConsigneeDay
)
?
null
:
DateUtil
.
endOfDay
(
DateUtil
.
offsetDay
(
orderDO
.
getUnloadTime
(),
newLockConsigneeDay
));
;
orderService
.
update
(
new
LambdaUpdateWrapper
<
OrderDO
>()
.
set
(
OrderDO:
:
getIsLimitUpdateConsignee
,
applyVO
.
getNewIsLimitUpdateConsignee
())
.
set
(
OrderDO:
:
getLockConsigneeDay
,
newLockConsigneeDay
)
.
set
(
OrderDO:
:
getLockConsigneeTime
,
newLockConsigneeTime
)
.
eq
(
OrderDO:
:
getOrderId
,
orderApprovalDO
.
getOrderId
()));
// TODO 补充订单日志
}
if
(
orderApprovalDO
.
getType
()
==
62
)
{
msg
=
"收货人限制修改申请审批通过"
;
ApplyInfoVO
applyInfoVO
=
new
ApplyInfoVO
();
applyInfoVO
.
setName
(
"是否限制修改收货人"
);
applyInfoVO
.
setOrgValue
(
applyVO
.
getIsLimitUpdateConsignee
()
?
"是"
:
"否"
);
applyInfoVO
.
setNewValue
(
applyVO
.
getNewIsLimitUpdateConsignee
()
?
"是"
:
"否"
);
list
.
add
(
applyInfoVO
);
applyInfoVO
=
new
ApplyInfoVO
();
applyInfoVO
.
setName
(
"锁定收货人天数"
);
applyInfoVO
.
setOrgValue
(
Objects
.
isNull
(
applyVO
.
getLockConsigneeDay
())
?
"空"
:
applyVO
.
getLockConsigneeDay
()
+
"天"
);
applyInfoVO
.
setNewValue
(
Objects
.
isNull
(
applyVO
.
getNewLockConsigneeDay
())
?
"空"
:
applyVO
.
getNewLockConsigneeDay
()
+
"天"
);
list
.
add
(
applyInfoVO
);
}
else
if
(
orderApprovalDO
.
getType
()
==
62
)
{
// TODO 海外仓修改申请
msg
=
"海外仓修改申请审批通过"
;
ApplyInfoVO
applyInfoVO
=
new
ApplyInfoVO
();
applyInfoVO
.
setName
(
"订单修改为海外仓模式"
);
list
.
add
(
applyInfoVO
);
}
}
orderApprovalMapper
.
updateById
(
orderApprovalDO
);
// orderBusinessService.createOrderControlLogs(controlLogParams
);
orderBusinessService
.
addOrderOperateLog
(
orderApprovalDO
.
getOrderId
(),
"订单操作"
,
msg
,
list
);
}
...
...
@@ -566,7 +601,8 @@ public class OrderCargoControlServiceImpl extends AbstractService<OrderCargoCont
orderApprovalDO
.
setUpdater
(
creator
);
orderApprovalDO
.
setCreateTime
(
now
);
orderApprovalDO
.
setUpdateTime
(
now
);
List
<
ApplyInfoVO
>
list
=
new
ArrayList
<>();
String
msg
=
""
;
if
(
orderCargoControlApplyVO
.
getApplyType
()
==
61
)
{
orderApprovalDO
.
setOrderId
(
orderCargoControlApplyVO
.
getOrderId
());
orderApprovalDO
.
setType
(
61
);
...
...
@@ -575,6 +611,17 @@ public class OrderCargoControlServiceImpl extends AbstractService<OrderCargoCont
String
formId
=
bpmCreateServiceFactory
.
createBmp
(
userId
,
orderApprovalDO
.
getOrderApprovalId
(),
WorkFlowEmus
.
ORDER_MODEL_CHANGE
.
getKey
(),
orderDO
.
getOrderNo
(),
StringUtils
.
isNotBlank
(
orderCargoControlApplyVO
.
getCcIds
())
?
orderCargoControlApplyVO
.
getCcIds
().
split
(
StrUtil
.
COMMA
)
:
null
);
orderApprovalDO
.
setFormId
(
formId
);
msg
=
"收货人限制修改申请"
;
ApplyInfoVO
applyInfoVO
=
new
ApplyInfoVO
();
applyInfoVO
.
setName
(
"是否限制修改收货人"
);
applyInfoVO
.
setOrgValue
(
orderCargoControlApplyVO
.
getIsLimitUpdateConsignee
()
?
"是"
:
"否"
);
applyInfoVO
.
setNewValue
(
orderCargoControlApplyVO
.
getNewIsLimitUpdateConsignee
()
?
"是"
:
"否"
);
list
.
add
(
applyInfoVO
);
applyInfoVO
=
new
ApplyInfoVO
();
applyInfoVO
.
setName
(
"锁定收货人天数"
);
applyInfoVO
.
setOrgValue
(
Objects
.
isNull
(
orderCargoControlApplyVO
.
getLockConsigneeDay
())
?
"空"
:
orderCargoControlApplyVO
.
getLockConsigneeDay
()
+
"天"
);
applyInfoVO
.
setNewValue
(
Objects
.
isNull
(
orderCargoControlApplyVO
.
getNewLockConsigneeDay
())
?
"空"
:
orderCargoControlApplyVO
.
getNewLockConsigneeDay
()
+
"天"
);
list
.
add
(
applyInfoVO
);
}
else
if
(
orderCargoControlApplyVO
.
getApplyType
()
==
62
)
{
orderApprovalDO
.
setOrderId
(
orderCargoControlApplyVO
.
getOrderId
());
orderApprovalDO
.
setType
(
62
);
...
...
@@ -583,7 +630,12 @@ public class OrderCargoControlServiceImpl extends AbstractService<OrderCargoCont
String
formId
=
bpmCreateServiceFactory
.
createBmp
(
userId
,
orderApprovalDO
.
getOrderApprovalId
(),
WorkFlowEmus
.
SHIPMENT_CHANGE_RELEASE_GOODS_LIMIT
.
getKey
(),
orderDO
.
getOrderNo
(),
StringUtils
.
isNotBlank
(
orderCargoControlApplyVO
.
getCcIds
())
?
orderCargoControlApplyVO
.
getCcIds
().
split
(
StrUtil
.
COMMA
)
:
null
);
orderApprovalDO
.
setFormId
(
formId
);
msg
=
"海外仓修改申请"
;
ApplyInfoVO
applyInfoVO
=
new
ApplyInfoVO
();
applyInfoVO
.
setName
(
"订单修改为海外仓模式"
);
list
.
add
(
applyInfoVO
);
}
orderApprovalMapper
.
updateById
(
orderApprovalDO
);
orderBusinessService
.
addOrderOperateLog
(
orderApprovalDO
.
getOrderId
(),
"订单操作"
,
msg
,
list
);
}
}
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