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
7ab29d95
Commit
7ab29d95
authored
Mar 15, 2019
by
gary
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev_mysql' into dev_mysql
parents
d077b460
3a96d22f
Show whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
200 additions
and
572 deletions
+200
-572
AssetListController.java
...java/pwc/taxtech/atms/controller/AssetListController.java
+22
-0
CitReportController.java
...java/pwc/taxtech/atms/controller/CitReportController.java
+14
-0
ReportController.java
...in/java/pwc/taxtech/atms/controller/ReportController.java
+4
-2
CitAssetsListDto.java
.../src/main/java/pwc/taxtech/atms/dto/CitAssetsListDto.java
+15
-0
PeriodJobDto.java
...c/main/java/pwc/taxtech/atms/dto/vatdto/PeriodJobDto.java
+13
-7
AssetListServiceImpl.java
...a/pwc/taxtech/atms/service/impl/AssetListServiceImpl.java
+31
-0
CitReportServiceImpl.java
...a/pwc/taxtech/atms/service/impl/CitReportServiceImpl.java
+11
-0
PeriodJobMapper.java
...c/main/java/pwc/taxtech/atms/vat/dao/PeriodJobMapper.java
+19
-0
cit.json
atms-web/src/main/webapp/app-resources/i18n/en-us/cit.json
+1
-1
cit-import-asset-list-search.html
...t/cit-import-asset-list/cit-import-asset-list-search.html
+1
-1
cit-import-asset-list.ctrl.js
...mport/cit-import-asset-list/cit-import-asset-list.ctrl.js
+48
-470
cit-import-asset-list.html
...t/import/cit-import-asset-list/cit-import-asset-list.html
+4
-81
cit-calculate-data.ctrl.js
...t/reduction/cit-calculate-data/cit-calculate-data.ctrl.js
+12
-9
assetList.svc.js
...b/src/main/webapp/app/common/webservices/assetList.svc.js
+4
-0
citReport.svc.js
...b/src/main/webapp/app/common/webservices/citReport.svc.js
+1
-1
No files found.
atms-api/src/main/java/pwc/taxtech/atms/controller/AssetListController.java
View file @
7ab29d95
...
...
@@ -6,6 +6,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.multipart.MultipartFile
;
import
pwc.taxtech.atms.dto.ApiResultDto
;
import
pwc.taxtech.atms.dto.CitAssetsListDto
;
import
pwc.taxtech.atms.dto.OperationResultDto
;
import
pwc.taxtech.atms.entity.CitAssetGroupResult
;
import
pwc.taxtech.atms.entity.CitAssetsList
;
...
...
@@ -71,6 +72,27 @@ public class AssetListController {
return
apiResultDto
;
}
}
/**
* 根据资产类别(固定资产、长期待摊、无形资产)查询出结果
* @param citAssetsListDto
* @return
*/
@RequestMapping
(
value
=
"/getAssetResultListPage"
,
method
=
RequestMethod
.
POST
)
public
@ResponseBody
ApiResultDto
getAssetResultListPage
(
@RequestBody
CitAssetsListDto
citAssetsListDto
){
logger
.
info
(
"根据资产类别获取资产清单"
);
ApiResultDto
apiResultDto
=
new
ApiResultDto
();
try
{
apiResultDto
.
setCode
(
1
);
apiResultDto
.
setMessage
(
"获取成功"
);
apiResultDto
.
setData
(
assetListService
.
getAssetResultListPage
(
citAssetsListDto
));
return
apiResultDto
;
}
catch
(
Exception
e
){
e
.
printStackTrace
();
apiResultDto
.
setCode
(
0
);
apiResultDto
.
setMessage
(
"获取失败"
);
return
apiResultDto
;
}
}
/**
*
...
...
atms-api/src/main/java/pwc/taxtech/atms/controller/CitReportController.java
View file @
7ab29d95
...
...
@@ -7,7 +7,9 @@ import org.springframework.web.bind.annotation.*;
import
pwc.taxtech.atms.constant.enums.EnumServiceType
;
import
pwc.taxtech.atms.dpo.ReportDto
;
import
pwc.taxtech.atms.dto.OperationResultDto
;
import
pwc.taxtech.atms.dto.vatdto.PeriodJobDto
;
import
pwc.taxtech.atms.service.impl.CitReportServiceImpl
;
import
pwc.taxtech.atms.vat.entity.PeriodJob
;
import
pwc.taxtech.atms.vat.service.impl.ReportServiceImpl
;
import
java.util.List
;
...
...
@@ -57,4 +59,15 @@ public class CitReportController {
return
citReportService
.
getFilterReportTemplate
(
projectId
,
EnumServiceType
.
getEnumByCode
(
serviceType
),
period
);
}
@RequestMapping
(
value
=
"getPeriodJob/{projectId}/{period}"
,
method
=
RequestMethod
.
GET
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
@ResponseBody
public
PeriodJobDto
getPeriodJob
(
@PathVariable
String
projectId
,
@PathVariable
Integer
period
)
{
PeriodJob
job
=
citReportService
.
getPeriodJob
(
projectId
,
period
);
if
(
job
!=
null
)
{
return
new
PeriodJobDto
().
copyFromPeriodJob
(
job
);
}
else
{
return
null
;
}
}
}
\ No newline at end of file
atms-api/src/main/java/pwc/taxtech/atms/controller/ReportController.java
View file @
7ab29d95
...
...
@@ -54,9 +54,11 @@ public class ReportController {
@ResponseBody
public
PeriodJobDto
getRunningJob
(
@PathVariable
String
projectId
,
@PathVariable
Integer
period
)
{
PeriodJob
job
=
reportService
.
getRunningJob
(
projectId
,
period
);
if
(
job
!=
null
)
if
(
job
!=
null
)
{
return
new
PeriodJobDto
().
copyFromPeriodJob
(
job
);
else
return
null
;
}
else
{
return
null
;
}
}
@RequestMapping
(
value
=
"getJobStatus/{projectId}//{period}/{jobId}"
,
method
=
RequestMethod
.
GET
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
...
...
atms-api/src/main/java/pwc/taxtech/atms/dto/CitAssetsListDto.java
View file @
7ab29d95
...
...
@@ -2,6 +2,7 @@ package pwc.taxtech.atms.dto;
import
com.fasterxml.jackson.databind.annotation.JsonSerialize
;
import
pwc.taxtech.atms.common.util.PwCIdSerialize
;
import
pwc.taxtech.atms.dpo.PagingDto
;
import
pwc.taxtech.atms.entity.BaseEntity
;
import
java.io.Serializable
;
...
...
@@ -423,6 +424,8 @@ public class CitAssetsListDto implements Serializable {
*/
private
String
taxGroupName
;
private
PagingDto
pageInfo
;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table assets_list
...
...
@@ -1307,6 +1310,18 @@ public class CitAssetsListDto implements Serializable {
this
.
taxGroupName
=
taxGroupName
==
null
?
null
:
taxGroupName
.
trim
();
}
public
Integer
getTaxAccountCompare
()
{
return
taxAccountCompare
;
}
public
PagingDto
getPageInfo
()
{
return
pageInfo
;
}
public
void
setPageInfo
(
PagingDto
pageInfo
)
{
this
.
pageInfo
=
pageInfo
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table assets_list
...
...
atms-api/src/main/java/pwc/taxtech/atms/dto/vatdto/PeriodJobDto.java
View file @
7ab29d95
...
...
@@ -36,15 +36,21 @@ public class PeriodJobDto {
this
.
errorMsg
=
job
.
getErrorMsg
();
MyAsserts
.
assertNotEmpty
(
stepsCode
,
Exceptions
.
SERVER_ERROR_EXCEPTION
);
if
(
StringUtils
.
isBlank
(
status
))
this
.
jobStatus
=
STATUS_BEGIN
;
else
{
if
(
StringUtils
.
isBlank
(
status
))
{
this
.
jobStatus
=
STATUS_BEGIN
;
}
else
{
List
<
WrapPeriodJobDto
.
Task
>
tasks
=
WrapPeriodJobDto
.
fromJson
(
status
);
if
(
Collections
.
isEmpty
(
tasks
))
this
.
jobStatus
=
STATUS_BEGIN
;
else
{
if
(
Collections
.
isEmpty
(
tasks
))
{
this
.
jobStatus
=
STATUS_BEGIN
;
}
else
{
String
[]
codes
=
stepsCode
.
split
(
","
);
if
(
tasks
.
stream
().
anyMatch
(
m
->
m
.
status
.
equals
(
STATUS_ERROR
)))
this
.
jobStatus
=
STATUS_ERROR
;
else
if
(
tasks
.
size
()
<
codes
.
length
)
this
.
jobStatus
=
STATUS_RUNNING
;
else
this
.
jobStatus
=
STATUS_END
;
if
(
tasks
.
stream
().
anyMatch
(
m
->
m
.
status
.
equals
(
STATUS_ERROR
)))
{
this
.
jobStatus
=
STATUS_ERROR
;
}
else
if
(
tasks
.
size
()
<
codes
.
length
)
{
this
.
jobStatus
=
STATUS_RUNNING
;
}
else
{
this
.
jobStatus
=
STATUS_END
;
}
}
}
...
...
atms-api/src/main/java/pwc/taxtech/atms/service/impl/AssetListServiceImpl.java
View file @
7ab29d95
package
pwc
.
taxtech
.
atms
.
service
.
impl
;
import
com.github.pagehelper.Page
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageInfo
;
import
org.apache.commons.io.FileUtils
;
import
org.apache.poi.openxml4j.exceptions.InvalidFormatException
;
import
org.apache.poi.ss.usermodel.*
;
...
...
@@ -83,6 +86,34 @@ public class AssetListServiceImpl extends BaseService {
return
citAssetsListDtos
;
}
/**
* 根据资产类别(固定资产、长期待摊、无形资产)查询出结果
*/
public
PageInfo
<
CitAssetsListDto
>
getAssetResultListPage
(
CitAssetsListDto
citAssetsListDto
)
throws
Exception
{
logger
.
debug
(
"根据资产类别(固定资产、长期待摊、无形资产)查询出结果"
);
CitAssetsListExample
assetListExample
=
new
CitAssetsListExample
();
CitAssetsListExample
.
Criteria
criteria
=
assetListExample
.
createCriteria
();
criteria
.
andProjectIdEqualTo
(
citAssetsListDto
.
getProjectId
());
criteria
.
andAssetTypeEqualTo
(
citAssetsListDto
.
getAssetType
());
criteria
.
andStatusEqualTo
(
1
);
if
(
citAssetsListDto
.
getTaxAccountCompare
()
!=
2
){
criteria
.
andTaxAccountCompareEqualTo
(
citAssetsListDto
.
getTaxAccountCompare
());
}
Page
page
=
PageHelper
.
startPage
(
citAssetsListDto
.
getPageInfo
().
getPageIndex
(),
citAssetsListDto
.
getPageInfo
().
getPageSize
());
List
<
CitAssetsList
>
citAssetsLists
=
assetListMapper
.
selectByExample
(
assetListExample
);
List
<
CitAssetsListDto
>
citAssetsListDtos
=
new
ArrayList
<>();
for
(
CitAssetsList
citAssetsList:
citAssetsLists
){
CitAssetsListDto
temp
=
new
CitAssetsListDto
();
BeanUtils
.
copyProperties
(
citAssetsList
,
temp
);
citAssetsListDtos
.
add
(
temp
);
}
PageInfo
<
CitAssetsListDto
>
pageInfo
=
new
PageInfo
<>(
citAssetsListDtos
);
pageInfo
.
setTotal
(
page
.
getTotal
());
pageInfo
.
setPageNum
(
citAssetsListDto
.
getPageInfo
().
getPageIndex
());
return
pageInfo
;
}
public
List
<
CitAssetGroupResultDto
>
getAssetGroupResultData
(
String
projectId
)
throws
Exception
{
logger
.
debug
(
"根据projectId获取该资产类别相关数据"
);
CitAssetGroupResultExample
assetGroupResultExample
=
new
CitAssetGroupResultExample
();
...
...
atms-api/src/main/java/pwc/taxtech/atms/service/impl/CitReportServiceImpl.java
View file @
7ab29d95
...
...
@@ -655,6 +655,17 @@ public class CitReportServiceImpl extends BaseService {
}
}
/**
* 查询最新的任务
* @param projectId
* @param period
* @return
*/
public
PeriodJob
getPeriodJob
(
String
projectId
,
Integer
period
)
{
return
periodJobMapper
.
getPeriodJob
(
projectId
,
period
);
}
/**
* 获取符合条件的PeriodJob以供前台判断job执行的阶段
*
...
...
atms-dao/src/main/java/pwc/taxtech/atms/vat/dao/PeriodJobMapper.java
View file @
7ab29d95
...
...
@@ -125,6 +125,25 @@ public interface PeriodJobMapper extends MyVatMapper {
" AND period =#{period}"
)
PeriodJob
getRunningJob
(
@Param
(
"projectId"
)
String
projectId
,
@Param
(
"period"
)
Integer
period
);
@Select
(
"SELECT "
+
" id AS id, "
+
" name AS name, "
+
" current_step AS currentStep, "
+
" project_id AS projectId, "
+
" period AS period, "
+
" steps_code AS stepsCode, "
+
" create_time AS createTime, "
+
" status AS status, "
+
" error_msg AS errorMsg "
+
"FROM "
+
" period_job "
+
"WHERE "
+
" project_id = #{projectId} "
+
" AND period =#{period}"
+
" order by create_time desc LIMIT 1 "
)
PeriodJob
getPeriodJob
(
@Param
(
"projectId"
)
String
projectId
,
@Param
(
"period"
)
Integer
period
);
@Select
(
"SELECT "
+
" id AS id, "
+
" name AS name, "
+
...
...
atms-web/src/main/webapp/app-resources/i18n/en-us/cit.json
View file @
7ab29d95
...
...
@@ -1038,7 +1038,7 @@
"chartType"
:
"Chart Type"
,
"completed"
:
"Completed"
,
"customInvoice"
:
"Customs List"
,
"dateFormat4Year"
:
" y
ear
"
,
"dateFormat4Year"
:
" y
yyy
"
,
"dateFormat4YearMonth"
:
" yyyy-mm"
,
"dateFormat4YearMonthDay"
:
"yyyy-mm-dd"
,
"dateFormat4YearMonthDayCh"
:
"yyyy-mm-dd"
,
...
...
atms-web/src/main/webapp/app/cit/import/cit-import-asset-list/cit-import-asset-list-search.html
View file @
7ab29d95
...
...
@@ -7,7 +7,7 @@
<td>
<!--税会差异的选择-->
<div
class=
"input-group"
>
<div
class=
"option"
style=
"display: inline-block"
>
<div
class=
"option"
>
<div
id=
"taxAccountDifferenceButton"
dx-select-box=
"taxAccountDifferenceOptions"
></div>
</div>
</div>
...
...
atms-web/src/main/webapp/app/cit/import/cit-import-asset-list/cit-import-asset-list.ctrl.js
View file @
7ab29d95
...
...
@@ -7,7 +7,6 @@
'use strict'
;
var
projectId
=
vatSessionService
.
project
.
id
;
var
taxAccountCompare
=
2
;
var
successCount
=
0
;
var
uploadUrl
=
apiInterceptor
.
webApiHostUrl
+
'/asset/assetsImport'
;
var
webHost
=
loginContext
.
apiHost
;
...
...
@@ -36,20 +35,6 @@
Period
:
''
,
};
//初始化ack-pagination
$scope
.
pagingOptions
=
{
pageIndex
:
1
,
//当前页码
totalItems
:
0
,
//总数据
totalPages
:
10
,
//总页数
maxSize
:
5
,
//分页数字的限制。
pageSize
:
20
,
//pageSize: constant.page.pageSizeArrary[3], //每页多少条数据,100条
pageSizeString
:
constant
.
page
.
pageSizeArrary
[
3
].
toString
(),
firstPage
:
$translate
.
instant
(
'PagingFirstPage'
),
previousPage
:
$translate
.
instant
(
'PagingPreviousPage'
),
nextPage
:
$translate
.
instant
(
'PagingNextPage'
),
lastPage
:
$translate
.
instant
(
'PagingLastPage'
),
};
//导入方式
$scope
.
importEnum
=
{
Import
:
0
,
CoverImport
:
1
,
AddImport
:
2
};
$scope
.
sheetData
=
{
sheetNameList
:
[],
dataList
:
[],
selectedSheetIndex
:
0
};
...
...
@@ -63,6 +48,37 @@
$scope
.
isShowImportTotalBtn
=
true
;
$scope
.
SelectAll
=
false
;
$scope
.
citAssetsListDto
=
{
pageInfo
:
{
totalCount
:
0
,
pageIndex
:
1
,
pageSize
:
100
,
totalPage
:
0
},
assetType
:
1
,
projectId
:
projectId
,
taxAccountCompare
:
2
};
//分页的设置
debugger
;
$scope
.
pagingOptions2
=
{
pageIndex
:
1
,
//当前页码
pageSize
:
constant
.
page
.
pageSizeArrary
[
3
],
//每页多少条数据
totalItems
:
$scope
.
citAssetsListDto
.
pageInfo
.
totalCount
,
//总数据
totalPages
:
0
,
//总页数
pageSizeString
:
constant
.
page
.
pageSizeArrary
[
3
].
toString
(),
firstPage
:
'<<'
,
//$translate.instant('PagingFirstPage'),
previousPage
:
'<'
,
//$translate.instant('PagingPreviousPage'),
nextPage
:
'>'
,
// $translate.instant('PagingNextPage'),
lastPage
:
'>>'
,
//$translate.instant('PagingLastPage'),
};
//赋值
$scope
.
pageOptions
=
$scope
.
pagingOptions2
;
$scope
.
refreshAssetResultListGrid
=
function
()
{
debugger
;
$log
.
debug
(
"refreshAssetResultListGrid"
);
getAssetResultList
(
$scope
.
citAssetsListDto
.
assetType
);
};
//初始化列数据
var
initColumns
=
function
()
{
...
...
@@ -105,40 +121,6 @@
];
};
//发票信息汇总数据表选择列名事件
//parentIndex:当前列号
//index:下拉列表中选项的序号
var
mappingColumn
=
function
(
parentIndex
,
index
,
colName
)
{
if
(
colName
)
{
var
oldColumn
=
$scope
.
selectedColumnMap
[
parentIndex
];
var
newColumn
=
$scope
.
incomeInvoiceTotalColumns
[
index
];
//如果新的选择项与老的选择项一致,则不进行操作
if
(
oldColumn
===
newColumn
)
{
return
;
}
else
{
$scope
.
selectedColumnMap
[
parentIndex
]
=
colName
;
if
(
colName
!==
$translate
.
instant
(
'PleaseSelectColumn'
))
{
//如果当前选择的不是"请选择列名",则将选项从数组中移除
$scope
.
incomeInvoiceTotalColumns
.
splice
(
index
,
1
);
if
(
oldColumn
&&
oldColumn
!==
$translate
.
instant
(
'PleaseSelectColumn'
))
{
//将老的选项追加到选项列表中
$scope
.
incomeInvoiceTotalColumns
.
push
(
oldColumn
);
}
}
else
{
//如果当前选中的是"请选择列名",则将该列原来的列名追加到选项列表中
if
(
oldColumn
)
{
$scope
.
incomeInvoiceTotalColumns
.
push
(
oldColumn
);
}
}
}
}
//$log.debug($scope.selectedColumnMap);
};
//上传文件
var
uploadfile
=
function
(
file
)
{
var
url
=
uploadUrl
;
...
...
@@ -167,7 +149,7 @@
__RequestVerificationToken
:
token
,
withCredentials
:
true
}).
then
(
uploadSuccess
).
error
(
function
(){
SweetAlert
(
'
哪就错了,瞎报错
'
);
SweetAlert
(
'
系统内部错误
'
);
});
}
}
...
...
@@ -231,232 +213,8 @@
}
};
//转换没有选中的列值
function
undefinedToNull
(
inputData
,
type
)
{
if
(
PWC
.
isNullOrEmpty
(
inputData
))
{
if
(
type
==
0
)
{
return
0
;
}
if
(
type
==
1
)
{
return
null
;
}
else
{
return
0
;
}
}
else
{
return
inputData
;
}
}
//获取导入的Excel信息
function
getImportExcelData
(
startRow
)
{
//将需要导入的数据组装到list中
var
inputList
=
[];
for
(
var
i
=
startRow
-
1
;
i
<
$scope
.
sheetData
.
dataList
.
length
;
i
++
)
{
var
invoiceInfo
=
{
'Index'
:
$scope
.
sheetData
.
dataList
[
i
].
index
,
//行号
'AssetNumber'
:
$scope
.
sheetData
.
dataList
[
i
][
$
.
inArray
(
$translate
.
instant
(
'AssetNumber'
),
$scope
.
selectedColumnMap
)],
'AssetGroupName'
:
$scope
.
sheetData
.
dataList
[
i
][
$
.
inArray
(
$translate
.
instant
(
'AssetGroupName'
),
$scope
.
selectedColumnMap
)],
'AssetDescription'
:
undefinedToNull
(
$scope
.
sheetData
.
dataList
[
i
][
$
.
inArray
(
$translate
.
instant
(
'AssetDescription'
),
$scope
.
selectedColumnMap
)],
1
),
'BuyDate'
:
$scope
.
sheetData
.
dataList
[
i
][
$
.
inArray
(
$translate
.
instant
(
'BuyDate'
),
$scope
.
selectedColumnMap
)],
'DepreciationDate'
:
undefinedToNull
(
$scope
.
sheetData
.
dataList
[
i
][
$
.
inArray
(
$translate
.
instant
(
'DepreciationDate'
),
$scope
.
selectedColumnMap
)],
1
),
'DepreciationPeriod'
:
undefinedToNull
(
$scope
.
sheetData
.
dataList
[
i
][
$
.
inArray
(
$translate
.
instant
(
'DepreciationPeriod'
),
$scope
.
selectedColumnMap
)],
0
),
'AcquisitionValue'
:
$scope
.
sheetData
.
dataList
[
i
][
$
.
inArray
(
$translate
.
instant
(
'AcquisitionValue'
),
$scope
.
selectedColumnMap
)],
'AdjustmentValue'
:
undefinedToNull
(
$scope
.
sheetData
.
dataList
[
i
][
$
.
inArray
(
$translate
.
instant
(
'AdjustmentValue'
),
$scope
.
selectedColumnMap
)],
0
),
'DisposedDate'
:
undefinedToNull
(
$scope
.
sheetData
.
dataList
[
i
][
$
.
inArray
(
$translate
.
instant
(
'DisposedDate'
),
$scope
.
selectedColumnMap
)],
1
),
'ResidualRate'
:
undefinedToNull
(
$scope
.
sheetData
.
dataList
[
i
][
$
.
inArray
(
$translate
.
instant
(
'ResidualRate'
),
$scope
.
selectedColumnMap
)],
0
),
'YearDepreciationAmount'
:
undefinedToNull
(
$scope
.
sheetData
.
dataList
[
i
][
$
.
inArray
(
$translate
.
instant
(
'YearDepreciationAmount'
),
$scope
.
selectedColumnMap
)],
0
),
'YearAdjustmentAmount'
:
undefinedToNull
(
$scope
.
sheetData
.
dataList
[
i
][
$
.
inArray
(
$translate
.
instant
(
'YearAdjustmentAmount'
),
$scope
.
selectedColumnMap
)],
0
),
'YearEndValue'
:
undefinedToNull
(
$scope
.
sheetData
.
dataList
[
i
][
$
.
inArray
(
$translate
.
instant
(
'YearEndValue'
),
$scope
.
selectedColumnMap
)],
0
),
'Status'
:
$scope
.
sheetData
.
dataList
[
i
][
$
.
inArray
(
$translate
.
instant
(
'AssetStatus'
),
$scope
.
selectedColumnMap
)],
};
inputList
.
push
(
invoiceInfo
);
}
return
inputList
;
}
//1.判断是否有没有map的必须列和起始行输入格式是否正确
var
ColumnsMapCheckIncomeInvoice
=
function
()
{
var
result
=
true
;
//1:判断是否有没有map的必须列
var
notMappedColumns
=
''
;
if
(
$scope
.
selectedColumnMap
.
length
>=
0
)
{
var
count1
=
0
;
$scope
.
mustMappingTotalColumns
.
forEach
(
function
(
m
)
{
if
(
m
!==
$translate
.
instant
(
'PleaseSelectColumn'
))
{
if
(
$
.
inArray
(
m
,
$scope
.
selectedColumnMap
)
<
0
)
{
notMappedColumns
+=
m
+
','
;
count1
++
;
}
}
});
if
(
count1
)
{
result
=
false
;
//加入到错误列表中
$scope
.
errorMsgMap
.
push
(
{
'errorType'
:
$translate
.
instant
(
'ColumnsMapErrorType'
),
'errorCount'
:
count1
,
'errorContent'
:
$translate
.
instant
(
'ColumnsMapErrorMsg'
).
formatObj
({
columns
:
notMappedColumns
.
substring
(
0
,
notMappedColumns
.
length
-
1
)
})
});
}
}
//2:判断起始行输入框输入内容是否合理
var
startNumberCheckMsg
=
''
;
var
startRowNum
=
$
(
'#StartRowNum'
).
val
();
if
(
startRowNum
===
''
)
{
result
=
false
;
$scope
.
errorMsgMap
.
push
(
{
'errorType'
:
$translate
.
instant
(
'StartRowError'
),
'errorCount'
:
1
,
'errorContent'
:
$translate
.
instant
(
'StartRowNull'
)
});
}
else
if
(
parseInt
(
startRowNum
)
>
$scope
.
sheetData
.
dataList
.
length
)
{
result
=
false
;
$scope
.
errorMsgMap
.
push
(
{
'errorType'
:
$translate
.
instant
(
'StartRowError'
),
'errorCount'
:
1
,
'errorContent'
:
$translate
.
instant
(
'StartRowNumberCheckMsg'
)
});
}
return
result
;
};
//前端验证
function
frontEndValidData
(
inputList
)
{
//4.购入日期验证,不能为空,且格式正确
var
buyDateCheckMsg
=
''
;
var
count1
=
0
;
//产品编号不能为空
var
assetNumberCheckMsg
=
''
;
var
count2
=
0
;
//资产类别不能为空
var
groupNameCheckMsg
=
''
;
var
count3
=
0
;
//原值不能为空
var
acquisitionValueCheckMsg
=
''
;
var
count4
=
0
;
//数字类型验证
var
amountNumberCheckMsg
=
''
;
var
count5
=
0
;
inputList
.
forEach
(
function
(
m
)
{
//购入日期为空
if
(
PWC
.
isNullOrEmpty
(
m
.
BuyDate
))
{
buyDateCheckMsg
+=
'('
+
$translate
.
instant
(
'RowIndex'
).
formatObj
({
rowIndex
:
m
.
Index
})
+
')'
+
$translate
.
instant
(
'BuyDateNullMsg'
)
+
'<br />'
;
count1
++
;
}
//日期格式错误
else
if
(
!
PWC
.
checkDateType
(
m
.
BuyDate
))
{
buyDateCheckMsg
+=
'('
+
$translate
.
instant
(
'RowIndex'
).
formatObj
({
rowIndex
:
m
.
Index
})
+
')'
+
$translate
.
instant
(
'BuyDateErrorMsg'
)
+
'<br />'
;
count1
++
;
}
if
(
PWC
.
isNullOrEmpty
(
m
.
AssetNumber
))
{
assetNumberCheckMsg
+=
'('
+
$translate
.
instant
(
'RowIndex'
).
formatObj
({
rowIndex
:
m
.
Index
})
+
')'
+
$translate
.
instant
(
'AssetNumberNullMsg'
)
+
'<br />'
;
count2
++
;
}
if
(
PWC
.
isNullOrEmpty
(
m
.
AssetGroupName
))
{
groupNameCheckMsg
+=
'('
+
$translate
.
instant
(
'RowIndex'
).
formatObj
({
rowIndex
:
m
.
Index
})
+
')'
+
$translate
.
instant
(
'AssetGroupNameNullMsg'
)
+
'<br />'
;
count3
++
;
}
if
(
PWC
.
isNullOrEmpty
(
m
.
AcquisitionValue
))
{
acquisitionValueCheckMsg
+=
'('
+
$translate
.
instant
(
'RowIndex'
).
formatObj
({
rowIndex
:
m
.
Index
})
+
')'
+
$translate
.
instant
(
'AcquisitionValueNullMsg'
)
+
'<br />'
;
count4
++
;
}
//开始折旧日期格式错误
if
(
!
PWC
.
isNullOrEmpty
(
m
.
DepreciationDate
)
&&
!
PWC
.
checkDateType
(
m
.
DepreciationDate
))
{
amountNumberCheckMsg
+=
'('
+
$translate
.
instant
(
'RowIndex'
).
formatObj
({
rowIndex
:
m
.
Index
})
+
')'
+
$translate
.
instant
(
'DepreciationDate'
)
+
$translate
.
instant
(
'DataTypeErrorMsg'
)
+
'<br />'
;
count5
++
;
}
if
(
!
PWC
.
isNullOrEmpty
(
m
.
DisposedDate
)
&&
!
PWC
.
checkDateType
(
m
.
DisposedDate
))
{
amountNumberCheckMsg
+=
'('
+
$translate
.
instant
(
'RowIndex'
).
formatObj
({
rowIndex
:
m
.
Index
})
+
')'
+
$translate
.
instant
(
'DisposedDate'
)
+
$translate
.
instant
(
'DataTypeErrorMsg'
)
+
'<br />'
;
count5
++
;
}
//判断是否为数字
if
(
isNaN
(
Number
(
m
.
DepreciationPeriod
)))
{
amountNumberCheckMsg
+=
'('
+
$translate
.
instant
(
'RowIndex'
).
formatObj
({
rowIndex
:
m
.
Index
})
+
')'
+
$translate
.
instant
(
'DepreciationPeriod'
)
+
$translate
.
instant
(
'DataTypeErrorMsg'
)
+
';<br />'
;
count5
++
;
}
if
(
isNaN
(
Number
(
m
.
AcquisitionValue
)))
{
amountNumberCheckMsg
+=
'('
+
$translate
.
instant
(
'RowIndex'
).
formatObj
({
rowIndex
:
m
.
Index
})
+
')'
+
$translate
.
instant
(
'AcquisitionValue'
)
+
$translate
.
instant
(
'DataTypeErrorMsg'
)
+
';<br />'
;
count5
++
;
}
if
(
isNaN
(
Number
(
m
.
AdjustmentValue
)))
{
amountNumberCheckMsg
+=
'('
+
$translate
.
instant
(
'RowIndex'
).
formatObj
({
rowIndex
:
m
.
Index
})
+
')'
+
$translate
.
instant
(
'AdjustmentValue'
)
+
$translate
.
instant
(
'DataTypeErrorMsg'
)
+
';<br />'
;
count5
++
;
}
if
(
isNaN
(
Number
(
m
.
ResidualRate
)))
{
amountNumberCheckMsg
+=
'('
+
$translate
.
instant
(
'RowIndex'
).
formatObj
({
rowIndex
:
m
.
Index
})
+
')'
+
$translate
.
instant
(
'ResidualRate'
)
+
$translate
.
instant
(
'DataTypeErrorMsg'
)
+
';<br />'
;
count5
++
;
}
if
(
isNaN
(
Number
(
m
.
YearDepreciationAmount
)))
{
amountNumberCheckMsg
+=
'('
+
$translate
.
instant
(
'RowIndex'
).
formatObj
({
rowIndex
:
m
.
Index
})
+
')'
+
$translate
.
instant
(
'YearDepreciationAmount'
)
+
$translate
.
instant
(
'DataTypeErrorMsg'
)
+
';<br />'
;
count5
++
;
}
if
(
isNaN
(
Number
(
m
.
YearAdjustmentAmount
)))
{
amountNumberCheckMsg
+=
'('
+
$translate
.
instant
(
'RowIndex'
).
formatObj
({
rowIndex
:
m
.
Index
})
+
')'
+
$translate
.
instant
(
'YearDepreciationAmount'
)
+
$translate
.
instant
(
'DataTypeErrorMsg'
)
+
';<br />'
;
count5
++
;
}
if
(
isNaN
(
Number
(
m
.
YearEndValue
)))
{
amountNumberCheckMsg
+=
'('
+
$translate
.
instant
(
'RowIndex'
).
formatObj
({
rowIndex
:
m
.
Index
})
+
')'
+
$translate
.
instant
(
'YearEndValue'
)
+
$translate
.
instant
(
'DataTypeErrorMsg'
)
+
';<br />'
;
count5
++
;
}
});
if
(
count1
>
0
)
{
$scope
.
errorMsgMap
.
push
(
{
'errorType'
:
$translate
.
instant
(
'BuyDateType'
),
'errorCount'
:
count1
,
'errorContent'
:
buyDateCheckMsg
});
}
if
(
count2
>
0
)
{
$scope
.
errorMsgMap
.
push
(
{
'errorType'
:
$translate
.
instant
(
'AssetNumberType'
),
'errorCount'
:
count2
,
'errorContent'
:
assetNumberCheckMsg
});
}
if
(
count3
>
0
)
{
$scope
.
errorMsgMap
.
push
(
{
'errorType'
:
$translate
.
instant
(
'AssetGroupNameType'
),
'errorCount'
:
count3
,
'errorContent'
:
groupNameCheckMsg
});
}
if
(
count4
>
0
)
{
$scope
.
errorMsgMap
.
push
(
{
'errorType'
:
$translate
.
instant
(
'AcquisitionValueType'
),
'errorCount'
:
count4
,
'errorContent'
:
acquisitionValueCheckMsg
});
}
if
(
count5
>
0
)
{
$scope
.
errorMsgMap
.
push
(
{
'errorType'
:
$translate
.
instant
(
'DataTypeError'
),
'errorCount'
:
count5
,
'errorContent'
:
amountNumberCheckMsg
});
}
}
//简易导入,importType来分辨是覆盖导入还是追加导入
$scope
.
importDataNew
=
function
(
importType
){
var
a
=
projectId
;
if
(
!
$scope
.
file
||
!
$scope
.
file
.
name
)
{
SweetAlert
.
warning
(
$translate
.
instant
(
'SelectImportFileRequired'
));
...
...
@@ -506,183 +264,17 @@
});
};
//点击导入按钮时,进行导入操作---原方法
function
importData
(
importType
)
{
$scope
.
errorMsgMap
=
[];
//设置数据导入时的起始行,默认设置从第一行开始
var
startRowNum
=
1
;
if
(
$
(
'#StartRowNum'
).
val
())
{
startRowNum
=
$
(
'#StartRowNum'
).
val
();
}
if
(
!
$scope
.
fileName
)
{
SweetAlert
.
warning
(
$translate
.
instant
(
'PleaseSelectFileFirst'
));
return
;
}
//判断是否有没有map的必须列和起始行输入格式是否正确
if
(
!
ColumnsMapCheckIncomeInvoice
())
{
$
(
'#errorListModal'
).
modal
(
'show'
);
return
;
}
//日志对象
logDto
.
ID
=
PWC
.
newGuid
();
logDto
.
CreateTime
=
new
Date
();
logDto
.
UpdateTime
=
new
Date
();
logDto
.
OperationContent
=
$scope
.
fileName
;
if
(
importType
===
$scope
.
importEnum
.
Import
)
{
logDto
.
OperationName
=
$translate
.
instant
(
'ImportOutputInvoice'
);
logDto
.
OperationType
=
enums
.
vatLogOperationTypeEnum
.
Import
;
}
else
if
(
importType
===
$scope
.
importEnum
.
CoverImport
)
{
logDto
.
OperationName
=
$translate
.
instant
(
'CoverImportOutputInvoice'
);
logDto
.
OperationType
=
enums
.
vatLogOperationTypeEnum
.
CoverImport
;
}
else
if
(
importType
===
$scope
.
importEnum
.
AddImport
)
{
logDto
.
OperationName
=
$translate
.
instant
(
'AddImportOutputInvoice'
);
logDto
.
OperationType
=
enums
.
vatLogOperationTypeEnum
.
AddImport
;
}
//获取数据
var
inputList
=
getImportExcelData
(
startRowNum
);
//前台数据验证
frontEndValidData
(
inputList
);
if
(
$scope
.
errorMsgMap
.
length
>
0
)
{
$
(
'#errorListModal'
).
modal
(
'show'
);
return
;
}
else
{
assetListService
.
importAssetList
(
inputList
,
importType
).
success
(
function
(
or
)
{
//修改状态
vatCommonService
.
importSetProjectStatus
(
projectDbName
,
-
1
,
constant
.
DictionaryDictKey
.
WFImportAsset
,
enums
.
FinishStatusEnum
.
Finished
);
if
(
or
&&
or
.
result
)
{
logDto
.
UpdateState
=
$translate
.
instant
(
'ImportSuccess'
);
vatOperationLogService
.
addOperationLog
(
logDto
);
initDataFromDB
();
$scope
.
fileName
=
''
;
getValidationList
();
//有没有分类的数据
if
(
or
.
data
&&
or
.
data
.
length
>
0
)
{
var
index
=
1
;
or
.
data
.
forEach
(
function
(
v
)
{
v
.
index
=
index
++
;
});
$scope
.
assetGroupResultDataSource
=
or
.
data
;
InitGrid
(
false
);
$scope
.
saveGroupType
=
1
;
$scope
.
isDisabled
=
true
;
$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
.
success
(
$translate
.
instant
(
'ImportSuccess'
));
}
}
else
{
logDto
.
UpdateState
=
$translate
.
instant
(
'ImportFail'
);
vatOperationLogService
.
addOperationLog
(
logDto
);
SweetAlert
.
error
(
$translate
.
instant
(
'ImportFail'
));
}
}).
error
(
function
()
{
logDto
.
UpdateState
=
$translate
.
instant
(
'ImportFail'
);
vatOperationLogService
.
addOperationLog
(
logDto
);
SweetAlert
.
error
(
serviceErrorMsg
);
});
}
}
//获取后台验证信息----原方法
function
getValidationList
()
{
vatImportService
.
getValidationList
(
enums
.
EnumValidationType
.
AssetDiffData
,
0
).
success
(
function
(
data
)
{
if
(
data
.
length
>
0
)
{
var
index
=
1
;
data
.
forEach
(
function
(
v
)
{
v
.
index
=
index
++
;
});
$scope
.
errorList
=
data
;
$scope
.
gridOptionsErrorMsg
.
data
=
data
;
showErrTab
();
$scope
.
toggleErrorTab
();
$scope
.
showErrorTable
=
true
;
}
else
{
$scope
.
errorList
=
[];
$scope
.
gridOptionsErrorMsg
.
data
=
[];
$scope
.
showErrorTable
=
false
;
$scope
.
ImportErrorTab
=
false
;
$scope
.
ImportErrorTag
=
false
;
}
}).
error
(
function
()
{
SweetAlert
.
error
(
serviceErrorMsg
);
});
}
//从数据库获取销项数据
function
initDataFromDB
()
{
$scope
.
showInitTable
=
true
;
$scope
.
showImportTable
=
false
;
citSessionService
.
dataChanged
=
false
;
$scope
.
sheetData
=
{
sheetNameList
:
[],
dataList
:
[],
selectedSheetIndex
:
0
};
$scope
.
invoiceData
=
[];
$scope
.
ImportTotalCount
=
0
;
$scope
.
ImportTotalAccountAcquisitionValue
=
0
;
$scope
.
ImportTotalAccountYearDepreciationAmount
=
0
;
$scope
.
ImportTotalTaxCurrentYearDepreciationAmount
=
0
;
$scope
.
ImportTotalYearDifferenceAmount
=
0
assetListService
.
getAssetListData
().
success
(
function
(
rsp
)
{
if
(
rsp
&&
rsp
.
length
>
0
)
{
$scope
.
isShowImportTotalBtn
=
false
;
initPagingControl
(
rsp
.
length
);
var
skipCount
=
(
$scope
.
pagingOptions
.
pageIndex
-
1
)
*
$scope
.
pagingOptions
.
pageSize
;
var
pagingData
=
_
.
chain
(
rsp
).
rest
(
skipCount
).
first
(
$scope
.
pagingOptions
.
pageSize
).
value
();
getValidationList
();
var
dataList
=
pagingData
;
var
index
=
1
;
dataList
.
forEach
(
function
(
v
)
{
v
.
index
=
index
++
;
});
$scope
.
assetDBData
=
_
.
clone
(
dataList
);
//合计列
rsp
.
forEach
(
function
(
v
)
{
$scope
.
ImportTotalAccountAcquisitionValue
+=
v
.
accountAcquisitionValue
;
$scope
.
ImportTotalAccountYearDepreciationAmount
+=
v
.
accountYearDepreciationAmount
;
$scope
.
ImportTotalTaxCurrentYearDepreciationAmount
+=
v
.
taxCurrentYearDepreciationAmount
;
if
(
v
.
isRetain
==
1
){
$scope
.
ImportTotalYearDifferenceAmount
+=
v
.
yearDifferenceAmount
;
}
});
$scope
.
ImportTotalCount
=
rsp
.
length
;
$scope
.
ImportTotalAccountAcquisitionValue
=
PWC
.
round
(
$scope
.
ImportTotalAccountAcquisitionValue
,
2
);
$scope
.
ImportTotalAccountYearDepreciationAmount
=
PWC
.
round
(
$scope
.
ImportTotalAccountYearDepreciationAmount
,
2
);
$scope
.
ImportTotalTaxCurrentYearDepreciationAmount
=
PWC
.
round
(
$scope
.
ImportTotalTaxCurrentYearDepreciationAmount
,
2
);
$scope
.
ImportTotalYearDifferenceAmount
=
PWC
.
round
(
$scope
.
ImportTotalYearDifferenceAmount
,
2
);
}
}).
error
(
function
()
{
SweetAlert
.
error
(
serviceErrorMsg
);
});
}
//根据分类获取数据
function
getAssetResultList
(
assetType
)
{
$scope
.
citAssetsListDto
.
assetType
=
assetType
;
$scope
.
TotalCount
=
0
;
$scope
.
TotalAccountAcquisitionValue
=
0
;
$scope
.
TotalAccountYearDepreciationAmount
=
0
;
$scope
.
TotalTaxCurrentYearDepreciationAmount
=
0
;
$scope
.
TotalYearDifferenceAmount
=
0
assetListService
.
getAssetResultList
(
assetType
,
projectId
,
taxAccountCompare
).
success
(
function
(
assetListData
)
{
var
data
=
assetListData
.
data
;
$scope
.
TotalYearDifferenceAmount
=
0
;
assetListService
.
getAssetResultList
Page
(
$scope
.
citAssetsListDto
).
success
(
function
(
assetListData
)
{
debugger
;
var
data
=
assetListData
.
data
.
list
;
if
(
data
)
{
var
index
=
1
;
data
.
forEach
(
function
(
v
)
{
...
...
@@ -695,12 +287,14 @@
}
});
$scope
.
assetsResultData
=
data
;
$scope
.
TotalCount
=
data
.
length
;
//
$scope.TotalCount = data.length;
$scope
.
TotalAccountAcquisitionValue
=
PWC
.
round
(
$scope
.
TotalAccountAcquisitionValue
,
2
);
$scope
.
TotalAccountYearDepreciationAmount
=
PWC
.
round
(
$scope
.
TotalAccountYearDepreciationAmount
,
2
);
$scope
.
TotalTaxCurrentYearDepreciationAmount
=
PWC
.
round
(
$scope
.
TotalTaxCurrentYearDepreciationAmount
,
2
);
$scope
.
TotalYearDifferenceAmount
=
PWC
.
round
(
$scope
.
TotalYearDifferenceAmount
,
2
);
}
$scope
.
citAssetsListDto
.
pageInfo
.
totalCount
=
assetListData
.
data
.
total
;
$scope
.
pagingOptions2
.
totalItems
=
assetListData
.
data
.
total
;
});
}
...
...
@@ -719,10 +313,6 @@
};
var
initPagingControl
=
function
(
totalItemsCount
)
{
$scope
.
pagingOptions
.
totalItems
=
totalItemsCount
;
}
//显示明细
var
dealDetail
=
function
()
{
return
'<div ng-if="row.entity.isShowDetail === 1" class="ui-grid-cell-contents"><span><a ng-click="grid.appScope.openTab(row.entity.erpCheckTypeId,row.entity.validationDetails)">查看明细</a><span></div>'
+
...
...
@@ -874,7 +464,6 @@
],
width
:
'99%'
,
onToolbarPreparing
:
function
(
e
)
{
var
toolbarItems
=
e
.
toolbarOptions
.
items
;
var
toolbarItems
=
e
.
toolbarOptions
.
items
;
_
.
each
(
toolbarItems
,
function
(
item
)
{
if
(
item
.
name
===
'saveButton'
||
item
.
name
==
'revertButton'
)
{
...
...
@@ -1053,7 +642,7 @@
displayExpr
:
"name"
,
onValueChanged
:
function
(
data
)
{
taxAccountCompare
=
data
.
value
;
$scope
.
citAssetsListDto
.
taxAccountCompare
=
data
.
value
;
getAssetResultList
(
$scope
.
displayType
-
1
);
}
};
...
...
@@ -1242,13 +831,6 @@
}
}
$scope
.
pagingService
=
{
refreshInvoiceDataGrid
:
function
()
{
$log
.
debug
(
"refreshInvoiceDataGrid"
);
initDataFromDB
();
},
};
//切换tab
$scope
.
switchTab
=
function
(
event
,
type
)
{
$
(
'.nav-tab span'
).
each
(
function
()
{
...
...
@@ -1399,7 +981,6 @@
//开始
(
function
initialize
()
{
$log
.
debug
(
'ImportOutputInvoiceController.ctor()...'
);
/**************************************** function start*************************************************/
$scope
.
displayType
=
2
;
$scope
.
saveGroupType
=
1
;
...
...
@@ -1408,13 +989,10 @@
$scope
.
incomeInvoiceTotalColumns
=
[];
$scope
.
initIncomeInvoiceTotalColumnsIndex
=
[];
$scope
.
changeSheet
=
changeSheet
;
$scope
.
mappingColumn
=
mappingColumn
;
$scope
.
importData
=
importData
;
initColumns
();
initDxGrid
();
initAssetResultDxGrid
();
getAssetResultList
(
1
);
// initDataFromDB();
getGroupList
();
getGroupDetailList
();
getUserPermission
();
...
...
@@ -1434,13 +1012,13 @@
// }
// });
$timeout
(
function
()
{
if
(
$scope
.
dataGridInstance
)
{
$scope
.
dataGridInstance
.
option
(
"editing.allowUpdating"
,
$scope
.
hasEditPermission
);
$scope
.
dataGridInstance
.
refresh
();
}
},
1000
);
//
$timeout(function () {
//
if ($scope.dataGridInstance)
//
{
//
$scope.dataGridInstance.option("editing.allowUpdating", $scope.hasEditPermission);
//
$scope.dataGridInstance.refresh();
// }
//
}, 1000);
})();
}
...
...
atms-web/src/main/webapp/app/cit/import/cit-import-asset-list/cit-import-asset-list.html
View file @
7ab29d95
...
...
@@ -22,36 +22,6 @@
<button
class=
"btn btn-vat-primary"
translate=
"AssetClassification"
ng-click=
"setAssetsGroup()"
></button>
</div>
<form
class=
"form-inline"
>
<!--<div class="form-group" ng-style="setButtonWrapStyle()">-->
<!--<div class="import-wrapper">-->
<!--<button type="button" ng-show="hasEditPermission" -->
<!--ngf-select="" ng-model="fileNameWrapper" ngf-drag-over-class="'dragover'" accept=".xls,.xlsx,.xlsm"-->
<!--ngf-multiple="false" ngf-allow-dir="false" class="btn btn-vat-third" style="margin-right:10px">-->
<!--{{'SelectFile' | translate}}-->
<!--</button>-->
<!--<div class="import-info-wrapper" ng-show="fileName">-->
<!--<span title="{{fileName}}">{{'FileName' | translate}}{{fileName | limitString:10}}</span> |-->
<!--<span translate="WorkSheet"></span>-->
<!--<div class="ui-select-no-border">-->
<!--<ui-select ng-model="sheetInfo.selectedSheetName" on-select="changeSheet($item)" search-enabled="false" style="width:120px;">-->
<!--<ui-select-match placeholder="{{'SelectASheet' | translate}}">{{$select.selected.name}}</ui-select-match>-->
<!--<ui-select-choices repeat="sheetName in sheetData.sheetNameList | propsFilter: {name: $select.search}">-->
<!--<div title="{{sheetName.name}}" ng-bind-html="sheetName.name | limitString:9"></div>-->
<!--</ui-select-choices>-->
<!--</ui-select>-->
<!--</div>-->
<!-- |-->
<!--<span translate="StartRowNum"></span>-->
<!--<input id="StartRowNum" ng-model="StartRowNum" type="text"-->
<!--onkeyup="if(this.value.length==1){this.value=this.value.replace(/[^1-9]/g,'')}else{this.value=this.value.replace(/\D/g,'')}"-->
<!--onafterpaste="if(this.value.length==1){this.value=this.value.replace(/[^1-9]/g,'')}else{this.value=this.value.replace(/\D/g,'')}" />-->
<!--</div>-->
<!--<button class="btn btn-vat-primary" style="float:right; margin-right: 10px;" ng-if="isShowImportTotalBtn && hasEditPermission" translate="ImportBtn" ng-click="importData(importEnum.Import)"></button>-->
<!--<div class="btn-wrapper" ng-if="!isShowImportTotalBtn && hasEditPermission">-->
<!--<button class="btn btn-vat-primary" translate="ConverImportBtn" ng-click="importData(importEnum.CoverImport)"></button>|<button class="btn btn-vat-primary" translate="AddImportBtn" ng-click="importData(importEnum.AddImport)"></button>-->
<!--</div>-->
<!--</div>-->
<!--</div>-->
<div
class=
"form-group"
>
<div
class=
"col-sm-5"
>
...
...
@@ -69,13 +39,6 @@
</div>
</div>
<!--分页栏-->
<!--<div class="form-group page-form-group" ng-show="!showImportTable">-->
<!--<div class="page-footer">-->
<!--<ack-pagination page-options="pagingOptions" refresh-table="pagingService.refreshInvoiceDataGrid()" hide-page-size-selector="true"></ack-pagination>-->
<!--</div>-->
<!--</div>-->
</form>
<!--导入数据界面-->
...
...
@@ -181,7 +144,10 @@
</button>
</div>
</div>
<div
class=
"page-footer"
>
<ack-pagination
page-options=
"pagingOptions2"
refresh-table=
"refreshAssetResultListGrid()"
></ack-pagination>
</div>
</div>
</div>
...
...
@@ -205,49 +171,6 @@
<
/div
>
</script>
<!--前台错误信息界面-->
<div
class=
"error-list-modal"
>
<div
class=
"modal fade"
id=
"errorListModal"
tabindex=
"-1"
role=
"dialog"
aria-labelledby=
"myModalLabel"
data-backdrop=
"static"
data-keyboard=
"false"
>
<div
class=
"modal-dialog"
style=
"width: 720px; height: 200px;"
role=
"document"
>
<div
class=
"modal-content"
>
<div
class=
"modal-header"
>
<div
class=
"modal-title"
>
{{'ImportErrorPopUpTitle' | translate}}
</div>
</div>
<div
class=
"modal-body"
>
{{'ImportErrorPopUpErrorDetail' | translate}}:
<br/>
<table>
<thead>
<tr>
<th
width=
"10%"
style=
"text-align:center;"
>
{{'ImportErrorPopUpNoCol' | translate}}
</th>
<th
width=
"20%"
>
{{'ImportErrorPopUpErrorTypeCol' | translate}}
</th>
<th
width=
"10%"
style=
"text-align:center;"
>
{{'ImportErrorPopUpErrorCountCol' |
translate}}
</th>
<th
width=
"60%"
>
{{'ImportErrorPopUpErrorDescCol' | translate}}
</th>
</tr>
</thead>
<tbody>
<tr
ng-repeat=
"error in errorMsgMap track by $index"
>
<td
width=
"10%"
style=
"text-align:center;"
>
{{$index + 1}}
</td>
<td
width=
"20%"
>
{{error.errorType}}
</td>
<td
width=
"10%"
style=
"text-align:center;"
>
{{error.errorCount}}
</td>
<td
width=
"60%"
ng-bind-html=
"error.errorContent"
></td>
</tr>
</tbody>
</table>
</div>
<div
class=
"modal-footer"
>
<button
type=
"button"
class=
"btn btn-primary"
translate=
"Confirm"
data-dismiss=
"modal"
></button>
</div>
</div>
</div>
</div>
</div>
<!--资产分类设置界面-->
<script
type=
"text/ng-template"
id=
"set-asset-group-modal.html"
>
<
div
class
=
"modal-content"
>
...
...
atms-web/src/main/webapp/app/cit/reduction/cit-calculate-data/cit-calculate-data.ctrl.js
View file @
7ab29d95
...
...
@@ -204,17 +204,13 @@ debugger;
// result.push({ name: $translate.instant('ProcessData'), items: [new task('GenerateStdTb', 'unstarted')] });
// result.push({ name: $translate.instant('ProcessData'), items: [new task('CompareUnbilled', 'unstarted')] });
// result.push({ name: $translate.instant('ProcessData'), items: [new task('CaculateUnbilled', 'unstarted'), new task('UpdateReportConfig', 'unstarted'), new task('GenerateFinanceReport', 'unstarted')] });
/* var dataValidateItems = [/!*"本期余额表累计数+导入调整表是否等于本期利润表累计数", "本期余额表本期数+导入调整表是否等于本期利润表本期数", "上期利润表本年累进+本期利润表本期数是否等于本期利润表本年累计",*!/ ""];
var dataValidateCode = [/!*'DA001', 'DA002', 'DA003',*!/ ''];*/
//数据配置
result
.
push
({
name
:
$translate
.
instant
(
'ProcessData'
),
items
:
[
new
task
(
'UpdateReportConfig'
,
'unstarted'
)]
});
result
[
result
.
length
-
1
].
items
.
forEach
(
function
(
t
)
{
t
.
seqNo
=
result
.
length
-
1
});
//数据校验
var
reItem
=
[];
reItem
.
push
(
new
task
(
Math
.
ceil
(
Math
.
random
()
*
1000000
).
toString
(),
"unstarted"
,
"上期导入调整表是否等于本期调整日记账发生额(摘要中包含“调表不调账”关键字)"
,
"DA004"
));
...
...
@@ -252,6 +248,7 @@ debugger;
i
++
;
taskList
=
taskList
.
concat
(
item
.
items
);
});
debugger
;
$scope
.
tasks
=
result
;
getInitTaskStatus
();
});
...
...
@@ -301,6 +298,7 @@ debugger;
$scope
.
timer
=
$interval
(
function
(){
debugger
;
citReportService
.
getJobStatus
(
vatSessionService
.
project
.
id
,
0
,
data
.
data
.
id
).
then
(
function
(
result
){
debugger
;
if
(
result
.
data
&&
result
.
status
==
200
){
updateTasksStatus
(
result
.
data
);
}
else
{
...
...
@@ -576,25 +574,26 @@ debugger;
};
var
updateTasksStatus
=
function
(
job
){
debugger
;
var
items
=
$scope
.
tasks
;
var
tasks
=
JSON
.
parse
(
job
.
status
)
var
tasks
=
JSON
.
parse
(
job
.
status
);
debugger
;
if
(
job
.
jobStatus
==
'End'
){
items
.
forEach
(
function
(
item
,
index
){
debugger
;
item
.
status
=
'completed'
;
item
.
text
=
$translate
.
instant
(
'completed'
);
});
$scope
.
tasks
[
0
].
items
[
0
].
status
=
'completed'
;
$scope
.
tasks
[
0
].
items
[
0
].
text
=
$translate
.
instant
(
'completed'
);
$scope
.
tasks
[
tasks
.
length
-
1
].
items
[
items
.
length
-
1
].
status
=
'completed'
;
$scope
.
tasks
[
tasks
.
length
-
1
].
items
[
items
.
length
-
1
].
status
.
text
=
$translate
.
instant
(
_task
.
status
);
if
(
$scope
.
timer
){
$interval
.
cancel
(
$scope
.
timer
);
vatCommonService
.
setProjectStatus
(
vatSessionService
.
project
.
id
,
vatSessionService
.
month
,
constant
.
ProjectStatusEnum
.
Generated
,
constant
.
DictionaryDictKey
.
WFDataProcess
,
enums
.
FinishStatusEnum
.
Finished
);
}
}
else
if
(
job
.
jobStatus
==
'Running'
||
job
.
jobStatus
==
'Error'
){
var
updateConfig
=
tasks
[
0
];
if
(
updateConfig
.
status
==
'Error'
){
$scope
.
tasks
[
0
].
items
[
0
].
status
=
'error'
;
...
...
@@ -622,10 +621,13 @@ debugger;
if
(
$scope
.
timer
)
$interval
.
cancel
(
$scope
.
timer
);
}
}
debugger
;
items
.
forEach
(
function
(
item
,
index
){
debugger
;
item
.
items
.
forEach
(
function
(
_task
,
index
)
{
debugger
;
tasks
.
forEach
(
function
(
task
){
debugger
;
if
(
task
.
code
==
_task
.
code
){
if
(
task
.
status
==
'Error'
){
_task
.
status
=
'error'
;
...
...
@@ -654,6 +656,7 @@ debugger;
debugger
;
citReportService
.
getJobStatus
(
vatSessionService
.
project
.
id
,
0
,
result
.
data
.
id
)
.
then
(
function
(
result
){
debugger
;
if
(
result
.
data
&&
result
.
status
==
200
){
updateTasksStatus
(
result
.
data
);
}
else
{
...
...
atms-web/src/main/webapp/app/common/webservices/assetList.svc.js
View file @
7ab29d95
...
...
@@ -8,6 +8,10 @@ webservices.factory('assetListService', ['$http', 'apiConfig', function ($http,
getAssetResultList
:
function
(
assetType
,
projectId
,
taxAccountCompare
)
{
return
$http
.
get
(
'/asset/getAssetResultList?assetType='
+
assetType
+
'&projectId='
+
projectId
+
'&taxAccountCompare='
+
taxAccountCompare
,
apiConfig
.
create
());
},
getAssetResultListPage
:
function
(
citAssetsListDto
)
{
debugger
;
return
$http
.
post
(
'/asset/getAssetResultListPage'
,
citAssetsListDto
,
apiConfig
.
create
());
},
getAssetGroupResultData
:
function
(
projectId
)
{
return
$http
.
get
(
'/asset/getAssetGroupResultData?projectId='
+
projectId
,
apiConfig
.
create
());
},
...
...
atms-web/src/main/webapp/app/common/webservices/citReport.svc.js
View file @
7ab29d95
...
...
@@ -52,7 +52,7 @@
return
$http
.
post
(
'/citReport/generateByTotal/'
+
projectId
+
'/'
+
isMergeManualDataSource
+
'?generator='
+
generator
,
{},
apiConfig
.
createVat
({
ignoreLoadingBar
:
true
}));
},
getRunningJob
:
function
(
projectId
,
period
)
{
return
$http
.
get
(
'/
Report/getRunning
Job/'
+
projectId
+
'/'
+
period
,
apiConfig
.
createVat
());
return
$http
.
get
(
'/
citReport/getPeriod
Job/'
+
projectId
+
'/'
+
period
,
apiConfig
.
createVat
());
},
getJobStatus
:
function
(
projectId
,
period
,
jobId
)
{
return
$http
.
get
(
'/Report/getJobStatus/'
+
projectId
+
'/'
+
period
+
'/'
+
jobId
,
apiConfig
.
createVat
({
ignoreLoadingBar
:
true
}));
...
...
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