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
73740947
Commit
73740947
authored
Oct 02, 2018
by
neo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[dev] save datasource add projcect id from content
parent
85911d18
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
23 additions
and
17 deletions
+23
-17
BB.java
...wc/taxtech/atms/vat/service/impl/report/functions/BB.java
+2
-2
FSJZ.java
.../taxtech/atms/vat/service/impl/report/functions/FSJZ.java
+9
-4
GZSD.java
.../taxtech/atms/vat/service/impl/report/functions/GZSD.java
+3
-3
JXFP.java
.../taxtech/atms/vat/service/impl/report/functions/JXFP.java
+4
-3
JXFPMX.java
...axtech/atms/vat/service/impl/report/functions/JXFPMX.java
+2
-2
XXFP.java
.../taxtech/atms/vat/service/impl/report/functions/XXFP.java
+2
-2
ZC.java
...wc/taxtech/atms/vat/service/impl/report/functions/ZC.java
+1
-1
No files found.
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/report/functions/BB.java
View file @
73740947
...
...
@@ -17,7 +17,6 @@ import pwc.taxtech.atms.dto.vatdto.CurrentPeriodBo;
import
pwc.taxtech.atms.dto.vatdto.ReportCellDataSourceDto
;
import
pwc.taxtech.atms.exception.Exceptions
;
import
pwc.taxtech.atms.exception.FormulaException
;
import
pwc.taxtech.atms.vat.entity.CellData
;
import
pwc.taxtech.atms.vat.entity.PeriodCellData
;
import
java.lang.reflect.Field
;
...
...
@@ -139,7 +138,8 @@ public class BB extends FunctionBase implements FreeRefFunction {
LOGGER
.
warn
(
"error for bb cacls for {} and current for {}"
,
bo
.
toString
(),
curPeriod
.
toString
());
Long
dataSourceId
=
saveDataSource
(
ec
,
dataSource
,
FormulaDataSourceDetailType
.
ReportCellDataSourceDto
,
cellValue
,
formulaContext
.
getPeriod
(),
formulaContext
.
getReportTemplateGroupId
(),
bo
.
getColumnIndex
()
-
1
,
bo
.
getRowIndex
()
-
1
);
formulaContext
.
getReportTemplateGroupId
(),
bo
.
getColumnIndex
()
-
1
,
bo
.
getRowIndex
()
-
1
,
formulaContext
.
getProjectId
());
saveFormulaBlock
(
formulaContext
.
getPeriod
(),
ec
,
bo
.
expression
(),
bo
.
expressionData
(),
dataSourceId
,
formulaContext
.
getProjectId
());
}
...
...
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/report/functions/FSJZ.java
View file @
73740947
...
...
@@ -8,7 +8,11 @@ import pwc.taxtech.atms.common.util.SpringContextUtil;
import
pwc.taxtech.atms.constant.enums.FormulaDataSourceDetailType
;
import
pwc.taxtech.atms.constant.enums.KeyValueConfigResultType
;
import
pwc.taxtech.atms.dto.vatdto.BSPLFormulaDataSourceDto
;
import
pwc.taxtech.atms.vat.entity.*
;
import
pwc.taxtech.atms.vat.entity.Balance
;
import
pwc.taxtech.atms.vat.entity.BalanceStdManual
;
import
pwc.taxtech.atms.vat.entity.PeriodEnterpriseAccount
;
import
pwc.taxtech.atms.vat.entity.VatEnterpriseAccount
;
import
pwc.taxtech.atms.vat.entity.VatStandardAccount
;
import
java.math.BigDecimal
;
import
java.util.ArrayList
;
...
...
@@ -92,7 +96,7 @@ public class FSJZ extends FunctionBase implements FreeRefFunction {
if
(
balanceStdManual
!=
null
)
{
List
<
VatEnterpriseAccount
>
vatEnterpriseAccountList
=
SpringContextUtil
.
periodEnterpriseAccountMapper
.
getListWithAccountCode
(
accountCode
,
formulaContext
.
getProjectId
(),
period
);
.
getListWithAccountCode
(
accountCode
,
formulaContext
.
getProjectId
(),
period
);
if
(
period
==
99
)
{
val
=
new
BigDecimal
(((
balanceStdManual
.
getYearDebitNet
()
!=
null
?
balanceStdManual
.
getYearDebitNet
()
:
0
).
doubleValue
()
-
(
balanceStdManual
.
getYearCreditNet
()
!=
null
?
balanceStdManual
.
getYearCreditNet
()
:
0
).
doubleValue
())
...
...
@@ -130,7 +134,8 @@ public class FSJZ extends FunctionBase implements FreeRefFunction {
}
//todo: sava data
//save datasource
Long
dataSourceId
=
saveDataSource
(
ec
,
formulaDataSourceDtoList
,
FormulaDataSourceDetailType
.
BSPLFormulaDataSourceDto
,
val
,
period
,
formulaContext
.
getReportTemplateGroupId
());
Long
dataSourceId
=
saveDataSource
(
ec
,
formulaDataSourceDtoList
,
FormulaDataSourceDetailType
.
BSPLFormulaDataSourceDto
,
val
,
period
,
formulaContext
.
getReportTemplateGroupId
(),
formulaContext
.
getProjectId
());
//save formulablock
saveFormulaBlock
(
period
,
ec
,
formulaExpression
,
val
,
dataSourceId
,
formulaContext
.
getProjectId
());
...
...
@@ -194,7 +199,7 @@ public class FSJZ extends FunctionBase implements FreeRefFunction {
//todo: sava data
//save datasource
Long
dataSourceId
=
saveDataSource
(
ec
,
dsList
,
FormulaDataSourceDetailType
.
BSPLFormulaDataSourceDto
,
val
,
period
,
formulaContext
.
getReportTemplateGroupId
());
period
,
formulaContext
.
getReportTemplateGroupId
()
,
formulaContext
.
getProjectId
()
);
//save formulablock
saveFormulaBlock
(
period
,
ec
,
formulaExpression
,
val
,
dataSourceId
,
formulaContext
.
getProjectId
());
return
new
NumberEval
(
val
.
doubleValue
());
...
...
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/report/functions/GZSD.java
View file @
73740947
...
...
@@ -88,7 +88,7 @@ public class GZSD extends FunctionBase implements FreeRefFunction {
dataSourceDtoList
.
add
(
formulaDataSourceDto
);
Long
dataSourceId
=
saveDataSource
(
ec
,
Collections
.
singletonList
(
dataSourceDtoList
),
FormulaDataSourceDetailType
.
FormulaDataSourceDto
,
decimal_zero
,
formulaContext
.
getPeriod
(),
formulaContext
.
getReportTemplateGroupId
());
formulaContext
.
getReportTemplateGroupId
()
,
formulaContext
.
getProjectId
()
);
saveFormulaBlock
(
formulaContext
.
getPeriod
(),
ec
,
formulaExpression
,
decimal_zero
,
dataSourceId
,
formulaContext
.
getProjectId
());
return
NumberEval
.
ZERO
;
}
...
...
@@ -111,7 +111,7 @@ public class GZSD extends FunctionBase implements FreeRefFunction {
dataSourceDtoList
.
add
(
formulaDataSourceDto
);
Long
dataSourceId
=
saveDataSource
(
ec
,
Collections
.
singletonList
(
dataSourceDtoList
),
FormulaDataSourceDetailType
.
FormulaDataSourceDto
,
val
,
formulaContext
.
getPeriod
(),
formulaContext
.
getReportTemplateGroupId
());
formulaContext
.
getReportTemplateGroupId
()
,
formulaContext
.
getProjectId
()
);
saveFormulaBlock
(
formulaContext
.
getPeriod
(),
ec
,
formulaExpression
,
val
,
dataSourceId
,
formulaContext
.
getProjectId
());
return
new
NumberEval
(
val
.
doubleValue
());
}
else
{
...
...
@@ -130,7 +130,7 @@ public class GZSD extends FunctionBase implements FreeRefFunction {
dataSourceDtoList
.
add
(
formulaDataSourceDto
);
Long
dataSourceId
=
saveDataSource
(
ec
,
Collections
.
singletonList
(
dataSourceDtoList
),
FormulaDataSourceDetailType
.
FormulaDataSourceDto
,
decimal_zero
,
formulaContext
.
getPeriod
(),
formulaContext
.
getReportTemplateGroupId
());
formulaContext
.
getReportTemplateGroupId
()
,
formulaContext
.
getProjectId
()
);
saveFormulaBlock
(
formulaContext
.
getPeriod
(),
ec
,
formulaExpression
,
decimal_zero
,
dataSourceId
,
formulaContext
.
getProjectId
());
return
NumberEval
.
ZERO
;
...
...
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/report/functions/JXFP.java
View file @
73740947
...
...
@@ -159,7 +159,8 @@ public class JXFP extends FunctionBase implements FreeRefFunction {
double
val
=
dataSource
.
stream
().
mapToDouble
(
a
->
a
.
getAmount
().
doubleValue
()).
sum
();
Long
dataSourceId
=
saveDataSource
(
ec
,
Collections
.
singletonList
(
dataSource
),
FormulaDataSourceDetailType
.
InputInvoiceDataSourceDto
,
BigDecimal
.
valueOf
(
val
),
formulaContext
.
getPeriod
(),
formulaContext
.
getReportTemplateGroupId
());
BigDecimal
.
valueOf
(
val
),
formulaContext
.
getPeriod
(),
formulaContext
.
getReportTemplateGroupId
(),
formulaContext
.
getProjectId
());
saveFormulaBlock
(
formulaContext
.
getPeriod
(),
ec
,
formulaExpression
,
BigDecimal
.
valueOf
(
val
),
dataSourceId
,
formulaContext
.
getProjectId
());
return
new
NumberEval
(
val
);
...
...
@@ -167,7 +168,7 @@ public class JXFP extends FunctionBase implements FreeRefFunction {
double
val
=
dataSource
.
stream
().
mapToDouble
(
a
->
a
.
getTaxAmount
().
doubleValue
()).
sum
();
Long
dataSourceId
=
saveDataSource
(
ec
,
Collections
.
singletonList
(
dataSource
),
FormulaDataSourceDetailType
.
InputInvoiceDataSourceDto
,
BigDecimal
.
valueOf
(
val
),
formulaContext
.
getPeriod
(),
formulaContext
.
getReportTemplateGroupId
());
BigDecimal
.
valueOf
(
val
),
formulaContext
.
getPeriod
(),
formulaContext
.
getReportTemplateGroupId
()
,
formulaContext
.
getProjectId
()
);
saveFormulaBlock
(
formulaContext
.
getPeriod
(),
ec
,
formulaExpression
,
BigDecimal
.
valueOf
(
val
),
dataSourceId
,
formulaContext
.
getProjectId
());
return
new
NumberEval
(
val
);
...
...
@@ -175,7 +176,7 @@ public class JXFP extends FunctionBase implements FreeRefFunction {
double
val
=
dataSource
.
size
();
Long
dataSourceId
=
saveDataSource
(
ec
,
Collections
.
singletonList
(
dataSource
),
FormulaDataSourceDetailType
.
InputInvoiceDataSourceDto
,
BigDecimal
.
valueOf
(
val
),
formulaContext
.
getPeriod
(),
formulaContext
.
getReportTemplateGroupId
());
BigDecimal
.
valueOf
(
val
),
formulaContext
.
getPeriod
(),
formulaContext
.
getReportTemplateGroupId
()
,
formulaContext
.
getProjectId
()
);
saveFormulaBlock
(
period
,
ec
,
formulaExpression
,
BigDecimal
.
valueOf
(
val
),
dataSourceId
,
formulaContext
.
getProjectId
());
return
new
NumberEval
(
val
);
...
...
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/report/functions/JXFPMX.java
View file @
73740947
...
...
@@ -137,14 +137,14 @@ public class JXFPMX extends FunctionBase implements FreeRefFunction {
double
val
=
dataSouce
.
stream
().
mapToDouble
(
a
->
a
.
getAmount
().
doubleValue
()).
sum
();
Long
dataSourceId
=
saveDataSource
(
ec
,
Collections
.
singletonList
(
dataSouce
),
FormulaDataSourceDetailType
.
InputInvoiceDetailDataSourceDto
,
new
BigDecimal
(
val
),
period
,
formulaContext
.
getReportTemplateGroupId
());
new
BigDecimal
(
val
),
period
,
formulaContext
.
getReportTemplateGroupId
()
,
formulaContext
.
getProjectId
()
);
saveFormulaBlock
(
period
,
ec
,
formulaExpression
,
new
BigDecimal
(
val
),
dataSourceId
,
formulaContext
.
getProjectId
());
return
new
NumberEval
(
val
);
}
else
if
(
amountType
==
1
)
{
double
val
=
dataSouce
.
stream
().
mapToDouble
(
a
->
a
.
getTaxAmount
().
doubleValue
()).
sum
();
Long
dataSourceId
=
saveDataSource
(
ec
,
Collections
.
singletonList
(
dataSouce
),
FormulaDataSourceDetailType
.
InputInvoiceDetailDataSourceDto
,
new
BigDecimal
(
val
),
period
,
formulaContext
.
getReportTemplateGroupId
());
new
BigDecimal
(
val
),
period
,
formulaContext
.
getReportTemplateGroupId
()
,
formulaContext
.
getProjectId
()
);
saveFormulaBlock
(
period
,
ec
,
formulaExpression
,
new
BigDecimal
(
val
),
dataSourceId
,
formulaContext
.
getProjectId
());
return
new
NumberEval
(
val
);
}
...
...
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/report/functions/XXFP.java
View file @
73740947
...
...
@@ -115,14 +115,14 @@ public class XXFP extends FunctionBase implements FreeRefFunction {
double
val
=
dataSource
.
stream
().
mapToDouble
(
a
->
a
.
getAmount
().
doubleValue
()).
sum
();
Long
dataSoureId
=
saveDataSource
(
ec
,
Collections
.
singletonList
(
dataSource
),
FormulaDataSourceDetailType
.
OutputInvoiceDataSourceDto
,
new
BigDecimal
(
val
),
period
,
formulaContext
.
getReportTemplateGroupId
());
new
BigDecimal
(
val
),
period
,
formulaContext
.
getReportTemplateGroupId
()
,
formulaContext
.
getProjectId
()
);
saveFormulaBlock
(
period
,
ec
,
formulaExpression
,
new
BigDecimal
(
val
),
dataSoureId
,
formulaContext
.
getProjectId
());
return
new
NumberEval
(
val
);
}
else
if
(
amountType
==
1
)
{
double
val
=
dataSource
.
stream
().
mapToDouble
(
a
->
a
.
getTaxAmount
().
doubleValue
()).
sum
();
Long
dataSoureId
=
saveDataSource
(
ec
,
Collections
.
singletonList
(
dataSource
),
FormulaDataSourceDetailType
.
OutputInvoiceDataSourceDto
,
new
BigDecimal
(
val
),
period
,
formulaContext
.
getReportTemplateGroupId
());
new
BigDecimal
(
val
),
period
,
formulaContext
.
getReportTemplateGroupId
()
,
formulaContext
.
getProjectId
()
);
saveFormulaBlock
(
period
,
ec
,
formulaExpression
,
new
BigDecimal
(
val
),
dataSoureId
,
formulaContext
.
getProjectId
());
return
new
NumberEval
(
val
);
}
...
...
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/report/functions/ZC.java
View file @
73740947
...
...
@@ -128,7 +128,7 @@ public class ZC extends FunctionBase implements FreeRefFunction {
}
Long
dataSourceId
=
saveDataSource
(
ec
,
Collections
.
singletonList
(
dataSource
),
FormulaDataSourceDetailType
.
AssetDetailDataSourceDto
,
totalData
,
formulaContext
.
getPeriod
(),
formulaContext
.
getReportTemplateGroupId
());
totalData
,
formulaContext
.
getPeriod
(),
formulaContext
.
getReportTemplateGroupId
()
,
formulaContext
.
getProjectId
()
);
saveFormulaBlock
(
0
,
ec
,
formulaExpression
,
totalData
,
dataSourceId
,
formulaContext
.
getProjectId
());
return
new
NumberEval
(
totalData
.
doubleValue
());
}
...
...
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