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
0a860d94
Commit
0a860d94
authored
Jun 01, 2018
by
frank.xa.zhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add the code for KeyValueConfiguration
parent
636009bb
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
428 additions
and
310 deletions
+428
-310
KeyValueReferenceMapper.java
...in/java/pwc/taxtech/atms/dao/KeyValueReferenceMapper.java
+10
-0
AnalyticsModelDetail.java
.../main/java/pwc/taxtech/atms/dto/AnalyticsModelDetail.java
+8
-0
KeyValueConfigServiceImpl.java
.../taxtech/atms/service/impl/KeyValueConfigServiceImpl.java
+24
-3
KeyValueReferenceMapper.xml
...esources/pwc/taxtech/atms/dao/KeyValueReferenceMapper.xml
+386
-307
No files found.
atms-api/src/main/java/pwc/taxtech/atms/dao/KeyValueReferenceMapper.java
View file @
0a860d94
...
...
@@ -6,6 +6,9 @@ import org.apache.ibatis.annotations.Param;
import
org.apache.ibatis.session.RowBounds
;
import
org.springframework.security.access.method.P
;
import
pwc.taxtech.atms.MyMapper
;
import
pwc.taxtech.atms.dto.AnalyticsModelDetail
;
import
pwc.taxtech.atms.dto.FinancialStatementDetail
;
import
pwc.taxtech.atms.dto.TaxReturnDetail
;
import
pwc.taxtech.atms.entitiy.KeyValueReference
;
import
pwc.taxtech.atms.entitiy.KeyValueReferenceExample
;
...
...
@@ -108,4 +111,10 @@ public interface KeyValueReferenceMapper extends MyMapper {
int
updateByPrimaryKey
(
KeyValueReference
record
);
int
deleteKeyValueReferenceByCellTemplate
(
@Param
(
"templateDbID"
)
String
templateDbID
);
List
<
FinancialStatementDetail
>
getFinancialStatementDetails
(
@Param
(
"configurationID"
)
String
configurationID
);
List
<
TaxReturnDetail
>
getTaxReturnDetails
(
@Param
(
"configurationID"
)
String
configurationID
);
List
<
AnalyticsModelDetail
>
getAnalyticsModelDetails
(
@Param
(
"configurationID"
)
String
configurationID
);
}
\ No newline at end of file
atms-api/src/main/java/pwc/taxtech/atms/dto/AnalyticsModelDetail.java
View file @
0a860d94
...
...
@@ -59,4 +59,12 @@ public class AnalyticsModelDetail {
public
void
setIndustry
(
String
industry
)
{
this
.
industry
=
industry
;
}
public
String
getEntityID
()
{
return
entityID
;
}
public
void
setEntityID
(
String
entityID
)
{
this
.
entityID
=
entityID
;
}
}
atms-api/src/main/java/pwc/taxtech/atms/service/impl/KeyValueConfigServiceImpl.java
View file @
0a860d94
...
...
@@ -72,17 +72,38 @@ public class KeyValueConfigServiceImpl extends AbstractService implements KeyVal
@Override
public
List
<
FinancialStatementDetail
>
getFinacialStatement
(
String
configurationID
)
{
return
null
;
Map
<
String
,
String
>
jointObjectMap
=
new
HashMap
<>();
industryMapper
.
selectByExample
(
new
IndustryExample
()).
forEach
(
a
->
jointObjectMap
.
put
(
a
.
getID
(),
a
.
getName
()));
List
<
FinancialStatementDetail
>
referenceFinance
=
keyValueReferenceMapper
.
getFinancialStatementDetails
(
configurationID
);
for
(
FinancialStatementDetail
item
:
referenceFinance
)
{
item
.
setIndustry
(
getNamesByIDs
(
item
.
getIndustry
(),
jointObjectMap
));
}
return
referenceFinance
;
}
@Override
public
List
<
TaxReturnDetail
>
getTaxReturn
(
String
configurationID
)
{
return
null
;
Map
<
String
,
String
>
jointObjectMap
=
new
HashMap
<>();
industryMapper
.
selectByExample
(
new
IndustryExample
()).
forEach
(
a
->
jointObjectMap
.
put
(
a
.
getID
(),
a
.
getName
()));
List
<
TaxReturnDetail
>
referenceTax
=
keyValueReferenceMapper
.
getTaxReturnDetails
(
configurationID
);
for
(
TaxReturnDetail
item
:
referenceTax
)
{
item
.
setIndustry
(
getNamesByIDs
(
item
.
getIndustry
(),
jointObjectMap
));
}
return
referenceTax
;
}
@Override
public
List
<
AnalyticsModelDetail
>
getAnalyticsModel
(
String
configurationID
)
{
return
null
;
Map
<
String
,
String
>
industryList
=
new
HashMap
<>();
industryMapper
.
selectByExample
(
new
IndustryExample
()).
forEach
(
a
->
industryList
.
put
(
a
.
getID
(),
a
.
getName
()));
Map
<
String
,
String
>
organization
=
new
HashMap
<>();
organizationMapper
.
selectByExample
(
new
OrganizationExample
()).
forEach
(
a
->
organization
.
put
(
a
.
getID
(),
a
.
getName
()));
List
<
AnalyticsModelDetail
>
referenceModel
=
keyValueReferenceMapper
.
getAnalyticsModelDetails
(
configurationID
);
for
(
AnalyticsModelDetail
analyticsModelDetail
:
referenceModel
)
{
analyticsModelDetail
.
setIndustry
(
getNamesByIDs
(
analyticsModelDetail
.
getIndustry
(),
industryList
));
analyticsModelDetail
.
setEntityName
(
getNamesByIDs
(
analyticsModelDetail
.
getEntityID
(),
organization
));
}
return
referenceModel
;
}
@Override
...
...
atms-api/src/main/resources/pwc/taxtech/atms/dao/KeyValueReferenceMapper.xml
View file @
0a860d94
<?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">
<mapper
namespace=
"pwc.taxtech.atms.dao.KeyValueReferenceMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"pwc.taxtech.atms.entitiy.KeyValueReference"
>
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<id
column=
"ID"
jdbcType=
"VARCHAR"
property=
"ID"
/>
<result
column=
"KeyValueConfigID"
jdbcType=
"VARCHAR"
property=
"keyValueConfigID"
/>
<result
column=
"Scope"
jdbcType=
"INTEGER"
property=
"scope"
/>
<result
column=
"CellTemplateID"
jdbcType=
"VARCHAR"
property=
"cellTemplateID"
/>
<result
column=
"ModelID"
jdbcType=
"VARCHAR"
property=
"modelID"
/>
<result
column=
"OrganizationID"
jdbcType=
"VARCHAR"
property=
"organizationID"
/>
<result
column=
"IndustryID"
jdbcType=
"VARCHAR"
property=
"industryID"
/>
</resultMap>
<sql
id=
"Example_Where_Clause"
>
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach
collection=
"oredCriteria"
item=
"criteria"
separator=
"or"
>
<if
test=
"criteria.valid"
>
<trim
prefix=
"("
prefixOverrides=
"and"
suffix=
")"
>
<foreach
collection=
"criteria.criteria"
item=
"criterion"
>
<choose>
<when
test=
"criterion.noValue"
>
and ${criterion.condition}
</when>
<when
test=
"criterion.singleValue"
>
and ${criterion.condition} #{criterion.value}
</when>
<when
test=
"criterion.betweenValue"
>
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when
test=
"criterion.listValue"
>
and ${criterion.condition}
<foreach
close=
")"
collection=
"criterion.value"
item=
"listItem"
open=
"("
separator=
","
>
#{listItem}
</foreach>
</when>
</choose>
<resultMap
id=
"BaseResultMap"
type=
"pwc.taxtech.atms.entitiy.KeyValueReference"
>
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<id
column=
"ID"
jdbcType=
"VARCHAR"
property=
"ID"
/>
<result
column=
"KeyValueConfigID"
jdbcType=
"VARCHAR"
property=
"keyValueConfigID"
/>
<result
column=
"Scope"
jdbcType=
"INTEGER"
property=
"scope"
/>
<result
column=
"CellTemplateID"
jdbcType=
"VARCHAR"
property=
"cellTemplateID"
/>
<result
column=
"ModelID"
jdbcType=
"VARCHAR"
property=
"modelID"
/>
<result
column=
"OrganizationID"
jdbcType=
"VARCHAR"
property=
"organizationID"
/>
<result
column=
"IndustryID"
jdbcType=
"VARCHAR"
property=
"industryID"
/>
</resultMap>
<sql
id=
"Example_Where_Clause"
>
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach
collection=
"oredCriteria"
item=
"criteria"
separator=
"or"
>
<if
test=
"criteria.valid"
>
<trim
prefix=
"("
prefixOverrides=
"and"
suffix=
")"
>
<foreach
collection=
"criteria.criteria"
item=
"criterion"
>
<choose>
<when
test=
"criterion.noValue"
>
and ${criterion.condition}
</when>
<when
test=
"criterion.singleValue"
>
and ${criterion.condition} #{criterion.value}
</when>
<when
test=
"criterion.betweenValue"
>
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when
test=
"criterion.listValue"
>
and ${criterion.condition}
<foreach
close=
")"
collection=
"criterion.value"
item=
"listItem"
open=
"("
separator=
","
>
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql
id=
"Update_By_Example_Where_Clause"
>
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach
collection=
"example.oredCriteria"
item=
"criteria"
separator=
"or"
>
<if
test=
"criteria.valid"
>
<trim
prefix=
"("
prefixOverrides=
"and"
suffix=
")"
>
<foreach
collection=
"criteria.criteria"
item=
"criterion"
>
<choose>
<when
test=
"criterion.noValue"
>
and ${criterion.condition}
</when>
<when
test=
"criterion.singleValue"
>
and ${criterion.condition} #{criterion.value}
</when>
<when
test=
"criterion.betweenValue"
>
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when
test=
"criterion.listValue"
>
and ${criterion.condition}
<foreach
close=
")"
collection=
"criterion.value"
item=
"listItem"
open=
"("
separator=
","
>
#{listItem}
</foreach>
</when>
</choose>
</where>
</sql>
<sql
id=
"Update_By_Example_Where_Clause"
>
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach
collection=
"example.oredCriteria"
item=
"criteria"
separator=
"or"
>
<if
test=
"criteria.valid"
>
<trim
prefix=
"("
prefixOverrides=
"and"
suffix=
")"
>
<foreach
collection=
"criteria.criteria"
item=
"criterion"
>
<choose>
<when
test=
"criterion.noValue"
>
and ${criterion.condition}
</when>
<when
test=
"criterion.singleValue"
>
and ${criterion.condition} #{criterion.value}
</when>
<when
test=
"criterion.betweenValue"
>
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when
test=
"criterion.listValue"
>
and ${criterion.condition}
<foreach
close=
")"
collection=
"criterion.value"
item=
"listItem"
open=
"("
separator=
","
>
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</trim>
</where>
</sql>
<sql
id=
"Base_Column_List"
>
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
ID, KeyValueConfigID, Scope, CellTemplateID, ModelID, OrganizationID, IndustryID
</sql>
<select
id=
"selectByExample"
parameterType=
"pwc.taxtech.atms.entitiy.KeyValueReferenceExample"
resultMap=
"BaseResultMap"
>
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<if
test=
"distinct"
>
distinct
</if>
<include
refid=
"Base_Column_List"
/>
from KeyValueReference
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
<if
test=
"orderByClause != null"
>
order by ${orderByClause}
</if>
</select>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.String"
resultMap=
"BaseResultMap"
>
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<include
refid=
"Base_Column_List"
/>
from KeyValueReference
where ID = #{ID,jdbcType=VARCHAR}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.String"
>
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from KeyValueReference
where ID = #{ID,jdbcType=VARCHAR}
</delete>
<delete
id=
"deleteByExample"
parameterType=
"pwc.taxtech.atms.entitiy.KeyValueReferenceExample"
>
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from KeyValueReference
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</delete>
<insert
id=
"insert"
parameterType=
"pwc.taxtech.atms.entitiy.KeyValueReference"
>
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into KeyValueReference (ID, KeyValueConfigID, Scope,
CellTemplateID, ModelID, OrganizationID,
IndustryID)
values (#{ID,jdbcType=VARCHAR}, #{keyValueConfigID,jdbcType=VARCHAR}, #{scope,jdbcType=INTEGER},
#{cellTemplateID,jdbcType=VARCHAR}, #{modelID,jdbcType=VARCHAR}, #{organizationID,jdbcType=VARCHAR},
#{industryID,jdbcType=VARCHAR})
</insert>
<insert
id=
"insertSelective"
parameterType=
"pwc.taxtech.atms.entitiy.KeyValueReference"
>
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into KeyValueReference
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"ID != null"
>
ID,
</if>
<if
test=
"keyValueConfigID != null"
>
KeyValueConfigID,
</if>
<if
test=
"scope != null"
>
Scope,
</if>
<if
test=
"cellTemplateID != null"
>
CellTemplateID,
</if>
<if
test=
"modelID != null"
>
ModelID,
</if>
<if
test=
"organizationID != null"
>
OrganizationID,
</if>
<if
test=
"industryID != null"
>
IndustryID,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"ID != null"
>
#{ID,jdbcType=VARCHAR},
</if>
<if
test=
"keyValueConfigID != null"
>
#{keyValueConfigID,jdbcType=VARCHAR},
</if>
<if
test=
"scope != null"
>
#{scope,jdbcType=INTEGER},
</if>
<if
test=
"cellTemplateID != null"
>
#{cellTemplateID,jdbcType=VARCHAR},
</if>
<if
test=
"modelID != null"
>
#{modelID,jdbcType=VARCHAR},
</if>
<if
test=
"organizationID != null"
>
#{organizationID,jdbcType=VARCHAR},
</if>
<if
test=
"industryID != null"
>
#{industryID,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select
id=
"countByExample"
parameterType=
"pwc.taxtech.atms.entitiy.KeyValueReferenceExample"
resultType=
"java.lang.Long"
>
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select count(*) from KeyValueReference
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</foreach>
</where>
</sql>
<sql
id=
"Base_Column_List"
>
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
ID, KeyValueConfigID, Scope, CellTemplateID, ModelID, OrganizationID, IndustryID
</sql>
<select
id=
"selectByExample"
parameterType=
"pwc.taxtech.atms.entitiy.KeyValueReferenceExample"
resultMap=
"BaseResultMap"
>
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<if
test=
"distinct"
>
distinct
</if>
<include
refid=
"Base_Column_List"
/>
from KeyValueReference
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
<if
test=
"orderByClause != null"
>
order by ${orderByClause}
</if>
</select>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.String"
resultMap=
"BaseResultMap"
>
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<include
refid=
"Base_Column_List"
/>
from KeyValueReference
where ID = #{ID,jdbcType=VARCHAR}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.String"
>
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from KeyValueReference
where ID = #{ID,jdbcType=VARCHAR}
</delete>
<delete
id=
"deleteByExample"
parameterType=
"pwc.taxtech.atms.entitiy.KeyValueReferenceExample"
>
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from KeyValueReference
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</delete>
<insert
id=
"insert"
parameterType=
"pwc.taxtech.atms.entitiy.KeyValueReference"
>
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into KeyValueReference (ID, KeyValueConfigID, Scope,
CellTemplateID, ModelID, OrganizationID,
IndustryID)
values (#{ID,jdbcType=VARCHAR}, #{keyValueConfigID,jdbcType=VARCHAR}, #{scope,jdbcType=INTEGER},
#{cellTemplateID,jdbcType=VARCHAR}, #{modelID,jdbcType=VARCHAR}, #{organizationID,jdbcType=VARCHAR},
#{industryID,jdbcType=VARCHAR})
</insert>
<insert
id=
"insertSelective"
parameterType=
"pwc.taxtech.atms.entitiy.KeyValueReference"
>
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into KeyValueReference
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"ID != null"
>
ID,
</if>
<if
test=
"keyValueConfigID != null"
>
KeyValueConfigID,
</if>
<if
test=
"scope != null"
>
Scope,
</if>
<if
test=
"cellTemplateID != null"
>
CellTemplateID,
</if>
<if
test=
"modelID != null"
>
ModelID,
</if>
<if
test=
"organizationID != null"
>
OrganizationID,
</if>
<if
test=
"industryID != null"
>
IndustryID,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"ID != null"
>
#{ID,jdbcType=VARCHAR},
</if>
<if
test=
"keyValueConfigID != null"
>
#{keyValueConfigID,jdbcType=VARCHAR},
</if>
<if
test=
"scope != null"
>
#{scope,jdbcType=INTEGER},
</if>
<if
test=
"cellTemplateID != null"
>
#{cellTemplateID,jdbcType=VARCHAR},
</if>
<if
test=
"modelID != null"
>
#{modelID,jdbcType=VARCHAR},
</if>
<if
test=
"organizationID != null"
>
#{organizationID,jdbcType=VARCHAR},
</if>
<if
test=
"industryID != null"
>
#{industryID,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select
id=
"countByExample"
parameterType=
"pwc.taxtech.atms.entitiy.KeyValueReferenceExample"
resultType=
"java.lang.Long"
>
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select count(*) from KeyValueReference
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</select>
<update
id=
"updateByExampleSelective"
parameterType=
"map"
>
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update KeyValueReference
<set>
<if
test=
"record.ID != null"
>
ID = #{record.ID,jdbcType=VARCHAR},
</if>
<if
test=
"record.keyValueConfigID != null"
>
</select>
<update
id=
"updateByExampleSelective"
parameterType=
"map"
>
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update KeyValueReference
<set>
<if
test=
"record.ID != null"
>
ID = #{record.ID,jdbcType=VARCHAR},
</if>
<if
test=
"record.keyValueConfigID != null"
>
KeyValueConfigID = #{record.keyValueConfigID,jdbcType=VARCHAR},
</if>
<if
test=
"record.scope != null"
>
Scope = #{record.scope,jdbcType=INTEGER},
</if>
<if
test=
"record.cellTemplateID != null"
>
CellTemplateID = #{record.cellTemplateID,jdbcType=VARCHAR},
</if>
<if
test=
"record.modelID != null"
>
ModelID = #{record.modelID,jdbcType=VARCHAR},
</if>
<if
test=
"record.organizationID != null"
>
OrganizationID = #{record.organizationID,jdbcType=VARCHAR},
</if>
<if
test=
"record.industryID != null"
>
IndustryID = #{record.industryID,jdbcType=VARCHAR},
</if>
</set>
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"updateByExample"
parameterType=
"map"
>
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update KeyValueReference
set ID = #{record.ID,jdbcType=VARCHAR},
KeyValueConfigID = #{record.keyValueConfigID,jdbcType=VARCHAR},
</if>
<if
test=
"record.scope != null"
>
Scope = #{record.scope,jdbcType=INTEGER},
</if>
<if
test=
"record.cellTemplateID != null"
>
CellTemplateID = #{record.cellTemplateID,jdbcType=VARCHAR},
</if>
<if
test=
"record.modelID != null"
>
ModelID = #{record.modelID,jdbcType=VARCHAR},
</if>
<if
test=
"record.organizationID != null"
>
OrganizationID = #{record.organizationID,jdbcType=VARCHAR},
</if>
<if
test=
"record.industryID != null"
>
IndustryID = #{record.industryID,jdbcType=VARCHAR},
</if>
</set>
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"updateByExample"
parameterType=
"map"
>
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update KeyValueReference
set ID = #{record.ID,jdbcType=VARCHAR},
KeyValueConfigID = #{record.keyValueConfigID,jdbcType=VARCHAR},
Scope = #{record.scope,jdbcType=INTEGER},
CellTemplateID = #{record.cellTemplateID,jdbcType=VARCHAR},
ModelID = #{record.modelID,jdbcType=VARCHAR},
OrganizationID = #{record.organizationID,jdbcType=VARCHAR},
IndustryID = #{record.industryID,jdbcType=VARCHAR}
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"pwc.taxtech.atms.entitiy.KeyValueReference"
>
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update KeyValueReference
<set>
<if
test=
"keyValueConfigID != null"
>
KeyValueConfigID = #{keyValueConfigID,jdbcType=VARCHAR},
</if>
<if
test=
"scope != null"
>
IndustryID = #{record.industryID,jdbcType=VARCHAR}
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"pwc.taxtech.atms.entitiy.KeyValueReference"
>
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update KeyValueReference
<set>
<if
test=
"keyValueConfigID != null"
>
KeyValueConfigID = #{keyValueConfigID,jdbcType=VARCHAR},
</if>
<if
test=
"scope != null"
>
Scope = #{scope,jdbcType=INTEGER},
</if>
<if
test=
"cellTemplateID != null"
>
CellTemplateID = #{cellTemplateID,jdbcType=VARCHAR},
</if>
<if
test=
"modelID != null"
>
ModelID = #{modelID,jdbcType=VARCHAR},
</if>
<if
test=
"organizationID != null"
>
OrganizationID = #{organizationID,jdbcType=VARCHAR},
</if>
<if
test=
"industryID != null"
>
IndustryID = #{industryID,jdbcType=VARCHAR},
</if>
</set>
where ID = #{ID,jdbcType=VARCHAR}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"pwc.taxtech.atms.entitiy.KeyValueReference"
>
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update KeyValueReference
set KeyValueConfigID = #{keyValueConfigID,jdbcType=VARCHAR},
Scope = #{scope,jdbcType=INTEGER},
</if>
<if
test=
"cellTemplateID != null"
>
CellTemplateID = #{cellTemplateID,jdbcType=VARCHAR},
</if>
<if
test=
"modelID != null"
>
ModelID = #{modelID,jdbcType=VARCHAR},
</if>
<if
test=
"organizationID != null"
>
OrganizationID = #{organizationID,jdbcType=VARCHAR},
</if>
<if
test=
"industryID != null"
>
IndustryID = #{industryID,jdbcType=VARCHAR},
</if>
</set>
where ID = #{ID,jdbcType=VARCHAR}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"pwc.taxtech.atms.entitiy.KeyValueReference"
>
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update KeyValueReference
set KeyValueConfigID = #{keyValueConfigID,jdbcType=VARCHAR},
Scope = #{scope,jdbcType=INTEGER},
CellTemplateID = #{cellTemplateID,jdbcType=VARCHAR},
ModelID = #{modelID,jdbcType=VARCHAR},
OrganizationID = #{organizationID,jdbcType=VARCHAR},
IndustryID = #{industryID,jdbcType=VARCHAR}
where ID = #{ID,jdbcType=VARCHAR}
</update>
<select
id=
"selectByExampleWithRowbounds"
parameterType=
"pwc.taxtech.atms.entitiy.KeyValueReferenceExample"
resultMap=
"BaseResultMap"
>
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<if
test=
"distinct"
>
distinct
</if>
<include
refid=
"Base_Column_List"
/>
from KeyValueReference
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
<if
test=
"orderByClause != null"
>
order by ${orderByClause}
</if>
</select>
<delete
id=
"deleteKeyValueReferenceByCellTemplate"
parameterType=
"java.lang.String"
>
IndustryID = #{industryID,jdbcType=VARCHAR}
where ID = #{ID,jdbcType=VARCHAR}
</update>
<select
id=
"selectByExampleWithRowbounds"
parameterType=
"pwc.taxtech.atms.entitiy.KeyValueReferenceExample"
resultMap=
"BaseResultMap"
>
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<if
test=
"distinct"
>
distinct
</if>
<include
refid=
"Base_Column_List"
/>
from KeyValueReference
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
<if
test=
"orderByClause != null"
>
order by ${orderByClause}
</if>
</select>
<delete
id=
"deleteKeyValueReferenceByCellTemplate"
parameterType=
"java.lang.String"
>
delete a.*
FROM
KeyValueReference a
...
...
@@ -332,5 +337,78 @@ WHERE
WHERE
c.ReportTemplateID = #{templateDbID,jdbcType=VARCHAR}
) x)
</delete>
</delete>
<resultMap
id=
"financialStatementDetail"
type=
"pwc.taxtech.atms.dto.FinancialStatementDetail"
>
<id
column=
"Name"
property=
"name"
jdbcType=
"VARCHAR"
/>
<result
column=
"Industry"
property=
"industry"
jdbcType=
"VARCHAR"
/>
<result
column=
"Row"
property=
"row"
jdbcType=
"INTEGER"
/>
<result
column=
"Column"
property=
"column"
jdbcType=
"INTEGER"
/>
</resultMap>
<select
id=
"getFinancialStatementDetails"
resultMap=
"financialStatementDetail"
parameterType=
"java.lang.String"
>
SELECT DISTINCT
t.Name,
c.RowIndex,
c.ColumnIndex,
g.IndustryIDs
FROM
KeyValueReference s
JOIN CellTemplate c ON s.CellTemplateID = c.ID
JOIN Template t ON c.ReportTemplateID = t.ID
JOIN TemplateGroup g ON t.TemplateGroupID = g.ID
WHERE
s.Scope = 1 AND s.KeyValueConfigID = #{configurationID,jdbcType=VARCHAR}
</select>
<resultMap
id=
"taxReturnDetail"
type=
"pwc.taxtech.atms.dto.TaxReturnDetail"
>
<id
column=
"CellTemplateID"
property=
"cellTemplateID"
jdbcType=
"VARCHAR"
/>
<result
column=
"TemplateID"
property=
"templateID"
jdbcType=
"VARCHAR"
/>
<result
column=
"TemplateGroupID"
property=
"templateGroupID"
jdbcType=
"VARCHAR"
/>
<result
column=
"Category"
property=
"category"
jdbcType=
"VARCHAR"
/>
<result
column=
"PayTaxType"
property=
"payTaxType"
jdbcType=
"INTEGER"
/>
<result
column=
"TemplateGroupName"
property=
"templateGroupName"
jdbcType=
"VARCHAR"
/>
<result
column=
"Name"
property=
"name"
jdbcType=
"VARCHAR"
/>
<result
column=
"Industry"
property=
"industry"
jdbcType=
"VARCHAR"
/>
<result
column=
"Row"
property=
"row"
jdbcType=
"INTEGER"
/>
<result
column=
"Column"
property=
"column"
jdbcType=
"INTEGER"
/>
</resultMap>
<select
id=
"getTaxReturnDetails"
parameterType=
"java.lang.String"
resultMap=
"taxReturnDetail"
>
SELECT DISTINCT
t.ID,
'增值税纳税申报表' as Category,
g.PayTaxType,
g.ID as TemplateGroupID,
g.Name as TemplateGroupName,
t.Name as Name,
c.ID as CellTemplateID,
c.RowIndex as Row,
c.ColumnIndex as 'Column',
g.IndustryIDs as Industry
FROM
KeyValueReference s
JOIN CellTemplate c ON s.CellTemplateID = c.ID
JOIN Template t ON c.ReportTemplateID = t.ID
JOIN TemplateGroup g ON t.TemplateGroupID = g.ID
WHERE
s.Scope = 2 AND s.KeyValueConfigID = #{configurationID,jdbcType=VARCHAR}
</select>
<resultMap
id=
"analyticsModelDetail"
type=
"pwc.taxtech.atms.dto.AnalyticsModelDetail"
>
<id
column=
"ModelID"
property=
"modelID"
jdbcType=
"VARCHAR"
/>
<result
column=
"Code"
property=
"code"
jdbcType=
"VARCHAR"
/>
<result
column=
"Type"
property=
"type"
jdbcType=
"VARCHAR"
/>
<result
column=
"EntityID"
property=
"entityID"
jdbcType=
"VARCHAR"
/>
<result
column=
"Name"
property=
"name"
jdbcType=
"VARCHAR"
/>
<result
column=
"Industry"
property=
"industry"
jdbcType=
"VARCHAR"
/>
</resultMap>
<select
id=
"getAnalyticsModelDetails"
parameterType=
"java.lang.String"
resultMap=
"analyticsModelDetail"
>
SELECT DISTINCT
m.ID as ModelID,
m.Code as Code,
m.Type as Type,
s.OrganizationID as EntityID,
m.Name as Name,
s.IndustryID as Industry
FROM tax_admin.KeyValueReference s
JOIN tax_admin.Model m
ON s.ModelID = m.ID
WHERE s.Scope = 3 AND s.KeyValueConfigID = #{configurationID,jdbcType=VARCHAR}
</select>
</mapper>
\ No newline at end of file
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