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 {
...
@@ -691,4 +691,10 @@ public class OrderDO extends BaseDO {
@TableField
(
exist
=
false
)
@TableField
(
exist
=
false
)
private
Boolean
isChargeDraft
=
Boolean
.
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
...
@@ -4328,19 +4328,20 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
if
(
Objects
.
nonNull
(
auditType
))
{
if
(
Objects
.
nonNull
(
auditType
))
{
// TODO 这里可能出现并行的审批任务,当结束一个审批任务变更为0时,需要同步查询当前正在进行的其他审批任务
// TODO 这里可能出现并行的审批任务,当结束一个审批任务变更为0时,需要同步查询当前正在进行的其他审批任务
if
(
auditType
==
0
)
{
if
(
auditType
==
0
)
{
this
.
checkOrderProcessingApprovalType
(
orderId
,
currentOrderDO
.
getContainerNumber
(),
auditType
,
auditResult
);
this
.
checkOrderProcessingApprovalType
(
orderId
,
currentOrderDO
,
auditType
,
auditResult
);
}
msg
=
currentOrderDO
.
getMsg
();
currentOrderDO
.
setAuditType
(
auditType
);
}
else
{
currentOrderDO
.
setAuditType
(
auditType
);
if
(
StringUtils
.
isNotBlank
(
auditResult
))
{
currentOrderDO
.
setAuditResult
(
auditResult
);
// 获取固定中文说明描述
if
(
StringUtils
.
isNotBlank
(
auditResult
))
{
msg
=
I18nMessage
.
getZhMessage
(
auditResult
);
// 获取固定中文说明描述
msg
=
I18nMessage
.
getZhMessage
(
auditResult
);
}
}
}
}
}
if
(
currentOrderDO
.
getAuditType
()
==
0
&&
StringUtils
.
isBlank
(
auditResult
))
{
if
(
currentOrderDO
.
getAuditType
()
==
0
&&
StringUtils
.
isBlank
(
currentOrderDO
.
getAuditResult
()
))
{
auditResult
=
""
;
currentOrderDO
.
setAuditResult
(
""
)
;
}
}
currentOrderDO
.
setAuditResult
(
auditResult
);
orderMapper
.
updateById
(
currentOrderDO
);
orderMapper
.
updateById
(
currentOrderDO
);
// 完成入仓时设置入仓体积和入仓重量
// 完成入仓时设置入仓体积和入仓重量
...
@@ -4395,14 +4396,18 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
...
@@ -4395,14 +4396,18 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
* @param auditType 审批类型
* @param auditType 审批类型
* @param auditResult 审批结果
* @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
)){
if
(
StringUtils
.
isNotBlank
(
orderDO
.
getContainerNumber
()
)){
BoxCheckOrderApprovalEvent
boxCheckOrderApprovalEvent
=
new
BoxCheckOrderApprovalEvent
(
orderId
,
containerNumber
,
auditType
,
auditResult
,
false
);
BoxCheckOrderApprovalEvent
boxCheckOrderApprovalEvent
=
new
BoxCheckOrderApprovalEvent
(
orderId
,
orderDO
.
getContainerNumber
()
,
auditType
,
auditResult
,
false
);
applicationContext
.
publishEvent
(
boxCheckOrderApprovalEvent
);
applicationContext
.
publishEvent
(
boxCheckOrderApprovalEvent
);
if
(
boxCheckOrderApprovalEvent
.
getIsExists
())
{
if
(
boxCheckOrderApprovalEvent
.
getIsExists
())
{
auditType
=
boxCheckOrderApprovalEvent
.
getAuditType
();
orderDO
.
setAuditType
(
auditType
);
auditResult
=
boxCheckOrderApprovalEvent
.
getAuditResult
();
orderDO
.
setAuditResult
(
auditResult
);
if
(
StringUtils
.
isNotBlank
(
auditResult
))
{
// 获取固定中文说明描述
orderDO
.
setMsg
(
I18nMessage
.
getZhMessage
(
auditResult
));
}
return
;
return
;
}
}
}
}
...
@@ -4416,18 +4421,24 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
...
@@ -4416,18 +4421,24 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
switch
(
warehouseApprovalDO
.
getType
()){
switch
(
warehouseApprovalDO
.
getType
()){
case
1
:
case
1
:
// 入仓修改
// 入仓修改
auditType
=
warehouse_update_processing
.
getType
();
orderDO
.
setAuditType
(
warehouse_update_processing
.
getType
());
auditResult
=
warehouse_update_processing
.
getDesc
();
orderDO
.
setAuditResult
(
warehouse_update_processing
.
getDesc
());
// 获取固定中文说明描述
orderDO
.
setMsg
(
I18nMessage
.
getZhMessage
(
warehouse_update_processing
.
getDesc
()));
return
;
return
;
case
2
:
case
2
:
// 调仓
// 调仓
auditType
=
warehouse_adjust_processing
.
getType
();
orderDO
.
setAuditType
(
warehouse_adjust_processing
.
getType
());
auditResult
=
warehouse_adjust_processing
.
getDesc
();
orderDO
.
setAuditResult
(
warehouse_adjust_processing
.
getDesc
());
// 获取固定中文说明描述
orderDO
.
setMsg
(
I18nMessage
.
getZhMessage
(
warehouse_update_processing
.
getDesc
()));
return
;
return
;
case
3
:
case
3
:
// 退仓
// 退仓
auditType
=
warehouse_rollback_processing
.
getType
();
orderDO
.
setAuditType
(
warehouse_rollback_processing
.
getType
());
auditResult
=
warehouse_rollback_processing
.
getDesc
();
orderDO
.
setAuditResult
(
warehouse_rollback_processing
.
getDesc
());
// 获取固定中文说明描述
orderDO
.
setMsg
(
I18nMessage
.
getZhMessage
(
warehouse_rollback_processing
.
getDesc
()));
return
;
return
;
}
}
}
}
...
@@ -4439,9 +4450,10 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
...
@@ -4439,9 +4450,10 @@ public class OrderServiceImpl extends AbstractService<OrderMapper, OrderDO> impl
.
last
(
"limit 1"
));
.
last
(
"limit 1"
));
if
(
Objects
.
nonNull
(
approvalDO
)){
if
(
Objects
.
nonNull
(
approvalDO
)){
OrderApprovalTypeResultEnum
resultEnum
=
OrderApprovalTypeResultEnum
.
typeAndResultOf
(
approvalDO
.
getType
(),
approvalDO
.
getStatus
());
OrderApprovalTypeResultEnum
resultEnum
=
OrderApprovalTypeResultEnum
.
typeAndResultOf
(
approvalDO
.
getType
(),
approvalDO
.
getStatus
());
auditType
=
resultEnum
.
getType
();
orderDO
.
setAuditType
(
resultEnum
.
getType
());
auditResult
=
resultEnum
.
getDesc
();
orderDO
.
setAuditResult
(
resultEnum
.
getDesc
());
return
;
// 获取固定中文说明描述
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