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
4ef2e0b7
Commit
4ef2e0b7
authored
Nov 30, 2018
by
sherlock
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev_oracle_sherlock' into 'dev_oracle'
xxfp See merge request root/atms!218
parents
cc888f21
6a3bbbed
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
55 additions
and
15 deletions
+55
-15
InputInvoiceImportController.java
...taxtech/atms/controller/InputInvoiceImportController.java
+16
-2
OutputInvoiceController.java
.../pwc/taxtech/atms/controller/OutputInvoiceController.java
+15
-1
InputInvoiceDataImportServiceImpl.java
...s/vat/service/impl/InputInvoiceDataImportServiceImpl.java
+6
-2
OutputInvoiceServiceImpl.java
...xtech/atms/vat/service/impl/OutputInvoiceServiceImpl.java
+6
-2
XXFP.java
.../taxtech/atms/vat/service/impl/report/functions/XXFP.java
+6
-4
OutputInvoiceExtendsMapper.xml
...xtech/atms/invoice/extends/OutputInvoiceExtendsMapper.xml
+3
-2
vat-preview-input-invoice.ctrl.js
...t-preview-input-invoice/vat-preview-input-invoice.ctrl.js
+3
-2
No files found.
atms-api/src/main/java/pwc/taxtech/atms/controller/InputInvoiceImportController.java
View file @
4ef2e0b7
...
...
@@ -2,6 +2,7 @@ package pwc.taxtech.atms.controller;
import
com.github.pagehelper.PageInfo
;
import
com.google.common.collect.Lists
;
import
jdk.internal.util.xml.impl.Input
;
import
org.apache.commons.lang3.StringUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
...
...
@@ -9,6 +10,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.http.MediaType
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.web.bind.annotation.*
;
import
pwc.taxtech.atms.constant.enums.KeyValueConfigResultType
;
import
pwc.taxtech.atms.dto.vatdto.*
;
import
pwc.taxtech.atms.service.impl.IdentityServiceImpl
;
import
pwc.taxtech.atms.thirdparty.ExcelSheet
;
...
...
@@ -18,6 +20,7 @@ import pwc.taxtech.atms.vat.entity.InputInvoice;
import
pwc.taxtech.atms.vat.entity.InputInvoiceDetail
;
import
pwc.taxtech.atms.vat.entity.InputVatInvoiceItem
;
import
pwc.taxtech.atms.vat.service.impl.InputInvoiceDataImportServiceImpl
;
import
pwc.taxtech.atms.vat.service.impl.report.functions.FormulaHelper
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.IOException
;
...
...
@@ -40,8 +43,19 @@ public class InputInvoiceImportController {
@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
);
@RequestHeader
(
"from"
)
String
projectId
)
{
double
hjje
=
0
;
double
hjse
=
0
;
for
(
InputInvoice
inputInvoice
:
inputInvoiceDataImportService
.
getInputInvoice
(
paras
,
projectId
)){
hjje
+=
FormulaHelper
.
roundValue
(
new
BigDecimal
(
inputInvoice
.
getHJJE
()),
KeyValueConfigResultType
.
Accounting
,
true
,
null
).
doubleValue
();
hjse
+=
FormulaHelper
.
roundValue
(
new
BigDecimal
(
inputInvoice
.
getHJSE
()),
KeyValueConfigResultType
.
Accounting
,
true
,
null
).
doubleValue
();
}
InputInvoice
i
=
new
InputInvoice
();
i
.
setHJJE
(
hjje
+
""
);
i
.
setHJSE
(
hjse
+
""
);
List
<
InputInvoice
>
list
=
Lists
.
newArrayList
();
list
.
add
(
i
);
return
list
;
}
@RequestMapping
(
value
=
"inputInvoicePreviewList"
,
method
=
RequestMethod
.
POST
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
...
...
atms-api/src/main/java/pwc/taxtech/atms/controller/OutputInvoiceController.java
View file @
4ef2e0b7
...
...
@@ -10,6 +10,7 @@ import org.springframework.web.bind.annotation.*;
import
org.springframework.web.multipart.MultipartHttpServletRequest
;
import
pwc.taxtech.atms.common.util.BeanUtil
;
import
pwc.taxtech.atms.constant.enums.EnumModule
;
import
pwc.taxtech.atms.constant.enums.KeyValueConfigResultType
;
import
pwc.taxtech.atms.dpo.PagingResultDto
;
import
pwc.taxtech.atms.dto.vatdto.ImportOutputInvoiceDto
;
import
pwc.taxtech.atms.dto.vatdto.QueryEvidenceDto
;
...
...
@@ -21,6 +22,7 @@ import pwc.taxtech.atms.vat.entity.ImportFile;
import
pwc.taxtech.atms.vat.entity.OutputInvoice
;
import
pwc.taxtech.atms.vat.service.impl.FileUploadAdapter
;
import
pwc.taxtech.atms.vat.service.impl.OutputInvoiceServiceImpl
;
import
pwc.taxtech.atms.vat.service.impl.report.functions.FormulaHelper
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.IOException
;
...
...
@@ -55,7 +57,19 @@ public class OutputInvoiceController {
@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
);
List
<
OutputInvoice
>
list
=
outputInvoiceService
.
getOutputInvoice
(
queryDto
,
projectId
);
double
hjje
=
0
;
double
hjse
=
0
;
for
(
OutputInvoice
outputInvoice
:
list
){
hjje
+=
FormulaHelper
.
roundValue
(
new
BigDecimal
(
outputInvoice
.
getHJJE
()),
KeyValueConfigResultType
.
Accounting
,
true
,
null
).
doubleValue
();
hjse
+=
FormulaHelper
.
roundValue
(
new
BigDecimal
(
outputInvoice
.
getHJSE
()),
KeyValueConfigResultType
.
Accounting
,
true
,
null
).
doubleValue
();
}
list
=
Lists
.
newArrayList
();
OutputInvoice
o
=
new
OutputInvoice
();
o
.
setHJJE
(
hjje
+
""
);
o
.
setHJSE
(
hjse
+
""
);
list
.
add
(
o
);
return
list
;
}
@RequestMapping
(
value
=
"getExportOutputInvoiceList"
,
method
=
RequestMethod
.
POST
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
...
...
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/InputInvoiceDataImportServiceImpl.java
View file @
4ef2e0b7
...
...
@@ -55,7 +55,7 @@ public class InputInvoiceDataImportServiceImpl {
@Autowired
private
OrganizationMapper
organizationMapper
;
public
List
<
InputInvoice
>
getInputInvoiceTre
e
(
InputInvoicePreviewQueryParam
paras
,
String
projectId
){
public
List
<
InputInvoice
>
getInputInvoic
e
(
InputInvoicePreviewQueryParam
paras
,
String
projectId
){
Project
project
=
projectMapper
.
selectByPrimaryKey
(
projectId
);
Organization
organization
=
organizationMapper
.
selectByPrimaryKey
(
project
.
getOrganizationId
());
InputInvoiceExample
invoiceExample
=
new
InputInvoiceExample
();
...
...
@@ -63,7 +63,11 @@ 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
);
return
inputInvoiceMapper
.
selectByExample
(
invoiceExample
);
}
public
List
<
InputInvoice
>
getInputInvoiceTree
(
InputInvoicePreviewQueryParam
paras
,
String
projectId
){
List
<
InputInvoice
>
invoices
=
getInputInvoice
(
paras
,
projectId
);
DecimalFormat
df
=
new
DecimalFormat
(
"#,###.00"
);
invoices
.
stream
().
forEach
(
x
->
{
x
.
setHJJE
(
df
.
format
(
new
BigDecimal
(
x
.
getHJJE
())));
...
...
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/OutputInvoiceServiceImpl.java
View file @
4ef2e0b7
...
...
@@ -73,7 +73,7 @@ public class OutputInvoiceServiceImpl {
@Autowired
private
OutputInvoiceDetailMapper
outputInvoiceDetailMapper
;
public
List
<
OutputInvoice
>
queryOutputInvoiceAllList
(
QueryOutputDto
queryDto
,
String
projectId
)
{
public
List
<
OutputInvoice
>
getOutputInvoice
(
QueryOutputDto
queryDto
,
String
projectId
)
{
Project
project
=
projectMapper
.
selectByPrimaryKey
(
projectId
);
Organization
organization
=
organizationMapper
.
selectByPrimaryKey
(
project
.
getOrganizationId
());
...
...
@@ -89,7 +89,11 @@ public class OutputInvoiceServiceImpl {
DateUtils
.
getPeriodEnd
(
project
.
getYear
(),
queryDto
.
getPeriodEnd
()))
.
andFPZTNotEqualTo
(
"1"
);
}
List
<
OutputInvoice
>
invoices
=
outputInvoiceMapper
.
selectByExample
(
outputInvoiceExample
);
return
outputInvoiceMapper
.
selectByExample
(
outputInvoiceExample
);
}
public
List
<
OutputInvoice
>
queryOutputInvoiceAllList
(
QueryOutputDto
queryDto
,
String
projectId
)
{
List
<
OutputInvoice
>
invoices
=
getOutputInvoice
(
queryDto
,
projectId
);
DecimalFormat
df
=
new
DecimalFormat
(
"#,###.00"
);
invoices
.
stream
().
forEach
(
x
->
{
x
.
setHJJE
(
df
.
format
(
new
BigDecimal
(
x
.
getHJJE
())));
...
...
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/report/functions/XXFP.java
View file @
4ef2e0b7
package
pwc
.
taxtech
.
atms
.
vat
.
service
.
impl
.
report
.
functions
;
import
com.github.pagehelper.Page
;
import
com.github.pagehelper.PageHelper
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.poi.ss.formula.OperationEvaluationContext
;
import
org.apache.poi.ss.formula.eval.NumberEval
;
...
...
@@ -12,10 +14,8 @@ import pwc.taxtech.atms.constant.enums.EnumOperationType;
import
pwc.taxtech.atms.constant.enums.FormulaDataSourceDetailType
;
import
pwc.taxtech.atms.constant.enums.KeyValueConfigResultType
;
import
pwc.taxtech.atms.dto.vatdto.OutputInvoiceDataSourceDto
;
import
pwc.taxtech.atms.invoice.OutputInvoiceMapper
;
import
pwc.taxtech.atms.vat.dpo.OutputInvoiceDto
;
import
pwc.taxtech.atms.vat.dpo.OutputVATInvoiceDto
;
import
pwc.taxtech.atms.vat.entity.OutputInvoice
;
import
pwc.taxtech.atms.vat.entity.OutputInvoiceDetailExample
;
import
java.math.BigDecimal
;
import
java.util.*
;
...
...
@@ -75,7 +75,9 @@ public class XXFP extends FunctionBase implements FreeRefFunction {
// String dbName = SpringContextUtil.projectDao.getDbNameWithYearAndOrgId(formulaContext.getOrganizationId(), curYear);
// List<OutputVATInvoiceDto> outputInvoice = SpringContextUtil.outputVatInvoiceMapper.getVatInvoiceWithItems(dbName);
List
<
OutputInvoiceDto
>
outputInvoice
=
SpringContextUtil
.
outputInvoiceMapper
.
getOutputInvoiceWithDetail
();
PageHelper
.
clearPage
();
// logger.warn(PageHelper.getLocalPage().toString());
List
<
OutputInvoiceDto
>
outputInvoice
=
SpringContextUtil
.
getBean
(
OutputInvoiceMapper
.
class
).
getOutputInvoiceWithDetail
();
if
(
invoiceTypeParam
==
1
)
{
outputInvoice
=
outputInvoice
.
stream
()
...
...
atms-dao/src/main/resources/pwc/taxtech/atms/invoice/extends/OutputInvoiceExtendsMapper.xml
View file @
4ef2e0b7
...
...
@@ -196,7 +196,7 @@
<select
id=
"getOutputInvoiceWithDetail"
resultMap=
"outputInvoiceDto"
>
SELECT
INVOICE.ID AS INVOICE_ID,
--
INVOICE.ID AS INVOICE_ID,
INVOICE.ID AS INVOICEID,
INVOICE.FPQQLSH,
INVOICE.FPDM,
...
...
@@ -284,7 +284,8 @@
JOIN
OUTPUT_INVOICE_DETAIL INVOICEDETAIL
ON
INVOICE.FPQQLSH = INVOICEDETAIL.FPQQLSH and INVOICE.FPZT != '1'
INVOICE.FPQQLSH = INVOICEDETAIL.FPQQLSH
where INVOICE.FPZT != '1' and 1=1
ORDER BY
INVOICE.FPHM
</select>
...
...
atms-web/src/main/webapp/app/vat/preview/vat-preview-input-invoice/vat-preview-input-invoice.ctrl.js
View file @
4ef2e0b7
...
...
@@ -424,7 +424,7 @@
var
criteria
=
JSON
.
stringify
(
$scope
.
queryParams
);
if
(
browserService
.
isIE
()
||
browserService
.
isEdge
())
criteria
=
encodeURIComponent
(
criteria
);
countTotal
();
loadIncomeInvoiceItemDataFromDB
(
1
);
if
(
$scope
.
criteriaList
.
length
>
6
)
{
$scope
.
criteriaListFirstRow
=
$scope
.
criteriaList
.
slice
(
0
,
6
);
...
...
@@ -457,6 +457,7 @@
$scope
.
criteriaList
=
[];
$scope
.
queryParams
.
periodStart
=
$scope
.
startMonth
;
$scope
.
queryParams
.
periodEnd
=
$scope
.
endMonth
;
countTotal
();
loadIncomeInvoiceItemDataFromDB
(
1
);
$
(
'.filter-button'
).
popover
(
"hide"
);
};
...
...
@@ -568,7 +569,7 @@
$scope
.
queryParams
.
periodStart
=
startMonth
;
$scope
.
queryParams
.
periodEnd
=
endMonth
;
countTotal
();
loadIncomeInvoiceItemDataFromDB
(
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