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
13803228
Commit
13803228
authored
Nov 06, 2024
by
332784038@qq.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
审批状态更新业务bug修复
parent
9186abc2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
42 additions
and
24 deletions
+42
-24
OrderDO.java
...oder/yudao/module/order/dal/dataobject/order/OrderDO.java
+6
-0
OrderServiceImpl.java
...dao/module/order/service/order/impl/OrderServiceImpl.java
+36
-24
No files found.
yudao-module-order/yudao-module-order-core/src/main/java/cn/iocoder/yudao/module/order/dal/dataobject/order/OrderDO.java
View file @
13803228
...
...
@@ -691,4 +691,10 @@ public class OrderDO extends BaseDO {
@TableField
(
exist
=
false
)
private
Boolean
isChargeDraft
=
Boolean
.
FALSE
;
@ApiModelProperty
(
value
=
"日志描述信息传值封装字段"
)
@TableField
(
exist
=
false
)
private
String
msg
=
""
;
}
yudao-module-order/yudao-module-order-core/src/main/java/cn/iocoder/yudao/module/order/service/order/impl/OrderServiceImpl.java
View file @
13803228
...
...
@@ -4328,19 +4328,20 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
if
(
Objects
.
nonNull
(
auditType
))
{
// TODO 这里可能出现并行的审批任务,当结束一个审批任务变更为0时,需要同步查询当前正在进行的其他审批任务
if
(
auditType
==
0
)
{
this
.
checkOrderProcessingApprovalType
(
orderId
,
currentOrderDO
.
getContainerNumber
(),
auditType
,
auditResult
);
}
currentOrderDO
.
setAuditType
(
auditType
);
if
(
StringUtils
.
isNotBlank
(
auditResult
))
{
// 获取固定中文说明描述
msg
=
I18nMessage
.
getZhMessage
(
auditResult
);
this
.
checkOrderProcessingApprovalType
(
orderId
,
currentOrderDO
,
auditType
,
auditResult
);
msg
=
currentOrderDO
.
getMsg
();
}
else
{
currentOrderDO
.
setAuditType
(
auditType
);
currentOrderDO
.
setAuditResult
(
auditResult
);
if
(
StringUtils
.
isNotBlank
(
auditResult
))
{
// 获取固定中文说明描述
msg
=
I18nMessage
.
getZhMessage
(
auditResult
);
}
}
}
if
(
currentOrderDO
.
getAuditType
()
==
0
&&
StringUtils
.
isBlank
(
auditResult
))
{
auditResult
=
""
;
if
(
currentOrderDO
.
getAuditType
()
==
0
&&
StringUtils
.
isBlank
(
currentOrderDO
.
getAuditResult
()
))
{
currentOrderDO
.
setAuditResult
(
""
)
;
}
currentOrderDO
.
setAuditResult
(
auditResult
);
orderMapper
.
updateById
(
currentOrderDO
);
// 完成入仓时设置入仓体积和入仓重量
...
...
@@ -4395,14 +4396,18 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
* @param auditType 审批类型
* @param auditResult 审批结果
*/
private
void
checkOrderProcessingApprovalType
(
Long
orderId
,
String
containerNumber
,
Integer
auditType
,
String
auditResult
)
{
private
void
checkOrderProcessingApprovalType
(
Long
orderId
,
OrderDO
orderDO
,
Integer
auditType
,
String
auditResult
)
{
// 出货审批更新
if
(
StringUtils
.
isNotBlank
(
containerNumber
)){
BoxCheckOrderApprovalEvent
boxCheckOrderApprovalEvent
=
new
BoxCheckOrderApprovalEvent
(
orderId
,
containerNumber
,
auditType
,
auditResult
,
false
);
if
(
StringUtils
.
isNotBlank
(
orderDO
.
getContainerNumber
()
)){
BoxCheckOrderApprovalEvent
boxCheckOrderApprovalEvent
=
new
BoxCheckOrderApprovalEvent
(
orderId
,
orderDO
.
getContainerNumber
()
,
auditType
,
auditResult
,
false
);
applicationContext
.
publishEvent
(
boxCheckOrderApprovalEvent
);
if
(
boxCheckOrderApprovalEvent
.
getIsExists
())
{
auditType
=
boxCheckOrderApprovalEvent
.
getAuditType
();
auditResult
=
boxCheckOrderApprovalEvent
.
getAuditResult
();
orderDO
.
setAuditType
(
auditType
);
orderDO
.
setAuditResult
(
auditResult
);
if
(
StringUtils
.
isNotBlank
(
auditResult
))
{
// 获取固定中文说明描述
orderDO
.
setMsg
(
I18nMessage
.
getZhMessage
(
auditResult
));
}
return
;
}
}
...
...
@@ -4416,18 +4421,24 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
switch
(
warehouseApprovalDO
.
getType
()){
case
1
:
// 入仓修改
auditType
=
warehouse_update_processing
.
getType
();
auditResult
=
warehouse_update_processing
.
getDesc
();
orderDO
.
setAuditType
(
warehouse_update_processing
.
getType
());
orderDO
.
setAuditResult
(
warehouse_update_processing
.
getDesc
());
// 获取固定中文说明描述
orderDO
.
setMsg
(
I18nMessage
.
getZhMessage
(
warehouse_update_processing
.
getDesc
()));
return
;
case
2
:
// 调仓
auditType
=
warehouse_adjust_processing
.
getType
();
auditResult
=
warehouse_adjust_processing
.
getDesc
();
orderDO
.
setAuditType
(
warehouse_adjust_processing
.
getType
());
orderDO
.
setAuditResult
(
warehouse_adjust_processing
.
getDesc
());
// 获取固定中文说明描述
orderDO
.
setMsg
(
I18nMessage
.
getZhMessage
(
warehouse_update_processing
.
getDesc
()));
return
;
case
3
:
// 退仓
auditType
=
warehouse_rollback_processing
.
getType
();
auditResult
=
warehouse_rollback_processing
.
getDesc
();
orderDO
.
setAuditType
(
warehouse_rollback_processing
.
getType
());
orderDO
.
setAuditResult
(
warehouse_rollback_processing
.
getDesc
());
// 获取固定中文说明描述
orderDO
.
setMsg
(
I18nMessage
.
getZhMessage
(
warehouse_rollback_processing
.
getDesc
()));
return
;
}
}
...
...
@@ -4439,9 +4450,10 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
.
last
(
"limit 1"
));
if
(
Objects
.
nonNull
(
approvalDO
)){
OrderApprovalTypeResultEnum
resultEnum
=
OrderApprovalTypeResultEnum
.
typeAndResultOf
(
approvalDO
.
getType
(),
approvalDO
.
getStatus
());
auditType
=
resultEnum
.
getType
();
auditResult
=
resultEnum
.
getDesc
();
return
;
orderDO
.
setAuditType
(
resultEnum
.
getType
());
orderDO
.
setAuditResult
(
resultEnum
.
getDesc
());
// 获取固定中文说明描述
orderDO
.
setMsg
(
I18nMessage
.
getZhMessage
(
resultEnum
.
getDesc
()));
}
}
...
...
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