From ed4f78cccbb2cf672d6b3230069979288232ab4a Mon Sep 17 00:00:00 2001
From: 潘志宝 <979469083@qq.com>
Date: 星期一, 04 十一月 2024 08:25:28 +0800
Subject: [PATCH] 计划数据

---
 iailab-module-model/iailab-module-model-biz/src/main/resources/mapper/mcs/MmPredictItemDao.xml |   71 +++++++++++++++++++++++++++++------
 1 files changed, 58 insertions(+), 13 deletions(-)

diff --git a/iailab-module-model/iailab-module-model-biz/src/main/resources/mapper/mcs/MmPredictItemDao.xml b/iailab-module-model/iailab-module-model-biz/src/main/resources/mapper/mcs/MmPredictItemDao.xml
index ecf1ecb..735b599 100644
--- a/iailab-module-model/iailab-module-model-biz/src/main/resources/mapper/mcs/MmPredictItemDao.xml
+++ b/iailab-module-model/iailab-module-model-biz/src/main/resources/mapper/mcs/MmPredictItemDao.xml
@@ -22,6 +22,51 @@
         <result property="expression" column="EXPRESSION"/>
     </resultMap>
 
+    <select id="getPageList" resultType="com.iailab.module.model.mcs.pre.vo.MmPredictItemRespVO"
+            parameterType="map">
+        SELECT
+        TMPI.ID,
+        TMPI.ITEMNO,
+        TMPI.ITEMNAME,
+        TMPI.ITEMTYPEID,
+        TMIT.ITEMTYPENAME,
+        TMPI.PREDICTLENGTH,
+        TMPI.GRANULARITY,
+        TMPI.ISFUSE,
+        TMPI.WORKCHECKED,
+        TDMI.MODULEID,
+        TDMI.ITEMORDER,
+        TMPI.STATUS,
+        TDMI.CATEGORYID,
+        TMIO.POINTID,
+        TMIO.TAGNAME,
+        TMIO.RESULTTABLEID,
+        TMRT.TABLENAME
+        FROM T_MM_PREDICT_ITEM TMPI
+        LEFT JOIN T_MM_ITEM_TYPE TMIT ON TMIT.ID = TMPI.ITEMTYPEID
+        LEFT JOIN T_DM_MODULE_ITEM TDMI ON TDMI.ITEMID = TMPI.ID
+        LEFT JOIN T_MM_ITEM_OUTPUT TMIO ON TMIO.ITEMID = TMPI.ID
+        LEFT JOIN T_MM_RESULT_TABLE TMRT ON TMRT.ID = TMIO.RESULTTABLEID
+        <where>
+            <if test="params.itemno != null and params.itemno != ''">
+                AND TMPI.ITEMNO LIKE CONCAT('%', #{params.itemno},'%')
+            </if>
+            <if test="params.itemname != null and params.itemname != ''">
+                AND TMPI.ITEMNAME LIKE CONCAT('%', #{params.itemname},'%')
+            </if>
+            <if test="params.itemtypeid != null and params.itemtypeid != ''">
+                AND TMPI.ITEMTYPEID = #{params.itemtypeid}
+            </if>
+            <if test="params.itemtypename != null and params.itemtypename != ''">
+                AND TMIT.ITEMTYPENAME = #{params.itemtypename}
+            </if>
+            <if test="params.status != null and params.status != ''">
+                AND TMPI.STATUS = #{params.status}
+            </if>
+        </where>
+        ORDER BY TMPI.CREATE_TIME DESC
+    </select>
+
     <select id="queryList" resultType="com.iailab.module.model.mcs.pre.vo.MmPredictItemRespVO" parameterType="map">
         SELECT
         TMPI.ID,
@@ -34,7 +79,7 @@
         TMPI.WORKCHECKED,
         TDMI.MODULEID,
         TDMI.ITEMORDER,
-        TDMI.STATUS,
+        TMPI.STATUS,
         TDMI.CATEGORYID,
         TMIO.POINTID,
         TMIO.TAGNAME,
@@ -46,20 +91,20 @@
         LEFT JOIN T_MM_ITEM_OUTPUT TMIO ON TMIO.ITEMID = TMPI.ID
         LEFT JOIN T_MM_RESULT_TABLE TMRT ON TMRT.ID = TMIO.RESULTTABLEID
         WHERE 1 = 1
-        <if test="params.itemno != null and params.itemno != ''">
-            AND TMPI.ITEMNO LIKE CONCAT('%', #{params.itemno},'%')
+        <if test="itemno != null and itemno != ''">
+            AND TMPI.ITEMNO LIKE CONCAT('%', #{itemno},'%')
         </if>
-        <if test="params.itemname != null and params.itemname != ''">
-            AND TMPI.ITEMNAME LIKE CONCAT('%', #{params.itemname},'%')
+        <if test="itemname != null and itemname != ''">
+            AND TMPI.ITEMNAME LIKE CONCAT('%', #{itemname},'%')
         </if>
-        <if test="params.itemtypeid != null and params.itemtypeid != ''">
-            AND TMPI.ITEMTYPEID = #{params.itemtypeid}
+        <if test="itemtypeid != null and itemtypeid != ''">
+            AND TMPI.ITEMTYPEID = #{itemtypeid}
         </if>
-        <if test="params.itemtypename != null and params.itemtypename != ''">
-            AND TMIT.ITEMTYPENAME = #{params.itemtypename}
+        <if test="itemtypename != null and itemtypename != ''">
+            AND TMIT.ITEMTYPENAME = #{itemtypename}
         </if>
-        <if test="params.status != null and params.status != ''">
-            AND TDMI.STATUS = #{params.status}
+        <if test="status != null and status != ''">
+            AND TMPI.STATUS = #{status}
         </if>
         ORDER BY TMPI.CREATE_TIME DESC
     </select>
@@ -99,8 +144,8 @@
         t1.predictphase,
         t1.workchecked
         FROM
-        ${TABLESCHEMA}.t_mm_predict_item t1,
-        ${TABLESCHEMA}.t_mm_item_type t2
+        t_mm_predict_item t1,
+        t_mm_item_type t2
         WHERE t1.itemtypeid=t2.id
         <if test="ITEMID != null and ITEMID != ''">
             AND t1.id=#{ITEMID}

--
Gitblit v1.9.3