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
9d798a9b
Commit
9d798a9b
authored
Jan 19, 2024
by
wanghang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
非产品物料驳回 流程
parent
a86f8c62
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
661 additions
and
415 deletions
+661
-415
templates.xml
.idea/mybatisx/templates.xml
+8
-4
TasksTracking.jsp
...ou-xt/src/main/webapp/system/taskCenter/TasksTracking.jsp
+0
-1
nonProdApplyNext.js
...in/webapp/biz/topsun/sap/nonProdApply/nonProdApplyNext.js
+85
-20
nonProdApplyNext.jsp
...n/webapp/biz/topsun/sap/nonProdApply/nonProdApplyNext.jsp
+183
-221
WorkflowApplicationImplOverride.java
...m/huigou/topsun/base/WorkflowApplicationImplOverride.java
+23
-19
BsnMessageApplication.java
...sun/base/bsnMessage/appliction/BsnMessageApplication.java
+26
-8
BsnMessageApplicationImpl.java
...bsnMessage/appliction/impl/BsnMessageApplicationImpl.java
+60
-45
BsnMessageExecute.java
...igou/topsun/base/bsnMessage/domain/BsnMessageExecute.java
+75
-0
BsnMessageReject.java
...uigou/topsun/base/bsnMessage/domain/BsnMessageReject.java
+63
-0
BsnMessageSponsor.java
...igou/topsun/base/bsnMessage/domain/BsnMessageSponsor.java
+14
-27
BsnMessageExecuteRepository.java
...se/bsnMessage/repository/BsnMessageExecuteRepository.java
+13
-0
BsnMessageRejectRepository.java
...ase/bsnMessage/repository/BsnMessageRejectRepository.java
+13
-0
BsnMessageSponsorRepository.java
...se/bsnMessage/repository/BsnMessageSponsorRepository.java
+13
-0
NonProdApplyDeptApplicationImpl.java
...ply/application/impl/NonProdApplyDeptApplicationImpl.java
+29
-22
NonProdApplyNextController.java
...p/nonProdApply/controller/NonProdApplyNextController.java
+36
-35
bsnMessage.xml
topsun/src/main/resources/config/topsun/base/bsnMessage.xml
+20
-13
No files found.
.idea/mybatisx/templates.xml
View file @
9d798a9b
...
...
@@ -48,12 +48,16 @@
<option
name=
"tableUIInfoList"
>
<list>
<TableUIInfo>
<option
name=
"className"
value=
"
SapCostReimbursementBaseInfo
"
/>
<option
name=
"tableName"
value=
"
sap_cost_reimbursement_base_info
"
/>
<option
name=
"className"
value=
"
BsnMessageSponsor
"
/>
<option
name=
"tableName"
value=
"
bsn_message_sponsor
"
/>
</TableUIInfo>
<TableUIInfo>
<option
name=
"className"
value=
"SapCostReimbursementDetail"
/>
<option
name=
"tableName"
value=
"sap_cost_reimbursement_detail"
/>
<option
name=
"className"
value=
"BsnMessageExecute"
/>
<option
name=
"tableName"
value=
"bsn_message_execute"
/>
</TableUIInfo>
<TableUIInfo>
<option
name=
"className"
value=
"BsnMessageReject"
/>
<option
name=
"tableName"
value=
"bsn_message_reject"
/>
</TableUIInfo>
</list>
</option>
...
...
huigou-xt/src/main/webapp/system/taskCenter/TasksTracking.jsp
View file @
9d798a9b
...
...
@@ -7,7 +7,6 @@
taskId=
"
<c:out
value=
"
${
task
.
id
}
"
/>
"
bizId=
"
<c:out
value=
"
${
task
.
businessId
}
"
/>
"
name=
"
<c:out
value=
"
${
task
.
title
}
"
/>
"
active=
"
<c:out
value=
"
${
task
.
active
}
"
/>
"
url=
"
<c:out
value=
"
${
task
.
executorUrl
}
"
/>
"
>
<div
class=
"title-view"
>
<a
href=
"javascript:void(0);"
class=
"aLink"
taskId=
"
<c:out
value=
"
${
task
.
id
}
"
/>
"
title=
"
<c:out
value=
"
${
task
.
title
}
"
/>
"
>
...
...
topsun-xt/src/main/webapp/biz/topsun/sap/nonProdApply/nonProdApplyNext.js
View file @
9d798a9b
...
...
@@ -14,25 +14,32 @@ $(document).ready(function () {
function
initializate
()
{
switch
(
$
(
"#active"
).
val
())
{
case
'0'
:
//已分发未完成
$
(
"#buttonBox"
).
show
();
$
(
"#showChart"
).
remove
();
break
;
case
'1'
:
//完成/审核
$
(
"#auditForm"
).
show
();
break
;
case
'2'
:
//保存未分发
$
(
"#buttonBox"
).
show
();
break
;
case
'3'
:
//被驳回
$
(
"#causeBox"
).
show
();
break
;
default
:
//其他/详情
$
(
"#buttonBox"
).
show
();
break
;
//页面控制
debugger
switch
(
$
(
"#active"
).
val
())
{
case
'0'
:
//已分发未完成
if
(
$
(
"#deptCode"
).
val
()
===
"system"
)
{
$
(
"#auditForm"
).
show
();
}
else
{
$
(
"#buttonBox"
).
show
();
$
(
"#showChart"
).
remove
();
}
break
;
case
'1'
:
//完成/审核
// $("#auditForm").show();
break
;
case
'2'
:
//保存未分发
$
(
"#buttonBox"
).
show
();
break
;
case
'3'
:
//被驳回
showRejectCauseBox
();
$
(
"#buttonBox"
).
show
();
$
(
"#showChart"
).
remove
();
break
;
default
:
//其他/详情
$
(
"#buttonBox"
).
show
();
break
;
}
// let isInitiator = ($("#isInitiator").val() === "true");
// if (isInitiator) {
...
...
@@ -133,7 +140,7 @@ function loadGrid() {
],
dataAction
:
"server"
,
url
:
web_app
.
name
+
'/sapNonProdApplyNext/slicedDeptList.ajax'
,
parms
:
{
dept
:
$
(
"#businessUsage"
).
val
(),
id
:
$
(
"#applyDeptId"
).
val
()},
parms
:
{
dept
:
$
(
"#businessUsage"
).
val
(),
id
:
$
(
"#applyDeptId"
).
val
()},
pageSize
:
20
,
usePager
:
false
,
enabledEdit
:
true
,
...
...
@@ -189,6 +196,8 @@ function distributeForm() {
}
function
getExtendedData
()
{
debugger
...
...
@@ -213,7 +222,7 @@ function getExtendedData() {
return
false
}
let
extendedData
=
{};
extendedData
.
deptStaff
=
Public
.
encodeJSONURI
(
deptStaffResult
);
extendedData
.
deptStaff
=
Public
.
encodeJSONURI
(
deptStaffResult
);
return
extendedData
;
}
...
...
@@ -260,4 +269,60 @@ function loadRejectReasonBox() {
}
}
);
}
/**
*根据驳回信息生成驳回信息展示栏
*/
function
showRejectCauseBox
()
{
Public
.
ajax
(
web_app
.
name
+
'/sapNonProdApplyNext/slicedRejectCauseList.ajax'
,
{
meId
:
getMeId
()},
function
(
data
)
{
const
generateCauseHTML
=
(
item
,
newCause
)
=>
{
const
{
rectifyDate
,
rejectMsg
,
bsnExecuteId
,
rejectDate
}
=
item
;
return
`
<div class="hg-form-row">
<div class="col-xs-4 col-sm-1" style="height:56px;">
<label class="hg-form-label" title="驳回原因">驳回原因
${
newCause
}
:</label>
</div>
<div class="col-xs-8 col-sm-11 col-warp col-gray-bg" style="height:56px;">
<textarea rows="2" label="驳回原因" readonly="readonly">
${
rejectMsg
}
</textarea>
</div>
</div>
<div class="hg-form-row">
<div class="col-xs-4 col-sm-1">
<label class="hg-form-label" title="驳回人">驳回人 :</label>
</div>
<div class="col-xs-8 col-sm-3 col-warp col-gray-bg">
<input type="text" value="
${
bsnExecuteId
}
" readonly="readonly" label="驳回人">
</div>
<div class="col-xs-4 col-sm-1">
<label class="hg-form-label" title="驳回时间">驳回时间 :</label>
</div>
<div class="col-xs-8 col-sm-3 col-warp col-gray-bg">
<input type="text" value="
${
rejectDate
}
" readonly="readonly" label="驳回时间">
</div>
<div class="col-xs-4 col-sm-1">
<label class="hg-form-label" title="处理时间">处理时间 :</label>
</div>
<div class="col-xs-8 col-sm-3 col-warp col-gray-bg">
<input type="text" value="
${
rectifyDate
}
" readonly="readonly" label="处理时间">
</div>
</div>
`
;
};
let
newCause
=
`<span style="color:red;">new</span>`
;
const
ahtml
=
data
.
map
((
item
)
=>
{
const
cause
=
item
.
rectifyDate
===
''
?
`[
${
newCause
}
]`
:
''
;
return
generateCauseHTML
(
item
,
cause
);
})
.
join
(
''
);
$
(
"#cause-details-box"
).
html
(
ahtml
);
$
(
"#causeBox"
).
show
();
})
}
function
getMeId
()
{
return
$
(
"#meId"
).
val
()
||
''
;
}
\ No newline at end of file
topsun-xt/src/main/webapp/biz/topsun/sap/nonProdApply/nonProdApplyNext.jsp
View file @
9d798a9b
...
...
@@ -9,8 +9,9 @@
<body>
<x:hidden
name=
"isDetailPage"
value=
"false"
/>
<!--是否是详情页-->
<x:hidden
name=
"isInitiator"
value=
"false"
/>
<!--是否是详情页-->
<x:hidden
name=
"active"
value=
""
/>
<!--是否是详情页-->
<x:hidden
name=
"deptCode"
value=
"false"
/>
<!--是否是详情页-->
<x:hidden
name=
"active"
value=
""
/>
<!--状态-->
<x:hidden
name=
"meId"
value=
""
/>
<!--状态-->
<div
class=
"container-fluid"
style=
"padding: 10px;"
>
<x:billTitle
title=
"非产品/非本成品类物料主数据维护申请表"
needStatus=
"false"
needPerson=
"true"
/>
...
...
@@ -29,54 +30,14 @@
</div>
<br/>
<%-- <div class=" border-left-top" style="margin-top: 20px;display: none;" id="causeBox">--%>
<%-- <div class=" gray-bg">--%>
<%-- <div class="col-xs-2 " style="text-align: center;margin-top: 30px">--%>
<%-- <h4>驳回历史</h4>--%>
<%-- </div>--%>
<%-- <div class="hg-form-cols">--%>
<%-- <div class="hg-form-row">--%>
<%-- <x:textareaC rows="2" name="textDescription" label="驳回原因" readonly="true" labelCol="1" fieldCol="11"/>--%>
<%-- </div>--%>
<%-- <div class="hg-form-row">--%>
<%-- <x:inputC name="billCode" label="处理人" labelCol="3" readonly="true" fieldCol="3"/>--%>
<%-- <x:inputC name="billCode" label="处理时间" labelCol="3" readonly="true" fieldCol="3"/>--%>
<%-- </div>--%>
<%-- <div class="hg-form-cols">--%>
<%-- <div class="hg-form-row">--%>
<%-- <x:textareaC rows="2" name="textDescription" label="驳回原因" readonly="true" labelCol="1" fieldCol="11"/>--%>
<%-- </div>--%>
<%-- <div class="hg-form-row">--%>
<%-- <x:inputC name="billCode" label="驳回人" labelCol="1" readonly="true" fieldCol="2"/>--%>
<%-- <x:inputC name="billCode" label="驳回时间" labelCol="1" readonly="true" fieldCol="2"/>--%>
<%-- <x:inputC name="billCode" label="处理人" labelCol="1" readonly="true" fieldCol="2"/>--%>
<%-- <x:inputC name="billCode" label="处理时间" labelCol="1" readonly="true" fieldCol="2"/>--%>
<%-- </div>--%>
<%-- </div>--%>
<%-- <div class="hg-form-cols">--%>
<%-- <div class="hg-form-row">--%>
<%-- <div class="col-xs-4 col-sm-1" style="height:56px;"> <label class="hg-form-label" id="textDescription_label" title="驳回原因">驳回原因[<span style="color:red;">new</span>] :</label></div>--%>
<%-- <div class="col-xs-8 col-sm-11 col-warp col-gray-bg" style="height:56px;"><textarea name="textDescription" cols="" rows="2" label="驳回原因" readonly="readonly" id="textDescription"></textarea> </div>--%>
<%-- </div>--%>
<%-- <div class="hg-form-row">--%>
<%-- <div class="col-xs-4 col-sm-1"> <label class="hg-form-label" id="billCode_label" title="驳回人">驳回人 :</label></div>--%>
<%-- <div class="col-xs-8 col-sm-2 col-warp col-gray-bg"> <input type="text" name="billCode" value="" readonly="readonly" id="billCode" label="驳回人">--%>
<%-- </div>--%>
<%-- <div class="col-xs-4 col-sm-1"> <label class="hg-form-label" id="billCode_label" title="驳回时间">驳回时间 :</label></div>--%>
<%-- <div class="col-xs-8 col-sm-2 col-warp col-gray-bg"> <input type="text" name="billCode" value="" readonly="readonly" id="billCode" label="驳回时间">--%>
<%-- </div>--%>
<%-- <div class="col-xs-4 col-sm-1"> <label class="hg-form-label" id="billCode_label" title="处理人">处理人 :</label></div>--%>
<%-- <div class="col-xs-8 col-sm-2 col-warp col-gray-bg"> <input type="text" name="billCode" value="" readonly="readonly" id="billCode" label="处理人">--%>
<%-- </div>--%>
<%-- <div class="col-xs-4 col-sm-1"> <label class="hg-form-label" id="billCode_label" title="处理时间">处理时间 :</label></div>--%>
<%-- <div class="col-xs-8 col-sm-2 col-warp col-gray-bg"> <input type="text" name="billCode" value="" readonly="readonly" id="billCode" label="处理时间">--%>
<%-- </div>--%>
<%-- </div>--%>
<%-- </div>--%>
<%-- </div>--%>
<%-- </div>--%>
<%-- </div>--%>
<div
class=
" border-left-top"
style=
"margin-top: 20px;display: none;"
id=
"causeBox"
>
<div
class=
" gray-bg"
>
<div
class=
"col-xs-2 "
style=
"text-align: center;margin-top: 30px"
>
<h4>
驳回历史
</h4>
</div>
<div
class=
"hg-form-cols"
id=
"cause-details-box"
></div>
</div>
</div>
<x:hidden
name=
"applyDeptId"
/>
<x:title
title=
"基本信息"
name=
"group"
/>
...
...
@@ -147,185 +108,186 @@
</div>
</div>
<%-- <x:title title="分类" name="group"/>--%>
<%-- <div class="hg-form-cols">--%>
<%-- <div class="hg-form-row">--%>
<%-- <x:inputC name="klart" label="类型" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="classify" label="分类" labelCol="1" fieldCol="2"/>--%>
<%-- </div>--%>
<%-- </div>--%>
<%-- <x:title title="销售" name="group"/>--%>
<%-- <div class="hg-form-cols">--%>
<%-- <div class="hg-form-row">--%>
<%-- <x:inputC name="vkorg" label="销售组织" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="vtweg" label="分销渠道" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="vrkme" label="销售计量单位" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="umren" label="转换分母" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="umrez" label="转换分子" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="dwerk" label="交货工厂" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="aland" label="税收发运国" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="taxkm" label="税分类" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="versg" label="统计组" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="kondm" label="物料定价组" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="ktgrm" label="会计科目组" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="prodh" label="产品层级" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="mvgr1" label="版式" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="mvgr2" label="品牌" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="mvgr3" label="用途" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="mvgr4" label="备用" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="mvgr5" label="备用" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="mtpos" label="销售项次组" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="tragr" label="运输组" labelCol="1" fieldCol="2"/>--%>
<%-- </div>--%>
<%-- </div>--%>
<%-- <x:title title="采购" name="group"/>--%>
<%-- <div class="hg-form-cols">--%>
<%-- <div class="hg-form-row">--%>
<%-- <x:inputC name="bstme" label="采购计量单位" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="umrenPurch" label="转换分母" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="umrezPurch" label="转换分子" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="ekgrp" label="默认采购组" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="mprof" label="MPN参数" labelCol="1" fieldCol="2"/>--%>
<%-- </div>--%>
<%-- </div>--%>
<%-- <x:title title="分类" name="group"/>--%>
<%-- <div class="hg-form-cols">--%>
<%-- <div class="hg-form-row">--%>
<%-- <x:inputC name="klart" label="类型" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="classify" label="分类" labelCol="1" fieldCol="2"/>--%>
<%-- </div>--%>
<%-- </div>--%>
<%-- <x:title title="销售" name="group"/>--%>
<%-- <div class="hg-form-cols">--%>
<%-- <div class="hg-form-row">--%>
<%-- <x:inputC name="vkorg" label="销售组织" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="vtweg" label="分销渠道" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="vrkme" label="销售计量单位" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="umren" label="转换分母" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="umrez" label="转换分子" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="dwerk" label="交货工厂" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="aland" label="税收发运国" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="taxkm" label="税分类" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="versg" label="统计组" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="kondm" label="物料定价组" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="ktgrm" label="会计科目组" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="prodh" label="产品层级" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="mvgr1" label="版式" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="mvgr2" label="品牌" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="mvgr3" label="用途" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="mvgr4" label="备用" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="mvgr5" label="备用" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="mtpos" label="销售项次组" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="tragr" label="运输组" labelCol="1" fieldCol="2"/>--%>
<%-- </div>--%>
<%-- </div>--%>
<%-- <x:title title="采购" name="group"/>--%>
<%-- <div class="hg-form-cols">--%>
<%-- <div class="hg-form-row">--%>
<%-- <x:inputC name="bstme" label="采购计量单位" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="umrenPurch" label="转换分母" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="umrezPurch" label="转换分子" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="ekgrp" label="默认采购组" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="mprof" label="MPN参数" labelCol="1" fieldCol="2"/>--%>
<%-- </div>--%>
<%-- </div>--%>
<%-- <x:title title="MRP" name="group"/>--%>
<%-- <div class="hg-form-cols">--%>
<%-- <div class="hg-form-row">--%>
<%-- <x:inputC name="lgort" label="库存地点" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="disgr" label="MRP组" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="dismm" label="MRP类型" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="minbe" label="重订货点" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="dispo" label="MRP控制者" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="disls" label="批量规模" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="bstfe" label="固定批量" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="bstma" label="最大批量" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="bstmi" label="最小批量" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="mabst" label="最大存货水平" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="bstrf" label="设入值" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="beskz" label="获取类型" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="sobsl" label="特殊获取方式" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="lgpro" label="默认生产库存地" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="rgekz" label="倒冲标志" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="lgfsb" label="默认采购收货库存地" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="webaz" label="收货处理天数" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="dzeit" label="自制时间" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="plifz" label="外部采购交货时间" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="fhori" label="排程边际码" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="eisbe" label="安全库存" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="eislo" label="最小安全库存" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="strgr" label="策略组" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="mtvfp" label="可用性检查组" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="wzeit" label="补货提前天数" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="altsl" label="BOM选择方法" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="sbdkz" label="独立/集中" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="diskz" label="库存地MRP标识" labelCol="1" fieldCol="2"/>--%>
<%-- <x:title title="MRP" name="group"/>--%>
<%-- <div class="hg-form-cols">--%>
<%-- <div class="hg-form-row">--%>
<%-- <x:inputC name="lgort" label="库存地点" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="disgr" label="MRP组" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="dismm" label="MRP类型" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="minbe" label="重订货点" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="dispo" label="MRP控制者" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="disls" label="批量规模" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="bstfe" label="固定批量" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="bstma" label="最大批量" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="bstmi" label="最小批量" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="mabst" label="最大存货水平" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="bstrf" label="设入值" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="beskz" label="获取类型" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="sobsl" label="特殊获取方式" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="lgpro" label="默认生产库存地" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="rgekz" label="倒冲标志" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="lgfsb" label="默认采购收货库存地" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="webaz" label="收货处理天数" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="dzeit" label="自制时间" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="plifz" label="外部采购交货时间" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="fhori" label="排程边际码" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="eisbe" label="安全库存" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="eislo" label="最小安全库存" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="strgr" label="策略组" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="mtvfp" label="可用性检查组" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="wzeit" label="补货提前天数" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="altsl" label="BOM选择方法" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="sbdkz" label="独立/集中" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="diskz" label="库存地MRP标识" labelCol="1" fieldCol="2"/>--%>
<%-- </div>--%>
<%-- </div>--%>
<%-- </div>--%>
<%-- </div>--%>
<%-- <x:title title="生产" name="group"/>--%>
<%-- <div class="hg-form-cols">--%>
<%-- <div class="hg-form-row">--%>
<%-- <x:inputC name="ausme" label="投料计量单位" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="umrenProd" label="转换分母(生产)" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="umrezProd" label="转换分子(生产)" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="sfcpf" label="生产计划参数文件" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="insmk" label="过账到质检" labelCol="1" fieldCol="2"/>--%>
<%-- </div>--%>
<%-- </div>--%>
<%-- <x:title title="生产" name="group"/>--%>
<%-- <div class="hg-form-cols">--%>
<%-- <div class="hg-form-row">--%>
<%-- <x:inputC name="ausme" label="投料计量单位" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="umrenProd" label="转换分母(生产)" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="umrezProd" label="转换分子(生产)" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="sfcpf" label="生产计划参数文件" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="insmk" label="过账到质检" labelCol="1" fieldCol="2"/>--%>
<%-- </div>--%>
<%-- </div>--%>
<%-- <x:title title="存储管理" name="group"/>--%>
<%-- <div class="hg-form-cols">--%>
<%-- <div class="hg-form-row">--%>
<%-- <x:inputC name="lgortQm" label="库存地点" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="sernp" label="序列号参数" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="serlv" label="序列号水平" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="prctr" label="利润中心" labelCol="1" fieldCol="2"/>--%>
<%-- </div>--%>
<%-- </div>--%>
<%-- <x:title title="存储管理" name="group"/>--%>
<%-- <div class="hg-form-cols">--%>
<%-- <div class="hg-form-row">--%>
<%-- <x:inputC name="lgortQm" label="库存地点" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="sernp" label="序列号参数" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="serlv" label="序列号水平" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="prctr" label="利润中心" labelCol="1" fieldCol="2"/>--%>
<%-- </div>--%>
<%-- </div>--%>
<%-- <x:title title="仓库管理" name="group"/>--%>
<%-- <div class="hg-form-cols">--%>
<%-- <div class="hg-form-row">--%>
<%-- <x:inputC name="lgortProfit" label="库存地点" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="lgnum" label="仓库号" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="lgtyp" label="存储类型" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="ltkza" label="存货下架存储类型" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="ltkze" label="存货上架存储类型" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="lgbkz" label="存储分区标识" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="lhmg1" label="仓库设施1存储数量" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="lhme1" label="仓库设施1存储单位" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="lety1" label="仓库设施1类型" labelCol="1" fieldCol="2"/>--%>
<%-- </div>--%>
<%-- </div>--%>
<%-- <x:title title="仓库管理" name="group"/>--%>
<%-- <div class="hg-form-cols">--%>
<%-- <div class="hg-form-row">--%>
<%-- <x:inputC name="lgortProfit" label="库存地点" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="lgnum" label="仓库号" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="lgtyp" label="存储类型" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="ltkza" label="存货下架存储类型" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="ltkze" label="存货上架存储类型" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="lgbkz" label="存储分区标识" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="lhmg1" label="仓库设施1存储数量" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="lhme1" label="仓库设施1存储单位" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="lety1" label="仓库设施1类型" labelCol="1" fieldCol="2"/>--%>
<%-- </div>--%>
<%-- </div>--%>
<%-- <x:title title="质量管理" name="group"/>--%>
<%-- <div class="hg-form-cols">--%>
<%-- <div class="hg-form-row">--%>
<%-- <x:inputC name="kzdkz" label="文档要求" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="art" label="检验类型" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="aktiv" label="激活标识" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="insmkQm" label="过账到质检(质检)" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="aktiv" label="激活标识" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="ppl" label="带任务清单检验" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="app" label="自动分配" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="mer" label="检查特性" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="dyn" label="允许略过" labelCol="1" fieldCol="2"/>--%>
<%-- </div>--%>
<%-- </div>--%>
<%-- <x:title title="质量管理" name="group"/>--%>
<%-- <div class="hg-form-cols">--%>
<%-- <div class="hg-form-row">--%>
<%-- <x:inputC name="kzdkz" label="文档要求" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="art" label="检验类型" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="aktiv" label="激活标识" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="insmkQm" label="过账到质检(质检)" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="aktiv" label="激活标识" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="ppl" label="带任务清单检验" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="app" label="自动分配" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="mer" label="检查特性" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="dyn" label="允许略过" labelCol="1" fieldCol="2"/>--%>
<%-- </div>--%>
<%-- </div>--%>
<%-- <x:title title="财务核算" name="group"/>--%>
<%-- <div class="hg-form-cols">--%>
<%-- <div class="hg-form-row">--%>
<%-- <x:inputC name="bklas" label="评估分类" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="mlast" label="价格确定" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="vprsv" label="价格控制" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="peinh" label="定价基数" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="verpr" label="移动平均价" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="stprs" label="标准价" labelCol="1" fieldCol="2"/>--%>
<%-- </div>--%>
<%-- </div>--%>
<%-- <x:title title="成本核算" name="group"/>--%>
<%-- <div class="hg-form-cols">--%>
<%-- <div class="hg-form-row">--%>
<%-- <x:inputC name="ekalr" label="数量结构" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="ncost" label="不参与成本核算" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="hkmat" label="物料来源" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="awsls" label="差异码" labelCol="1" fieldCol="2"/>--%>
<%-- </div>--%>
<%-- </div>--%>
<%-- <x:title title="财务核算" name="group"/>--%>
<%-- <div class="hg-form-cols">--%>
<%-- <div class="hg-form-row">--%>
<%-- <x:inputC name="bklas" label="评估分类" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="mlast" label="价格确定" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="vprsv" label="价格控制" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="peinh" label="定价基数" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="verpr" label="移动平均价" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="stprs" label="标准价" labelCol="1" fieldCol="2"/>--%>
<%-- </div>--%>
<%-- </div>--%>
<%-- <x:title title="成本核算" name="group"/>--%>
<%-- <div class="hg-form-cols">--%>
<%-- <div class="hg-form-row">--%>
<%-- <x:inputC name="ekalr" label="数量结构" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="ncost" label="不参与成本核算" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="hkmat" label="物料来源" labelCol="1" fieldCol="2"/>--%>
<%-- <x:inputC name="awsls" label="差异码" labelCol="1" fieldCol="2"/>--%>
<%-- </div>--%>
<%-- </div>--%>
</form>
<form
class=
"hg-form"
method=
"post"
action=
""
style=
"display: none;"
id=
"auditForm"
>
<div
class=
" border-left-top"
style=
"margin-top: 10px;"
>
<div
class=
" gray-bg"
>
<div
class=
"col-xs-2 "
style=
"text-align: center;margin-top: 30px"
>
<span>
部门数据审核
</span>
</div>
<div
class=
"hg-form-cols"
>
<div
class=
"hg-form-row"
>
<x:checkboxListC
name=
"bu2"
label=
"驳回部门"
list=
"bu"
labelCol=
"2"
fieldCol=
"10"
/>
</div>
<div
id=
"rejectReasonBox"
></div>
<div
style=
"text-align: center"
>
<div
class=
"btn-group"
style=
"margin: 15px 0px 15px 0px;"
>
<button
id=
"reject"
title=
""
type=
"button"
onclick=
"rejectForm()"
class=
"btn btn-gray"
><i
class=
"fa fa-reply"
></i>
驳回
</button>
<button
id=
"exPass"
title=
""
type=
"button"
class=
"btn btn-gray"
><i
class=
"fa fa-mail-forward"
></i>
检查通过
</button>
<button
id=
"send"
title=
""
type=
"button"
onclick=
"distributeForm()"
class=
"btn btn-gray"
><i
class=
"fa fa-send-o"
></i>
传输
</button>
</div>
</div>
</div>
</div>
</div>
</form>
<%-- <form class="hg-form" method="post" action="" style="display: none;" id="auditForm">--%>
<%-- <div class=" border-left-top" style="margin-top: 20px;">--%>
<%-- <div class=" gray-bg">--%>
<%-- <div class="col-xs-2 " style="text-align: center;margin-top: 30px">--%>
<%-- <span>部门数据审核</span>--%>
<%-- </div>--%>
<%-- <div class="hg-form-cols">--%>
<%-- <div class="hg-form-row">--%>
<%-- <x:checkboxListC name="bu2" label="驳回部门" list="bu" labelCol="2"--%>
<%-- fieldCol="10"/>--%>
<%-- </div>--%>
<%-- <div id="rejectReasonBox"></div>--%>
<%-- <div style="text-align: center">--%>
<%-- <div class="btn-group" style="margin: 5px 0px 8px 0px;">--%>
<%-- <button id="reject" title="" type="button" onclick="rejectForm()" class="btn btn-gray"><i--%>
<%-- class="fa fa-reply"></i>驳回--%>
<%-- </button>--%>
<%-- <button id="exPass" title="" type="button" class="btn btn-gray"><i--%>
<%-- class="fa fa-mail-forward"></i>检查通过--%>
<%-- </button>--%>
<%-- <button id="send" title="" type="button" onclick="distributeForm()"--%>
<%-- class="btn btn-gray"><i--%>
<%-- class="fa fa-send-o"></i>传输--%>
<%-- </button>--%>
<%-- </div>--%>
<%-- </div>--%>
<%-- </div>--%>
<%-- </div>--%>
<%-- </div>--%>
<%-- </form>--%>
<div
class=
"blank_div clearfix"
></div>
</div>
</body>
...
...
topsun/src/main/java/com/huigou/topsun/base/WorkflowApplicationImplOverride.java
View file @
9d798a9b
package
com
.
huigou
.
topsun
.
base
;
import
com.huigou.context.Operator
;
import
com.huigou.topsun.base.bsnMessage.appliction.BsnMessageApplication
;
import
com.huigou.topsun.base.bsnMessage.domain.ActiveStatus
;
import
com.huigou.topsun.base.bsnMessage.domain.BsnMessage
;
import
com.huigou.topsun.base.bsnMessage.domain.BsnMessageExecute
;
import
com.huigou.topsun.base.bsnMessage.domain.BsnMessageSponsor
;
import
com.huigou.uasp.bmp.opm.application.OrgApplication
;
import
com.huigou.uasp.bpm.BatchAdvanceParameter
;
import
com.huigou.uasp.bpm.TaskStatus
;
...
...
@@ -42,25 +42,29 @@ public class WorkflowApplicationImplOverride extends WorkflowApplicationImpl {
@Override
public
Map
<
String
,
Object
>
queryTrackingTasks
()
{
//当前登录用户是否以任务发起人的身份发起过任务
List
<
Map
<
String
,
Object
>>
maps
=
bsnMessageApplication
.
queryFinishBsnMessage
();
List
<
BsnMessage
>
bsnMessages
=
new
ArrayList
<>();
//若有发起过任务且所有的执行人执行完毕,则由系统创建一份审批任务给当前用户
for
(
Map
<
String
,
Object
>
map
:
maps
)
{
BsnMessage
bsnMessage
=
new
BsnMessage
();
bsnMessage
.
setTaskSponsor
(
"system"
);
bsnMessage
.
setListners
(
this
.
getOperator
().
getUserId
());
// bsnMessage.setBusinessCode("system");
bsnMessage
.
setActive
(
ActiveStatus
.
UNFINISHED
.
getValue
());
bsnMessage
.
setCreateDate
(
new
Date
());
bsnMessage
.
setTitle
(
map
.
get
(
"title"
)+
"[完成]"
);
bsnMessage
.
setTaskDescribe
(
"请审批"
);
bsnMessage
.
setExecutorUrl
((
String
)
map
.
get
(
"businessId"
));
bsnMessage
.
setBusinessId
((
String
)
map
.
get
(
"executorUrl"
));
bsnMessages
.
add
(
bsnMessage
);
List
<
BsnMessageSponsor
>
messageSponsors
=
bsnMessageApplication
.
queryFinishBsnMessageSponsor
();
if
(!
messageSponsors
.
isEmpty
())
{
//若有发起过任务且所有的执行人执行完毕,则由系统创建一份审批任务给当前用户
for
(
BsnMessageSponsor
sponsor
:
messageSponsors
)
{
List
<
BsnMessageExecute
>
executes
=
new
ArrayList
<>();
if
(
sponsor
.
getStatus
()==
0
){
//封装审批任务
BsnMessageExecute
execute
=
new
BsnMessageExecute
();
execute
.
setCreateDate
(
new
Date
());
execute
.
setTaskExecute
(
this
.
getOperator
().
getUserId
());
execute
.
setTaskDescribe
(
"[完成]-待审核"
);
execute
.
setBusinessCode
(
"system"
);
execute
.
setActive
(
ActiveStatus
.
UNFINISHED
.
getValue
());
executes
.
add
(
execute
);
sponsor
.
setStatus
(
1
);
//发起人审核
sponsor
.
setExecutes
(
executes
);
//在同一个任务流程下创建一份发起人自己的审批任务
bsnMessageApplication
.
saveBsnMessageSponsor
(
sponsor
);
}
}
}
bsnMessageApplication
.
saveBsnMessage
(
bsnMessages
);
//获取任务执行人为当前用户的任务
return
this
.
bsnMessageApplication
.
queryBsnMessage
();
return
this
.
bsnMessageApplication
.
query
Execute
BsnMessage
();
}
public
WorkflowApplicationImplOverride
()
{
...
...
topsun/src/main/java/com/huigou/topsun/base/bsnMessage/appliction/BsnMessageApplication.java
View file @
9d798a9b
package
com
.
huigou
.
topsun
.
base
.
bsnMessage
.
appliction
;
import
com.huigou.topsun.base.bsnMessage.domain.BsnMessage
;
import
com.huigou.topsun.base.bsnMessage.domain.
query.BsnMessageQueryReques
t
;
import
org.apache.poi.ss.formula.functions.T
;
import
com.huigou.topsun.base.bsnMessage.domain.BsnMessage
Execute
;
import
com.huigou.topsun.base.bsnMessage.domain.
BsnMessageRejec
t
;
import
com.huigou.topsun.base.bsnMessage.domain.BsnMessageSponsor
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -11,11 +11,29 @@ public interface BsnMessageApplication {
String
QUERY_XML_FILE_PATH
=
"config/topsun/base/bsnMessage.xml"
;
Map
<
String
,
Object
>
queryBsnMessage
();
Map
<
String
,
Object
>
query
Execute
BsnMessage
();
List
<
Map
<
String
,
Object
>>
queryFinishBsnMessage
();
List
<
BsnMessage
>
getBsnMessageByBusinessId
(
String
businessId
);
List
<
BsnMessage
>
getBsnMessageByListner
(
String
listner
);
List
<
BsnMessageSponsor
>
queryFinishBsnMessageSponsor
();
void
saveBsnMessage
(
List
<
BsnMessage
>
bsnMessages
);
public
void
saveBsnMessageSponsor
(
List
<
BsnMessageSponsor
>
all
);
public
String
saveBsnMessageSponsor
(
BsnMessageSponsor
entity
);
public
void
saveBsnMessageExecute
(
List
<
BsnMessageExecute
>
all
);
public
void
saveBsnMessageExecute
(
BsnMessageExecute
entity
);
public
void
saveBsnMessageReject
(
List
<
BsnMessageReject
>
all
);
public
void
saveBsnMessageReject
(
BsnMessageReject
entity
);
List
<
BsnMessageExecute
>
getExecuteByMsId
(
String
msId
);
BsnMessageExecute
getExecuteByMeId
(
String
id
);
List
<
BsnMessageReject
>
getRejectByMeId
(
String
meId
);
// List<BsnMessageSponsor> getSponsorsBy();
/**
* 获取同一份任务流程的其他执行部门
* @param meId
* @return
*/
List
<
BsnMessageExecute
>
getBrotherExecuteByMeId
(
String
meId
);
}
topsun/src/main/java/com/huigou/topsun/base/bsnMessage/appliction/impl/BsnMessageApplicationImpl.java
View file @
9d798a9b
package
com
.
huigou
.
topsun
.
base
.
bsnMessage
.
appliction
.
impl
;
import
com.huigou.data.domain.model.CommonDomainConstants
;
import
com.huigou.data.query.model.QueryDescriptor
;
import
com.huigou.data.query.model.QueryModel
;
import
com.huigou.exception.ApplicationException
;
import
com.huigou.topsun.base.bsnMessage.appliction.BsnMessageApplication
;
import
com.huigou.topsun.base.bsnMessage.domain.BsnMessage
;
import
com.huigou.topsun.base.bsnMessage.domain.query.BsnMessageQueryRequest
;
import
com.huigou.topsun.base.bsnMessage.repository.BsnMessageRepository
;
import
com.huigou.topsun.base.coderule.application.CodeRuleApplication
;
import
com.huigou.topsun.base.coderule.domain.model.CodeRule
;
import
com.huigou.topsun.base.coderule.domain.model.CodeRuleKind
;
import
com.huigou.topsun.base.coderule.domain.query.CodeRuleQueryRequest
;
import
com.huigou.topsun.base.coderule.repository.CodeRuleRepository
;
import
com.huigou.topsun.base.bsnMessage.domain.*
;
import
com.huigou.topsun.base.bsnMessage.repository.BsnMessageExecuteRepository
;
import
com.huigou.topsun.base.bsnMessage.repository.BsnMessageRejectRepository
;
import
com.huigou.topsun.base.bsnMessage.repository.BsnMessageSponsorRepository
;
import
com.huigou.uasp.bmp.common.application.BaseApplication
;
import
com.huigou.uasp.bmp.opm.domain.model.org.Org
;
import
com.huigou.uasp.bmp.opm.proxy.OrgApplicationProxy
;
import
com.huigou.util.ApplicationContextWrapper
;
import
com.huigou.util.DateUtil
;
import
com.huigou.util.StringUtil
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Propagation
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.util.Assert
;
import
java.text.ParseException
;
import
java.text.SimpleDateFormat
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.regex.Matcher
;
import
java.util.regex.Pattern
;
/**
* 采购编号及合同编号编码规则
...
...
@@ -43,48 +25,81 @@ import java.util.regex.Pattern;
*/
@Service
(
"bsnMessageApplication"
)
public
class
BsnMessageApplicationImpl
extends
BaseApplication
implements
BsnMessageApplication
{
@Autowired
BsnMessageExecuteRepository
messageExecuteRepository
;
@Autowired
BsnMessageRejectRepository
messageRejectRepository
;
@Autowired
BsnMessageRepository
bsnMessageRepository
;
BsnMessageSponsorRepository
messageSponsorRepository
;
@Override
public
Map
<
String
,
Object
>
queryBsnMessage
()
{
QueryDescriptor
queryDescriptor
=
this
.
sqlExecutorDao
.
getQuery
(
QUERY_XML_FILE_PATH
,
"queryBsnMessage"
);
public
Map
<
String
,
Object
>
query
Execute
BsnMessage
()
{
QueryDescriptor
queryDescriptor
=
this
.
sqlExecutorDao
.
getQuery
(
QUERY_XML_FILE_PATH
,
"query
Execute
BsnMessage"
);
QueryModel
queryModel
=
new
QueryModel
();
queryModel
.
setSql
(
queryDescriptor
.
getSql
());
queryModel
.
setPageIndex
(
1
);
queryModel
.
setPageSize
(
10
);
queryModel
.
setSortFieldName
(
"createDate"
);
queryModel
.
setSortOrder
(
"desc"
);
queryModel
.
putParam
(
"
listners
"
,
this
.
getOperator
().
getUserId
());
queryModel
.
putParam
(
"
taskExecute
"
,
this
.
getOperator
().
getUserId
());
return
this
.
sqlExecutorDao
.
executeSlicedQuery
(
queryModel
);
}
@Override
public
List
<
Map
<
String
,
Object
>>
queryFinishBsnMessage
()
{
QueryDescriptor
queryDescriptor
=
this
.
sqlExecutorDao
.
getQuery
(
QUERY_XML_FILE_PATH
,
"queryFinishBsnMessage"
);
QueryModel
queryModel
=
new
QueryModel
();
queryModel
.
setSql
(
queryDescriptor
.
getSql
());
queryModel
.
setPageIndex
(
1
);
queryModel
.
setPageSize
(
10
);
queryModel
.
setSortFieldName
(
"createDate"
);
queryModel
.
setSortOrder
(
"desc"
);
queryModel
.
putParam
(
"taskSponsor"
,
this
.
getOperator
().
getUserId
());
Map
<
String
,
Object
>
map
=
this
.
sqlExecutorDao
.
executeSlicedQuery
(
queryModel
);
return
(
List
<
Map
<
String
,
Object
>>)
map
.
get
(
"Rows"
);
public
List
<
BsnMessageSponsor
>
queryFinishBsnMessageSponsor
()
{
QueryDescriptor
queryDescriptor
=
this
.
sqlExecutorDao
.
getQuery
(
QUERY_XML_FILE_PATH
,
"queryFinishBsnMessageSponsor"
);
return
this
.
sqlExecutorDao
.
queryToList
(
queryDescriptor
.
getSql
(),
BsnMessageSponsor
.
class
,
this
.
getOperator
().
getUserId
());
}
public
void
saveBsnMessageSponsor
(
List
<
BsnMessageSponsor
>
all
){
messageSponsorRepository
.
save
(
all
);
}
public
String
saveBsnMessageSponsor
(
BsnMessageSponsor
entity
){
String
keyId
=
messageSponsorRepository
.
save
(
entity
).
getId
();
if
(!
entity
.
getExecutes
().
isEmpty
()){
entity
.
getExecutes
().
forEach
(
item
->
item
.
setMessageSponsorId
(
keyId
));
messageExecuteRepository
.
save
(
entity
.
getExecutes
());
}
return
keyId
;
}
public
void
saveBsnMessageExecute
(
List
<
BsnMessageExecute
>
all
){
messageExecuteRepository
.
save
(
all
);
}
public
void
saveBsnMessageExecute
(
BsnMessageExecute
entity
){
messageExecuteRepository
.
save
(
entity
);
}
public
void
saveBsnMessageReject
(
List
<
BsnMessageReject
>
all
){
messageRejectRepository
.
save
(
all
);
}
public
void
saveBsnMessageReject
(
BsnMessageReject
entity
){
messageRejectRepository
.
save
(
entity
);
}
@Override
public
List
<
BsnMessage
>
getBsnMessageByBusinessId
(
String
busines
sId
)
{
return
bsnMessageRepository
.
findAllByBusinessId
(
busines
sId
);
public
List
<
BsnMessage
Execute
>
getExecuteByMsId
(
String
m
sId
)
{
return
messageExecuteRepository
.
findAllByMessageSponsorId
(
m
sId
);
}
@Override
public
List
<
BsnMessage
>
getBsnMessageByListner
(
String
listner
)
{
return
bsnMessageRepository
.
findAllByListners
(
listner
);
public
BsnMessageExecute
getExecuteByMeId
(
String
id
)
{
return
messageExecuteRepository
.
findOne
(
id
);
}
@Override
public
void
saveBsnMessage
(
List
<
BsnMessage
>
bsnMessages
)
{
bsnMessageRepository
.
save
(
bsnMessages
);
public
List
<
BsnMessageReject
>
getRejectByMeId
(
String
meId
)
{
return
messageRejectRepository
.
findAllByBsnExecuteId
(
meId
);
}
@Override
public
List
<
BsnMessageExecute
>
getBrotherExecuteByMeId
(
String
meId
)
{
return
null
;
}
}
topsun/src/main/java/com/huigou/topsun/base/bsnMessage/domain/BsnMessageExecute.java
0 → 100644
View file @
9d798a9b
package
com
.
huigou
.
topsun
.
base
.
bsnMessage
.
domain
;
import
lombok.Data
;
import
org.hibernate.annotations.GenericGenerator
;
import
javax.persistence.*
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
*
* @TableName bsn_message_execute
*/
@Table
(
name
=
"bsn_message_execute"
)
@Entity
@Data
public
class
BsnMessageExecute
implements
Serializable
{
/**
*
*/
@Id
@GeneratedValue
(
generator
=
"system-uuid"
)
@GenericGenerator
(
name
=
"system-uuid"
,
strategy
=
"guid"
)
private
String
id
;
/**
*
*/
@Column
(
name
=
"message_sponsor_id"
)
private
String
messageSponsorId
;
/**
* 任务描述
*/
@Column
(
name
=
"task_describe"
)
private
String
taskDescribe
;
/**
* 任务执行人
*/
@Column
(
name
=
"task_execute"
)
private
String
taskExecute
;
/**
* 业务应用类型
*/
@Column
(
name
=
"business_code"
)
private
String
businessCode
;
/**
* 创建日期
*/
@Column
(
name
=
"create_date"
)
private
Date
createDate
;
/**
* 完成日期
*/
@Column
(
name
=
"finished_date"
)
private
Date
finishedDate
;
/**
* 完成状态(默认为未完成:0,完成为:1, 保存未分发为:2,驳回为:3)
*/
private
Integer
active
;
private
static
final
long
serialVersionUID
=
1L
;
}
\ No newline at end of file
topsun/src/main/java/com/huigou/topsun/base/bsnMessage/domain/BsnMessageReject.java
0 → 100644
View file @
9d798a9b
package
com
.
huigou
.
topsun
.
base
.
bsnMessage
.
domain
;
import
lombok.Data
;
import
org.hibernate.annotations.GenericGenerator
;
import
javax.persistence.*
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
*
* @TableName bsn_message_reject
*/
@Table
(
name
=
"bsn_message_reject"
)
@Entity
@Data
public
class
BsnMessageReject
implements
Serializable
{
/**
*
*/
@Id
@GeneratedValue
(
generator
=
"system-uuid"
)
@GenericGenerator
(
name
=
"system-uuid"
,
strategy
=
"guid"
)
@Column
(
name
=
"detail_Id"
)
private
String
detailId
;
/**
*
*/
@Column
(
name
=
"bsn_execute_id"
)
private
String
bsnExecuteId
;
/**
* 驳回信息
*/
@Column
(
name
=
"reject_msg"
)
private
String
rejectMsg
;
/**
* 驳回时间
*/
@Column
(
name
=
"reject_date"
)
private
Date
rejectDate
;
/**
* 处理时间
*/
@Column
(
name
=
"rectify_date"
)
private
Date
rectifyDate
;
// /**
// * 处理状态
// */
// @Column(name = "rectify_status")
// private Date rectifyStatus;
private
static
final
long
serialVersionUID
=
1L
;
}
\ No newline at end of file
topsun/src/main/java/com/huigou/topsun/base/bsnMessage/domain/BsnMessage.java
→
topsun/src/main/java/com/huigou/topsun/base/bsnMessage/domain/BsnMessage
Sponsor
.java
View file @
9d798a9b
...
...
@@ -6,17 +6,18 @@ import org.hibernate.annotations.GenericGenerator;
import
javax.persistence.*
;
import
java.io.Serializable
;
import
java.util.Date
;
import
java.util.List
;
/**
*
* @TableName bsn_message
* @TableName bsn_message
_sponsor
*/
@Table
(
name
=
"bsn_message"
)
@Table
(
name
=
"bsn_message
_sponsor
"
)
@Entity
@Data
public
class
BsnMessage
implements
Serializable
{
public
class
BsnMessage
Sponsor
implements
Serializable
{
/**
*
id
*
*/
@Id
@GeneratedValue
(
...
...
@@ -29,34 +30,16 @@ public class BsnMessage implements Serializable {
private
String
id
;
/**
* 任务
描述
* 任务
标题
*/
private
String
title
;
/**
* 任务发起人
*/
@Column
(
name
=
"task_sponsor"
)
@Column
(
name
=
"task_sponsor"
)
private
String
taskSponsor
;
/**
* 任务发起人
*/
@Column
(
name
=
"task_describe"
)
private
String
taskDescribe
;
/**
* 任务执行人
*/
private
String
listners
;
/**
* 业务应用类型
*/
@Column
(
name
=
"business_code"
)
private
String
businessCode
;
/**
* 业务表单id
*/
...
...
@@ -76,15 +59,19 @@ public class BsnMessage implements Serializable {
private
Date
finishedDate
;
/**
*任务执行地址
*
任务执行地址
*/
@Column
(
name
=
"executor_url"
)
private
String
executorUrl
;
/**
* 完成状态(
默认为未完成:0,完成为:1,保存未分发:2
)
* 完成状态(
等待:0,审核:1
)
*/
private
Integer
active
;
private
Integer
status
;
@Transient
private
List
<
BsnMessageExecute
>
executes
;
private
static
final
long
serialVersionUID
=
1L
;
}
\ No newline at end of file
topsun/src/main/java/com/huigou/topsun/base/bsnMessage/repository/BsnMessageRepository.java
→
topsun/src/main/java/com/huigou/topsun/base/bsnMessage/repository/BsnMessage
Execute
Repository.java
View file @
9d798a9b
package
com
.
huigou
.
topsun
.
base
.
bsnMessage
.
repository
;
import
com.huigou.topsun.base.bsnMessage.domain.BsnMessage
;
import
com.huigou.topsun.base.bsnMessage.domain.BsnMessageExecute
;
import
org.springframework.data.jpa.repository.JpaRepository
;
import
java.util.List
;
public
interface
BsnMessageRepository
extends
JpaRepository
<
BsnMessage
,
String
>
{
List
<
BsnMessage
>
findAllByBusinessId
(
String
BusinessId
);
List
<
BsnMessage
>
findAllByListners
(
String
listner
);
public
interface
BsnMessageExecuteRepository
extends
JpaRepository
<
BsnMessageExecute
,
String
>
{
List
<
BsnMessageExecute
>
findAllByMessageSponsorId
(
String
msId
);
}
topsun/src/main/java/com/huigou/topsun/base/bsnMessage/repository/BsnMessageRejectRepository.java
0 → 100644
View file @
9d798a9b
package
com
.
huigou
.
topsun
.
base
.
bsnMessage
.
repository
;
import
com.huigou.topsun.base.bsnMessage.domain.BsnMessageReject
;
import
org.springframework.data.jpa.repository.JpaRepository
;
import
java.util.List
;
public
interface
BsnMessageRejectRepository
extends
JpaRepository
<
BsnMessageReject
,
String
>
{
List
<
BsnMessageReject
>
findAllByBsnExecuteId
(
String
meId
);
}
topsun/src/main/java/com/huigou/topsun/base/bsnMessage/repository/BsnMessageSponsorRepository.java
0 → 100644
View file @
9d798a9b
package
com
.
huigou
.
topsun
.
base
.
bsnMessage
.
repository
;
import
com.huigou.topsun.base.bsnMessage.domain.BsnMessageSponsor
;
import
org.springframework.data.jpa.repository.JpaRepository
;
import
java.util.List
;
public
interface
BsnMessageSponsorRepository
extends
JpaRepository
<
BsnMessageSponsor
,
String
>
{
List
<
BsnMessageSponsor
>
findAllByBusinessId
(
String
BusinessId
);
}
topsun/src/main/java/com/huigou/topsun/sap/nonProdApply/application/impl/NonProdApplyDeptApplicationImpl.java
View file @
9d798a9b
...
...
@@ -4,11 +4,10 @@ package com.huigou.topsun.sap.nonProdApply.application.impl;
import
com.fasterxml.jackson.core.JsonProcessingException
;
import
com.fasterxml.jackson.core.type.TypeReference
;
import
com.fasterxml.jackson.databind.ObjectMapper
;
import
com.huigou.
context.Operator
;
import
com.huigou.
topsun.base.bsnMessage.appliction.BsnMessageApplication
;
import
com.huigou.topsun.base.bsnMessage.domain.ActiveStatus
;
import
com.huigou.topsun.base.bsnMessage.domain.BsnMessage
;
import
com.huigou.topsun.base.bsnMessage.repository.BsnMessageRepository
;
import
com.huigou.topsun.proofing.domain.proofingApply.model.ProofingApplyProcess
;
import
com.huigou.topsun.base.bsnMessage.domain.BsnMessageExecute
;
import
com.huigou.topsun.base.bsnMessage.domain.BsnMessageSponsor
;
import
com.huigou.topsun.sap.nonProdApply.application.NonProdApplyDeptApplication
;
import
com.huigou.topsun.sap.nonProdApply.domain.SapNonProdApplyDept
;
...
...
@@ -27,7 +26,7 @@ public class NonProdApplyDeptApplicationImpl extends BaseApplication implements
@Autowired
NonProdApplyDeptRepository
nonProdApplyDeptRepository
;
@Autowired
BsnMessage
Repository
bsnMessageRepository
;
BsnMessage
Application
bsnMessageApplication
;
@Override
public
Map
<
String
,
Object
>
saveSapNonProdApplyDept
(
SDO
sdo
){
...
...
@@ -46,25 +45,33 @@ public class NonProdApplyDeptApplicationImpl extends BaseApplication implements
}
//封装分发数据
List
<
BsnMessage
>
bsnMessageList
=
new
ArrayList
<>();
BsnMessageSponsor
bsnMessageSponsor
=
new
BsnMessageSponsor
();
bsnMessageSponsor
.
setTaskSponsor
(
this
.
getOperator
().
getUserId
());
bsnMessageSponsor
.
setTitle
(
"非产品/非本成品类物料"
);
bsnMessageSponsor
.
setExecutorUrl
(
"sapNonProdApplyNext/fillInNonProdApplyDept.do"
);
bsnMessageSponsor
.
setCreateDate
(
new
Date
());
bsnMessageSponsor
.
setBusinessId
(
nonProdApplyDept
.
getApplyDeptId
());
bsnMessageSponsor
.
setStatus
(
0
);
List
<
BsnMessageExecute
>
executeList
=
new
ArrayList
<>();
for
(
Map
<
String
,
String
>
stringMap
:
deptStaffList
)
{
BsnMessage
bsnMessage
=
new
BsnMessag
e
();
BsnMessage
Execute
messageExecute
=
new
BsnMessageExecut
e
();
String
userCode
=
stringMap
.
get
(
"userCode"
);
String
deptName
=
stringMap
.
get
(
"deptName"
);
String
deptCode
=
stringMap
.
get
(
"deptCode"
);
bsnMessage
.
setTaskSponsor
(
this
.
getOperator
().
getUserId
());
bsnMessage
.
setListners
(
userCode
);
bsnMessage
.
setBusinessCode
(
deptCode
);
bsnMessage
.
setActive
(
ActiveStatus
.
SAVED
.
getValue
());
bsnMessage
.
setCreateDate
(
new
Date
());
bsnMessage
.
setTitle
(
"非产品/非本成品类物料"
);
bsnMessage
.
setTaskDescribe
(
deptName
+
"部门数据维护"
);
bsnMessage
.
setExecutorUrl
(
"sapNonProdApplyNext/fillInNonProdApplyDept.do"
);
bsnMessage
.
setBusinessId
(
nonProdApplyDept
.
getApplyDeptId
());
bsnMessageList
.
add
(
bsnMessage
);
messageExecute
.
setTaskExecute
(
userCode
);
messageExecute
.
setBusinessCode
(
deptCode
);
messageExecute
.
setActive
(
ActiveStatus
.
SAVED
.
getValue
());
messageExecute
.
setCreateDate
(
new
Date
());
messageExecute
.
setTaskDescribe
(
deptName
+
"部门数据维护"
);
executeList
.
add
(
messageExecute
);
}
bsnMessageRepository
.
save
(
bsnMessageList
);
bsnMessageSponsor
.
setExecutes
(
executeList
);
String
keyId
=
bsnMessageApplication
.
saveBsnMessageSponsor
(
bsnMessageSponsor
);
map
.
put
(
"applyDeptId"
,
nonProdApplyDept
.
getApplyDeptId
());
map
.
put
(
"keyId"
,
keyId
);
return
map
;
}
...
...
@@ -72,9 +79,9 @@ public class NonProdApplyDeptApplicationImpl extends BaseApplication implements
public
void
distributeSapNonProdApplyDept
(
SDO
sdo
)
{
//将状态为保存为分发的全部修改为分发未完成
Map
<
String
,
Object
>
map
=
this
.
saveSapNonProdApplyDept
(
sdo
);
List
<
BsnMessage
>
nonProdApplyDeptList
=
bsnMessageRepository
.
findAllByBusinessId
((
String
)
map
.
get
(
"applyDept
Id"
));
nonProdApplyDeptList
.
forEach
(
item
->
item
.
setActive
(
ActiveStatus
.
UNFINISHED
.
getValue
()));
bsnMessage
Repository
.
save
(
nonProdApplyDeptList
);
List
<
BsnMessage
Execute
>
executes
=
bsnMessageApplication
.
getExecuteByMsId
((
String
)
map
.
get
(
"key
Id"
));
executes
.
forEach
(
item
->
item
.
setActive
(
ActiveStatus
.
UNFINISHED
.
getValue
()));
bsnMessage
Application
.
saveBsnMessageExecute
(
executes
);
}
@Override
...
...
@@ -94,6 +101,6 @@ public class NonProdApplyDeptApplicationImpl extends BaseApplication implements
one
.
setStatus
(
ActiveStatus
.
REJECTED
.
getValue
());
nonProdApplyDeptRepository
.
save
(
one
);
//获取此条数据的相关部门信息
List
<
BsnMessage
>
allByBusinessId
=
bsnMessageRepository
.
findAllByBusinessId
(
bdid
);
//
List<BsnMessage> allByBusinessId = bsnMessageRepository.findAllByBusinessId(bdid);
}
}
topsun/src/main/java/com/huigou/topsun/sap/nonProdApply/controller/NonProdApplyNextController.java
View file @
9d798a9b
...
...
@@ -2,28 +2,17 @@ package com.huigou.topsun.sap.nonProdApply.controller;
import
com.huigou.cache.DictUtil
;
import
com.huigou.context.Operator
;
import
com.huigou.context.OrgUnit
;
import
com.huigou.topsun.base.bsnMessage.appliction.BsnMessageApplication
;
import
com.huigou.topsun.base.bsnMessage.domain.ActiveStatus
;
import
com.huigou.topsun.base.bsnMessage.domain.BsnMessage
;
import
com.huigou.topsun.proofing.domain.workInstructionApply.model.WorkInstructionApply
;
import
com.huigou.topsun.base.bsnMessage.domain.BsnMessageExecute
;
import
com.huigou.topsun.base.bsnMessage.domain.BsnMessageReject
;
import
com.huigou.topsun.sap.nonProdApply.application.NonProdApplyApplication
;
import
com.huigou.topsun.sap.nonProdApply.application.NonProdApplyDeptApplication
;
import
com.huigou.topsun.sap.nonProdApply.domain.NonProdApplyBaseInfo
;
import
com.huigou.topsun.sap.nonProdApply.domain.SapNonProdApplyDept
;
import
com.huigou.topsun.sap.nonProdApply.domain.query.NonProdApplyBaseInfoQueryRequest
;
import
com.huigou.uasp.annotation.ControllerMapping
;
import
com.huigou.uasp.bmp.common.BizBillStatus
;
import
com.huigou.uasp.bmp.common.easysearch.EasySearch
;
import
com.huigou.uasp.bmp.common.easysearch.domain.model.EasySearchParse
;
import
com.huigou.uasp.bmp.common.easysearch.domain.model.QuerySchemeField
;
import
com.huigou.uasp.bmp.opm.application.MemEasySearcher
;
import
com.huigou.uasp.bmp.opm.application.impl.MemEasySearcherImpl
;
import
com.huigou.uasp.client.CommonController
;
import
com.huigou.util.SDO
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.domain.PageRequest
;
import
org.springframework.stereotype.Controller
;
import
java.util.*
;
...
...
@@ -35,6 +24,7 @@ public class NonProdApplyNextController extends CommonController {
protected
String
getPagePath
()
{
return
"/biz/topsun/sap/nonProdApply/"
;
}
@Autowired
NonProdApplyApplication
nonProdApplyApplication
;
@Autowired
...
...
@@ -43,41 +33,40 @@ public class NonProdApplyNextController extends CommonController {
BsnMessageApplication
bsnMessageApplication
;
public
String
forwardNonProdApplyNext
(){
public
String
forwardNonProdApplyNext
()
{
SDO
sdo
=
this
.
getSDO
();
String
id
=
sdo
.
getBizId
();
this
.
putAttribute
(
"active"
,
ActiveStatus
.
UNFINISHED
.
getValue
()
);
//定义流程环节的id
//
this.putAttribute("active", ActiveStatus.UNFINISHED.getValue() );//定义流程环节的id
NonProdApplyBaseInfo
nonProdApplyBaseInfo
=
nonProdApplyApplication
.
loadNonProdApplyBaseInfoById
(
id
);
return
forward
(
"nonProdApplyNext"
,
nonProdApplyBaseInfo
);
return
forward
(
"nonProdApplyNext"
,
nonProdApplyBaseInfo
);
}
//部门相关
public
String
slicedDeptList
(){
public
String
slicedDeptList
()
{
SDO
sdo
=
this
.
getSDO
();
String
septString
=
sdo
.
getString
(
"dept"
);
// String applyDeptId = sdo.getString("applyDeptId");
// List<BsnMessage> bsnMessageAll = bsnMessageApplication.getBsnMessageByBusinessId(applyDeptId);
List
<
String
>
deptList
=
Arrays
.
asList
(
septString
.
split
(
","
));
Map
<
String
,
String
>
serviceusage
=
DictUtil
.
getDictionary
(
"serviceusage"
);
// 用于存储结果的字典
Map
<
String
,
List
<
HashMap
<
String
,
String
>>>
map
=
new
HashMap
<>();
// 用于存储结果的字典
// 用于存储结果的字典
Map
<
String
,
List
<
HashMap
<
String
,
String
>>>
map
=
new
HashMap
<>();
// 用于存储结果的字典
List
<
HashMap
<
String
,
String
>>
list
=
new
ArrayList
<>();
for
(
String
key
:
deptList
)
{
HashMap
<
String
,
String
>
resultMap
=
new
HashMap
<>();
String
value
=
serviceusage
.
get
(
key
);
resultMap
.
put
(
"deptCode"
,
key
);
resultMap
.
put
(
"deptCode"
,
key
);
resultMap
.
put
(
"deptName"
,
value
);
list
.
add
(
resultMap
);
}
map
.
put
(
"Rows"
,
list
);
map
.
put
(
"Rows"
,
list
);
return
toResult
(
map
);
}
/**
* 添加
*/
public
String
saveSapNonProdApplyDept
(){
public
String
saveSapNonProdApplyDept
()
{
SDO
sdo
=
this
.
getSDO
();
Map
<
String
,
Object
>
map
=
nonProdApplyDeptApplication
.
saveSapNonProdApplyDept
(
sdo
);
return
toResult
(
map
);
...
...
@@ -87,7 +76,7 @@ public class NonProdApplyNextController extends CommonController {
/**
* 分发表单
*/
public
String
distributeSapNonProdApplyDept
(){
public
String
distributeSapNonProdApplyDept
()
{
SDO
sdo
=
this
.
getSDO
();
nonProdApplyDeptApplication
.
distributeSapNonProdApplyDept
(
sdo
);
return
success
();
...
...
@@ -95,22 +84,33 @@ public class NonProdApplyNextController extends CommonController {
/**
* 填写收到的任务表单
*
* @return
*/
public
String
fillInNonProdApplyDept
(){
public
String
fillInNonProdApplyDept
()
{
SDO
sdo
=
this
.
getSDO
();
String
id
=
sdo
.
getBizId
();
String
active
=
sdo
.
getString
(
"active"
);
String
taskSponsor
=
sdo
.
getString
(
"taskSponsor"
);
String
bizId
=
sdo
.
getBizId
();
String
meId
=
sdo
.
getString
(
"taskId"
);
BsnMessageExecute
execute
=
bsnMessageApplication
.
getExecuteByMeId
(
meId
);
this
.
putAttribute
(
"deptCode"
,
execute
.
getBusinessCode
());
this
.
putAttribute
(
"active"
,
execute
.
getActive
());
this
.
putAttribute
(
"meId"
,
execute
.
getId
());
this
.
putAttribute
(
"isReadOnly"
,
"false"
);
SapNonProdApplyDept
nonProdApplyDept
=
nonProdApplyDeptApplication
.
getNonProdApplyDeptById
(
bizId
);
//测试数据
Map
<
String
,
String
>
map
=
DictUtil
.
getDictionary
(
"serviceusage"
);
this
.
putAttribute
(
"bu"
,
map
);
this
.
putAttribute
(
"isReadOnly"
,
"false"
);
this
.
putAttribute
(
"active"
,
active
);
this
.
putAttribute
(
"taskSponsor"
,
taskSponsor
);
SapNonProdApplyDept
nonProdApplyDept
=
nonProdApplyDeptApplication
.
getNonProdApplyDeptById
(
id
);
return
forward
(
"nonProdApplyNext"
,
nonProdApplyDept
);
this
.
putAttribute
(
"bu"
,
map
);
return
forward
(
"nonProdApplyNext"
,
nonProdApplyDept
);
}
public
String
slicedRejectCauseList
(){
SDO
sdo
=
this
.
getSDO
();
String
meId
=
sdo
.
getString
(
"meId"
);
List
<
BsnMessageReject
>
rejectAll
=
bsnMessageApplication
.
getRejectByMeId
(
meId
);
return
toResult
(
rejectAll
);
}
// @EasySearch(queryName = "userNameSelect")
// public Map<String, Object> queryResourceNameGroup(SDO sdo){
...
...
@@ -136,9 +136,10 @@ public class NonProdApplyNextController extends CommonController {
// }
public
void
rejectNonProdApplyDept
(){
public
void
rejectNonProdApplyDept
()
{
SDO
sdo
=
this
.
getSDO
();
String
septString
=
sdo
.
getString
(
"dept"
);
String
meId
=
sdo
.
getString
(
"meId"
);
//可以根据meId 获取msId ,根据msId获取所有的持有该任务的部门
//需要被驳回的部门
List
<
String
>
deptList
=
Arrays
.
asList
(
septString
.
split
(
","
));
...
...
topsun/src/main/resources/config/topsun/base/bsnMessage.xml
View file @
9d798a9b
<?xml version="1.0" encoding="UTF-8"?>
<query-mappings>
<query
name=
"query
BsnMessage"
label=
"bsn业务人员表"
table=
"bsn_messag
e"
>
<query
name=
"query
ExecuteBsnMessage"
label=
"bsn业务人员表"
table=
"bsn_message_execut
e"
>
<sql-query>
select t.*,b.*
from bsn_message t
left join bsn_message_detail b
on(t.id=b.bsn_message_id)
from bsn_message t where t.active=0
SELECT t.id,t.message_sponsor_id,t.task_execute,t.business_code,t.create_date,t.finished_date,t.active,
CASE WHEN t.active = 3 THEN CONCAT(t.task_describe, '[驳回]') ELSE t.task_describe END AS task_describe,
t2.title,
t2.executor_url,
t2.business_id
FROM bsn_message_execute t
LEFT JOIN bsn_message_sponsor t2 ON t2.id = t.message_sponsor_id
WHERE t.active IN (0, 3)
</sql-query>
<condition
column=
"
listners"
name=
"listners
"
type=
"java.lang.String"
symbol=
"="
alias=
"t"
/>
<condition
column=
"
taskExecute"
name=
"taskExecute
"
type=
"java.lang.String"
symbol=
"="
alias=
"t"
/>
</query>
<query
name=
"queryFinishBsnMessage"
label=
"bsn业务人员表"
table=
"bsn_message"
>
<query
name=
"queryFinishBsnMessage
Sponsor
"
label=
"bsn业务人员表"
table=
"bsn_message"
>
<sql-query>
SELECT business_id,executor_url,title
FROM bsn_message
WHERE task_sponsor = ?
GROUP BY business_id,executor_url,title
HAVING COUNT(DISTINCT active) = 1 AND MIN(active) = 1;
SELECT t.*
FROM bsn_message_sponsor t
WHERE t.task_sponsor = ?
AND NOT EXISTS (
SELECT 1
FROM bsn_message_execute t2
WHERE t2.message_sponsor_id = t.id
AND t2.active != 1
)
</sql-query>
</query>
</query-mappings>
\ No newline at end of file
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