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
cc959a2e
Commit
cc959a2e
authored
Sep 03, 2018
by
frank.xa.zhang
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' into dev_frank
parents
dc6f7767
2c4b4601
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
25 additions
and
25 deletions
+25
-25
FormulaAdminMapper.java
...rc/main/java/pwc/taxtech/atms/dao/FormulaAdminMapper.java
+3
-7
BBParasBo.java
.../src/main/java/pwc/taxtech/atms/dto/vatdto/BBParasBo.java
+1
-2
CellTemplatePerGroupDto.java
.../pwc/taxtech/atms/dto/vatdto/CellTemplatePerGroupDto.java
+0
-1
PCTEntity.java
.../src/main/java/pwc/taxtech/atms/vat/entity/PCTEntity.java
+3
-5
ReportGeneratorImpl.java
...wc/taxtech/atms/vat/service/impl/ReportGeneratorImpl.java
+10
-4
BB.java
...wc/taxtech/atms/vat/service/impl/report/functions/BB.java
+7
-5
PeriodCellTemplateConfigMapper.xml
...c/taxtech/atms/vat/dao/PeriodCellTemplateConfigMapper.xml
+1
-1
No files found.
atms-api/src/main/java/pwc/taxtech/atms/dao/FormulaAdminMapper.java
View file @
cc959a2e
...
...
@@ -10,13 +10,12 @@ import pwc.taxtech.atms.dto.vatdto.CellTemplatePerGroupDto;
import
java.util.List
;
@Mapper
public
interface
FormulaAdminMapper
extends
MyMapper
{
public
interface
FormulaAdminMapper
extends
MyMapper
{
@Select
(
"SELECT "
+
" cell_template.ID AS cellTemplateID, "
+
" template.ID AS reportTemplateID, "
+
" template.template_group_id AS reportTemplateGroupID, "
+
" cell_template_config.formula AS formula, "
+
" cell_template.row_index AS rowIndex, "
+
" cell_template.column_index AS columnIndex, "
+
" template.Code AS reportCode, "
+
...
...
@@ -27,14 +26,11 @@ public interface FormulaAdminMapper extends MyMapper {
" template "
+
" JOIN "
+
" cell_template ON template.id = cell_template.report_template_id "
+
" JOIN "
+
" cell_template_config ON cell_template.id = cell_template_config.cell_template_id "
+
"WHERE "
+
" cell_template_config.data_source_type = 1 "
+
" AND template.template_group_id = #{groupId}"
)
" template.template_group_id = #{groupId}"
)
List
<
CellTemplatePerGroupDto
>
getCellTemplatePerGroupDto
(
@Param
(
"groupId"
)
Long
groupId
);
@Select
(
"SELECT "
+
" rule.template_group_id as groupId, rule.is_default as isDefault "
+
"FROM "
+
...
...
atms-api/src/main/java/pwc/taxtech/atms/dto/vatdto/BBParasBo.java
View file @
cc959a2e
...
...
@@ -36,7 +36,6 @@ public class BBParasBo {
this
.
cellTemplateId
=
cellTemplateId
;
}
}
public
void
putPeriodCellTempate
(
Integer
period
,
Long
cellTemplateId
)
{
...
...
@@ -130,7 +129,7 @@ public class BBParasBo {
builder
.
append
(
")"
);
return
builder
.
toString
();
}
return
""
;
return
"
0
"
;
}
@Override
...
...
atms-api/src/main/java/pwc/taxtech/atms/dto/vatdto/CellTemplatePerGroupDto.java
View file @
cc959a2e
...
...
@@ -9,7 +9,6 @@ public class CellTemplatePerGroupDto {
private
String
cellTemplateID
;
private
String
reportTemplateID
;
private
String
reportTemplateGroupID
;
private
String
formula
;
private
int
rowIndex
;
private
int
columnIndex
;
private
String
reportCode
;
...
...
atms-api/src/main/java/pwc/taxtech/atms/vat/entity/PCTEntity.java
View file @
cc959a2e
package
pwc
.
taxtech
.
atms
.
vat
.
entity
;
import
java.math.BigDecimal
;
public
class
PCTEntity
{
Integer
period
;
Long
cellTemplateId
;
BigDecimal
data
;
String
data
;
public
PCTEntity
()
{
}
...
...
@@ -44,11 +42,11 @@ public class PCTEntity {
this
.
cellTemplateId
=
cellTemplateId
;
}
public
BigDecimal
getData
()
{
public
String
getData
()
{
return
data
;
}
public
void
setData
(
BigDecimal
data
)
{
public
void
setData
(
String
data
)
{
this
.
data
=
data
;
}
}
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/ReportGeneratorImpl.java
View file @
cc959a2e
...
...
@@ -366,7 +366,7 @@ public class ReportGeneratorImpl extends VatAbstractService implements ReportGen
data
=
EMPTY
;
}
if
(
StringUtils
.
isNotBlank
(
data
))
{
if
(
StringUtils
.
isNotBlank
(
data
))
{
Pattern
pattern
=
Pattern
.
compile
(
"[0-9.]*"
);
Matcher
isNum
=
pattern
.
matcher
(
data
);
if
(
isNum
.
matches
())
{
...
...
@@ -374,8 +374,7 @@ public class ReportGeneratorImpl extends VatAbstractService implements ReportGen
}
else
{
cellData
.
setData
(
data
);
}
}
else
{
}
else
{
cellData
.
setData
(
data
);
}
...
...
@@ -588,7 +587,14 @@ public class ReportGeneratorImpl extends VatAbstractService implements ReportGen
List
<
PCTEntity
>
pctResults
=
cellDataMapper
.
queryByPCTs
(
parameter
);
Map
<
PCTEntity
,
BigDecimal
>
pctCache
=
new
HashMap
<>();
pctResults
.
forEach
(
m
->
{
pctCache
.
put
(
m
,
m
.
getData
());
BigDecimal
data
=
null
;
try
{
data
=
new
BigDecimal
(
m
.
getData
());
}
catch
(
NumberFormatException
e
)
{
logger
.
warn
(
"number format ecption for parameter {}"
,
m
);
data
=
BigDecimal
.
ZERO
;
}
pctCache
.
put
(
m
,
data
);
});
configMapToPCTs
.
forEach
((
k
,
v
)
->
{
...
...
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/report/functions/BB.java
View file @
cc959a2e
...
...
@@ -61,12 +61,14 @@ public class BB extends FunctionBase implements FreeRefFunction {
dataSource
.
add
(
nullCellDto
);
BigDecimal
cellValue
=
BigDecimal
.
ZERO
;
CellTemplatePerGroupDto
cellTemplateData
=
agent
.
getCellTemplateGroupDto
(
formulaContext
.
getReportTemplateGroupID
(),
formulaContext
.
getProjectID
()).
stream
().
filter
(
dto
->
dto
.
getRowIndex
()
==
bo
.
getColumnIndex
()
-
1
&&
dto
.
getColumnIndex
()
==
bo
.
getColumnIndex
()
-
1
).
findFirst
().
orElseThrow
(()
->
{
return
Exceptions
.
BB_CELL_TEMP_NULL
;
});
try
{
CellTemplatePerGroupDto
cellTemplateData
=
agent
.
getCellTemplateGroupDto
(
formulaContext
.
getReportTemplateGroupID
(),
formulaContext
.
getProjectID
()).
stream
().
filter
(
dto
->
dto
.
getRowIndex
()
==
bo
.
getRowIndex
()
-
1
&&
dto
.
getColumnIndex
()
==
bo
.
getColumnIndex
()
-
1
&&
dto
.
getReportCode
().
equals
(
bo
.
getReportCode
()))
.
findFirst
().
orElseThrow
(()
->
{
return
Exceptions
.
BB_CELL_TEMP_NULL
;
});
MyAsserts
.
assertNotNull
(
cellTemplateData
,
Exceptions
.
BB_CELL_TEMP_NULL
);
nullCellDto
.
fixedWithGroup
(
cellTemplateData
);
...
...
atms-api/src/main/resources/pwc/taxtech/atms/vat/dao/PeriodCellTemplateConfigMapper.xml
View file @
cc959a2e
...
...
@@ -712,7 +712,7 @@
cell_template.comment
FROM period_cell_template cell_template
JOIN period_cell_template_config config
ON
cell_template.cell_template_id = config.cell_template_id
ON
( cell_template.cell_template_id = config.cell_template_id AND cell_template.period = config.period )
WHERE cell_template.report_template_id IN
<foreach
close=
")"
collection=
"list"
index=
"index"
item=
"item"
open=
"("
separator=
","
>
#{item}
...
...
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