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
6026c0e1
Commit
6026c0e1
authored
Nov 16, 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
c05f0e54
a5209be3
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
50 additions
and
25 deletions
+50
-25
soap-client-1.0.jar
atms-api/lib/soap-client-1.0.jar
+0
-0
DateUtils.java
...src/main/java/pwc/taxtech/atms/common/util/DateUtils.java
+26
-4
Constant.java
...api/src/main/java/pwc/taxtech/atms/constant/Constant.java
+2
-0
DataImportService.java
...java/pwc/taxtech/atms/service/impl/DataImportService.java
+14
-15
LgGlBalanceService.java
...ava/pwc/taxtech/atms/service/impl/LgGlBalanceService.java
+2
-1
TemplateGroupServiceImpl.java
...c/taxtech/atms/service/impl/TemplateGroupServiceImpl.java
+2
-2
InputInvoiceDataImportServiceImpl.java
...s/vat/service/impl/InputInvoiceDataImportServiceImpl.java
+2
-2
ReportServiceImpl.java
.../pwc/taxtech/atms/vat/service/impl/ReportServiceImpl.java
+1
-0
DataInitTest.java
...i/src/test/java/pwc/taxtech/atms/common/DataInitTest.java
+1
-1
No files found.
atms-api/lib/soap-client-1.0.jar
View file @
6026c0e1
No preview for this file type
atms-api/src/main/java/pwc/taxtech/atms/common/util/DateUtils.java
View file @
6026c0e1
package
pwc
.
taxtech
.
atms
.
common
.
util
;
import
pwc.taxtech.atms.constant.Constant
;
import
java.text.ParseException
;
import
java.text.ParsePosition
;
import
java.text.SimpleDateFormat
;
...
...
@@ -540,16 +542,36 @@ public class DateUtils {
return
sdf
.
format
(
calendar
.
getTime
());
}
public
static
String
getPeriodBeginFormat
(
int
year
,
int
period
,
String
format
)
{
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
format
);
Calendar
calendar
=
Calendar
.
getInstance
();
calendar
.
set
(
year
,
period
-
1
,
1
,
0
,
0
,
0
);
return
sdf
.
format
(
calendar
.
getTime
());
}
public
static
String
getPeriodBeginFormat
(
int
year
,
int
period
)
{
return
getPeriodBeginFormat
(
year
,
period
,
Constant
.
DateFormat
.
DEFAULT
);
}
public
static
String
getPeriodEnd
(
int
year
,
int
period
)
{
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
return
getPeriodEndFormat
(
year
,
period
,
Constant
.
DateFormat
.
YYYY_MM_DD_HH_MM_SS
);
}
public
static
String
getPeriodEndFormat
(
int
year
,
int
period
,
String
format
)
{
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
format
);
Calendar
calendar
=
Calendar
.
getInstance
();
if
(
period
<
12
)
calendar
.
set
(
year
,
period
,
-
1
,
23
,
59
,
59
);
else
if
(
period
==
12
)
if
(
period
<
12
)
{
calendar
.
set
(
year
,
period
,
1
,
23
,
59
,
59
);
calendar
.
set
(
Calendar
.
DATE
,
calendar
.
get
(
Calendar
.
DATE
)
-
1
);
}
else
if
(
period
==
12
)
calendar
.
set
(
year
,
period
-
1
,
31
,
23
,
59
,
59
);
return
sdf
.
format
(
calendar
.
getTime
());
}
public
static
String
getPeriodEndFormat
(
int
year
,
int
period
)
{
return
getPeriodEndFormat
(
year
,
period
,
Constant
.
DateFormat
.
DEFAULT
);
}
// /***************************************************************************
// * //nd=1表示返回的值中包含年度 //yf=1表示返回的值中包含月份 //rq=1表示返回的值中包含日期 //format表示返回的格式 1
// * 以年月日中文返回 2 以横线-返回 // 3 以斜线/返回 4 以缩写不带其它符号形式返回 // 5 以点号.返回
...
...
atms-api/src/main/java/pwc/taxtech/atms/constant/Constant.java
View file @
6026c0e1
...
...
@@ -112,5 +112,6 @@ 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
YYYY_MM_DD_HH_MM_SS
=
"yyyy-MM-dd HH:mm:ss"
;
}
}
\ No newline at end of file
atms-api/src/main/java/pwc/taxtech/atms/service/impl/DataImportService.java
View file @
6026c0e1
...
...
@@ -6,8 +6,10 @@ import org.apache.commons.lang3.StringUtils;
import
org.springframework.stereotype.Service
;
import
pwc.taxtech.atms.common.config.SystemConfig
;
import
pwc.taxtech.atms.constant.Constant
;
import
pwc.taxtech.atms.constant.enums.StdAccountEnum
;
import
pwc.taxtech.atms.dao.*
;
import
pwc.taxtech.atms.dao.AccountMappingDao
;
import
pwc.taxtech.atms.dao.EnterpriseAccountSetOrgDao
;
import
pwc.taxtech.atms.dao.OrganizationMapper
;
import
pwc.taxtech.atms.dao.StandardAccountMapper
;
import
pwc.taxtech.atms.dto.vatdto.TrialBalanceDto
;
import
pwc.taxtech.atms.dto.vatdto.TrialBalanceParam
;
import
pwc.taxtech.atms.entity.*
;
...
...
@@ -97,17 +99,14 @@ public class DataImportService extends BaseService {
continue
;
}
tmp
.
forEach
(
o
->
{
if
(
StdAccountEnum
.
Direction
.
Credit
.
getCode
().
equals
(
standardAccount
.
getDirection
()))
{
dto
.
setCreditBal
(
add
(
dto
.
getCreditBal
(),
getGlBalance
(
o
.
getEnterpriseAccountCode
(),
sg3List
,
sg4List
).
getPtdCr
()));
dto
.
setBegCreditBal
(
add
(
dto
.
getBegCreditBal
(),
getGlBalance
(
o
.
getEnterpriseAccountCode
(),
sg3List
,
sg4List
).
getBeginCrBalance
()));
dto
.
setEndCreditBal
(
add
(
dto
.
getEndCreditBal
(),
getGlBalance
(
o
.
getEnterpriseAccountCode
(),
sg3List
,
sg4List
).
getEndCrBalance
()));
dto
.
setYearCreditBal
(
add
(
dto
.
getYearCreditBal
(),
getGlBalance
(
o
.
getEnterpriseAccountCode
(),
sg3List
,
sg4List
).
getYtdCr
()));
}
else
{
dto
.
setDebitBal
(
add
(
dto
.
getDebitBal
(),
getGlBalance
(
o
.
getEnterpriseAccountCode
(),
sg3List
,
sg4List
).
getPtdDr
()));
dto
.
setBegDebitBal
(
add
(
dto
.
getBegDebitBal
(),
getGlBalance
(
o
.
getEnterpriseAccountCode
(),
sg3List
,
sg4List
).
getBeginDrBalance
()));
dto
.
setEndDebitBal
(
add
(
dto
.
getEndDebitBal
(),
getGlBalance
(
o
.
getEnterpriseAccountCode
(),
sg3List
,
sg4List
).
getEndDrBalance
()));
dto
.
setYearDebitBal
(
add
(
dto
.
getYearDebitBal
(),
getGlBalance
(
o
.
getEnterpriseAccountCode
(),
sg3List
,
sg4List
).
getYtdDr
()));
}
dto
.
setCreditBal
(
add
(
dto
.
getCreditBal
(),
getGlBalance
(
o
.
getEnterpriseAccountCode
(),
sg3List
,
sg4List
).
getPtdCr
()));
dto
.
setBegCreditBal
(
add
(
dto
.
getBegCreditBal
(),
getGlBalance
(
o
.
getEnterpriseAccountCode
(),
sg3List
,
sg4List
).
getBeginCrBalance
()));
dto
.
setEndCreditBal
(
add
(
dto
.
getEndCreditBal
(),
getGlBalance
(
o
.
getEnterpriseAccountCode
(),
sg3List
,
sg4List
).
getEndCrBalance
()));
dto
.
setYearCreditBal
(
add
(
dto
.
getYearCreditBal
(),
getGlBalance
(
o
.
getEnterpriseAccountCode
(),
sg3List
,
sg4List
).
getYtdCr
()));
dto
.
setDebitBal
(
add
(
dto
.
getDebitBal
(),
getGlBalance
(
o
.
getEnterpriseAccountCode
(),
sg3List
,
sg4List
).
getPtdDr
()));
dto
.
setBegDebitBal
(
add
(
dto
.
getBegDebitBal
(),
getGlBalance
(
o
.
getEnterpriseAccountCode
(),
sg3List
,
sg4List
).
getBeginDrBalance
()));
dto
.
setEndDebitBal
(
add
(
dto
.
getEndDebitBal
(),
getGlBalance
(
o
.
getEnterpriseAccountCode
(),
sg3List
,
sg4List
).
getEndDrBalance
()));
dto
.
setYearDebitBal
(
add
(
dto
.
getYearDebitBal
(),
getGlBalance
(
o
.
getEnterpriseAccountCode
(),
sg3List
,
sg4List
).
getYtdDr
()));
});
}
}
...
...
@@ -124,13 +123,13 @@ public class DataImportService extends BaseService {
private
GlBalance
getGlBalance
(
String
code
,
List
<
GlBalance
>
seg3
,
List
<
GlBalance
>
seg4
)
{
for
(
GlBalance
balance
:
seg3
)
{
if
(
StringUtils
.
equals
(
code
,
balance
.
get
Attr
3
()))
{
if
(
StringUtils
.
equals
(
code
,
balance
.
get
Segment
3
()))
{
return
balance
;
}
}
for
(
GlBalance
balance
:
seg4
)
{
if
(
StringUtils
.
equals
(
code
,
balance
.
get
Attr
3
()))
{
if
(
StringUtils
.
equals
(
code
,
balance
.
get
Segment
3
()))
{
return
balance
;
}
}
...
...
atms-api/src/main/java/pwc/taxtech/atms/service/impl/LgGlBalanceService.java
View file @
6026c0e1
...
...
@@ -72,9 +72,10 @@ public class LgGlBalanceService extends BaseService {
GlBalance
glBalance
=
new
GlBalance
();
beanUtil
.
copyProperties
(
list
.
get
(
0
),
glBalance
);
glBalance
.
setPeriodName
(
period
);
GlBalanceExample
example
=
new
GlBalanceExample
();
example
.
createCriteria
().
andSegment1EqualTo
(
glBalance
.
getSegment1
()).
andSegment3EqualTo
(
glBalance
.
getSegment3
())
.
andSegment4EqualTo
(
glBalance
.
getSegment4
()).
andPeriodNameEqualTo
(
glBalance
.
getPeriodName
()
);
.
andSegment4EqualTo
(
glBalance
.
getSegment4
()).
andPeriodNameEqualTo
(
period
);
List
<
GlBalance
>
tmpList
;
if
((
tmpList
=
glBalanceMapper
.
selectByExample
(
example
)).
size
()
>
0
)
{
glBalance
.
setId
(
tmpList
.
get
(
0
).
getId
());
...
...
atms-api/src/main/java/pwc/taxtech/atms/service/impl/TemplateGroupServiceImpl.java
View file @
6026c0e1
...
...
@@ -266,7 +266,7 @@ public class TemplateGroupServiceImpl extends AbstractService {
cellTemplate
.
setIsReadOnly
(
cell
.
getCellStyle
().
getLocked
());
cellTemplateList
.
add
(
cellTemplate
);
//todo: 这里没有Config数据只有在上传模板以后,在界面里面可以配置公式
if
(!
cell
.
getCellStyle
().
getLocked
()
&&
hasKeyIn
(
cell
))
{
if
(!
cell
.
getCellStyle
().
getLocked
()
&&
hasKeyIn
(
cell
)
&&
allowManual
)
{
cell
.
setCellValue
(
StringUtils
.
EMPTY
);
addManualConfig
(
cellTemplate
,
template
,
cell
,
now
,
cellTemplateConfigList
);
}
...
...
@@ -402,7 +402,7 @@ public class TemplateGroupServiceImpl extends AbstractService {
cellTemplate
.
setIsReadOnly
(
cell
.
getCellStyle
().
getLocked
()
?
true
:
false
);
cellTemplateList
.
add
(
cellTemplate
);
//todo: 这里没有Config数据只有在上传模板以后,在界面里面可以配置公式
if
(!
cell
.
getCellStyle
().
getLocked
()
&&
hasKeyIn
(
cell
))
{
if
(!
cell
.
getCellStyle
().
getLocked
()
&&
hasKeyIn
(
cell
)
&&
allowManual
)
{
cell
.
setCellValue
(
StringUtils
.
EMPTY
);
addManualConfig
(
cellTemplate
,
template
,
cell
,
now
,
cellTemplateConfigList
);
}
...
...
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/InputInvoiceDataImportServiceImpl.java
View file @
6026c0e1
...
...
@@ -58,8 +58,8 @@ 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
.
getPeriodBegin
(
project
.
getYear
(),
paras
.
getPeriodStart
()),
DateUtils
.
getPeriodEnd
(
project
.
getYear
(),
paras
.
getPeriodEnd
()))
invoiceExample
.
createCriteria
().
andGFSHEqualTo
(
organization
.
getTaxPayerNumber
()).
andRZSJBetween
(
DateUtils
.
getPeriodBegin
Format
(
project
.
getYear
(),
paras
.
getPeriodStart
()),
DateUtils
.
getPeriodEnd
Format
(
project
.
getYear
(),
paras
.
getPeriodEnd
()))
.
andRZJGEqualTo
(
INPUT_RZJG_SUCCESS
).
andRZZTEqualTo
(
INPUT_RZZT_OVER
);
PageHelper
.
startPage
(
paras
.
getPageInfo
().
getPageIndex
(),
paras
.
getPageInfo
().
getPageSize
());
...
...
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/ReportServiceImpl.java
View file @
6026c0e1
...
...
@@ -985,6 +985,7 @@ public class ReportServiceImpl {
dataSource
.
setUpdateTime
(
new
Date
());
periodDataSourceMapper
.
updateByPrimaryKeySelective
(
dataSource
);
if
(!
cellData
.
getData
().
equals
(
"#VALUE!"
))
{
if
(
StringUtils
.
isBlank
(
cellData
.
getData
()))
cellData
.
setData
(
"0"
);
cellData
.
setData
(
new
BigDecimal
(
cellData
.
getData
()).
add
(
changeValue
).
toString
());
}
else
{
cellData
.
setData
(
new
BigDecimal
(
"0.0"
).
add
(
changeValue
).
toString
());
...
...
atms-api/src/test/java/pwc/taxtech/atms/common/DataInitTest.java
View file @
6026c0e1
...
...
@@ -172,7 +172,7 @@ public class DataInitTest extends CommonIT {
@Test
public
void
initOutput
()
throws
Exception
{
Workbook
workbook
=
WorkbookFactory
.
create
(
new
File
(
"C:\\Users\\Eddie Wu\\Desktop\\导入/导入模板_销项主表_
乐叶_201807
(1).xlsx"
));
Workbook
workbook
=
WorkbookFactory
.
create
(
new
File
(
"C:\\Users\\Eddie Wu\\Desktop\\导入/导入模板_销项主表_
绿能_201809
(1).xlsx"
));
Sheet
sheet
=
workbook
.
getSheetAt
(
0
);
for
(
int
r
=
1
;
r
<=
sheet
.
getLastRowNum
();
r
++)
{
try
{
...
...
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