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
f74c5e27
Commit
f74c5e27
authored
Nov 26, 2018
by
sherlock
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
count total, templateName
parent
09412b34
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
112 additions
and
42 deletions
+112
-42
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
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
+54
-16
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 @
f74c5e27
...
...
@@ -37,6 +37,13 @@ public class InputInvoiceImportController {
private
IdentityServiceImpl
identityService
;
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
)
public
@ResponseBody
PageInfo
<
InputInvoice
>
getInputInvoiceTreeViewData
(
@RequestBody
InputInvoicePreviewQueryParam
paras
,
...
...
atms-api/src/main/java/pwc/taxtech/atms/controller/OutputInvoiceController.java
View file @
f74c5e27
...
...
@@ -52,6 +52,12 @@ public class OutputInvoiceController {
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
)
public
void
downloadInvoiceQueryData
(
@RequestBody
QueryOutputDto
paras
,
@RequestHeader
(
"from"
)
String
projectId
,
HttpServletResponse
response
)
{
response
.
setContentType
(
"application/vnd.ms-excel;charset=utf-8"
);
...
...
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/OutputInvoiceServiceImpl.java
View file @
f74c5e27
...
...
@@ -73,7 +73,7 @@ public class OutputInvoiceServiceImpl {
@Autowired
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
);
Organization
organization
=
organizationMapper
.
selectByPrimaryKey
(
project
.
getOrganizationId
());
...
...
@@ -89,9 +89,6 @@ public class OutputInvoiceServiceImpl {
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
->
{
...
...
@@ -99,7 +96,11 @@ public class OutputInvoiceServiceImpl {
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
;
}
...
...
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/ReportServiceImpl.java
View file @
f74c5e27
...
...
@@ -654,6 +654,8 @@ public class ReportServiceImpl {
dataSourceDto
.
setDataSourceType
(
CellDataSourceType
.
InputInvoice
.
getCode
());
}
else
if
(
a
.
getType
().
equals
(
FormulaDataSourceType
.
Voucher
.
getCode
()))
{
dataSourceDto
.
setDataSourceType
(
CellDataSourceType
.
Voucher
.
getCode
());
}
else
if
(
a
.
getType
().
equals
(
FormulaDataSourceType
.
OutputInvoice
.
getCode
())){
dataSourceDto
.
setDataSourceType
(
CellDataSourceType
.
OutputInvoice
.
getCode
());
}
else
{
dataSourceDto
.
setDataSourceType
(
0
);
}
...
...
@@ -692,6 +694,13 @@ public class ReportServiceImpl {
if
(
z
.
getItem2
().
getItems
()
!=
null
&&
!
z
.
getItem2
().
getItems
().
isEmpty
()
&&
z
.
getItem2
().
getItems
().
get
(
0
).
contains
(
"tag"
))
{
z
.
getItem2
().
getItems
().
forEach
(
m
->
{
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
);
});
}
else
...
...
atms-web/src/main/webapp/app/common/controls/vat-report-view/vat-report-view.ctrl.js
View file @
f74c5e27
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
,
...
...
@@ -972,7 +972,7 @@
delete
x
.
cellValue
;
});
reportData
.
data
.
cellData
.
reportName
=
node
.
name
;
//
reportData.data.cellData.reportName = node.name;
reportData
.
data
.
cellData
.
orderIndex
=
node
.
orderIndex
;
reportData
.
data
.
cellData
.
templateId
=
node
.
id
;
exportReportData
.
push
(
reportData
.
data
.
cellData
);
...
...
atms-web/src/main/webapp/app/common/vatservices/vatPreviewService.js
View file @
f74c5e27
...
...
@@ -5,6 +5,25 @@
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
)
{
return
$http
.
post
(
'/outputInvoiceImport/queryOutputInvoiceList'
,
{
PageInfo
:
param
.
pageInfo
,
...
...
@@ -49,22 +68,41 @@
queryInputInvoiceList
:
function
(
param
)
{
return
$http
.
post
(
'/inputInvoiceImport/inputInvoicePreviewList'
,
{
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
());
return
$http
.
post
(
'/inputInvoiceImport/inputInvoicePreviewList'
,
{
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
());
},
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
)
{
...
...
atms-web/src/main/webapp/app/vat/preview/vat-preview-input-invoice/vat-preview-input-invoice.ctrl.js
View file @
f74c5e27
...
...
@@ -89,11 +89,11 @@
pageSize
:
-
1
,
totalPage
:
0
,
};
vatPreviewService
.
queryInputInvoiceList
(
$scope
.
queryParams
).
success
(
function
(
data
)
{
vatPreviewService
.
queryInputInvoice
All
List
(
$scope
.
queryParams
).
success
(
function
(
data
)
{
if
(
data
)
{
var
totalMoneyAmount
=
0
;
var
totalTaxAmount
=
0
;
_
.
each
(
data
.
list
,
function
(
x
)
{
_
.
each
(
data
,
function
(
x
)
{
totalMoneyAmount
=
totalMoneyAmount
+
parseFloat
(
x
.
hjje
.
replace
(
/,/g
,
""
));
totalTaxAmount
=
totalTaxAmount
+
parseFloat
(
x
.
hjse
.
replace
(
/,/g
,
""
));
})
...
...
@@ -124,13 +124,12 @@
var
index
=
1
;
data
.
list
.
forEach
(
function
(
v
)
{
v
.
index
=
index
++
;
v
.
amount
=
PWC
.
round
(
v
.
amount
,
2
);
v
.
taxAmount
=
PWC
.
round
(
v
.
taxAmount
,
2
);
v
.
amount
=
PWC
.
round
(
parseFloat
(
v
.
hjje
.
replace
(
/,/g
,
""
))
,
2
);
v
.
taxAmount
=
PWC
.
round
(
parseFloat
(
v
.
hjse
.
replace
(
/,/g
,
""
))
,
2
);
});
$scope
.
gridOptions
.
data
=
data
.
list
;
$scope
.
queryIncomeInvoiceItemResult
.
pageInfo
=
data
;
computeIncomeInvoiceItemPage
();
countTotal
();
}
});
};
...
...
atms-web/src/main/webapp/app/vat/preview/vat-preview-output-invoice/vat-preview-output-invoice.ctrl.js
View file @
f74c5e27
...
...
@@ -68,6 +68,23 @@
$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数据
var
loadOutputInvoiceDataFromDB
=
function
(
pageIndex
)
{
initOutputInvoicePagination
();
...
...
@@ -81,24 +98,15 @@
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
)
{
if
(
data
)
{
var
index
=
1
;
data
.
list
.
forEach
(
function
(
v
)
{
v
.
index
=
index
++
;
v
.
amount
=
PWC
.
round
(
v
.
amount
,
2
);
v
.
taxAmount
=
PWC
.
round
(
v
.
taxAmount
,
2
);
v
.
amount
=
PWC
.
round
(
parseFloat
(
v
.
hjje
.
replace
(
/,/g
,
""
))
,
2
);
v
.
taxAmount
=
PWC
.
round
(
parseFloat
(
v
.
hjse
.
replace
(
/,/g
,
""
))
,
2
);
});
$scope
.
gridOptions
.
data
=
data
.
list
;
$scope
.
queryOutputInvoiceResult
.
pageInfo
=
data
;
...
...
@@ -381,7 +389,7 @@
var
criteria
=
JSON
.
stringify
(
$scope
.
queryParams
);
if
(
browserService
.
isIE
()
||
browserService
.
isEdge
())
criteria
=
encodeURIComponent
(
criteria
);
countTotal
();
loadOutputInvoiceDataFromDB
(
1
);
$
(
'.filter-button'
).
popover
(
"hide"
);
};
...
...
@@ -407,6 +415,7 @@
$scope
.
criteriaList
=
[];
$scope
.
queryParams
.
periodStart
=
startMonth
;
$scope
.
queryParams
.
periodEnd
=
endMonth
;
countTotal
();
loadOutputInvoiceDataFromDB
(
1
);
$
(
'.filter-button'
).
popover
(
"hide"
);
};
...
...
@@ -598,7 +607,7 @@
endMonth
=
result
[
1
][
0
];
$scope
.
queryParams
.
periodStart
=
startMonth
;
$scope
.
queryParams
.
periodEnd
=
endMonth
;
countTotal
();
loadOutputInvoiceDataFromDB
(
1
);
});
...
...
@@ -651,6 +660,7 @@
$scope
.
showPopover
=
showPopover
;
initPeriods
();
initOutputInvoicePagination
();
countTotal
();
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