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
52786c0a
Commit
52786c0a
authored
Nov 01, 2018
by
neo.wang
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev_oracle_neo' into 'dev_oracle'
Dev oracle neo See merge request root/atms!165
parents
4b6261c3
961aa756
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
28 additions
and
104 deletions
+28
-104
CellTemplateConfigGroupDto.java
...c/taxtech/atms/dto/vatdto/CellTemplateConfigGroupDto.java
+0
-74
RuleEngineeConfigServiceImpl.java
...xtech/atms/service/impl/RuleEngineeConfigServiceImpl.java
+0
-2
ReportGeneratorImpl.java
...wc/taxtech/atms/vat/service/impl/ReportGeneratorImpl.java
+27
-27
CellTemplateConfigMapper.java
...n/java/pwc/taxtech/atms/dao/CellTemplateConfigMapper.java
+1
-1
No files found.
atms-api/src/main/java/pwc/taxtech/atms/dto/vatdto/CellTemplateConfigGroupDto.java
deleted
100644 → 0
View file @
4b6261c3
package
pwc
.
taxtech
.
atms
.
dto
.
vatdto
;
import
com.fasterxml.jackson.annotation.JsonProperty
;
import
lombok.Getter
;
import
lombok.Setter
;
import
java.util.HashMap
;
import
java.util.Map
;
@Getter
@Setter
public
class
CellTemplateConfigGroupDto
{
Integer
columnIndex
;
Integer
rowIndex
;
String
columnName
;
String
rowName
;
Integer
dataType
;
Boolean
isReadOnly
;
@JsonProperty
(
"cellTemplateID"
)
Long
cellTemplateId
;
@JsonProperty
(
"reportTemplateID"
)
Long
reportTemplateId
;
String
comment
;
public
CellTemplateConfigGroupDto
(
Integer
columnIndex
,
Integer
rowIndex
,
String
columnName
,
String
rowName
,
Integer
dataType
,
Boolean
isReadOnly
,
Long
cellTemplateId
,
Long
reportTemplateId
,
String
comment
)
{
this
.
columnIndex
=
columnIndex
;
this
.
rowIndex
=
rowIndex
;
this
.
columnName
=
columnName
;
this
.
rowName
=
rowName
;
this
.
dataType
=
dataType
;
this
.
isReadOnly
=
isReadOnly
;
this
.
cellTemplateId
=
cellTemplateId
;
this
.
reportTemplateId
=
reportTemplateId
;
this
.
comment
=
comment
;
}
public
Map
<
String
,
Map
<
String
,
Object
>>
toStr
()
{
StringBuilder
sb
=
new
StringBuilder
();
sb
.
append
(
this
.
getColumnIndex
());
sb
.
append
(
this
.
getRowIndex
());
sb
.
append
(
this
.
getColumnName
());
sb
.
append
(
this
.
getRowName
());
sb
.
append
(
this
.
getDataType
());
sb
.
append
(
this
.
getIsReadOnly
());
sb
.
append
(
this
.
getCellTemplateId
());
sb
.
append
(
this
.
getReportTemplateId
());
sb
.
append
(
this
.
getComment
());
Map
<
String
,
Map
<
String
,
Object
>>
result
=
new
HashMap
<>();
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"columnIndex"
,
this
.
getColumnIndex
());
map
.
put
(
"rowIndex"
,
this
.
getRowIndex
());
map
.
put
(
"columnName"
,
this
.
getColumnName
());
map
.
put
(
"rowName"
,
this
.
getRowName
());
map
.
put
(
"dataType"
,
this
.
getDataType
());
map
.
put
(
"isReadOnly"
,
this
.
getIsReadOnly
());
map
.
put
(
"cellTemplateId"
,
this
.
getCellTemplateId
());
map
.
put
(
"reportTemplateId"
,
this
.
getReportTemplateId
());
map
.
put
(
"comment"
,
this
.
getComment
());
result
.
put
(
sb
.
toString
(),
map
);
return
result
;
}
}
atms-api/src/main/java/pwc/taxtech/atms/service/impl/RuleEngineeConfigServiceImpl.java
View file @
52786c0a
...
...
@@ -136,8 +136,6 @@ public class RuleEngineeConfigServiceImpl extends AbstractService {
if
(
"Add"
.
equals
(
tprrdo
.
getAction
()))
{
taxPayerReportRule
.
setId
(
distributedIdService
.
nextId
());
taxPayerReportRuleMapper
.
insert
(
taxPayerReportRule
);
// operationService.addDataAddLog(taxPayerReportRule, OperationModule.RuleEngineConfig, authUserHelper.getCurrentUserId(),
// "AddRuleEngineConfiguration", "纳税类型", "纳税类型添加特殊机构", OperateLogType.OperationLogRuleEngine);
}
else
if
(
"Update"
.
equals
(
tprrdo
.
getAction
()))
{
TaxPayerReportRule
old
=
taxPayerReportRuleMapper
.
selectByPrimaryKey
(
Long
.
parseLong
(
reportDto
.
getId
()));
TaxPayerReportRule
original
=
new
TaxPayerReportRule
();
...
...
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/ReportGeneratorImpl.java
View file @
52786c0a
...
...
@@ -20,7 +20,6 @@ import pwc.taxtech.atms.constant.enums.CellDataSourceType;
import
pwc.taxtech.atms.constant.enums.FormulaDataSourceType
;
import
pwc.taxtech.atms.dao.ProjectMapper
;
import
pwc.taxtech.atms.dto.vatdto.CellCalcInfoDto
;
import
pwc.taxtech.atms.dto.vatdto.CellTemplateConfigGroupDto
;
import
pwc.taxtech.atms.entity.Project
;
import
pwc.taxtech.atms.service.impl.DistributedIdService
;
import
pwc.taxtech.atms.service.impl.HttpFileService
;
...
...
@@ -526,32 +525,33 @@ public class ReportGeneratorImpl {
fixedPCTParsedFormula
(
periodCellTemplateConfigExtendDtos
,
projectId
,
period
);
List
<
CellCalcInfoDto
>
cellCalcInfoDtos
=
new
ArrayList
<>();
periodCellTemplateConfigExtendDtos
.
stream
().
collect
(
Collectors
.
groupingBy
(
a
->
new
CellTemplateConfigGroupDto
(
a
.
getColumnIndex
(),
a
.
getRowIndex
()
,
a
.
getColumnName
(),
a
.
getRowName
(),
a
.
getDataType
(),
a
.
getReadOnly
()
,
a
.
getCellTemplateId
(),
a
.
getReportTemplateId
(),
a
.
getComment
()).
toStr
())).
forEach
((
x
,
y
)
->
{
Optional
<
Map
<
String
,
Object
>>
result
=
x
.
values
().
stream
().
findFirst
();
if
(
result
.
isPresent
())
{
CellCalcInfoDto
cellCalcInfoDto
=
new
CellCalcInfoDto
();
cellCalcInfoDto
.
setColumnIndex
(
Integer
.
parseInt
(
result
.
get
().
get
(
"columnIndex"
).
toString
()));
cellCalcInfoDto
.
setColumnName
(
result
.
get
().
get
(
"columnName"
).
toString
());
cellCalcInfoDto
.
setRowIndex
(
Integer
.
parseInt
(
result
.
get
().
get
(
"rowIndex"
).
toString
()));
cellCalcInfoDto
.
setRowName
(
result
.
get
().
get
(
"rowName"
).
toString
());
cellCalcInfoDto
.
setFormula
(
convertListToString
(
y
.
stream
()
.
map
(
PeriodCellTemplateConfig:
:
getFormula
).
collect
(
Collectors
.
toList
())));
cellCalcInfoDto
.
setParsedFormula
(
convertListToString
(
y
.
stream
()
.
map
(
PeriodCellTemplateConfig:
:
getParsedFormula
).
collect
(
Collectors
.
toList
())));
//todo: add validation at here later
cellCalcInfoDto
.
setCellTemplateId
(
result
.
get
().
get
(
"cellTemplateId"
).
toString
());
cellCalcInfoDto
.
setReportTemplateId
(
Long
.
parseLong
(
result
.
get
().
get
(
"reportTemplateId"
).
toString
()));
cellCalcInfoDto
.
setDataType
(
Integer
.
parseInt
(
result
.
get
().
get
(
"dataType"
).
toString
()));
cellCalcInfoDto
.
setIsReadOnly
(
Boolean
.
valueOf
(
result
.
get
().
get
(
"isReadOnly"
).
toString
()));
cellCalcInfoDto
.
setComment
(
result
.
get
().
get
(
"comment"
).
toString
());
cellCalcInfoDto
.
setConfigList
(
y
.
stream
()
.
map
(
PeriodCellTemplateConfigExtendDto:
:
getPeriodCellTemplateConfig
)
.
collect
(
Collectors
.
toList
()));
cellCalcInfoDtos
.
add
(
cellCalcInfoDto
);
}
Map
<
String
,
List
<
PeriodCellTemplateConfigExtendDto
>>
myStream
=
new
HashMap
<>();
for
(
PeriodCellTemplateConfigExtendDto
pctce
:
periodCellTemplateConfigExtendDtos
)
{
String
key
=
pctce
.
getRowIndex
()
+
"_"
+
pctce
.
getColumnIndex
()
+
"_"
+
pctce
.
getReportTemplateId
();
if
(!
myStream
.
containsKey
(
key
))
myStream
.
put
(
key
,
new
ArrayList
<>());
myStream
.
get
(
key
).
add
(
pctce
);
}
myStream
.
keySet
().
forEach
(
m
->
{
PeriodCellTemplateConfigExtendDto
first
=
myStream
.
get
(
m
).
get
(
0
);
CellCalcInfoDto
cellCalcInfoDto
=
new
CellCalcInfoDto
();
cellCalcInfoDto
.
setColumnIndex
(
first
.
getColumnIndex
());
cellCalcInfoDto
.
setColumnName
(
first
.
getColumnName
());
cellCalcInfoDto
.
setRowIndex
(
first
.
getRowIndex
());
cellCalcInfoDto
.
setRowName
(
first
.
getRowName
());
cellCalcInfoDto
.
setFormula
(
convertListToString
(
myStream
.
get
(
m
).
stream
()
.
map
(
PeriodCellTemplateConfig:
:
getFormula
).
collect
(
Collectors
.
toList
())));
cellCalcInfoDto
.
setParsedFormula
(
convertListToString
(
myStream
.
get
(
m
).
stream
()
.
map
(
PeriodCellTemplateConfig:
:
getParsedFormula
).
collect
(
Collectors
.
toList
())));
//todo: add validation at here later
cellCalcInfoDto
.
setCellTemplateId
(
first
.
getCellTemplateId
()
+
""
);
cellCalcInfoDto
.
setReportTemplateId
(
first
.
getReportTemplateId
());
cellCalcInfoDto
.
setDataType
(
first
.
getDataType
());
cellCalcInfoDto
.
setIsReadOnly
(
first
.
getReadOnly
());
cellCalcInfoDto
.
setComment
(
first
.
getComment
());
cellCalcInfoDto
.
setConfigList
(
myStream
.
get
(
m
).
stream
()
.
map
(
PeriodCellTemplateConfigExtendDto:
:
getPeriodCellTemplateConfig
).
collect
(
Collectors
.
toList
()));
cellCalcInfoDtos
.
add
(
cellCalcInfoDto
);
});
return
cellCalcInfoDtos
;
}
...
...
atms-dao/src/main/java/pwc/taxtech/atms/dao/CellTemplateConfigMapper.java
View file @
52786c0a
...
...
@@ -109,7 +109,7 @@ public interface CellTemplateConfigMapper extends MyMapper {
List
<
CellTemplateConfig
>
getCellTemplateConfigByTemplateId
(
@Param
(
"templateId"
)
Long
templateId
);
int
deleteCellTemplateConfigByCellTemplate
(
@Param
(
"template
DbId"
)
Long
templateDb
Id
);
int
deleteCellTemplateConfigByCellTemplate
(
@Param
(
"template
Id"
)
Long
template
Id
);
void
batchInsert
(
List
<
CellTemplateConfig
>
list
);
...
...
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