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
163acc9d
Commit
163acc9d
authored
Nov 26, 2018
by
neo
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev_oracle' of code.tech.tax.asia.pwcinternal.com:root/atms into neo_jpa_withoutgen
parents
767045f8
655f5bc0
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
109 additions
and
35 deletions
+109
-35
InputInvoiceImportController.java
...taxtech/atms/controller/InputInvoiceImportController.java
+7
-0
OutputInvoiceController.java
.../pwc/taxtech/atms/controller/OutputInvoiceController.java
+6
-0
OutputInvoiceServiceImpl.java
...xtech/atms/vat/service/impl/OutputInvoiceServiceImpl.java
+6
-5
ReportServiceImpl.java
.../pwc/taxtech/atms/vat/service/impl/ReportServiceImpl.java
+9
-0
DFFS.java
.../taxtech/atms/vat/service/impl/report/functions/DFFS.java
+13
-9
vat-report-view.ctrl.js
...p/common/controls/vat-report-view/vat-report-view.ctrl.js
+2
-2
vatPreviewService.js
...c/main/webapp/app/common/vatservices/vatPreviewService.js
+38
-0
vat-preview-input-invoice.ctrl.js
...t-preview-input-invoice/vat-preview-input-invoice.ctrl.js
+4
-5
vat-preview-output-invoice.ctrl.js
...preview-output-invoice/vat-preview-output-invoice.ctrl.js
+24
-14
No files found.
atms-api/src/main/java/pwc/taxtech/atms/controller/InputInvoiceImportController.java
View file @
163acc9d
...
@@ -37,6 +37,13 @@ public class InputInvoiceImportController {
...
@@ -37,6 +37,13 @@ public class InputInvoiceImportController {
private
IdentityServiceImpl
identityService
;
private
IdentityServiceImpl
identityService
;
private
Logger
logger
=
LoggerFactory
.
getLogger
(
InputInvoiceImportController
.
class
);
private
Logger
logger
=
LoggerFactory
.
getLogger
(
InputInvoiceImportController
.
class
);
@RequestMapping
(
value
=
"inputInvoicePreviewAllList"
,
method
=
RequestMethod
.
POST
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
public
@ResponseBody
List
<
InputInvoice
>
getInputInvoiceTree
(
@RequestBody
InputInvoicePreviewQueryParam
paras
,
@RequestHeader
(
"from"
)
String
projectId
)
{
return
inputInvoiceDataImportService
.
getInputInvoiceTree
(
paras
,
projectId
);
}
@RequestMapping
(
value
=
"inputInvoicePreviewList"
,
method
=
RequestMethod
.
POST
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
@RequestMapping
(
value
=
"inputInvoicePreviewList"
,
method
=
RequestMethod
.
POST
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
public
@ResponseBody
public
@ResponseBody
PageInfo
<
InputInvoice
>
getInputInvoiceTreeViewData
(
@RequestBody
InputInvoicePreviewQueryParam
paras
,
PageInfo
<
InputInvoice
>
getInputInvoiceTreeViewData
(
@RequestBody
InputInvoicePreviewQueryParam
paras
,
...
...
atms-api/src/main/java/pwc/taxtech/atms/controller/OutputInvoiceController.java
View file @
163acc9d
...
@@ -52,6 +52,12 @@ public class OutputInvoiceController {
...
@@ -52,6 +52,12 @@ public class OutputInvoiceController {
return
outputInvoiceService
.
queryOutputInvoiceList
(
queryDto
,
projectId
);
return
outputInvoiceService
.
queryOutputInvoiceList
(
queryDto
,
projectId
);
}
}
@RequestMapping
(
value
=
"queryOutputInvoiceAllList"
,
method
=
RequestMethod
.
POST
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
public
List
<
OutputInvoice
>
queryOutputInvoiceAllList
(
@RequestBody
QueryOutputDto
queryDto
,
@RequestHeader
(
"from"
)
String
projectId
)
{
return
outputInvoiceService
.
queryOutputInvoiceAllList
(
queryDto
,
projectId
);
}
@RequestMapping
(
value
=
"getExportOutputInvoiceList"
,
method
=
RequestMethod
.
POST
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
@RequestMapping
(
value
=
"getExportOutputInvoiceList"
,
method
=
RequestMethod
.
POST
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
public
void
downloadInvoiceQueryData
(
@RequestBody
QueryOutputDto
paras
,
@RequestHeader
(
"from"
)
String
projectId
,
HttpServletResponse
response
)
{
public
void
downloadInvoiceQueryData
(
@RequestBody
QueryOutputDto
paras
,
@RequestHeader
(
"from"
)
String
projectId
,
HttpServletResponse
response
)
{
response
.
setContentType
(
"application/vnd.ms-excel;charset=utf-8"
);
response
.
setContentType
(
"application/vnd.ms-excel;charset=utf-8"
);
...
...
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/OutputInvoiceServiceImpl.java
View file @
163acc9d
...
@@ -73,7 +73,7 @@ public class OutputInvoiceServiceImpl {
...
@@ -73,7 +73,7 @@ public class OutputInvoiceServiceImpl {
@Autowired
@Autowired
private
OutputInvoiceDetailMapper
outputInvoiceDetailMapper
;
private
OutputInvoiceDetailMapper
outputInvoiceDetailMapper
;
public
PageInfo
<
OutputInvoice
>
queryOutputInvoice
List
(
QueryOutputDto
queryDto
,
String
projectId
)
{
public
List
<
OutputInvoice
>
queryOutputInvoiceAll
List
(
QueryOutputDto
queryDto
,
String
projectId
)
{
Project
project
=
projectMapper
.
selectByPrimaryKey
(
projectId
);
Project
project
=
projectMapper
.
selectByPrimaryKey
(
projectId
);
Organization
organization
=
organizationMapper
.
selectByPrimaryKey
(
project
.
getOrganizationId
());
Organization
organization
=
organizationMapper
.
selectByPrimaryKey
(
project
.
getOrganizationId
());
...
@@ -89,9 +89,6 @@ public class OutputInvoiceServiceImpl {
...
@@ -89,9 +89,6 @@ public class OutputInvoiceServiceImpl {
DateUtils
.
getPeriodEnd
(
project
.
getYear
(),
queryDto
.
getPeriodEnd
()))
DateUtils
.
getPeriodEnd
(
project
.
getYear
(),
queryDto
.
getPeriodEnd
()))
.
andFPZTNotEqualTo
(
"1"
);
.
andFPZTNotEqualTo
(
"1"
);
}
}
PageHelper
.
startPage
(
queryDto
.
getPageInfo
().
getPageIndex
(),
queryDto
.
getPageInfo
().
getPageSize
());
List
<
OutputInvoice
>
invoices
=
outputInvoiceMapper
.
selectByExample
(
outputInvoiceExample
);
List
<
OutputInvoice
>
invoices
=
outputInvoiceMapper
.
selectByExample
(
outputInvoiceExample
);
DecimalFormat
df
=
new
DecimalFormat
(
"#,###.00"
);
DecimalFormat
df
=
new
DecimalFormat
(
"#,###.00"
);
invoices
.
stream
().
forEach
(
x
->
{
invoices
.
stream
().
forEach
(
x
->
{
...
@@ -99,7 +96,11 @@ public class OutputInvoiceServiceImpl {
...
@@ -99,7 +96,11 @@ public class OutputInvoiceServiceImpl {
x
.
setHJSE
(
df
.
format
(
new
BigDecimal
(
x
.
getHJSE
())));
x
.
setHJSE
(
df
.
format
(
new
BigDecimal
(
x
.
getHJSE
())));
}
}
);
);
PageInfo
<
OutputInvoice
>
pageInfo
=
new
PageInfo
<>(
invoices
);
return
invoices
;
}
public
PageInfo
<
OutputInvoice
>
queryOutputInvoiceList
(
QueryOutputDto
queryDto
,
String
projectId
)
{
PageInfo
<
OutputInvoice
>
pageInfo
=
new
PageInfo
<>(
queryOutputInvoiceAllList
(
queryDto
,
projectId
));
return
pageInfo
;
return
pageInfo
;
}
}
...
...
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/ReportServiceImpl.java
View file @
163acc9d
...
@@ -654,6 +654,8 @@ public class ReportServiceImpl {
...
@@ -654,6 +654,8 @@ public class ReportServiceImpl {
dataSourceDto
.
setDataSourceType
(
CellDataSourceType
.
InputInvoice
.
getCode
());
dataSourceDto
.
setDataSourceType
(
CellDataSourceType
.
InputInvoice
.
getCode
());
}
else
if
(
a
.
getType
().
equals
(
FormulaDataSourceType
.
Voucher
.
getCode
()))
{
}
else
if
(
a
.
getType
().
equals
(
FormulaDataSourceType
.
Voucher
.
getCode
()))
{
dataSourceDto
.
setDataSourceType
(
CellDataSourceType
.
Voucher
.
getCode
());
dataSourceDto
.
setDataSourceType
(
CellDataSourceType
.
Voucher
.
getCode
());
}
else
if
(
a
.
getType
().
equals
(
FormulaDataSourceType
.
OutputInvoice
.
getCode
())){
dataSourceDto
.
setDataSourceType
(
CellDataSourceType
.
OutputInvoice
.
getCode
());
}
else
{
}
else
{
dataSourceDto
.
setDataSourceType
(
0
);
dataSourceDto
.
setDataSourceType
(
0
);
}
}
...
@@ -692,6 +694,13 @@ public class ReportServiceImpl {
...
@@ -692,6 +694,13 @@ public class ReportServiceImpl {
if
(
z
.
getItem2
().
getItems
()
!=
null
&&
!
z
.
getItem2
().
getItems
().
isEmpty
()
&&
z
.
getItem2
().
getItems
().
get
(
0
).
contains
(
"tag"
))
{
if
(
z
.
getItem2
().
getItems
()
!=
null
&&
!
z
.
getItem2
().
getItems
().
isEmpty
()
&&
z
.
getItem2
().
getItems
().
get
(
0
).
contains
(
"tag"
))
{
z
.
getItem2
().
getItems
().
forEach
(
m
->
{
z
.
getItem2
().
getItems
().
forEach
(
m
->
{
ReportCellDataSourceDto
dto
=
JSON
.
parseObject
(
m
,
ReportCellDataSourceDto
.
class
);
ReportCellDataSourceDto
dto
=
JSON
.
parseObject
(
m
,
ReportCellDataSourceDto
.
class
);
PeriodTemplateExample
periodTemplateExample1
=
new
PeriodTemplateExample
();
periodTemplateExample1
.
createCriteria
().
andTemplateIdEqualTo
(
a
.
getReportTemplateId
())
.
andPeriodEqualTo
(
report
.
getPeriod
());
Optional
<
PeriodTemplate
>
optional
=
periodTemplateMapper
.
selectByExample
(
periodTemplateExample1
).
stream
().
findFirst
();
if
(
optional
.
isPresent
()){
dto
.
setReportName
(
optional
.
get
().
getName
());
}
dataSourceDtoList
.
add
(
dto
);
dataSourceDtoList
.
add
(
dto
);
});
});
}
else
}
else
...
...
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/report/functions/DFFS.java
View file @
163acc9d
...
@@ -14,10 +14,7 @@ import pwc.taxtech.atms.constant.enums.FormulaDataSourceDetailType;
...
@@ -14,10 +14,7 @@ import pwc.taxtech.atms.constant.enums.FormulaDataSourceDetailType;
import
pwc.taxtech.atms.constant.enums.FormulaDataSourceType
;
import
pwc.taxtech.atms.constant.enums.FormulaDataSourceType
;
import
pwc.taxtech.atms.dpo.CellTemplatePerGroupDto
;
import
pwc.taxtech.atms.dpo.CellTemplatePerGroupDto
;
import
pwc.taxtech.atms.dto.vatdto.ReportCellDataSourceDto
;
import
pwc.taxtech.atms.dto.vatdto.ReportCellDataSourceDto
;
import
pwc.taxtech.atms.entity.AccountMapping
;
import
pwc.taxtech.atms.entity.*
;
import
pwc.taxtech.atms.entity.AccountMappingExample
;
import
pwc.taxtech.atms.entity.EnterpriseAccountSetOrg
;
import
pwc.taxtech.atms.entity.EnterpriseAccountSetOrgExample
;
import
pwc.taxtech.atms.exception.Exceptions
;
import
pwc.taxtech.atms.exception.Exceptions
;
import
pwc.taxtech.atms.vat.entity.GlBalance
;
import
pwc.taxtech.atms.vat.entity.GlBalance
;
import
pwc.taxtech.atms.vat.entity.GlBalanceExample
;
import
pwc.taxtech.atms.vat.entity.GlBalanceExample
;
...
@@ -70,7 +67,7 @@ public class DFFS extends FunctionBase implements FreeRefFunction {
...
@@ -70,7 +67,7 @@ public class DFFS extends FunctionBase implements FreeRefFunction {
double
result
=
0
;
double
result
=
0
;
for
(
AccountMapping
a
:
accountMappings
){
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
),
Long
dataSoureId
=
saveDataSource
(
ec
,
Collections
.
singletonList
(
dataSource
),
FormulaDataSourceDetailType
.
FormulaDataSourceDto
,
FormulaDataSourceDetailType
.
FormulaDataSourceDto
,
...
@@ -80,7 +77,7 @@ public class DFFS extends FunctionBase implements FreeRefFunction {
...
@@ -80,7 +77,7 @@ public class DFFS extends FunctionBase implements FreeRefFunction {
return
new
NumberEval
(
result
);
return
new
NumberEval
(
result
);
}
else
if
(
type
==
1
){
}
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
),
Long
dataSoureId
=
saveDataSource
(
ec
,
Collections
.
singletonList
(
dataSource
),
FormulaDataSourceDetailType
.
FormulaDataSourceDto
,
FormulaDataSourceDetailType
.
FormulaDataSourceDto
,
new
BigDecimal
(
result
),
period
,
formulaContext
.
getReportTemplateGroupId
(),
formulaContext
.
getProjectId
());
new
BigDecimal
(
result
),
period
,
formulaContext
.
getReportTemplateGroupId
(),
formulaContext
.
getProjectId
());
...
@@ -95,10 +92,17 @@ public class DFFS extends FunctionBase implements FreeRefFunction {
...
@@ -95,10 +92,17 @@ public class DFFS extends FunctionBase implements FreeRefFunction {
return
year
+
"-"
+
(
period
>
9
?
period
:
(
"0"
+
period
));
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
glBalanceExample
=
new
GlBalanceExample
();
GlBalanceExample
.
Criteria
c1
=
glBalanceExample
.
createCriteria
().
andSegment3EqualTo
(
code
).
andPeriodNameEqualTo
(
periodName
(
period
,
year
));
GlBalanceExample
.
Criteria
c1
=
glBalanceExample
.
createCriteria
().
andSegment3EqualTo
(
code
)
GlBalanceExample
.
Criteria
c2
=
glBalanceExample
.
createCriteria
().
andSegment4EqualTo
(
code
).
andPeriodNameEqualTo
(
periodName
(
period
,
year
));
.
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
);
glBalanceExample
.
or
(
c2
);
List
<
GlBalance
>
list
=
SpringContextUtil
.
glBalanceMapper
.
selectByExample
(
glBalanceExample
);
List
<
GlBalance
>
list
=
SpringContextUtil
.
glBalanceMapper
.
selectByExample
(
glBalanceExample
);
if
(
CollectionUtils
.
isEmpty
(
list
)){
if
(
CollectionUtils
.
isEmpty
(
list
)){
...
...
atms-web/src/main/webapp/app/common/controls/vat-report-view/vat-report-view.ctrl.js
View file @
163acc9d
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'
,
'apiInterceptor'
,
'vatExportService'
,
'SweetAlert'
,
'BSPLService'
,
'vatReportService'
,
'vatReportCacheService'
,
'vatSessionService'
,
'loginContext'
,
'enums'
,
'vatCommonService'
,
'vatWorkflowService'
,
'projectService'
,
'$uibModal'
,
'$cookies'
,
'Upload'
,
'vatImportService'
,
'vatApproveService'
,
'loginContext'
,
'enums'
,
'vatCommonService'
,
'vatWorkflowService'
,
'projectService'
,
'$uibModal'
,
'$cookies'
,
'Upload'
,
'vatImportService'
,
'vatApproveService'
,
function
(
$scope
,
$rootScope
,
$log
,
$translate
,
$timeout
,
$q
,
$compile
,
$state
,
$stateParams
,
apiInterceptor
,
vatExportService
,
SweetAlert
,
BSPLService
,
function
(
$scope
,
$rootScope
,
$log
,
$translate
,
$timeout
,
$q
,
$compile
,
$state
,
$stateParams
,
apiInterceptor
,
vatExportService
,
SweetAlert
,
BSPLService
,
...
@@ -972,7 +972,7 @@
...
@@ -972,7 +972,7 @@
delete
x
.
cellValue
;
delete
x
.
cellValue
;
});
});
reportData
.
data
.
cellData
.
reportName
=
node
.
name
;
//
reportData.data.cellData.reportName = node.name;
reportData
.
data
.
cellData
.
orderIndex
=
node
.
orderIndex
;
reportData
.
data
.
cellData
.
orderIndex
=
node
.
orderIndex
;
reportData
.
data
.
cellData
.
templateId
=
node
.
id
;
reportData
.
data
.
cellData
.
templateId
=
node
.
id
;
exportReportData
.
push
(
reportData
.
data
.
cellData
);
exportReportData
.
push
(
reportData
.
data
.
cellData
);
...
...
atms-web/src/main/webapp/app/common/vatservices/vatPreviewService.js
View file @
163acc9d
...
@@ -5,6 +5,25 @@
...
@@ -5,6 +5,25 @@
return
$http
.
get
(
'url'
,
apiConfig
.
createVat
());
return
$http
.
get
(
'url'
,
apiConfig
.
createVat
());
},
},
queryOutputInvoiceAllList
:
function
(
param
)
{
return
$http
.
post
(
'/outputInvoiceImport/queryOutputInvoiceAllList'
,
{
// PageInfo: param.pageInfo,
PeriodStart
:
param
.
periodStart
,
PeriodEnd
:
param
.
periodEnd
,
InvoiceType
:
param
.
invoiceType
,
StartInvoiceDate
:
param
.
invoiceDateStart
,
EndInvoiceDate
:
param
.
invoiceDateEnd
,
ClassCode
:
param
.
classCode
,
InvoiceNumber
:
param
.
invoiceNumber
,
BuyerName
:
param
.
buyerName
,
ProductName
:
param
.
productName
,
AmountStart
:
param
.
amountStart
,
AmountEnd
:
param
.
amountEnd
,
TaxAmountStart
:
param
.
taxAmountStart
,
TaxAmountEnd
:
param
.
taxAmountEnd
,
},
apiConfig
.
createVat
());
},
queryOutputInvoiceList
:
function
(
param
)
{
queryOutputInvoiceList
:
function
(
param
)
{
return
$http
.
post
(
'/outputInvoiceImport/queryOutputInvoiceList'
,
{
return
$http
.
post
(
'/outputInvoiceImport/queryOutputInvoiceList'
,
{
PageInfo
:
param
.
pageInfo
,
PageInfo
:
param
.
pageInfo
,
...
@@ -67,6 +86,25 @@
...
@@ -67,6 +86,25 @@
},
apiConfig
.
createVat
());
},
apiConfig
.
createVat
());
},
},
queryInputInvoiceAllList
:
function
(
param
)
{
return
$http
.
post
(
'/inputInvoiceImport/inputInvoicePreviewAllList'
,
{
// PageInfo: param.pageInfo,
PeriodStart
:
param
.
periodStart
,
PeriodEnd
:
param
.
periodEnd
,
CertificationDateStart
:
param
.
certificationDateStart
,
CertificationDateEnd
:
param
.
certificationDateEnd
,
InvoiceCode
:
param
.
invoiceCode
,
InvoiceNumber
:
param
.
invoiceNumber
,
SellerTaxNumber
:
param
.
sellerTaxNumber
,
AmountStart
:
param
.
amountStart
,
AmountEnd
:
param
.
amountEnd
,
InvoiceType
:
param
.
invoiceType
,
TaxAmountStart
:
param
.
taxAmountStart
,
TaxAmountEnd
:
param
.
taxAmountEnd
,
CertificationStatus
:
param
.
certificationStatus
},
apiConfig
.
createVat
());
},
queryInputInvoiceItemList
:
function
(
inputInvoiceID
)
{
queryInputInvoiceItemList
:
function
(
inputInvoiceID
)
{
return
$http
.
get
(
'/inputInvoiceImport/inputInvoiceItemPreviewList/'
+
inputInvoiceID
,
apiConfig
.
createVat
());
return
$http
.
get
(
'/inputInvoiceImport/inputInvoiceItemPreviewList/'
+
inputInvoiceID
,
apiConfig
.
createVat
());
},
},
...
...
atms-web/src/main/webapp/app/vat/preview/vat-preview-input-invoice/vat-preview-input-invoice.ctrl.js
View file @
163acc9d
...
@@ -89,11 +89,11 @@
...
@@ -89,11 +89,11 @@
pageSize
:
-
1
,
pageSize
:
-
1
,
totalPage
:
0
,
totalPage
:
0
,
};
};
vatPreviewService
.
queryInputInvoiceList
(
$scope
.
queryParams
).
success
(
function
(
data
)
{
vatPreviewService
.
queryInputInvoice
All
List
(
$scope
.
queryParams
).
success
(
function
(
data
)
{
if
(
data
)
{
if
(
data
)
{
var
totalMoneyAmount
=
0
;
var
totalMoneyAmount
=
0
;
var
totalTaxAmount
=
0
;
var
totalTaxAmount
=
0
;
_
.
each
(
data
.
list
,
function
(
x
)
{
_
.
each
(
data
,
function
(
x
)
{
totalMoneyAmount
=
totalMoneyAmount
+
parseFloat
(
x
.
hjje
.
replace
(
/,/g
,
""
));
totalMoneyAmount
=
totalMoneyAmount
+
parseFloat
(
x
.
hjje
.
replace
(
/,/g
,
""
));
totalTaxAmount
=
totalTaxAmount
+
parseFloat
(
x
.
hjse
.
replace
(
/,/g
,
""
));
totalTaxAmount
=
totalTaxAmount
+
parseFloat
(
x
.
hjse
.
replace
(
/,/g
,
""
));
})
})
...
@@ -124,13 +124,12 @@
...
@@ -124,13 +124,12 @@
var
index
=
1
;
var
index
=
1
;
data
.
list
.
forEach
(
function
(
v
)
{
data
.
list
.
forEach
(
function
(
v
)
{
v
.
index
=
index
++
;
v
.
index
=
index
++
;
v
.
amount
=
PWC
.
round
(
v
.
amount
,
2
);
v
.
amount
=
PWC
.
round
(
parseFloat
(
v
.
hjje
.
replace
(
/,/g
,
""
))
,
2
);
v
.
taxAmount
=
PWC
.
round
(
v
.
taxAmount
,
2
);
v
.
taxAmount
=
PWC
.
round
(
parseFloat
(
v
.
hjse
.
replace
(
/,/g
,
""
))
,
2
);
});
});
$scope
.
gridOptions
.
data
=
data
.
list
;
$scope
.
gridOptions
.
data
=
data
.
list
;
$scope
.
queryIncomeInvoiceItemResult
.
pageInfo
=
data
;
$scope
.
queryIncomeInvoiceItemResult
.
pageInfo
=
data
;
computeIncomeInvoiceItemPage
();
computeIncomeInvoiceItemPage
();
countTotal
();
}
}
});
});
};
};
...
...
atms-web/src/main/webapp/app/vat/preview/vat-preview-output-invoice/vat-preview-output-invoice.ctrl.js
View file @
163acc9d
...
@@ -68,6 +68,23 @@
...
@@ -68,6 +68,23 @@
$scope
.
queryParams
.
periodEnd
=
vatSessionService
.
month
;
$scope
.
queryParams
.
periodEnd
=
vatSessionService
.
month
;
};
};
var
countTotal
=
function
(){
var
totalMoneyAmount
=
0
;
var
totalTaxAmount
=
0
;
vatPreviewService
.
queryOutputInvoiceAllList
(
$scope
.
queryParams
).
success
(
function
(
data
)
{
if
(
data
)
{
_
.
each
(
data
,
function
(
x
)
{
totalMoneyAmount
+=
parseFloat
(
x
.
hjje
.
replace
(
/,/g
,
""
));
totalTaxAmount
+=
parseFloat
(
x
.
hjse
.
replace
(
/,/g
,
""
));
})
}
$scope
.
totalMoneyAmount
=
totalMoneyAmount
.
toLocaleString
();
$scope
.
totalTaxAmount
=
totalTaxAmount
.
toLocaleString
();
}).
error
(
function
()
{
SweetAlert
.
error
(
$translate
.
instant
(
'PleaseContactAdministrator'
));
});
}
//从数据库中load数据
//从数据库中load数据
var
loadOutputInvoiceDataFromDB
=
function
(
pageIndex
)
{
var
loadOutputInvoiceDataFromDB
=
function
(
pageIndex
)
{
initOutputInvoicePagination
();
initOutputInvoicePagination
();
...
@@ -81,24 +98,15 @@
...
@@ -81,24 +98,15 @@
totalPage
:
0
,
totalPage
:
0
,
}
}
var
countTotal
=
function
(){
var
totalMoneyAmount
=
0
;
var
totalTaxAmount
=
0
;
_
.
each
(
$scope
.
gridOptions
.
data
,
function
(
x
)
{
totalMoneyAmount
=
totalMoneyAmount
+
parseFloat
(
x
.
hjje
.
replace
(
/,/g
,
""
));
totalTaxAmount
=
totalTaxAmount
+
parseFloat
(
x
.
hjse
.
replace
(
/,/g
,
""
));
})
$scope
.
totalMoneyAmount
=
totalMoneyAmount
.
toLocaleString
();
$scope
.
totalTaxAmount
=
totalTaxAmount
.
toLocaleString
();
}
vatPreviewService
.
queryOutputInvoiceList
(
$scope
.
queryParams
).
success
(
function
(
data
)
{
vatPreviewService
.
queryOutputInvoiceList
(
$scope
.
queryParams
).
success
(
function
(
data
)
{
if
(
data
)
{
if
(
data
)
{
var
index
=
1
;
var
index
=
1
;
data
.
list
.
forEach
(
function
(
v
)
{
data
.
list
.
forEach
(
function
(
v
)
{
v
.
index
=
index
++
;
v
.
index
=
index
++
;
v
.
amount
=
PWC
.
round
(
v
.
amount
,
2
);
v
.
amount
=
PWC
.
round
(
parseFloat
(
v
.
hjje
.
replace
(
/,/g
,
""
))
,
2
);
v
.
taxAmount
=
PWC
.
round
(
v
.
taxAmount
,
2
);
v
.
taxAmount
=
PWC
.
round
(
parseFloat
(
v
.
hjse
.
replace
(
/,/g
,
""
))
,
2
);
});
});
$scope
.
gridOptions
.
data
=
data
.
list
;
$scope
.
gridOptions
.
data
=
data
.
list
;
$scope
.
queryOutputInvoiceResult
.
pageInfo
=
data
;
$scope
.
queryOutputInvoiceResult
.
pageInfo
=
data
;
...
@@ -381,7 +389,7 @@
...
@@ -381,7 +389,7 @@
var
criteria
=
JSON
.
stringify
(
$scope
.
queryParams
);
var
criteria
=
JSON
.
stringify
(
$scope
.
queryParams
);
if
(
browserService
.
isIE
()
||
browserService
.
isEdge
())
if
(
browserService
.
isIE
()
||
browserService
.
isEdge
())
criteria
=
encodeURIComponent
(
criteria
);
criteria
=
encodeURIComponent
(
criteria
);
countTotal
();
loadOutputInvoiceDataFromDB
(
1
);
loadOutputInvoiceDataFromDB
(
1
);
$
(
'.filter-button'
).
popover
(
"hide"
);
$
(
'.filter-button'
).
popover
(
"hide"
);
};
};
...
@@ -407,6 +415,7 @@
...
@@ -407,6 +415,7 @@
$scope
.
criteriaList
=
[];
$scope
.
criteriaList
=
[];
$scope
.
queryParams
.
periodStart
=
startMonth
;
$scope
.
queryParams
.
periodStart
=
startMonth
;
$scope
.
queryParams
.
periodEnd
=
endMonth
;
$scope
.
queryParams
.
periodEnd
=
endMonth
;
countTotal
();
loadOutputInvoiceDataFromDB
(
1
);
loadOutputInvoiceDataFromDB
(
1
);
$
(
'.filter-button'
).
popover
(
"hide"
);
$
(
'.filter-button'
).
popover
(
"hide"
);
};
};
...
@@ -598,7 +607,7 @@
...
@@ -598,7 +607,7 @@
endMonth
=
result
[
1
][
0
];
endMonth
=
result
[
1
][
0
];
$scope
.
queryParams
.
periodStart
=
startMonth
;
$scope
.
queryParams
.
periodStart
=
startMonth
;
$scope
.
queryParams
.
periodEnd
=
endMonth
;
$scope
.
queryParams
.
periodEnd
=
endMonth
;
countTotal
();
loadOutputInvoiceDataFromDB
(
1
);
loadOutputInvoiceDataFromDB
(
1
);
});
});
...
@@ -651,6 +660,7 @@
...
@@ -651,6 +660,7 @@
$scope
.
showPopover
=
showPopover
;
$scope
.
showPopover
=
showPopover
;
initPeriods
();
initPeriods
();
initOutputInvoicePagination
();
initOutputInvoicePagination
();
countTotal
();
loadOutputInvoiceDataFromDB
(
1
);
loadOutputInvoiceDataFromDB
(
1
);
})();
})();
}
}
...
...
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