From dcc799551b532fa29d64f5f2cb614f5b80b233f6 Mon Sep 17 00:00:00 2001
From: zhangyong <517047165@qq.com>
Date: 星期二, 26 十一月 2024 13:23:55 +0800
Subject: [PATCH] 义乌项目:增加响应PLC钢化进炉请求逻辑,以及向钢化炉下发参数逻辑

---
 hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/resources/mapper/BigStorageCageInTaskMapper.xml |   25 +++++++++++++++++--------
 1 files changed, 17 insertions(+), 8 deletions(-)

diff --git a/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/resources/mapper/BigStorageCageInTaskMapper.xml b/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/resources/mapper/BigStorageCageInTaskMapper.xml
index a66770d..84a0817 100644
--- a/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/resources/mapper/BigStorageCageInTaskMapper.xml
+++ b/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/resources/mapper/BigStorageCageInTaskMapper.xml
@@ -1,28 +1,37 @@
 <?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.mes.bigstoragecageIntask.mapper.BigStorageCageInTaskMapper">
+<mapper namespace="com.mes.bigstoragecagetask.mapper.BigStorageCageTaskMapper">
 
-    <resultMap id="baseMap" type="com.mes.bigstoragecageIntask.entity.BigStorageCageInTask">
-        <id column="task_running" property="taskRunning"/>
+    <resultMap id="baseMap" type="com.mes.bigstoragecagetask.entity.BigStorageCageTask">
         <result column="glass_id" property="glassId"/>
         <result column="start_slot" property="startSlot"/>
         <result column="target_slot" property="targetSlot"/>
         <result column="task_state" property="taskState"/>
     </resultMap>
+    <insert id="saveTaskMessage">
+        INSERT INTO ${tableName} (glass_id, start_slot, target_slot,task_state)
+        VALUES
+        <foreach collection="list" item="item" index="index" separator=",">
+            (#{item.glassId}, #{item.startSlot},#{item.targetSlot},#{item.taskState})
+        </foreach>
+    </insert>
+    <delete id="removeAll">
+        delete
+        from ${tableName}
+    </delete>
 
     <select id="queryTaskMessage" resultMap="baseMap">
         select *
         from ${tableName}
         where glass_id is not null
-           or glass_id != ''
+          and glass_id != ''
     </select>
+
 
     <update id="updateTaskMessage">
         UPDATE ${tableName}
-        SET task_running = #{task.taskRunning},
-            glass_id     = #{task.glassId},
-            start_slot   = #{task.startSlot},
-            target_slot  = #{task.targetSlot}
+        SET target_slot = #{task.targetSlot}
+        where glass_id = #{task.glassId}
     </update>
 
 

--
Gitblit v1.8.0