|
@@ -8,9 +8,7 @@
|
|
|
SELECT
|
|
|
INDEXNO AS indexNo,
|
|
|
INDEXNAME AS indexName,
|
|
|
- INDEXLOGIC AS indexLogic,
|
|
|
- DATASOURCE AS dataSource,
|
|
|
- DATASET AS dataSet
|
|
|
+ INDEXLOGIC AS indexLogic
|
|
|
FROM SYS_INDEX
|
|
|
<where>
|
|
|
<if test="indexNo != null and indexNo !=''">
|
|
@@ -22,47 +20,69 @@
|
|
|
</where>
|
|
|
</select>
|
|
|
|
|
|
- <!-- 数据集配置页面初始化 -->
|
|
|
- <select id="getIndexSourceList" resultType="com.sundata.internalevaluation.configuration.model.IndexSourceModel">
|
|
|
+ <!-- 指标数据来源配置页面初始化 -->
|
|
|
+ <select id="getIndexSourceList" resultType="com.sundata.internalevaluation.configuration.model.IndexSourceModel" parameterType="com.sundata.internalevaluation.configuration.model.IndexConfigModel">
|
|
|
SELECT
|
|
|
- INDEXSOURCENO AS indesSourceNo,
|
|
|
+ INDEXSOURCENO AS indexSourceNo,
|
|
|
DATASETNO AS dataSetNo,
|
|
|
- DATASETNAME AS dataSetName,
|
|
|
INDEXNO AS indexNo,
|
|
|
- INDEXNAME AS indexName,
|
|
|
+ OTHERINDEXNO AS otherIndexNo,
|
|
|
DATASOURCETYPE AS dataSourceType
|
|
|
- FROM SYS_INDEX
|
|
|
+ FROM SYS_INDEX_SOURCE
|
|
|
<where>
|
|
|
+<!-- <if test="indexNo != null and indexNo !=''">-->
|
|
|
+<!-- INDEXNO like concat(concat('%',#{indexNo}),'%')-->
|
|
|
+<!-- </if>-->
|
|
|
+<!-- <if test="indexName != null and indexName !=''">-->
|
|
|
+<!-- and INDEXNAME like concat(concat('%', #{indexName}),'%')-->
|
|
|
+<!-- </if>-->
|
|
|
<if test="indexNo != null and indexNo !=''">
|
|
|
- INDEXNO like concat(concat('%',#{indexNo}),'%')
|
|
|
- </if>
|
|
|
- <if test="indexName != null and indexName !=''">
|
|
|
- and INDEXNAME like concat(concat('%', #{indexName}),'%')
|
|
|
+ and INDEXNO = #{indexNo}
|
|
|
</if>
|
|
|
</where>
|
|
|
</select>
|
|
|
|
|
|
- <!-- 数据集配置页面新增 -->
|
|
|
+ <!-- 指标配置页面新增 -->
|
|
|
<insert id="createData" parameterType="com.sundata.internalevaluation.configuration.model.IndexConfigModel">
|
|
|
INSERT INTO SYS_INDEX
|
|
|
(
|
|
|
INDEXNO,
|
|
|
INDEXNAME,
|
|
|
- INDEXLOGIC,
|
|
|
- DATASOURCE,
|
|
|
- DATASET
|
|
|
+ INDEXLOGIC
|
|
|
)
|
|
|
VALUES
|
|
|
(
|
|
|
#{indexNo},
|
|
|
#{indexName},
|
|
|
- #{indexLogic},
|
|
|
- #{dataSource},
|
|
|
- #{dataSet}
|
|
|
+ #{indexLogic}
|
|
|
)
|
|
|
</insert>
|
|
|
|
|
|
- <!-- 数据集配置页面删除 -->
|
|
|
+ <!-- 指标数据来源页面新增 -->
|
|
|
+ <insert id="createIndexSource" parameterType="java.util.List">
|
|
|
+ INSERT ALL
|
|
|
+ <foreach collection="indexSource" item="model">
|
|
|
+ INTO SYS_INDEX_SOURCE
|
|
|
+ (
|
|
|
+ INDEXSOURCENO,
|
|
|
+ INDEXNO,
|
|
|
+ OTHERINDEXNO,
|
|
|
+ DATASETNO,
|
|
|
+ DATASOURCETYPE
|
|
|
+ )
|
|
|
+ VALUES
|
|
|
+ (
|
|
|
+ #{model.indexSourceNo},
|
|
|
+ #{model.indexNo},
|
|
|
+ #{model.otherIndexNo},
|
|
|
+ #{model.dataSetNo},
|
|
|
+ #{model.dataSourceType}
|
|
|
+ )
|
|
|
+ </foreach>
|
|
|
+ SELECT 1 FROM DUAL
|
|
|
+ </insert>
|
|
|
+
|
|
|
+ <!-- 指标配置页面删除 -->
|
|
|
<delete id="deleteRows">
|
|
|
DELETE FROM SYS_INDEX
|
|
|
<where>
|
|
@@ -72,25 +92,34 @@
|
|
|
</where>
|
|
|
</delete>
|
|
|
|
|
|
+ <!-- 数据源配置页面删除 -->
|
|
|
+ <delete id="deleteIndexSource">
|
|
|
+ DELETE FROM SYS_INDEX_SOURCE
|
|
|
+ <where>
|
|
|
+ <if test="indexNo != null and indexNo !=''">
|
|
|
+ INDEXNO = #{indexNo}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ </delete>
|
|
|
+
|
|
|
<!-- 数据集配置页面修改 -->
|
|
|
<update id="updateExistData" parameterType="com.sundata.internalevaluation.configuration.model.IndexConfigModel">
|
|
|
UPDATE SYS_INDEX
|
|
|
<trim suffixOverrides=",">
|
|
|
<set>
|
|
|
- <if test="indexNo != null and indexNo !=''">
|
|
|
- INDEXNO = #{indexNo},
|
|
|
- </if>
|
|
|
<if test="indexName != null and indexName !=''">
|
|
|
INDEXNAME = #{indexName},
|
|
|
</if>
|
|
|
<if test="indexLogic != null and indexLogic !=''">
|
|
|
INDEXLOGIC = #{indexLogic},
|
|
|
</if>
|
|
|
- <if test="dataSource != null and dataSource !=''">
|
|
|
- DATASOURCE = #{dataSource},
|
|
|
- </if>
|
|
|
</set>
|
|
|
</trim>
|
|
|
+ <where>
|
|
|
+ <if test="indexNo != null and indexNo !=''">
|
|
|
+ INDEXNO = #{indexNo}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
</update>
|
|
|
|
|
|
<!-- 数据集配置页面初始化 -->
|
|
@@ -98,9 +127,7 @@
|
|
|
SELECT
|
|
|
INDEXNO AS indexNo,
|
|
|
INDEXNAME AS indexName,
|
|
|
- INDEXLOGIC AS indexLogic,
|
|
|
- DATASOURCE AS dataSource,
|
|
|
- DATASET AS dataSet
|
|
|
+ INDEXLOGIC AS indexLogic
|
|
|
FROM SYS_INDEX
|
|
|
<where>
|
|
|
<if test="indexNo != null and indexNo !=''">
|
|
@@ -115,6 +142,7 @@
|
|
|
select DATASETNO as id, DATASETNAME as text from SYS_DATASET_CONFIG
|
|
|
</select>
|
|
|
|
|
|
+
|
|
|
<select id="selectAllIndexToDict" resultType="com.sundata.admin.nounmanage.model.DictContent">
|
|
|
select INDEXNO as id, INDEXNAME as text from SYS_INDEX
|
|
|
</select>
|