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
36e42ede
Commit
36e42ede
authored
Nov 19, 2018
by
sherlock
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
export order
parent
e6927810
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
32 deletions
+13
-32
SpringContextUtil.java
.../java/pwc/taxtech/atms/common/util/SpringContextUtil.java
+3
-24
DataImportService.java
...java/pwc/taxtech/atms/service/impl/DataImportService.java
+7
-4
DFFS.java
.../taxtech/atms/vat/service/impl/report/functions/DFFS.java
+3
-4
No files found.
atms-api/src/main/java/pwc/taxtech/atms/common/util/SpringContextUtil.java
View file @
36e42ede
...
@@ -65,30 +65,6 @@ public class SpringContextUtil implements ApplicationContextAware {
...
@@ -65,30 +65,6 @@ public class SpringContextUtil implements ApplicationContextAware {
return
SpringContextUtil
.
webApplicationContext
.
getBean
(
requiredType
);
return
SpringContextUtil
.
webApplicationContext
.
getBean
(
requiredType
);
}
}
public
static
AccountMappingMapper
getAccountMappingMapper
()
{
return
accountMappingMapper
;
}
public
static
void
setAccountMappingMapper
(
AccountMappingMapper
accountMappingMapper
)
{
SpringContextUtil
.
accountMappingMapper
=
accountMappingMapper
;
}
public
static
EnterpriseAccountSetOrgMapper
getEnterpriseAccountSetOrgMapper
()
{
return
enterpriseAccountSetOrgMapper
;
}
public
static
void
setEnterpriseAccountSetOrgMapper
(
EnterpriseAccountSetOrgMapper
enterpriseAccountSetOrgMapper
)
{
SpringContextUtil
.
enterpriseAccountSetOrgMapper
=
enterpriseAccountSetOrgMapper
;
}
public
static
GlBalanceMapper
getGlBalanceMapper
()
{
return
glBalanceMapper
;
}
public
static
void
setGlBalanceMapper
(
GlBalanceMapper
glBalanceMapper
)
{
SpringContextUtil
.
glBalanceMapper
=
glBalanceMapper
;
}
@Override
@Override
public
void
setApplicationContext
(
ApplicationContext
applicationContext
)
throws
BeansException
{
public
void
setApplicationContext
(
ApplicationContext
applicationContext
)
throws
BeansException
{
webApplicationContext
=
applicationContext
;
webApplicationContext
=
applicationContext
;
...
@@ -127,5 +103,8 @@ public class SpringContextUtil implements ApplicationContextAware {
...
@@ -127,5 +103,8 @@ public class SpringContextUtil implements ApplicationContextAware {
cellDataSourceMapper
=
webApplicationContext
.
getBean
(
CellDataSourceMapper
.
class
);
cellDataSourceMapper
=
webApplicationContext
.
getBean
(
CellDataSourceMapper
.
class
);
periodCellDataSourceMapper
=
webApplicationContext
.
getBean
(
PeriodCellDataSourceMapper
.
class
);
periodCellDataSourceMapper
=
webApplicationContext
.
getBean
(
PeriodCellDataSourceMapper
.
class
);
organizationMapper
=
webApplicationContext
.
getBean
(
OrganizationMapper
.
class
);
organizationMapper
=
webApplicationContext
.
getBean
(
OrganizationMapper
.
class
);
enterpriseAccountSetOrgMapper
=
webApplicationContext
.
getBean
(
EnterpriseAccountSetOrgMapper
.
class
);
accountMappingMapper
=
webApplicationContext
.
getBean
(
AccountMappingMapper
.
class
);
glBalanceMapper
=
webApplicationContext
.
getBean
(
GlBalanceMapper
.
class
);
}
}
}
}
atms-api/src/main/java/pwc/taxtech/atms/service/impl/DataImportService.java
View file @
36e42ede
...
@@ -73,16 +73,19 @@ public class DataImportService extends BaseService {
...
@@ -73,16 +73,19 @@ public class DataImportService extends BaseService {
calendar
.
set
(
Calendar
.
MONTH
,
i
-
1
);
calendar
.
set
(
Calendar
.
MONTH
,
i
-
1
);
GlBalanceExample
example
=
new
GlBalanceExample
();
GlBalanceExample
example
=
new
GlBalanceExample
();
//科目段
//科目段
example
.
createCriteria
().
andSegment1EqualTo
(
organization
.
getClientCode
())
GlBalanceExample
.
Criteria
c
=
example
.
createCriteria
().
andSegment1EqualTo
(
organization
.
getClientCode
())
.
andPeriodNameEqualTo
(
dateFormat
.
format
(
calendar
.
getTime
())).
andSegment3In
(
etCodeList
);
.
andPeriodNameEqualTo
(
dateFormat
.
format
(
calendar
.
getTime
()));
if
(
CollectionUtils
.
isNotEmpty
(
etCodeList
)){
c
.
andSegment3In
(
etCodeList
);
}
List
<
GlBalance
>
sg3List
=
glBalanceMapper
.
selectByExample
(
example
);
List
<
GlBalance
>
sg3List
=
glBalanceMapper
.
selectByExample
(
example
);
GlBalanceExample
example2
=
new
GlBalanceExample
();
GlBalanceExample
example2
=
new
GlBalanceExample
();
//明细段
//明细段
GlBalanceExample
.
Criteria
c
=
example2
.
createCriteria
().
andSegment1EqualTo
(
organization
.
getClientCode
())
GlBalanceExample
.
Criteria
c
2
=
example2
.
createCriteria
().
andSegment1EqualTo
(
organization
.
getClientCode
())
.
andPeriodNameEqualTo
(
dateFormat
.
format
(
calendar
.
getTime
()));
.
andPeriodNameEqualTo
(
dateFormat
.
format
(
calendar
.
getTime
()));
if
(
CollectionUtils
.
isNotEmpty
(
etCodeList
)){
if
(
CollectionUtils
.
isNotEmpty
(
etCodeList
)){
c
.
andSegment4In
(
etCodeList
);
c
2
.
andSegment4In
(
etCodeList
);
}
}
List
<
GlBalance
>
sg4List
=
glBalanceMapper
.
selectByExample
(
example2
);
List
<
GlBalance
>
sg4List
=
glBalanceMapper
.
selectByExample
(
example2
);
...
...
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/report/functions/DFFS.java
View file @
36e42ede
package
pwc
.
taxtech
.
atms
.
vat
.
service
.
impl
.
report
.
functions
;
package
pwc
.
taxtech
.
atms
.
vat
.
service
.
impl
.
report
.
functions
;
import
com.grapecity.documents.excel.G
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.poi.ss.formula.OperationEvaluationContext
;
import
org.apache.poi.ss.formula.OperationEvaluationContext
;
import
org.apache.poi.ss.formula.eval.NumberEval
;
import
org.apache.poi.ss.formula.eval.NumberEval
;
...
@@ -39,7 +38,7 @@ public class DFFS extends FunctionBase implements FreeRefFunction {
...
@@ -39,7 +38,7 @@ public class DFFS extends FunctionBase implements FreeRefFunction {
+
year
+
","
+
period
+
")"
;
+
year
+
","
+
period
+
")"
;
logger
.
debug
(
formulaExpression
);
logger
.
debug
(
formulaExpression
);
year
=
get
IntParam
(
args
[
2
],
ec
);
year
=
get
Year
(
year
);
Integer
yearOffset
=
0
;
Integer
yearOffset
=
0
;
period
=
FormulaHelper
.
getPeriod
(
period
,
yearOffset
,
formulaContext
);
period
=
FormulaHelper
.
getPeriod
(
period
,
yearOffset
,
formulaContext
);
...
@@ -62,12 +61,12 @@ public class DFFS extends FunctionBase implements FreeRefFunction {
...
@@ -62,12 +61,12 @@ public class DFFS extends FunctionBase implements FreeRefFunction {
for
(
AccountMapping
a
:
accountMappings
){
for
(
AccountMapping
a
:
accountMappings
){
result
+=
count
(
a
.
getEnterpriseAccountCode
());
result
+=
count
(
a
.
getEnterpriseAccountCode
());
}
}
new
NumberEval
(
result
);
return
new
NumberEval
(
result
);
}
else
if
(
type
==
1
){
}
else
if
(
type
==
1
){
return
new
NumberEval
(
count
(
code
));
return
new
NumberEval
(
count
(
code
));
}
}
return
null
;
return
NumberEval
.
ZERO
;
}
}
private
double
count
(
String
code
){
private
double
count
(
String
code
){
...
...
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