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
72af8cf9
Commit
72af8cf9
authored
Nov 07, 2018
by
sherlock
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev_oracle_sherlock' into 'dev_oracle'
添加报表未取到公式 See merge request root/atms!174
parents
656b3165
c28f4dd6
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
39 additions
and
36 deletions
+39
-36
TemplateController.java
.../java/pwc/taxtech/atms/controller/TemplateController.java
+1
-1
TemplateGroupServiceImpl.java
...c/taxtech/atms/service/impl/TemplateGroupServiceImpl.java
+13
-10
TemplateServiceImpl.java
...va/pwc/taxtech/atms/service/impl/TemplateServiceImpl.java
+1
-1
ReportGeneratorImpl.java
...wc/taxtech/atms/vat/service/impl/ReportGeneratorImpl.java
+24
-24
No files found.
atms-api/src/main/java/pwc/taxtech/atms/controller/TemplateController.java
View file @
72af8cf9
...
...
@@ -137,7 +137,7 @@ public class TemplateController extends BaseController {
@RequestMapping
(
value
=
"getTemplateUniqList"
,
method
=
RequestMethod
.
GET
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
public
@ResponseBody
List
<
TemplateUniqDto
>
getTemplateUniqList
(
String
serviceTypeId
,
Integer
payTaxType
,
Integer
reportType
,
String
industryIds
)
{
List
<
TemplateUniqDto
>
getTemplateUniqList
(
@RequestParam
(
value
=
"serviceTypeID"
)
String
serviceTypeId
,
Integer
payTaxType
,
Integer
reportType
,
@RequestParam
(
value
=
"industryIDs"
)
String
industryIds
)
{
return
templateService
.
getTemplateUniqList
(
serviceTypeId
,
payTaxType
,
reportType
,
industryIds
);
}
...
...
atms-api/src/main/java/pwc/taxtech/atms/service/impl/TemplateGroupServiceImpl.java
View file @
72af8cf9
...
...
@@ -356,16 +356,19 @@ public class TemplateGroupServiceImpl extends AbstractService {
cellTemplate
.
setIsReadOnly
(
cell
.
getCellStyle
().
getLocked
()
?
true
:
false
);
cellTemplateList
.
add
(
cellTemplate
);
//todo: 这里没有Config数据只有在上传模板以后,在界面里面可以配置公式
// CellTemplateConfig config = new CellTemplateConfig();
// config.setId(distributedIdService.nextId());
// config.setCellTemplateId(cellTemplate.getId());
// config.setReportTemplateId(template.getId());
// config.setDataSourceType(1);//todo 枚举
// config.setFormula(POIUtil.getCellFormulaString(cell));
//// config.setFormulaDataSource(); //todo KV相关
// config.setUpdateTime(now);
// config.setUpdateBy(authUserHelper.getCurrentUserId());
// cellTemplateConfigList.add(config);
if
(!
cell
.
getCellStyle
().
getLocked
()
&&
StringUtils
.
isNotBlank
(
POIUtil
.
getCellFormulaString
(
cell
)))
{
CellTemplateConfig
config
=
new
CellTemplateConfig
();
config
.
setId
(
distributedIdService
.
nextId
());
config
.
setCellTemplateId
(
cellTemplate
.
getId
());
config
.
setReportTemplateId
(
template
.
getId
());
config
.
setDataSourceType
(
1
);
//todo 枚举
config
.
setFormula
(
POIUtil
.
getCellFormulaString
(
cell
));
// config.setFormula(cell.getCellFormula());
// config.setFormulaDataSource(); //todo KV相关
config
.
setUpdateTime
(
now
);
config
.
setUpdateBy
(
authUserHelper
.
getCurrentUserId
());
cellTemplateConfigList
.
add
(
config
);
}
}
}
List
<
List
<
CellTemplate
>>
tmpList
=
CommonUtils
.
subListWithLen
(
cellTemplateList
,
CommonUtils
.
BATCH_NUM
);
...
...
atms-api/src/main/java/pwc/taxtech/atms/service/impl/TemplateServiceImpl.java
View file @
72af8cf9
...
...
@@ -85,7 +85,7 @@ public class TemplateServiceImpl extends AbstractService {
map
.
put
(
"serviceTypeId"
,
serviceTypeId
);
map
.
put
(
"payTaxType"
,
payTaxType
);
map
.
put
(
"reportType"
,
reportType
);
map
.
put
(
"industryI
ds
"
,
industryIds
);
map
.
put
(
"industryI
D
"
,
industryIds
);
List
<
TemplateUniqDto
>
templatedbList
=
templateMapper
.
getTemplateUniqDtosByTemplateAndTemplateGroup
(
map
);
Map
<
Long
,
Map
<
String
,
List
<
TemplateUniqDto
>>>
groupList
=
templatedbList
.
stream
()
...
...
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/ReportGeneratorImpl.java
View file @
72af8cf9
...
...
@@ -222,30 +222,30 @@ public class ReportGeneratorImpl {
.
collect
(
Collectors
.
toList
());
//todo: add manual datasource here,in order to disaplay the manual datasource we need add it first at here.
//
for (PeriodCellTemplateConfig keyInCellTemplateConfig : keyInCellTemplateConfigs) {
//
PeriodCellTemplateExample periodCellTemplateExample1 = new PeriodCellTemplateExample();
//
periodCellTemplateExample1.createCriteria().andCellTemplateIdEqualTo(keyInCellTemplateConfig.getCellTemplateId());
//
Optional<PeriodCellTemplate> periodCellTemplate = periodCellTemplateMapper.selectByExample(periodCellTemplateExample1).stream().findFirst();
//
//
// DataSource dataSource = new
DataSource();
//
dataSource.setId(distributedIdService.nextId());
//
if (periodCellTemplate.isPresent()) {
//
dataSource.setColumnIndex(periodCellTemplate.get().getColumnIndex());
//
dataSource.setRowIndex(periodCellTemplate.get().getRowIndex());
//
}
//
dataSource.setAmount(new BigDecimal("0"));
//
dataSource.setName("ManualDataSource");
//
dataSource.setDescription("ManualDataSource");
//
dataSource.setCreateTime(createTime);
//
dataSource.setUpdateTime(createTime);
//
dataSource.setCreateBy("Admin");
//
dataSource.setUpdateBy("Admin");
//
dataSource.setPeriod(period);
//
dataSource.setCellTemplateId(keyInCellTemplateConfig.getCellTemplateId());
//
dataSource.setType(FormulaDataSourceType.KeyInSource.getCode());
// d
ataSourceMapper.insertSelective(dataSource);
//
}
for
(
PeriodCellTemplateConfig
keyInCellTemplateConfig
:
keyInCellTemplateConfigs
)
{
PeriodCellTemplateExample
periodCellTemplateExample1
=
new
PeriodCellTemplateExample
();
periodCellTemplateExample1
.
createCriteria
().
andCellTemplateIdEqualTo
(
keyInCellTemplateConfig
.
getCellTemplateId
());
Optional
<
PeriodCellTemplate
>
periodCellTemplate
=
periodCellTemplateMapper
.
selectByExample
(
periodCellTemplateExample1
).
stream
().
findFirst
();
PeriodDataSource
dataSource
=
new
Period
DataSource
();
dataSource
.
setId
(
distributedIdService
.
nextId
());
if
(
periodCellTemplate
.
isPresent
())
{
dataSource
.
setColumnIndex
(
periodCellTemplate
.
get
().
getColumnIndex
());
dataSource
.
setRowIndex
(
periodCellTemplate
.
get
().
getRowIndex
());
}
dataSource
.
setAmount
(
new
BigDecimal
(
"0"
));
dataSource
.
setName
(
"ManualDataSource"
);
dataSource
.
setDescription
(
"ManualDataSource"
);
dataSource
.
setCreateTime
(
createTime
);
dataSource
.
setUpdateTime
(
createTime
);
dataSource
.
setCreateBy
(
"Admin"
);
dataSource
.
setUpdateBy
(
"Admin"
);
dataSource
.
setPeriod
(
period
);
dataSource
.
setCellTemplateId
(
keyInCellTemplateConfig
.
getCellTemplateId
());
dataSource
.
setType
(
FormulaDataSourceType
.
KeyInSource
.
getCode
());
periodD
ataSourceMapper
.
insertSelective
(
dataSource
);
}
//update formulablock table reportid field
List
<
Long
>
cellTemplateConfigIds
=
periodCellTemplateConfigs
.
stream
()
...
...
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