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
6e39b724
Commit
6e39b724
authored
Feb 27, 2024
by
刘学辉
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
付款申请和客户退款申请,物料申请的部门信息加载和保存
parent
f53c9246
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
137 additions
and
257 deletions
+137
-257
costReimbursementList.js
...biz/topsun/sap/costReimbursement/costReimbursementList.js
+16
-3
payApply.js
.../main/webapp/biz/topsun/sap/costReimbursement/payApply.js
+34
-129
payApply.jsp
...main/webapp/biz/topsun/sap/costReimbursement/payApply.jsp
+2
-4
refundApply.js
...in/webapp/biz/topsun/sap/costReimbursement/refundApply.js
+26
-104
refundApply.jsp
...n/webapp/biz/topsun/sap/costReimbursement/refundApply.jsp
+5
-4
nonProdApplyNext.js
...in/webapp/biz/topsun/sap/nonProdApply/nonProdApplyNext.js
+3
-5
nonProdApplyNext.jsp
...n/webapp/biz/topsun/sap/nonProdApply/nonProdApplyNext.jsp
+1
-0
NonProdApplyDeptApplication.java
...nonProdApply/application/NonProdApplyDeptApplication.java
+2
-1
NonProdApplyApplicationImpl.java
...odApply/application/impl/NonProdApplyApplicationImpl.java
+10
-2
NonProdApplyDeptApplicationImpl.java
...ply/application/impl/NonProdApplyDeptApplicationImpl.java
+5
-0
NonProdApplyNextController.java
...p/nonProdApply/controller/NonProdApplyNextController.java
+24
-1
NonProdApplyBaseInfo.java
.../topsun/sap/nonProdApply/domain/NonProdApplyBaseInfo.java
+5
-4
NonProdApplyDeptRepository.java
...p/nonProdApply/repository/NonProdApplyDeptRepository.java
+4
-0
No files found.
topsun-xt/src/main/webapp/biz/topsun/sap/costReimbursement/costReimbursementList.js
View file @
6e39b724
...
...
@@ -58,7 +58,7 @@ function loadGrid() {
fixedCellHeight
:
true
,
selectRowButtonOnly
:
true
,
onDblClickRow
:
function
(
data
,
rowindex
,
rowobj
)
{
doView
(
data
.
id
);
doView
(
data
.
id
,
data
.
zepFtype
);
}
});
...
...
@@ -139,10 +139,23 @@ function deleteHandler() {
function
doView
(
id
)
{
function
doView
(
id
,
zepFtype
)
{
var
title
=
"费用报销详情"
;
if
(
zepFtype
==
"E"
){
title
=
"客户退款申请详情"
;
}
if
(
zepFtype
==
"B"
){
title
=
"员工借款申请详情"
;
}
if
(
zepFtype
==
"D"
){
title
=
"预付款申请详情"
;
}
if
(
zepFtype
==
"C"
){
title
=
"付款申请详情"
;
}
UICtrl
.
addTabItem
({
tabid
:
'showCostReimbursement'
+
id
,
text
:
"费用报销详情"
,
text
:
title
,
url
:
web_app
.
name
+
'/sapCostReimbursement/showSapCostReimbursement.do?bizId='
+
id
+
"&isDetailPage=true"
});
}
...
...
topsun-xt/src/main/webapp/biz/topsun/sap/costReimbursement/payApply.js
View file @
6e39b724
...
...
@@ -28,7 +28,6 @@ var tableArray = [
{
display
:
"BP标识"
,
name
:
"zepBptype"
,
width
:
120
,
minwidth
:
120
,
type
:
"string"
,
align
:
"left"
,
editor
:
{
type
:
'text'
}
},
...
...
@@ -75,15 +74,15 @@ var tableArray = [
}
},
{
display
:
"
费用类型代码"
,
name
:
"zepExtype
"
,
width
:
120
,
minwidth
:
120
,
type
:
"string"
,
align
:
"left"
,
display
:
"
采购发票号"
,
name
:
"BELNR2
"
,
width
:
120
,
minwidth
:
120
,
type
:
"string"
,
align
:
"left"
,
editor
:
{
type
:
'text'
}
},
{
display
:
"
费用类型名称
"
,
name
:
"
zepExtypename
"
,
display
:
"
采购发票行
"
,
name
:
"
BUZEI
"
,
width
:
120
,
minwidth
:
120
,
type
:
"string"
,
...
...
@@ -94,49 +93,7 @@ var tableArray = [
}
},
{
display
:
"费用会计科目"
,
name
:
"hkont"
,
width
:
120
,
minwidth
:
120
,
type
:
"string"
,
align
:
"left"
,
editor
:
{
type
:
'text'
}
},
{
display
:
"总账科目描述"
,
name
:
"txt50"
,
width
:
120
,
minwidth
:
120
,
type
:
"string"
,
align
:
"left"
,
editor
:
{
type
:
'text'
}
},
{
display
:
"计划付款日期"
,
name
:
"zepFpldate"
,
width
:
120
,
minwidth
:
120
,
type
:
"string"
,
align
:
"left"
,
editor
:
{
type
:
'date'
}
},
{
display
:
"成本中心"
,
name
:
"kostl"
,
width
:
120
,
minwidth
:
120
,
type
:
"string"
,
align
:
"left"
,
editor
:
{
type
:
'text'
}
},
{
display
:
"成本中心名称"
,
name
:
"ktext1"
,
width
:
120
,
minwidth
:
120
,
type
:
"string"
,
align
:
"left"
,
editor
:
{
type
:
'text'
}
},
{
display
:
"内部订单"
,
name
:
"aufnr"
,
width
:
120
,
minwidth
:
120
,
type
:
"string"
,
align
:
"left"
,
editor
:
{
type
:
'text'
}
},
{
display
:
"内部订单描述"
,
name
:
"ktext"
,
width
:
120
,
minwidth
:
120
,
type
:
"string"
,
align
:
"left"
,
display
:
"采购发票行信息"
,
name
:
"ZRSEG_ITEM"
,
width
:
120
,
minwidth
:
120
,
type
:
"string"
,
align
:
"left"
,
editor
:
{
type
:
'text'
...
...
@@ -156,20 +113,7 @@ var tableArray = [
type
:
'text'
}
},
{
display
:
"不含税金额"
,
name
:
"netwr"
,
width
:
120
,
minwidth
:
120
,
type
:
"string"
,
align
:
"left"
,
editor
:
{
type
:
'text'
}
},
{
display
:
"税额"
,
name
:
"kwetr"
,
width
:
120
,
minwidth
:
120
,
type
:
"string"
,
align
:
"left"
,
editor
:
{
type
:
'text'
}
},
{
display
:
"含税金额"
,
name
:
"kzwi1"
,
width
:
120
,
minwidth
:
120
,
type
:
"string"
,
align
:
"left"
,
editor
:
{
...
...
@@ -177,34 +121,13 @@ var tableArray = [
type
:
'text'
}
},
{
display
:
"税码"
,
name
:
"mwskz"
,
width
:
120
,
minwidth
:
120
,
type
:
"string"
,
align
:
"left"
,
editor
:
{
type
:
'text'
}
},
{
display
:
"不含税金额(本位币)"
,
name
:
"netwr1"
,
width
:
120
,
minwidth
:
120
,
type
:
"string"
,
align
:
"left"
,
editor
:
{
type
:
'text'
}
},
{
display
:
"税额(本位币)"
,
name
:
"kwetr1"
,
width
:
120
,
minwidth
:
120
,
type
:
"string"
,
align
:
"left"
,
editor
:
{
type
:
'text'
}
},
{
display
:
"含税金额(本位币)"
,
name
:
"kzwi11"
,
width
:
120
,
minwidth
:
120
,
type
:
"string"
,
align
:
"left"
,
editor
:
{
type
:
'text'
}
}
,
}
]
},
{
parms
:
{},
...
...
@@ -220,25 +143,6 @@ var tableArray = [
type
:
'text'
}
},
{
display
:
"不含税金额(审批)"
,
name
:
"zepPdamount1"
,
width
:
120
,
minwidth
:
120
,
type
:
"string"
,
align
:
"left"
,
editor
:
{
type
:
'text'
}
},
{
display
:
"税额(审批)"
,
name
:
"zepPdtax1"
,
width
:
120
,
minwidth
:
120
,
type
:
"string"
,
align
:
"left"
,
editor
:
{
type
:
'text'
}
},
{
display
:
"含税金额(审批)"
,
name
:
"zepPtdamount1"
,
...
...
@@ -251,30 +155,6 @@ var tableArray = [
type
:
'text'
}
},
{
display
:
"不含税金额(审批-本位币)"
,
name
:
"zepPdamount"
,
width
:
120
,
minwidth
:
120
,
type
:
"string"
,
align
:
"left"
,
editor
:
{
type
:
'text'
}
},
{
display
:
"税额(审批-本位币)"
,
name
:
"zepPdtax"
,
width
:
120
,
minwidth
:
120
,
type
:
"string"
,
align
:
"left"
,
editor
:
{
type
:
'text'
}
},
{
display
:
"含税金额(审批-本位币)"
,
name
:
"zepPtdamount"
,
...
...
@@ -311,10 +191,9 @@ var tableArray = [
{
display
:
"直联付款标识"
,
name
:
"zepBank"
,
width
:
120
,
minwidth
:
120
,
type
:
"string"
,
align
:
"left"
,
editor
:
{
type
:
'text'
}
}
,
}
]
},
{
parms
:
{},
...
...
@@ -387,7 +266,10 @@ function loadGrid(obj) {
toolbarOptions
=
UICtrl
.
getDefaultToolbarOptions
({
addHandler
:
function
()
{
tableArray
.
forEach
((
item
)
=>
{
UICtrl
.
addGridRow
(
item
.
gridManager
,
{
zepItemno
:
getZepItemNo
()});
// alert(item.node);
if
(
item
.
node
==
"reimbursementApplierGrid"
)
{
UICtrl
.
addGridRow
(
item
.
gridManager
,
{
zepItemno
:
getZepItemNo
(),
zepBptype
:
"K"
});
}
});
},
deleteHandler
:
function
()
{
...
...
@@ -412,6 +294,7 @@ function loadGrid(obj) {
checkbox
:
true
,
fixedCellHeight
:
true
,
selectRowButtonOnly
:
true
,
onAfterEdit
:
totalMoney
,
onBeforeCheckRow
:
function
(
checked
,
data
)
{
debugger
//同时选定或取消所有表格中的对应行
...
...
@@ -451,7 +334,24 @@ function loadGrid(obj) {
UICtrl
.
setSearchAreaToggle
(
obj
.
gridManager
);
}
function
totalMoney
(
data
)
{
// alert(data.column.name);
// debugger
// data=data.record;
var
totals
=
0
;
if
(
data
.
column
.
name
==
"kzwi1"
)
{
var
rows
=
tableArray
[
0
].
gridManager
.
rows
;
if
(
rows
)
{
for
(
var
i
in
rows
)
{
var
list
=
rows
[
i
];
if
(
list
.
kzwi1
)
{
// alert(list.kzwi1);
totals
=
accAdd
(
totals
,
list
.
kzwi1
);
}
}
}
$
(
"#zepFtamount1"
).
val
(
totals
);
}
}
$
(
document
).
ready
(
function
()
{
initialize
();
...
...
@@ -477,6 +377,11 @@ function initialize() {
});
useArrayTable
(
loadGrid
);
})
$
(
"#zepFtypename"
).
val
(
"付款申请流程"
);
$
(
"#zepFtype"
).
val
(
"C"
);
$
(
"#butxt"
).
val
(
"广州市宝绅科技应用有限公司"
);
$
(
"#bukrs"
).
val
(
"1000"
);
}
...
...
topsun-xt/src/main/webapp/biz/topsun/sap/costReimbursement/payApply.jsp
View file @
6e39b724
<%@ page
language=
"java"
contentType=
"text/html; charset=utf-8"
%>
<%@taglib
uri=
"/WEB-INF/taglib.tld"
prefix=
"x"
%>
<%@ taglib
uri=
"http://java.sun.com/jsp/jstl/core"
prefix=
"c"
%>
<html>
<head>
<x:base
include=
"layout,dialog,grid,tree,combox,commonTree,date"
/>
<x:script
src=
'/javaScript/math.js'
/>
<x:script
src=
'/biz/topsun/sap/costReimbursement/payApply.js'
/>
</head>
<body>
...
...
@@ -43,13 +45,9 @@
fieldCol=
"2"
/>
<x:inputC
name=
"zepTxt"
required=
"false"
label=
"付款申请内容"
labelCol=
"2"
fieldCol=
"2"
/>
<x:inputC
name=
"zepFtamount"
required=
"false"
label=
"申请总金额(本位币)"
labelCol=
"2"
fieldCol=
"2"
/>
<x:inputC
name=
"zepFttax"
required=
"false"
label=
"申请总税额(本位币)"
labelCol=
"2"
fieldCol=
"2"
/>
<x:inputC
name=
"zepFtamount1"
required=
"false"
label=
"申请总金额"
labelCol=
"2"
fieldCol=
"2"
/>
<x:inputC
name=
"zepFttax1"
required=
"false"
label=
"申请总税额"
labelCol=
"2"
fieldCol=
"2"
/>
<x:inputC
name=
"zepPtamount"
required=
"false"
label=
"审批总金额(本位币)"
labelCol=
"2"
fieldCol=
"2"
/>
<x:inputC
name=
"zepPttax"
required=
"false"
label=
" 审批总税额(本位币)"
labelCol=
"2"
fieldCol=
"2"
/>
<x:inputC
name=
"zepPtamount1"
required=
"false"
label=
"审批总金额"
labelCol=
"2"
fieldCol=
"2"
/>
<x:inputC
name=
"zepPttax1"
required=
"false"
label=
"审批总税额"
labelCol=
"2"
fieldCol=
"2"
/>
</div>
</div>
...
...
topsun-xt/src/main/webapp/biz/topsun/sap/costReimbursement/refundApply.js
View file @
6e39b724
...
...
@@ -74,74 +74,6 @@ var tableArray = [
type
:
'text'
}
},
{
display
:
"费用类型代码"
,
name
:
"zepExtype"
,
width
:
120
,
minwidth
:
120
,
type
:
"string"
,
align
:
"left"
,
editor
:
{
type
:
'text'
}
},
{
display
:
"费用类型名称"
,
name
:
"zepExtypename"
,
width
:
120
,
minwidth
:
120
,
type
:
"string"
,
align
:
"left"
,
editor
:
{
type
:
'text'
}
},
{
display
:
"费用会计科目"
,
name
:
"hkont"
,
width
:
120
,
minwidth
:
120
,
type
:
"string"
,
align
:
"left"
,
editor
:
{
type
:
'text'
}
},
{
display
:
"总账科目描述"
,
name
:
"txt50"
,
width
:
120
,
minwidth
:
120
,
type
:
"string"
,
align
:
"left"
,
editor
:
{
type
:
'text'
}
},
{
display
:
"计划付款日期"
,
name
:
"zepFpldate"
,
width
:
120
,
minwidth
:
120
,
type
:
"string"
,
align
:
"left"
,
editor
:
{
type
:
'date'
}
},
{
display
:
"成本中心"
,
name
:
"kostl"
,
width
:
120
,
minwidth
:
120
,
type
:
"string"
,
align
:
"left"
,
editor
:
{
type
:
'text'
}
},
{
display
:
"成本中心名称"
,
name
:
"ktext1"
,
width
:
120
,
minwidth
:
120
,
type
:
"string"
,
align
:
"left"
,
editor
:
{
type
:
'text'
}
},
{
display
:
"内部订单"
,
name
:
"aufnr"
,
width
:
120
,
minwidth
:
120
,
type
:
"string"
,
align
:
"left"
,
editor
:
{
type
:
'text'
}
},
{
display
:
"内部订单描述"
,
name
:
"ktext"
,
width
:
120
,
minwidth
:
120
,
type
:
"string"
,
align
:
"left"
,
editor
:
{
type
:
'text'
}
},
{
display
:
"币别"
,
name
:
"waers"
,
width
:
120
,
minwidth
:
120
,
type
:
"string"
,
align
:
"left"
,
editor
:
{
...
...
@@ -156,20 +88,6 @@ var tableArray = [
type
:
'text'
}
},
{
display
:
"不含税金额"
,
name
:
"netwr"
,
width
:
120
,
minwidth
:
120
,
type
:
"string"
,
align
:
"left"
,
editor
:
{
type
:
'text'
}
},
{
display
:
"税额"
,
name
:
"kwetr"
,
width
:
120
,
minwidth
:
120
,
type
:
"string"
,
align
:
"left"
,
editor
:
{
type
:
'text'
}
},
{
display
:
"含税金额"
,
name
:
"kzwi1"
,
width
:
120
,
minwidth
:
120
,
type
:
"string"
,
align
:
"left"
,
editor
:
{
...
...
@@ -177,27 +95,6 @@ var tableArray = [
type
:
'text'
}
},
{
display
:
"税码"
,
name
:
"mwskz"
,
width
:
120
,
minwidth
:
120
,
type
:
"string"
,
align
:
"left"
,
editor
:
{
type
:
'text'
}
},
{
display
:
"不含税金额(本位币)"
,
name
:
"netwr1"
,
width
:
120
,
minwidth
:
120
,
type
:
"string"
,
align
:
"left"
,
editor
:
{
type
:
'text'
}
},
{
display
:
"税额(本位币)"
,
name
:
"kwetr1"
,
width
:
120
,
minwidth
:
120
,
type
:
"string"
,
align
:
"left"
,
editor
:
{
type
:
'text'
}
},
{
display
:
"含税金额(本位币)"
,
name
:
"kzwi11"
,
width
:
120
,
minwidth
:
120
,
type
:
"string"
,
align
:
"left"
,
editor
:
{
...
...
@@ -387,7 +284,9 @@ function loadGrid(obj) {
toolbarOptions
=
UICtrl
.
getDefaultToolbarOptions
({
addHandler
:
function
()
{
tableArray
.
forEach
((
item
)
=>
{
UICtrl
.
addGridRow
(
item
.
gridManager
,
{
zepItemno
:
getZepItemNo
()});
if
(
item
.
node
==
"reimbursementApplierGrid"
)
{
UICtrl
.
addGridRow
(
item
.
gridManager
,
{
zepItemno
:
getZepItemNo
(),
zepBptype
:
"D"
});
}
});
},
deleteHandler
:
function
()
{
...
...
@@ -412,6 +311,7 @@ function loadGrid(obj) {
checkbox
:
true
,
fixedCellHeight
:
true
,
selectRowButtonOnly
:
true
,
onAfterEdit
:
totalMoney
,
onBeforeCheckRow
:
function
(
checked
,
data
)
{
debugger
//同时选定或取消所有表格中的对应行
...
...
@@ -453,6 +353,24 @@ function loadGrid(obj) {
}
function
totalMoney
(
data
)
{
// alert(data.column.name);
// debugger
// data=data.record;
var
totals
=
0
;
if
(
data
.
column
.
name
==
"kzwi1"
)
{
var
rows
=
tableArray
[
0
].
gridManager
.
rows
;
if
(
rows
)
{
for
(
var
i
in
rows
)
{
var
list
=
rows
[
i
];
if
(
list
.
kzwi1
)
{
// alert(list.kzwi1);
totals
=
accAdd
(
totals
,
list
.
kzwi1
);
}
}
}
$
(
"#zepFtamount1"
).
val
(
totals
);
}
}
$
(
document
).
ready
(
function
()
{
initialize
();
});
...
...
@@ -477,6 +395,10 @@ function initialize() {
});
useArrayTable
(
loadGrid
);
})
$
(
"#zepFtypename"
).
val
(
"客户退款申请流程"
);
$
(
"#zepFtype"
).
val
(
"E"
);
$
(
"#butxt"
).
val
(
"广州市宝绅科技应用有限公司"
);
$
(
"#bukrs"
).
val
(
"1000"
);
}
...
...
topsun-xt/src/main/webapp/biz/topsun/sap/costReimbursement/refundApply.jsp
View file @
6e39b724
...
...
@@ -4,6 +4,7 @@
<html>
<head>
<x:base
include=
"layout,dialog,grid,tree,combox,commonTree,date"
/>
<x:script
src=
'/javaScript/math.js'
/>
<x:script
src=
'/biz/topsun/sap/costReimbursement/refundApply.js'
/>
</head>
<body>
...
...
@@ -43,13 +44,13 @@
fieldCol=
"2"
/>
<x:inputC
name=
"zepTxt"
required=
"false"
label=
"付款申请内容"
labelCol=
"2"
fieldCol=
"2"
/>
<x:inputC
name=
"zepFtamount"
required=
"false"
label=
"申请总金额(本位币)"
labelCol=
"2"
fieldCol=
"2"
/>
<x:inputC
name=
"zepFttax"
required=
"false"
label=
"申请总税额(本位币)"
labelCol=
"2"
fieldCol=
"2"
/>
<x:inputC
name=
"zepFtamount1"
required=
"false"
label=
"申请总金额"
labelCol=
"2"
fieldCol=
"2"
/>
<x:inputC
name=
"zepFttax1"
required=
"false"
label=
"申请总税额"
labelCol=
"2"
fieldCol=
"2"
/>
<x:inputC
name=
"zepPtamount"
required=
"false"
label=
"审批总金额(本位币)"
labelCol=
"2"
fieldCol=
"2"
/>
<x:inputC
name=
"zepPttax"
required=
"false"
label=
" 审批总税额(本位币)"
labelCol=
"2"
fieldCol=
"2"
/>
<x:inputC
name=
"zepPtamount1"
required=
"false"
label=
"审批总金额"
labelCol=
"2"
fieldCol=
"2"
/>
<x:inputC
name=
"zepPttax1"
required=
"false"
label=
"审批总税额"
labelCol=
"2"
fieldCol=
"2"
/>
</div>
</div>
...
...
topsun-xt/src/main/webapp/biz/topsun/sap/nonProdApply/nonProdApplyNext.js
View file @
6e39b724
...
...
@@ -40,7 +40,7 @@ function initializate() {
$
(
"#buttonBox"
).
show
();
break
;
}
businessPersonnelListGrid
// let isInitiator = ($("#isInitiator").val() === "true");
// if (isInitiator) {
// //创建或审核人
...
...
@@ -102,8 +102,7 @@ function loadGrid() {
gridManager
=
UICtrl
.
grid
(
"#businessPersonnelListGrid"
,
{
columns
:
[
{
display
:
"部门"
,
name
:
"deptName"
,
width
:
200
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
},
{
display
:
"部门人员"
,
name
:
"userName"
,
width
:
200
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
,
{
display
:
"部门人员"
,
name
:
"userName"
,
width
:
200
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
,
editor
:
{
type
:
'tree'
,
required
:
true
,
...
...
@@ -130,8 +129,7 @@ function loadGrid() {
// },
// }
},
{
display
:
"人员Id"
,
name
:
"userCode"
,
width
:
200
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
,
{
display
:
"人员Id"
,
name
:
"userCode"
,
width
:
260
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
,
editor
:
{
type
:
'text'
,
required
:
true
...
...
topsun-xt/src/main/webapp/biz/topsun/sap/nonProdApply/nonProdApplyNext.jsp
View file @
6e39b724
...
...
@@ -40,6 +40,7 @@
</div>
<x:hidden
name=
"applyDeptId"
/>
<x:hidden
name=
"id"
/>
<x:title
title=
"基本信息"
name=
"group"
/>
<div
class=
"hg-form-cols"
>
<div
class=
"hg-form-row"
>
...
...
topsun/src/main/java/com/huigou/topsun/sap/nonProdApply/application/NonProdApplyDeptApplication.java
View file @
6e39b724
...
...
@@ -30,6 +30,7 @@ public interface NonProdApplyDeptApplication {
SapNonProdApplyDept
getNonProdApplyDeptById
(
String
id
);
SapNonProdApplyDept
getNonProdApplyDeptByBaseInfoId
(
String
id
);
/**
* 驳回相关的部门
* @param sdo
...
...
topsun/src/main/java/com/huigou/topsun/sap/nonProdApply/application/impl/NonProdApplyApplicationImpl.java
View file @
6e39b724
...
...
@@ -4,9 +4,12 @@ import com.huigou.cache.DictUtil;
import
com.huigou.data.query.model.QueryDescriptor
;
import
com.huigou.data.query.model.QueryModel
;
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.topsun.sap.nonProdApply.repository.NonProdApplyBaseInfoRepository
;
import
com.huigou.topsun.sap.nonProdApply.repository.NonProdApplyDeptRepository
;
import
com.huigou.uasp.bmp.common.BizBillStatus
;
import
com.huigou.uasp.bpm.FlowBroker
;
import
com.huigou.util.ClassHelper
;
...
...
@@ -26,7 +29,8 @@ import java.util.Map;
public
class
NonProdApplyApplicationImpl
extends
FlowBroker
implements
NonProdApplyApplication
{
@Autowired
NonProdApplyBaseInfoRepository
nonProdApplyBaseInfoRepository
;
@Autowired
NonProdApplyDeptApplication
nonProdApplyDeptApplication
;
@SneakyThrows
@Transactional
(
propagation
=
Propagation
.
REQUIRES_NEW
)
...
...
@@ -95,7 +99,11 @@ public class NonProdApplyApplicationImpl extends FlowBroker implements NonProdA
@Override
public
NonProdApplyBaseInfo
loadNonProdApplyBaseInfoById
(
String
id
)
{
return
nonProdApplyBaseInfoRepository
.
findOne
(
id
);
NonProdApplyBaseInfo
nonProdApplyBaseInfo
=
nonProdApplyBaseInfoRepository
.
findOne
(
id
);
SapNonProdApplyDept
applyDept
=
nonProdApplyDeptApplication
.
getNonProdApplyDeptByBaseInfoId
(
nonProdApplyBaseInfo
.
getId
());
nonProdApplyBaseInfo
.
setApplyDeptId
(
applyDept
.
getApplyDeptId
());
return
nonProdApplyBaseInfo
;
}
@Override
...
...
topsun/src/main/java/com/huigou/topsun/sap/nonProdApply/application/impl/NonProdApplyDeptApplicationImpl.java
View file @
6e39b724
...
...
@@ -30,6 +30,7 @@ public class NonProdApplyDeptApplicationImpl extends BaseApplication implements
public
Map
<
String
,
Object
>
saveSapNonProdApplyDept
(
SDO
sdo
){
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
SapNonProdApplyDept
nonProdApplyDept
=
sdo
.
toObject
(
SapNonProdApplyDept
.
class
);
nonProdApplyDept
.
setBaseInfoId
(
sdo
.
getId
());
nonProdApplyDept
=
nonProdApplyDeptRepository
.
save
(
nonProdApplyDept
);
//获取分发的部门与人员信息
...
...
@@ -87,6 +88,10 @@ public class NonProdApplyDeptApplicationImpl extends BaseApplication implements
return
nonProdApplyDeptRepository
.
findOne
(
id
);
}
@Override
public
SapNonProdApplyDept
getNonProdApplyDeptByBaseInfoId
(
String
baseInfoId
)
{
return
nonProdApplyDeptRepository
.
findByBaseInfoId
(
baseInfoId
);
}
@Override
public
void
rejectNonProdApplyDept
(
SDO
sdo
)
{
...
...
topsun/src/main/java/com/huigou/topsun/sap/nonProdApply/controller/NonProdApplyNextController.java
View file @
6e39b724
...
...
@@ -6,11 +6,16 @@ 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.BsnMessageReject
;
import
com.huigou.topsun.base.bsnMessage.domain.BsnMessageSponsor
;
import
com.huigou.topsun.base.bsnMessage.repository.BsnMessageExecuteRepository
;
import
com.huigou.topsun.base.bsnMessage.repository.BsnMessageSponsorRepository
;
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.uasp.annotation.ControllerMapping
;
import
com.huigou.uasp.bmp.opm.application.OrgApplication
;
import
com.huigou.uasp.bmp.opm.domain.model.org.Org
;
import
com.huigou.uasp.client.CommonController
;
import
com.huigou.util.SDO
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -33,13 +38,19 @@ public class NonProdApplyNextController extends CommonController {
NonProdApplyDeptApplication
nonProdApplyDeptApplication
;
@Autowired
BsnMessageApplication
bsnMessageApplication
;
@Autowired
BsnMessageSponsorRepository
bsnMessageSponsorRepository
;
@Autowired
BsnMessageExecuteRepository
bsnMessageExecuteRepository
;
@Autowired
OrgApplication
orgApplication
;
public
String
forwardNonProdApplyNext
()
{
SDO
sdo
=
this
.
getSDO
();
String
id
=
sdo
.
getBizId
();
// this.putAttribute("active", ActiveStatus.UNFINISHED.getValue() );//定义流程环节的id
NonProdApplyBaseInfo
nonProdApplyBaseInfo
=
nonProdApplyApplication
.
loadNonProdApplyBaseInfoById
(
id
);
return
forward
(
"nonProdApplyNext"
,
nonProdApplyBaseInfo
);
}
...
...
@@ -51,6 +62,10 @@ public class NonProdApplyNextController extends CommonController {
// List<BsnMessage> bsnMessageAll = bsnMessageApplication.getBsnMessageByBusinessId(applyDeptId);
List
<
String
>
deptList
=
Arrays
.
asList
(
septString
.
split
(
","
));
Map
<
String
,
String
>
serviceusage
=
DictUtil
.
getDictionary
(
"serviceusage"
);
String
deptId
=
sdo
.
getString
(
"id"
);
BsnMessageSponsor
sponsor
=
bsnMessageSponsorRepository
.
findByBusinessId
(
deptId
);
List
<
BsnMessageExecute
>
executeLists
=
bsnMessageExecuteRepository
.
findAllByMessageSponsorId
(
sponsor
.
getId
());
// 用于存储结果的字典
Map
<
String
,
List
<
HashMap
<
String
,
String
>>>
map
=
new
HashMap
<>();
// 用于存储结果的字典
List
<
HashMap
<
String
,
String
>>
list
=
new
ArrayList
<>();
...
...
@@ -59,6 +74,14 @@ public class NonProdApplyNextController extends CommonController {
String
value
=
serviceusage
.
get
(
key
);
resultMap
.
put
(
"deptCode"
,
key
);
resultMap
.
put
(
"deptName"
,
value
);
for
(
BsnMessageExecute
executor:
executeLists
){
if
(
key
.
equals
(
executor
.
getBusinessCode
())){
resultMap
.
put
(
"userCode"
,
executor
.
getTaskExecute
());
Org
org
=
orgApplication
.
loadMainOrgByPersonId
(
executor
.
getTaskExecute
());
resultMap
.
put
(
"userName"
,
org
.
getName
());
break
;
}
}
list
.
add
(
resultMap
);
}
map
.
put
(
"Rows"
,
list
);
...
...
topsun/src/main/java/com/huigou/topsun/sap/nonProdApply/domain/NonProdApplyBaseInfo.java
View file @
6e39b724
package
com
.
huigou
.
topsun
.
sap
.
nonProdApply
.
domain
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.huigou.data.domain.model.FlowBillAbstractEntity
;
import
lombok.Data
;
import
javax.persistence.Column
;
import
javax.persistence.Entity
;
import
javax.persistence.Id
;
import
javax.persistence.Table
;
import
javax.persistence.*
;
import
java.util.Date
;
/**
...
...
@@ -113,4 +111,7 @@ public class NonProdApplyBaseInfo extends FlowBillAbstractEntity {
protected
String
getCodeRuleId
()
{
return
"sapNonProdApply"
;
}
@Transient
private
String
applyDeptId
;
}
\ No newline at end of file
topsun/src/main/java/com/huigou/topsun/sap/nonProdApply/repository/NonProdApplyDeptRepository.java
View file @
6e39b724
...
...
@@ -2,8 +2,12 @@ package com.huigou.topsun.sap.nonProdApply.repository;
import
com.huigou.topsun.sap.nonProdApply.domain.SapNonProdApplyDept
;
import
com.huigou.topsun.sap.purchase.domain.SapPurchaseItem
;
import
org.springframework.data.jpa.repository.JpaRepository
;
import
java.util.List
;
public
interface
NonProdApplyDeptRepository
extends
JpaRepository
<
SapNonProdApplyDept
,
String
>
{
SapNonProdApplyDept
findByBaseInfoId
(
String
baseInfoId
);
}
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