From 3180878150f6e22b30394f745008d81cb80af12d Mon Sep 17 00:00:00 2001 From: Jay <csj123456> Date: 星期四, 17 四月 2025 13:58:02 +0800 Subject: [PATCH] 新增累计真实值和累计预测值的导出 --- iailab-module-model/iailab-module-model-biz/src/main/resources/mapper/pre/MmPredictInfluenceFactorDao.xml | 96 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 96 insertions(+), 0 deletions(-) diff --git a/iailab-module-model/iailab-module-model-biz/src/main/resources/mapper/pre/MmPredictInfluenceFactorDao.xml b/iailab-module-model/iailab-module-model-biz/src/main/resources/mapper/pre/MmPredictInfluenceFactorDao.xml new file mode 100644 index 0000000..7ecb944 --- /dev/null +++ b/iailab-module-model/iailab-module-model-biz/src/main/resources/mapper/pre/MmPredictInfluenceFactorDao.xml @@ -0,0 +1,96 @@ +<?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.iailab.module.model.mcs.pre.dao.MmPredictInfluenceFactorDao"> + <resultMap id="influenceFactor" type="com.iailab.module.model.mcs.pre.vo.MmPredictInfluenceFactorConfigVO"> + <id property="id" column="id"/> + <result property="outputId" column="output_id"/> + <result property="outputName" column="output_name"/> + <result property="pattern" column="pattern"/> + <result property="isEnable" column="is_enable"/> + <result property="createTime" column="create_time"/> + <collection property="influenceFactors" ofType="com.iailab.module.model.mcs.pre.vo.MmPredictInfluenceFactorVO"> + <id property="id" column="factors_id"/> + <result property="factorOutputId" column="factor_output_id"/> + <result property="factorOutputName" column="factor_output_name"/> + <result property="deviationValue" column="deviation_value"/> + </collection> + </resultMap> + <insert id="insertInfluenceFactor" parameterType="com.iailab.module.model.mcs.pre.vo.MmPredictInfluenceFactorVO"> + INSERT INTO + t_mm_predict_influence_factor + (id,config_id,factor_output_id,deviation_value) + VALUES + <foreach collection="list" item="item" separator=","> + (#{item.id},#{item.configId},#{item.factorOutputId},#{item.deviationValue}) + </foreach> + </insert> + + <select id="getPage" resultMap="influenceFactor"> + SELECT + t1.id, + t1.output_id, + t3.result_name output_name, + t1.pattern, + t1.is_enable, + t1.create_time, + t2.id factors_id, + t2.factor_output_id, + t4.result_name factor_output_name, + t2.deviation_value + FROM + t_mm_predict_influence_factor_config t1 + LEFT JOIN t_mm_predict_influence_factor t2 ON t1.id = t2.config_id + LEFT JOIN t_mm_item_output t3 ON t1.output_id = t3.id + LEFT JOIN t_mm_item_output t4 ON t2.factor_output_id = t4.id + <where> + <if test="params.outputName != null and params.outputName != ''"> + and t3.result_name like CONCAT('%', #{params.outputName},'%') + </if> + <if test="params.pattern != null and params.pattern != ''"> + and t1.pattern = #{params.pattern} + </if> + </where> + order by t1.create_time desc + </select> + <select id="getInfo" resultMap="influenceFactor" parameterType="java.lang.String"> + SELECT + t1.id, + t1.output_id, + t3.result_name output_name, + t1.pattern, + t1.is_enable, + t1.create_time, + t2.id factors_id, + t2.factor_output_id, + t2.deviation_value + FROM + t_mm_predict_influence_factor_config t1 + LEFT JOIN t_mm_predict_influence_factor t2 ON t1.id = t2.config_id + LEFT JOIN t_mm_item_output t3 on t1.output_id = t3.id + where t1.id = #{id} + </select> + <select id="selectList" resultType="com.iailab.module.model.mcs.pre.vo.MmPredictInfluenceFactorHandleVO" parameterType="map"> + SELECT + t2.id, + t2.factor_output_id, + t2.deviation_value, + t1.pattern, + t3.pointid, + t4.predictlength, + t4.granularity + FROM + t_mm_predict_influence_factor_config t1 + LEFT JOIN t_mm_predict_influence_factor t2 ON t1.id = t2.config_id + LEFT JOIN t_mm_item_output t3 ON t2.factor_output_id = t3.id + LEFT JOIN t_mm_predict_item t4 ON t3.itemid = t4.id + <where> + <if test="params.isEnable != null and params.isEnable != ''"> + and t1.is_enable = #{params.isEnable} + </if> + <if test="params.pattern != null and params.pattern != ''"> + and t1.pattern = #{params.pattern} + </if> + </where> + order by t1.create_time desc + </select> +</mapper> \ No newline at end of file -- Gitblit v1.9.3