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
85911d18
Commit
85911d18
authored
Oct 02, 2018
by
neo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[fixbug] fixed bugs for missed projectid and period
parent
15731d2b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
13 deletions
+23
-13
ReportServiceImpl.java
.../pwc/taxtech/atms/vat/service/impl/ReportServiceImpl.java
+10
-7
FunctionBase.java
.../atms/vat/service/impl/report/functions/FunctionBase.java
+13
-6
No files found.
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/ReportServiceImpl.java
View file @
85911d18
...
...
@@ -197,12 +197,12 @@ public class ReportServiceImpl extends VatAbstractService implements ReportServi
}
List
<
Long
>
exceptTemplateIds
=
templateMapper
.
getIdsForExceptTemplate
();
String
strExceptTemplateIds
=
StringUtils
.
EMPTY
;
if
(
exceptTemplateIds
!=
null
&&
exceptTemplateIds
.
size
()
>
0
)
{
strExceptTemplateIds
=
StringUtils
.
join
(
exceptTemplateIds
,
","
);
}
else
{
strExceptTemplateIds
=
"''"
;
}
//
String strExceptTemplateIds = StringUtils.EMPTY;
//
if (exceptTemplateIds != null && exceptTemplateIds.size() > 0) {
//
strExceptTemplateIds = StringUtils.join(exceptTemplateIds, ",");
//
} else {
//
strExceptTemplateIds = "''";
//
}
//todo: according to projectId get the templateGroupId
Long
templateGroupId
=
projectMapper
.
getTemplateGroupIdByProject
(
projectId
,
EnumServiceType
.
VAT
.
getCode
());
...
...
@@ -494,7 +494,7 @@ public class ReportServiceImpl extends VatAbstractService implements ReportServi
List
<
CellCalcInfoDto
>
cellCfgList
=
reportGenerator
.
getCellCalcInfo
(
templateIds
,
report
.
getPeriod
(),
project
.
getId
());
PeriodCellDataExample
cellDataExample
=
new
PeriodCellDataExample
();
cellDataExample
.
createCriteria
().
andReportIdEqualTo
(
reportId
);
cellDataExample
.
createCriteria
().
and
PeriodEqualTo
(
report
.
getPeriod
()).
andProjectIdEqualTo
(
projectId
).
and
ReportIdEqualTo
(
reportId
);
List
<
PeriodCellData
>
currentCellDataList
=
periodCellDataMapper
.
selectByExample
(
cellDataExample
);
...
...
@@ -794,6 +794,7 @@ public class ReportServiceImpl extends VatAbstractService implements ReportServi
cellData
.
setUpdateBy
(
"admin"
);
cellData
.
setUpdateTime
(
new
Date
());
cellData
.
setProjectId
(
projectId
);
cellData
.
setPeriod
(
data
.
getPeriod
());
periodCellDataMapper
.
insertSelective
(
cellData
);
data
.
setCellId
(
cellData
.
getId
());
}
else
{
...
...
@@ -937,6 +938,8 @@ public class ReportServiceImpl extends VatAbstractService implements ReportServi
dataSource
.
setUpdateTime
(
new
Date
());
dataSource
.
setUpdateBy
(
datasourceDto
.
getUpdater
());
dataSource
.
setCreateBy
(
datasourceDto
.
getCreator
());
dataSource
.
setPeriod
(
datasourceDto
.
getPeriod
());
dataSource
.
setProjectId
(
datasourceDto
.
getProjectId
());
}
dataSource
.
setCreateTime
(
new
Date
());
periodDataSourceMapper
.
insertSelective
(
dataSource
);
...
...
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/report/functions/FunctionBase.java
View file @
85911d18
...
...
@@ -10,7 +10,9 @@ import org.slf4j.LoggerFactory;
import
pwc.taxtech.atms.common.util.SpringContextUtil
;
import
pwc.taxtech.atms.constant.enums.FormulaDataSourceDetailType
;
import
pwc.taxtech.atms.constant.enums.FormulaDataSourceType
;
import
pwc.taxtech.atms.vat.entity.*
;
import
pwc.taxtech.atms.vat.entity.PeriodDataSource
;
import
pwc.taxtech.atms.vat.entity.PeriodDataSourceDetail
;
import
pwc.taxtech.atms.vat.entity.PeriodFormulaBlock
;
import
pwc.taxtech.atms.vat.service.impl.FormulaAgent
;
import
java.math.BigDecimal
;
...
...
@@ -91,13 +93,13 @@ public class FunctionBase {
}
public
Long
saveDataSource
(
OperationEvaluationContext
ec
,
List
<
Object
>
dataSourceList
,
FormulaDataSourceDetailType
formulaDataSourceDetailType
,
BigDecimal
val
,
int
period
,
Long
templateGroupId
)
{
return
saveDataSource
(
ec
,
dataSourceList
,
formulaDataSourceDetailType
,
val
,
period
,
templateGroupId
,
null
,
null
);
FormulaDataSourceDetailType
formulaDataSourceDetailType
,
BigDecimal
val
,
int
period
,
Long
templateGroupId
,
String
projectId
)
{
return
saveDataSource
(
ec
,
dataSourceList
,
formulaDataSourceDetailType
,
val
,
period
,
templateGroupId
,
null
,
null
,
projectId
);
}
public
Long
saveDataSource
(
OperationEvaluationContext
ec
,
List
<
Object
>
dataSourceList
,
FormulaDataSourceDetailType
formulaDataSourceDetailType
,
BigDecimal
val
,
int
period
,
Long
templateGroupId
,
Integer
colNumP
,
Integer
rowNumP
)
{
int
period
,
Long
templateGroupId
,
Integer
colNumP
,
Integer
rowNumP
,
String
projectId
)
{
String
reportCode
=
ec
.
getWorkbook
().
getSheetName
(
ec
.
getSheetIndex
());
int
colNum
=
ec
.
getColumnIndex
();
int
rowNum
=
ec
.
getRowIndex
();
...
...
@@ -128,15 +130,18 @@ public class FunctionBase {
dataSource
.
setColumnName
(
"列名"
);
dataSource
.
setCellTemplateId
(
periodCellTemplateId
);
dataSource
.
setPeriod
(
period
);
dataSource
.
setProjectId
(
projectId
);
SpringContextUtil
.
periodDataSourceMapper
.
insertSelective
(
dataSource
);
for
(
Object
obj
:
dataSourceList
)
{
if
(
obj
.
getClass
()
==
java
.
util
.
ArrayList
.
class
)
{
for
(
Object
obj2
:
(
ArrayList
<
Object
>)
obj
)
{
if
(
obj
.
getClass
()
==
java
.
util
.
ArrayList
.
class
)
{
for
(
Object
obj2
:
(
ArrayList
<
Object
>)
obj
)
{
PeriodDataSourceDetail
dataSourceDetail
=
new
PeriodDataSourceDetail
();
dataSourceDetail
.
setId
(
SpringContextUtil
.
distributedIdService
.
nextId
());
dataSourceDetail
.
setDataSourceId
(
dataSourceId
);
dataSourceDetail
.
setDataSourceType
(
formulaDataSourceDetailType
.
getCode
());
dataSourceDetail
.
setItemValue
(
JSON
.
toJSONString
(
obj2
));
dataSourceDetail
.
setPeriod
(
period
);
dataSourceDetail
.
setProjectId
(
projectId
);
SpringContextUtil
.
periodDataSourceDetailMapper
.
insertSelective
(
dataSourceDetail
);
}
}
else
{
...
...
@@ -145,6 +150,8 @@ public class FunctionBase {
dataSourceDetail
.
setDataSourceId
(
dataSourceId
);
dataSourceDetail
.
setDataSourceType
(
formulaDataSourceDetailType
.
getCode
());
dataSourceDetail
.
setItemValue
(
JSON
.
toJSONString
(
obj
));
dataSourceDetail
.
setPeriod
(
period
);
dataSourceDetail
.
setProjectId
(
projectId
);
SpringContextUtil
.
periodDataSourceDetailMapper
.
insertSelective
(
dataSourceDetail
);
}
}
...
...
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