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
Expand all
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 @@
...
@@ -48,12 +48,16 @@
<option
name=
"tableUIInfoList"
>
<option
name=
"tableUIInfoList"
>
<list>
<list>
<TableUIInfo>
<TableUIInfo>
<option
name=
"className"
value=
"
SapCostReimbursementBaseInfo
"
/>
<option
name=
"className"
value=
"
BsnMessageSponsor
"
/>
<option
name=
"tableName"
value=
"
sap_cost_reimbursement_base_info
"
/>
<option
name=
"tableName"
value=
"
bsn_message_sponsor
"
/>
</TableUIInfo>
</TableUIInfo>
<TableUIInfo>
<TableUIInfo>
<option
name=
"className"
value=
"SapCostReimbursementDetail"
/>
<option
name=
"className"
value=
"BsnMessageExecute"
/>
<option
name=
"tableName"
value=
"sap_cost_reimbursement_detail"
/>
<option
name=
"tableName"
value=
"bsn_message_execute"
/>
</TableUIInfo>
<TableUIInfo>
<option
name=
"className"
value=
"BsnMessageReject"
/>
<option
name=
"tableName"
value=
"bsn_message_reject"
/>
</TableUIInfo>
</TableUIInfo>
</list>
</list>
</option>
</option>
...
...
huigou-xt/src/main/webapp/system/taskCenter/TasksTracking.jsp
View file @
9d798a9b
...
@@ -7,7 +7,6 @@
...
@@ -7,7 +7,6 @@
taskId=
"
<c:out
value=
"
${
task
.
id
}
"
/>
"
taskId=
"
<c:out
value=
"
${
task
.
id
}
"
/>
"
bizId=
"
<c:out
value=
"
${
task
.
businessId
}
"
/>
"
bizId=
"
<c:out
value=
"
${
task
.
businessId
}
"
/>
"
name=
"
<c:out
value=
"
${
task
.
title
}
"
/>
"
name=
"
<c:out
value=
"
${
task
.
title
}
"
/>
"
active=
"
<c:out
value=
"
${
task
.
active
}
"
/>
"
url=
"
<c:out
value=
"
${
task
.
executorUrl
}
"
/>
"
>
url=
"
<c:out
value=
"
${
task
.
executorUrl
}
"
/>
"
>
<div
class=
"title-view"
>
<div
class=
"title-view"
>
<a
href=
"javascript:void(0);"
class=
"aLink"
taskId=
"
<c:out
value=
"
${
task
.
id
}
"
/>
"
title=
"
<c:out
value=
"
${
task
.
title
}
"
/>
"
>
<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 () {
...
@@ -14,25 +14,32 @@ $(document).ready(function () {
function
initializate
()
{
function
initializate
()
{
switch
(
$
(
"#active"
).
val
())
{
//页面控制
case
'0'
:
//已分发未完成
debugger
$
(
"#buttonBox"
).
show
();
switch
(
$
(
"#active"
).
val
())
{
$
(
"#showChart"
).
remove
();
case
'0'
:
//已分发未完成
break
;
if
(
$
(
"#deptCode"
).
val
()
===
"system"
)
{
case
'1'
:
//完成/审核
$
(
"#auditForm"
).
show
();
$
(
"#auditForm"
).
show
();
}
else
{
break
;
$
(
"#buttonBox"
).
show
();
case
'2'
:
//保存未分发
$
(
"#showChart"
).
remove
();
$
(
"#buttonBox"
).
show
();
break
;
case
'3'
:
//被驳回
$
(
"#causeBox"
).
show
();
break
;
default
:
//其他/详情
$
(
"#buttonBox"
).
show
();
break
;
}
}
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");
// let isInitiator = ($("#isInitiator").val() === "true");
// if (isInitiator) {
// if (isInitiator) {
...
@@ -133,7 +140,7 @@ function loadGrid() {
...
@@ -133,7 +140,7 @@ function loadGrid() {
],
],
dataAction
:
"server"
,
dataAction
:
"server"
,
url
:
web_app
.
name
+
'/sapNonProdApplyNext/slicedDeptList.ajax'
,
url
:
web_app
.
name
+
'/sapNonProdApplyNext/slicedDeptList.ajax'
,
parms
:
{
dept
:
$
(
"#businessUsage"
).
val
(),
id
:
$
(
"#applyDeptId"
).
val
()},
parms
:
{
dept
:
$
(
"#businessUsage"
).
val
(),
id
:
$
(
"#applyDeptId"
).
val
()},
pageSize
:
20
,
pageSize
:
20
,
usePager
:
false
,
usePager
:
false
,
enabledEdit
:
true
,
enabledEdit
:
true
,
...
@@ -189,6 +196,8 @@ function distributeForm() {
...
@@ -189,6 +196,8 @@ function distributeForm() {
}
}
function
getExtendedData
()
{
function
getExtendedData
()
{
debugger
debugger
...
@@ -213,7 +222,7 @@ function getExtendedData() {
...
@@ -213,7 +222,7 @@ function getExtendedData() {
return
false
return
false
}
}
let
extendedData
=
{};
let
extendedData
=
{};
extendedData
.
deptStaff
=
Public
.
encodeJSONURI
(
deptStaffResult
);
extendedData
.
deptStaff
=
Public
.
encodeJSONURI
(
deptStaffResult
);
return
extendedData
;
return
extendedData
;
}
}
...
@@ -260,4 +269,60 @@ function loadRejectReasonBox() {
...
@@ -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
This diff is collapsed.
Click to expand it.
topsun/src/main/java/com/huigou/topsun/base/WorkflowApplicationImplOverride.java
View file @
9d798a9b
package
com
.
huigou
.
topsun
.
base
;
package
com
.
huigou
.
topsun
.
base
;
import
com.huigou.context.Operator
;
import
com.huigou.topsun.base.bsnMessage.appliction.BsnMessageApplication
;
import
com.huigou.topsun.base.bsnMessage.appliction.BsnMessageApplication
;
import
com.huigou.topsun.base.bsnMessage.domain.ActiveStatus
;
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.bmp.opm.application.OrgApplication
;
import
com.huigou.uasp.bpm.BatchAdvanceParameter
;
import
com.huigou.uasp.bpm.BatchAdvanceParameter
;
import
com.huigou.uasp.bpm.TaskStatus
;
import
com.huigou.uasp.bpm.TaskStatus
;
...
@@ -42,25 +42,29 @@ public class WorkflowApplicationImplOverride extends WorkflowApplicationImpl {
...
@@ -42,25 +42,29 @@ public class WorkflowApplicationImplOverride extends WorkflowApplicationImpl {
@Override
@Override
public
Map
<
String
,
Object
>
queryTrackingTasks
()
{
public
Map
<
String
,
Object
>
queryTrackingTasks
()
{
//当前登录用户是否以任务发起人的身份发起过任务
//当前登录用户是否以任务发起人的身份发起过任务
List
<
Map
<
String
,
Object
>>
maps
=
bsnMessageApplication
.
queryFinishBsnMessage
();
List
<
BsnMessageSponsor
>
messageSponsors
=
bsnMessageApplication
.
queryFinishBsnMessageSponsor
();
List
<
BsnMessage
>
bsnMessages
=
new
ArrayList
<>();
if
(!
messageSponsors
.
isEmpty
())
{
//若有发起过任务且所有的执行人执行完毕,则由系统创建一份审批任务给当前用户
//若有发起过任务且所有的执行人执行完毕,则由系统创建一份审批任务给当前用户
for
(
Map
<
String
,
Object
>
map
:
maps
)
{
for
(
BsnMessageSponsor
sponsor
:
messageSponsors
)
{
BsnMessage
bsnMessage
=
new
BsnMessage
();
List
<
BsnMessageExecute
>
executes
=
new
ArrayList
<>();
bsnMessage
.
setTaskSponsor
(
"system"
);
if
(
sponsor
.
getStatus
()==
0
){
bsnMessage
.
setListners
(
this
.
getOperator
().
getUserId
());
//封装审批任务
// bsnMessage.setBusinessCode("system");
BsnMessageExecute
execute
=
new
BsnMessageExecute
();
bsnMessage
.
setActive
(
ActiveStatus
.
UNFINISHED
.
getValue
());
execute
.
setCreateDate
(
new
Date
());
bsnMessage
.
setCreateDate
(
new
Date
());
execute
.
setTaskExecute
(
this
.
getOperator
().
getUserId
());
bsnMessage
.
setTitle
(
map
.
get
(
"title"
)+
"[完成]"
);
execute
.
setTaskDescribe
(
"[完成]-待审核"
);
bsnMessage
.
setTaskDescribe
(
"请审批"
);
execute
.
setBusinessCode
(
"system"
);
bsnMessage
.
setExecutorUrl
((
String
)
map
.
get
(
"businessId"
));
execute
.
setActive
(
ActiveStatus
.
UNFINISHED
.
getValue
());
bsnMessage
.
setBusinessId
((
String
)
map
.
get
(
"executorUrl"
));
executes
.
add
(
execute
);
bsnMessages
.
add
(
bsnMessage
);
sponsor
.
setStatus
(
1
);
//发起人审核
sponsor
.
setExecutes
(
executes
);
//在同一个任务流程下创建一份发起人自己的审批任务
bsnMessageApplication
.
saveBsnMessageSponsor
(
sponsor
);
}
}
}
}
bsnMessageApplication
.
saveBsnMessage
(
bsnMessages
);
//获取任务执行人为当前用户的任务
//获取任务执行人为当前用户的任务
return
this
.
bsnMessageApplication
.
queryBsnMessage
();
return
this
.
bsnMessageApplication
.
query
Execute
BsnMessage
();
}
}
public
WorkflowApplicationImplOverride
()
{
public
WorkflowApplicationImplOverride
()
{
...
...
topsun/src/main/java/com/huigou/topsun/base/bsnMessage/appliction/BsnMessageApplication.java
View file @
9d798a9b
package
com
.
huigou
.
topsun
.
base
.
bsnMessage
.
appliction
;
package
com
.
huigou
.
topsun
.
base
.
bsnMessage
.
appliction
;
import
com.huigou.topsun.base.bsnMessage.domain.BsnMessage
;
import
com.huigou.topsun.base.bsnMessage.domain.BsnMessage
Execute
;
import
com.huigou.topsun.base.bsnMessage.domain.
query.BsnMessageQueryReques
t
;
import
com.huigou.topsun.base.bsnMessage.domain.
BsnMessageRejec
t
;
import
org.apache.poi.ss.formula.functions.T
;
import
com.huigou.topsun.base.bsnMessage.domain.BsnMessageSponsor
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
...
@@ -11,11 +11,29 @@ public interface BsnMessageApplication {
...
@@ -11,11 +11,29 @@ public interface BsnMessageApplication {
String
QUERY_XML_FILE_PATH
=
"config/topsun/base/bsnMessage.xml"
;
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
<
BsnMessageSponsor
>
queryFinishBsnMessageSponsor
();
List
<
BsnMessage
>
getBsnMessageByBusinessId
(
String
businessId
);
List
<
BsnMessage
>
getBsnMessageByListner
(
String
listner
);
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
;
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.QueryDescriptor
;
import
com.huigou.data.query.model.QueryModel
;
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.appliction.BsnMessageApplication
;
import
com.huigou.topsun.base.bsnMessage.domain.BsnMessage
;
import
com.huigou.topsun.base.bsnMessage.domain.*
;
import
com.huigou.topsun.base.bsnMessage.domain.query.BsnMessageQueryRequest
;
import
com.huigou.topsun.base.bsnMessage.repository.BsnMessageExecuteRepository
;
import
com.huigou.topsun.base.bsnMessage.repository.BsnMessageRepository
;
import
com.huigou.topsun.base.bsnMessage.repository.BsnMessageRejectRepository
;
import
com.huigou.topsun.base.coderule.application.CodeRuleApplication
;
import
com.huigou.topsun.base.bsnMessage.repository.BsnMessageSponsorRepository
;
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.uasp.bmp.common.application.BaseApplication
;
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.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
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.List
;
import
java.util.Map
;
import
java.util.Map
;
import
java.util.regex.Matcher
;
import
java.util.regex.Pattern
;
/**
/**
* 采购编号及合同编号编码规则
* 采购编号及合同编号编码规则
...
@@ -43,48 +25,81 @@ import java.util.regex.Pattern;
...
@@ -43,48 +25,81 @@ import java.util.regex.Pattern;
*/
*/
@Service
(
"bsnMessageApplication"
)
@Service
(
"bsnMessageApplication"
)
public
class
BsnMessageApplicationImpl
extends
BaseApplication
implements
BsnMessageApplication
{
public
class
BsnMessageApplicationImpl
extends
BaseApplication
implements
BsnMessageApplication
{
@Autowired
BsnMessageExecuteRepository
messageExecuteRepository
;
@Autowired
BsnMessageRejectRepository
messageRejectRepository
;
@Autowired
@Autowired
BsnMessageRepository
bsnMessageRepository
;
BsnMessageSponsorRepository
messageSponsorRepository
;
@Override
@Override
public
Map
<
String
,
Object
>
queryBsnMessage
()
{
public
Map
<
String
,
Object
>
query
Execute
BsnMessage
()
{
QueryDescriptor
queryDescriptor
=
this
.
sqlExecutorDao
.
getQuery
(
QUERY_XML_FILE_PATH
,
"queryBsnMessage"
);
QueryDescriptor
queryDescriptor
=
this
.
sqlExecutorDao
.
getQuery
(
QUERY_XML_FILE_PATH
,
"query
Execute
BsnMessage"
);
QueryModel
queryModel
=
new
QueryModel
();
QueryModel
queryModel
=
new
QueryModel
();
queryModel
.
setSql
(
queryDescriptor
.
getSql
());
queryModel
.
setSql
(
queryDescriptor
.
getSql
());
queryModel
.
setPageIndex
(
1
);
queryModel
.
setPageIndex
(
1
);
queryModel
.
setPageSize
(
10
);
queryModel
.
setPageSize
(
10
);
queryModel
.
setSortFieldName
(
"createDate"
);
queryModel
.
setSortFieldName
(
"createDate"
);
queryModel
.
setSortOrder
(
"desc"
);
queryModel
.
setSortOrder
(
"desc"
);
queryModel
.
putParam
(
"
listners
"
,
this
.
getOperator
().
getUserId
());
queryModel
.
putParam
(
"
taskExecute
"
,
this
.
getOperator
().
getUserId
());
return
this
.
sqlExecutorDao
.
executeSlicedQuery
(
queryModel
);
return
this
.
sqlExecutorDao
.
executeSlicedQuery
(
queryModel
);
}
}
@Override
@Override
public
List
<
Map
<
String
,
Object
>>
queryFinishBsnMessage
()
{
public
List
<
BsnMessageSponsor
>
queryFinishBsnMessageSponsor
()
{
QueryDescriptor
queryDescriptor
=
this
.
sqlExecutorDao
.
getQuery
(
QUERY_XML_FILE_PATH
,
"queryFinishBsnMessage"
);
QueryDescriptor
queryDescriptor
=
this
.
sqlExecutorDao
.
getQuery
(
QUERY_XML_FILE_PATH
,
"queryFinishBsnMessageSponsor"
);
QueryModel
queryModel
=
new
QueryModel
();
return
this
.
sqlExecutorDao
.
queryToList
(
queryDescriptor
.
getSql
(),
BsnMessageSponsor
.
class
,
this
.
getOperator
().
getUserId
());
queryModel
.
setSql
(
queryDescriptor
.
getSql
());
}
queryModel
.
setPageIndex
(
1
);
queryModel
.
setPageSize
(
10
);
queryModel
.
setSortFieldName
(
"createDate"
);
queryModel
.
setSortOrder
(
"desc"
);
public
void
saveBsnMessageSponsor
(
List
<
BsnMessageSponsor
>
all
){
queryModel
.
putParam
(
"taskSponsor"
,
this
.
getOperator
().
getUserId
());
messageSponsorRepository
.
save
(
all
);
Map
<
String
,
Object
>
map
=
this
.
sqlExecutorDao
.
executeSlicedQuery
(
queryModel
);
}
return
(
List
<
Map
<
String
,
Object
>>)
map
.
get
(
"Rows"
);
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
@Override
public
List
<
BsnMessage
>
getBsnMessageByBusinessId
(
String
busines
sId
)
{
public
List
<
BsnMessage
Execute
>
getExecuteByMsId
(
String
m
sId
)
{
return
bsnMessageRepository
.
findAllByBusinessId
(
busines
sId
);
return
messageExecuteRepository
.
findAllByMessageSponsorId
(
m
sId
);
}
}
@Override
@Override
public
List
<
BsnMessage
>
getBsnMessageByListner
(
String
listner
)
{
public
BsnMessageExecute
getExecuteByMeId
(
String
id
)
{
return
bsnMessageRepository
.
findAllByListners
(
listner
);
return
messageExecuteRepository
.
findOne
(
id
);
}
}
@Override
@Override
public
void
saveBsnMessage
(
List
<
BsnMessage
>
bsnMessages
)
{
public
List
<
BsnMessageReject
>
getRejectByMeId
(
String
meId
)
{
bsnMessageRepository
.
save
(
bsnMessages
);
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;
...
@@ -6,17 +6,18 @@ import org.hibernate.annotations.GenericGenerator;
import
javax.persistence.*
;
import
javax.persistence.*
;
import
java.io.Serializable
;
import
java.io.Serializable
;
import
java.util.Date
;
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
@Entity
@Data
@Data
public
class
BsnMessage
implements
Serializable
{
public
class
BsnMessage
Sponsor
implements
Serializable
{
/**
/**
*
id
*
*/
*/
@Id
@Id
@GeneratedValue
(
@GeneratedValue
(
...
@@ -29,34 +30,16 @@ public class BsnMessage implements Serializable {
...
@@ -29,34 +30,16 @@ public class BsnMessage implements Serializable {
private
String
id
;
private
String
id
;
/**
/**
* 任务
描述
* 任务
标题
*/
*/
private
String
title
;
private
String
title
;
/**
/**
* 任务发起人
* 任务发起人
*/
*/
@Column
(
name
=
"task_sponsor"
)
@Column
(
name
=
"task_sponsor"
)
private
String
taskSponsor
;
private
String
taskSponsor
;
/**
* 任务发起人
*/
@Column
(
name
=
"task_describe"
)
private
String
taskDescribe
;
/**
* 任务执行人
*/
private
String
listners
;
/**
* 业务应用类型
*/
@Column
(
name
=
"business_code"
)
private
String
businessCode
;
/**
/**
* 业务表单id
* 业务表单id
*/
*/
...
@@ -76,15 +59,19 @@ public class BsnMessage implements Serializable {
...
@@ -76,15 +59,19 @@ public class BsnMessage implements Serializable {
private
Date
finishedDate
;
private
Date
finishedDate
;
/**
/**
*任务执行地址
*
任务执行地址
*/
*/
@Column
(
name
=
"executor_url"
)
@Column
(
name
=
"executor_url"
)
private
String
executorUrl
;
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
;
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
;
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
org.springframework.data.jpa.repository.JpaRepository
;
import
java.util.List
;
import
java.util.List
;
public
interface
BsnMessageRepository
extends
JpaRepository
<
BsnMessage
,
String
>
{
public
interface
BsnMessageExecuteRepository
extends
JpaRepository
<
BsnMessageExecute
,
String
>
{
List
<
BsnMessage
>
findAllByBusinessId
(
String
BusinessId
);
List
<
BsnMessage
>
findAllByListners
(
String
listner
);
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;
...
@@ -4,11 +4,10 @@ package com.huigou.topsun.sap.nonProdApply.application.impl;
import
com.fasterxml.jackson.core.JsonProcessingException
;
import
com.fasterxml.jackson.core.JsonProcessingException
;
import
com.fasterxml.jackson.core.type.TypeReference
;
import
com.fasterxml.jackson.core.type.TypeReference
;
import
com.fasterxml.jackson.databind.ObjectMapper
;
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.ActiveStatus
;
import
com.huigou.topsun.base.bsnMessage.domain.BsnMessage
;
import
com.huigou.topsun.base.bsnMessage.domain.BsnMessageExecute
;
import
com.huigou.topsun.base.bsnMessage.repository.BsnMessageRepository
;
import
com.huigou.topsun.base.bsnMessage.domain.BsnMessageSponsor
;
import
com.huigou.topsun.proofing.domain.proofingApply.model.ProofingApplyProcess
;
import
com.huigou.topsun.sap.nonProdApply.application.NonProdApplyDeptApplication
;
import
com.huigou.topsun.sap.nonProdApply.application.NonProdApplyDeptApplication
;
import
com.huigou.topsun.sap.nonProdApply.domain.SapNonProdApplyDept
;
import
com.huigou.topsun.sap.nonProdApply.domain.SapNonProdApplyDept
;
...
@@ -27,7 +26,7 @@ public class NonProdApplyDeptApplicationImpl extends BaseApplication implements
...
@@ -27,7 +26,7 @@ public class NonProdApplyDeptApplicationImpl extends BaseApplication implements
@Autowired
@Autowired
NonProdApplyDeptRepository
nonProdApplyDeptRepository
;
NonProdApplyDeptRepository
nonProdApplyDeptRepository
;
@Autowired
@Autowired
BsnMessage
Repository
bsnMessageRepository
;
BsnMessage
Application
bsnMessageApplication
;
@Override
@Override
public
Map
<
String
,
Object
>
saveSapNonProdApplyDept
(
SDO
sdo
){
public
Map
<
String
,
Object
>
saveSapNonProdApplyDept
(
SDO
sdo
){
...
@@ -46,25 +45,33 @@ public class NonProdApplyDeptApplicationImpl extends BaseApplication implements
...
@@ -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
)
{
for
(
Map
<
String
,
String
>
stringMap
:
deptStaffList
)
{
BsnMessage
bsnMessage
=
new
BsnMessag
e
();
BsnMessage
Execute
messageExecute
=
new
BsnMessageExecut
e
();
String
userCode
=
stringMap
.
get
(
"userCode"
);
String
userCode
=
stringMap
.
get
(
"userCode"
);
String
deptName
=
stringMap
.
get
(
"deptName"
);
String
deptName
=
stringMap
.
get
(
"deptName"
);
String
deptCode
=
stringMap
.
get
(
"deptCode"
);
String
deptCode
=
stringMap
.
get
(
"deptCode"
);
bsnMessage
.
setTaskSponsor
(
this
.
getOperator
().
getUserId
());
bsnMessage
.
setListners
(
userCode
);
messageExecute
.
setTaskExecute
(
userCode
);
bsnMessage
.
setBusinessCode
(
deptCode
);
messageExecute
.
setBusinessCode
(
deptCode
);
bsnMessage
.
setActive
(
ActiveStatus
.
SAVED
.
getValue
());
messageExecute
.
setActive
(
ActiveStatus
.
SAVED
.
getValue
());
bsnMessage
.
setCreateDate
(
new
Date
());
messageExecute
.
setCreateDate
(
new
Date
());
bsnMessage
.
setTitle
(
"非产品/非本成品类物料"
);
messageExecute
.
setTaskDescribe
(
deptName
+
"部门数据维护"
);
bsnMessage
.
setTaskDescribe
(
deptName
+
"部门数据维护"
);
executeList
.
add
(
messageExecute
);
bsnMessage
.
setExecutorUrl
(
"sapNonProdApplyNext/fillInNonProdApplyDept.do"
);
bsnMessage
.
setBusinessId
(
nonProdApplyDept
.
getApplyDeptId
());
bsnMessageList
.
add
(
bsnMessage
);
}
}
bsnMessageRepository
.
save
(
bsnMessageList
);
bsnMessageSponsor
.
setExecutes
(
executeList
);
String
keyId
=
bsnMessageApplication
.
saveBsnMessageSponsor
(
bsnMessageSponsor
);
map
.
put
(
"applyDeptId"
,
nonProdApplyDept
.
getApplyDeptId
());
map
.
put
(
"applyDeptId"
,
nonProdApplyDept
.
getApplyDeptId
());
map
.
put
(
"keyId"
,
keyId
);
return
map
;
return
map
;
}
}
...
@@ -72,9 +79,9 @@ public class NonProdApplyDeptApplicationImpl extends BaseApplication implements
...
@@ -72,9 +79,9 @@ public class NonProdApplyDeptApplicationImpl extends BaseApplication implements
public
void
distributeSapNonProdApplyDept
(
SDO
sdo
)
{
public
void
distributeSapNonProdApplyDept
(
SDO
sdo
)
{
//将状态为保存为分发的全部修改为分发未完成
//将状态为保存为分发的全部修改为分发未完成
Map
<
String
,
Object
>
map
=
this
.
saveSapNonProdApplyDept
(
sdo
);
Map
<
String
,
Object
>
map
=
this
.
saveSapNonProdApplyDept
(
sdo
);
List
<
BsnMessage
>
nonProdApplyDeptList
=
bsnMessageRepository
.
findAllByBusinessId
((
String
)
map
.
get
(
"applyDept
Id"
));
List
<
BsnMessage
Execute
>
executes
=
bsnMessageApplication
.
getExecuteByMsId
((
String
)
map
.
get
(
"key
Id"
));
nonProdApplyDeptList
.
forEach
(
item
->
item
.
setActive
(
ActiveStatus
.
UNFINISHED
.
getValue
()));
executes
.
forEach
(
item
->
item
.
setActive
(
ActiveStatus
.
UNFINISHED
.
getValue
()));
bsnMessage
Repository
.
save
(
nonProdApplyDeptList
);
bsnMessage
Application
.
saveBsnMessageExecute
(
executes
);
}
}
@Override
@Override
...
@@ -94,6 +101,6 @@ public class NonProdApplyDeptApplicationImpl extends BaseApplication implements
...
@@ -94,6 +101,6 @@ public class NonProdApplyDeptApplicationImpl extends BaseApplication implements
one
.
setStatus
(
ActiveStatus
.
REJECTED
.
getValue
());
one
.
setStatus
(
ActiveStatus
.
REJECTED
.
getValue
());
nonProdApplyDeptRepository
.
save
(
one
);
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;
...
@@ -2,28 +2,17 @@ package com.huigou.topsun.sap.nonProdApply.controller;
import
com.huigou.cache.DictUtil
;
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.appliction.BsnMessageApplication
;
import
com.huigou.topsun.base.bsnMessage.domain.ActiveStatus
;
import
com.huigou.topsun.base.bsnMessage.domain.BsnMessageExecute
;
import
com.huigou.topsun.base.bsnMessage.domain.BsnMessage
;
import
com.huigou.topsun.base.bsnMessage.domain.BsnMessageReject
;
import
com.huigou.topsun.proofing.domain.workInstructionApply.model.WorkInstructionApply
;
import
com.huigou.topsun.sap.nonProdApply.application.NonProdApplyApplication
;
import
com.huigou.topsun.sap.nonProdApply.application.NonProdApplyApplication
;
import
com.huigou.topsun.sap.nonProdApply.application.NonProdApplyDeptApplication
;
import
com.huigou.topsun.sap.nonProdApply.application.NonProdApplyDeptApplication
;
import
com.huigou.topsun.sap.nonProdApply.domain.NonProdApplyBaseInfo
;
import
com.huigou.topsun.sap.nonProdApply.domain.NonProdApplyBaseInfo
;
import
com.huigou.topsun.sap.nonProdApply.domain.SapNonProdApplyDept
;
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.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.uasp.client.CommonController
;
import
com.huigou.util.SDO
;
import
com.huigou.util.SDO
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.domain.PageRequest
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.stereotype.Controller
;
import
java.util.*
;
import
java.util.*
;
...
@@ -35,6 +24,7 @@ public class NonProdApplyNextController extends CommonController {
...
@@ -35,6 +24,7 @@ public class NonProdApplyNextController extends CommonController {
protected
String
getPagePath
()
{
protected
String
getPagePath
()
{
return
"/biz/topsun/sap/nonProdApply/"
;
return
"/biz/topsun/sap/nonProdApply/"
;
}
}
@Autowired
@Autowired
NonProdApplyApplication
nonProdApplyApplication
;
NonProdApplyApplication
nonProdApplyApplication
;
@Autowired
@Autowired
...
@@ -43,41 +33,40 @@ public class NonProdApplyNextController extends CommonController {
...
@@ -43,41 +33,40 @@ public class NonProdApplyNextController extends CommonController {
BsnMessageApplication
bsnMessageApplication
;
BsnMessageApplication
bsnMessageApplication
;
public
String
forwardNonProdApplyNext
()
{
public
String
forwardNonProdApplyNext
(){
SDO
sdo
=
this
.
getSDO
();
SDO
sdo
=
this
.
getSDO
();
String
id
=
sdo
.
getBizId
();
String
id
=
sdo
.
getBizId
();
this
.
putAttribute
(
"active"
,
ActiveStatus
.
UNFINISHED
.
getValue
()
);
//定义流程环节的id
//
this.putAttribute("active", ActiveStatus.UNFINISHED.getValue() );//定义流程环节的id
NonProdApplyBaseInfo
nonProdApplyBaseInfo
=
nonProdApplyApplication
.
loadNonProdApplyBaseInfoById
(
id
);
NonProdApplyBaseInfo
nonProdApplyBaseInfo
=
nonProdApplyApplication
.
loadNonProdApplyBaseInfoById
(
id
);
return
forward
(
"nonProdApplyNext"
,
nonProdApplyBaseInfo
);
return
forward
(
"nonProdApplyNext"
,
nonProdApplyBaseInfo
);
}
}
//部门相关
//部门相关
public
String
slicedDeptList
(){
public
String
slicedDeptList
()
{
SDO
sdo
=
this
.
getSDO
();
SDO
sdo
=
this
.
getSDO
();
String
septString
=
sdo
.
getString
(
"dept"
);
String
septString
=
sdo
.
getString
(
"dept"
);
// String applyDeptId = sdo.getString("applyDeptId");
// String applyDeptId = sdo.getString("applyDeptId");
// List<BsnMessage> bsnMessageAll = bsnMessageApplication.getBsnMessageByBusinessId(applyDeptId);
// List<BsnMessage> bsnMessageAll = bsnMessageApplication.getBsnMessageByBusinessId(applyDeptId);
List
<
String
>
deptList
=
Arrays
.
asList
(
septString
.
split
(
","
));
List
<
String
>
deptList
=
Arrays
.
asList
(
septString
.
split
(
","
));
Map
<
String
,
String
>
serviceusage
=
DictUtil
.
getDictionary
(
"serviceusage"
);
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
<>();
List
<
HashMap
<
String
,
String
>>
list
=
new
ArrayList
<>();
for
(
String
key
:
deptList
)
{
for
(
String
key
:
deptList
)
{
HashMap
<
String
,
String
>
resultMap
=
new
HashMap
<>();
HashMap
<
String
,
String
>
resultMap
=
new
HashMap
<>();
String
value
=
serviceusage
.
get
(
key
);
String
value
=
serviceusage
.
get
(
key
);
resultMap
.
put
(
"deptCode"
,
key
);
resultMap
.
put
(
"deptCode"
,
key
);
resultMap
.
put
(
"deptName"
,
value
);
resultMap
.
put
(
"deptName"
,
value
);
list
.
add
(
resultMap
);
list
.
add
(
resultMap
);
}
}
map
.
put
(
"Rows"
,
list
);
map
.
put
(
"Rows"
,
list
);
return
toResult
(
map
);
return
toResult
(
map
);
}
}
/**
/**
* 添加
* 添加
*/
*/
public
String
saveSapNonProdApplyDept
(){
public
String
saveSapNonProdApplyDept
()
{
SDO
sdo
=
this
.
getSDO
();
SDO
sdo
=
this
.
getSDO
();
Map
<
String
,
Object
>
map
=
nonProdApplyDeptApplication
.
saveSapNonProdApplyDept
(
sdo
);
Map
<
String
,
Object
>
map
=
nonProdApplyDeptApplication
.
saveSapNonProdApplyDept
(
sdo
);
return
toResult
(
map
);
return
toResult
(
map
);
...
@@ -87,7 +76,7 @@ public class NonProdApplyNextController extends CommonController {
...
@@ -87,7 +76,7 @@ public class NonProdApplyNextController extends CommonController {
/**
/**
* 分发表单
* 分发表单
*/
*/
public
String
distributeSapNonProdApplyDept
(){
public
String
distributeSapNonProdApplyDept
()
{
SDO
sdo
=
this
.
getSDO
();
SDO
sdo
=
this
.
getSDO
();
nonProdApplyDeptApplication
.
distributeSapNonProdApplyDept
(
sdo
);
nonProdApplyDeptApplication
.
distributeSapNonProdApplyDept
(
sdo
);
return
success
();
return
success
();
...
@@ -95,22 +84,33 @@ public class NonProdApplyNextController extends CommonController {
...
@@ -95,22 +84,33 @@ public class NonProdApplyNextController extends CommonController {
/**
/**
* 填写收到的任务表单
* 填写收到的任务表单
*
* @return
* @return
*/
*/
public
String
fillInNonProdApplyDept
(){
public
String
fillInNonProdApplyDept
()
{
SDO
sdo
=
this
.
getSDO
();
SDO
sdo
=
this
.
getSDO
();
String
id
=
sdo
.
getBizId
();
String
bizId
=
sdo
.
getBizId
();
String
active
=
sdo
.
getString
(
"active"
);
String
meId
=
sdo
.
getString
(
"taskId"
);
String
taskSponsor
=
sdo
.
getString
(
"taskSponsor"
);
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"
);
Map
<
String
,
String
>
map
=
DictUtil
.
getDictionary
(
"serviceusage"
);
this
.
putAttribute
(
"bu"
,
map
);
this
.
putAttribute
(
"bu"
,
map
);
this
.
putAttribute
(
"isReadOnly"
,
"false"
);
return
forward
(
"nonProdApplyNext"
,
nonProdApplyDept
);
this
.
putAttribute
(
"active"
,
active
);
this
.
putAttribute
(
"taskSponsor"
,
taskSponsor
);
SapNonProdApplyDept
nonProdApplyDept
=
nonProdApplyDeptApplication
.
getNonProdApplyDeptById
(
id
);
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")
// @EasySearch(queryName = "userNameSelect")
// public Map<String, Object> queryResourceNameGroup(SDO sdo){
// public Map<String, Object> queryResourceNameGroup(SDO sdo){
...
@@ -136,9 +136,10 @@ public class NonProdApplyNextController extends CommonController {
...
@@ -136,9 +136,10 @@ public class NonProdApplyNextController extends CommonController {
// }
// }
public
void
rejectNonProdApplyDept
(){
public
void
rejectNonProdApplyDept
()
{
SDO
sdo
=
this
.
getSDO
();
SDO
sdo
=
this
.
getSDO
();
String
septString
=
sdo
.
getString
(
"dept"
);
String
septString
=
sdo
.
getString
(
"dept"
);
String
meId
=
sdo
.
getString
(
"meId"
);
//可以根据meId 获取msId ,根据msId获取所有的持有该任务的部门
//需要被驳回的部门
//需要被驳回的部门
List
<
String
>
deptList
=
Arrays
.
asList
(
septString
.
split
(
","
));
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"?>
<?xml version="1.0" encoding="UTF-8"?>
<query-mappings>
<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>
<sql-query>
select t.*,b.*
SELECT t.id,t.message_sponsor_id,t.task_execute,t.business_code,t.create_date,t.finished_date,t.active,
from bsn_message t
CASE WHEN t.active = 3 THEN CONCAT(t.task_describe, '[驳回]') ELSE t.task_describe END AS task_describe,
left join bsn_message_detail b
t2.title,
on(t.id=b.bsn_message_id)
t2.executor_url,
from bsn_message t where t.active=0
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>
</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>
<query
name=
"queryFinishBsnMessage"
label=
"bsn业务人员表"
table=
"bsn_message"
>
<query
name=
"queryFinishBsnMessage
Sponsor
"
label=
"bsn业务人员表"
table=
"bsn_message"
>
<sql-query>
<sql-query>
SELECT business_id,executor_url,title
SELECT t.*
FROM bsn_message
FROM bsn_message_sponsor t
WHERE task_sponsor = ?
WHERE t.task_sponsor = ?
GROUP BY business_id,executor_url,title
AND NOT EXISTS (
HAVING COUNT(DISTINCT active) = 1 AND MIN(active) = 1;
SELECT 1
FROM bsn_message_execute t2
WHERE t2.message_sponsor_id = t.id
AND t2.active != 1
)
</sql-query>
</sql-query>
</query>
</query>
</query-mappings>
</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