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
1304b50f
Commit
1304b50f
authored
Nov 12, 2024
by
zhengyi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调整批量费用申请审批业务
parent
92e50bd9
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
48 additions
and
11 deletions
+48
-11
OrderFeeApplicationDO.java
...dataobject/orderFeeApplication/OrderFeeApplicationDO.java
+5
-0
OrderFeeApplicationServiceImpl.java
...er/service/order/impl/OrderFeeApplicationServiceImpl.java
+39
-11
OrderFeeApplicationUpdateReqVO.java
...o/orderFeeApplication/OrderFeeApplicationUpdateReqVO.java
+4
-0
No files found.
yudao-module-order/yudao-module-order-core/src/main/java/cn/iocoder/yudao/module/order/dal/dataobject/orderFeeApplication/OrderFeeApplicationDO.java
View file @
1304b50f
package
cn
.
iocoder
.
yudao
.
module
.
order
.
dal
.
dataobject
.
orderFeeApplication
;
package
cn
.
iocoder
.
yudao
.
module
.
order
.
dal
.
dataobject
.
orderFeeApplication
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.*
;
import
lombok.*
;
import
java.util.*
;
import
java.util.*
;
import
com.baomidou.mybatisplus.annotation.*
;
import
com.baomidou.mybatisplus.annotation.*
;
...
@@ -101,4 +102,8 @@ public class OrderFeeApplicationDO extends BaseDO {
...
@@ -101,4 +102,8 @@ public class OrderFeeApplicationDO extends BaseDO {
*/
*/
private
String
batchBpmBusinessId
;
private
String
batchBpmBusinessId
;
@TableField
(
exist
=
false
)
@ApiModelProperty
(
value
=
"是否有修改的状态"
)
private
boolean
editMode
;
}
}
yudao-module-order/yudao-module-order-core/src/main/java/cn/iocoder/yudao/module/order/service/order/impl/OrderFeeApplicationServiceImpl.java
View file @
1304b50f
...
@@ -198,18 +198,48 @@ public class OrderFeeApplicationServiceImpl extends AbstractService<OrderFeeAppl
...
@@ -198,18 +198,48 @@ public class OrderFeeApplicationServiceImpl extends AbstractService<OrderFeeAppl
String
formId
=
bpmCreateServiceFactory
.
createBmp
(
SecurityFrameworkUtils
.
getLoginUserId
(),
String
formId
=
bpmCreateServiceFactory
.
createBmp
(
SecurityFrameworkUtils
.
getLoginUserId
(),
orderApprovalDO
.
getOrderApprovalId
(),
WorkFlowEmus
.
ORDER_BATCH_FREE_APPLY
.
getKey
(),
orderDO
.
getOrderNo
(),
createReqVO
.
getCopyUserId
());
orderApprovalDO
.
getOrderApprovalId
(),
WorkFlowEmus
.
ORDER_BATCH_FREE_APPLY
.
getKey
(),
orderDO
.
getOrderNo
(),
createReqVO
.
getCopyUserId
());
orderApprovalDO
.
setFormId
(
formId
);
orderApprovalDO
.
setFormId
(
formId
);
//更新费用列表对应的流程申请ID
List
<
ApplyInfoVO
>
list
=
new
ArrayList
<>();
for
(
OrderFeeApplicationDO
feeApplication
:
batchFeeList
)
{
//更新费用列表对应的流程申请ID及状态,并封装审批详情说明文案
feeApplication
.
setBatchBpmBusinessId
(
formId
);
for
(
OrderFeeApplicationDO
feeApplicationDO
:
batchFeeList
)
{
feeApplication
.
setStatus
(
ApprovalResultStatusEnum
.
processing
.
getValue
());
if
(
feeApplicationDO
.
isEditMode
()
||
Objects
.
isNull
(
feeApplicationDO
.
getId
()))
{
feeApplicationDO
.
setBatchBpmBusinessId
(
formId
);
feeApplicationDO
.
setStatus
(
ApprovalResultStatusEnum
.
processing
.
getValue
());
DictDataRespDTO
feeDictDataFromCache
=
DictFrameworkUtils
.
getDictDataFromCache
(
DictTypeConstants
.
RECEIVABLE_FEE_TYPE
,
String
.
valueOf
(
feeApplicationDO
.
getFeeType
()));
DictDataRespDTO
payDictDataFromCache
=
DictFrameworkUtils
.
getDictDataFromCache
(
DictTypeConstants
.
PAYMENT_TYPE
,
String
.
valueOf
(
feeApplicationDO
.
getPayType
()));
CurrencyDO
currency
=
currencyService
.
getCurrency
(
feeApplicationDO
.
getApplicationFeeCurrency
());
String
value
=
"%s: 金额[%s%s], 付款类型[%s]"
;
ApplyInfoVO
applyInfoVO
=
new
ApplyInfoVO
();
if
(
Objects
.
isNull
(
feeApplicationDO
.
getId
()))
{
applyInfoVO
.
setName
(
"新增申请费用"
);
applyInfoVO
.
setNewValue
(
String
.
format
(
value
,
I18nMessage
.
getLang
()
==
0
?
feeDictDataFromCache
.
getLabel
()
:
feeDictDataFromCache
.
getLabelEn
()
,
feeApplicationDO
.
getApplicationFee
().
toString
(),
I18nMessage
.
getLang
()
==
0
?
currency
.
getTitleZh
()
:
currency
.
getTitleEn
(),
I18nMessage
.
getLang
()
==
0
?
payDictDataFromCache
.
getLabel
()
:
payDictDataFromCache
.
getLabelEn
()));
}
else
{
OrderFeeApplicationDO
oldFeeAppliction
=
feeApplicationMapper
.
selectById
(
feeApplicationDO
.
getId
());
DictDataRespDTO
feeDictDataFromCacheOld
=
DictFrameworkUtils
.
getDictDataFromCache
(
DictTypeConstants
.
RECEIVABLE_FEE_TYPE
,
String
.
valueOf
(
oldFeeAppliction
.
getFeeType
()));
DictDataRespDTO
payDictDataFromCacheOld
=
DictFrameworkUtils
.
getDictDataFromCache
(
DictTypeConstants
.
PAYMENT_TYPE
,
String
.
valueOf
(
oldFeeAppliction
.
getPayType
()));
CurrencyDO
currencyOld
=
currencyService
.
getCurrency
(
oldFeeAppliction
.
getApplicationFeeCurrency
());
applyInfoVO
.
setName
(
"修改申请费用"
);
applyInfoVO
.
setNewValue
(
String
.
format
(
value
,
I18nMessage
.
getLang
()
==
0
?
feeDictDataFromCache
.
getLabel
()
:
feeDictDataFromCache
.
getLabelEn
()
,
feeApplicationDO
.
getApplicationFee
().
toString
(),
I18nMessage
.
getLang
()
==
0
?
currency
.
getTitleZh
()
:
currency
.
getTitleEn
(),
I18nMessage
.
getLang
()
==
0
?
payDictDataFromCache
.
getLabel
()
:
payDictDataFromCache
.
getLabelEn
()));
applyInfoVO
.
setOrgValue
(
String
.
format
(
value
,
I18nMessage
.
getLang
()
==
0
?
feeDictDataFromCacheOld
.
getLabel
()
:
feeDictDataFromCacheOld
.
getLabelEn
()
,
oldFeeAppliction
.
getApplicationFee
().
toString
(),
I18nMessage
.
getLang
()
==
0
?
currencyOld
.
getTitleZh
()
:
currencyOld
.
getTitleEn
(),
I18nMessage
.
getLang
()
==
0
?
payDictDataFromCacheOld
.
getLabel
()
:
payDictDataFromCacheOld
.
getLabelEn
()));
}
list
.
add
(
applyInfoVO
);
}
}
}
orderApprovalDO
.
setDetails
(
JSONObject
.
toJSONString
(
batchFeeList
));
orderApprovalDO
.
setDetails
(
JSONObject
.
toJSONString
(
batchFeeList
));
orderApprovalService
.
updateById
(
orderApprovalDO
);
orderApprovalService
.
updateById
(
orderApprovalDO
);
// Long bpmProcessId = orderApprovalService.applyAndCreate(orderApprovalDO, WorkFlowEmus.ORDER_BATCH_FREE_APPLY, createReqVO.getCopyUserId());
//创建审批流
// OrderDO orderDO = orderService.selectOne(OrderDO::getOrderId, createReqVO.getOrderId());
orderBusinessService
.
addOrderOperateLog
(
createReqVO
.
getOrderId
(),
""
,
"提交费用申请"
,
list
);
orderService
.
updateStatus
(
orderDO
.
getOrderId
(),
null
,
null
,
null
,
null
,
null
,
OrderApprovalTypeResultEnum
.
expense_apply_batch_processing
.
getType
(),
OrderApprovalTypeResultEnum
.
expense_apply_batch_processing
.
getDesc
());
orderService
.
updateStatus
(
orderDO
.
getOrderId
(),
null
,
null
,
null
,
null
,
null
,
OrderApprovalTypeResultEnum
.
expense_apply_batch_processing
.
getType
(),
OrderApprovalTypeResultEnum
.
expense_apply_batch_processing
.
getDesc
());
...
@@ -218,7 +248,6 @@ public class OrderFeeApplicationServiceImpl extends AbstractService<OrderFeeAppl
...
@@ -218,7 +248,6 @@ public class OrderFeeApplicationServiceImpl extends AbstractService<OrderFeeAppl
@Override
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
updateFeeApplication
(
OrderFeeApplicationUpdateReqVO
updateReqVO
)
{
public
void
updateFeeApplication
(
OrderFeeApplicationUpdateReqVO
updateReqVO
)
{
OrderDO
orderDO
=
orderService
.
getById
(
updateReqVO
.
getOrderId
());
OrderDO
orderDO
=
orderService
.
getById
(
updateReqVO
.
getOrderId
());
OrderApprovalTypeCheckEvent
approvalTypeCheckEvent
=
new
OrderApprovalTypeCheckEvent
(
updateReqVO
.
getOrderId
(),
null
,
expense_apply
.
getValue
(),
null
,
false
);
OrderApprovalTypeCheckEvent
approvalTypeCheckEvent
=
new
OrderApprovalTypeCheckEvent
(
updateReqVO
.
getOrderId
(),
null
,
expense_apply
.
getValue
(),
null
,
false
);
applicationContext
.
publishEvent
(
approvalTypeCheckEvent
);
applicationContext
.
publishEvent
(
approvalTypeCheckEvent
);
...
@@ -273,7 +302,6 @@ public class OrderFeeApplicationServiceImpl extends AbstractService<OrderFeeAppl
...
@@ -273,7 +302,6 @@ public class OrderFeeApplicationServiceImpl extends AbstractService<OrderFeeAppl
applyInfoVO
.
setOrgValue
(
I18nMessage
.
getLang
()
==
0
?
payDictDataFromCacheOld
.
getLabel
()
:
payDictDataFromCacheOld
.
getLabelEn
());
applyInfoVO
.
setOrgValue
(
I18nMessage
.
getLang
()
==
0
?
payDictDataFromCacheOld
.
getLabel
()
:
payDictDataFromCacheOld
.
getLabelEn
());
applyInfoVO
.
setNewValue
(
I18nMessage
.
getLang
()
==
0
?
payDictDataFromCache
.
getLabel
()
:
payDictDataFromCache
.
getLabelEn
());
applyInfoVO
.
setNewValue
(
I18nMessage
.
getLang
()
==
0
?
payDictDataFromCache
.
getLabel
()
:
payDictDataFromCache
.
getLabelEn
());
list
.
add
(
applyInfoVO
);
list
.
add
(
applyInfoVO
);
orderBusinessService
.
addOrderOperateLog
(
updateObj
.
getOrderId
(),
""
,
"费用修改提交审核"
,
list
);
orderBusinessService
.
addOrderOperateLog
(
updateObj
.
getOrderId
(),
""
,
"费用修改提交审核"
,
list
);
}
}
...
@@ -567,7 +595,7 @@ public class OrderFeeApplicationServiceImpl extends AbstractService<OrderFeeAppl
...
@@ -567,7 +595,7 @@ public class OrderFeeApplicationServiceImpl extends AbstractService<OrderFeeAppl
.
orderByDesc
(
OrderApprovalDO:
:
getOrderApprovalId
).
last
(
"limit 1"
));
.
orderByDesc
(
OrderApprovalDO:
:
getOrderApprovalId
).
last
(
"limit 1"
));
if
(
Objects
.
nonNull
(
approvalDO
)
&&
approvalDO
.
getType
()
==
41
&&
Objects
.
nonNull
(
approvalDO
.
getDetails
()))
{
if
(
Objects
.
nonNull
(
approvalDO
)
&&
approvalDO
.
getType
()
==
41
&&
Objects
.
nonNull
(
approvalDO
.
getDetails
()))
{
// 对于批量审批中的费用申请,直接返回审批中数据即可
// 对于批量审批中的费用申请,直接返回审批中数据即可
return
JSONObject
.
parseArray
(
JSONObject
.
toJSONString
(
approvalDO
.
getDetails
()
),
OrderFeeApplicationDO
.
class
);
return
JSONObject
.
parseArray
(
approvalDO
.
getDetails
(
),
OrderFeeApplicationDO
.
class
);
}
}
List
<
OrderFeeApplicationDO
>
feeApplicationList
=
feeApplicationMapper
.
getFeeApplicationListByOrderId
(
orderId
);
List
<
OrderFeeApplicationDO
>
feeApplicationList
=
feeApplicationMapper
.
getFeeApplicationListByOrderId
(
orderId
);
feeApplicationList
.
stream
().
forEach
(
item
->
{
feeApplicationList
.
stream
().
forEach
(
item
->
{
...
...
yudao-module-order/yudao-module-order-core/src/main/java/cn/iocoder/yudao/module/order/vo/orderFeeApplication/OrderFeeApplicationUpdateReqVO.java
View file @
1304b50f
...
@@ -18,4 +18,8 @@ public class OrderFeeApplicationUpdateReqVO extends OrderFeeApplicationBaseVO {
...
@@ -18,4 +18,8 @@ public class OrderFeeApplicationUpdateReqVO extends OrderFeeApplicationBaseVO {
@ApiModelProperty
(
value
=
"抄送人userId"
)
@ApiModelProperty
(
value
=
"抄送人userId"
)
String
[]
copyUserId
;
String
[]
copyUserId
;
@ApiModelProperty
(
value
=
"是否有修改的状态"
)
private
boolean
editMode
;
}
}
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