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
9a622ea0
Commit
9a622ea0
authored
Jan 19, 2024
by
覃振观
👶
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev' into dev
parents
5d5b5826
93f6728b
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
752 additions
and
423 deletions
+752
-423
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
DefinitionHomepageTaskData.java
...va/com/huigou/topsun/base/DefinitionHomepageTaskData.java
+56
-0
WorkflowApplicationImplOverride.java
...m/huigou/topsun/base/WorkflowApplicationImplOverride.java
+23
-19
BsnMessageApplication.java
...sun/base/bsnMessage/appliction/BsnMessageApplication.java
+35
-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
WorkInstructionBaseInfo.java
...domain/workInstruction/model/WorkInstructionBaseInfo.java
+1
-0
SapCostReimbursementApplicationImpl.java
...application/impl/SapCostReimbursementApplicationImpl.java
+10
-3
SapCostReimbursementController.java
...mbursement/controller/SapCostReimbursementController.java
+8
-0
NonProdApplyDeptApplicationImpl.java
...ply/application/impl/NonProdApplyDeptApplicationImpl.java
+29
-22
NonProdApplyNextController.java
...p/nonProdApply/controller/NonProdApplyNextController.java
+36
-35
SapStatsIndicatorsApplicationImpl.java
...s/application/impl/SapStatsIndicatorsApplicationImpl.java
+2
-3
MyBaseUtil.java
topsun/src/main/java/com/huigou/topsun/util/MyBaseUtil.java
+5
-2
bsnMessage.xml
topsun/src/main/resources/config/topsun/base/bsnMessage.xml
+20
-13
No files found.
.idea/mybatisx/templates.xml
View file @
9a622ea0
...
...
@@ -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 @
9a622ea0
...
...
@@ -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 @
9a622ea0
...
...
@@ -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 @
9a622ea0
This diff is collapsed.
Click to expand it.
topsun/src/main/java/com/huigou/topsun/base/DefinitionHomepageTaskData.java
0 → 100644
View file @
9a622ea0
package
com
.
huigou
.
topsun
.
base
;
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.BsnMessageSponsor
;
import
com.huigou.uasp.bmp.common.application.BaseApplication
;
import
org.aspectj.lang.annotation.Around
;
import
org.aspectj.lang.annotation.Aspect
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
import
java.util.*
;
/**
* 自定义主页"专项任务"板块展示数据
*/
@Aspect
@Component
public
class
DefinitionHomepageTaskData
extends
BaseApplication
{
@Autowired
BsnMessageApplication
bsnMessageApplication
;
/**
* 替换原方法方法体
* 主页专项任务数据替换为自定义数据
* @return 当前用户的”专项任务“数据
*/
@Around
(
"execution(public java.util.Map<String, Object> com.huigou.uasp.bpm.engine.application.impl.WorkflowApplicationImpl.queryTrackingTasks())"
)
public
Map
<
String
,
Object
>
replaceQueryTrackingTasks
(){
// 当前登录用户是否以任务发起人的身份发起过任务
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
);
}
}
}
//获取任务执行人为当前用户的任务
return
this
.
bsnMessageApplication
.
queryExecuteBsnMessage
();
}
}
topsun/src/main/java/com/huigou/topsun/base/WorkflowApplicationImplOverride.java
View file @
9a622ea0
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 @
9a622ea0
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,38 @@ public interface BsnMessageApplication {
String
QUERY_XML_FILE_PATH
=
"config/topsun/base/bsnMessage.xml"
;
Map
<
String
,
Object
>
queryBsnMessage
();
/**
* 获取当前登录用户未完成或被驳回的任务
* @return 任务执行的详细信息集合
*/
Map
<
String
,
Object
>
queryExecuteBsnMessage
();
List
<
Map
<
String
,
Object
>>
queryFinishBsnMessage
();
List
<
BsnMessage
>
getBsnMessageByBusinessId
(
String
businessId
);
List
<
BsnMessage
>
getBsnMessageByListner
(
String
listner
);
/**
* 当前登录用户是否以任务发起人的身份发起过任务如果有
* 且分发到的各单位已完成处理,则返回该任务
* @return 任务发起的详细信息集合
*/
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 @
9a622ea0
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 @
9a622ea0
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 @
9a622ea0
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 @
9a622ea0
...
...
@@ -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 @
9a622ea0
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 @
9a622ea0
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 @
9a622ea0
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/proofing/domain/workInstruction/model/WorkInstructionBaseInfo.java
View file @
9a622ea0
package
com
.
huigou
.
topsun
.
proofing
.
domain
.
workInstruction
.
model
;
import
com.fasterxml.jackson.annotation.JsonIgnore
;
import
lombok.Data
;
import
org.hibernate.annotations.GenericGenerator
;
...
...
topsun/src/main/java/com/huigou/topsun/sap/costReimbursement/application/impl/SapCostReimbursementApplicationImpl.java
View file @
9a622ea0
...
...
@@ -31,6 +31,7 @@ import org.springframework.transaction.annotation.Transactional;
import
java.util.ArrayList
;
import
java.util.Base64
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -175,14 +176,13 @@ public class SapCostReimbursementApplicationImpl extends FlowBroker implements S
//封装参数
// 封装参数
// for (SapStatsIndicatorsDetail sapStatsIndicatorsDetail : all) {
// Map<String, Object> detailMap = objectMapper.convertValue(sapStatsIndicatorsDetail, Map.class);
// map.put("ITEM", detailMap);
// list.add(map);
// }
//
// String url = "cud_kb31n/kb31n";
// SapStatsIndicatorsResult sapStatsIndicatorsResult = null;
// try {
...
...
@@ -209,4 +209,11 @@ public class SapCostReimbursementApplicationImpl extends FlowBroker implements S
// }
}
public
static
void
main
(
String
[]
args
)
{
// post.setHeader("Content-type", "application/json;charset=utf-8");
String
usernameAndPassword
=
"rest_user:Bsn123456"
;
System
.
out
.
println
(
"Authorization"
);
System
.
out
.
println
(
"Basic "
+
Base64
.
getEncoder
().
encodeToString
(
usernameAndPassword
.
getBytes
()));
}
}
\ No newline at end of file
topsun/src/main/java/com/huigou/topsun/sap/costReimbursement/controller/SapCostReimbursementController.java
View file @
9a622ea0
...
...
@@ -101,4 +101,12 @@ public class SapCostReimbursementController extends CommonController {
// sapStatsIndicatorsApplication.sendSapDate(id);
// return success();
// }
public
String
paymentReceipt
(){
SDO
sdo
=
this
.
getSDO
();
String
id
=
sdo
.
getBizId
();
return
null
;
}
}
\ No newline at end of file
topsun/src/main/java/com/huigou/topsun/sap/nonProdApply/application/impl/NonProdApplyDeptApplicationImpl.java
View file @
9a622ea0
...
...
@@ -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 @
9a622ea0
...
...
@@ -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/java/com/huigou/topsun/sap/statsIndicators/application/impl/SapStatsIndicatorsApplicationImpl.java
View file @
9a622ea0
...
...
@@ -186,10 +186,10 @@ public class SapStatsIndicatorsApplicationImpl extends FlowBroker implements Sap
List
<
SapStatsIndicatorsDetail
>
all
=
sapStatsIndicatorsDetailRepository
.
findAllByStatsIndicatorsId
(
bizId
);
List
<
Map
<
String
,
Object
>>
list
=
new
ArrayList
<>();
ObjectMapper
objectMapper
=
new
ObjectMapper
();
Map
<
String
,
Object
>
map
=
MyBaseUtil
.
convertToMap
(
sapStatsIndicators
,
fals
e
);
Map
<
String
,
Object
>
map
=
MyBaseUtil
.
convertToMap
(
sapStatsIndicators
,
tru
e
);
//封装参数
for
(
SapStatsIndicatorsDetail
sapStatsIndicatorsDetail
:
all
)
{
Map
<
String
,
Object
>
detailMap
=
objectMapper
.
convertValue
(
sapStatsIndicatorsDetail
,
Map
.
class
);
Map
<
String
,
Object
>
detailMap
=
MyBaseUtil
.
convertToMap
(
sapStatsIndicatorsDetail
,
true
);
map
.
put
(
"ITEM"
,
detailMap
);
list
.
add
(
map
);
}
...
...
@@ -218,5 +218,4 @@ public class SapStatsIndicatorsApplicationImpl extends FlowBroker implements Sap
sapStatsIndicatorsResultRepository
.
save
(
sapStatsIndicatorsResult
);
}
}
}
\ No newline at end of file
topsun/src/main/java/com/huigou/topsun/util/MyBaseUtil.java
View file @
9a622ea0
package
com
.
huigou
.
topsun
.
util
;
import
com.fasterxml.jackson.annotation.JsonIgnore
;
import
com.huigou.topsun.proofing.domain.vo.WorkInstructionVo
;
import
com.huigou.topsun.proofing.domain.workInstruction.model.WorkInstructionBaseInfo
;
import
com.huigou.topsun.proofing.domain.workInstruction.model.WorkInstructionMaterialInfo
;
...
...
@@ -103,7 +104,7 @@ public class MyBaseUtil {
}
/**
*
处理
Bean的非空属性,并将其添加到Map中。
*
剔除
Bean的非空属性,并将其添加到Map中。
* 排除class属性。
*
* @param bean 要处理的Bean对象
...
...
@@ -127,7 +128,7 @@ public class MyBaseUtil {
/**
* 将一个对象转换为Map同时忽略它的基类
*
*
JsonIgnore 忽略被该注解修饰的字段
* @param object 要转换的对象
* @param useAnnoKey 是否使用注解的值作为Map的key
* @return 包含对象所有字段名和值的Map
...
...
@@ -136,6 +137,7 @@ public class MyBaseUtil {
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
Class
<?>
clazz
=
object
.
getClass
();
Arrays
.
stream
(
clazz
.
getDeclaredFields
())
.
filter
(
field
->
!
field
.
isAnnotationPresent
(
JsonIgnore
.
class
))
.
forEach
(
field
->
{
field
.
setAccessible
(
true
);
try
{
...
...
@@ -180,6 +182,7 @@ public class MyBaseUtil {
MyBaseUtil
.
mergeObjects
(
workInstructionVo
,
workInstructionMaterialInfo
,
workInstructionBaseInfo
,
null
);
Map
<
String
,
Object
>
map
=
MyBaseUtil
.
convertBeansToMap
(
workInstructionMaterialInfo
);
System
.
out
.
println
(
map
);
MyBaseUtil
.
processNonNullProperties
(
workInstructionBaseInfo
,
map
);
...
...
topsun/src/main/resources/config/topsun/base/bsnMessage.xml
View file @
9a622ea0
<?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