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
4bf956e3
Commit
4bf956e3
authored
Nov 07, 2024
by
zhengyi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
费用申请审批bug修复
parent
66f83982
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
19 deletions
+35
-19
OrderFeeApplicationServiceImpl.java
...er/service/order/impl/OrderFeeApplicationServiceImpl.java
+34
-19
DictTypeConstants.java
.../iocoder/yudao/module/system/enums/DictTypeConstants.java
+1
-0
No files found.
yudao-module-order/yudao-module-order-core/src/main/java/cn/iocoder/yudao/module/order/service/order/impl/OrderFeeApplicationServiceImpl.java
View file @
4bf956e3
...
...
@@ -232,26 +232,34 @@ public class OrderFeeApplicationServiceImpl extends AbstractService<OrderFeeAppl
orderFeeApplicationDOOld
.
setBpmProcessId
(
String
.
valueOf
(
bpmProcessId
));
orderFeeApplicationDOOld
.
setStatus
(
1
);
feeApplicationMapper
.
updateById
(
orderFeeApplicationDOOld
);
DictDataRespDTO
dictDataFromCacheOld
=
DictFrameworkUtils
.
getDictDataFromCache
(
DictTypeConstants
.
RECEIVABLE_FEE_TYPE
,
String
.
valueOf
(
orderFeeApplicationDOOld
.
getFeeType
()));
DictDataRespDTO
dictDataFromCache
=
DictFrameworkUtils
.
getDictDataFromCache
(
DictTypeConstants
.
RECEIVABLE_FEE_TYPE
,
String
.
valueOf
(
updateReqVO
.
getFeeType
()));
DictDataRespDTO
feeDictDataFromCacheOld
=
DictFrameworkUtils
.
getDictDataFromCache
(
DictTypeConstants
.
RECEIVABLE_FEE_TYPE
,
String
.
valueOf
(
orderFeeApplicationDOOld
.
getFeeType
()));
DictDataRespDTO
feeDictDataFromCache
=
DictFrameworkUtils
.
getDictDataFromCache
(
DictTypeConstants
.
RECEIVABLE_FEE_TYPE
,
String
.
valueOf
(
updateReqVO
.
getFeeType
()));
DictDataRespDTO
payDictDataFromCacheOld
=
DictFrameworkUtils
.
getDictDataFromCache
(
DictTypeConstants
.
PAYMENT_TYPE
,
String
.
valueOf
(
orderFeeApplicationDOOld
.
getPayType
()));
DictDataRespDTO
payDictDataFromCache
=
DictFrameworkUtils
.
getDictDataFromCache
(
DictTypeConstants
.
PAYMENT_TYPE
,
String
.
valueOf
(
updateReqVO
.
getPayType
()));
CurrencyDO
currency
=
currencyService
.
getCurrency
(
updateReqVO
.
getApplicationFeeCurrency
());
CurrencyDO
currencyOld
=
currencyService
.
getCurrency
(
orderFeeApplicationDOOld
.
getApplicationFeeCurrency
());
List
<
ApplyInfoVO
>
list
=
new
ArrayList
<>();
ApplyInfoVO
applyInfoVO
=
new
ApplyInfoVO
();
applyInfoVO
.
setName
(
"申请费用名称"
);
applyInfoVO
.
setOrgValue
(
I18nMessage
.
getLang
()
==
0
?
dictDataFromCacheOld
.
getLabel
()
:
dictDataFromCacheOld
.
getLabelEn
());
applyInfoVO
.
setNewValue
(
I18nMessage
.
getLang
()
==
0
?
dictDataFromCache
.
getLabel
()
:
dictDataFromCache
.
getLabelEn
());
ApplyInfoVO
applyInfoVO1
=
new
ApplyInfoVO
();
applyInfoVO1
.
setName
(
"金额"
);
applyInfoVO1
.
setOrgValue
(
String
.
valueOf
(
orderFeeApplicationDOOld
.
getApplicationFee
().
doubleValue
()));
applyInfoVO1
.
setNewValue
(
String
.
valueOf
(
updateReqVO
.
getApplicationFee
().
doubleValue
()));
ApplyInfoVO
applyInfoVO2
=
new
ApplyInfoVO
();
applyInfoVO2
.
setName
(
"币种"
);
applyInfoVO2
.
setOrgValue
(
I18nMessage
.
getLang
()
==
0
?
currencyOld
.
getTitleZh
()
:
currencyOld
.
getTitleEn
());
applyInfoVO2
.
setNewValue
(
I18nMessage
.
getLang
()
==
0
?
currency
.
getTitleZh
()
:
currency
.
getTitleEn
());
applyInfoVO
.
setOrgValue
(
I18nMessage
.
getLang
()
==
0
?
feeDictDataFromCacheOld
.
getLabel
()
:
feeDictDataFromCacheOld
.
getLabelEn
());
applyInfoVO
.
setNewValue
(
I18nMessage
.
getLang
()
==
0
?
feeDictDataFromCache
.
getLabel
()
:
feeDictDataFromCache
.
getLabelEn
());
list
.
add
(
applyInfoVO
);
list
.
add
(
applyInfoVO1
);
list
.
add
(
applyInfoVO2
);
applyInfoVO
=
new
ApplyInfoVO
();
applyInfoVO
.
setName
(
"金额"
);
applyInfoVO
.
setOrgValue
(
String
.
valueOf
(
orderFeeApplicationDOOld
.
getApplicationFee
().
doubleValue
()));
applyInfoVO
.
setNewValue
(
String
.
valueOf
(
updateReqVO
.
getApplicationFee
().
doubleValue
()));
list
.
add
(
applyInfoVO
);
applyInfoVO
=
new
ApplyInfoVO
();
applyInfoVO
.
setName
(
"币种"
);
applyInfoVO
.
setOrgValue
(
I18nMessage
.
getLang
()
==
0
?
currencyOld
.
getTitleZh
()
:
currencyOld
.
getTitleEn
());
applyInfoVO
.
setNewValue
(
I18nMessage
.
getLang
()
==
0
?
currency
.
getTitleZh
()
:
currency
.
getTitleEn
());
list
.
add
(
applyInfoVO
);
applyInfoVO
=
new
ApplyInfoVO
();
applyInfoVO
.
setName
(
"付款类型"
);
applyInfoVO
.
setOrgValue
(
I18nMessage
.
getLang
()
==
0
?
payDictDataFromCacheOld
.
getLabel
()
:
payDictDataFromCacheOld
.
getLabelEn
());
applyInfoVO
.
setNewValue
(
I18nMessage
.
getLang
()
==
0
?
payDictDataFromCache
.
getLabel
()
:
payDictDataFromCache
.
getLabelEn
());
list
.
add
(
applyInfoVO
);
orderBusinessService
.
addOrderOperateLog
(
updateObj
.
getOrderId
(),
""
,
"费用修改提交审核"
,
list
);
}
...
...
@@ -280,11 +288,12 @@ public class OrderFeeApplicationServiceImpl extends AbstractService<OrderFeeAppl
feeApplicationMapper
.
deleteById
(
id
);
CurrencyDO
currency
=
currencyService
.
getCurrency
(
orderFeeApplicationDO
.
getApplicationFeeCurrency
());
String
currencyName
=
Objects
.
nonNull
(
currency
)
?
(
I18nMessage
.
getLang
()
==
0
?
currency
.
getTitleZh
()
:
currency
.
getTitleEn
())
:
(
I18nMessage
.
getLang
()
==
0
?
"未知"
:
"NUKNOWN"
);
DictDataRespDTO
dictDataFromCache
=
DictFrameworkUtils
.
getDictDataFromCache
(
DictTypeConstants
.
RECEIVABLE_FEE_TYPE
,
String
.
valueOf
(
orderFeeApplicationDO
.
getFeeType
()));
DictDataRespDTO
feeTypeDictDataFromCache
=
DictFrameworkUtils
.
getDictDataFromCache
(
DictTypeConstants
.
RECEIVABLE_FEE_TYPE
,
String
.
valueOf
(
orderFeeApplicationDO
.
getFeeType
()));
DictDataRespDTO
payTypeDictDataFromCache
=
DictFrameworkUtils
.
getDictDataFromCache
(
DictTypeConstants
.
PAYMENT_TYPE
,
String
.
valueOf
(
orderFeeApplicationDO
.
getPayType
()));
List
<
ApplyInfoVO
>
list
=
new
ArrayList
<>();
ApplyInfoVO
applyInfoVO
=
new
ApplyInfoVO
();
applyInfoVO
.
setName
(
"申请费用名称"
);
applyInfoVO
.
setNewValue
(
I18nMessage
.
getLang
()
==
0
?
dictDataFromCache
.
getLabel
()
:
d
ictDataFromCache
.
getLabelEn
());
applyInfoVO
.
setNewValue
(
I18nMessage
.
getLang
()
==
0
?
feeTypeDictDataFromCache
.
getLabel
()
:
feeTypeD
ictDataFromCache
.
getLabelEn
());
list
.
add
(
applyInfoVO
);
applyInfoVO
=
new
ApplyInfoVO
();
applyInfoVO
.
setName
(
"金额"
);
...
...
@@ -294,6 +303,10 @@ public class OrderFeeApplicationServiceImpl extends AbstractService<OrderFeeAppl
applyInfoVO
.
setName
(
"币种"
);
applyInfoVO
.
setNewValue
(
currencyName
);
list
.
add
(
applyInfoVO
);
applyInfoVO
=
new
ApplyInfoVO
();
applyInfoVO
.
setName
(
"付款类型"
);
applyInfoVO
.
setNewValue
(
I18nMessage
.
getLang
()
==
0
?
payTypeDictDataFromCache
.
getLabel
()
:
payTypeDictDataFromCache
.
getLabelEn
());
list
.
add
(
applyInfoVO
);
orderBusinessService
.
addOrderOperateLog
(
orderFeeApplicationDO
.
getOrderId
(),
"订单操作"
,
"费用申请删除"
,
list
);
}
...
...
@@ -335,10 +348,11 @@ public class OrderFeeApplicationServiceImpl extends AbstractService<OrderFeeAppl
// 这里已经将修改后的内容更新到原数据中去了
OrderFeeApplicationDO
orderFeeApplicationDO
=
JSONObject
.
parseObject
(
orderApprovalDO
.
getDetails
(),
OrderFeeApplicationDO
.
class
);
if
(
orderFeeApplicationDO
!=
null
)
{
orderFeeApplicationDO
.
setStatus
(
result
);
feeApplicationMapper
.
updateById
(
orderFeeApplicationDO
);
List
<
FeeDto
>
feeDtos
=
new
ArrayList
<>();
if
(
result
==
2
)
{
// 审批通过,更新状态与修改后的数据到数据库
orderFeeApplicationDO
.
setStatus
(
result
);
feeApplicationMapper
.
updateById
(
orderFeeApplicationDO
);
OrderBackVO
order
=
orderQueryService
.
getOrder
(
orderFeeApplicationDO
.
getOrderId
());
//生成应收
DictDataRespDTO
dictDto
=
DictFrameworkUtils
.
getDictDataFromCache
(
"receivable_fee_type"
,
String
.
valueOf
(
orderFeeApplicationDO
.
getFeeType
()));
...
...
@@ -410,11 +424,12 @@ public class OrderFeeApplicationServiceImpl extends AbstractService<OrderFeeAppl
orderService
.
updateStatus
(
orderFeeApplicationDO
.
getOrderId
(),
null
,
null
,
null
,
null
,
null
,
0
,
OrderApprovalTypeResultEnum
.
expense_apply_pass
.
getDesc
());
// orderBusinessService.addOrderOperateLog(orderFeeApplicationDO.getOrderId(),"","提交费用申请成功","");
}
else
if
(
result
==
4
)
{
feeApplicationMapper
.
deleteById
(
id
);
feeApplicationMapper
.
update
(
null
,
new
LambdaUpdateWrapper
<
OrderFeeApplicationDO
>().
set
(
OrderFeeApplicationDO:
:
getStatus
,
result
).
eq
(
OrderFeeApplicationDO:
:
getId
,
orderFeeApplicationDO
.
getId
())
);
orderService
.
updateStatus
(
orderFeeApplicationDO
.
getOrderId
(),
null
,
null
,
null
,
null
,
null
,
0
,
OrderApprovalTypeResultEnum
.
expense_apply_cancel
.
getDesc
());
//bpmCreateServiceFactory.cancelBmpById(SecurityFrameworkUtils.getLoginUserId(),orderFeeApplicationDO.getBpmProcessId(),null);
// orderBusinessService.addOrderOperateLog(orderFeeApplicationDO.getOrderId(),"","取消费用申请","");
}
else
if
(
result
==
3
)
{
feeApplicationMapper
.
update
(
null
,
new
LambdaUpdateWrapper
<
OrderFeeApplicationDO
>().
set
(
OrderFeeApplicationDO:
:
getStatus
,
result
).
eq
(
OrderFeeApplicationDO:
:
getId
,
orderFeeApplicationDO
.
getId
()));
orderService
.
updateStatus
(
orderFeeApplicationDO
.
getOrderId
(),
null
,
null
,
null
,
null
,
null
,
0
,
OrderApprovalTypeResultEnum
.
expense_apply_reject
.
getDesc
());
// orderBusinessService.addOrderOperateLog(orderFeeApplicationDO.getOrderId(),"","提交费用申请失败","");
}
...
...
yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/enums/DictTypeConstants.java
View file @
4bf956e3
...
...
@@ -31,6 +31,7 @@ public interface DictTypeConstants {
String
EXCEPTION_ORDER_TYPE
=
"order_error_type"
;
//异常订单状态
String
RECEIVABLE_FEE_TYPE
=
"receivable_fee_type"
;
//费用类型
String
PAYMENT_TYPE
=
"payment_type"
;
//收款类型
String
ORDER_SPECIAL_NEED
=
"order_special_needs"
;
//特需
...
...
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