|
@@ -1,424 +0,0 @@
|
|
|
-<?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="com.ims.eval.dao.DeptResponsibilityTargetDao">
|
|
|
-
|
|
|
- <sql id="deptResponsibilityTargetColumns">
|
|
|
- a.id AS "id",
|
|
|
- a.responsibility_id AS "responsibilityId",
|
|
|
- a.indicator_id AS "indicatorId",
|
|
|
- a.quantization_target AS "quantizationTarget",
|
|
|
- a.quantization_target_actual AS "quantizationTargetActual",
|
|
|
- a.evaluation_target AS "evaluationTarget",
|
|
|
- a.evaluation_target_actual AS "evaluationTargetActual",
|
|
|
- a.month_threshold AS "monthThreshold",
|
|
|
- a.season_threshold AS "seasonThreshold",
|
|
|
- a.year_threshold AS "yearThreshold",
|
|
|
- a.direction AS "direction",
|
|
|
- a.order_num AS "orderNum",
|
|
|
- a.remark AS "remark",
|
|
|
- a.target_1 AS "target1",
|
|
|
- a.actual_1 AS "actual1",
|
|
|
- a.target_2 AS "target2",
|
|
|
- a.actual_2 AS "actual2",
|
|
|
- a.target_3 AS "target3",
|
|
|
- a.actual_3 AS "actual3",
|
|
|
- a.target_4 AS "target4",
|
|
|
- a.actual_4 AS "actual4",
|
|
|
- a.target_5 AS "target5",
|
|
|
- a.actual_5 AS "actual5",
|
|
|
- a.target_6 AS "target6",
|
|
|
- a.actual_6 AS "actual6",
|
|
|
- a.target_7 AS "target7",
|
|
|
- a.actual_7 AS "actual7",
|
|
|
- a.target_8 AS "target8",
|
|
|
- a.actual_8 AS "actual8",
|
|
|
- a.target_9 AS "target9",
|
|
|
- a.actual_9 AS "actual9",
|
|
|
- a.target_10 AS "target10",
|
|
|
- a.actual_10 AS "actual10",
|
|
|
- a.target_11 AS "target11",
|
|
|
- a.actual_11 AS "actual11",
|
|
|
- a.target_12 AS "target12",
|
|
|
- a.actual_12 AS "actual12"
|
|
|
- </sql>
|
|
|
-
|
|
|
-
|
|
|
- <sql id="whereStr">
|
|
|
- 1=1
|
|
|
- <!-- 快速定位 -->
|
|
|
- <if test="sqlMap.key != null and sqlMap.key != ''">
|
|
|
- AND (
|
|
|
- )
|
|
|
- </if>
|
|
|
- <!-- 高级查询dataFilter -->
|
|
|
- <if test="sqlMap.df != null and sqlMap.df != ''">
|
|
|
- AND ( ${sqlMap.df} )
|
|
|
- </if>
|
|
|
- <!-- 默认查询baseFilter -->
|
|
|
- <if test="sqlMap.bf != null and sqlMap.bf != ''">
|
|
|
- AND ( ${sqlMap.bf} )
|
|
|
- </if>
|
|
|
- <!-- 基本Query查询 -->
|
|
|
- <if test="sqlMap.baseQuery != null and sqlMap.baseQuery != ''">
|
|
|
- AND ( ${sqlMap.baseQuery} )
|
|
|
- </if>
|
|
|
- <!-- 特定Query查询 -->
|
|
|
- <if test="sqlMap.specQuery != null and sqlMap.specQuery != ''">
|
|
|
- AND ( ${sqlMap.specQuery} )
|
|
|
- </if>
|
|
|
- <if test="sqlMap.dsf != null and sqlMap.dsf != ''">
|
|
|
- AND (${sqlMap.dsf})
|
|
|
- </if>
|
|
|
- </sql>
|
|
|
-
|
|
|
- <select id="get" resultType="DeptResponsibilityTarget">
|
|
|
- SELECT
|
|
|
- <include refid="deptResponsibilityTargetColumns"/>
|
|
|
- FROM public.{table.name} a
|
|
|
-
|
|
|
- WHERE a.id = #{id}
|
|
|
- </select>
|
|
|
-
|
|
|
- <select id="findList" resultType="DeptResponsibilityTarget">
|
|
|
- SELECT
|
|
|
- <include refid="deptResponsibilityTargetColumns"/>
|
|
|
- FROM public.dept_responsibility_target a
|
|
|
-
|
|
|
- <where>
|
|
|
- <include refid="whereStr"/>
|
|
|
- </where>
|
|
|
- <choose>
|
|
|
- <when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
|
|
- ORDER BY ${page.orderBy}
|
|
|
- </when>
|
|
|
- <otherwise>
|
|
|
- </otherwise>
|
|
|
- </choose>
|
|
|
- </select>
|
|
|
-
|
|
|
- <select id="findAllList" resultType="DeptResponsibilityTarget">
|
|
|
- SELECT
|
|
|
- <include refid="deptResponsibilityTargetColumns"/>
|
|
|
- FROM public.dept_responsibility_target a
|
|
|
-
|
|
|
- <where>
|
|
|
- <include refid="whereStr"/>
|
|
|
- </where>
|
|
|
- <choose>
|
|
|
- <when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
|
|
- ORDER BY ${page.orderBy}
|
|
|
- </when>
|
|
|
- <otherwise>
|
|
|
- </otherwise>
|
|
|
- </choose>
|
|
|
- </select>
|
|
|
-
|
|
|
- <sql id="insertColumns">
|
|
|
- id,
|
|
|
- responsibility_id,
|
|
|
- indicator_id,
|
|
|
- quantization_target,
|
|
|
- quantization_target_actual,
|
|
|
- evaluation_target,
|
|
|
- evaluation_target_actual,
|
|
|
- month_threshold,
|
|
|
- season_threshold,
|
|
|
- year_threshold,
|
|
|
- direction,
|
|
|
- order_num,
|
|
|
- remark,
|
|
|
- target_1,
|
|
|
- actual_1,
|
|
|
- target_2,
|
|
|
- actual_2,
|
|
|
- target_3,
|
|
|
- actual_3,
|
|
|
- target_4,
|
|
|
- actual_4,
|
|
|
- target_5,
|
|
|
- actual_5,
|
|
|
- target_6,
|
|
|
- actual_6,
|
|
|
- target_7,
|
|
|
- actual_7,
|
|
|
- target_8,
|
|
|
- actual_8,
|
|
|
- target_9,
|
|
|
- actual_9,
|
|
|
- target_10,
|
|
|
- actual_10,
|
|
|
- target_11,
|
|
|
- actual_11,
|
|
|
- target_12,
|
|
|
- actual_12
|
|
|
- </sql>
|
|
|
-
|
|
|
- <insert id="insert">
|
|
|
- <selectKey keyProperty="id" resultType="String" order="BEFORE">
|
|
|
- <choose>
|
|
|
- <when test="id == null or id == ''">
|
|
|
- select get_next_id('dept_responsibility_target','') from dual
|
|
|
- </when>
|
|
|
- <otherwise>
|
|
|
- select #{id} from dual
|
|
|
- </otherwise>
|
|
|
- </choose>
|
|
|
- </selectKey>
|
|
|
- INSERT INTO dept_responsibility_target(
|
|
|
- <include refid="insertColumns"/>
|
|
|
- ) VALUES (
|
|
|
- #{id
|
|
|
-, jdbcType=VARCHAR
|
|
|
-
|
|
|
-},
|
|
|
- #{responsibilityId
|
|
|
-, jdbcType=VARCHAR
|
|
|
-
|
|
|
-},
|
|
|
- #{indicatorId
|
|
|
-, jdbcType=VARCHAR
|
|
|
-
|
|
|
-},
|
|
|
- #{quantizationTarget
|
|
|
-
|
|
|
-
|
|
|
-},
|
|
|
- #{quantizationTargetActual
|
|
|
-
|
|
|
-
|
|
|
-},
|
|
|
- #{evaluationTarget
|
|
|
-, jdbcType=VARCHAR
|
|
|
-
|
|
|
-},
|
|
|
- #{evaluationTargetActual
|
|
|
-
|
|
|
-
|
|
|
-},
|
|
|
- #{monthThreshold
|
|
|
-
|
|
|
-
|
|
|
-},
|
|
|
- #{seasonThreshold
|
|
|
-
|
|
|
-
|
|
|
-},
|
|
|
- #{yearThreshold
|
|
|
-
|
|
|
-
|
|
|
-},
|
|
|
- #{direction
|
|
|
-
|
|
|
-
|
|
|
-},
|
|
|
- #{orderNum
|
|
|
-
|
|
|
-
|
|
|
-},
|
|
|
- #{remark
|
|
|
-, jdbcType=VARCHAR
|
|
|
-
|
|
|
-},
|
|
|
- #{target1
|
|
|
-
|
|
|
-
|
|
|
-},
|
|
|
- #{actual1
|
|
|
-
|
|
|
-
|
|
|
-},
|
|
|
- #{target2
|
|
|
-
|
|
|
-
|
|
|
-},
|
|
|
- #{actual2
|
|
|
-
|
|
|
-
|
|
|
-},
|
|
|
- #{target3
|
|
|
-
|
|
|
-
|
|
|
-},
|
|
|
- #{actual3
|
|
|
-
|
|
|
-
|
|
|
-},
|
|
|
- #{target4
|
|
|
-
|
|
|
-
|
|
|
-},
|
|
|
- #{actual4
|
|
|
-
|
|
|
-
|
|
|
-},
|
|
|
- #{target5
|
|
|
-
|
|
|
-
|
|
|
-},
|
|
|
- #{actual5
|
|
|
-
|
|
|
-
|
|
|
-},
|
|
|
- #{target6
|
|
|
-
|
|
|
-
|
|
|
-},
|
|
|
- #{actual6
|
|
|
-
|
|
|
-
|
|
|
-},
|
|
|
- #{target7
|
|
|
-
|
|
|
-
|
|
|
-},
|
|
|
- #{actual7
|
|
|
-
|
|
|
-
|
|
|
-},
|
|
|
- #{target8
|
|
|
-
|
|
|
-
|
|
|
-},
|
|
|
- #{actual8
|
|
|
-
|
|
|
-
|
|
|
-},
|
|
|
- #{target9
|
|
|
-
|
|
|
-
|
|
|
-},
|
|
|
- #{actual9
|
|
|
-
|
|
|
-
|
|
|
-},
|
|
|
- #{target10
|
|
|
-
|
|
|
-
|
|
|
-},
|
|
|
- #{actual10
|
|
|
-
|
|
|
-
|
|
|
-},
|
|
|
- #{target11
|
|
|
-
|
|
|
-
|
|
|
-},
|
|
|
- #{actual11
|
|
|
-
|
|
|
-
|
|
|
-},
|
|
|
- #{target12
|
|
|
-
|
|
|
-
|
|
|
-},
|
|
|
- #{actual12
|
|
|
-
|
|
|
-
|
|
|
-}
|
|
|
- )
|
|
|
- </insert>
|
|
|
-
|
|
|
- <insert id="insertList">
|
|
|
- INSERT INTO dept_responsibility_target(
|
|
|
- <include refid="insertColumns"/>
|
|
|
- ) select FFF.* from (
|
|
|
- <foreach collection="list" item="item" index="index" separator="UNION ALL" >
|
|
|
- select
|
|
|
- #{item.id, jdbcType=VARCHAR} as "id",
|
|
|
- #{item.responsibilityId, jdbcType=VARCHAR} as "responsibilityId",
|
|
|
- #{item.indicatorId, jdbcType=VARCHAR} as "indicatorId",
|
|
|
- #{item.quantizationTarget} as "quantizationTarget",
|
|
|
- #{item.quantizationTargetActual} as "quantizationTargetActual",
|
|
|
- #{item.evaluationTarget, jdbcType=VARCHAR} as "evaluationTarget",
|
|
|
- #{item.evaluationTargetActual} as "evaluationTargetActual",
|
|
|
- #{item.monthThreshold} as "monthThreshold",
|
|
|
- #{item.seasonThreshold} as "seasonThreshold",
|
|
|
- #{item.yearThreshold} as "yearThreshold",
|
|
|
- #{item.direction} as "direction",
|
|
|
- #{item.orderNum} as "orderNum",
|
|
|
- #{item.remark, jdbcType=VARCHAR} as "remark",
|
|
|
- #{item.target1} as "target1",
|
|
|
- #{item.actual1} as "actual1",
|
|
|
- #{item.target2} as "target2",
|
|
|
- #{item.actual2} as "actual2",
|
|
|
- #{item.target3} as "target3",
|
|
|
- #{item.actual3} as "actual3",
|
|
|
- #{item.target4} as "target4",
|
|
|
- #{item.actual4} as "actual4",
|
|
|
- #{item.target5} as "target5",
|
|
|
- #{item.actual5} as "actual5",
|
|
|
- #{item.target6} as "target6",
|
|
|
- #{item.actual6} as "actual6",
|
|
|
- #{item.target7} as "target7",
|
|
|
- #{item.actual7} as "actual7",
|
|
|
- #{item.target8} as "target8",
|
|
|
- #{item.actual8} as "actual8",
|
|
|
- #{item.target9} as "target9",
|
|
|
- #{item.actual9} as "actual9",
|
|
|
- #{item.target10} as "target10",
|
|
|
- #{item.actual10} as "actual10",
|
|
|
- #{item.target11} as "target11",
|
|
|
- #{item.actual11} as "actual11",
|
|
|
- #{item.target12} as "target12",
|
|
|
- #{item.actual12} as "actual12"
|
|
|
- from dual
|
|
|
- </foreach>
|
|
|
- ) FFF
|
|
|
-
|
|
|
- </insert>
|
|
|
-
|
|
|
- <update id="update">
|
|
|
- UPDATE dept_responsibility_target SET
|
|
|
- id = #{id},
|
|
|
- responsibility_id = #{responsibilityId},
|
|
|
- indicator_id = #{indicatorId},
|
|
|
- quantization_target = #{quantizationTarget},
|
|
|
- quantization_target_actual = #{quantizationTargetActual},
|
|
|
- evaluation_target = #{evaluationTarget},
|
|
|
- evaluation_target_actual = #{evaluationTargetActual},
|
|
|
- month_threshold = #{monthThreshold},
|
|
|
- season_threshold = #{seasonThreshold},
|
|
|
- year_threshold = #{yearThreshold},
|
|
|
- direction = #{direction},
|
|
|
- order_num = #{orderNum},
|
|
|
- remark = #{remark},
|
|
|
- target_1 = #{target1},
|
|
|
- actual_1 = #{actual1},
|
|
|
- target_2 = #{target2},
|
|
|
- actual_2 = #{actual2},
|
|
|
- target_3 = #{target3},
|
|
|
- actual_3 = #{actual3},
|
|
|
- target_4 = #{target4},
|
|
|
- actual_4 = #{actual4},
|
|
|
- target_5 = #{target5},
|
|
|
- actual_5 = #{actual5},
|
|
|
- target_6 = #{target6},
|
|
|
- actual_6 = #{actual6},
|
|
|
- target_7 = #{target7},
|
|
|
- actual_7 = #{actual7},
|
|
|
- target_8 = #{target8},
|
|
|
- actual_8 = #{actual8},
|
|
|
- target_9 = #{target9},
|
|
|
- actual_9 = #{actual9},
|
|
|
- target_10 = #{target10},
|
|
|
- actual_10 = #{actual10},
|
|
|
- target_11 = #{target11},
|
|
|
- actual_11 = #{actual11},
|
|
|
- target_12 = #{target12},
|
|
|
- actual_12 = #{actual12}
|
|
|
- WHERE id = #{id, jdbcType=VARCHAR}
|
|
|
- </update>
|
|
|
-
|
|
|
- <update id="delete">
|
|
|
- DELETE FROM public.dept_responsibility_target
|
|
|
- WHERE
|
|
|
- <choose>
|
|
|
- <when test="id != null and id != ''">
|
|
|
- id = #{id, jdbcType=VARCHAR}
|
|
|
- </when>
|
|
|
- <otherwise>
|
|
|
- </otherwise>
|
|
|
- </choose>
|
|
|
- </update>
|
|
|
-
|
|
|
-</mapper>
|