Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
T
traffic-front
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wangxiaoming
traffic-front
Commits
24be89fb
Commit
24be89fb
authored
Apr 04, 2019
by
zhkwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CIT固定资产导入优化
parent
302b70ff
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
43 additions
and
32 deletions
+43
-32
AssetListServiceImpl.java
...a/pwc/taxtech/atms/service/impl/AssetListServiceImpl.java
+9
-5
cit-import-asset-list.ctrl.js
...mport/cit-import-asset-list/cit-import-asset-list.ctrl.js
+34
-27
No files found.
atms-api/src/main/java/pwc/taxtech/atms/service/impl/AssetListServiceImpl.java
View file @
24be89fb
...
...
@@ -288,10 +288,10 @@ public class AssetListServiceImpl extends BaseService {
return
null
;
}
citAsset
.
setAssetNumber
(
value
.
toString
());
citAsset
.
setSerialNumber
(
String
.
valueOf
(
CitCommonUtil
.
getValue
(
rowData
.
getCell
(
2
))
));
citAsset
.
setSerialNumber
(
CitCommonUtil
.
getValue
(
rowData
.
getCell
(
2
)).
toString
(
));
//获取资产描述
citAsset
.
setAssetDescription
(
String
.
valueOf
(
CitCommonUtil
.
getValue
(
rowData
.
getCell
(
5
))
));
citAsset
.
setAssetDescription
(
CitCommonUtil
.
getValue
(
rowData
.
getCell
(
5
)).
toString
(
));
//获取资产类别
value
=
CitCommonUtil
.
getValue
(
rowData
.
getCell
(
7
));
if
(
value
==
null
)
{
...
...
@@ -303,7 +303,9 @@ public class AssetListServiceImpl extends BaseService {
//获取购入日期
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
value
=
CitCommonUtil
.
getValue
(
rowData
.
getCell
(
15
));
citAsset
.
setBuyDate
(
value
==
null
?
null
:
sdf
.
parse
(
value
.
toString
()));
if
(!
""
.
equals
(
value
)){
citAsset
.
setBuyDate
(
sdf
.
parse
(
value
.
toString
()));
}
//获取开始折旧日期,DD没有提供,我们要根据购入日期和税法分类做预处理自己转化
// citAsset.setDepreciationDate(sdf.parse(CitCommonUtil.getValue(rowData.getCell(15)).toString()));
...
...
@@ -324,8 +326,10 @@ public class AssetListServiceImpl extends BaseService {
// citAsset.setAdjustmentValue(new BigDecimal(CitCommonUtil.getValue(rowData.getCell(32)).toString()));
//获取报废日期
value
=
CitCommonUtil
.
getValue
(
rowData
.
getCell
(
37
));
citAsset
.
setDisposedDate
(
value
==
null
?
null
:
sdf
.
parse
(
value
.
toString
()));
citAsset
.
setScrapType
(
String
.
valueOf
(
CitCommonUtil
.
getValue
(
rowData
.
getCell
(
38
))));
if
(!
""
.
equals
(
value
)){
citAsset
.
setDisposedDate
(
sdf
.
parse
(
value
.
toString
()));
}
citAsset
.
setScrapType
(
CitCommonUtil
.
getValue
(
rowData
.
getCell
(
38
)).
toString
());
//获取残值额,原为残值率现为残值额,接下来计算需要用到,所以赋给一个对象
BigDecimal
residualRate
=
new
BigDecimal
(
CitCommonUtil
.
getValue
(
rowData
.
getCell
(
20
)).
toString
());
citAsset
.
setResidualRate
(
residualRate
);
...
...
atms-web/src/main/webapp/app/cit/import/cit-import-asset-list/cit-import-asset-list.ctrl.js
View file @
24be89fb
...
...
@@ -63,7 +63,6 @@
taxGroupType
:
''
};
$scope
.
refreshAssetResultListGrid
=
function
()
{
$log
.
debug
(
"refreshAssetResultListGrid"
);
getAssetResultList
(
$scope
.
citAssetsListDto
.
assetType
);
};
...
...
@@ -232,25 +231,31 @@
},
withCredentials
:
true
}).
success
(
function
(
resp
){
$
(
'#busy-indicator-container'
).
hide
();
assetListService
.
getAssetGroupResultData
(
projectId
).
success
(
function
(
groupResultData
)
{
$scope
.
assetGroupResultDataSource
=
groupResultData
.
data
;
});
// $scope.assetGroupResultDataSource = resp.data;
InitGrid
(
false
);
$scope
.
saveGroupType
=
1
;
$scope
.
isDisabled
=
true
;
//为方便开发暂时先改为false
$scope
.
isDisabled
=
false
;
$scope
.
modalInstance
=
$uibModal
.
open
({
animation
:
false
,
backdrop
:
'static'
,
keyboard
:
false
,
ariaLabelledBy
:
'modal-title'
,
ariaDescribedBy
:
'modal-body'
,
templateUrl
:
'set-asset-group-modal.html'
,
scope
:
$scope
,
windowClass
:
"set-asset-list-modal"
});
if
(
resp
.
code
==
1
){
assetListService
.
getAssetGroupResultData
(
projectId
).
success
(
function
(
groupResultData
)
{
$scope
.
assetGroupResultDataSource
=
groupResultData
.
data
;
});
// $scope.assetGroupResultDataSource = resp.data;
InitGrid
(
false
);
$scope
.
saveGroupType
=
1
;
$scope
.
isDisabled
=
true
;
//为方便开发暂时先改为false
$scope
.
isDisabled
=
false
;
$scope
.
modalInstance
=
$uibModal
.
open
({
animation
:
false
,
backdrop
:
'static'
,
keyboard
:
false
,
ariaLabelledBy
:
'modal-title'
,
ariaDescribedBy
:
'modal-body'
,
templateUrl
:
'set-asset-group-modal.html'
,
scope
:
$scope
,
windowClass
:
"set-asset-list-modal"
});
}
else
{
SweetAlert
.
error
(
"文件导入出现错误,请重试"
);
}
}).
error
(
function
(
resp
){
SweetAlert
.
error
(
"文件导入出现错误,请重试"
);
});
...
...
@@ -258,6 +263,7 @@
//根据分类获取数据
function
getAssetResultList
(
assetType
)
{
debugger
;
$scope
.
citAssetsListDto
.
assetType
=
assetType
;
$scope
.
TotalCount
=
0
;
$scope
.
TotalAccountAcquisitionValue
=
0
;
...
...
@@ -265,7 +271,7 @@
$scope
.
TotalTaxCurrentYearDepreciationAmount
=
0
;
$scope
.
TotalYearDifferenceAmount
=
0
;
assetListService
.
getAssetResultListPage
(
$scope
.
citAssetsListDto
).
success
(
function
(
assetListData
)
{
debugger
;
var
data
=
assetListData
.
data
.
list
;
if
(
data
)
{
var
index
=
1
;
...
...
@@ -279,7 +285,7 @@
// }
// });
$scope
.
assetsResultData
=
data
;
$scope
.
TotalCount
=
data
.
total
;
// $scope.TotalAccountAcquisitionValue = PWC.round($scope.TotalAccountAcquisitionValue, 2);
// $scope.TotalAccountYearDepreciationAmount = PWC.round($scope.TotalAccountYearDepreciationAmount, 2);
// $scope.TotalTaxCurrentYearDepreciationAmount = PWC.round($scope.TotalTaxCurrentYearDepreciationAmount, 2);
...
...
@@ -289,6 +295,7 @@
$scope
.
TotalTaxCurrentYearDepreciationAmount
=
PWC
.
round
(
data
[
0
].
totalTaxCurrentYearDepreciationAmount
,
2
);
$scope
.
TotalYearDifferenceAmount
=
PWC
.
round
(
data
[
0
].
totalYearDifferenceAmount
,
2
);
}
$scope
.
TotalCount
=
assetListData
.
data
.
total
;
$scope
.
pagingOptions
.
totalItems
=
assetListData
.
data
.
total
;
});
}
...
...
@@ -1006,13 +1013,12 @@
//开始
(
function
initialize
()
{
//分页的设置
//分页的设置
$scope
.
pagingOptions
=
{
pageIndex
:
1
,
//当前页码
totalItems
:
0
,
//总数据
totalItems
:
1
,
//总数据
pageSize
:
100
,
//每页多少条数据
pageSizeString
:
"100"
};
/**************************************** function start*************************************************/
$scope
.
displayType
=
2
;
...
...
@@ -1030,8 +1036,9 @@
initColumns
();
initDxGrid
();
initAssetResultDxGrid
();
getAssetResultList
(
1
);
// getAssetResultList(1);
$scope
.
refreshAssetResultListGrid
();
getGroupList
();
getGroupDetailList
();
getUserPermission
();
...
...
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