Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
T
topsun-bpm
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
鲁鑫
topsun-bpm
Commits
950db84a
Commit
950db84a
authored
Jul 22, 2024
by
鲁鑫
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
EP销售订单审批流程调整
parent
89ea46fa
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
14 deletions
+19
-14
EpSaleOrderApplicationImpl.java
...ep/order/application/impl/EpSaleOrderApplicationImpl.java
+9
-11
EpSaleOrderCancelApplicationImpl.java
...er/application/impl/EpSaleOrderCancelApplicationImpl.java
+10
-3
No files found.
topsun/src/main/java/com/huigou/topsun/ep/order/application/impl/EpSaleOrderApplicationImpl.java
View file @
950db84a
package
com
.
huigou
.
topsun
.
ep
.
order
.
application
.
impl
;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.util.ObjectUtil
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.huigou.cache.SystemCache
;
import
com.huigou.context.Operator
;
import
com.huigou.context.OrgUnit
;
import
com.huigou.context.ThreadLocalUtil
;
...
...
@@ -22,14 +20,8 @@ import com.huigou.topsun.ep.order.domain.EpSaleOrder;
import
com.huigou.topsun.ep.order.domain.query.EpSaleOrderQueryRequest
;
import
com.huigou.topsun.sap.common.application.SapMutualEpLogApplication
;
import
com.huigou.topsun.sap.common.domain.EpResult
;
import
com.huigou.topsun.sap.common.domain.SapResult
;
import
com.huigou.topsun.sap.costReimbursement.domain.SapCostReimbursement
;
import
com.huigou.topsun.sap.purchaseApproval.domain.SapPurchaseApproval
;
import
com.huigou.uasp.bmp.common.BizBillStatus
;
import
com.huigou.uasp.bmp.operator.OperatorApplication
;
import
com.huigou.uasp.bmp.opm.application.OrgApplication
;
import
com.huigou.uasp.bmp.opm.domain.model.org.Org
;
import
com.huigou.uasp.bmp.opm.repository.org.PersonRepository
;
import
com.huigou.uasp.bpm.FlowBroker
;
import
com.huigou.uasp.bpm.ProcessAction
;
import
com.huigou.uasp.bpm.ProcessStartModel
;
...
...
@@ -131,7 +123,7 @@ public class EpSaleOrderApplicationImpl extends FlowBroker implements EpSaleOrde
@Override
protected
void
onEnd
(
DelegateExecution
delegateExecution
)
{
super
.
onEnd
(
delegateExecution
);
//
super.onEnd(delegateExecution);
String
bizId
=
delegateExecution
.
getProcessBusinessKey
();
BizBillStatus
status
=
approvePassed
()
?
BizBillStatus
.
COMPLETED
:
BizBillStatus
.
ABORTED
;
EpSaleOrder
epSaleOrder
=
epSaleOrderRepository
.
findOne
(
bizId
);
...
...
@@ -148,7 +140,7 @@ public class EpSaleOrderApplicationImpl extends FlowBroker implements EpSaleOrde
epSaleOrder
.
setStatusId
(
BizBillStatus
.
ABORTED
.
getId
());
epSaleOrderRepository
.
save
(
epSaleOrder
);
this
.
feedBackSaleOrder
(
epSaleOrder
,
"
0
"
);
this
.
feedBackSaleOrder
(
epSaleOrder
,
"
5
"
);
}
/**
...
...
@@ -163,6 +155,7 @@ public class EpSaleOrderApplicationImpl extends FlowBroker implements EpSaleOrde
EpSaleOrder
epSaleOrder
=
epSaleOrderRepository
.
findOne
(
bizId
);
epSaleOrder
.
setStatusId
(
BizBillStatus
.
APPLYING
.
getId
());
epSaleOrderRepository
.
save
(
epSaleOrder
);
this
.
feedBackSaleOrder
(
epSaleOrder
,
"0"
);
//回退后终止流程
// DelegateExecution execution = delegateTask.getExecution();
// this.onAbortProcessInstance(execution);
...
...
@@ -185,6 +178,11 @@ public class EpSaleOrderApplicationImpl extends FlowBroker implements EpSaleOrde
private
String
getApprovalSubjectName
(
String
bizId
)
{
EpSaleOrder
epSaleOrder
=
this
.
epSaleOrderRepository
.
findOne
(
bizId
);
String
vbeln
=
this
.
getBizAndApprovalData
().
getString
(
"vbeln"
);
if
(
StringUtil
.
isBlank
(
vbeln
)){
List
<
EpSaleOrderItem
>
itemList
=
epSaleOrderItemApplication
.
findByEpSaleOrderId
(
bizId
);
Set
<
String
>
vbelns
=
itemList
.
stream
().
map
(
EpSaleOrderItem:
:
getVbeln
).
collect
(
Collectors
.
toSet
());
vbeln
=
String
.
join
(
","
,
vbelns
);
}
//查询 单据日期
String
fillinDateStr
=
DateUtil
.
getDateFormat
(
"yyyy-MM-dd HH:mm:ss"
,
epSaleOrder
.
getFillinDate
());
//设置标题
...
...
@@ -244,7 +242,7 @@ public class EpSaleOrderApplicationImpl extends FlowBroker implements EpSaleOrde
Map
<
String
,
Object
>
formData
=
BeanUtil
.
beanToMap
(
epSaleOrder
);
List
<
EpSaleOrderItemVo
>
epSaleOrderItemVos
=
epSaleOrderVo
.
getEpSaleOrderItemVos
();
List
<
String
>
vbelns
=
epSaleOrderItemVos
.
stream
().
map
(
EpSaleOrderItemVo:
:
getVbeln
).
collect
(
Collectors
.
toLis
t
());
Set
<
String
>
vbelns
=
epSaleOrderItemVos
.
stream
().
map
(
EpSaleOrderItemVo:
:
getVbeln
).
collect
(
Collectors
.
toSe
t
());
String
vbeln
=
String
.
join
(
","
,
vbelns
);
formData
.
put
(
"vbeln"
,
vbeln
);
String
bizId
=
this
.
startProcessInstance
(
EpSaleOrderApplication
.
PROCESS_DEFINITION_KEY
,
formData
,
localSdo
);
...
...
topsun/src/main/java/com/huigou/topsun/ep/order/application/impl/EpSaleOrderCancelApplicationImpl.java
View file @
950db84a
...
...
@@ -21,6 +21,7 @@ import com.huigou.topsun.ep.order.domain.EpSaleOrderItem;
import
com.huigou.topsun.ep.order.domain.query.EpSaleOrderCancelQueryRequest
;
import
com.huigou.topsun.ep.order.domain.vo.EpSaleOrderCancelItemVo
;
import
com.huigou.topsun.ep.order.domain.vo.EpSaleOrderCancelVo
;
import
com.huigou.topsun.ep.order.domain.vo.EpSaleOrderItemVo
;
import
com.huigou.topsun.ep.order.repository.EpSaleOrderCancelRepository
;
import
com.huigou.topsun.sap.common.HttpClient
;
import
com.huigou.topsun.sap.common.application.SapMutualEpLogApplication
;
...
...
@@ -130,7 +131,7 @@ public class EpSaleOrderCancelApplicationImpl extends FlowBroker implements EpSa
@Override
protected
void
onEnd
(
DelegateExecution
delegateExecution
)
{
super
.
onEnd
(
delegateExecution
);
//
super.onEnd(delegateExecution);
String
bizId
=
delegateExecution
.
getProcessBusinessKey
();
BizBillStatus
status
=
approvePassed
()
?
BizBillStatus
.
COMPLETED
:
BizBillStatus
.
ABORTED
;
EpSaleOrderCancel
epSaleOrderCancel
=
epSaleOrderCancelRepository
.
findOne
(
bizId
);
...
...
@@ -147,7 +148,7 @@ public class EpSaleOrderCancelApplicationImpl extends FlowBroker implements EpSa
epSaleOrderCancel
.
setStatusId
(
BizBillStatus
.
ABORTED
.
getId
());
epSaleOrderCancelRepository
.
save
(
epSaleOrderCancel
);
this
.
feedBackSaleOrderCancel
(
epSaleOrderCancel
,
"
0
"
);
this
.
feedBackSaleOrderCancel
(
epSaleOrderCancel
,
"
5
"
);
}
/**
...
...
@@ -162,6 +163,7 @@ public class EpSaleOrderCancelApplicationImpl extends FlowBroker implements EpSa
EpSaleOrderCancel
epSaleOrderCancel
=
epSaleOrderCancelRepository
.
findOne
(
bizId
);
epSaleOrderCancel
.
setStatusId
(
BizBillStatus
.
APPLYING
.
getId
());
epSaleOrderCancelRepository
.
save
(
epSaleOrderCancel
);
this
.
feedBackSaleOrderCancel
(
epSaleOrderCancel
,
"0"
);
//回退后终止流程
// DelegateExecution execution = delegateTask.getExecution();
// this.onAbortProcessInstance(execution);
...
...
@@ -184,6 +186,11 @@ public class EpSaleOrderCancelApplicationImpl extends FlowBroker implements EpSa
private
String
getApprovalSubjectName
(
String
bizId
)
{
EpSaleOrderCancel
saleOrderCancel
=
this
.
epSaleOrderCancelRepository
.
findOne
(
bizId
);
String
vbeln
=
this
.
getBizAndApprovalData
().
getString
(
"vbeln"
);
if
(
StringUtil
.
isBlank
(
vbeln
)){
List
<
EpSaleOrderCancelItem
>
itemList
=
epSaleOrderCancelItemApplication
.
findByEpSaleOrderCancelId
(
bizId
);
Set
<
String
>
vbelns
=
itemList
.
stream
().
map
(
EpSaleOrderCancelItem:
:
getVbeln
).
collect
(
Collectors
.
toSet
());
vbeln
=
String
.
join
(
","
,
vbelns
);
}
//查询 单据日期
String
fillinDateStr
=
DateUtil
.
getDateFormat
(
"yyyy-MM-dd HH:mm:ss"
,
saleOrderCancel
.
getFillinDate
());
//设置标题
...
...
@@ -242,7 +249,7 @@ public class EpSaleOrderCancelApplicationImpl extends FlowBroker implements EpSa
localSdo
.
setOperator
(
operator
);
Map
<
String
,
Object
>
formData
=
BeanUtil
.
beanToMap
(
epSaleOrderCancel
);
List
<
EpSaleOrderCancelItemVo
>
epSaleOrderCancelItemVos
=
epSaleOrderCancelVo
.
getEpSaleOrderCancelItemVos
();
List
<
String
>
vbelns
=
epSaleOrderCancelItemVos
.
stream
().
map
(
EpSaleOrderCancelItemVo:
:
getVbeln
).
collect
(
Collectors
.
toLis
t
());
Set
<
String
>
vbelns
=
epSaleOrderCancelItemVos
.
stream
().
map
(
EpSaleOrderCancelItemVo:
:
getVbeln
).
collect
(
Collectors
.
toSe
t
());
String
vbeln
=
String
.
join
(
","
,
vbelns
);
formData
.
put
(
"vbeln"
,
vbeln
);
String
bizId
=
this
.
startProcessInstance
(
EpSaleOrderCancelApplication
.
PROCESS_DEFINITION_KEY
,
formData
,
localSdo
);
...
...
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