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
d49d35b7
Commit
d49d35b7
authored
Aug 02, 2018
by
frank.xa.zhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed the formula project context and remove some unused data in DB
need add the bspl report in the system
parent
19fc07f0
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
39 additions
and
22 deletions
+39
-22
Constant.java
...api/src/main/java/pwc/taxtech/atms/constant/Constant.java
+6
-4
ReportServiceImpl.java
.../pwc/taxtech/atms/vat/service/impl/ReportServiceImpl.java
+2
-0
ProjectContext.java
...tms/vat/service/impl/report/functions/ProjectContext.java
+3
-2
IndustryMapper.xml
...rc/main/resources/pwc/taxtech/atms/dao/IndustryMapper.xml
+8
-10
PeriodCellTemplateConfigMapper.xml
...c/taxtech/atms/vat/dao/PeriodCellTemplateConfigMapper.xml
+4
-2
DataMigration.java
atms-api/src/test/java/pwc/taxtech/atms/DataMigration.java
+16
-4
No files found.
atms-api/src/main/java/pwc/taxtech/atms/constant/Constant.java
View file @
d49d35b7
...
...
@@ -43,7 +43,7 @@ public final class Constant {
public
static
final
String
IMAGE_FORMART_
=
"png"
;
public
static
final
String
EMPTY
=
""
;
public
static
final
String
DateTimeFormate
=
"
{0}年{1}
月"
;
public
static
final
String
DateTimeFormate
=
"
%d年%d
月"
;
public
static
class
DataSourceName
{
public
static
final
String
KeyValueDataSource
=
"KeyValueDataSource"
;
...
...
@@ -73,8 +73,9 @@ public final class Constant {
}
public
static
class
ReportBuildInStringFormat
{
public
static
final
String
TimeInterval
=
"税款所属时间: 自{0}年{1}月{2}日至{0}年{1}月{3}日"
;
public
static
final
String
FillForm
=
"填表日期: {0}年{1}月{2}日"
;
public
static
final
String
TaxPayer
=
"纳税人名称: {0}"
;
public
static
final
String
TimeInterval
=
"税款所属时间: 自%d年%d月%d日至%d年%d月%d日"
;
public
static
final
String
FillForm
=
"填表日期: %d年%d月%d日"
;
public
static
final
String
FillFormStr
=
"填表日期: %s年%s月%s日"
;
public
static
final
String
TaxPayer
=
"纳税人名称: %s"
;
}
}
\ No newline at end of file
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/ReportServiceImpl.java
View file @
d49d35b7
...
...
@@ -211,6 +211,8 @@ public class ReportServiceImpl extends VatAbstractService implements ReportServi
// periodCellTemplateConfig.setValidationDescription(cellTemplateConfig.getValidationDescription());
// periodCellTemplateConfig.setVoucherKeyword(cellTemplateConfig.getVoucherKeyword());
periodCellTemplateConfig
.
setCellTemplateConfigId
(
cellTemplateConfig
.
getId
());
periodCellTemplateConfig
.
setKeyValueParsedFormula
(
StringUtils
.
EMPTY
);
if
(
cellTemplateConfig
.
getFormula
().
startsWith
(
"@"
))
{
//todo: get the keyvalue from table add to keyvalue parsed formula
KeyValueConfigExample
keyValueConfigExample
=
new
KeyValueConfigExample
();
...
...
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/report/functions/ProjectContext.java
View file @
d49d35b7
...
...
@@ -58,14 +58,15 @@ public class ProjectContext extends FunctionBase implements FreeRefFunction {
calendar
.
setTime
(
beginOfPeriod
);
calendar2
.
setTime
(
endOfPeriod
);
return
new
StringEval
(
String
.
format
(
Constant
.
ReportBuildInStringFormat
.
TimeInterval
,
formulaContext
.
getYear
()
,
formulaContext
.
getPeriod
(),
calendar
.
get
(
Calendar
.
DAY_OF_MONTH
),
calendar2
.
get
(
Calendar
.
DAY_OF_MONTH
)));
,
formulaContext
.
getPeriod
(),
calendar
.
get
(
Calendar
.
DAY_OF_MONTH
),
formulaContext
.
getYear
()
,
formulaContext
.
getPeriod
(),
calendar2
.
get
(
Calendar
.
DAY_OF_MONTH
)));
case
"FillForm"
:
Report
report
=
SpringContextUtil
.
reportMapper
.
selectByPrimaryKey
(
formulaContext
.
getReportID
());
if
(
report
!=
null
)
{
return
new
StringEval
(
String
.
format
(
Constant
.
ReportBuildInStringFormat
.
FillForm
,
report
.
getUpdateTime
().
getYear
()
,
report
.
getUpdateTime
().
getMonth
(),
report
.
getUpdateTime
().
getDay
()));
}
else
{
return
new
StringEval
(
String
.
format
(
Constant
.
ReportBuildInStringFormat
.
FillForm
,
"
"
,
" "
,
" "
));
return
new
StringEval
(
String
.
format
(
Constant
.
ReportBuildInStringFormat
.
FillForm
Str
,
"
"
,
" "
,
" "
));
}
case
"TaxPayerNo"
:
String
taxPayerNo
=
SpringContextUtil
.
organizationMapper
.
selectByPrimaryKey
(
formulaContext
.
getOrganizationID
()).
getTaxPayerNumber
();
...
...
atms-api/src/main/resources/pwc/taxtech/atms/dao/IndustryMapper.xml
View file @
d49d35b7
...
...
@@ -282,28 +282,26 @@
AND Name IN ('通用行业' ,'房地产业', '资产管理', '银行及其他金融服务业')
</select>
<resultMap
id=
"TemplateGroup"
type=
"pwc.taxtech.atms.entitiy.Template"
>
<resultMap
id=
"TemplateGroup"
type=
"pwc.taxtech.atms.entitiy.Template
Group
"
>
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<id
column=
"id"
jdbcType=
"BIGINT"
property=
"id"
/>
<result
column=
"name"
jdbcType=
"VARCHAR"
property=
"name"
/>
<result
column=
"code"
jdbcType=
"VARCHAR"
property=
"code"
/>
<result
column=
"path"
jdbcType=
"VARCHAR"
property=
"path"
/>
<result
column=
"report_type"
jdbcType=
"INTEGER"
property=
"reportType"
/>
<result
column=
"template_group_id"
jdbcType=
"BIGINT"
property=
"templateGroupId"
/>
<result
column=
"order_index"
jdbcType=
"INTEGER"
property=
"orderIndex"
/>
<result
column=
"create_time"
jdbcType=
"TIMESTAMP"
property=
"createTime"
/>
<result
column=
"service_type_id"
jdbcType=
"VARCHAR"
property=
"serviceTypeId"
/>
<result
column=
"industry_ids"
jdbcType=
"VARCHAR"
property=
"industryIds"
/>
<result
column=
"pay_tax_type"
jdbcType=
"INTEGER"
property=
"payTaxType"
/>
<result
column=
"group_type"
jdbcType=
"INTEGER"
property=
"groupType"
/>
<result
column=
"copy_from"
jdbcType=
"BIGINT"
property=
"copyFrom"
/>
<result
column=
"update_time"
jdbcType=
"TIMESTAMP"
property=
"updateTime"
/>
<result
column=
"create_time"
jdbcType=
"TIMESTAMP"
property=
"createTime"
/>
<result
column=
"is_system_type"
jdbcType=
"INTEGER"
property=
"isSystemType"
/>
<result
column=
"is_active_association"
jdbcType=
"INTEGER"
property=
"isActiveAssociation"
/>
<result
column=
"parent_id"
jdbcType=
"VARCHAR"
property=
"parentId"
/>
<result
column=
"create_by"
jdbcType=
"VARCHAR"
property=
"createBy"
/>
<result
column=
"update_by"
jdbcType=
"VARCHAR"
property=
"updateBy"
/>
</resultMap>
<select
id=
"getTemplateGroup"
resultMap=
"TemplateGroup"
>
SELECT *
SELECT
b.
*
FROM Industry a
JOIN template_group b
ON a.ID = b.industry_ids
...
...
atms-api/src/main/resources/pwc/taxtech/atms/vat/dao/PeriodCellTemplateConfigMapper.xml
View file @
d49d35b7
...
...
@@ -631,7 +631,8 @@
parsed_validation,
validation_description,
voucher_keyword,
cell_template_config_id
cell_template_config_id,
key_value_parsed_formula
)
VALUES
<foreach
collection=
"list"
item=
"item"
separator=
","
>
...
...
@@ -658,7 +659,8 @@
,#{item.parsedValidation,jdbcType=VARCHAR}
,#{item.validationDescription,jdbcType=VARCHAR}
,#{item.voucherKeyword,jdbcType=VARCHAR}
,#{item.cellTemplateConfigId,jdbcType=INTEGER})
,#{item.cellTemplateConfigId,jdbcType=INTEGER}
,#{item.keyValueParsedFormula,jdbcType=VARCHAR})
</foreach>
</insert>
<resultMap
extends=
"BaseResultMap"
id=
"periodCellTemplateConfigExtendDtoMap"
type=
"pwc.taxtech.atms.dto.vatdto.PeriodCellTemplateConfigExtendDto"
>
...
...
atms-api/src/test/java/pwc/taxtech/atms/DataMigration.java
View file @
d49d35b7
...
...
@@ -32,10 +32,19 @@ public class DataMigration extends CommonIT {
private
List
<
Map
<
String
,
Object
>>
cellTemplate20180622List
;
//1. 这个是原本的id
String
templateGroupId
=
"'
FA37FBE3-31D0-4A5C-9356-CF66FE8CE76D
'"
;
String
templateGroupId
=
"'
3916DCBA-B8B5-4C99-BF65-FF85F6A5FBE7
'"
;
//2.这个是新的templategroupid
Long
templateGroupIdLong
=
15081298737631232L
;
Long
templateGroupIdLong
=
16207462143234048L
;
@Test
public
void
doMigration
(){
doMigrationTemplateGroup
();
doMigrationTemplate
();
doMigrationCellTemplate
();
doMigrationCellTemplateConfig
();
}
@Test
public
void
doMigrationTemplateGroup
()
{
...
...
@@ -46,7 +55,8 @@ public class DataMigration extends CommonIT {
TemplateGroup
templateGroup
;
for
(
Map
<
String
,
Object
>
item
:
queryForList
)
{
templateGroup
=
new
TemplateGroup
();
templateGroup
.
setId
(
distributedIDService
.
nextId
());
this
.
templateGroupIdLong
=
distributedIDService
.
nextId
();
templateGroup
.
setId
(
this
.
templateGroupIdLong
);
templateGroup
.
setName
((
MapUtils
.
getString
(
item
,
"Name"
)));
templateGroup
.
setServiceTypeId
((
MapUtils
.
getString
(
item
,
"ServiceTypeID"
)));
templateGroup
.
setIndustryIds
((
MapUtils
.
getString
(
item
,
"IndustryIDs"
)));
...
...
@@ -194,7 +204,9 @@ public class DataMigration extends CommonIT {
// .findFirst().get();
Template
template
=
templates
.
stream
()
.
filter
(
a
->
a
.
getName
().
equals
(
name
)
&&
a
.
getCode
().
equals
(
code
)
&&
a
.
getCreateTime
().
equals
(
DateUtils
.
strToDateLong
(
createTime
))
&&
a
.
getTemplateGroupId
().
equals
(
templateGroupIdLong
))
.
filter
(
a
->
a
.
getName
().
equals
(
name
)
&&
a
.
getCode
().
equals
(
code
)
&&
a
.
getCreateTime
().
equals
(
DateUtils
.
strToDateLong
(
createTime
))
&&
a
.
getTemplateGroupId
().
equals
(
templateGroupIdLong
))
.
findFirst
().
get
();
//sql = "SELECT id from template a WHERE create_time='" + createTime + "' AND `name`='" + name + "' AND code='" + code + "'";
//System.out.println(sql);
...
...
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