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
37cd797e
Commit
37cd797e
authored
Aug 30, 2018
by
neo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[dev] add pct entity to entity pacage
parent
97cbf54d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
55 additions
and
24 deletions
+55
-24
CellDataMapper.java
...rc/main/java/pwc/taxtech/atms/vat/dao/CellDataMapper.java
+3
-1
PCTEntity.java
.../src/main/java/pwc/taxtech/atms/vat/entity/PCTEntity.java
+51
-0
ReportGeneratorImpl.java
...wc/taxtech/atms/vat/service/impl/ReportGeneratorImpl.java
+1
-23
No files found.
atms-api/src/main/java/pwc/taxtech/atms/vat/dao/CellDataMapper.java
View file @
37cd797e
...
...
@@ -10,6 +10,7 @@ import org.apache.ibatis.session.RowBounds;
import
pwc.taxtech.atms.MyVatMapper
;
import
pwc.taxtech.atms.vat.entity.CellData
;
import
pwc.taxtech.atms.vat.entity.CellDataExample
;
import
pwc.taxtech.atms.vat.entity.PCTEntity
;
import
pwc.taxtech.atms.vat.service.impl.ReportGeneratorImpl
;
@Mapper
...
...
@@ -124,5 +125,5 @@ public interface CellDataMapper extends MyVatMapper {
" ( r.period=#{item.period} and c.cell_template_id=#{item.cellTemplateId} )"
+
" </foreach>"
+
"</script>"
)
List
<
ReportGeneratorImpl
.
PCTEntity
>
queryByPCTs
(
@Param
(
"list"
)
Set
<
ReportGeneratorImpl
.
PCTEntity
>
parameter
);
List
<
PCTEntity
>
queryByPCTs
(
@Param
(
"list"
)
Set
<
PCTEntity
>
parameter
);
}
\ No newline at end of file
atms-api/src/main/java/pwc/taxtech/atms/vat/entity/PCTEntity.java
0 → 100644
View file @
37cd797e
package
pwc
.
taxtech
.
atms
.
vat
.
entity
;
import
java.math.BigDecimal
;
public
class
PCTEntity
{
Integer
period
;
Long
cellTemplateId
;
BigDecimal
data
;
public
Integer
getPeriod
()
{
return
period
;
}
public
void
setPeriod
(
Integer
period
)
{
this
.
period
=
period
;
}
public
Long
getCellTemplateId
()
{
return
cellTemplateId
;
}
public
void
setCellTemplateId
(
Long
cellTemplateId
)
{
this
.
cellTemplateId
=
cellTemplateId
;
}
public
BigDecimal
getData
()
{
return
data
;
}
public
void
setData
(
BigDecimal
data
)
{
this
.
data
=
data
;
}
public
PCTEntity
(
String
pctStr
)
{
String
[]
pct
=
pctStr
.
split
(
":"
);
this
.
period
=
Integer
.
parseInt
(
pct
[
0
]);
this
.
cellTemplateId
=
Long
.
parseLong
(
pct
[
1
]);
}
@Override
public
int
hashCode
()
{
return
(
period
+
""
+
cellTemplateId
).
hashCode
();
}
@Override
public
boolean
equals
(
Object
obj
)
{
PCTEntity
target
=
(
PCTEntity
)
obj
;
return
period
.
intValue
()
==
target
.
period
.
intValue
()
&&
cellTemplateId
.
longValue
()
==
target
.
cellTemplateId
.
longValue
();
}
}
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/ReportGeneratorImpl.java
View file @
37cd797e
...
...
@@ -568,7 +568,7 @@ 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
.
data
);
pctCache
.
put
(
m
,
m
.
getData
()
);
});
configMapToPCTs
.
forEach
((
k
,
v
)
->
{
...
...
@@ -600,27 +600,5 @@ public class ReportGeneratorImpl extends VatAbstractService implements ReportGen
return
stringBuilder
.
toString
();
}
public
static
class
PCTEntity
{
Integer
period
;
Long
cellTemplateId
;
BigDecimal
data
;
public
PCTEntity
(
String
pctStr
)
{
String
[]
pct
=
pctStr
.
split
(
":"
);
this
.
period
=
Integer
.
parseInt
(
pct
[
0
]);
this
.
cellTemplateId
=
Long
.
parseLong
(
pct
[
1
]);
}
@Override
public
int
hashCode
()
{
return
(
period
+
""
+
cellTemplateId
).
hashCode
();
}
@Override
public
boolean
equals
(
Object
obj
)
{
PCTEntity
target
=
(
PCTEntity
)
obj
;
return
period
.
intValue
()
==
target
.
period
.
intValue
()
&&
cellTemplateId
.
longValue
()
==
target
.
cellTemplateId
.
longValue
();
}
}
}
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