|
|
@@ -1,60 +1,85 @@
|
|
|
<?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">
|
|
|
+ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
+ "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
<mapper namespace="com.ruoyi.model.etl.mapper.DppEtlTaskMapper">
|
|
|
|
|
|
<resultMap type="DppEtlTaskDO" id="DppEtlTaskResult">
|
|
|
- <result property="id" column="ID" />
|
|
|
- <result property="type" column="TYPE" />
|
|
|
- <result property="name" column="NAME" />
|
|
|
- <result property="code" column="CODE" />
|
|
|
- <result property="version" column="VERSION" />
|
|
|
- <result property="projectId" column="PROJECT_ID" />
|
|
|
- <result property="projectCode" column="PROJECT_CODE" />
|
|
|
- <result property="personCharge" column="PERSON_CHARGE" />
|
|
|
- <result property="locations" column="LOCATIONS" />
|
|
|
- <result property="description" column="DESCRIPTION" />
|
|
|
- <result property="timeout" column="TIMEOUT" />
|
|
|
- <result property="extractionCount" column="EXTRACTION_COUNT" />
|
|
|
- <result property="executionType" column="EXECUTION_TYPE" />
|
|
|
- <result property="writeCount" column="WRITE_COUNT" />
|
|
|
- <result property="status" column="STATUS" />
|
|
|
- <result property="dsId" column="DS_ID" />
|
|
|
- <result property="validFlag" column="VALID_FLAG" />
|
|
|
- <result property="delFlag" column="DEL_FLAG" />
|
|
|
- <result property="createBy" column="CREATE_BY" />
|
|
|
- <result property="creatorId" column="CREATOR_ID" />
|
|
|
- <result property="createTime" column="CREATE_TIME" />
|
|
|
- <result property="updateBy" column="UPDATE_BY" />
|
|
|
- <result property="updaterId" column="UPDATER_ID" />
|
|
|
- <result property="updateTime" column="UPDATE_TIME" />
|
|
|
- <result property="remark" column="REMARK" />
|
|
|
+ <result property="id" column="ID"/>
|
|
|
+ <result property="type" column="TYPE"/>
|
|
|
+ <result property="name" column="NAME"/>
|
|
|
+ <result property="code" column="CODE"/>
|
|
|
+ <result property="version" column="VERSION"/>
|
|
|
+ <result property="projectId" column="PROJECT_ID"/>
|
|
|
+ <result property="projectCode" column="PROJECT_CODE"/>
|
|
|
+ <result property="personCharge" column="PERSON_CHARGE"/>
|
|
|
+ <result property="locations" column="LOCATIONS"/>
|
|
|
+ <result property="description" column="DESCRIPTION"/>
|
|
|
+ <result property="timeout" column="TIMEOUT"/>
|
|
|
+ <result property="extractionCount" column="EXTRACTION_COUNT"/>
|
|
|
+ <result property="executionType" column="EXECUTION_TYPE"/>
|
|
|
+ <result property="writeCount" column="WRITE_COUNT"/>
|
|
|
+ <result property="status" column="STATUS"/>
|
|
|
+ <result property="dsId" column="DS_ID"/>
|
|
|
+ <result property="validFlag" column="VALID_FLAG"/>
|
|
|
+ <result property="delFlag" column="DEL_FLAG"/>
|
|
|
+ <result property="createBy" column="CREATE_BY"/>
|
|
|
+ <result property="creatorId" column="CREATOR_ID"/>
|
|
|
+ <result property="createTime" column="CREATE_TIME"/>
|
|
|
+ <result property="updateBy" column="UPDATE_BY"/>
|
|
|
+ <result property="updaterId" column="UPDATER_ID"/>
|
|
|
+ <result property="updateTime" column="UPDATE_TIME"/>
|
|
|
+ <result property="remark" column="REMARK"/>
|
|
|
</resultMap>
|
|
|
|
|
|
<sql id="selectDppEtlTaskVo">
|
|
|
- select ID, TYPE, NAME, CODE, VERSION, PROJECT_ID,EXECUTION_TYPE, PROJECT_CODE, PERSON_CHARGE, LOCATIONS, DESCRIPTION, TIMEOUT, EXTRACTION_COUNT, WRITE_COUNT, STATUS, DS_ID, VALID_FLAG, DEL_FLAG, CREATE_BY, CREATOR_ID, CREATE_TIME, UPDATE_BY, UPDATER_ID, UPDATE_TIME, REMARK from DPP_ETL_TASK
|
|
|
+ select ID,
|
|
|
+ TYPE,
|
|
|
+ NAME,
|
|
|
+ CODE,
|
|
|
+ VERSION,
|
|
|
+ PROJECT_ID,
|
|
|
+ EXECUTION_TYPE,
|
|
|
+ PROJECT_CODE,
|
|
|
+ PERSON_CHARGE,
|
|
|
+ LOCATIONS,
|
|
|
+ DESCRIPTION,
|
|
|
+ TIMEOUT,
|
|
|
+ EXTRACTION_COUNT,
|
|
|
+ WRITE_COUNT,
|
|
|
+ STATUS,
|
|
|
+ DS_ID,
|
|
|
+ VALID_FLAG,
|
|
|
+ DEL_FLAG,
|
|
|
+ CREATE_BY,
|
|
|
+ CREATOR_ID,
|
|
|
+ CREATE_TIME,
|
|
|
+ UPDATE_BY,
|
|
|
+ UPDATER_ID,
|
|
|
+ UPDATE_TIME,
|
|
|
+ REMARK
|
|
|
+ from DPP_ETL_TASK
|
|
|
</sql>
|
|
|
|
|
|
<select id="selectDppEtlTaskList" parameterType="DppEtlTaskDO" resultMap="DppEtlTaskResult">
|
|
|
<include refid="selectDppEtlTaskVo"/>
|
|
|
<where>
|
|
|
- <if test="type != null and type != ''"> and TYPE = #{type}</if>
|
|
|
- <if test="name != null and name != ''"> and NAME like concat('%', #{name}, '%')</if>
|
|
|
- <if test="code != null and code != ''"> and CODE = #{code}</if>
|
|
|
- <if test="version != null "> and VERSION = #{version}</if>
|
|
|
- <if test="projectId != null "> and PROJECT_ID = #{projectId}</if>
|
|
|
- <if test="projectCode != null and projectCode != ''"> and PROJECT_CODE = #{projectCode}</if>
|
|
|
- <if test="executionType != null and executionType != ''"> and EXECUTION_TYPE = #{executionType}</if>
|
|
|
- <if test="personCharge != null and personCharge != ''"> and PERSON_CHARGE = #{personCharge}</if>
|
|
|
- <if test="locations != null and locations != ''"> and LOCATIONS = #{locations}</if>
|
|
|
- <if test="description != null and description != ''"> and DESCRIPTION = #{description}</if>
|
|
|
- <if test="timeout != null "> and TIMEOUT = #{timeout}</if>
|
|
|
- <if test="extractionCount != null "> and EXTRACTION_COUNT = #{extractionCount}</if>
|
|
|
- <if test="writeCount != null "> and WRITE_COUNT = #{writeCount}</if>
|
|
|
- <if test="status != null and status != ''"> and STATUS = #{status}</if>
|
|
|
- <if test="dsId != null "> and DS_ID = #{dsId}</if>
|
|
|
- <if test="createTime != null "> and CREATE_TIME = #{createTime}</if>
|
|
|
+ <if test="type != null and type != ''">and TYPE = #{type}</if>
|
|
|
+ <if test="name != null and name != ''">and NAME like concat('%', #{name}, '%')</if>
|
|
|
+ <if test="code != null and code != ''">and CODE = #{code}</if>
|
|
|
+ <if test="version != null ">and VERSION = #{version}</if>
|
|
|
+ <if test="projectId != null ">and PROJECT_ID = #{projectId}</if>
|
|
|
+ <if test="projectCode != null and projectCode != ''">and PROJECT_CODE = #{projectCode}</if>
|
|
|
+ <if test="executionType != null and executionType != ''">and EXECUTION_TYPE = #{executionType}</if>
|
|
|
+ <if test="personCharge != null and personCharge != ''">and PERSON_CHARGE = #{personCharge}</if>
|
|
|
+ <if test="locations != null and locations != ''">and LOCATIONS = #{locations}</if>
|
|
|
+ <if test="description != null and description != ''">and DESCRIPTION = #{description}</if>
|
|
|
+ <if test="timeout != null ">and TIMEOUT = #{timeout}</if>
|
|
|
+ <if test="extractionCount != null ">and EXTRACTION_COUNT = #{extractionCount}</if>
|
|
|
+ <if test="writeCount != null ">and WRITE_COUNT = #{writeCount}</if>
|
|
|
+ <if test="status != null and status != ''">and STATUS = #{status}</if>
|
|
|
+ <if test="dsId != null ">and DS_ID = #{dsId}</if>
|
|
|
+ <if test="createTime != null ">and CREATE_TIME = #{createTime}</if>
|
|
|
</where>
|
|
|
</select>
|
|
|
|
|
|
@@ -91,7 +116,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="updaterId != null">UPDATER_ID,</if>
|
|
|
<if test="updateTime != null">UPDATE_TIME,</if>
|
|
|
<if test="remark != null">REMARK,</if>
|
|
|
- </trim>
|
|
|
+ </trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
<if test="id != null">#{id},</if>
|
|
|
<if test="type != null">#{type},</if>
|
|
|
@@ -118,7 +143,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="updaterId != null">#{updaterId},</if>
|
|
|
<if test="updateTime != null">#{updateTime},</if>
|
|
|
<if test="remark != null">#{remark},</if>
|
|
|
- </trim>
|
|
|
+ </trim>
|
|
|
</insert>
|
|
|
|
|
|
<update id="updateDppEtlTask" parameterType="DppEtlTaskDO">
|
|
|
@@ -153,7 +178,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</update>
|
|
|
|
|
|
<delete id="deleteDppEtlTaskById" parameterType="Long">
|
|
|
- delete from DPP_ETL_TASK where ID = #{id}
|
|
|
+ delete
|
|
|
+ from DPP_ETL_TASK
|
|
|
+ where ID = #{id}
|
|
|
</delete>
|
|
|
|
|
|
<delete id="deleteDppEtlTaskByIds" parameterType="String">
|
|
|
@@ -164,40 +191,40 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</delete>
|
|
|
|
|
|
|
|
|
-
|
|
|
<select id="checkTaskIdInSubTasks" parameterType="Long" resultType="int">
|
|
|
SELECT COUNT(1)
|
|
|
FROM DPP_ETL_TASK dt
|
|
|
WHERE dt.DEL_FLAG = '0'
|
|
|
- AND dt.TYPE = '4'
|
|
|
- AND dt.id IN (
|
|
|
- SELECT rel.TASK_ID
|
|
|
- FROM DPP_ETL_TASK_NODE_REL rel
|
|
|
- JOIN DPP_ETL_NODE node
|
|
|
- ON (node.CODE = rel.PRE_NODE_CODE OR node.CODE = rel.POST_NODE_CODE)
|
|
|
- WHERE
|
|
|
- <choose>
|
|
|
- <when test="@tech.qiantong.qdata.mybatis.config.MasterDataSourceConfig@getDatabaseType() == 'mysql'">
|
|
|
- CAST(
|
|
|
- SUBSTRING_INDEX(
|
|
|
- SUBSTRING_INDEX(
|
|
|
- node.PARAMETERS,
|
|
|
- '"subTaskId":',
|
|
|
- -1
|
|
|
- ),
|
|
|
- ',',
|
|
|
- 1
|
|
|
- ) AS UNSIGNED
|
|
|
- )
|
|
|
- </when>
|
|
|
- <when test="@tech.qiantong.qdata.mybatis.config.MasterDataSourceConfig@getDatabaseType() == 'dm8'">
|
|
|
- TO_NUMBER(
|
|
|
- REGEXP_SUBSTR(node.PARAMETERS,
|
|
|
- '"subTaskId"[[:space:]]*:[[:space:]]*([0-9]+)',
|
|
|
- 1, 1, NULL, 1)
|
|
|
- )
|
|
|
- </when>
|
|
|
- </choose> = #{id}
|
|
|
+ AND dt.TYPE = '4'
|
|
|
+ AND dt.id IN (
|
|
|
+ SELECT rel.TASK_ID
|
|
|
+ FROM DPP_ETL_TASK_NODE_REL rel
|
|
|
+ JOIN DPP_ETL_NODE node
|
|
|
+ ON (node.CODE = rel.PRE_NODE_CODE OR node.CODE = rel.POST_NODE_CODE)
|
|
|
+ WHERE
|
|
|
+ <choose>
|
|
|
+ <when test="@tech.qiantong.qdata.mybatis.config.MasterDataSourceConfig@getDatabaseType() == 'mysql'">
|
|
|
+ CAST(
|
|
|
+ SUBSTRING_INDEX(
|
|
|
+ SUBSTRING_INDEX(
|
|
|
+ node.PARAMETERS,
|
|
|
+ '"subTaskId":',
|
|
|
+ -1
|
|
|
+ ),
|
|
|
+ ',',
|
|
|
+ 1
|
|
|
+ ) AS UNSIGNED
|
|
|
+ )
|
|
|
+ </when>
|
|
|
+ <when test="@tech.qiantong.qdata.mybatis.config.MasterDataSourceConfig@getDatabaseType() == 'dm8'">
|
|
|
+ TO_NUMBER(
|
|
|
+ REGEXP_SUBSTR(node.PARAMETERS,
|
|
|
+ '"subTaskId"[[:space:]]*:[[:space:]]*([0-9]+)',
|
|
|
+ 1, 1, NULL, 1)
|
|
|
+ )
|
|
|
+ </when>
|
|
|
+ </choose>
|
|
|
+ = #{id}
|
|
|
);
|
|
|
</select>
|
|
|
|
|
|
@@ -205,103 +232,103 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
SELECT COUNT(1)
|
|
|
FROM DPP_ETL_TASK dt
|
|
|
WHERE dt.DEL_FLAG = '0'
|
|
|
- AND dt.TYPE != '4'
|
|
|
- <if test="projectIdList != null and projectIdList.size > 0">
|
|
|
- AND dt.PROJECT_ID in
|
|
|
- <foreach item="id" collection="projectIdList" open="(" separator="," close=")">
|
|
|
- #{id}
|
|
|
- </foreach>
|
|
|
- </if>
|
|
|
- AND dt.id IN (
|
|
|
- SELECT rel.TASK_ID
|
|
|
- FROM DPP_ETL_TASK_NODE_REL rel
|
|
|
- JOIN DPP_ETL_NODE node
|
|
|
- ON (node.CODE = rel.PRE_NODE_CODE OR node.CODE = rel.POST_NODE_CODE)
|
|
|
- WHERE
|
|
|
- <choose>
|
|
|
- <when test="@tech.qiantong.qdata.mybatis.config.MasterDataSourceConfig@getDatabaseType() == 'mysql'">
|
|
|
- CAST(
|
|
|
- SUBSTRING_INDEX(
|
|
|
- SUBSTRING_INDEX(
|
|
|
- node.PARAMETERS,
|
|
|
- '"datasourceId":',
|
|
|
- -1
|
|
|
- ),
|
|
|
- ',',
|
|
|
- 1
|
|
|
- ) AS UNSIGNED
|
|
|
- )
|
|
|
- </when>
|
|
|
- <when test="@tech.qiantong.qdata.mybatis.config.MasterDataSourceConfig@getDatabaseType() == 'dm8'">
|
|
|
- TO_NUMBER(
|
|
|
- REGEXP_SUBSTR(node.PARAMETERS,
|
|
|
- '"datasourceId"[[:space:]]*:[[:space:]]*([0-9]+)',
|
|
|
- 1, 1, NULL, 1)
|
|
|
- )
|
|
|
- </when>
|
|
|
- </choose>
|
|
|
- in
|
|
|
- <foreach item="id" collection="datasourceIdList" open="(" separator="," close=")">
|
|
|
- #{id}
|
|
|
- </foreach>
|
|
|
+ AND dt.TYPE != '4'
|
|
|
+ <if test="projectIdList != null and projectIdList.size > 0">
|
|
|
+ AND dt.PROJECT_ID in
|
|
|
+ <foreach item="id" collection="projectIdList" open="(" separator="," close=")">
|
|
|
+ #{id}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ AND dt.id IN (
|
|
|
+ SELECT rel.TASK_ID
|
|
|
+ FROM DPP_ETL_TASK_NODE_REL rel
|
|
|
+ JOIN DPP_ETL_NODE node
|
|
|
+ ON (node.CODE = rel.PRE_NODE_CODE OR node.CODE = rel.POST_NODE_CODE)
|
|
|
+ WHERE
|
|
|
+ <choose>
|
|
|
+ <when test="@tech.qiantong.qdata.mybatis.config.MasterDataSourceConfig@getDatabaseType() == 'mysql'">
|
|
|
+ CAST(
|
|
|
+ SUBSTRING_INDEX(
|
|
|
+ SUBSTRING_INDEX(
|
|
|
+ node.PARAMETERS,
|
|
|
+ '"datasourceId":',
|
|
|
+ -1
|
|
|
+ ),
|
|
|
+ ',',
|
|
|
+ 1
|
|
|
+ ) AS UNSIGNED
|
|
|
+ )
|
|
|
+ </when>
|
|
|
+ <when test="@tech.qiantong.qdata.mybatis.config.MasterDataSourceConfig@getDatabaseType() == 'dm8'">
|
|
|
+ TO_NUMBER(
|
|
|
+ REGEXP_SUBSTR(node.PARAMETERS,
|
|
|
+ '"datasourceId"[[:space:]]*:[[:space:]]*([0-9]+)',
|
|
|
+ 1, 1, NULL, 1)
|
|
|
+ )
|
|
|
+ </when>
|
|
|
+ </choose>
|
|
|
+ in
|
|
|
+ <foreach item="id" collection="datasourceIdList" open="(" separator="," close=")">
|
|
|
+ #{id}
|
|
|
+ </foreach>
|
|
|
);
|
|
|
</select>
|
|
|
<select id="checkTaskIdInAsset" parameterType="Long" resultType="int">
|
|
|
SELECT COUNT(1)
|
|
|
FROM DPP_ETL_TASK dt
|
|
|
WHERE dt.DEL_FLAG = '0'
|
|
|
- AND dt.TYPE = '1'
|
|
|
- AND dt.id IN (
|
|
|
- SELECT rel.TASK_ID
|
|
|
- FROM DPP_ETL_TASK_NODE_REL rel
|
|
|
- JOIN DPP_ETL_NODE node
|
|
|
- ON (node.CODE = rel.PRE_NODE_CODE OR node.CODE = rel.POST_NODE_CODE)
|
|
|
- WHERE
|
|
|
- <choose>
|
|
|
- <when test="@tech.qiantong.qdata.mybatis.config.MasterDataSourceConfig@getDatabaseType() == 'mysql'">
|
|
|
- CAST(
|
|
|
- SUBSTRING_INDEX(
|
|
|
- SUBSTRING_INDEX(
|
|
|
- node.PARAMETERS,
|
|
|
- '"clmt":',
|
|
|
- -1
|
|
|
- ),
|
|
|
- ',',
|
|
|
- 1
|
|
|
- ) AS UNSIGNED
|
|
|
- ) = 1
|
|
|
- AND
|
|
|
- CAST(
|
|
|
- SUBSTRING_INDEX(
|
|
|
- SUBSTRING_INDEX(
|
|
|
- node.PARAMETERS,
|
|
|
- '"asset_id_cpoy":',
|
|
|
- -1
|
|
|
- ),
|
|
|
- ',',
|
|
|
- 1
|
|
|
- ) AS UNSIGNED
|
|
|
- )
|
|
|
- </when>
|
|
|
- <when test="@tech.qiantong.qdata.mybatis.config.MasterDataSourceConfig@getDatabaseType() == 'dm8'">
|
|
|
- TO_NUMBER(
|
|
|
- REGEXP_SUBSTR(node.PARAMETERS,
|
|
|
- '"clmt"[[:space:]]*:[[:space:]]*"?([0-9]+)"?',
|
|
|
- 1, 1, NULL, 1)
|
|
|
- )=1 AND
|
|
|
- TO_NUMBER(
|
|
|
- REGEXP_SUBSTR(node.PARAMETERS,
|
|
|
- '"asset_id_cpoy"[[:space:]]*:[[:space:]]*([0-9]+)',
|
|
|
- 1, 1, NULL, 1)
|
|
|
- )
|
|
|
- </when>
|
|
|
- </choose>
|
|
|
- in
|
|
|
- <foreach item="id" collection="assetIdList" open="(" separator="," close=")">
|
|
|
- #{id}
|
|
|
- </foreach>
|
|
|
+ AND dt.TYPE = '1'
|
|
|
+ AND dt.id IN (
|
|
|
+ SELECT rel.TASK_ID
|
|
|
+ FROM DPP_ETL_TASK_NODE_REL rel
|
|
|
+ JOIN DPP_ETL_NODE node
|
|
|
+ ON (node.CODE = rel.PRE_NODE_CODE OR node.CODE = rel.POST_NODE_CODE)
|
|
|
+ WHERE
|
|
|
+ <choose>
|
|
|
+ <when test="@tech.qiantong.qdata.mybatis.config.MasterDataSourceConfig@getDatabaseType() == 'mysql'">
|
|
|
+ CAST(
|
|
|
+ SUBSTRING_INDEX(
|
|
|
+ SUBSTRING_INDEX(
|
|
|
+ node.PARAMETERS,
|
|
|
+ '"clmt":',
|
|
|
+ -1
|
|
|
+ ),
|
|
|
+ ',',
|
|
|
+ 1
|
|
|
+ ) AS UNSIGNED
|
|
|
+ ) = 1
|
|
|
+ AND
|
|
|
+ CAST(
|
|
|
+ SUBSTRING_INDEX(
|
|
|
+ SUBSTRING_INDEX(
|
|
|
+ node.PARAMETERS,
|
|
|
+ '"asset_id_cpoy":',
|
|
|
+ -1
|
|
|
+ ),
|
|
|
+ ',',
|
|
|
+ 1
|
|
|
+ ) AS UNSIGNED
|
|
|
+ )
|
|
|
+ </when>
|
|
|
+ <when test="@tech.qiantong.qdata.mybatis.config.MasterDataSourceConfig@getDatabaseType() == 'dm8'">
|
|
|
+ TO_NUMBER(
|
|
|
+ REGEXP_SUBSTR(node.PARAMETERS,
|
|
|
+ '"clmt"[[:space:]]*:[[:space:]]*"?([0-9]+)"?',
|
|
|
+ 1, 1, NULL, 1)
|
|
|
+ )=1 AND
|
|
|
+ TO_NUMBER(
|
|
|
+ REGEXP_SUBSTR(node.PARAMETERS,
|
|
|
+ '"asset_id_cpoy"[[:space:]]*:[[:space:]]*([0-9]+)',
|
|
|
+ 1, 1, NULL, 1)
|
|
|
+ )
|
|
|
+ </when>
|
|
|
+ </choose>
|
|
|
+ in
|
|
|
+ <foreach item="id" collection="assetIdList" open="(" separator="," close=")">
|
|
|
+ #{id}
|
|
|
+ </foreach>
|
|
|
|
|
|
- );
|
|
|
+ );
|
|
|
</select>
|
|
|
|
|
|
<select id="getDppEtlTaskPage" resultType="com.ruoyi.model.dpp.controller.etl.vo.DppEtlTaskRespVO">
|
|
|
@@ -310,7 +337,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
t2.NAME AS catName,
|
|
|
t3.CRON_EXPRESSION AS cronExpression,
|
|
|
t3.STATUS AS schedulerState ,
|
|
|
- (SELECT MAX(ti.CREATE_TIME) FROM DPP_ETL_TASK_INSTANCE ti WHERE ti.TASK_CODE = t.CODE AND ti.DEL_FLAG = '0') AS lastExecuteTime
|
|
|
+ (SELECT MAX(ti.CREATE_TIME) FROM DPP_ETL_TASK_INSTANCE ti WHERE ti.TASK_CODE = t.CODE AND ti.DEL_FLAG = '0') AS
|
|
|
+ lastExecuteTime
|
|
|
<if test="params.type == '3'.toString()">
|
|
|
<choose>
|
|
|
<when test="@tech.qiantong.qdata.mybatis.config.MasterDataSourceConfig@getDatabaseType() == 'dm8'">
|
|
|
@@ -336,7 +364,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</when>
|
|
|
</choose>
|
|
|
t2 on t.CAT_CODE = t2.CODE AND t2.DEL_FLAG = '0'
|
|
|
- LEFT JOIN DPP_ETL_SCHEDULER t3 ON t.id = t3.task_id AND t3.DEL_FLAG = '0'
|
|
|
+ LEFT JOIN DPP_ETL_SCHEDULER t3 ON t.id = t3.task_id AND t3.DEL_FLAG = '0'
|
|
|
WHERE
|
|
|
t.DEL_FLAG = '0'
|
|
|
AND t.STATUS NOT IN ('-2', '-3')
|
|
|
@@ -397,6 +425,51 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</choose>
|
|
|
</if>
|
|
|
</select>
|
|
|
+ <select id="selectPage" resultType="com.ruoyi.model.dpp.dal.dataobject.etl.DppEtlTaskDO">
|
|
|
+ SELECT
|
|
|
+ t.*,
|
|
|
+ t2.NAME AS catName,
|
|
|
+ t3.CRON_EXPRESSION AS cronExpression,
|
|
|
+ t3.STATUS AS schedulerState,
|
|
|
+ (SELECT MAX(ti.CREATE_TIME) FROM DPP_ETL_TASK_INSTANCE ti WHERE ti.TASK_CODE = t.CODE AND ti.DEL_FLAG = '0') AS lastExecuteTime
|
|
|
+ FROM DPP_ETL_TASK t
|
|
|
+ LEFT JOIN ${tableName} t2 on t.CAT_CODE = t2.CODE AND t2.DEL_FLAG = '0'
|
|
|
+ LEFT JOIN DPP_ETL_SCHEDULER t3 ON t.id = t3.task_id AND t3.DEL_FLAG = '0'
|
|
|
+ WHERE t.status != '-2' AND t.status != '-3'
|
|
|
+ <if test="type != null and type != ''">
|
|
|
+ AND t.type = #{type}
|
|
|
+ </if>
|
|
|
+ <if test="catCode != null and catCode != ''">
|
|
|
+ AND t.CAT_CODE like CONCAT(#{catCode}, '%')
|
|
|
+ </if>
|
|
|
+ <if test="name != null and name != ''">
|
|
|
+ AND t.name like CONCAT('%', #{name}, '%')
|
|
|
+ </if>
|
|
|
+ <if test="projectId != null and projectId != ''">
|
|
|
+ AND t.PROJECT_ID = #{projectId}
|
|
|
+ </if>
|
|
|
+ <if test="projectCode != null and projectCode != ''">
|
|
|
+ AND t.PROJECT_CODE = #{projectCode}
|
|
|
+ </if>
|
|
|
+ <if test="personCharge != null and personCharge != ''">
|
|
|
+ AND t.PERSON_CHARGE = #{personCharge}
|
|
|
+ </if>
|
|
|
+ <if test="locations != null and locations != ''">
|
|
|
+ AND t.LOCATIONS = #{locations}
|
|
|
+ </if>
|
|
|
+ <if test="description != null and description != ''">
|
|
|
+ AND t.DESCRIPTION = #{description}
|
|
|
+ </if>
|
|
|
+ <if test="status != null and status != ''">
|
|
|
+ AND t.STATUS = #{status}
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
+ <select id="getByTaskId" resultType="com.ruoyi.model.dpp.dal.dataobject.etl.DppEtlTaskDO">
|
|
|
+ SELECT t.*, t3.NICK_NAME AS personChargeName
|
|
|
+ FROM DPP_ETL_TASK t
|
|
|
+ LEFT JOIN SYS_USER t3 on t.PERSON_CHARGE = t3.USER_ID AND t3.DEL_FLAG = '0'
|
|
|
+ where t.id = #{id}
|
|
|
+ </select>
|
|
|
|
|
|
<resultMap id="DppEtlTaskDOResultMap" type="com.ruoyi.model.dpp.dal.dataobject.etl.DppEtlTaskDO">
|
|
|
<!-- 主表字段映射 -->
|