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
b9b5e708
Commit
b9b5e708
authored
Jul 12, 2018
by
neo.wang
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev_neo' into 'dev'
[DEV] bb formular args context fixed See merge request root/atms!61
parents
9ae926d1
0ffde69d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
20 deletions
+21
-20
BBParasBo.java
.../src/main/java/pwc/taxtech/atms/dto/vatdto/BBParasBo.java
+6
-6
CellTemplateServiceImpl.java
...wc/taxtech/atms/service/impl/CellTemplateServiceImpl.java
+7
-7
ReportGeneratorImpl.java
...wc/taxtech/atms/vat/service/impl/ReportGeneratorImpl.java
+8
-7
No files found.
atms-api/src/main/java/pwc/taxtech/atms/dto/vatdto/BBParasBo.java
View file @
b9b5e708
...
...
@@ -16,20 +16,20 @@ public class BBParasBo {
private
Integer
period
;
private
Integer
year
;
public
BBParasBo
(
ValueEval
[]
args
,
OperationEvaluationContext
ec
)
throws
EvaluationException
{
public
BBParasBo
(
ValueEval
[]
args
,
OperationEvaluationContext
ec
)
throws
EvaluationException
{
reportCode
=
resolverString
(
args
,
ec
,
0
);
columnIndex
=
resolverInteger
(
args
,
ec
,
1
);
rowIndex
=
resolverInteger
(
args
,
ec
,
3
);
period
=
resolverInteger
(
args
,
ec
,
4
)
;
year
=
resolverInteger
(
args
,
ec
,
5
)
;
rowIndex
=
resolverInteger
(
args
,
ec
,
2
);
period
=
args
.
length
==
4
?
resolverInteger
(
args
,
ec
,
3
)
:
0
;
year
=
args
.
length
==
5
?
resolverInteger
(
args
,
ec
,
4
)
:
0
;
}
public
void
disCount
(){
public
void
disCount
()
{
rowIndex
--;
columnIndex
--;
}
public
BBParasBo
(
BBParasBo
otherBo
,
int
period
,
int
curYear
)
{
public
BBParasBo
(
BBParasBo
otherBo
,
int
period
,
int
curYear
)
{
this
.
reportCode
=
otherBo
.
reportCode
;
this
.
columnIndex
=
otherBo
.
getColumnIndex
();
this
.
rowIndex
=
otherBo
.
rowIndex
;
...
...
atms-api/src/main/java/pwc/taxtech/atms/service/impl/CellTemplateServiceImpl.java
View file @
b9b5e708
...
...
@@ -72,7 +72,7 @@ public class CellTemplateServiceImpl extends AbstractService implements CellTemp
}
@Override
@Transactional
(
propagation
=
Propagation
.
REQUIRED
,
rollbackFor
=
Exception
.
class
)
@Transactional
(
propagation
=
Propagation
.
REQUIRED
,
rollbackFor
=
Exception
.
class
)
public
OperationResultDto
saveOrEdit
(
CellTemplateConfigDto
cellTemplateConfig
)
{
OperationResultDto
result
=
new
OperationResultDto
();
CellTemplate
cellTemplate
=
cellTemplateMapper
.
selectByPrimaryKey
(
cellTemplateConfig
.
getCellTemplateID
());
...
...
@@ -118,7 +118,7 @@ public class CellTemplateServiceImpl extends AbstractService implements CellTemp
OperationResultDto
<
List
<
CellTemplateConfig
>>
operationResultDto
=
new
OperationResultDto
<>();
List
<
CellTemplateConfig
>
cellTemplateConfigList
=
new
ArrayList
<>();
if
(
cellTemplateConfigDto
.
getHasFormula
())
{
if
(
cellTemplateConfigDto
.
getHasFormula
()
!=
null
&&
cellTemplateConfigDto
.
getHasFormula
()
)
{
operationResultDto
.
setResultMsg
(
getFormulaDataSource
(
cellTemplateConfigDto
.
getFormula
(),
keyValueIds
));
CellTemplateConfig
cellTemplateConfig
=
new
CellTemplateConfig
();
cellTemplateConfig
.
setId
(
distributedIDService
.
nextId
());
...
...
@@ -135,7 +135,7 @@ public class CellTemplateServiceImpl extends AbstractService implements CellTemp
cellTemplateConfigList
.
add
(
cellTemplateConfig
);
}
if
(
cellTemplateConfigDto
.
getHasVoucher
()
)
{
if
(
cellTemplateConfigDto
.
getHasVoucher
()
!=
null
&&
cellTemplateConfigDto
.
getHasVoucher
())
{
CellTemplateConfig
cellTemplateConfig
=
new
CellTemplateConfig
();
cellTemplateConfig
.
setId
(
distributedIDService
.
nextId
());
cellTemplateConfig
.
setCellTemplateId
(
cellTemplateConfigDto
.
getCellTemplateID
());
...
...
@@ -150,7 +150,7 @@ public class CellTemplateServiceImpl extends AbstractService implements CellTemp
cellTemplateConfigList
.
add
(
cellTemplateConfig
);
}
if
(
cellTemplateConfigDto
.
getHasInvoice
())
{
if
(
cellTemplateConfigDto
.
getHasInvoice
()
!=
null
&&
cellTemplateConfigDto
.
getHasInvoice
()
)
{
CellTemplateConfig
cellTemplateConfig
=
new
CellTemplateConfig
();
cellTemplateConfig
.
setId
(
distributedIDService
.
nextId
());
cellTemplateConfig
.
setCellTemplateId
(
cellTemplateConfigDto
.
getCellTemplateID
());
...
...
@@ -167,7 +167,7 @@ public class CellTemplateServiceImpl extends AbstractService implements CellTemp
cellTemplateConfigList
.
add
(
cellTemplateConfig
);
}
if
(
cellTemplateConfigDto
.
getHasKeyIn
())
{
if
(
cellTemplateConfigDto
.
getHasKeyIn
()
!=
null
&&
cellTemplateConfigDto
.
getHasKeyIn
()
)
{
CellTemplateConfig
cellTemplateConfig
=
new
CellTemplateConfig
();
cellTemplateConfig
.
setId
(
distributedIDService
.
nextId
());
cellTemplateConfig
.
setCellTemplateId
(
cellTemplateConfigDto
.
getCellTemplateID
());
...
...
@@ -180,7 +180,7 @@ public class CellTemplateServiceImpl extends AbstractService implements CellTemp
cellTemplateConfigList
.
add
(
cellTemplateConfig
);
}
if
(
cellTemplateConfigDto
.
getHasModel
())
{
if
(
cellTemplateConfigDto
.
getHasModel
()
!=
null
&&
cellTemplateConfigDto
.
getHasModel
()
)
{
CellTemplateConfig
cellTemplateConfig
=
new
CellTemplateConfig
();
cellTemplateConfig
.
setId
(
distributedIDService
.
nextId
());
cellTemplateConfig
.
setCellTemplateId
(
cellTemplateConfigDto
.
getCellTemplateID
());
...
...
@@ -194,7 +194,7 @@ public class CellTemplateServiceImpl extends AbstractService implements CellTemp
cellTemplateConfigList
.
add
(
cellTemplateConfig
);
}
if
(
cellTemplateConfigDto
.
getHasValidation
())
{
if
(
cellTemplateConfigDto
.
getHasValidation
()
!=
null
&&
cellTemplateConfigDto
.
getHasValidation
()
)
{
CellTemplateConfig
cellTemplateConfig
=
new
CellTemplateConfig
();
cellTemplateConfig
.
setId
(
distributedIDService
.
nextId
());
cellTemplateConfig
.
setCellTemplateId
(
cellTemplateConfigDto
.
getCellTemplateID
());
...
...
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/ReportGeneratorImpl.java
View file @
b9b5e708
...
...
@@ -65,9 +65,14 @@ public class ReportGeneratorImpl extends VatAbstractService implements ReportGen
if
(
workbook
!=
null
)
{
Workbook
newWorkbook
=
workbook
.
get
();
FormulaContext
formulaContext
=
new
FormulaContext
();
formulaContext
.
setFormulaAgent
(
formulaAgent
);
formulaContext
.
setPeriod
(
6
);
//todo: assign value later
formulaContext
.
setReportTemplateGroupID
(
templateGroupID
);
formulaContext
.
setProjectID
(
projectId
);
formulaContext
.
setYear
(
2018
);
//todo: assign value later
addFunctionsToWorkbook
(
newWorkbook
,
templateGroupID
);
addFunctionsToWorkbook
(
newWorkbook
,
formulaContext
);
int
sheetCount
=
newWorkbook
.
getNumberOfSheets
();
for
(
int
i
=
0
;
i
<
sheetCount
;
i
++)
{
Sheet
sheet
=
newWorkbook
.
getSheetAt
(
i
);
...
...
@@ -225,12 +230,8 @@ public class ReportGeneratorImpl extends VatAbstractService implements ReportGen
*
* @param workbook 工作簿
*/
private
void
addFunctionsToWorkbook
(
Workbook
workbook
,
Long
templateGroupID
)
{
private
void
addFunctionsToWorkbook
(
Workbook
workbook
,
FormulaContext
formulaContext
)
{
String
[]
functionNames
=
{
"SGSR"
,
"FSJZ"
,
"ND"
,
"BB"
};
FormulaContext
formulaContext
=
new
FormulaContext
();
formulaContext
.
setFormulaAgent
(
formulaAgent
);
formulaContext
.
setPeriod
(
6
);
//todo: assign value later
formulaContext
.
setReportTemplateGroupID
(
templateGroupID
);
FreeRefFunction
[]
functionImpls
=
{
new
SGSR
(
formulaContext
),
new
FSJZ
(
formulaContext
),
new
ND
(
formulaContext
),
new
ReportFormulaFactory
.
BB
(
formulaContext
)};
UDFFinder
udfs
=
new
DefaultUDFFinder
(
functionNames
,
functionImpls
);
...
...
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