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
1754b7d2
Commit
1754b7d2
authored
Oct 02, 2018
by
neo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[dev] batchinsert in report service update config
parent
e48c3334
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
204 additions
and
139 deletions
+204
-139
PeriodCellTemplateConfigExtendsMapper.xml
...vat/dao/extends/PeriodCellTemplateConfigExtendsMapper.xml
+32
-58
PeriodCellTemplateExtendsMapper.xml
.../atms/vat/dao/extends/PeriodCellTemplateExtendsMapper.xml
+88
-40
PeriodTemplateExtendsMapper.xml
...tech/atms/vat/dao/extends/PeriodTemplateExtendsMapper.xml
+84
-41
No files found.
atms-dao/src/main/resources/pwc/taxtech/atms/vat/dao/extends/PeriodCellTemplateConfigExtendsMapper.xml
View file @
1754b7d2
...
@@ -2,65 +2,39 @@
...
@@ -2,65 +2,39 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"pwc.taxtech.atms.vat.dao.PeriodCellTemplateConfigMapper"
>
<mapper
namespace=
"pwc.taxtech.atms.vat.dao.PeriodCellTemplateConfigMapper"
>
<insert
id=
"batchInsert"
>
<insert
id=
"batchInsert"
parameterType=
"pwc.taxtech.atms.vat.entity.PeriodCellTemplateConfig"
>
INSERT INTO
INSERT ALL
PERIOD_CELL_TEMPLATE_CONFIG (
<foreach
collection=
"list"
item=
"item"
>
ID,
INTO PERIOD_CELL_TEMPLATE_CONFIG VALUES
PERIOD,
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
CELL_TEMPLATE_ID,
<choose><when
test=
"item.id != null"
>
#{item.id,jdbcType=INTEGER},
</when><otherwise>
0,
</otherwise></choose>
REPORT_TEMPLATE_ID,
<choose><when
test=
"item.period != null"
>
#{item.period,jdbcType=INTEGER},
</when><otherwise>
0,
</otherwise></choose>
DATA_SOURCE_TYPE,
<choose><when
test=
"item.cellTemplateId != null"
>
#{item.cellTemplateId,jdbcType=INTEGER},
</when><otherwise>
0,
</otherwise></choose>
FORMULA,
<choose><when
test=
"item.reportTemplateId != null"
>
#{item.reportTemplateId,jdbcType=INTEGER},
</when><otherwise>
0,
</otherwise></choose>
PARSED_FORMULA,
<choose><when
test=
"item.dataSourceType != null"
>
#{item.dataSourceType,jdbcType=INTEGER},
</when><otherwise>
0,
</otherwise></choose>
FORMULA_DESCRIPTION,
<choose><when
test=
"item.formula != null"
>
#{item.formula,jdbcType=VARCHAR},
</when><otherwise>
'',
</otherwise></choose>
ACCOUNT_CODES,
<choose><when
test=
"item.parsedFormula != null"
>
#{item.parsedFormula,jdbcType=VARCHAR},
</when><otherwise>
'',
</otherwise></choose>
INVOICE_TYPE,
<choose><when
test=
"item.formulaDescription != null"
>
#{item.formulaDescription,jdbcType=VARCHAR},
</when><otherwise>
'',
</otherwise></choose>
TAX_RATE,
<choose><when
test=
"item.accountCodes != null"
>
#{item.accountCodes,jdbcType=VARCHAR},
</when><otherwise>
'',
</otherwise></choose>
INVOICE_AMOUNT_TYPE,
<choose><when
test=
"item.invoiceType != null"
>
#{item.invoiceType,jdbcType=INTEGER},
</when><otherwise>
0,
</otherwise></choose>
MODEL_IDS,
<choose><when
test=
"item.taxRate != null"
>
#{item.taxRate,jdbcType=VARCHAR},
</when><otherwise>
'',
</otherwise></choose>
CREATE_BY,
<choose><when
test=
"item.invoiceAmountType != null"
>
#{item.invoiceAmountType,jdbcType=INTEGER},
</when><otherwise>
0,
</otherwise></choose>
CREATE_TIME,
<choose><when
test=
"item.modelIds != null"
>
#{item.modelIds,jdbcType=VARCHAR},
</when><otherwise>
'',
</otherwise></choose>
UPDATE_BY,
<choose><when
test=
"item.createBy != null"
>
#{item.createBy,jdbcType=VARCHAR},
</when><otherwise>
'',
</otherwise></choose>
UPDATE_TIME,
<choose><when
test=
"item.createTime != null"
>
#{item.createTime,jdbcType=TIMESTAMP},
</when><otherwise>
'1970-01-01 08:00:00',
</otherwise></choose>
INVOICE_CATEGORY,
<choose><when
test=
"item.updateBy != null"
>
#{item.updateBy,jdbcType=VARCHAR},
</when><otherwise>
'',
</otherwise></choose>
FORMULA_DATA_SOURCE,
<choose><when
test=
"item.updateTime != null"
>
#{item.updateTime,jdbcType=TIMESTAMP},
</when><otherwise>
'1970-01-01 08:00:00',
</otherwise></choose>
VALIDATION,
<choose><when
test=
"item.invoiceCategory != null"
>
#{item.invoiceCategory,jdbcType=VARCHAR},
</when><otherwise>
'',
</otherwise></choose>
PARSED_VALIDATION,
<choose><when
test=
"item.formulaDataSource != null"
>
#{item.formulaDataSource,jdbcType=VARCHAR},
</when><otherwise>
'',
</otherwise></choose>
VALIDATION_DESCRIPTION,
<choose><when
test=
"item.validation != null"
>
#{item.validation,jdbcType=VARCHAR},
</when><otherwise>
'',
</otherwise></choose>
VOUCHER_KEYWORD,
<choose><when
test=
"item.parsedValidation != null"
>
#{item.parsedValidation,jdbcType=VARCHAR},
</when><otherwise>
'',
</otherwise></choose>
CELL_TEMPLATE_CONFIG_ID,
<choose><when
test=
"item.validationDescription != null"
>
#{item.validationDescription,jdbcType=VARCHAR},
</when><otherwise>
'',
</otherwise></choose>
KEY_VALUE_PARSED_FORMULA
<choose><when
test=
"item.voucherKeyword != null"
>
#{item.voucherKeyword,jdbcType=VARCHAR},
</when><otherwise>
'',
</otherwise></choose>
)
<choose><when
test=
"item.cellTemplateConfigId != null"
>
#{item.cellTemplateConfigId,jdbcType=INTEGER},
</when><otherwise>
'',
</otherwise></choose>
VALUES
<choose><when
test=
"item.keyValueParsedFormula != null"
>
#{item.keyValueParsedFormula,jdbcType=VARCHAR}
</when><otherwise>
'',
</otherwise></choose>
<foreach
collection=
"list"
item=
"item"
separator=
","
>
</trim>
(
#{item.id,jdbcType=INTEGER},
#{item.period,jdbcType=INTEGER},
#{item.cellTemplateId,jdbcType=INTEGER},
#{item.reportTemplateId,jdbcType=INTEGER},
#{item.dataSourceType,jdbcType=INTEGER},
#{item.formula,jdbcType=VARCHAR},
#{item.parsedFormula,jdbcType=VARCHAR},
#{item.formulaDescription,jdbcType=VARCHAR},
#{item.accountCodes,jdbcType=VARCHAR},
#{item.invoiceType,jdbcType=INTEGER},
#{item.taxRate,jdbcType=VARCHAR},
#{item.invoiceAmountType,jdbcType=INTEGER},
#{item.modelIds,jdbcType=VARCHAR},
#{item.createBy,jdbcType=VARCHAR},
#{item.createTime,jdbcType=TIMESTAMP},
#{item.updateBy,jdbcType=VARCHAR},
#{item.updateTime,jdbcType=TIMESTAMP},
#{item.invoiceCategory,jdbcType=VARCHAR},
#{item.formulaDataSource,jdbcType=VARCHAR},
#{item.validation,jdbcType=VARCHAR},
#{item.parsedValidation,jdbcType=VARCHAR},
#{item.validationDescription,jdbcType=VARCHAR},
#{item.voucherKeyword,jdbcType=VARCHAR},
#{item.cellTemplateConfigId,jdbcType=INTEGER},
#{item.keyValueParsedFormula,jdbcType=VARCHAR}
)
</foreach>
</foreach>
SELECT 1 FROM DUAL
</insert>
</insert>
<resultMap
extends=
"BaseResultMap"
id=
"periodCellTemplateConfigExtendDtoMap"
type=
"pwc.taxtech.atms.vat.dpo.PeriodCellTemplateConfigExtendDto"
>
<resultMap
extends=
"BaseResultMap"
id=
"periodCellTemplateConfigExtendDtoMap"
type=
"pwc.taxtech.atms.vat.dpo.PeriodCellTemplateConfigExtendDto"
>
...
...
atms-dao/src/main/resources/pwc/taxtech/atms/vat/dao/extends/PeriodCellTemplateExtendsMapper.xml
View file @
1754b7d2
...
@@ -2,47 +2,95 @@
...
@@ -2,47 +2,95 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"pwc.taxtech.atms.vat.dao.PeriodCellTemplateMapper"
>
<mapper
namespace=
"pwc.taxtech.atms.vat.dao.PeriodCellTemplateMapper"
>
<insert
id=
"batchInsert"
>
<insert
id=
"batchInsert"
parameterType=
"pwc.taxtech.atms.vat.entity.PeriodCellTemplate"
>
INSERT INTO
INSERT ALL
PERIOD_CELL_TEMPLATE (
<foreach
collection=
"list"
item=
"item"
>
ID,
INTO PERIOD_CELL_TEMPLATE (
PERIOD,
ID,
REPORT_TEMPLATE_ID,
PERIOD,
ROW_INDEX,
REPORT_TEMPLATE_ID,
ROW_NAME,
ROW_INDEX,
COLUMN_INDEX,
ROW_NAME,
`COLUMN_NAME`,
COLUMN_INDEX,
`COMMENT`,
`COLUMN_NAME`,
CREATE_TIME,
`COMMENT`,
UPDATE_TIME,
CREATE_TIME,
CELL_TEMPLATE_ID,
UPDATE_TIME,
DATA_TYPE,
CELL_TEMPLATE_ID,
IS_READ_ONLY,
DATA_TYPE,
COPY_FROM_ID,
IS_READ_ONLY,
CREATE_BY,
COPY_FROM_ID,
UPDATE_BY
CREATE_BY,
)
UPDATE_BY
VALUES
) VALUES
<foreach
collection=
"list"
item=
"item"
separator=
","
>
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
(
<choose>
#{item.id,jdbcType=INTEGER},
<when
test=
"item.id != null"
>
#{item.id,jdbcType=INTEGER},
</when>
#{item.period,jdbcType=INTEGER},
<otherwise>
0,
</otherwise>
#{item.reportTemplateId,jdbcType=INTEGER},
</choose>
#{item.rowIndex,jdbcType=INTEGER},
<choose>
#{item.rowName,jdbcType=VARCHAR},
<when
test=
"item.period != null"
>
#{item.period,jdbcType=INTEGER},
</when>
#{item.columnIndex,jdbcType=INTEGER},
<otherwise>
0,
</otherwise>
#{item.columnName,jdbcType=VARCHAR},
</choose>
#{item.comment,jdbcType=VARCHAR},
<choose>
#{item.createTime,jdbcType=TIMESTAMP},
<when
test=
"item.reportTemplateId != null"
>
#{item.reportTemplateId,jdbcType=INTEGER},
</when>
#{item.updateTime,jdbcType=TIMESTAMP},
<otherwise>
0,
</otherwise>
#{item.cellTemplateId,jdbcType=INTEGER},
</choose>
#{item.dataType,jdbcType=INTEGER},
<choose>
#{item.isReadOnly,jdbcType=INTEGER},
<when
test=
"item.rowIndex != null"
>
#{item.rowIndex,jdbcType=INTEGER},
</when>
#{item.copyFromId,jdbcType=INTEGER},
<otherwise>
0,
</otherwise>
#{item.createBy,jdbcType=VARCHAR},
</choose>
#{item.updateBy,jdbcType=VARCHAR}
<choose>
)
<when
test=
"item.rowName != null"
>
#{item.rowName,jdbcType=VARCHAR},
</when>
<otherwise>
'',
</otherwise>
</choose>
<choose>
<when
test=
"item.columnIndex != null"
>
#{item.columnIndex,jdbcType=INTEGER},
</when>
<otherwise>
0,
</otherwise>
</choose>
<choose>
<when
test=
"item.columnName != null"
>
#{item.columnName,jdbcType=VARCHAR},
</when>
<otherwise>
'',
</otherwise>
</choose>
<choose>
<when
test=
"item.comment != null"
>
#{item.comment,jdbcType=VARCHAR},
</when>
<otherwise>
'',
</otherwise>
</choose>
<choose>
<when
test=
"item.createTime != null"
>
#{item.createTime,jdbcType=TIMESTAMP},
</when>
<otherwise>
'1970-01-01 08:00:00',
</otherwise>
</choose>
<choose>
<when
test=
"item.updateTime != null"
>
#{item.updateTime,jdbcType=TIMESTAMP},
</when>
<otherwise>
'1970-01-01 08:00:00',
</otherwise>
</choose>
<choose>
<when
test=
"item.cellTemplateId != null"
>
#{item.cellTemplateId,jdbcType=INTEGER},
</when>
<otherwise>
0,
</otherwise>
</choose>
<choose>
<when
test=
"item.dataType != null"
>
#{item.dataType,jdbcType=INTEGER},
</when>
<otherwise>
'',
</otherwise>
</choose>
<choose>
<when
test=
"item.isReadOnly != null"
>
#{item.isReadOnly,jdbcType=INTEGER},
</when>
<otherwise>
0,
</otherwise>
</choose>
<choose>
<when
test=
"item.copyFromId != null"
>
#{item.copyFromId,jdbcType=INTEGER},
</when>
<otherwise>
0,
</otherwise>
</choose>
<choose>
<when
test=
"item.createBy != null"
>
#{item.createBy,jdbcType=VARCHAR},
</when>
<otherwise>
'',
</otherwise>
</choose>
<choose>
<when
test=
"item.updateBy != null"
>
#{item.updateBy,jdbcType=VARCHAR}
</when>
<otherwise>
'',
</otherwise>
</choose>
</trim>
</foreach>
</foreach>
SELECT 1 FROM DUAL
</insert>
</insert>
<select
id=
"getCellTemplateIdWithMap"
resultType=
"java.lang.Long"
>
<select
id=
"getCellTemplateIdWithMap"
resultType=
"java.lang.Long"
>
...
...
atms-dao/src/main/resources/pwc/taxtech/atms/vat/dao/extends/PeriodTemplateExtendsMapper.xml
View file @
1754b7d2
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"pwc.taxtech.atms.vat.dao.PeriodTemplateMapper"
>
<mapper
namespace=
"pwc.taxtech.atms.vat.dao.PeriodTemplateMapper"
>
<insert
id=
"batchInsert"
parameterType=
"pwc.taxtech.atms.vat.entity.PeriodTemplate"
>
<insert
id=
"batchInsert"
>
INSERT ALL
INSERT INTO
<foreach
collection=
"list"
item=
"item"
>
PERIOD_TEMPLATE (
INTO PERIOD_TEMPLATE (
ID,
ID,
PERIOD,
PERIOD,
`NAME`,
`NAME`,
`CODE`,
`CODE`,
PATH,
PATH,
REPORT_TYPE,
REPORT_TYPE,
TEMPLATE_GROUP_ID,
TEMPLATE_GROUP_ID,
ORDER_INDEX,
ORDER_INDEX,
CREATE_TIME,
CREATE_TIME,
UPDATE_TIME,
UPDATE_TIME,
IS_SYSTEM_TYPE,
IS_SYSTEM_TYPE,
IS_ACTIVE_ASSOCIATION,
IS_ACTIVE_ASSOCIATION,
PARENT_ID,
PARENT_ID,
TEMPLATE_ID,
TEMPLATE_ID,
CREATE_BY,
CREATE_BY,
UPDATE_BY
UPDATE_BY
)
) VALUES
VALUES
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<foreach
collection=
"list"
item=
"item"
separator=
","
>
<choose>
(
<when
test=
"item.id != null"
>
#{item.id,jdbcType=INTEGER},
</when>
#{item.id,jdbcType=INTEGER},
<otherwise>
0,
</otherwise>
#{item.period,jdbcType=INTEGER},
</choose>
#{item.name,jdbcType=VARCHAR},
<choose>
#{item.code,jdbcType=VARCHAR},
<when
test=
"item.period != null"
>
#{item.period,jdbcType=INTEGER},
</when>
#{item.path,jdbcType=VARCHAR},
<otherwise>
0,
</otherwise>
#{item.reportType,jdbcType=INTEGER},
</choose>
#{item.templateGroupId,jdbcType=INTEGER},
<choose>
#{item.orderIndex,jdbcType=INTEGER},
<when
test=
"item.name != null"
>
#{item.name,jdbcType=VARCHAR},
</when>
#{item.createTime,jdbcType=TIMESTAMP},
<otherwise>
'',
</otherwise>
#{item.updateTime,jdbcType=TIMESTAMP},
</choose>
#{item.isSystemType,jdbcType=INTEGER},
<choose>
#{item.isActiveAssociation,jdbcType=INTEGER},
<when
test=
"item.code != null"
>
#{item.code,jdbcType=VARCHAR},
</when>
#{item.parentId,jdbcType=VARCHAR},
<otherwise>
'',
</otherwise>
#{item.templateId,jdbcType=INTEGER},
</choose>
#{item.createBy,jdbcType=VARCHAR},
<choose>
#{item.updateBy,jdbcType=VARCHAR}
<when
test=
"item.path != null"
>
#{item.path,jdbcType=VARCHAR},
</when>
)
<otherwise>
'',
</otherwise>
</choose>
<choose>
<when
test=
"item.reportType != null"
>
#{item.reportType,jdbcType=INTEGER},
</when>
<otherwise>
0,
</otherwise>
</choose>
<choose>
<when
test=
"item.templateGroupId != null"
>
#{item.templateGroupId,jdbcType=INTEGER},
</when>
<otherwise>
0,
</otherwise>
</choose>
<choose>
<when
test=
"item.orderIndex != null"
>
#{item.orderIndex,jdbcType=INTEGER},
</when>
<otherwise>
0,
</otherwise>
</choose>
<choose>
<when
test=
"item.createTime != null"
>
#{item.createTime,jdbcType=TIMESTAMP},
</when>
<otherwise>
'1970-01-01 08:00:00',
</otherwise>
</choose>
<choose>
<when
test=
"item.updateTime != null"
>
#{item.updateTime,jdbcType=TIMESTAMP},
</when>
<otherwise>
'1970-01-01 08:00:00',
</otherwise>
</choose>
<choose>
<when
test=
"item.isSystemType != null"
>
#{item.isSystemType,jdbcType=INTEGER},
</when>
<otherwise>
0,
</otherwise>
</choose>
<choose>
<when
test=
"item.isActiveAssociation != null"
>
#{item.isActiveAssociation,jdbcType=INTEGER},
</when>
<otherwise>
0,
</otherwise>
</choose>
<choose>
<when
test=
"item.parentId != null"
>
#{item.parentId,jdbcType=VARCHAR},
</when>
<otherwise>
'',
</otherwise>
</choose>
<choose>
<when
test=
"item.templateId != null"
>
#{item.templateId,jdbcType=INTEGER},
</when>
<otherwise>
0,
</otherwise>
</choose>
<choose>
<when
test=
"item.createBy != null"
>
#{item.createBy,jdbcType=VARCHAR},
</when>
<otherwise>
'',
</otherwise>
</choose>
</trim>
</foreach>
</foreach>
SELECT 1 FROM DUAL
</insert>
</insert>
<resultMap
id=
"cellTemplatePerGroupDto"
type=
"pwc.taxtech.atms.dpo.CellTemplatePerGroupDto"
>
<resultMap
id=
"cellTemplatePerGroupDto"
type=
"pwc.taxtech.atms.dpo.CellTemplatePerGroupDto"
>
...
...
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