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
49afc6df
Commit
49afc6df
authored
Mar 14, 2024
by
刘学辉
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
固定资产报废和在建工程转固导入数据改到明细表导入
parent
a48f6b39
Show whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
225 additions
and
69 deletions
+225
-69
sapFixedAssessDetail.js
...un/sap/fixedAssets/sapFixedAssess/sapFixedAssessDetail.js
+34
-22
sapFixedAssessDetail.jsp
...n/sap/fixedAssets/sapFixedAssess/sapFixedAssessDetail.jsp
+1
-0
sapFixedAssessList.js
...psun/sap/fixedAssets/sapFixedAssess/sapFixedAssessList.js
+11
-9
sapFixedRetirementDetail.js
...ixedAssets/sapFixedRetirement/sapFixedRetirementDetail.js
+30
-6
sapFixedRetirementDetail.jsp
...xedAssets/sapFixedRetirement/sapFixedRetirementDetail.jsp
+1
-0
sapFixedRetirementList.js
.../fixedAssets/sapFixedRetirement/sapFixedRetirementList.js
+3
-14
sapFixedRetirementList.jsp
...fixedAssets/sapFixedRetirement/sapFixedRetirementList.jsp
+0
-1
SapFixedAssessApplication.java
...ap/fixedAssets/application/SapFixedAssessApplication.java
+2
-1
SapFixedRetirementApplication.java
...ixedAssets/application/SapFixedRetirementApplication.java
+2
-1
SapFixedAssessApplicationImpl.java
...ssets/application/impl/SapFixedAssessApplicationImpl.java
+6
-6
SapFixedAssessExcelImport.java
...xedAssets/application/impl/SapFixedAssessExcelImport.java
+26
-0
SapFixedRetirementApplicationImpl.java
...s/application/impl/SapFixedRetirementApplicationImpl.java
+4
-4
SapFixedAssessController.java
.../sap/fixedAssets/controller/SapFixedAssessController.java
+5
-3
SapFixedRetirementController.java
.../fixedAssets/controller/SapFixedRetirementController.java
+3
-2
TmpFixedAssessData.java
...gou/topsun/sap/fixedAssets/domain/TmpFixedAssessData.java
+78
-0
TmpFixedAssessDataRepository.java
.../fixedAssets/repository/TmpFixedAssessDataRepository.java
+19
-0
No files found.
topsun-xt/src/main/webapp/biz/topsun/sap/fixedAssets/sapFixedAssess/sapFixedAssessDetail.js
View file @
49afc6df
...
@@ -36,7 +36,9 @@ function loadGrid() {
...
@@ -36,7 +36,9 @@ function loadGrid() {
reloadGrid
();
reloadGrid
();
}
}
});
});
}
},
impExcelDataHandler
:{
id
:
'impExcelData'
,
img
:
'fa-table'
,
text
:
'导入数据'
,
click
:
impExcelDataHandler
},
});
});
gridManager
=
UICtrl
.
grid
(
"#maingrid"
,
{
gridManager
=
UICtrl
.
grid
(
"#maingrid"
,
{
columns
:
[
columns
:
[
...
@@ -64,7 +66,7 @@ function loadGrid() {
...
@@ -64,7 +66,7 @@ function loadGrid() {
type
:
'system'
,
type
:
'system'
,
name
:
"dictionary"
,
name
:
"dictionary"
,
getParam
:
function
(
item
)
{
getParam
:
function
(
item
)
{
return
{
paramValu
e
:
"BUKRS"
}
return
{
fieldNam
e
:
"BUKRS"
}
},
},
back
:
{
back
:
{
BUKRS
:
"bukrs"
,
BUKRS
:
"bukrs"
,
...
@@ -72,19 +74,7 @@ function loadGrid() {
...
@@ -72,19 +74,7 @@ function loadGrid() {
},
},
}
}
},
},
{
display
:
"成本中心"
,
name
:
"kostl"
,
width
:
140
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
,
editor
:
{
required
:
false
,
type
:
"select"
,
data
:
{
type
:
'system'
,
name
:
"queryCostCenter"
,
back
:
{
kostl
:
"kostl"
,
}
},
}
},
{
{
display
:
"凭证日期"
,
name
:
"bldat"
,
width
:
120
,
minWidth
:
60
,
type
:
"date"
,
align
:
"left"
,
display
:
"凭证日期"
,
name
:
"bldat"
,
width
:
120
,
minWidth
:
60
,
type
:
"date"
,
align
:
"left"
,
editor
:
{
required
:
false
,
type
:
"date"
}
editor
:
{
required
:
false
,
type
:
"date"
}
...
@@ -98,27 +88,27 @@ function loadGrid() {
...
@@ -98,27 +88,27 @@ function loadGrid() {
editor
:
{
required
:
false
,
type
:
"date"
}
editor
:
{
required
:
false
,
type
:
"date"
}
},
},
{
{
display
:
"文本"
,
name
:
"sgtxt"
,
width
:
18
0
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
,
display
:
"文本"
,
name
:
"sgtxt"
,
width
:
26
0
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
,
editor
:
{
required
:
false
,
type
:
"text"
}
editor
:
{
required
:
false
,
type
:
"text"
}
},
},
{
{
display
:
"
报废金额"
,
name
:
"anbtr"
,
width
:
10
0
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
,
display
:
"
接收方"
,
name
:
"empge"
,
width
:
18
0
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
,
editor
:
{
required
:
false
,
mask
:
'nnnnnnnn.nn'
,
type
:
"text"
}
editor
:
{
required
:
false
,
type
:
"text"
}
},
},
{
{
display
:
"百分比(%)"
,
name
:
"prozs"
,
width
:
100
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
,
display
:
"百分比(%)"
,
name
:
"prozs"
,
width
:
100
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
,
editor
:
{
required
:
false
,
mask
:
'nn'
,
type
:
"text"
}
editor
:
{
required
:
false
,
mask
:
'nn'
,
type
:
"text"
}
},
},
{
{
display
:
"
购置业务年度"
,
name
:
"xa"
,
width
:
16
0
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
,
display
:
"
金额"
,
name
:
"betrr"
,
width
:
10
0
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
,
editor
:
{
required
:
false
,
type
:
"text"
}
editor
:
{
required
:
false
,
mask
:
'nnnnnnnn.nn'
,
type
:
"text"
}
}
,
}
],
],
dataAction
:
"server"
,
dataAction
:
"server"
,
url
:
web_app
.
name
+
'/sapFixedAssessItem/querySapFixedAssessItems.ajax'
,
url
:
web_app
.
name
+
'/sapFixedAssessItem/querySapFixedAssessItems.ajax'
,
pageSize
:
10
,
pageSize
:
10
,
usePager
:
true
,
usePager
:
true
,
parms
:{
sap
Retirement
Id
:
getId
()},
parms
:{
sap
FixedAssess
Id
:
getId
()},
toolbar
:
toolbarOptions
,
toolbar
:
toolbarOptions
,
enabledEdit
:
true
,
enabledEdit
:
true
,
width
:
"100%"
,
width
:
"100%"
,
...
@@ -157,6 +147,28 @@ function reloadGrid() {
...
@@ -157,6 +147,28 @@ function reloadGrid() {
gridManager
.
loadData
();
gridManager
.
loadData
();
}
}
//从EXCEL导入数据
function
impExcelDataHandler
(){
ExcelImpManager
.
showImpDialog
(
'导入'
,
'sapFixedAssessData'
,
Public
.
getUUID
(),
saveUpLoadGrid
);
}
function
saveUpLoadGrid
()
{
var
batchNumber
=
$
(
'#batchNumber'
).
val
();
Public
.
ajax
(
web_app
.
name
+
'/sapFixedAssess/importExcelData.ajax'
,
{
batchNumber
:
batchNumber
},
function
(
data
)
{
for
(
var
row
=
0
;
row
<
data
.
length
;
row
++
)
{
//debugger
UICtrl
.
addGridRow
(
gridManager
,{
anln1
:
data
[
row
].
anln1
,
bukrs
:
data
[
row
].
bukrs
,
bldat
:
data
[
row
].
bldat
,
budat
:
data
[
row
].
budat
,
bzdat
:
data
[
row
].
bzdat
,
sgtxt
:
data
[
row
].
sgtxt
,
empge
:
data
[
row
].
empge
,
prozs
:
data
[
row
].
prozs
,
betrr
:
data
[
row
].
betrr
});
}
//reloadGrid();
});
}
function
getExtendedData
(
processAction
)
{
function
getExtendedData
(
processAction
)
{
//回退、打回、转交时,不需要验证必填项是否已经填写;
//回退、打回、转交时,不需要验证必填项是否已经填写;
if
(
processAction
==
ProcessAction
.
BACK
if
(
processAction
==
ProcessAction
.
BACK
...
...
topsun-xt/src/main/webapp/biz/topsun/sap/fixedAssets/sapFixedAssess/sapFixedAssessDetail.jsp
View file @
49afc6df
...
@@ -4,6 +4,7 @@
...
@@ -4,6 +4,7 @@
<html>
<html>
<head>
<head>
<x:base
include=
"layout,dialog,grid,tree,combox,commonTree,date,attachment"
/>
<x:base
include=
"layout,dialog,grid,tree,combox,commonTree,date,attachment"
/>
<x:script
src=
"/system/excelimport/AssignCodeImp.js"
/>
<x:script
src=
'/biz/topsun/sap/fixedAssets/sapFixedAssess/sapFixedAssessDetail.js'
/>
<x:script
src=
'/biz/topsun/sap/fixedAssets/sapFixedAssess/sapFixedAssessDetail.js'
/>
</head>
</head>
<body>
<body>
...
...
topsun-xt/src/main/webapp/biz/topsun/sap/fixedAssets/sapFixedAssess/sapFixedAssessList.js
View file @
49afc6df
...
@@ -12,10 +12,10 @@ function initUI() {
...
@@ -12,10 +12,10 @@ function initUI() {
function
loadGrid
()
{
function
loadGrid
()
{
var
toolbarOptions
=
UICtrl
.
getDefaultToolbarOptions
({
var
toolbarOptions
=
UICtrl
.
getDefaultToolbarOptions
({
addHandler
:
addHandler
,
addHandler
:
addHandler
// exportExcelHandler:exportExcelHandler,
// exportExcelHandler:exportExcelHandler,
// exportModelHandler:{id:'exportModelHandler',img:'fa-cloud-download',text:'导出模板',click:exportModelHandler},
// exportModelHandler:{id:'exportModelHandler',img:'fa-cloud-download',text:'导出模板',click:exportModelHandler},
impExcelDataHandler
:{
id
:
'impExcelData'
,
img
:
'fa-table'
,
text
:
'导入数据'
,
click
:
impExcelDataHandler
},
//
impExcelDataHandler:{id:'impExcelData',img:'fa-table',text:'导入数据',click:impExcelDataHandler},
});
});
gridManager
=
UICtrl
.
grid
(
"#maingrid"
,
{
gridManager
=
UICtrl
.
grid
(
"#maingrid"
,
{
...
@@ -29,13 +29,15 @@ function loadGrid() {
...
@@ -29,13 +29,15 @@ function loadGrid() {
{
display
:
"原因"
,
name
:
"reason"
,
width
:
300
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
},
{
display
:
"原因"
,
name
:
"reason"
,
width
:
300
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
},
{
display
:
"资产编号"
,
name
:
"anln1"
,
width
:
200
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
},
{
display
:
"资产编号"
,
name
:
"anln1"
,
width
:
200
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
},
{
display
:
"公司代码"
,
name
:
"bukrs"
,
width
:
120
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
},
{
display
:
"公司代码"
,
name
:
"bukrs"
,
width
:
120
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
},
{
display
:
"成本中心"
,
name
:
"kostl"
,
width
:
200
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
},
//
{display: "成本中心", name: "kostl", width: 200, minWidth: 60, type: "string", align: "left"},
{
display
:
"凭证日期"
,
name
:
"bldat"
,
width
:
120
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
},
{
display
:
"凭证日期"
,
name
:
"bldat"
,
width
:
120
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
},
{
display
:
"过账日期"
,
name
:
"budat"
,
width
:
120
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
},
{
display
:
"过账日期"
,
name
:
"budat"
,
width
:
120
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
},
{
display
:
"资产起息日"
,
name
:
"bzdat"
,
width
:
120
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
},
{
display
:
"资产起息日"
,
name
:
"bzdat"
,
width
:
120
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
},
// {display: "报废金额", name: "anbtr", width: 100, minWidth: 60, type: "string", align: "left"},
{
display
:
"接收方"
,
name
:
"empge"
,
width
:
100
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
},
// {display: "百分比", name: "prozs", width: 100, minWidth: 60, type: "string", align: "left"},
{
display
:
"百分比"
,
name
:
"prozs"
,
width
:
100
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
},
{
display
:
"购置业务年度"
,
name
:
"xa"
,
width
:
120
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
},
{
display
:
"金额"
,
name
:
"betrr"
,
width
:
100
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
}
// {display: "购置业务年度", name: "xa", width: 120, minWidth: 60, type: "string", align: "left"},
],
],
dataAction
:
"server"
,
dataAction
:
"server"
,
url
:
web_app
.
name
+
'/sapFixedAssess/slicedSapFixedAssessList.ajax'
,
url
:
web_app
.
name
+
'/sapFixedAssess/slicedSapFixedAssessList.ajax'
,
...
@@ -49,7 +51,7 @@ function loadGrid() {
...
@@ -49,7 +51,7 @@ function loadGrid() {
fixedCellHeight
:
true
,
fixedCellHeight
:
true
,
selectRowButtonOnly
:
true
,
selectRowButtonOnly
:
true
,
onDblClickRow
:
function
(
data
,
rowindex
,
rowobj
)
{
onDblClickRow
:
function
(
data
,
rowindex
,
rowobj
)
{
doView
(
data
.
sap
Retirement
Id
);
doView
(
data
.
sap
FixedAssess
Id
);
},
},
});
});
UICtrl
.
setSearchAreaToggle
(
gridManager
);
UICtrl
.
setSearchAreaToggle
(
gridManager
);
...
@@ -81,7 +83,7 @@ function deleteHandler() {
...
@@ -81,7 +83,7 @@ function deleteHandler() {
function
addHandler
()
{
function
addHandler
()
{
UICtrl
.
addTabItem
({
UICtrl
.
addTabItem
({
tabid
:
'addSapFixed
Retirement
'
,
tabid
:
'addSapFixed
Assess
'
,
text
:
"在建工程转固"
,
text
:
"在建工程转固"
,
url
:
web_app
.
name
+
'/sapFixedAssess/forwardSapFixedAssessDetail.job'
url
:
web_app
.
name
+
'/sapFixedAssess/forwardSapFixedAssessDetail.job'
});
});
...
@@ -89,7 +91,7 @@ function addHandler() {
...
@@ -89,7 +91,7 @@ function addHandler() {
function
doView
(
id
)
{
function
doView
(
id
)
{
UICtrl
.
addTabItem
({
UICtrl
.
addTabItem
({
tabid
:
'viewSapFixed
Retirement
'
+
id
,
tabid
:
'viewSapFixed
Assess
'
+
id
,
text
:
"在建工程转固"
,
text
:
"在建工程转固"
,
url
:
web_app
.
name
+
'/sapFixedAssess/showFixedAssess.job?bizId='
+
id
+
"&isReadOnly=true"
url
:
web_app
.
name
+
'/sapFixedAssess/showFixedAssess.job?bizId='
+
id
+
"&isReadOnly=true"
});
});
...
...
topsun-xt/src/main/webapp/biz/topsun/sap/fixedAssets/sapFixedRetirement/sapFixedRetirementDetail.js
View file @
49afc6df
...
@@ -36,7 +36,9 @@ function loadGrid() {
...
@@ -36,7 +36,9 @@ function loadGrid() {
reloadGrid
();
reloadGrid
();
}
}
});
});
}
},
impExcelDataHandler
:{
id
:
'impExcelData'
,
img
:
'fa-table'
,
text
:
'导入数据'
,
click
:
impExcelDataHandler
},
});
});
gridManager
=
UICtrl
.
grid
(
"#maingrid"
,
{
gridManager
=
UICtrl
.
grid
(
"#maingrid"
,
{
columns
:
[
columns
:
[
...
@@ -64,7 +66,7 @@ function loadGrid() {
...
@@ -64,7 +66,7 @@ function loadGrid() {
type
:
'system'
,
type
:
'system'
,
name
:
"dictionary"
,
name
:
"dictionary"
,
getParam
:
function
(
item
)
{
getParam
:
function
(
item
)
{
return
{
paramValu
e
:
"BUKRS"
}
return
{
fieldNam
e
:
"BUKRS"
}
},
},
back
:
{
back
:
{
BUKRS
:
"bukrs"
,
BUKRS
:
"bukrs"
,
...
@@ -72,7 +74,7 @@ function loadGrid() {
...
@@ -72,7 +74,7 @@ function loadGrid() {
},
},
}
}
},
},
{
/*
{
display: "成本中心", name: "kostl", width: 140, minWidth: 60, type: "string", align: "left",
display: "成本中心", name: "kostl", width: 140, minWidth: 60, type: "string", align: "left",
editor: {
editor: {
required: false, type: "select",
required: false, type: "select",
...
@@ -84,7 +86,7 @@ function loadGrid() {
...
@@ -84,7 +86,7 @@ function loadGrid() {
}
}
},
},
}
}
},
},
*/
{
{
display
:
"凭证日期"
,
name
:
"bldat"
,
width
:
120
,
minWidth
:
60
,
type
:
"date"
,
align
:
"left"
,
display
:
"凭证日期"
,
name
:
"bldat"
,
width
:
120
,
minWidth
:
60
,
type
:
"date"
,
align
:
"left"
,
editor
:
{
required
:
false
,
type
:
"date"
}
editor
:
{
required
:
false
,
type
:
"date"
}
...
@@ -111,8 +113,9 @@ function loadGrid() {
...
@@ -111,8 +113,9 @@ function loadGrid() {
},
},
{
{
display
:
"购置业务年度"
,
name
:
"xa"
,
width
:
160
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
,
display
:
"购置业务年度"
,
name
:
"xa"
,
width
:
160
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
,
editor
:
{
required
:
false
,
type
:
"text"
}
// editor: {required: false, type: "text"}
},
editor
:
{
type
:
'dictionary'
,
data
:{
name
:
'sapFixedRetirementYear'
}
,
textField
:
'xaTextView'
,
valueField
:
'xa'
}
}
],
],
dataAction
:
"server"
,
dataAction
:
"server"
,
url
:
web_app
.
name
+
'/sapFixedRetirementItem/querySapFixedRetirementItems.ajax'
,
url
:
web_app
.
name
+
'/sapFixedRetirementItem/querySapFixedRetirementItems.ajax'
,
...
@@ -157,6 +160,27 @@ function reloadGrid() {
...
@@ -157,6 +160,27 @@ function reloadGrid() {
gridManager
.
loadData
();
gridManager
.
loadData
();
}
}
//从EXCEL导入数据
function
impExcelDataHandler
(){
ExcelImpManager
.
showImpDialog
(
'导入'
,
'sapFixedRetirementData'
,
Public
.
getUUID
(),
saveUpLoadGrid
);
}
function
saveUpLoadGrid
()
{
var
batchNumber
=
$
(
'#batchNumber'
).
val
();
Public
.
ajax
(
web_app
.
name
+
'/sapFixedRetirement/importExcelData.ajax'
,
{
batchNumber
:
batchNumber
},
function
(
data
)
{
for
(
var
row
=
0
;
row
<
data
.
length
;
row
++
)
{
//debugger
UICtrl
.
addGridRow
(
gridManager
,{
anln1
:
data
[
row
].
anln1
,
bukrs
:
data
[
row
].
bukrs
,
bldat
:
data
[
row
].
bldat
,
budat
:
data
[
row
].
budat
,
bzdat
:
data
[
row
].
bzdat
,
sgtxt
:
data
[
row
].
sgtxt
,
xa
:
data
[
row
].
xa
,
prozs
:
data
[
row
].
prozs
,
anbtr
:
data
[
row
].
anbtr
});
}
//reloadGrid();
});
}
function
getExtendedData
(
processAction
)
{
function
getExtendedData
(
processAction
)
{
//回退、打回、转交时,不需要验证必填项是否已经填写;
//回退、打回、转交时,不需要验证必填项是否已经填写;
if
(
processAction
==
ProcessAction
.
BACK
if
(
processAction
==
ProcessAction
.
BACK
...
...
topsun-xt/src/main/webapp/biz/topsun/sap/fixedAssets/sapFixedRetirement/sapFixedRetirementDetail.jsp
View file @
49afc6df
...
@@ -4,6 +4,7 @@
...
@@ -4,6 +4,7 @@
<html>
<html>
<head>
<head>
<x:base
include=
"layout,dialog,grid,tree,combox,commonTree,date,attachment"
/>
<x:base
include=
"layout,dialog,grid,tree,combox,commonTree,date,attachment"
/>
<x:script
src=
"/system/excelimport/AssignCodeImp.js"
/>
<x:script
src=
'/biz/topsun/sap/fixedAssets/sapFixedRetirement/sapFixedRetirementDetail.js'
/>
<x:script
src=
'/biz/topsun/sap/fixedAssets/sapFixedRetirement/sapFixedRetirementDetail.js'
/>
</head>
</head>
<body>
<body>
...
...
topsun-xt/src/main/webapp/biz/topsun/sap/fixedAssets/sapFixedRetirement/sapFixedRetirementList.js
View file @
49afc6df
...
@@ -12,10 +12,9 @@ function initUI() {
...
@@ -12,10 +12,9 @@ function initUI() {
function
loadGrid
()
{
function
loadGrid
()
{
var
toolbarOptions
=
UICtrl
.
getDefaultToolbarOptions
({
var
toolbarOptions
=
UICtrl
.
getDefaultToolbarOptions
({
addHandler
:
addHandler
,
addHandler
:
addHandler
// exportExcelHandler:exportExcelHandler,
// exportExcelHandler:exportExcelHandler,
// exportModelHandler:{id:'exportModelHandler',img:'fa-cloud-download',text:'导出模板',click:exportModelHandler},
// exportModelHandler:{id:'exportModelHandler',img:'fa-cloud-download',text:'导出模板',click:exportModelHandler},
impExcelDataHandler
:{
id
:
'impExcelData'
,
img
:
'fa-table'
,
text
:
'导入数据'
,
click
:
impExcelDataHandler
},
});
});
gridManager
=
UICtrl
.
grid
(
"#maingrid"
,
{
gridManager
=
UICtrl
.
grid
(
"#maingrid"
,
{
...
@@ -29,7 +28,7 @@ function loadGrid() {
...
@@ -29,7 +28,7 @@ function loadGrid() {
{
display
:
"原因"
,
name
:
"reason"
,
width
:
300
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
},
{
display
:
"原因"
,
name
:
"reason"
,
width
:
300
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
},
{
display
:
"资产编号"
,
name
:
"anln1"
,
width
:
200
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
},
{
display
:
"资产编号"
,
name
:
"anln1"
,
width
:
200
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
},
{
display
:
"公司代码"
,
name
:
"bukrs"
,
width
:
120
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
},
{
display
:
"公司代码"
,
name
:
"bukrs"
,
width
:
120
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
},
{
display
:
"成本中心"
,
name
:
"kostl"
,
width
:
200
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
},
//
{display: "成本中心", name: "kostl", width: 200, minWidth: 60, type: "string", align: "left"},
{
display
:
"凭证日期"
,
name
:
"bldat"
,
width
:
120
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
},
{
display
:
"凭证日期"
,
name
:
"bldat"
,
width
:
120
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
},
{
display
:
"过账日期"
,
name
:
"budat"
,
width
:
120
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
},
{
display
:
"过账日期"
,
name
:
"budat"
,
width
:
120
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
},
{
display
:
"资产起息日"
,
name
:
"bzdat"
,
width
:
120
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
},
{
display
:
"资产起息日"
,
name
:
"bzdat"
,
width
:
120
,
minWidth
:
60
,
type
:
"string"
,
align
:
"left"
},
...
@@ -94,17 +93,7 @@ function doView(id) {
...
@@ -94,17 +93,7 @@ function doView(id) {
url
:
web_app
.
name
+
'/sapFixedRetirement/showFixedRetirement.job?bizId='
+
id
+
"&isReadOnly=true"
url
:
web_app
.
name
+
'/sapFixedRetirement/showFixedRetirement.job?bizId='
+
id
+
"&isReadOnly=true"
});
});
}
}
//导出模板
function
exportModelHandler
()
{
// if(getTemplateId() == ''){
// Public.tip('请选择数据模板。');
// return;
// }
var
templetName
=
'固定资产报废'
;
var
templateId
=
"ea17de07deae11eeb82b00ffd30dba71"
;
var
url
=
web_app
.
name
+
'/excelImport/exportExcelTemplate.ajax'
;
UICtrl
.
downFileByAjax
(
url
,{
id
:
" "
,
templateCode
:
"sapFixedRetirementData"
},
templetName
);
}
//从EXCEL导入数据
//从EXCEL导入数据
function
impExcelDataHandler
(){
function
impExcelDataHandler
(){
...
...
topsun-xt/src/main/webapp/biz/topsun/sap/fixedAssets/sapFixedRetirement/sapFixedRetirementList.jsp
View file @
49afc6df
...
@@ -4,7 +4,6 @@
...
@@ -4,7 +4,6 @@
<html>
<html>
<head>
<head>
<x:base
include=
"layout,dialog,grid,tree,combox,commonTree,attachment"
/>
<x:base
include=
"layout,dialog,grid,tree,combox,commonTree,attachment"
/>
<x:script
src=
"/system/excelimport/AssignCodeImp.js"
/>
<x:script
src=
'/biz/topsun/sap/fixedAssets/sapFixedRetirement/sapFixedRetirementList.js'
/>
<x:script
src=
'/biz/topsun/sap/fixedAssets/sapFixedRetirement/sapFixedRetirementList.js'
/>
</head>
</head>
...
...
topsun/src/main/java/com/huigou/topsun/sap/fixedAssets/application/SapFixedAssessApplication.java
View file @
49afc6df
...
@@ -2,6 +2,7 @@ package com.huigou.topsun.sap.fixedAssets.application;
...
@@ -2,6 +2,7 @@ package com.huigou.topsun.sap.fixedAssets.application;
import
com.huigou.topsun.sap.fixedAssets.domain.SapFixedAssess
;
import
com.huigou.topsun.sap.fixedAssets.domain.SapFixedAssess
;
import
com.huigou.topsun.sap.fixedAssets.domain.SapRetirement
;
import
com.huigou.topsun.sap.fixedAssets.domain.SapRetirement
;
import
com.huigou.topsun.sap.fixedAssets.domain.TmpFixedAssessData
;
import
com.huigou.topsun.sap.fixedAssets.domain.query.SapFixedAssessQueryRequest
;
import
com.huigou.topsun.sap.fixedAssets.domain.query.SapFixedAssessQueryRequest
;
import
com.huigou.topsun.sap.fixedAssets.domain.query.SapFixedRetirementQueryRequest
;
import
com.huigou.topsun.sap.fixedAssets.domain.query.SapFixedRetirementQueryRequest
;
...
@@ -24,5 +25,5 @@ public interface SapFixedAssessApplication {
...
@@ -24,5 +25,5 @@ public interface SapFixedAssessApplication {
void
deleteByIds
(
List
<
String
>
ids
);
void
deleteByIds
(
List
<
String
>
ids
);
String
importExcelData
(
String
batchNumber
);
List
<
TmpFixedAssessData
>
importExcelData
(
String
batchNumber
);
}
}
topsun/src/main/java/com/huigou/topsun/sap/fixedAssets/application/SapFixedRetirementApplication.java
View file @
49afc6df
...
@@ -2,6 +2,7 @@ package com.huigou.topsun.sap.fixedAssets.application;
...
@@ -2,6 +2,7 @@ package com.huigou.topsun.sap.fixedAssets.application;
import
com.huigou.topsun.sap.fixedAssets.domain.SapFixedAssetsMove
;
import
com.huigou.topsun.sap.fixedAssets.domain.SapFixedAssetsMove
;
import
com.huigou.topsun.sap.fixedAssets.domain.SapRetirement
;
import
com.huigou.topsun.sap.fixedAssets.domain.SapRetirement
;
import
com.huigou.topsun.sap.fixedAssets.domain.TmpFixedRetirementData
;
import
com.huigou.topsun.sap.fixedAssets.domain.query.SapFixedAssetsMoveQueryRequest
;
import
com.huigou.topsun.sap.fixedAssets.domain.query.SapFixedAssetsMoveQueryRequest
;
import
com.huigou.topsun.sap.fixedAssets.domain.query.SapFixedRetirementQueryRequest
;
import
com.huigou.topsun.sap.fixedAssets.domain.query.SapFixedRetirementQueryRequest
;
...
@@ -25,5 +26,5 @@ public interface SapFixedRetirementApplication {
...
@@ -25,5 +26,5 @@ public interface SapFixedRetirementApplication {
void
deleteByIds
(
List
<
String
>
ids
);
void
deleteByIds
(
List
<
String
>
ids
);
String
importExcelData
(
String
batchNumber
)
;
List
<
TmpFixedRetirementData
>
importExcelData
(
String
batchNumber
)
;
}
}
topsun/src/main/java/com/huigou/topsun/sap/fixedAssets/application/impl/SapFixedAssessApplicationImpl.java
View file @
49afc6df
...
@@ -40,8 +40,8 @@ public class SapFixedAssessApplicationImpl extends FlowBroker implements SapFixe
...
@@ -40,8 +40,8 @@ public class SapFixedAssessApplicationImpl extends FlowBroker implements SapFixe
private
SapFixedAssessRepository
sapFixedAssessRepository
;
private
SapFixedAssessRepository
sapFixedAssessRepository
;
@Autowired
@Autowired
private
SapFixedAssessItemApplication
sapFixedAssessItemApplication
;
private
SapFixedAssessItemApplication
sapFixedAssessItemApplication
;
//
@Autowired
@Autowired
//
private TmpFixedAssessDataRepository tmpFixedAssessDataRepository;
private
TmpFixedAssessDataRepository
tmpFixedAssessDataRepository
;
@Autowired
@Autowired
private
SapFixedAssessItemRepository
sapFixedAssessItemRepository
;
private
SapFixedAssessItemRepository
sapFixedAssessItemRepository
;
@Autowired
@Autowired
...
@@ -142,9 +142,9 @@ public class SapFixedAssessApplicationImpl extends FlowBroker implements SapFixe
...
@@ -142,9 +142,9 @@ public class SapFixedAssessApplicationImpl extends FlowBroker implements SapFixe
@Override
@Override
public
String
importExcelData
(
String
batchNumber
)
{
public
List
<
TmpFixedAssessData
>
importExcelData
(
String
batchNumber
)
{
/*
List<TmpFixedAssessData> dataList=tmpFixedAssessDataRepository.findByBatchNumber(batchNumber);
List
<
TmpFixedAssessData
>
dataList
=
tmpFixedAssessDataRepository
.
findByBatchNumber
(
batchNumber
);
try {
/*
try {
if (dataList.size()>0){
if (dataList.size()>0){
SapAssess fixedAssess = new SapAssess();
SapAssess fixedAssess = new SapAssess();
fixedAssess.setReason("导入");
fixedAssess.setReason("导入");
...
@@ -169,6 +169,6 @@ public class SapFixedAssessApplicationImpl extends FlowBroker implements SapFixe
...
@@ -169,6 +169,6 @@ public class SapFixedAssessApplicationImpl extends FlowBroker implements SapFixe
}catch(Exception ex){
}catch(Exception ex){
ex.printStackTrace();
ex.printStackTrace();
}*/
}*/
return
""
;
return
dataList
;
}
}
}
}
topsun/src/main/java/com/huigou/topsun/sap/fixedAssets/application/impl/SapFixedAssessExcelImport.java
0 → 100644
View file @
49afc6df
package
com
.
huigou
.
topsun
.
sap
.
fixedAssets
.
application
.
impl
;
import
com.huigou.topsun.sap.fixedAssets.domain.TmpFixedAssessData
;
import
com.huigou.topsun.sap.fixedAssets.domain.TmpFixedRetirementData
;
import
com.huigou.topsun.sap.fixedAssets.repository.TmpFixedAssessDataRepository
;
import
com.huigou.topsun.sap.fixedAssets.repository.TmpFixedRetirementDataRepository
;
import
com.huigou.uasp.tool.dataimport.application.ExcelImportInterface
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
@Service
(
"sapFixedAssessExcelImport"
)
public
class
SapFixedAssessExcelImport
implements
ExcelImportInterface
{
@Autowired
private
TmpFixedAssessDataRepository
tmpFixedAssessDataRepository
;
@Override
public
void
executeImport
(
String
batchNumer
)
{
List
<
TmpFixedAssessData
>
tmpFixedAssessList
=
tmpFixedAssessDataRepository
.
findByBatchNumber
(
batchNumer
);
System
.
out
.
println
(
"========================="
);
// orgSyncApplication.sync(SyncKind.PSM, portalPeoples);
}
}
topsun/src/main/java/com/huigou/topsun/sap/fixedAssets/application/impl/SapFixedRetirementApplicationImpl.java
View file @
49afc6df
...
@@ -147,9 +147,9 @@ public class SapFixedRetirementApplicationImpl extends FlowBroker implements Sap
...
@@ -147,9 +147,9 @@ public class SapFixedRetirementApplicationImpl extends FlowBroker implements Sap
@Override
@Override
public
String
importExcelData
(
String
batchNumber
)
{
public
List
<
TmpFixedRetirementData
>
importExcelData
(
String
batchNumber
)
{
List
<
TmpFixedRetirementData
>
dataList
=
tmpFixedRetirementDataRepository
.
findByBatchNumber
(
batchNumber
);
List
<
TmpFixedRetirementData
>
dataList
=
tmpFixedRetirementDataRepository
.
findByBatchNumber
(
batchNumber
);
try
{
/*
try {
if (dataList.size()>0){
if (dataList.size()>0){
SapRetirement fixedRetirement = new SapRetirement();
SapRetirement fixedRetirement = new SapRetirement();
fixedRetirement.setReason("导入");
fixedRetirement.setReason("导入");
...
@@ -173,7 +173,7 @@ public class SapFixedRetirementApplicationImpl extends FlowBroker implements Sap
...
@@ -173,7 +173,7 @@ public class SapFixedRetirementApplicationImpl extends FlowBroker implements Sap
}
}
}catch(Exception ex){
}catch(Exception ex){
ex.printStackTrace();
ex.printStackTrace();
}
}
*/
return
""
;
return
dataList
;
}
}
}
}
topsun/src/main/java/com/huigou/topsun/sap/fixedAssets/controller/SapFixedAssessController.java
View file @
49afc6df
...
@@ -5,6 +5,7 @@ import com.huigou.context.OrgUnit;
...
@@ -5,6 +5,7 @@ import com.huigou.context.OrgUnit;
import
com.huigou.topsun.sap.fixedAssets.application.SapFixedAssessApplication
;
import
com.huigou.topsun.sap.fixedAssets.application.SapFixedAssessApplication
;
import
com.huigou.topsun.sap.fixedAssets.domain.SapFixedAssess
;
import
com.huigou.topsun.sap.fixedAssets.domain.SapFixedAssess
;
import
com.huigou.topsun.sap.fixedAssets.domain.TmpFixedAssessData
;
import
com.huigou.topsun.sap.fixedAssets.domain.query.SapFixedAssessQueryRequest
;
import
com.huigou.topsun.sap.fixedAssets.domain.query.SapFixedAssessQueryRequest
;
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.BizBillStatus
;
...
@@ -82,12 +83,13 @@ public class SapFixedAssessController extends CommonController {
...
@@ -82,12 +83,13 @@ public class SapFixedAssessController extends CommonController {
return
success
();
return
success
();
}
}
/*
/*
*导入数据
*
返回
导入数据
*/
*/
public
String
importExcelData
()
{
public
String
importExcelData
()
{
SDO
sdo
=
this
.
getSDO
();
SDO
sdo
=
this
.
getSDO
();
String
batchNumber
=
sdo
.
getString
(
"batchNumber"
);
String
batchNumber
=
sdo
.
getString
(
"batchNumber"
);
sapFixedAssessApplication
.
importExcelData
(
batchNumber
);
List
<
TmpFixedAssessData
>
dataList
=
sapFixedAssessApplication
.
importExcelData
(
batchNumber
);
return
success
();
// return dataList;
return
toResult
(
dataList
);
}
}
}
}
topsun/src/main/java/com/huigou/topsun/sap/fixedAssets/controller/SapFixedRetirementController.java
View file @
49afc6df
...
@@ -6,6 +6,7 @@ import com.huigou.topsun.sap.fixedAssets.application.SapFixedAssetsMoveApplicati
...
@@ -6,6 +6,7 @@ import com.huigou.topsun.sap.fixedAssets.application.SapFixedAssetsMoveApplicati
import
com.huigou.topsun.sap.fixedAssets.application.SapFixedRetirementApplication
;
import
com.huigou.topsun.sap.fixedAssets.application.SapFixedRetirementApplication
;
import
com.huigou.topsun.sap.fixedAssets.domain.SapFixedAssetsMove
;
import
com.huigou.topsun.sap.fixedAssets.domain.SapFixedAssetsMove
;
import
com.huigou.topsun.sap.fixedAssets.domain.SapRetirement
;
import
com.huigou.topsun.sap.fixedAssets.domain.SapRetirement
;
import
com.huigou.topsun.sap.fixedAssets.domain.TmpFixedRetirementData
;
import
com.huigou.topsun.sap.fixedAssets.domain.query.SapFixedAssetsMoveQueryRequest
;
import
com.huigou.topsun.sap.fixedAssets.domain.query.SapFixedAssetsMoveQueryRequest
;
import
com.huigou.topsun.sap.fixedAssets.domain.query.SapFixedRetirementQueryRequest
;
import
com.huigou.topsun.sap.fixedAssets.domain.query.SapFixedRetirementQueryRequest
;
import
com.huigou.uasp.annotation.ControllerMapping
;
import
com.huigou.uasp.annotation.ControllerMapping
;
...
@@ -89,7 +90,7 @@ public class SapFixedRetirementController extends CommonController {
...
@@ -89,7 +90,7 @@ public class SapFixedRetirementController extends CommonController {
public
String
importExcelData
()
{
public
String
importExcelData
()
{
SDO
sdo
=
this
.
getSDO
();
SDO
sdo
=
this
.
getSDO
();
String
batchNumber
=
sdo
.
getString
(
"batchNumber"
);
String
batchNumber
=
sdo
.
getString
(
"batchNumber"
);
sapFixedRetirementApplication
.
importExcelData
(
batchNumber
);
List
<
TmpFixedRetirementData
>
dataList
=
sapFixedRetirementApplication
.
importExcelData
(
batchNumber
);
return
success
(
);
return
toResult
(
dataList
);
}
}
}
}
topsun/src/main/java/com/huigou/topsun/sap/fixedAssets/domain/TmpFixedAssessData.java
0 → 100644
View file @
49afc6df
package
com
.
huigou
.
topsun
.
sap
.
fixedAssets
.
domain
;
import
com.huigou.topsun.common.AbstractPortalOrg
;
import
lombok.Getter
;
import
lombok.Setter
;
import
javax.persistence.Column
;
import
javax.persistence.Entity
;
import
javax.persistence.Table
;
import
java.math.BigDecimal
;
import
java.util.Date
;
/**
* 在建工程转固导入临时表。
*
* @author lxh
*/
@Table
(
name
=
"tmp_fixed_assess_data"
)
@Entity
@Getter
@Setter
public
class
TmpFixedAssessData
extends
AbstractPortalOrg
{
/**
* 主资产号
*/
@Column
(
name
=
"anln1"
)
private
String
anln1
;
@Column
(
name
=
"anln2"
)
private
String
anln2
;
/**
* 公司代码(必填)
*/
@Column
(
name
=
"bukrs"
)
private
String
bukrs
;
/**
* 凭证日期
*/
@Column
(
name
=
"bldat"
)
private
Date
bldat
;
/**
* 过账日期
*/
@Column
(
name
=
"BUDAT"
)
private
Date
budat
;
/**
* 资产起息日
*/
@Column
(
name
=
"BZDAT"
)
private
Date
bzdat
;
/**
* 文本
*/
@Column
(
name
=
"SGTXT"
)
private
String
sgtxt
;
/**
* 金额
*/
@Column
(
name
=
"betrr"
)
private
BigDecimal
betrr
;
/**
* 百分比
*/
@Column
(
name
=
"PROZS"
)
private
BigDecimal
prozs
;
/**
* 接收方
*/
@Column
(
name
=
"empge"
)
private
String
empge
;
}
topsun/src/main/java/com/huigou/topsun/sap/fixedAssets/repository/TmpFixedAssessDataRepository.java
0 → 100644
View file @
49afc6df
package
com
.
huigou
.
topsun
.
sap
.
fixedAssets
.
repository
;
import
com.huigou.topsun.sap.fixedAssets.domain.TmpFixedAssessData
;
import
com.huigou.topsun.sap.fixedAssets.domain.TmpFixedRetirementData
;
import
org.springframework.data.jpa.repository.JpaRepository
;
import
java.util.List
;
/**
* @Auther: LXH
* @Date: 2024/03/14/11:13
* @Description:
*/
public
interface
TmpFixedAssessDataRepository
extends
JpaRepository
<
TmpFixedAssessData
,
String
>
{
List
<
TmpFixedAssessData
>
findByBatchNumber
(
String
batchNumber
);
void
deleteByBatchNumber
(
String
batchNumber
);
}
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