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
b3ec20cc
Commit
b3ec20cc
authored
Jul 03, 2018
by
frank.xa.zhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add new api for report generate with work flow and data save
parent
444ed5a1
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
718 additions
and
461 deletions
+718
-461
vatGeneratorConfig.xml
atms-api/etc/generator/vatGeneratorConfig.xml
+5
-4
vat_run.bat
atms-api/etc/generator/vat_run.bat
+1
-1
POIUtil.java
atms-api/src/main/java/pwc/taxtech/atms/common/POIUtil.java
+9
-5
ReportController.java
...in/java/pwc/taxtech/atms/controller/ReportController.java
+5
-0
ReportMapper.java
.../src/main/java/pwc/taxtech/atms/vat/dao/ReportMapper.java
+14
-14
CellData.java
...i/src/main/java/pwc/taxtech/atms/vat/entity/CellData.java
+8
-8
CellDataExample.java
...ain/java/pwc/taxtech/atms/vat/entity/CellDataExample.java
+20
-40
Report.java
...api/src/main/java/pwc/taxtech/atms/vat/entity/Report.java
+73
-73
ReportExample.java
.../main/java/pwc/taxtech/atms/vat/entity/ReportExample.java
+185
-205
ReportGenerator.java
...in/java/pwc/taxtech/atms/vat/service/ReportGenerator.java
+7
-0
ReportService.java
...main/java/pwc/taxtech/atms/vat/service/ReportService.java
+2
-0
ReportGeneratorImpl.java
...wc/taxtech/atms/vat/service/impl/ReportGeneratorImpl.java
+230
-0
ReportServiceImpl.java
.../pwc/taxtech/atms/vat/service/impl/ReportServiceImpl.java
+49
-2
VatAbstractService.java
...pwc/taxtech/atms/vat/service/impl/VatAbstractService.java
+3
-0
CellDataMapper.xml
...ain/resources/pwc/taxtech/atms/vat/dao/CellDataMapper.xml
+13
-13
ReportMapper.xml
.../main/resources/pwc/taxtech/atms/vat/dao/ReportMapper.xml
+94
-94
POITest.java
atms-api/src/test/java/pwc/taxtech/atms/common/POITest.java
+0
-2
No files found.
atms-api/etc/generator/vatGeneratorConfig.xml
View file @
b3ec20cc
...
...
@@ -297,10 +297,7 @@
<columnOverride
column=
"Path"
javaType=
"java.lang.String"
jdbcType=
"VARCHAR"
/>
</table>
<table
tableName=
"Report"
domainObjectName=
"Report"
>
<property
name=
"useActualColumnNames"
value=
"true"
/>
<property
name=
"ignoreQualifiersAtRuntime"
value=
"true"
/>
</table>
<table
tableName=
"StandardAccount"
domainObjectName=
"VatStandardAccount"
>
<property
name=
"useActualColumnNames"
value=
"true"
/>
...
...
@@ -376,5 +373,8 @@
<columnOverride
column=
"is_system_type"
javaType=
"java.lang.Boolean"
/>
<columnOverride
column=
"is_active_association"
javaType=
"java.lang.Boolean"
/>
</table>
<table
tableName=
"report"
domainObjectName=
"Report"
>
<property
name=
"ignoreQualifiersAtRuntime"
value=
"true"
/>
</table>
</context>
</generatorConfiguration>
\ No newline at end of file
atms-api/etc/generator/vat_run.bat
View file @
b3ec20cc
rem see http://www.mybatis.org/generator/running/runningFromCmdLine.html
cd /d %~dp0
call java -classpath .;./* org.mybatis.generator.api.ShellRunner -configfile vatGeneratorConfig.xml -overwrite -verbose -tables
period_cell_template_config
call java -classpath .;./* org.mybatis.generator.api.ShellRunner -configfile vatGeneratorConfig.xml -overwrite -verbose -tables
cell_data
echo @@@@@@@@@@@ DONE @@@@@@@@@@@
pause
atms-api/src/main/java/pwc/taxtech/atms/common/POIUtil.java
View file @
b3ec20cc
...
...
@@ -2,14 +2,18 @@ package pwc.taxtech.atms.common;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.poi.hssf.usermodel.HSSFWorkbook
;
import
org.apache.poi.ss.usermodel.Cell
;
import
org.apache.poi.ss.usermodel.Row
;
import
org.apache.poi.ss.usermodel.Sheet
;
import
org.apache.poi.ss.usermodel.Workbook
;
import
org.apache.poi.openxml4j.exceptions.InvalidFormatException
;
import
org.apache.poi.ss.usermodel.*
;
import
org.apache.poi.xssf.usermodel.XSSFWorkbook
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
java.io.File
;
import
java.io.FileInputStream
;
import
java.io.FileNotFoundException
;
import
java.io.IOException
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Optional
;
public
class
POIUtil
{
...
...
@@ -42,7 +46,7 @@ public class POIUtil {
Row
targetRow
=
targetSheet
.
createRow
(
r
);
for
(
int
c
=
row
.
getFirstCellNum
();
c
<=
row
.
getLastCellNum
();
c
++)
{
Cell
cell
=
row
.
getCell
(
c
);
if
(
null
==
cell
){
if
(
null
==
cell
)
{
continue
;
}
Cell
targetCell
=
targetRow
.
createCell
(
c
);
...
...
atms-api/src/main/java/pwc/taxtech/atms/controller/ReportController.java
View file @
b3ec20cc
...
...
@@ -25,4 +25,9 @@ public class ReportController {
public
OperationResultDto
updateConfig
(
@PathVariable
String
projectId
,
@PathVariable
Integer
period
,
@RequestParam
String
generator
)
{
return
reportService
.
updateConfig
(
projectId
,
period
,
generator
);
}
@RequestMapping
(
value
=
"generateByTotal/{projectId}/{ifDeleteManualDataSource}/{period}"
,
method
=
RequestMethod
.
POST
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
public
OperationResultDto
generateAllData
(
@PathVariable
String
projectId
,
@PathVariable
Boolean
ifDeleteManualDataSource
,
@PathVariable
Integer
period
,
@RequestParam
String
generator
){
return
reportService
.
generateData
(
projectId
,
EnumServiceType
.
VAT
,
ifDeleteManualDataSource
,
period
,
null
,
generator
);
}
}
atms-api/src/main/java/pwc/taxtech/atms/vat/dao/ReportMapper.java
View file @
b3ec20cc
...
...
@@ -12,7 +12,7 @@ import pwc.taxtech.atms.vat.entity.ReportExample;
public
interface
ReportMapper
extends
MyVatMapper
{
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table
R
eport
* This method corresponds to the database table
r
eport
*
* @mbg.generated
*/
...
...
@@ -20,7 +20,7 @@ public interface ReportMapper extends MyVatMapper {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table
R
eport
* This method corresponds to the database table
r
eport
*
* @mbg.generated
*/
...
...
@@ -28,15 +28,15 @@ public interface ReportMapper extends MyVatMapper {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table
R
eport
* This method corresponds to the database table
r
eport
*
* @mbg.generated
*/
int
deleteByPrimaryKey
(
String
ID
);
int
deleteByPrimaryKey
(
Long
id
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table
R
eport
* This method corresponds to the database table
r
eport
*
* @mbg.generated
*/
...
...
@@ -44,7 +44,7 @@ public interface ReportMapper extends MyVatMapper {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table
R
eport
* This method corresponds to the database table
r
eport
*
* @mbg.generated
*/
...
...
@@ -52,7 +52,7 @@ public interface ReportMapper extends MyVatMapper {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table
R
eport
* This method corresponds to the database table
r
eport
*
* @mbg.generated
*/
...
...
@@ -60,7 +60,7 @@ public interface ReportMapper extends MyVatMapper {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table
R
eport
* This method corresponds to the database table
r
eport
*
* @mbg.generated
*/
...
...
@@ -68,15 +68,15 @@ public interface ReportMapper extends MyVatMapper {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table
R
eport
* This method corresponds to the database table
r
eport
*
* @mbg.generated
*/
Report
selectByPrimaryKey
(
String
ID
);
Report
selectByPrimaryKey
(
Long
id
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table
R
eport
* This method corresponds to the database table
r
eport
*
* @mbg.generated
*/
...
...
@@ -84,7 +84,7 @@ public interface ReportMapper extends MyVatMapper {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table
R
eport
* This method corresponds to the database table
r
eport
*
* @mbg.generated
*/
...
...
@@ -92,7 +92,7 @@ public interface ReportMapper extends MyVatMapper {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table
R
eport
* This method corresponds to the database table
r
eport
*
* @mbg.generated
*/
...
...
@@ -100,7 +100,7 @@ public interface ReportMapper extends MyVatMapper {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table
R
eport
* This method corresponds to the database table
r
eport
*
* @mbg.generated
*/
...
...
atms-api/src/main/java/pwc/taxtech/atms/vat/entity/CellData.java
View file @
b3ec20cc
...
...
@@ -27,7 +27,7 @@ public class CellData implements Serializable {
*
* @mbg.generated
*/
private
Stri
ng
reportId
;
private
Lo
ng
reportId
;
/**
*
...
...
@@ -36,7 +36,7 @@ public class CellData implements Serializable {
*
* @mbg.generated
*/
private
Stri
ng
cellTemplateId
;
private
Lo
ng
cellTemplateId
;
/**
*
...
...
@@ -132,7 +132,7 @@ public class CellData implements Serializable {
*
* @mbg.generated
*/
public
Stri
ng
getReportId
()
{
public
Lo
ng
getReportId
()
{
return
reportId
;
}
...
...
@@ -144,8 +144,8 @@ public class CellData implements Serializable {
*
* @mbg.generated
*/
public
void
setReportId
(
Stri
ng
reportId
)
{
this
.
reportId
=
reportId
==
null
?
null
:
reportId
.
trim
()
;
public
void
setReportId
(
Lo
ng
reportId
)
{
this
.
reportId
=
reportId
;
}
/**
...
...
@@ -156,7 +156,7 @@ public class CellData implements Serializable {
*
* @mbg.generated
*/
public
Stri
ng
getCellTemplateId
()
{
public
Lo
ng
getCellTemplateId
()
{
return
cellTemplateId
;
}
...
...
@@ -168,8 +168,8 @@ public class CellData implements Serializable {
*
* @mbg.generated
*/
public
void
setCellTemplateId
(
Stri
ng
cellTemplateId
)
{
this
.
cellTemplateId
=
cellTemplateId
==
null
?
null
:
cellTemplateId
.
trim
()
;
public
void
setCellTemplateId
(
Lo
ng
cellTemplateId
)
{
this
.
cellTemplateId
=
cellTemplateId
;
}
/**
...
...
atms-api/src/main/java/pwc/taxtech/atms/vat/entity/CellDataExample.java
View file @
b3ec20cc
...
...
@@ -265,62 +265,52 @@ public class CellDataExample {
return
(
Criteria
)
this
;
}
public
Criteria
andReportIdEqualTo
(
Stri
ng
value
)
{
public
Criteria
andReportIdEqualTo
(
Lo
ng
value
)
{
addCriterion
(
"report_id ="
,
value
,
"reportId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andReportIdNotEqualTo
(
Stri
ng
value
)
{
public
Criteria
andReportIdNotEqualTo
(
Lo
ng
value
)
{
addCriterion
(
"report_id <>"
,
value
,
"reportId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andReportIdGreaterThan
(
Stri
ng
value
)
{
public
Criteria
andReportIdGreaterThan
(
Lo
ng
value
)
{
addCriterion
(
"report_id >"
,
value
,
"reportId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andReportIdGreaterThanOrEqualTo
(
Stri
ng
value
)
{
public
Criteria
andReportIdGreaterThanOrEqualTo
(
Lo
ng
value
)
{
addCriterion
(
"report_id >="
,
value
,
"reportId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andReportIdLessThan
(
Stri
ng
value
)
{
public
Criteria
andReportIdLessThan
(
Lo
ng
value
)
{
addCriterion
(
"report_id <"
,
value
,
"reportId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andReportIdLessThanOrEqualTo
(
Stri
ng
value
)
{
public
Criteria
andReportIdLessThanOrEqualTo
(
Lo
ng
value
)
{
addCriterion
(
"report_id <="
,
value
,
"reportId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andReportIdLike
(
String
value
)
{
addCriterion
(
"report_id like"
,
value
,
"reportId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andReportIdNotLike
(
String
value
)
{
addCriterion
(
"report_id not like"
,
value
,
"reportId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andReportIdIn
(
List
<
String
>
values
)
{
public
Criteria
andReportIdIn
(
List
<
Long
>
values
)
{
addCriterion
(
"report_id in"
,
values
,
"reportId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andReportIdNotIn
(
List
<
Stri
ng
>
values
)
{
public
Criteria
andReportIdNotIn
(
List
<
Lo
ng
>
values
)
{
addCriterion
(
"report_id not in"
,
values
,
"reportId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andReportIdBetween
(
String
value1
,
Stri
ng
value2
)
{
public
Criteria
andReportIdBetween
(
Long
value1
,
Lo
ng
value2
)
{
addCriterion
(
"report_id between"
,
value1
,
value2
,
"reportId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andReportIdNotBetween
(
String
value1
,
Stri
ng
value2
)
{
public
Criteria
andReportIdNotBetween
(
Long
value1
,
Lo
ng
value2
)
{
addCriterion
(
"report_id not between"
,
value1
,
value2
,
"reportId"
);
return
(
Criteria
)
this
;
}
...
...
@@ -335,62 +325,52 @@ public class CellDataExample {
return
(
Criteria
)
this
;
}
public
Criteria
andCellTemplateIdEqualTo
(
Stri
ng
value
)
{
public
Criteria
andCellTemplateIdEqualTo
(
Lo
ng
value
)
{
addCriterion
(
"cell_template_id ="
,
value
,
"cellTemplateId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCellTemplateIdNotEqualTo
(
Stri
ng
value
)
{
public
Criteria
andCellTemplateIdNotEqualTo
(
Lo
ng
value
)
{
addCriterion
(
"cell_template_id <>"
,
value
,
"cellTemplateId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCellTemplateIdGreaterThan
(
Stri
ng
value
)
{
public
Criteria
andCellTemplateIdGreaterThan
(
Lo
ng
value
)
{
addCriterion
(
"cell_template_id >"
,
value
,
"cellTemplateId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCellTemplateIdGreaterThanOrEqualTo
(
Stri
ng
value
)
{
public
Criteria
andCellTemplateIdGreaterThanOrEqualTo
(
Lo
ng
value
)
{
addCriterion
(
"cell_template_id >="
,
value
,
"cellTemplateId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCellTemplateIdLessThan
(
Stri
ng
value
)
{
public
Criteria
andCellTemplateIdLessThan
(
Lo
ng
value
)
{
addCriterion
(
"cell_template_id <"
,
value
,
"cellTemplateId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCellTemplateIdLessThanOrEqualTo
(
Stri
ng
value
)
{
public
Criteria
andCellTemplateIdLessThanOrEqualTo
(
Lo
ng
value
)
{
addCriterion
(
"cell_template_id <="
,
value
,
"cellTemplateId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCellTemplateIdLike
(
String
value
)
{
addCriterion
(
"cell_template_id like"
,
value
,
"cellTemplateId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCellTemplateIdNotLike
(
String
value
)
{
addCriterion
(
"cell_template_id not like"
,
value
,
"cellTemplateId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCellTemplateIdIn
(
List
<
String
>
values
)
{
public
Criteria
andCellTemplateIdIn
(
List
<
Long
>
values
)
{
addCriterion
(
"cell_template_id in"
,
values
,
"cellTemplateId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCellTemplateIdNotIn
(
List
<
Stri
ng
>
values
)
{
public
Criteria
andCellTemplateIdNotIn
(
List
<
Lo
ng
>
values
)
{
addCriterion
(
"cell_template_id not in"
,
values
,
"cellTemplateId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCellTemplateIdBetween
(
String
value1
,
Stri
ng
value2
)
{
public
Criteria
andCellTemplateIdBetween
(
Long
value1
,
Lo
ng
value2
)
{
addCriterion
(
"cell_template_id between"
,
value1
,
value2
,
"cellTemplateId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCellTemplateIdNotBetween
(
String
value1
,
Stri
ng
value2
)
{
public
Criteria
andCellTemplateIdNotBetween
(
Long
value1
,
Lo
ng
value2
)
{
addCriterion
(
"cell_template_id not between"
,
value1
,
value2
,
"cellTemplateId"
);
return
(
Criteria
)
this
;
}
...
...
atms-api/src/main/java/pwc/taxtech/atms/vat/entity/Report.java
View file @
b3ec20cc
...
...
@@ -6,7 +6,7 @@ import java.util.Date;
/**
*
* This class was generated by MyBatis Generator.
* This class corresponds to the database table
R
eport
* This class corresponds to the database table
r
eport
*
* @mbg.generated do_not_delete_during_merge
*/
...
...
@@ -14,25 +14,25 @@ public class Report implements Serializable {
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column
Report.ID
* This field corresponds to the database column
report.id
*
* @mbg.generated
*/
private
String
ID
;
private
Long
id
;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column
Report.TemplateID
* This field corresponds to the database column
report.template_id
*
* @mbg.generated
*/
private
String
templateID
;
private
Long
templateId
;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column
Report.P
eriod
* This field corresponds to the database column
report.p
eriod
*
* @mbg.generated
*/
...
...
@@ -41,25 +41,25 @@ public class Report implements Serializable {
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column
Report.ProjectID
* This field corresponds to the database column
report.project_id
*
* @mbg.generated
*/
private
String
projectI
D
;
private
String
projectI
d
;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column
Report.Creator
* This field corresponds to the database column
report.create_by
*
* @mbg.generated
*/
private
String
creat
or
;
private
String
creat
eBy
;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column
Report.CreateT
ime
* This field corresponds to the database column
report.create_t
ime
*
* @mbg.generated
*/
...
...
@@ -68,16 +68,16 @@ public class Report implements Serializable {
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column
Report.Updater
* This field corresponds to the database column
report.update_by
*
* @mbg.generated
*/
private
String
update
r
;
private
String
update
By
;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column
Report.UpdateT
ime
* This field corresponds to the database column
report.update_t
ime
*
* @mbg.generated
*/
...
...
@@ -85,7 +85,7 @@ public class Report implements Serializable {
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table
R
eport
* This field corresponds to the database table
r
eport
*
* @mbg.generated
*/
...
...
@@ -93,57 +93,57 @@ public class Report implements Serializable {
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column
Report.ID
* This method returns the value of the database column
report.id
*
* @return the value of
Report.ID
* @return the value of
report.id
*
* @mbg.generated
*/
public
String
getID
()
{
return
ID
;
public
Long
getId
()
{
return
id
;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column
Report.ID
* This method sets the value of the database column
report.id
*
* @param
ID the value for Report.ID
* @param
id the value for report.id
*
* @mbg.generated
*/
public
void
setI
D
(
String
ID
)
{
this
.
ID
=
ID
==
null
?
null
:
ID
.
trim
()
;
public
void
setI
d
(
Long
id
)
{
this
.
id
=
id
;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column
Report.TemplateID
* This method returns the value of the database column
report.template_id
*
* @return the value of
Report.TemplateID
* @return the value of
report.template_id
*
* @mbg.generated
*/
public
String
getTemplateID
()
{
return
templateI
D
;
public
Long
getTemplateId
()
{
return
templateI
d
;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column
Report.TemplateID
* This method sets the value of the database column
report.template_id
*
* @param templateI
D the value for Report.TemplateID
* @param templateI
d the value for report.template_id
*
* @mbg.generated
*/
public
void
setTemplateI
D
(
String
templateID
)
{
this
.
templateI
D
=
templateID
==
null
?
null
:
templateID
.
trim
()
;
public
void
setTemplateI
d
(
Long
templateId
)
{
this
.
templateI
d
=
templateId
;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column
Report.P
eriod
* This method returns the value of the database column
report.p
eriod
*
* @return the value of
Report.P
eriod
* @return the value of
report.p
eriod
*
* @mbg.generated
*/
...
...
@@ -153,9 +153,9 @@ public class Report implements Serializable {
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column
Report.P
eriod
* This method sets the value of the database column
report.p
eriod
*
* @param period the value for
Report.P
eriod
* @param period the value for
report.p
eriod
*
* @mbg.generated
*/
...
...
@@ -165,57 +165,57 @@ public class Report implements Serializable {
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column
Report.ProjectID
* This method returns the value of the database column
report.project_id
*
* @return the value of
Report.ProjectID
* @return the value of
report.project_id
*
* @mbg.generated
*/
public
String
getProjectI
D
()
{
return
projectI
D
;
public
String
getProjectI
d
()
{
return
projectI
d
;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column
Report.ProjectID
* This method sets the value of the database column
report.project_id
*
* @param projectI
D the value for Report.ProjectID
* @param projectI
d the value for report.project_id
*
* @mbg.generated
*/
public
void
setProjectI
D
(
String
projectID
)
{
this
.
projectI
D
=
projectID
==
null
?
null
:
projectID
.
trim
();
public
void
setProjectI
d
(
String
projectId
)
{
this
.
projectI
d
=
projectId
==
null
?
null
:
projectId
.
trim
();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column
Report.Creator
* This method returns the value of the database column
report.create_by
*
* @return the value of
Report.Creator
* @return the value of
report.create_by
*
* @mbg.generated
*/
public
String
getCreat
or
()
{
return
creat
or
;
public
String
getCreat
eBy
()
{
return
creat
eBy
;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column
Report.Creator
* This method sets the value of the database column
report.create_by
*
* @param creat
or the value for Report.Creator
* @param creat
eBy the value for report.create_by
*
* @mbg.generated
*/
public
void
setCreat
or
(
String
creator
)
{
this
.
creat
or
=
creator
==
null
?
null
:
creator
.
trim
();
public
void
setCreat
eBy
(
String
createBy
)
{
this
.
creat
eBy
=
createBy
==
null
?
null
:
createBy
.
trim
();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column
Report.CreateT
ime
* This method returns the value of the database column
report.create_t
ime
*
* @return the value of
Report.CreateT
ime
* @return the value of
report.create_t
ime
*
* @mbg.generated
*/
...
...
@@ -225,9 +225,9 @@ public class Report implements Serializable {
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column
Report.CreateT
ime
* This method sets the value of the database column
report.create_t
ime
*
* @param createTime the value for
Report.CreateT
ime
* @param createTime the value for
report.create_t
ime
*
* @mbg.generated
*/
...
...
@@ -237,33 +237,33 @@ public class Report implements Serializable {
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column
Report.Updater
* This method returns the value of the database column
report.update_by
*
* @return the value of
Report.Updater
* @return the value of
report.update_by
*
* @mbg.generated
*/
public
String
getUpdate
r
()
{
return
update
r
;
public
String
getUpdate
By
()
{
return
update
By
;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column
Report.Updater
* This method sets the value of the database column
report.update_by
*
* @param update
r the value for Report.Updater
* @param update
By the value for report.update_by
*
* @mbg.generated
*/
public
void
setUpdate
r
(
String
updater
)
{
this
.
update
r
=
updater
==
null
?
null
:
updater
.
trim
();
public
void
setUpdate
By
(
String
updateBy
)
{
this
.
update
By
=
updateBy
==
null
?
null
:
updateBy
.
trim
();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column
Report.UpdateT
ime
* This method returns the value of the database column
report.update_t
ime
*
* @return the value of
Report.UpdateT
ime
* @return the value of
report.update_t
ime
*
* @mbg.generated
*/
...
...
@@ -273,9 +273,9 @@ public class Report implements Serializable {
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column
Report.UpdateT
ime
* This method sets the value of the database column
report.update_t
ime
*
* @param updateTime the value for
Report.UpdateT
ime
* @param updateTime the value for
report.update_t
ime
*
* @mbg.generated
*/
...
...
@@ -285,7 +285,7 @@ public class Report implements Serializable {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table
R
eport
* This method corresponds to the database table
r
eport
*
* @mbg.generated
*/
...
...
@@ -295,13 +295,13 @@ public class Report implements Serializable {
sb
.
append
(
getClass
().
getSimpleName
());
sb
.
append
(
" ["
);
sb
.
append
(
"Hash = "
).
append
(
hashCode
());
sb
.
append
(
",
ID="
).
append
(
ID
);
sb
.
append
(
", templateI
D="
).
append
(
templateID
);
sb
.
append
(
",
id="
).
append
(
id
);
sb
.
append
(
", templateI
d="
).
append
(
templateId
);
sb
.
append
(
", period="
).
append
(
period
);
sb
.
append
(
", projectI
D="
).
append
(
projectID
);
sb
.
append
(
", creat
or="
).
append
(
creator
);
sb
.
append
(
", projectI
d="
).
append
(
projectId
);
sb
.
append
(
", creat
eBy="
).
append
(
createBy
);
sb
.
append
(
", createTime="
).
append
(
createTime
);
sb
.
append
(
", update
r="
).
append
(
updater
);
sb
.
append
(
", update
By="
).
append
(
updateBy
);
sb
.
append
(
", updateTime="
).
append
(
updateTime
);
sb
.
append
(
"]"
);
return
sb
.
toString
();
...
...
atms-api/src/main/java/pwc/taxtech/atms/vat/entity/ReportExample.java
View file @
b3ec20cc
...
...
@@ -7,7 +7,7 @@ import java.util.List;
public
class
ReportExample
{
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table
R
eport
* This field corresponds to the database table
r
eport
*
* @mbg.generated
*/
...
...
@@ -15,7 +15,7 @@ public class ReportExample {
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table
R
eport
* This field corresponds to the database table
r
eport
*
* @mbg.generated
*/
...
...
@@ -23,7 +23,7 @@ public class ReportExample {
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table
R
eport
* This field corresponds to the database table
r
eport
*
* @mbg.generated
*/
...
...
@@ -31,7 +31,7 @@ public class ReportExample {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table
R
eport
* This method corresponds to the database table
r
eport
*
* @mbg.generated
*/
...
...
@@ -41,7 +41,7 @@ public class ReportExample {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table
R
eport
* This method corresponds to the database table
r
eport
*
* @mbg.generated
*/
...
...
@@ -51,7 +51,7 @@ public class ReportExample {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table
R
eport
* This method corresponds to the database table
r
eport
*
* @mbg.generated
*/
...
...
@@ -61,7 +61,7 @@ public class ReportExample {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table
R
eport
* This method corresponds to the database table
r
eport
*
* @mbg.generated
*/
...
...
@@ -71,7 +71,7 @@ public class ReportExample {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table
R
eport
* This method corresponds to the database table
r
eport
*
* @mbg.generated
*/
...
...
@@ -81,7 +81,7 @@ public class ReportExample {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table
R
eport
* This method corresponds to the database table
r
eport
*
* @mbg.generated
*/
...
...
@@ -91,7 +91,7 @@ public class ReportExample {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table
R
eport
* This method corresponds to the database table
r
eport
*
* @mbg.generated
*/
...
...
@@ -101,7 +101,7 @@ public class ReportExample {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table
R
eport
* This method corresponds to the database table
r
eport
*
* @mbg.generated
*/
...
...
@@ -113,7 +113,7 @@ public class ReportExample {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table
R
eport
* This method corresponds to the database table
r
eport
*
* @mbg.generated
*/
...
...
@@ -127,7 +127,7 @@ public class ReportExample {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table
R
eport
* This method corresponds to the database table
r
eport
*
* @mbg.generated
*/
...
...
@@ -138,7 +138,7 @@ public class ReportExample {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table
R
eport
* This method corresponds to the database table
r
eport
*
* @mbg.generated
*/
...
...
@@ -150,7 +150,7 @@ public class ReportExample {
/**
* This class was generated by MyBatis Generator.
* This class corresponds to the database table
R
eport
* This class corresponds to the database table
r
eport
*
* @mbg.generated
*/
...
...
@@ -195,540 +195,520 @@ public class ReportExample {
criteria
.
add
(
new
Criterion
(
condition
,
value1
,
value2
));
}
public
Criteria
andI
D
IsNull
()
{
addCriterion
(
"
ID
is null"
);
public
Criteria
andI
d
IsNull
()
{
addCriterion
(
"
id
is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andI
D
IsNotNull
()
{
addCriterion
(
"
ID
is not null"
);
public
Criteria
andI
d
IsNotNull
()
{
addCriterion
(
"
id
is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andI
DEqualTo
(
Stri
ng
value
)
{
addCriterion
(
"
ID ="
,
value
,
"ID
"
);
public
Criteria
andI
dEqualTo
(
Lo
ng
value
)
{
addCriterion
(
"
id ="
,
value
,
"id
"
);
return
(
Criteria
)
this
;
}
public
Criteria
andI
DNotEqualTo
(
Stri
ng
value
)
{
addCriterion
(
"
ID <>"
,
value
,
"ID
"
);
public
Criteria
andI
dNotEqualTo
(
Lo
ng
value
)
{
addCriterion
(
"
id <>"
,
value
,
"id
"
);
return
(
Criteria
)
this
;
}
public
Criteria
andI
DGreaterThan
(
Stri
ng
value
)
{
addCriterion
(
"
ID >"
,
value
,
"ID
"
);
public
Criteria
andI
dGreaterThan
(
Lo
ng
value
)
{
addCriterion
(
"
id >"
,
value
,
"id
"
);
return
(
Criteria
)
this
;
}
public
Criteria
andI
DGreaterThanOrEqualTo
(
Stri
ng
value
)
{
addCriterion
(
"
ID >="
,
value
,
"ID
"
);
public
Criteria
andI
dGreaterThanOrEqualTo
(
Lo
ng
value
)
{
addCriterion
(
"
id >="
,
value
,
"id
"
);
return
(
Criteria
)
this
;
}
public
Criteria
andI
DLessThan
(
Stri
ng
value
)
{
addCriterion
(
"
ID <"
,
value
,
"ID
"
);
public
Criteria
andI
dLessThan
(
Lo
ng
value
)
{
addCriterion
(
"
id <"
,
value
,
"id
"
);
return
(
Criteria
)
this
;
}
public
Criteria
andI
DLessThanOrEqualTo
(
Stri
ng
value
)
{
addCriterion
(
"
ID <="
,
value
,
"ID
"
);
public
Criteria
andI
dLessThanOrEqualTo
(
Lo
ng
value
)
{
addCriterion
(
"
id <="
,
value
,
"id
"
);
return
(
Criteria
)
this
;
}
public
Criteria
andI
DLike
(
String
value
)
{
addCriterion
(
"
ID like"
,
value
,
"ID
"
);
public
Criteria
andI
dIn
(
List
<
Long
>
values
)
{
addCriterion
(
"
id in"
,
values
,
"id
"
);
return
(
Criteria
)
this
;
}
public
Criteria
andI
DNotLike
(
String
value
)
{
addCriterion
(
"
ID not like"
,
value
,
"ID
"
);
public
Criteria
andI
dNotIn
(
List
<
Long
>
values
)
{
addCriterion
(
"
id not in"
,
values
,
"id
"
);
return
(
Criteria
)
this
;
}
public
Criteria
andI
DIn
(
List
<
String
>
values
)
{
addCriterion
(
"
ID in"
,
values
,
"ID
"
);
public
Criteria
andI
dBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"
id between"
,
value1
,
value2
,
"id
"
);
return
(
Criteria
)
this
;
}
public
Criteria
andI
DNotIn
(
List
<
String
>
values
)
{
addCriterion
(
"
ID not in"
,
values
,
"ID
"
);
public
Criteria
andI
dNotBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"
id not between"
,
value1
,
value2
,
"id
"
);
return
(
Criteria
)
this
;
}
public
Criteria
and
IDBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"
ID between"
,
value1
,
value2
,
"ID
"
);
public
Criteria
and
TemplateIdIsNull
(
)
{
addCriterion
(
"
template_id is null
"
);
return
(
Criteria
)
this
;
}
public
Criteria
and
IDNotBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"
ID not between"
,
value1
,
value2
,
"ID
"
);
public
Criteria
and
TemplateIdIsNotNull
(
)
{
addCriterion
(
"
template_id is not null
"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTemplateI
DIsNull
(
)
{
addCriterion
(
"
TemplateID is null
"
);
public
Criteria
andTemplateI
dEqualTo
(
Long
value
)
{
addCriterion
(
"
template_id ="
,
value
,
"templateId
"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTemplateI
DIsNotNull
(
)
{
addCriterion
(
"
TemplateID is not null
"
);
public
Criteria
andTemplateI
dNotEqualTo
(
Long
value
)
{
addCriterion
(
"
template_id <>"
,
value
,
"templateId
"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTemplateI
DEqualTo
(
Stri
ng
value
)
{
addCriterion
(
"
TemplateID ="
,
value
,
"templateID
"
);
public
Criteria
andTemplateI
dGreaterThan
(
Lo
ng
value
)
{
addCriterion
(
"
template_id >"
,
value
,
"templateId
"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTemplateI
DNotEqualTo
(
Stri
ng
value
)
{
addCriterion
(
"
TemplateID <>"
,
value
,
"templateID
"
);
public
Criteria
andTemplateI
dGreaterThanOrEqualTo
(
Lo
ng
value
)
{
addCriterion
(
"
template_id >="
,
value
,
"templateId
"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTemplateI
DGreaterThan
(
Stri
ng
value
)
{
addCriterion
(
"
TemplateID >"
,
value
,
"templateID
"
);
public
Criteria
andTemplateI
dLessThan
(
Lo
ng
value
)
{
addCriterion
(
"
template_id <"
,
value
,
"templateId
"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTemplateI
DGreaterThanOrEqualTo
(
Stri
ng
value
)
{
addCriterion
(
"
TemplateID >="
,
value
,
"templateID
"
);
public
Criteria
andTemplateI
dLessThanOrEqualTo
(
Lo
ng
value
)
{
addCriterion
(
"
template_id <="
,
value
,
"templateId
"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTemplateI
DLessThan
(
String
value
)
{
addCriterion
(
"
TemplateID <"
,
value
,
"templateID
"
);
public
Criteria
andTemplateI
dIn
(
List
<
Long
>
values
)
{
addCriterion
(
"
template_id in"
,
values
,
"templateId
"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTemplateI
DLessThanOrEqualTo
(
String
value
)
{
addCriterion
(
"
TemplateID <="
,
value
,
"templateID
"
);
public
Criteria
andTemplateI
dNotIn
(
List
<
Long
>
values
)
{
addCriterion
(
"
template_id not in"
,
values
,
"templateId
"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTemplateI
DLike
(
String
value
)
{
addCriterion
(
"
TemplateID like"
,
value
,
"templateID
"
);
public
Criteria
andTemplateI
dBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"
template_id between"
,
value1
,
value2
,
"templateId
"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTemplateIDNotLike
(
String
value
)
{
addCriterion
(
"TemplateID not like"
,
value
,
"templateID"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTemplateIDIn
(
List
<
String
>
values
)
{
addCriterion
(
"TemplateID in"
,
values
,
"templateID"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTemplateIDNotIn
(
List
<
String
>
values
)
{
addCriterion
(
"TemplateID not in"
,
values
,
"templateID"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTemplateIDBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"TemplateID between"
,
value1
,
value2
,
"templateID"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTemplateIDNotBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"TemplateID not between"
,
value1
,
value2
,
"templateID"
);
public
Criteria
andTemplateIdNotBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"template_id not between"
,
value1
,
value2
,
"templateId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPeriodIsNull
()
{
addCriterion
(
"
P
eriod is null"
);
addCriterion
(
"
p
eriod is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPeriodIsNotNull
()
{
addCriterion
(
"
P
eriod is not null"
);
addCriterion
(
"
p
eriod is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPeriodEqualTo
(
Integer
value
)
{
addCriterion
(
"
P
eriod ="
,
value
,
"period"
);
addCriterion
(
"
p
eriod ="
,
value
,
"period"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPeriodNotEqualTo
(
Integer
value
)
{
addCriterion
(
"
P
eriod <>"
,
value
,
"period"
);
addCriterion
(
"
p
eriod <>"
,
value
,
"period"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPeriodGreaterThan
(
Integer
value
)
{
addCriterion
(
"
P
eriod >"
,
value
,
"period"
);
addCriterion
(
"
p
eriod >"
,
value
,
"period"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPeriodGreaterThanOrEqualTo
(
Integer
value
)
{
addCriterion
(
"
P
eriod >="
,
value
,
"period"
);
addCriterion
(
"
p
eriod >="
,
value
,
"period"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPeriodLessThan
(
Integer
value
)
{
addCriterion
(
"
P
eriod <"
,
value
,
"period"
);
addCriterion
(
"
p
eriod <"
,
value
,
"period"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPeriodLessThanOrEqualTo
(
Integer
value
)
{
addCriterion
(
"
P
eriod <="
,
value
,
"period"
);
addCriterion
(
"
p
eriod <="
,
value
,
"period"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPeriodIn
(
List
<
Integer
>
values
)
{
addCriterion
(
"
P
eriod in"
,
values
,
"period"
);
addCriterion
(
"
p
eriod in"
,
values
,
"period"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPeriodNotIn
(
List
<
Integer
>
values
)
{
addCriterion
(
"
P
eriod not in"
,
values
,
"period"
);
addCriterion
(
"
p
eriod not in"
,
values
,
"period"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPeriodBetween
(
Integer
value1
,
Integer
value2
)
{
addCriterion
(
"
P
eriod between"
,
value1
,
value2
,
"period"
);
addCriterion
(
"
p
eriod between"
,
value1
,
value2
,
"period"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPeriodNotBetween
(
Integer
value1
,
Integer
value2
)
{
addCriterion
(
"
P
eriod not between"
,
value1
,
value2
,
"period"
);
addCriterion
(
"
p
eriod not between"
,
value1
,
value2
,
"period"
);
return
(
Criteria
)
this
;
}
public
Criteria
andProjectI
D
IsNull
()
{
addCriterion
(
"
ProjectID
is null"
);
public
Criteria
andProjectI
d
IsNull
()
{
addCriterion
(
"
project_id
is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andProjectI
D
IsNotNull
()
{
addCriterion
(
"
ProjectID
is not null"
);
public
Criteria
andProjectI
d
IsNotNull
()
{
addCriterion
(
"
project_id
is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andProjectI
D
EqualTo
(
String
value
)
{
addCriterion
(
"
ProjectID ="
,
value
,
"projectID
"
);
public
Criteria
andProjectI
d
EqualTo
(
String
value
)
{
addCriterion
(
"
project_id ="
,
value
,
"projectId
"
);
return
(
Criteria
)
this
;
}
public
Criteria
andProjectI
D
NotEqualTo
(
String
value
)
{
addCriterion
(
"
ProjectID <>"
,
value
,
"projectID
"
);
public
Criteria
andProjectI
d
NotEqualTo
(
String
value
)
{
addCriterion
(
"
project_id <>"
,
value
,
"projectId
"
);
return
(
Criteria
)
this
;
}
public
Criteria
andProjectI
D
GreaterThan
(
String
value
)
{
addCriterion
(
"
ProjectID >"
,
value
,
"projectID
"
);
public
Criteria
andProjectI
d
GreaterThan
(
String
value
)
{
addCriterion
(
"
project_id >"
,
value
,
"projectId
"
);
return
(
Criteria
)
this
;
}
public
Criteria
andProjectI
D
GreaterThanOrEqualTo
(
String
value
)
{
addCriterion
(
"
ProjectID >="
,
value
,
"projectID
"
);
public
Criteria
andProjectI
d
GreaterThanOrEqualTo
(
String
value
)
{
addCriterion
(
"
project_id >="
,
value
,
"projectId
"
);
return
(
Criteria
)
this
;
}
public
Criteria
andProjectI
D
LessThan
(
String
value
)
{
addCriterion
(
"
ProjectID <"
,
value
,
"projectID
"
);
public
Criteria
andProjectI
d
LessThan
(
String
value
)
{
addCriterion
(
"
project_id <"
,
value
,
"projectId
"
);
return
(
Criteria
)
this
;
}
public
Criteria
andProjectI
D
LessThanOrEqualTo
(
String
value
)
{
addCriterion
(
"
ProjectID <="
,
value
,
"projectID
"
);
public
Criteria
andProjectI
d
LessThanOrEqualTo
(
String
value
)
{
addCriterion
(
"
project_id <="
,
value
,
"projectId
"
);
return
(
Criteria
)
this
;
}
public
Criteria
andProjectI
D
Like
(
String
value
)
{
addCriterion
(
"
ProjectID like"
,
value
,
"projectID
"
);
public
Criteria
andProjectI
d
Like
(
String
value
)
{
addCriterion
(
"
project_id like"
,
value
,
"projectId
"
);
return
(
Criteria
)
this
;
}
public
Criteria
andProjectI
D
NotLike
(
String
value
)
{
addCriterion
(
"
ProjectID not like"
,
value
,
"projectID
"
);
public
Criteria
andProjectI
d
NotLike
(
String
value
)
{
addCriterion
(
"
project_id not like"
,
value
,
"projectId
"
);
return
(
Criteria
)
this
;
}
public
Criteria
andProjectI
D
In
(
List
<
String
>
values
)
{
addCriterion
(
"
ProjectID in"
,
values
,
"projectID
"
);
public
Criteria
andProjectI
d
In
(
List
<
String
>
values
)
{
addCriterion
(
"
project_id in"
,
values
,
"projectId
"
);
return
(
Criteria
)
this
;
}
public
Criteria
andProjectI
D
NotIn
(
List
<
String
>
values
)
{
addCriterion
(
"
ProjectID not in"
,
values
,
"projectID
"
);
public
Criteria
andProjectI
d
NotIn
(
List
<
String
>
values
)
{
addCriterion
(
"
project_id not in"
,
values
,
"projectId
"
);
return
(
Criteria
)
this
;
}
public
Criteria
andProjectI
D
Between
(
String
value1
,
String
value2
)
{
addCriterion
(
"
ProjectID between"
,
value1
,
value2
,
"projectID
"
);
public
Criteria
andProjectI
d
Between
(
String
value1
,
String
value2
)
{
addCriterion
(
"
project_id between"
,
value1
,
value2
,
"projectId
"
);
return
(
Criteria
)
this
;
}
public
Criteria
andProjectI
D
NotBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"
ProjectID not between"
,
value1
,
value2
,
"projectID
"
);
public
Criteria
andProjectI
d
NotBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"
project_id not between"
,
value1
,
value2
,
"projectId
"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreat
or
IsNull
()
{
addCriterion
(
"
Creator
is null"
);
public
Criteria
andCreat
eBy
IsNull
()
{
addCriterion
(
"
create_by
is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreat
or
IsNotNull
()
{
addCriterion
(
"
Creator
is not null"
);
public
Criteria
andCreat
eBy
IsNotNull
()
{
addCriterion
(
"
create_by
is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreat
or
EqualTo
(
String
value
)
{
addCriterion
(
"
Creator ="
,
value
,
"creator
"
);
public
Criteria
andCreat
eBy
EqualTo
(
String
value
)
{
addCriterion
(
"
create_by ="
,
value
,
"createBy
"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreat
or
NotEqualTo
(
String
value
)
{
addCriterion
(
"
Creator <>"
,
value
,
"creator
"
);
public
Criteria
andCreat
eBy
NotEqualTo
(
String
value
)
{
addCriterion
(
"
create_by <>"
,
value
,
"createBy
"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreat
or
GreaterThan
(
String
value
)
{
addCriterion
(
"
Creator >"
,
value
,
"creator
"
);
public
Criteria
andCreat
eBy
GreaterThan
(
String
value
)
{
addCriterion
(
"
create_by >"
,
value
,
"createBy
"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreat
or
GreaterThanOrEqualTo
(
String
value
)
{
addCriterion
(
"
Creator >="
,
value
,
"creator
"
);
public
Criteria
andCreat
eBy
GreaterThanOrEqualTo
(
String
value
)
{
addCriterion
(
"
create_by >="
,
value
,
"createBy
"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreat
or
LessThan
(
String
value
)
{
addCriterion
(
"
Creator <"
,
value
,
"creator
"
);
public
Criteria
andCreat
eBy
LessThan
(
String
value
)
{
addCriterion
(
"
create_by <"
,
value
,
"createBy
"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreat
or
LessThanOrEqualTo
(
String
value
)
{
addCriterion
(
"
Creator <="
,
value
,
"creator
"
);
public
Criteria
andCreat
eBy
LessThanOrEqualTo
(
String
value
)
{
addCriterion
(
"
create_by <="
,
value
,
"createBy
"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreat
or
Like
(
String
value
)
{
addCriterion
(
"
Creator like"
,
value
,
"creator
"
);
public
Criteria
andCreat
eBy
Like
(
String
value
)
{
addCriterion
(
"
create_by like"
,
value
,
"createBy
"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreat
or
NotLike
(
String
value
)
{
addCriterion
(
"
Creator not like"
,
value
,
"creator
"
);
public
Criteria
andCreat
eBy
NotLike
(
String
value
)
{
addCriterion
(
"
create_by not like"
,
value
,
"createBy
"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreat
or
In
(
List
<
String
>
values
)
{
addCriterion
(
"
Creator in"
,
values
,
"creator
"
);
public
Criteria
andCreat
eBy
In
(
List
<
String
>
values
)
{
addCriterion
(
"
create_by in"
,
values
,
"createBy
"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreat
or
NotIn
(
List
<
String
>
values
)
{
addCriterion
(
"
Creator not in"
,
values
,
"creator
"
);
public
Criteria
andCreat
eBy
NotIn
(
List
<
String
>
values
)
{
addCriterion
(
"
create_by not in"
,
values
,
"createBy
"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreat
or
Between
(
String
value1
,
String
value2
)
{
addCriterion
(
"
Creator between"
,
value1
,
value2
,
"creator
"
);
public
Criteria
andCreat
eBy
Between
(
String
value1
,
String
value2
)
{
addCriterion
(
"
create_by between"
,
value1
,
value2
,
"createBy
"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreat
or
NotBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"
Creator not between"
,
value1
,
value2
,
"creator
"
);
public
Criteria
andCreat
eBy
NotBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"
create_by not between"
,
value1
,
value2
,
"createBy
"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeIsNull
()
{
addCriterion
(
"
CreateT
ime is null"
);
addCriterion
(
"
create_t
ime is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeIsNotNull
()
{
addCriterion
(
"
CreateT
ime is not null"
);
addCriterion
(
"
create_t
ime is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeEqualTo
(
Date
value
)
{
addCriterion
(
"
CreateT
ime ="
,
value
,
"createTime"
);
addCriterion
(
"
create_t
ime ="
,
value
,
"createTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeNotEqualTo
(
Date
value
)
{
addCriterion
(
"
CreateT
ime <>"
,
value
,
"createTime"
);
addCriterion
(
"
create_t
ime <>"
,
value
,
"createTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeGreaterThan
(
Date
value
)
{
addCriterion
(
"
CreateT
ime >"
,
value
,
"createTime"
);
addCriterion
(
"
create_t
ime >"
,
value
,
"createTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeGreaterThanOrEqualTo
(
Date
value
)
{
addCriterion
(
"
CreateT
ime >="
,
value
,
"createTime"
);
addCriterion
(
"
create_t
ime >="
,
value
,
"createTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeLessThan
(
Date
value
)
{
addCriterion
(
"
CreateT
ime <"
,
value
,
"createTime"
);
addCriterion
(
"
create_t
ime <"
,
value
,
"createTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeLessThanOrEqualTo
(
Date
value
)
{
addCriterion
(
"
CreateT
ime <="
,
value
,
"createTime"
);
addCriterion
(
"
create_t
ime <="
,
value
,
"createTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeIn
(
List
<
Date
>
values
)
{
addCriterion
(
"
CreateT
ime in"
,
values
,
"createTime"
);
addCriterion
(
"
create_t
ime in"
,
values
,
"createTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeNotIn
(
List
<
Date
>
values
)
{
addCriterion
(
"
CreateT
ime not in"
,
values
,
"createTime"
);
addCriterion
(
"
create_t
ime not in"
,
values
,
"createTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeBetween
(
Date
value1
,
Date
value2
)
{
addCriterion
(
"
CreateT
ime between"
,
value1
,
value2
,
"createTime"
);
addCriterion
(
"
create_t
ime between"
,
value1
,
value2
,
"createTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeNotBetween
(
Date
value1
,
Date
value2
)
{
addCriterion
(
"
CreateT
ime not between"
,
value1
,
value2
,
"createTime"
);
addCriterion
(
"
create_t
ime not between"
,
value1
,
value2
,
"createTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUpdate
r
IsNull
()
{
addCriterion
(
"
Updater
is null"
);
public
Criteria
andUpdate
By
IsNull
()
{
addCriterion
(
"
update_by
is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUpdate
r
IsNotNull
()
{
addCriterion
(
"
Updater
is not null"
);
public
Criteria
andUpdate
By
IsNotNull
()
{
addCriterion
(
"
update_by
is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUpdate
r
EqualTo
(
String
value
)
{
addCriterion
(
"
Updater ="
,
value
,
"updater
"
);
public
Criteria
andUpdate
By
EqualTo
(
String
value
)
{
addCriterion
(
"
update_by ="
,
value
,
"updateBy
"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUpdate
r
NotEqualTo
(
String
value
)
{
addCriterion
(
"
Updater <>"
,
value
,
"updater
"
);
public
Criteria
andUpdate
By
NotEqualTo
(
String
value
)
{
addCriterion
(
"
update_by <>"
,
value
,
"updateBy
"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUpdate
r
GreaterThan
(
String
value
)
{
addCriterion
(
"
Updater >"
,
value
,
"updater
"
);
public
Criteria
andUpdate
By
GreaterThan
(
String
value
)
{
addCriterion
(
"
update_by >"
,
value
,
"updateBy
"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUpdate
r
GreaterThanOrEqualTo
(
String
value
)
{
addCriterion
(
"
Updater >="
,
value
,
"updater
"
);
public
Criteria
andUpdate
By
GreaterThanOrEqualTo
(
String
value
)
{
addCriterion
(
"
update_by >="
,
value
,
"updateBy
"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUpdate
r
LessThan
(
String
value
)
{
addCriterion
(
"
Updater <"
,
value
,
"updater
"
);
public
Criteria
andUpdate
By
LessThan
(
String
value
)
{
addCriterion
(
"
update_by <"
,
value
,
"updateBy
"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUpdate
r
LessThanOrEqualTo
(
String
value
)
{
addCriterion
(
"
Updater <="
,
value
,
"updater
"
);
public
Criteria
andUpdate
By
LessThanOrEqualTo
(
String
value
)
{
addCriterion
(
"
update_by <="
,
value
,
"updateBy
"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUpdate
r
Like
(
String
value
)
{
addCriterion
(
"
Updater like"
,
value
,
"updater
"
);
public
Criteria
andUpdate
By
Like
(
String
value
)
{
addCriterion
(
"
update_by like"
,
value
,
"updateBy
"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUpdate
r
NotLike
(
String
value
)
{
addCriterion
(
"
Updater not like"
,
value
,
"updater
"
);
public
Criteria
andUpdate
By
NotLike
(
String
value
)
{
addCriterion
(
"
update_by not like"
,
value
,
"updateBy
"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUpdate
r
In
(
List
<
String
>
values
)
{
addCriterion
(
"
Updater in"
,
values
,
"updater
"
);
public
Criteria
andUpdate
By
In
(
List
<
String
>
values
)
{
addCriterion
(
"
update_by in"
,
values
,
"updateBy
"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUpdate
r
NotIn
(
List
<
String
>
values
)
{
addCriterion
(
"
Updater not in"
,
values
,
"updater
"
);
public
Criteria
andUpdate
By
NotIn
(
List
<
String
>
values
)
{
addCriterion
(
"
update_by not in"
,
values
,
"updateBy
"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUpdate
r
Between
(
String
value1
,
String
value2
)
{
addCriterion
(
"
Updater between"
,
value1
,
value2
,
"updater
"
);
public
Criteria
andUpdate
By
Between
(
String
value1
,
String
value2
)
{
addCriterion
(
"
update_by between"
,
value1
,
value2
,
"updateBy
"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUpdate
r
NotBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"
Updater not between"
,
value1
,
value2
,
"updater
"
);
public
Criteria
andUpdate
By
NotBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"
update_by not between"
,
value1
,
value2
,
"updateBy
"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUpdateTimeIsNull
()
{
addCriterion
(
"
UpdateT
ime is null"
);
addCriterion
(
"
update_t
ime is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUpdateTimeIsNotNull
()
{
addCriterion
(
"
UpdateT
ime is not null"
);
addCriterion
(
"
update_t
ime is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUpdateTimeEqualTo
(
Date
value
)
{
addCriterion
(
"
UpdateT
ime ="
,
value
,
"updateTime"
);
addCriterion
(
"
update_t
ime ="
,
value
,
"updateTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUpdateTimeNotEqualTo
(
Date
value
)
{
addCriterion
(
"
UpdateT
ime <>"
,
value
,
"updateTime"
);
addCriterion
(
"
update_t
ime <>"
,
value
,
"updateTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUpdateTimeGreaterThan
(
Date
value
)
{
addCriterion
(
"
UpdateT
ime >"
,
value
,
"updateTime"
);
addCriterion
(
"
update_t
ime >"
,
value
,
"updateTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUpdateTimeGreaterThanOrEqualTo
(
Date
value
)
{
addCriterion
(
"
UpdateT
ime >="
,
value
,
"updateTime"
);
addCriterion
(
"
update_t
ime >="
,
value
,
"updateTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUpdateTimeLessThan
(
Date
value
)
{
addCriterion
(
"
UpdateT
ime <"
,
value
,
"updateTime"
);
addCriterion
(
"
update_t
ime <"
,
value
,
"updateTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUpdateTimeLessThanOrEqualTo
(
Date
value
)
{
addCriterion
(
"
UpdateT
ime <="
,
value
,
"updateTime"
);
addCriterion
(
"
update_t
ime <="
,
value
,
"updateTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUpdateTimeIn
(
List
<
Date
>
values
)
{
addCriterion
(
"
UpdateT
ime in"
,
values
,
"updateTime"
);
addCriterion
(
"
update_t
ime in"
,
values
,
"updateTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUpdateTimeNotIn
(
List
<
Date
>
values
)
{
addCriterion
(
"
UpdateT
ime not in"
,
values
,
"updateTime"
);
addCriterion
(
"
update_t
ime not in"
,
values
,
"updateTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUpdateTimeBetween
(
Date
value1
,
Date
value2
)
{
addCriterion
(
"
UpdateT
ime between"
,
value1
,
value2
,
"updateTime"
);
addCriterion
(
"
update_t
ime between"
,
value1
,
value2
,
"updateTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUpdateTimeNotBetween
(
Date
value1
,
Date
value2
)
{
addCriterion
(
"
UpdateT
ime not between"
,
value1
,
value2
,
"updateTime"
);
addCriterion
(
"
update_t
ime not between"
,
value1
,
value2
,
"updateTime"
);
return
(
Criteria
)
this
;
}
}
/**
* This class was generated by MyBatis Generator.
* This class corresponds to the database table
R
eport
* This class corresponds to the database table
r
eport
*
* @mbg.generated do_not_delete_during_merge
*/
...
...
@@ -741,7 +721,7 @@ public class ReportExample {
/**
* This class was generated by MyBatis Generator.
* This class corresponds to the database table
R
eport
* This class corresponds to the database table
r
eport
*
* @mbg.generated
*/
...
...
atms-api/src/main/java/pwc/taxtech/atms/vat/service/ReportGenerator.java
0 → 100644
View file @
b3ec20cc
package
pwc
.
taxtech
.
atms
.
vat
.
service
;
import
java.util.List
;
public
interface
ReportGenerator
{
String
generateData
(
String
projectId
,
List
<
Long
>
templateIds
,
Boolean
ifDeleteManualDataSource
,
List
<
String
>
exceptCellTemplates
,
Integer
periodParam
,
String
generator
);
}
atms-api/src/main/java/pwc/taxtech/atms/vat/service/ReportService.java
View file @
b3ec20cc
...
...
@@ -10,4 +10,6 @@ public interface ReportService {
OperationResultDto
<
List
<
ReportDto
>>
getReportTemplate
(
String
projectID
,
EnumServiceType
serviceType
,
Integer
period
);
OperationResultDto
updateConfig
(
String
projectId
,
Integer
period
,
String
generator
);
OperationResultDto
generateData
(
String
projectId
,
EnumServiceType
serviceType
,
Boolean
ifDeleteManualDataSource
,
Integer
periodParam
,
Integer
reportType
,
String
generator
);
}
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/ReportGeneratorImpl.java
0 → 100644
View file @
b3ec20cc
package
pwc
.
taxtech
.
atms
.
vat
.
service
.
impl
;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.poi.openxml4j.exceptions.InvalidFormatException
;
import
org.apache.poi.ss.formula.functions.FreeRefFunction
;
import
org.apache.poi.ss.formula.udf.AggregatingUDFFinder
;
import
org.apache.poi.ss.formula.udf.DefaultUDFFinder
;
import
org.apache.poi.ss.formula.udf.UDFFinder
;
import
org.apache.poi.ss.usermodel.*
;
import
org.apache.poi.xssf.usermodel.XSSFWorkbook
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
pwc.taxtech.atms.common.POIUtil
;
import
pwc.taxtech.atms.constant.enums.CellDataSourceType
;
import
pwc.taxtech.atms.service.impl.DistributedIDService
;
import
pwc.taxtech.atms.vat.dao.*
;
import
pwc.taxtech.atms.vat.entity.*
;
import
pwc.taxtech.atms.vat.service.ReportGenerator
;
import
java.io.File
;
import
java.io.FileNotFoundException
;
import
java.io.IOException
;
import
java.util.*
;
import
java.util.stream.Collectors
;
@Service
public
class
ReportGeneratorImpl
implements
ReportGenerator
{
@Autowired
PeriodTemplateMapper
periodTemplateMapper
;
@Autowired
PeriodCellTemplateMapper
periodCellTemplateMapper
;
@Autowired
PeriodCellTemplateConfigMapper
periodCellTemplateConfigMapper
;
@Autowired
DistributedIDService
distributedIDService
;
@Autowired
ReportMapper
reportMapper
;
@Autowired
CellDataMapper
cellDataMapper
;
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
ReportGeneratorImpl
.
class
);
@Override
public
String
generateData
(
String
projectId
,
List
<
Long
>
templateIds
,
Boolean
ifDeleteManualDataSource
,
List
<
String
>
exceptCellTemplates
,
Integer
periodParam
,
String
generator
)
{
Date
createTime
=
new
Date
();
int
period
=
periodParam
!=
null
?
periodParam
:
0
;
PeriodTemplateExample
periodTemplateExample
=
new
PeriodTemplateExample
();
periodTemplateExample
.
createCriteria
().
andIdIn
(
templateIds
);
List
<
PeriodTemplate
>
periodTemplateList
=
periodTemplateMapper
.
selectByExample
(
periodTemplateExample
);
List
<
Long
>
periodTemplateIDList
=
periodTemplateList
.
stream
().
map
(
PeriodTemplate:
:
getTemplateId
).
collect
(
Collectors
.
toList
());
PeriodCellTemplateExample
periodCellTemplateExample
=
new
PeriodCellTemplateExample
();
periodCellTemplateExample
.
createCriteria
().
andReportTemplateIdIn
(
periodTemplateIDList
);
List
<
PeriodCellTemplate
>
periodCellTemplateList
=
periodCellTemplateMapper
.
selectByExample
(
periodCellTemplateExample
);
PeriodCellTemplateConfigExample
periodCellTemplateConfigExample
=
new
PeriodCellTemplateConfigExample
();
// only get formula config
periodCellTemplateConfigExample
.
createCriteria
().
andReportTemplateIdIn
(
periodTemplateIDList
);
List
<
PeriodCellTemplateConfig
>
periodCellTemplateConfigList
=
periodCellTemplateConfigMapper
.
selectByExample
(
periodCellTemplateConfigExample
);
Map
<
String
,
String
>
templateCodeAndPath
=
new
HashMap
<>();
periodTemplateList
.
forEach
(
a
->
templateCodeAndPath
.
put
(
a
.
getCode
(),
getTemplatePath
(
a
.
getPath
())));
Optional
<
Workbook
>
workbook
=
createWorkBookWithExcelFileList
(
templateCodeAndPath
);
if
(
workbook
!=
null
)
{
Workbook
newWorkbook
=
workbook
.
get
();
addFunctionsToWorkbook
(
newWorkbook
);
int
sheetCount
=
newWorkbook
.
getNumberOfSheets
();
for
(
int
i
=
0
;
i
<
sheetCount
;
i
++)
{
Sheet
sheet
=
newWorkbook
.
getSheetAt
(
i
);
String
code
=
sheet
.
getSheetName
();
Optional
<
PeriodTemplate
>
periodTemplate
=
periodTemplateList
.
stream
().
filter
(
a
->
a
.
getCode
().
equals
(
code
)).
findFirst
();
Long
templateID
;
if
(
periodTemplate
.
isPresent
())
{
templateID
=
periodTemplate
.
get
().
getTemplateId
();
}
else
{
templateID
=
0L
;
}
if
(
templateID
>
0
)
{
//todo: get cell template and cell template config with templateID
Map
<
PeriodCellTemplate
,
PeriodCellTemplateConfig
>
cellTemplatePeriodCellTemplateConfigMap
=
new
HashMap
<>();
List
<
PeriodCellTemplate
>
tempPeriodCellTemplateList
=
periodCellTemplateList
.
stream
()
.
filter
(
a
->
a
.
getReportTemplateId
().
equals
(
templateID
))
.
collect
(
Collectors
.
toList
());
tempPeriodCellTemplateList
.
forEach
(
a
->
{
Optional
<
PeriodCellTemplateConfig
>
tempCellTemplateConfig
=
periodCellTemplateConfigList
.
stream
()
.
filter
(
item
->
item
.
getCellTemplateId
().
equals
(
a
.
getCellTemplateId
())
&&
item
.
getDataSourceType
().
equals
(
CellDataSourceType
.
Formula
.
getCode
()))
.
findFirst
();
if
(
tempCellTemplateConfig
!=
null
)
{
cellTemplatePeriodCellTemplateConfigMap
.
put
(
a
,
tempCellTemplateConfig
.
get
());
}
});
cellTemplatePeriodCellTemplateConfigMap
.
forEach
((
k
,
v
)
->
{
Row
row
=
sheet
.
getRow
(
k
.
getRowIndex
());
if
(
null
==
row
)
{
sheet
.
createRow
(
k
.
getRowIndex
());
}
Cell
cell
=
row
.
getCell
(
k
.
getColumnIndex
());
if
(
null
==
cell
)
{
row
.
createCell
(
k
.
getColumnIndex
());
}
cell
.
setCellFormula
(
v
.
getFormula
());
});
}
}
FormulaEvaluator
evaluator
=
newWorkbook
.
getCreationHelper
().
createFormulaEvaluator
();
evaluator
.
evaluateAll
();
//todo:loop all the cell which existing in the cellTemplateConfig, save the data to DB
for
(
int
i
=
0
;
i
<
sheetCount
;
i
++)
{
Sheet
sheet
=
newWorkbook
.
getSheetAt
(
i
);
String
code
=
sheet
.
getSheetName
();
Optional
<
PeriodTemplate
>
periodTemplate
=
periodTemplateList
.
stream
().
filter
(
a
->
a
.
getCode
().
equals
(
code
)).
findFirst
();
Long
templateID
;
if
(
periodTemplate
.
isPresent
())
{
templateID
=
periodTemplate
.
get
().
getTemplateId
();
}
else
{
templateID
=
0L
;
}
if
(
templateID
>
0
)
{
//todo: create report into DB
Report
report
=
new
Report
();
Long
reportID
=
distributedIDService
.
nextId
();
report
.
setId
(
reportID
);
report
.
setTemplateId
(
templateID
);
report
.
setPeriod
(
period
);
report
.
setProjectId
(
projectId
);
report
.
setCreateBy
(
"Admin"
);
report
.
setCreateTime
(
createTime
);
report
.
setUpdateBy
(
"Admin"
);
report
.
setUpdateTime
(
createTime
);
reportMapper
.
insertSelective
(
report
);
List
<
PeriodCellTemplateConfig
>
periodCellTemplateConfigs
=
periodCellTemplateConfigList
.
stream
().
filter
(
a
->
a
.
getReportTemplateId
().
equals
(
templateID
)).
collect
(
Collectors
.
toList
());
for
(
PeriodCellTemplateConfig
periodCellTemplateConfig
:
periodCellTemplateConfigs
)
{
Optional
<
PeriodCellTemplate
>
tempPeriodCellTemplate
=
periodCellTemplateList
.
stream
().
filter
(
a
->
a
.
getCellTemplateId
().
equals
(
periodCellTemplateConfig
.
getCellTemplateId
())).
findFirst
();
if
(
tempPeriodCellTemplate
!=
null
){
CellData
cellData
=
new
CellData
();
cellData
.
setId
(
distributedIDService
.
nextId
());
cellData
.
setReportId
(
reportID
);
cellData
.
setCellTemplateId
(
tempPeriodCellTemplate
.
get
().
getCellTemplateId
());
String
data
;
if
(
sheet
.
getRow
(
tempPeriodCellTemplate
.
get
().
getRowIndex
())!=
null
&&
sheet
.
getRow
(
tempPeriodCellTemplate
.
get
().
getRowIndex
()).
getCell
(
tempPeriodCellTemplate
.
get
().
getColumnIndex
())!=
null
){
data
=
sheet
.
getRow
(
tempPeriodCellTemplate
.
get
().
getRowIndex
()).
getCell
(
tempPeriodCellTemplate
.
get
().
getColumnIndex
()).
getStringCellValue
();
}
else
{
data
=
StringUtils
.
EMPTY
;
}
cellData
.
setData
(
data
);
cellData
.
setFormulaExp
(
StringUtils
.
EMPTY
);
cellData
.
setCreateBy
(
"Admin"
);
cellData
.
setCreateTime
(
createTime
);
cellData
.
setUpdateBy
(
"Admin"
);
cellData
.
setUpdateTime
(
createTime
);
cellDataMapper
.
insertSelective
(
cellData
);
}
}
}
}
}
else
{
return
"GenerateReport failed"
;
}
return
"generate report successful"
;
}
private
String
getTemplatePath
(
String
path
)
{
String
result
;
String
PREFIX_VALUE
=
"~"
;
if
(
path
.
startsWith
(
PREFIX_VALUE
))
{
result
=
path
.
substring
(
1
,
path
.
length
());
}
else
{
result
=
path
;
}
return
result
;
}
/**
* 根据传入的模板code和模板路径创建workbook
*
* @param templates 模板code和模板路径 键值对
* @return 工作簿workbook
*/
private
Optional
<
Workbook
>
createWorkBookWithExcelFileList
(
Map
<
String
,
String
>
templates
)
{
Workbook
workbook
=
new
XSSFWorkbook
();
try
{
String
filePath
=
this
.
getClass
().
getResource
(
""
).
toURI
().
getPath
();
String
tempPath
=
filePath
.
substring
(
0
,
filePath
.
indexOf
(
"classes"
)
+
"\\classes"
.
length
());
templates
.
forEach
((
code
,
path
)
->
{
File
file
=
new
File
(
tempPath
+
path
);
try
{
Workbook
tWorkbook
=
WorkbookFactory
.
create
(
file
);
POIUtil
.
cloneSheet
(
tWorkbook
.
getSheetAt
(
0
),
workbook
.
createSheet
(
code
));
}
catch
(
FileNotFoundException
e
)
{
e
.
printStackTrace
();
}
catch
(
InvalidFormatException
e
)
{
e
.
printStackTrace
();
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
}
});
return
Optional
.
of
(
workbook
);
}
catch
(
Exception
e
)
{
logger
.
error
(
"createWorkBookWithExcelFileList error."
,
e
);
}
return
Optional
.
empty
();
}
/**
* 注册所有的自定义方法到工作簿
*
* @param workbook 工作簿
*/
private
void
addFunctionsToWorkbook
(
Workbook
workbook
)
{
String
[]
functionNames
=
{
"functionName"
};
FreeRefFunction
[]
functionImpls
=
{};
UDFFinder
udfs
=
new
DefaultUDFFinder
(
functionNames
,
functionImpls
);
UDFFinder
udfToolpack
=
new
AggregatingUDFFinder
(
udfs
);
workbook
.
addToolPack
(
udfToolpack
);
}
}
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/ReportServiceImpl.java
View file @
b3ec20cc
...
...
@@ -10,8 +10,10 @@ import pwc.taxtech.atms.entitiy.*;
import
pwc.taxtech.atms.vat.entity.PeriodCellTemplate
;
import
pwc.taxtech.atms.vat.entity.PeriodCellTemplateConfig
;
import
pwc.taxtech.atms.vat.entity.PeriodTemplate
;
import
pwc.taxtech.atms.vat.entity.PeriodTemplateExample
;
import
pwc.taxtech.atms.vat.service.ReportService
;
import
javax.ws.rs.NotSupportedException
;
import
java.util.*
;
import
java.util.stream.Collectors
;
...
...
@@ -219,4 +221,50 @@ public class ReportServiceImpl extends VatAbstractService implements ReportServi
}
return
null
;
}
}
\ No newline at end of file
@Override
public
OperationResultDto
generateData
(
String
projectId
,
EnumServiceType
serviceType
,
Boolean
ifDeleteManualDataSource
,
Integer
periodParam
,
Integer
reportType
,
String
generator
)
{
OperationResultDto
operationResultDto
=
new
OperationResultDto
();
if
(
serviceType
.
equals
(
EnumServiceType
.
VAT
)
&&
(
periodParam
==
null
&&
periodParam
<=
0
))
{
operationResultDto
.
setResultMsg
(
"PeriodRequiredForVAT"
);
return
operationResultDto
;
}
if
(
serviceType
!=
EnumServiceType
.
VAT
)
{
// 暂不支持非CIT/VAT service批量后端生成报表
throw
new
NotSupportedException
();
}
int
period
=
periodParam
!=
null
?
periodParam
:
0
;
String
serviceTypeStr
=
serviceType
.
getCode
().
toString
();
ProjectServiceTypeExample
projectServiceTypeExample
=
new
ProjectServiceTypeExample
();
projectServiceTypeExample
.
createCriteria
().
andServiceTypeIDEqualTo
(
serviceTypeStr
).
andProjectIDEqualTo
(
projectId
);
Optional
<
Long
>
templateGroupID
=
projectServiceTypeMapper
.
selectByExample
(
projectServiceTypeExample
).
stream
().
map
(
ProjectServiceType:
:
getTemplateGroupID
).
findFirst
();
if
(
templateGroupID
==
null
)
{
operationResultDto
.
setResultMsg
(
"TemplateGroupNotExist"
);
return
operationResultDto
;
}
List
<
Long
>
templateIds
;
if
(
reportType
!=
null
)
{
PeriodTemplateExample
periodTemplateExample
=
new
PeriodTemplateExample
();
periodTemplateExample
.
createCriteria
().
andTemplateGroupIdEqualTo
(
templateGroupID
.
get
()).
andPeriodEqualTo
(
period
).
andIsActiveAssociationEqualTo
(
true
).
andReportTypeEqualTo
(
reportType
);
templateIds
=
periodTemplateMapper
.
selectByExample
(
periodTemplateExample
).
stream
().
map
(
PeriodTemplate:
:
getId
).
collect
(
Collectors
.
toList
());
}
else
{
PeriodTemplateExample
periodTemplateExample
=
new
PeriodTemplateExample
();
periodTemplateExample
.
createCriteria
().
andTemplateGroupIdEqualTo
(
templateGroupID
.
get
()).
andPeriodEqualTo
(
period
).
andIsActiveAssociationEqualTo
(
true
);
templateIds
=
periodTemplateMapper
.
selectByExample
(
periodTemplateExample
).
stream
().
map
(
PeriodTemplate:
:
getId
).
collect
(
Collectors
.
toList
());
}
String
rslt
=
reportGenerator
.
generateData
(
projectId
,
templateIds
,
ifDeleteManualDataSource
,
null
,
periodParam
,
generator
);
if
(
StringUtils
.
isBlank
(
rslt
))
{
operationResultDto
.
setResultMsg
(
"ReportGenerateFailed!"
);
return
operationResultDto
;
}
operationResultDto
.
setResult
(
true
);
return
operationResultDto
;
}
}
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/VatAbstractService.java
View file @
b3ec20cc
...
...
@@ -6,6 +6,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import
pwc.taxtech.atms.dao.*
;
import
pwc.taxtech.atms.service.impl.DistributedIDService
;
import
pwc.taxtech.atms.vat.dao.*
;
import
pwc.taxtech.atms.vat.service.ReportGenerator
;
public
class
VatAbstractService
{
protected
final
Logger
logger
=
LoggerFactory
.
getLogger
(
this
.
getClass
());
...
...
@@ -52,5 +53,7 @@ public class VatAbstractService {
CellTemplateConfigMapper
cellTemplateConfigMapper
;
@Autowired
EnterpriseAccountMapper
enterpriseAccountMapper
;
@Autowired
ReportGenerator
reportGenerator
;
}
atms-api/src/main/resources/pwc/taxtech/atms/vat/dao/CellDataMapper.xml
View file @
b3ec20cc
...
...
@@ -7,8 +7,8 @@
This element is automatically generated by MyBatis Generator, do not modify.
-->
<id
column=
"id"
jdbcType=
"BIGINT"
property=
"id"
/>
<result
column=
"report_id"
jdbcType=
"
VARCHAR
"
property=
"reportId"
/>
<result
column=
"cell_template_id"
jdbcType=
"
VARCHAR
"
property=
"cellTemplateId"
/>
<result
column=
"report_id"
jdbcType=
"
BIGINT
"
property=
"reportId"
/>
<result
column=
"cell_template_id"
jdbcType=
"
BIGINT
"
property=
"cellTemplateId"
/>
<result
column=
"data"
jdbcType=
"VARCHAR"
property=
"data"
/>
<result
column=
"formula_exp"
jdbcType=
"VARCHAR"
property=
"formulaExp"
/>
<result
column=
"create_by"
jdbcType=
"VARCHAR"
property=
"createBy"
/>
...
...
@@ -145,7 +145,7 @@
"data", formula_exp, create_by,
create_time, update_by, update_time
)
values (#{id,jdbcType=BIGINT}, #{reportId,jdbcType=
VARCHAR}, #{cellTemplateId,jdbcType=VARCHAR
},
values (#{id,jdbcType=BIGINT}, #{reportId,jdbcType=
BIGINT}, #{cellTemplateId,jdbcType=BIGINT
},
#{data,jdbcType=VARCHAR}, #{formulaExp,jdbcType=VARCHAR}, #{createBy,jdbcType=VARCHAR},
#{createTime,jdbcType=TIMESTAMP}, #{updateBy,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}
)
...
...
@@ -190,10 +190,10 @@
#{id,jdbcType=BIGINT},
</if>
<if
test=
"reportId != null"
>
#{reportId,jdbcType=
VARCHAR
},
#{reportId,jdbcType=
BIGINT
},
</if>
<if
test=
"cellTemplateId != null"
>
#{cellTemplateId,jdbcType=
VARCHAR
},
#{cellTemplateId,jdbcType=
BIGINT
},
</if>
<if
test=
"data != null"
>
#{data,jdbcType=VARCHAR},
...
...
@@ -236,10 +236,10 @@
id = #{record.id,jdbcType=BIGINT},
</if>
<if
test=
"record.reportId != null"
>
report_id = #{record.reportId,jdbcType=
VARCHAR
},
report_id = #{record.reportId,jdbcType=
BIGINT
},
</if>
<if
test=
"record.cellTemplateId != null"
>
cell_template_id = #{record.cellTemplateId,jdbcType=
VARCHAR
},
cell_template_id = #{record.cellTemplateId,jdbcType=
BIGINT
},
</if>
<if
test=
"record.data != null"
>
"data" = #{record.data,jdbcType=VARCHAR},
...
...
@@ -271,8 +271,8 @@
-->
update cell_data
set id = #{record.id,jdbcType=BIGINT},
report_id = #{record.reportId,jdbcType=
VARCHAR
},
cell_template_id = #{record.cellTemplateId,jdbcType=
VARCHAR
},
report_id = #{record.reportId,jdbcType=
BIGINT
},
cell_template_id = #{record.cellTemplateId,jdbcType=
BIGINT
},
"data" = #{record.data,jdbcType=VARCHAR},
formula_exp = #{record.formulaExp,jdbcType=VARCHAR},
create_by = #{record.createBy,jdbcType=VARCHAR},
...
...
@@ -291,10 +291,10 @@
update cell_data
<set>
<if
test=
"reportId != null"
>
report_id = #{reportId,jdbcType=
VARCHAR
},
report_id = #{reportId,jdbcType=
BIGINT
},
</if>
<if
test=
"cellTemplateId != null"
>
cell_template_id = #{cellTemplateId,jdbcType=
VARCHAR
},
cell_template_id = #{cellTemplateId,jdbcType=
BIGINT
},
</if>
<if
test=
"data != null"
>
"data" = #{data,jdbcType=VARCHAR},
...
...
@@ -323,8 +323,8 @@
This element is automatically generated by MyBatis Generator, do not modify.
-->
update cell_data
set report_id = #{reportId,jdbcType=
VARCHAR
},
cell_template_id = #{cellTemplateId,jdbcType=
VARCHAR
},
set report_id = #{reportId,jdbcType=
BIGINT
},
cell_template_id = #{cellTemplateId,jdbcType=
BIGINT
},
"data" = #{data,jdbcType=VARCHAR},
formula_exp = #{formulaExp,jdbcType=VARCHAR},
create_by = #{createBy,jdbcType=VARCHAR},
...
...
atms-api/src/main/resources/pwc/taxtech/atms/vat/dao/ReportMapper.xml
View file @
b3ec20cc
...
...
@@ -6,14 +6,14 @@
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<id
column=
"
ID"
jdbcType=
"VARCHAR"
property=
"ID
"
/>
<result
column=
"
TemplateID"
jdbcType=
"VARCHAR"
property=
"templateID
"
/>
<result
column=
"
P
eriod"
jdbcType=
"INTEGER"
property=
"period"
/>
<result
column=
"
ProjectID"
jdbcType=
"VARCHAR"
property=
"projectID
"
/>
<result
column=
"
Creator"
jdbcType=
"VARCHAR"
property=
"creator
"
/>
<result
column=
"
CreateT
ime"
jdbcType=
"TIMESTAMP"
property=
"createTime"
/>
<result
column=
"
Updater"
jdbcType=
"VARCHAR"
property=
"updater
"
/>
<result
column=
"
UpdateT
ime"
jdbcType=
"TIMESTAMP"
property=
"updateTime"
/>
<id
column=
"
id"
jdbcType=
"BIGINT"
property=
"id
"
/>
<result
column=
"
template_id"
jdbcType=
"BIGINT"
property=
"templateId
"
/>
<result
column=
"
p
eriod"
jdbcType=
"INTEGER"
property=
"period"
/>
<result
column=
"
project_id"
jdbcType=
"VARCHAR"
property=
"projectId
"
/>
<result
column=
"
create_by"
jdbcType=
"VARCHAR"
property=
"createBy
"
/>
<result
column=
"
create_t
ime"
jdbcType=
"TIMESTAMP"
property=
"createTime"
/>
<result
column=
"
update_by"
jdbcType=
"VARCHAR"
property=
"updateBy
"
/>
<result
column=
"
update_t
ime"
jdbcType=
"TIMESTAMP"
property=
"updateTime"
/>
</resultMap>
<sql
id=
"Example_Where_Clause"
>
<!--
...
...
@@ -86,7 +86,7 @@
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
ID, TemplateID, Period, ProjectID, Creator, CreateTime, Updater, UpdateT
ime
id, template_id, period, project_id, create_by, create_time, update_by, update_t
ime
</sql>
<select
id=
"selectByExample"
parameterType=
"pwc.taxtech.atms.vat.entity.ReportExample"
resultMap=
"BaseResultMap"
>
<!--
...
...
@@ -98,7 +98,7 @@
distinct
</if>
<include
refid=
"Base_Column_List"
/>
from
R
eport
from
r
eport
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
...
...
@@ -106,30 +106,30 @@
order by ${orderByClause}
</if>
</select>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.
Stri
ng"
resultMap=
"BaseResultMap"
>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.
Lo
ng"
resultMap=
"BaseResultMap"
>
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<include
refid=
"Base_Column_List"
/>
from
R
eport
where
ID = #{ID,jdbcType=VARCHAR
}
from
r
eport
where
id = #{id,jdbcType=BIGINT
}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.
Stri
ng"
>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.
Lo
ng"
>
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from
R
eport
where
ID = #{ID,jdbcType=VARCHAR
}
delete from
r
eport
where
id = #{id,jdbcType=BIGINT
}
</delete>
<delete
id=
"deleteByExample"
parameterType=
"pwc.taxtech.atms.vat.entity.ReportExample"
>
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from
R
eport
delete from
r
eport
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
...
...
@@ -139,66 +139,66 @@
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into
Report (ID, TemplateID, P
eriod,
ProjectID, Creator, CreateT
ime,
Updater, UpdateT
ime)
values (#{
ID,jdbcType=VARCHAR}, #{templateID,jdbcType=VARCHAR
}, #{period,jdbcType=INTEGER},
#{projectI
D,jdbcType=VARCHAR}, #{creator
,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
#{update
r
,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP})
insert into
report (id, template_id, p
eriod,
project_id, create_by, create_t
ime,
update_by, update_t
ime)
values (#{
id,jdbcType=BIGINT}, #{templateId,jdbcType=BIGINT
}, #{period,jdbcType=INTEGER},
#{projectI
d,jdbcType=VARCHAR}, #{createBy
,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
#{update
By
,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP})
</insert>
<insert
id=
"insertSelective"
parameterType=
"pwc.taxtech.atms.vat.entity.Report"
>
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into
R
eport
insert into
r
eport
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"
ID
!= null"
>
ID
,
<if
test=
"
id
!= null"
>
id
,
</if>
<if
test=
"templateI
D
!= null"
>
TemplateID
,
<if
test=
"templateI
d
!= null"
>
template_id
,
</if>
<if
test=
"period != null"
>
P
eriod,
p
eriod,
</if>
<if
test=
"projectI
D
!= null"
>
ProjectID
,
<if
test=
"projectI
d
!= null"
>
project_id
,
</if>
<if
test=
"creat
or
!= null"
>
Creator
,
<if
test=
"creat
eBy
!= null"
>
create_by
,
</if>
<if
test=
"createTime != null"
>
CreateT
ime,
create_t
ime,
</if>
<if
test=
"update
r
!= null"
>
Updater
,
<if
test=
"update
By
!= null"
>
update_by
,
</if>
<if
test=
"updateTime != null"
>
UpdateT
ime,
update_t
ime,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"
ID
!= null"
>
#{
ID,jdbcType=VARCHAR
},
<if
test=
"
id
!= null"
>
#{
id,jdbcType=BIGINT
},
</if>
<if
test=
"templateI
D
!= null"
>
#{templateI
D,jdbcType=VARCHAR
},
<if
test=
"templateI
d
!= null"
>
#{templateI
d,jdbcType=BIGINT
},
</if>
<if
test=
"period != null"
>
#{period,jdbcType=INTEGER},
</if>
<if
test=
"projectI
D
!= null"
>
#{projectI
D
,jdbcType=VARCHAR},
<if
test=
"projectI
d
!= null"
>
#{projectI
d
,jdbcType=VARCHAR},
</if>
<if
test=
"creat
or
!= null"
>
#{creat
or
,jdbcType=VARCHAR},
<if
test=
"creat
eBy
!= null"
>
#{creat
eBy
,jdbcType=VARCHAR},
</if>
<if
test=
"createTime != null"
>
#{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"update
r
!= null"
>
#{update
r
,jdbcType=VARCHAR},
<if
test=
"update
By
!= null"
>
#{update
By
,jdbcType=VARCHAR},
</if>
<if
test=
"updateTime != null"
>
#{updateTime,jdbcType=TIMESTAMP},
...
...
@@ -210,7 +210,7 @@
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select count(*) from
R
eport
select count(*) from
r
eport
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
...
...
@@ -220,31 +220,31 @@
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update
R
eport
update
r
eport
<set>
<if
test=
"record.
ID
!= null"
>
ID = #{record.ID,jdbcType=VARCHAR
},
<if
test=
"record.
id
!= null"
>
id = #{record.id,jdbcType=BIGINT
},
</if>
<if
test=
"record.templateI
D
!= null"
>
TemplateID = #{record.templateID,jdbcType=VARCHAR
},
<if
test=
"record.templateI
d
!= null"
>
template_id = #{record.templateId,jdbcType=BIGINT
},
</if>
<if
test=
"record.period != null"
>
P
eriod = #{record.period,jdbcType=INTEGER},
p
eriod = #{record.period,jdbcType=INTEGER},
</if>
<if
test=
"record.projectI
D
!= null"
>
ProjectID = #{record.projectID
,jdbcType=VARCHAR},
<if
test=
"record.projectI
d
!= null"
>
project_id = #{record.projectId
,jdbcType=VARCHAR},
</if>
<if
test=
"record.creat
or
!= null"
>
Creator = #{record.creator
,jdbcType=VARCHAR},
<if
test=
"record.creat
eBy
!= null"
>
create_by = #{record.createBy
,jdbcType=VARCHAR},
</if>
<if
test=
"record.createTime != null"
>
CreateT
ime = #{record.createTime,jdbcType=TIMESTAMP},
create_t
ime = #{record.createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"record.update
r
!= null"
>
Updater = #{record.updater
,jdbcType=VARCHAR},
<if
test=
"record.update
By
!= null"
>
update_by = #{record.updateBy
,jdbcType=VARCHAR},
</if>
<if
test=
"record.updateTime != null"
>
UpdateT
ime = #{record.updateTime,jdbcType=TIMESTAMP},
update_t
ime = #{record.updateTime,jdbcType=TIMESTAMP},
</if>
</set>
<if
test=
"_parameter != null"
>
...
...
@@ -256,15 +256,15 @@
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update
R
eport
set
ID = #{record.ID,jdbcType=VARCHAR
},
TemplateID = #{record.templateID,jdbcType=VARCHAR
},
P
eriod = #{record.period,jdbcType=INTEGER},
ProjectID = #{record.projectID
,jdbcType=VARCHAR},
Creator = #{record.creator
,jdbcType=VARCHAR},
CreateT
ime = #{record.createTime,jdbcType=TIMESTAMP},
Updater = #{record.updater
,jdbcType=VARCHAR},
UpdateT
ime = #{record.updateTime,jdbcType=TIMESTAMP}
update
r
eport
set
id = #{record.id,jdbcType=BIGINT
},
template_id = #{record.templateId,jdbcType=BIGINT
},
p
eriod = #{record.period,jdbcType=INTEGER},
project_id = #{record.projectId
,jdbcType=VARCHAR},
create_by = #{record.createBy
,jdbcType=VARCHAR},
create_t
ime = #{record.createTime,jdbcType=TIMESTAMP},
update_by = #{record.updateBy
,jdbcType=VARCHAR},
update_t
ime = #{record.updateTime,jdbcType=TIMESTAMP}
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
...
...
@@ -274,46 +274,46 @@
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update
R
eport
update
r
eport
<set>
<if
test=
"templateI
D
!= null"
>
TemplateID = #{templateID,jdbcType=VARCHAR
},
<if
test=
"templateI
d
!= null"
>
template_id = #{templateId,jdbcType=BIGINT
},
</if>
<if
test=
"period != null"
>
P
eriod = #{period,jdbcType=INTEGER},
p
eriod = #{period,jdbcType=INTEGER},
</if>
<if
test=
"projectI
D
!= null"
>
ProjectID = #{projectID
,jdbcType=VARCHAR},
<if
test=
"projectI
d
!= null"
>
project_id = #{projectId
,jdbcType=VARCHAR},
</if>
<if
test=
"creat
or
!= null"
>
Creator = #{creator
,jdbcType=VARCHAR},
<if
test=
"creat
eBy
!= null"
>
create_by = #{createBy
,jdbcType=VARCHAR},
</if>
<if
test=
"createTime != null"
>
CreateT
ime = #{createTime,jdbcType=TIMESTAMP},
create_t
ime = #{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"update
r
!= null"
>
Updater = #{updater
,jdbcType=VARCHAR},
<if
test=
"update
By
!= null"
>
update_by = #{updateBy
,jdbcType=VARCHAR},
</if>
<if
test=
"updateTime != null"
>
UpdateT
ime = #{updateTime,jdbcType=TIMESTAMP},
update_t
ime = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where
ID = #{ID,jdbcType=VARCHAR
}
where
id = #{id,jdbcType=BIGINT
}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"pwc.taxtech.atms.vat.entity.Report"
>
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update
R
eport
set
TemplateID = #{templateID,jdbcType=VARCHAR
},
P
eriod = #{period,jdbcType=INTEGER},
ProjectID = #{projectID
,jdbcType=VARCHAR},
Creator = #{creator
,jdbcType=VARCHAR},
CreateT
ime = #{createTime,jdbcType=TIMESTAMP},
Updater = #{updater
,jdbcType=VARCHAR},
UpdateT
ime = #{updateTime,jdbcType=TIMESTAMP}
where
ID = #{ID,jdbcType=VARCHAR
}
update
r
eport
set
template_id = #{templateId,jdbcType=BIGINT
},
p
eriod = #{period,jdbcType=INTEGER},
project_id = #{projectId
,jdbcType=VARCHAR},
create_by = #{createBy
,jdbcType=VARCHAR},
create_t
ime = #{createTime,jdbcType=TIMESTAMP},
update_by = #{updateBy
,jdbcType=VARCHAR},
update_t
ime = #{updateTime,jdbcType=TIMESTAMP}
where
id = #{id,jdbcType=BIGINT
}
</update>
<select
id=
"selectByExampleWithRowbounds"
parameterType=
"pwc.taxtech.atms.vat.entity.ReportExample"
resultMap=
"BaseResultMap"
>
<!--
...
...
@@ -325,7 +325,7 @@
distinct
</if>
<include
refid=
"Base_Column_List"
/>
from
R
eport
from
r
eport
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
...
...
atms-api/src/test/java/pwc/taxtech/atms/common/POITest.java
View file @
b3ec20cc
package
pwc
.
taxtech
.
atms
.
common
;
import
org.apache.poi.openxml4j.exceptions.InvalidFormatException
;
import
org.apache.poi.ss.formula.eval.ValueEval
;
import
org.apache.poi.ss.formula.functions.FreeRefFunction
;
import
org.apache.poi.ss.formula.udf.AggregatingUDFFinder
;
import
org.apache.poi.ss.formula.udf.DefaultUDFFinder
;
import
org.apache.poi.ss.formula.udf.UDFFinder
;
import
org.apache.poi.ss.usermodel.*
;
import
org.apache.poi.ss.util.CellReference
;
import
java.io.*
;
...
...
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