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
2fb75f01
Commit
2fb75f01
authored
Sep 10, 2024
by
刘学辉
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
品质异常单(采购)调整
parent
870cb26f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
49 additions
and
14 deletions
+49
-14
exceptionReportDetailPurchase.jsp
...sun/sap/exceptionReport/exceptionReportDetailPurchase.jsp
+2
-0
ExceptionReportApplicationImpl.java
...port/application/impl/ExceptionReportApplicationImpl.java
+41
-14
ExceptionReport.java
...ou/topsun/sap/exceptionReport/domain/ExceptionReport.java
+6
-0
No files found.
topsun-xt/src/main/webapp/biz/topsun/sap/exceptionReport/exceptionReportDetailPurchase.jsp
View file @
2fb75f01
...
...
@@ -28,6 +28,8 @@
<x:hidden
name=
"personMemberName"
/>
<x:hidden
name=
"statusId"
/>
<x:hidden
name=
"frgdt"
/>
<x:hidden
name=
"handleNodeId"
/>
<x:hidden
name=
"handleNodeName"
/>
<div
class=
"hg-form-cols"
>
<c:if
test=
"
${
statusId
==
3
}
"
>
<div
style=
"float: right; margin-right: 10px;"
class=
"btn-group"
id=
"buttonBox"
>
...
...
topsun/src/main/java/com/huigou/topsun/sap/exceptionReport/application/impl/ExceptionReportApplicationImpl.java
View file @
2fb75f01
...
...
@@ -43,6 +43,8 @@ import com.huigou.uasp.bpm.FlowBroker;
import
com.huigou.uasp.bpm.ProcessAction
;
import
com.huigou.uasp.bpm.ProcessStartModel
;
import
com.huigou.uasp.bpm.engine.application.WorkflowApplication
;
import
com.huigou.uasp.bpm.engine.domain.model.ProcUnitHandler
;
import
com.huigou.uasp.bpm.engine.domain.model.TaskExtension
;
import
com.huigou.util.*
;
import
freemarker.template.Template
;
import
org.activiti.engine.delegate.DelegateExecution
;
...
...
@@ -101,11 +103,8 @@ public class ExceptionReportApplicationImpl extends FlowBroker implements Except
@Autowired
private
MannualStartWorkApplication
mannualStartWorkApplication
;
@Autowired
private
CodeGenerator
codeGenerator
;
@Autowired
private
WorkflowApplication
workflowApplication
;
@Autowired
private
SapPermitApplication
sapPermitApplication
;
@Autowired
private
TaskExecutor
asyncWriteExecutor
;
...
...
@@ -160,6 +159,24 @@ public class ExceptionReportApplicationImpl extends FlowBroker implements Except
if
(
StringUtils
.
isBlank
(
exceptionReport
.
getDutyDept
())){
exceptionReport
.
setDutyDept
(
"0"
);
}
if
(
exceptionReport
.
getStatusId
()==
1
&&(
"purchase"
.
equals
(
exceptionReport
.
getBillType
())||
"outgoing"
.
equals
(
exceptionReport
.
getBillType
()))
//&&!"auditDept".equals(exceptionReport.getHandleNodeId()) //不是审计部审批的
&&
StringUtils
.
isBlank
(
exceptionReport
.
getDutyDept
())
//责任部门是空 最后的审批人就是责任人
){
// String ds=exceptionReport.getHandleNodeId();
Map
<
String
,
Object
>
mapSigns
=
workflowApplication
.
queryCounterSignHandlers
(
exceptionReport
.
getId
(),
"Approve"
);
List
<
Map
<
String
,
Object
>>
plist
=(
List
)
mapSigns
.
get
(
"Rows"
);
if
(
Integer
.
parseInt
(
mapSigns
.
get
(
"Total"
).
toString
())>
0
)
{
Map
map
=
plist
.
get
(
Integer
.
parseInt
(
mapSigns
.
get
(
"Total"
).
toString
())
-
1
);
exceptionReport
.
setCheckOperator
(
map
.
get
(
"handlerId"
).
toString
());
exceptionReport
.
setCheckOperatorName
(
map
.
get
(
"handlerName"
).
toString
());
exceptionReport
.
setDutyDeptName
(
map
.
get
(
"deptName"
).
toString
());
Org
org
=
orgApplication
.
loadOrg
(
map
.
get
(
"handlerId"
).
toString
());
exceptionReport
.
setDutyDept
(
org
.
getDeptId
());
}
}
exceptionReport
=
this
.
saveExceptionReport
(
exceptionReport
);
if
(
CollectionUtil
.
isNotEmpty
(
exceptionReportItems
)){
...
...
@@ -172,7 +189,7 @@ public class ExceptionReportApplicationImpl extends FlowBroker implements Except
List
<
ExceptionReportPayable
>
exceptionReportPayableList
=
this
.
getBizEntities
(
ExceptionReportPayable
.
class
,
"handlePayable"
);
List
<
ExceptionReportCash
>
exceptionReportCashList
=
this
.
getBizEntities
(
ExceptionReportCash
.
class
,
"handleCash"
);
List
<
ExceptionReportGoods
>
exceptionReportGoodsList
=
this
.
getBizEntities
(
ExceptionReportGoods
.
class
,
"handleGoods"
);
if
(
"supplier"
.
equals
(
exceptionReport
.
getBillType
())){
if
(
"supplier"
.
equals
(
exceptionReport
.
getBillType
())){
//供应商 默认类型
exceptionReport
.
setExceptionType
(
"out"
);
}
...
...
@@ -200,7 +217,6 @@ public class ExceptionReportApplicationImpl extends FlowBroker implements Except
if
(
CollectionUtil
.
isNotEmpty
(
exceptionReportGoodsList
))
{
exceptionReportGoodsApplication
.
saveExceptionReportGoodsList
(
exceptionReport
.
getId
(),
exceptionReportGoodsList
);
}
return
exceptionReport
.
getId
();
}
...
...
@@ -211,7 +227,22 @@ public class ExceptionReportApplicationImpl extends FlowBroker implements Except
protected
Map
<
String
,
Object
>
getProcessBizParams
(
String
bizId
)
{
return
ClassHelper
.
toMap
(
exceptionReportRepository
.
findOne
(
bizId
));
}
@Override
public
void
onCreate
(
DelegateTask
delegateTask
)
{
super
.
onCreate
(
delegateTask
);
if
(!
isApplyProcUnit
(
delegateTask
))
{
TaskExtension
te
=
actApplication
.
loadRuntimeTaskExtension
(
delegateTask
.
getId
());
Assert
.
notNull
(
te
,
String
.
format
(
"未查询到流程任务【%s】的扩展信息"
,
delegateTask
.
getId
()));
// 获取流程任务对应的审批环节信息
ProcUnitHandler
procUnitHandler
=
procUnitHandlerApplication
.
loadProcUnitHandler
(
te
.
getProcUnitHandlerId
());
// 审批环节名称
String
id
=
delegateTask
.
getExecution
().
getProcessBusinessKey
();
ExceptionReport
exceptionReport
=
this
.
exceptionReportRepository
.
findOne
(
id
);
exceptionReport
.
setHandleNodeName
(
procUnitHandler
.
getSubProcUnitName
());
exceptionReport
.
setHandleNodeId
(
procUnitHandler
.
getSubProcUnitId
());
exceptionReportRepository
.
save
(
exceptionReport
);
}
}
/**
* 删除流程实例事件
*/
...
...
@@ -296,13 +327,9 @@ public class ExceptionReportApplicationImpl extends FlowBroker implements Except
resultMap
.
put
(
"TYPE"
,
sapResult
.
getTYPE
());
resultMap
.
put
(
"MESSAGE"
,
sapResult
.
getMESSAGE
());
}
// orderItems.stream().forEach(orderItem->{
//根据供应商来匹配赋值采购订单号
// if (lifnrSet.equals(orderItem.getLifnr())){
exceptionReport
.
setDealResult
(
sapResult
.
getMESSAGE_V1
());
// processOutsourceOrderItemRepository.save(orderItem);
// }
// });
}
catch
(
IOException
e
)
{
resultMap
.
put
(
"TYPE"
,
"E"
);
resultMap
.
put
(
"MESSAGE"
,
e
.
getMessage
());
...
...
@@ -312,7 +339,7 @@ public class ExceptionReportApplicationImpl extends FlowBroker implements Except
}
}
}
//
this.saveExceptionReport(exceptionReport);
this
.
saveExceptionReport
(
exceptionReport
);
//采购异常单根据责任部门是采购部门则生成供应商异常单
if
(
"purchase"
.
equals
(
exceptionReport
.
getBillType
())
//&&StringUtil.isNotBlank(exceptionReport.getDutyDept())
...
...
topsun/src/main/java/com/huigou/topsun/sap/exceptionReport/domain/ExceptionReport.java
View file @
2fb75f01
...
...
@@ -187,6 +187,12 @@ public class ExceptionReport extends FlowBillAbstractEntity {
@Column
(
name
=
"need_guarantee"
)
private
String
needGuarantee
;
@Column
(
name
=
"handle_node_name"
)
private
String
handleNodeName
;
@Column
(
name
=
"handle_node_id"
)
private
String
handleNodeId
;
@Override
protected
String
getCodeRuleId
()
{
return
"exceptionReport"
;
...
...
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