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
77d46e28
Commit
77d46e28
authored
Nov 18, 2018
by
eddie.woo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
modify
parent
732042b1
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
20 additions
and
14 deletions
+20
-14
Constant.java
...api/src/main/java/pwc/taxtech/atms/constant/Constant.java
+1
-0
InputInvoiceDao.java
...c/main/java/pwc/taxtech/atms/vat/dao/InputInvoiceDao.java
+1
-0
InputInvoiceDataImportServiceImpl.java
...s/vat/service/impl/InputInvoiceDataImportServiceImpl.java
+8
-6
OutputInvoiceServiceImpl.java
...xtech/atms/vat/service/impl/OutputInvoiceServiceImpl.java
+9
-7
OutputInvoiceExtendsMapper.xml
...xtech/atms/invoice/extends/OutputInvoiceExtendsMapper.xml
+1
-1
No files found.
atms-api/src/main/java/pwc/taxtech/atms/constant/Constant.java
View file @
77d46e28
...
...
@@ -113,6 +113,7 @@ public final class Constant {
public
static
class
DateFormat
{
public
static
final
String
DEFAULT
=
"yyyy-MM-dd"
;
public
static
final
String
YEAR_MONTH
=
"yyyy-MM"
;
public
static
final
String
YYYYMM
=
"yyyyMM"
;
public
static
final
String
YYYY_MM_DD_HH_MM_SS
=
"yyyy-MM-dd HH:mm:ss"
;
}
...
...
atms-api/src/main/java/pwc/taxtech/atms/vat/dao/InputInvoiceDao.java
View file @
77d46e28
...
...
@@ -44,6 +44,7 @@ public class InputInvoiceDao {
// criteria1.andRZJGEqualTo(pass);
// example.or(criteria1);
}
criteria
.
andFPZTNotEqualTo
(
"1"
);
// 过滤作废状态
List
<
InputInvoice
>
list
=
inputInvoiceMapper
.
selectByExample
(
example
).
stream
().
filter
(
x
->
{
return
x
.
getRZSQ
().
endsWith
(
"-"
+
(
period
.
intValue
()
>
9
?
period
.
toString
()
:
"0"
+
period
.
toString
()));
...
...
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/InputInvoiceDataImportServiceImpl.java
View file @
77d46e28
...
...
@@ -9,6 +9,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.StringUtils
;
import
pwc.taxtech.atms.common.util.DateUtils
;
import
pwc.taxtech.atms.constant.Constant
;
import
pwc.taxtech.atms.constant.enums.EnumTbImportType
;
import
pwc.taxtech.atms.constant.enums.EnumValidationType
;
import
pwc.taxtech.atms.dao.OrganizationMapper
;
...
...
@@ -58,17 +59,18 @@ public class InputInvoiceDataImportServiceImpl {
Project
project
=
projectMapper
.
selectByPrimaryKey
(
projectId
);
Organization
organization
=
organizationMapper
.
selectByPrimaryKey
(
project
.
getOrganizationId
());
InputInvoiceExample
invoiceExample
=
new
InputInvoiceExample
();
invoiceExample
.
createCriteria
().
andGFSHEqualTo
(
organization
.
getTaxPayerNumber
()).
andRZSJBetween
(
DateUtils
.
getPeriodBeginFormat
(
project
.
getYear
(),
paras
.
getPeriodStart
()),
DateUtils
.
getPeriodEndFormat
(
project
.
getYear
(),
paras
.
getPeriodEnd
()))
.
andRZJGEqualTo
(
INPUT_RZJG_SUCCESS
).
andRZZTEqualTo
(
INPUT_RZZT_OVER
);
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
());
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
()));
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
);
...
...
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/OutputInvoiceServiceImpl.java
View file @
77d46e28
...
...
@@ -78,14 +78,16 @@ public class OutputInvoiceServiceImpl {
Organization
organization
=
organizationMapper
.
selectByPrimaryKey
(
project
.
getOrganizationId
());
OutputInvoiceExample
outputInvoiceExample
=
new
OutputInvoiceExample
();
if
(
organization
.
getTaxPayerNumber
()
==
null
)
{
if
(
organization
.
getTaxPayerNumber
()
==
null
)
{
outputInvoiceExample
.
createCriteria
().
andXFSHIsNull
().
andKPZTEqualTo
(
OUTPUT_KPZT_YES
).
andKPRQBetween
(
DateUtils
.
getPeriodBegin
(
project
.
getYear
(),
queryDto
.
getPeriodStart
()),
DateUtils
.
getPeriodEnd
(
project
.
getYear
(),
queryDto
.
getPeriodEnd
()));
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
()));
DateUtils
.
getPeriodEnd
(
project
.
getYear
(),
queryDto
.
getPeriodEnd
()))
.
andFPZTNotEqualTo
(
"1"
);
}
...
...
@@ -260,7 +262,7 @@ public class OutputInvoiceServiceImpl {
private
List
<
OutputVATInvoiceInfoDto
>
getQueryList
(
QueryOutputDto
queryDto
,
String
projectId
)
{
List
<
OutputVATInvoiceInfoDto
>
rList
=
outputInvoiceMapper
.
selectOutputInvoiceInfoLeftJoinItem
(
queryDto
);
Organization
organization
=
organizationMapper
.
selectByPrimaryKey
(
projectMapper
.
selectByPrimaryKey
(
projectId
).
getOrganizationId
());
if
(
organization
==
null
)
{
if
(
organization
==
null
)
{
return
Lists
.
newArrayList
();
}
OutputInvoiceExample
e
=
new
OutputInvoiceExample
();
...
...
@@ -268,14 +270,14 @@ public class OutputInvoiceServiceImpl {
List
<
String
>
fpqqlshList
=
outputInvoiceMapper
.
selectByExample
(
e
).
stream
().
map
(
OutputInvoice:
:
getFPQQLSH
).
collect
(
Collectors
.
toList
());
rList
=
rList
.
stream
().
filter
(
a
->
fpqqlshList
.
contains
(
a
.
getFpqqlsh
())).
collect
(
Collectors
.
toList
());
rList
.
forEach
(
x
->
{
if
(
x
.
getInvoiceDate
()
!=
null
)
{
if
(
x
.
getInvoiceDate
()
!=
null
)
{
CAL
.
setTime
(
x
.
getInvoiceDate
());
x
.
setPeriodId
(
CAL
.
get
(
Calendar
.
MONTH
)
+
1
);
}
if
(
x
.
getTaxAmount
()
==
null
||
x
.
getAmount
()
==
null
||
x
.
getTaxRate
()
==
null
)
{
if
(
x
.
getTaxAmount
()
==
null
||
x
.
getAmount
()
==
null
||
x
.
getTaxRate
()
==
null
)
{
OutputInvoiceExample
outputInvoiceExample
=
new
OutputInvoiceExample
();
outputInvoiceExample
.
createCriteria
().
andIDEqualTo
(
x
.
getInvoiceId
());
OutputInvoice
outputInvoice
=
outputInvoiceMapper
.
selectByExample
(
outputInvoiceExample
).
get
(
0
);
OutputInvoice
outputInvoice
=
outputInvoiceMapper
.
selectByExample
(
outputInvoiceExample
).
get
(
0
);
x
.
setAmount
(
outputInvoice
.
getHJJE
()
==
null
?
BigDecimal
.
ZERO
:
new
BigDecimal
(
outputInvoice
.
getHJJE
()));
x
.
setTaxRate
(
outputInvoice
.
getSLV
()
==
null
?
BigDecimal
.
ZERO
:
new
BigDecimal
(
outputInvoice
.
getSLV
()));
x
.
setTaxAmount
(
outputInvoice
.
getHJSE
()
==
null
?
BigDecimal
.
ZERO
:
new
BigDecimal
(
outputInvoice
.
getHJSE
()));
...
...
atms-dao/src/main/resources/pwc/taxtech/atms/invoice/extends/OutputInvoiceExtendsMapper.xml
View file @
77d46e28
...
...
@@ -284,7 +284,7 @@
JOIN
OUTPUT_INVOICE_DETAIL INVOICEDETAIL
ON
INVOICE.FPQQLSH = INVOICEDETAIL.FPQQLSH
INVOICE.FPQQLSH = INVOICEDETAIL.FPQQLSH
and INVOICE.FPZT != '1'
ORDER BY
INVOICE.FPHM
</select>
...
...
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