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
b29bb3c9
Commit
b29bb3c9
authored
Nov 27, 2018
by
eddie.woo
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev_oracle' of
http://code.tech.tax.asia.pwcinternal.com/root/atms
into dev_oracle
parents
00839ba3
e8bc7bfa
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
138 additions
and
74 deletions
+138
-74
InputInvoiceDataImportServiceImpl.java
...s/vat/service/impl/InputInvoiceDataImportServiceImpl.java
+16
-3
OutputInvoiceServiceImpl.java
...xtech/atms/vat/service/impl/OutputInvoiceServiceImpl.java
+25
-1
DFFS.java
.../taxtech/atms/vat/service/impl/report/functions/DFFS.java
+1
-1
JFFS.java
.../taxtech/atms/vat/service/impl/report/functions/JFFS.java
+10
-7
PeriodReportMapper.java
...ain/java/pwc/taxtech/atms/vat/dao/PeriodReportMapper.java
+3
-1
tax-report-cell-detail-modal.ctrl.js
...rt-cell-detail-modal/tax-report-cell-detail-modal.ctrl.js
+0
-0
vat-report-view.ctrl.js
...p/common/controls/vat-report-view/vat-report-view.ctrl.js
+2
-1
enums.js
atms-web/src/main/webapp/app/common/utils/enums.js
+8
-4
app-approve.ctrl.js
...main/webapp/app/framework/app-approve/app-approve.ctrl.js
+30
-43
vat-preview-output-invoice.ctrl.js
...preview-output-invoice/vat-preview-output-invoice.ctrl.js
+2
-2
vat-report-layout.ctrl.js
...pp/vat/report/vat-report-layout/vat-report-layout.ctrl.js
+41
-11
No files found.
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/InputInvoiceDataImportServiceImpl.java
View file @
b29bb3c9
...
...
@@ -63,8 +63,6 @@ public class InputInvoiceDataImportServiceImpl {
project
.
getYear
(),
paras
.
getPeriodStart
(),
Constant
.
DateFormat
.
YYYYMM
),
DateUtils
.
getPeriodEndFormat
(
project
.
getYear
(),
paras
.
getPeriodEnd
(),
Constant
.
DateFormat
.
YYYYMM
)).
andRZJGEqualTo
(
INPUT_RZJG_SUCCESS
).
andRZZTEqualTo
(
INPUT_RZZT_OVER
)
.
andFPZTNotEqualTo
(
"1"
);
List
<
InputInvoice
>
invoices
=
inputInvoiceMapper
.
selectByExample
(
invoiceExample
);
DecimalFormat
df
=
new
DecimalFormat
(
"#,###.00"
);
invoices
.
stream
().
forEach
(
x
->
{
...
...
@@ -77,8 +75,23 @@ public class InputInvoiceDataImportServiceImpl {
}
public
PageInfo
<
InputInvoice
>
getInputInvoiceTreeViewData
(
InputInvoicePreviewQueryParam
paras
,
String
projectId
)
{
Project
project
=
projectMapper
.
selectByPrimaryKey
(
projectId
);
Organization
organization
=
organizationMapper
.
selectByPrimaryKey
(
project
.
getOrganizationId
());
InputInvoiceExample
invoiceExample
=
new
InputInvoiceExample
();
invoiceExample
.
createCriteria
().
andGFSHEqualTo
(
organization
.
getTaxPayerNumber
()).
andRZSQBetween
(
DateUtils
.
getPeriodBeginFormat
(
project
.
getYear
(),
paras
.
getPeriodStart
(),
Constant
.
DateFormat
.
YYYYMM
),
DateUtils
.
getPeriodEndFormat
(
project
.
getYear
(),
paras
.
getPeriodEnd
(),
Constant
.
DateFormat
.
YYYYMM
)).
andRZJGEqualTo
(
INPUT_RZJG_SUCCESS
).
andRZZTEqualTo
(
INPUT_RZZT_OVER
)
.
andFPZTNotEqualTo
(
"1"
);
PageHelper
.
startPage
(
paras
.
getPageInfo
().
getPageIndex
(),
paras
.
getPageInfo
().
getPageSize
());
PageInfo
<
InputInvoice
>
pageInfo
=
new
PageInfo
<>(
getInputInvoiceTree
(
paras
,
projectId
));
List
<
InputInvoice
>
invoices
=
inputInvoiceMapper
.
selectByExample
(
invoiceExample
);
DecimalFormat
df
=
new
DecimalFormat
(
"#,###.00"
);
invoices
.
stream
().
forEach
(
x
->
{
x
.
setHJJE
(
df
.
format
(
new
BigDecimal
(
x
.
getHJJE
())));
x
.
setHJSE
(
df
.
format
(
new
BigDecimal
(
x
.
getHJSE
())));
x
.
setRZJG
(
convertRzjg
(
x
.
getRZJG
()));
}
);
PageInfo
<
InputInvoice
>
pageInfo
=
new
PageInfo
<>(
invoices
);
return
pageInfo
;
}
...
...
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/OutputInvoiceServiceImpl.java
View file @
b29bb3c9
...
...
@@ -100,7 +100,31 @@ public class OutputInvoiceServiceImpl {
}
public
PageInfo
<
OutputInvoice
>
queryOutputInvoiceList
(
QueryOutputDto
queryDto
,
String
projectId
)
{
PageInfo
<
OutputInvoice
>
pageInfo
=
new
PageInfo
<>(
queryOutputInvoiceAllList
(
queryDto
,
projectId
));
Project
project
=
projectMapper
.
selectByPrimaryKey
(
projectId
);
Organization
organization
=
organizationMapper
.
selectByPrimaryKey
(
project
.
getOrganizationId
());
OutputInvoiceExample
outputInvoiceExample
=
new
OutputInvoiceExample
();
if
(
organization
.
getTaxPayerNumber
()
==
null
)
{
outputInvoiceExample
.
createCriteria
().
andXFSHIsNull
().
andKPZTEqualTo
(
OUTPUT_KPZT_YES
).
andKPRQBetween
(
DateUtils
.
getPeriodBegin
(
project
.
getYear
(),
queryDto
.
getPeriodStart
()),
DateUtils
.
getPeriodEnd
(
project
.
getYear
(),
queryDto
.
getPeriodEnd
()))
.
andFPZTNotEqualTo
(
"1"
);
}
else
{
outputInvoiceExample
.
createCriteria
().
andXFSHEqualTo
(
organization
.
getTaxPayerNumber
()).
andKPZTEqualTo
(
OUTPUT_KPZT_YES
).
andKPRQBetween
(
DateUtils
.
getPeriodBegin
(
project
.
getYear
(),
queryDto
.
getPeriodStart
()),
DateUtils
.
getPeriodEnd
(
project
.
getYear
(),
queryDto
.
getPeriodEnd
()))
.
andFPZTNotEqualTo
(
"1"
);
}
PageHelper
.
startPage
(
queryDto
.
getPageInfo
().
getPageIndex
(),
queryDto
.
getPageInfo
().
getPageSize
());
List
<
OutputInvoice
>
invoices
=
outputInvoiceMapper
.
selectByExample
(
outputInvoiceExample
);
DecimalFormat
df
=
new
DecimalFormat
(
"#,###.00"
);
invoices
.
stream
().
forEach
(
x
->
{
x
.
setHJJE
(
df
.
format
(
new
BigDecimal
(
x
.
getHJJE
())));
x
.
setHJSE
(
df
.
format
(
new
BigDecimal
(
x
.
getHJSE
())));
}
);
PageInfo
<
OutputInvoice
>
pageInfo
=
new
PageInfo
<>(
invoices
);
return
pageInfo
;
}
...
...
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/report/functions/DFFS.java
View file @
b29bb3c9
...
...
@@ -119,7 +119,7 @@ public class DFFS extends FunctionBase implements FreeRefFunction {
dto
.
setPeriod
(
period
);
dto
.
setIsOnlyManualInput
(
Boolean
.
FALSE
);
dto
.
setName
(
Constant
.
DataSourceName
.
ReportDataSource
);
dto
.
setType
(
FormulaDataSourceType
.
TrialBalanceSource
.
getCode
());
dto
.
setType
(
FormulaDataSourceType
.
TrialBalanceSource
.
getCode
());
contain
.
add
(
dto
);
}
return
temp
.
stream
().
mapToDouble
(
a
->
a
.
getPtdCr
().
doubleValue
()).
sum
();
...
...
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/report/functions/JFFS.java
View file @
b29bb3c9
...
...
@@ -12,10 +12,7 @@ import pwc.taxtech.atms.constant.Constant;
import
pwc.taxtech.atms.constant.enums.FormulaDataSourceDetailType
;
import
pwc.taxtech.atms.constant.enums.FormulaDataSourceType
;
import
pwc.taxtech.atms.dto.vatdto.ReportCellDataSourceDto
;
import
pwc.taxtech.atms.entity.AccountMapping
;
import
pwc.taxtech.atms.entity.AccountMappingExample
;
import
pwc.taxtech.atms.entity.EnterpriseAccountSetOrg
;
import
pwc.taxtech.atms.entity.EnterpriseAccountSetOrgExample
;
import
pwc.taxtech.atms.entity.*
;
import
pwc.taxtech.atms.vat.entity.GlBalance
;
import
pwc.taxtech.atms.vat.entity.GlBalanceExample
;
...
...
@@ -68,7 +65,7 @@ public class JFFS extends FunctionBase implements FreeRefFunction {
double
result
=
0
;
for
(
AccountMapping
a
:
accountMappings
){
result
+=
count
(
a
.
getEnterpriseAccountCode
(),
dataSource
,
period
,
year
);
result
+=
count
(
a
.
getEnterpriseAccountCode
(),
dataSource
,
period
,
year
,
orgId
);
}
Long
dataSoureId
=
saveDataSource
(
ec
,
Collections
.
singletonList
(
dataSource
),
FormulaDataSourceDetailType
.
FormulaDataSourceDto
,
...
...
@@ -78,7 +75,7 @@ public class JFFS extends FunctionBase implements FreeRefFunction {
return
new
NumberEval
(
result
);
}
else
if
(
type
==
1
){
double
result
=
count
(
code
,
dataSource
,
period
,
year
);
double
result
=
count
(
code
,
dataSource
,
period
,
year
,
orgId
);
Long
dataSoureId
=
saveDataSource
(
ec
,
Collections
.
singletonList
(
dataSource
),
FormulaDataSourceDetailType
.
FormulaDataSourceDto
,
new
BigDecimal
(
result
),
period
,
formulaContext
.
getReportTemplateGroupId
(),
formulaContext
.
getProjectId
());
...
...
@@ -93,10 +90,16 @@ public class JFFS extends FunctionBase implements FreeRefFunction {
return
year
+
"-"
+
(
period
>
9
?
period
:
(
"0"
+
period
));
}
private
double
count
(
String
code
,
List
<
ReportCellDataSourceDto
>
contain
,
int
period
,
int
year
){
private
double
count
(
String
code
,
List
<
ReportCellDataSourceDto
>
contain
,
int
period
,
int
year
,
String
orgId
){
Organization
organization
=
SpringContextUtil
.
organizationMapper
.
selectByPrimaryKey
(
orgId
);
GlBalanceExample
glBalanceExample
=
new
GlBalanceExample
();
GlBalanceExample
.
Criteria
c1
=
glBalanceExample
.
createCriteria
().
andSegment3EqualTo
(
code
).
andPeriodNameEqualTo
(
periodName
(
period
,
year
));
GlBalanceExample
.
Criteria
c2
=
glBalanceExample
.
createCriteria
().
andSegment4EqualTo
(
code
).
andPeriodNameEqualTo
(
periodName
(
period
,
year
));
if
(
organization
!=
null
){
c1
.
andSegment1EqualTo
(
organization
.
getClientCode
());
c2
.
andSegment1EqualTo
(
organization
.
getClientCode
());
}
glBalanceExample
.
or
(
c2
);
List
<
GlBalance
>
list
=
SpringContextUtil
.
glBalanceMapper
.
selectByExample
(
glBalanceExample
);
if
(
CollectionUtils
.
isEmpty
(
list
)){
...
...
atms-dao/src/main/java/pwc/taxtech/atms/vat/dao/PeriodReportMapper.java
View file @
b29bb3c9
...
...
@@ -127,7 +127,9 @@ public interface PeriodReportMapper extends MyVatMapper {
" LEFT JOIN PERIOD_TEMPLATE pt ON r.TEMPLATE_ID = pt.TEMPLATE_ID "
+
"WHERE "
+
" r.PROJECT_ID = #{projectId} "
+
" AND r.PERIOD = #{period} "
+
" AND r.PERIOD = #{period}"
+
" AND pt.PROJECT_ID = r.PROJECT_ID "
+
" AND pt.PERIOD = r.PERIOD "
+
"ORDER BY "
+
" pt.ORDER_INDEX"
+
""
)
...
...
atms-web/src/main/webapp/app/common/controls/tax-report-cell-detail-modal/tax-report-cell-detail-modal.ctrl.js
View file @
b29bb3c9
This diff is collapsed.
Click to expand it.
atms-web/src/main/webapp/app/common/controls/vat-report-view/vat-report-view.ctrl.js
View file @
b29bb3c9
commonModule
.
controller
(
'VatReportViewController'
,
[
'$scope'
,
'$rootScope'
,
'$log'
,
'$translate'
,
'$timeout'
,
'$q'
,
'$compile'
,
'$state'
,
'$stateParams'
,
commonModule
.
controller
(
'VatReportViewController'
,
[
'$scope'
,
'$rootScope'
,
'$log'
,
'$translate'
,
'$timeout'
,
'$q'
,
'$compile'
,
'$state'
,
'$stateParams'
,
'apiInterceptor'
,
'vatExportService'
,
'SweetAlert'
,
'BSPLService'
,
'vatReportService'
,
'vatReportCacheService'
,
'vatSessionService'
,
'loginContext'
,
'enums'
,
'vatCommonService'
,
'vatWorkflowService'
,
'projectService'
,
'$uibModal'
,
'$cookies'
,
'Upload'
,
'vatImportService'
,
'vatApproveService'
,
function
(
$scope
,
$rootScope
,
$log
,
$translate
,
$timeout
,
$q
,
$compile
,
$state
,
$stateParams
,
apiInterceptor
,
vatExportService
,
SweetAlert
,
BSPLService
,
...
...
@@ -648,6 +648,7 @@ commonModule.controller('VatReportViewController', ['$scope', '$rootScope', '$lo
$scope
.
taxCellDetail
.
dataSourceCount
++
;
}
});
// $scope.taxCellDetail.items = [_.first($scope.taxCellDetail.items)];
}
else
{
var
flag
=
true
;
...
...
atms-web/src/main/webapp/app/common/utils/enums.js
View file @
b29bb3c9
...
...
@@ -442,10 +442,11 @@ commonModule.factory('enums', ['$translate', function ($translate) {
////未开票数据源
//Unbilled: 9,
KeyInSource
:
10
,
QCYESource
:
11
,
QMYESource
:
12
,
TrialBalanceSource
:
11
,
// QCYESource: 11,
// QMYESource: 12,
ModelSource
:
13
,
FSESource
:
14
,
//
FSESource: 14,
RuleSource
:
15
,
//凭证筛选
...
...
@@ -456,7 +457,10 @@ commonModule.factory('enums', ['$translate', function ($translate) {
ModelDatasource
:
18
,
// 用于存放特殊逻辑中获取的数据源数值与备注等信息,如未开票视同销售等
Special
:
19
,
BSPL
:
20
BSPL
:
20
,
summary
:
100
},
VatImportSubStatus
:
{
...
...
atms-web/src/main/webapp/app/framework/app-approve/app-approve.ctrl.js
View file @
b29bb3c9
...
...
@@ -31,6 +31,7 @@
//*************************************************************************************************
$scope
.
randomCounter
=
0
;
$scope
.
allResults
=
[];
$scope
.
queryResults
=
[];
$scope
.
checkedOrgs
=
{};
$scope
.
orgList
=
[];
$scope
.
orderYear
=
true
;
...
...
@@ -125,17 +126,14 @@
return
_
.
contains
(
_
.
values
(
$scope
.
checkedOrgs
),
i
.
organizationName
);
});
}
if
(
$scope
.
serviceTypeId
)
{
temp
=
_
.
filter
(
temp
,
function
(
i
)
{
return
$scope
.
serviceTypeId
==
i
.
serviceTypeID
;
});
}
if
(
vatSessionService
.
year
)
{
if
(
$scope
.
serviceTypeId
===
enums
.
serviceType
.
VAT
)
{
temp
=
_
.
filter
(
temp
,
function
(
i
)
{
if
(
i
.
startPeriod
<=
vatSessionService
.
month
&&
i
.
endPeriod
>=
vatSessionService
.
month
&&
i
.
year
==
vatSessionService
.
year
)
{
if
(
i
.
period
==
vatSessionService
.
month
)
{
return
i
;
}
});
}
else
if
(
$scope
.
serviceTypeId
===
enums
.
serviceType
.
CIT
)
{
...
...
@@ -164,28 +162,6 @@
var
counter
=
0
;
var
setWarningToTrue
=
false
;
temp
.
forEach
(
function
(
project
)
{
setWarningToTrue
=
false
;
project
.
finalStatus
=
setLayoutStatusTitle
(
project
.
projectStatusList
);
project
.
periodDate
=
$scope
.
currentSelectedYear
+
"."
+
$scope
.
currentSelectedMonth
;
var
oneDemoData
=
_
.
find
(
demoData
,
function
(
one
)
{
return
one
.
id
===
project
.
id
});
if
(
project
.
serviceTypeID
===
enums
.
serviceType
.
VAT
)
{
if
(
project
.
projectStatusList
!==
null
&&
project
.
projectStatusList
[
vatSessionService
.
month
]
!==
undefined
&&
project
.
projectStatusList
[
vatSessionService
.
month
]
!==
10
&&
oneDemoData
!==
undefined
)
{
project
.
taxAmount
=
oneDemoData
.
taxAmount
;
project
.
prepadidTaxAmount
=
oneDemoData
.
prepadidTaxAmount
;
project
.
taxRate
=
oneDemoData
.
taxRate
;
project
.
hasWarning
=
oneDemoData
.
hasWarning
;
}
}
counter
++
;
});
$scope
.
queryResults
=
temp
;
$scope
.
projectMsg
=
$translate
.
instant
(
'ProjectResultMsg'
).
formatObj
({
"ProjectNum"
:
$scope
.
queryResults
.
length
});
...
...
@@ -283,15 +259,6 @@
};
$scope
.
changeStartDate
=
function
(
e
)
{
if
(
e
&&
e
.
date
)
{
var
tempYear
=
e
.
date
.
getFullYear
();
var
tempMonth
=
e
.
date
.
getMonth
()
+
1
;
$scope
.
currentSelectedStartMonth
=
tempMonth
;
$scope
.
currentSelectedStartYear
=
tempYear
;
}
};
$scope
.
changeDate
=
function
(
e
)
{
if
(
e
&&
e
.
date
)
{
var
isDateUpdated
=
false
;
...
...
@@ -308,15 +275,15 @@
$scope
.
currentSelectedYear
=
tempYear
;
if
(
isDateUpdated
)
{
//$scope.$apply(function () {
// $scope.conditionChange = !$scope.conditionChange;
//});
$timeout
(
function
()
{
$scope
.
conditionChange
=
!
$scope
.
conditionChange
;
});
}
if
(
$scope
.
serviceTypeId
!==
enums
.
serviceType
.
AssetsManage
)
{
$scope
.
query
();
}
}
};
...
...
@@ -577,8 +544,18 @@
var
loadApprovalFromDB
=
function
()
{
vatApproveService
.
approvalTasks
().
success
(
function
(
data
)
{
if
(
data
)
{
data
.
forEach
(
function
(
p
)
{
if
(
PWC
.
isHavePermissionForOrg
(
p
.
organizationId
,
vatSessionService
.
userPermission
))
{
$scope
.
allResults
.
push
(
p
);
}
});
$scope
.
queryResults
=
_
.
clone
(
$scope
.
allResults
);
$scope
.
gridOptions
=
{
dataSource
:
data
,
bindingOptions
:
{
"dataSource"
:
"queryResults"
},
keyExpr
:
"instanceId"
,
showBorders
:
true
,
columns
:
[
...
...
@@ -597,7 +574,15 @@
}
}
},
{
caption
:
'审批意见'
,
width
:
'15%'
,
dataField
:
"approvalResult"
},
{
caption
:
'审批意见'
,
width
:
'15%'
,
calculateCellValue
:
function
(
data
)
{
if
(
data
.
approvalResult
==
'undefined'
){
return
''
;
}
else
{
return
data
.
approvalResult
;
}
}
},
{
caption
:
'提审时间'
,
width
:
'7.5%'
,
dataField
:
"createTime"
},
{
caption
:
'审批时间'
,
width
:
'7.5%'
,
dataField
:
"approvalTime"
}
],
...
...
@@ -618,9 +603,11 @@
vatSessionService
.
project
=
result
;
vatSessionService
.
project
.
projectName
=
approvalInfo
.
projectName
;
vatSessionService
.
project
.
month
=
approvalInfo
.
period
;
vatSessionService
.
project
.
templateGroupID
=
template
.
templateGroupId
;
vatSessionService
.
month
=
approvalInfo
.
period
;
vatSessionService
.
approvalInfo
=
approvalInfo
;
$state
.
go
(
'vat.generateReport.reportView'
,
{
id
:
approvalInfo
.
reportIds
.
split
(
","
)[
0
],
templateid
:
approvalInfo
.
templateIds
.
split
(
","
)[
0
],
...
...
atms-web/src/main/webapp/app/vat/preview/vat-preview-output-invoice/vat-preview-output-invoice.ctrl.js
View file @
b29bb3c9
...
...
@@ -170,9 +170,9 @@
$scope
.
queryOutputInvoiceResult
=
{
list
:
[],
pageInfo
:
{
totalCount
:
0
,
totalCount
:
-
1
,
pageIndex
:
1
,
pageSize
:
100
,
pageSize
:
constant
.
pagesize
,
totalPage
:
0
,
}
}
...
...
atms-web/src/main/webapp/app/vat/report/vat-report-layout/vat-report-layout.ctrl.js
View file @
b29bb3c9
...
...
@@ -18,7 +18,7 @@
//房地产
//projectID = '0cf0945f-d41c-4df3-8235-ae693d5e724d';
$q
.
all
([
templateGroupService
.
getGroupTemplateByGroupID
(
48372654336679936
,
projectID
),
templateGroupService
.
getGroupTemplateByGroupID
(
vatSessionService
.
project
.
templateGroupID
,
projectID
),
vatReportService
.
getFilterTemplate
(
vatSessionService
.
project
.
id
,
constant
.
serviceType
.
VAT
,
vatSessionService
.
month
)
]).
then
(
function
(
result
)
{
if
(
!
_
.
isEmpty
(
result
[
0
])
&&
!
_
.
isEmpty
(
result
[
0
].
data
)
&&
!
_
.
isEmpty
(
result
[
0
].
data
.
data
)
...
...
@@ -41,29 +41,46 @@
}
if
(
$scope
.
hasTaxReturnPermission
&&
$scope
.
hasQueryTaxReturnPermission
)
{
var
diffArr
=
[
'会计数据统计'
,
'出口数据比对'
,
'进项税额差异分析表'
,
'收入差异分析表'
];
// var templates = _.chain
// 获取 申报表 Report Template
var
diffRtnGrp
=
{
name
:
'差异分析表'
,
children
:[],
orderIndex
:
1
};
var
taxRtnGrp
=
{
name
:
'TaxReturn'
,
children
:
_
.
chain
(
result
[
1
].
data
.
data
)
.
sortBy
(
function
(
x
){
return
x
.
templateCode
;
})
/*
.map(function(x){
.
map
(
function
(
x
){
var
nameIndex
;
var tempName = x.templateName.substr(x.templateName.length - 4);
if(
tempName.search("附表一") != -1
){
//
var tempName = x.templateName.substr(x.templateName.length - 4);
if
(
x
.
templateName
==
(
'增值税纳税申报表'
)
){
nameIndex
=
0
;
} else if(
tempName.search("附表二
") != -1){
}
else
if
(
x
.
templateName
.
search
(
"一
"
)
!=
-
1
){
nameIndex
=
1
;
} else if(
tempName.search("附表三
") != -1){
}
else
if
(
x
.
templateName
.
search
(
"二
"
)
!=
-
1
){
nameIndex
=
2
;
} else if(
tempName.search("附表四
") != -1){
}
else
if
(
x
.
templateName
.
search
(
"三
"
)
!=
-
1
){
nameIndex
=
3
;
} else if(
tempName.search("附表五
") != -1){
}
else
if
(
x
.
templateName
.
search
(
"四
"
)
!=
-
1
){
nameIndex
=
4
;
} else {
}
else
if
(
x
.
templateName
.
search
(
"五"
)
!=
-
1
){
nameIndex
=
5
;
}
else
if
(
x
.
templateName
.
search
(
'代扣代缴'
)
!=
-
1
){
nameIndex
=
6
;
}
else
if
(
x
.
templateName
.
search
(
'海关专用'
)
!=
-
1
){
nameIndex
=
7
;
}
else
if
(
x
.
templateName
.
search
(
'增值税减免税申报明细表'
)
!=
-
1
){
nameIndex
=
8
;
}
else
if
(
x
.
templateName
.
search
(
'营改增'
)
!=
-
1
){
nameIndex
=
9
;
}
else
if
(
x
.
templateName
.
search
(
'附加税报表'
)
!=
-
1
){
nameIndex
=
10
;
}
else
{
nameIndex
=
20
;
if
(
$
.
inArray
(
x
.
templateName
,
diffArr
)
!=
-
1
){
diffRtnGrp
.
children
.
push
(
x
);
}
}
return
{
id
:
x
.
id
,
...
...
@@ -73,9 +90,12 @@
nameIndex
:
nameIndex
}
})
.
filter
(
function
(
x
){
return
$
.
inArray
(
x
.
templateName
,
diffArr
)
==
-
1
;
})
.
sortBy
(
function
(
x
){
return
x
.
nameIndex
;
})
*/
})
.
map
(
function
(
x
)
{
return
{
reportId
:
x
.
id
,
...
...
@@ -86,11 +106,21 @@
}).
value
(),
orderIndex
:
grps
.
length
};
diffRtnGrp
.
children
=
_
.
chain
(
diffRtnGrp
.
children
)
.
map
(
function
(
x
){
return
{
reportId
:
x
.
id
,
id
:
x
.
templateId
,
name
:
x
.
templateName
,
code
:
x
.
templateCode
};
}).
value
();
grps
.
push
(
taxRtnGrp
);
grps
.
push
(
diffRtnGrp
);
}
$scope
.
groups
=
_
.
chain
(
grps
).
sortBy
(
function
(
x
)
{
return
x
.
orderIndex
;
// return x.children.name;
}).
map
(
function
(
x
)
{
...
...
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