From d6543f14bd9b7d24d95c7206411397a6f29894a7 Mon Sep 17 00:00:00 2001
From: zhoushihao <zsh19950802@163.com>
Date: 星期三, 14 八月 2024 17:41:14 +0800
Subject: [PATCH] 1、fixbug 2、关闭向plc发送出片请求
---
hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/resources/mapper/DownGlassInfoMapper.xml | 93 ++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 93 insertions(+), 0 deletions(-)
diff --git a/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/resources/mapper/DownGlassInfoMapper.xml b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/resources/mapper/DownGlassInfoMapper.xml
new file mode 100644
index 0000000..c633e7d
--- /dev/null
+++ b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/resources/mapper/DownGlassInfoMapper.xml
@@ -0,0 +1,93 @@
+<?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.downglassinfo.mapper.DownGlassInfoMapper">
+
+ <resultMap id="downGlassInfoDTO" type="com.mes.downworkstation.entity.dto.DownGlassInfoDTO">
+ <result column="flow_card_id" property="flowCardId"/>
+ <result column="layer" property="layer"/>
+ <result column="count" property="count"/>
+ </resultMap>
+ <resultMap id="downGlassInfo" type="com.mes.downworkstation.entity.dto.DownGlassInfoDTO">
+ <result column="flow_card_id" property="flowCardId"/>
+ <result column="layer" property="layer"/>
+ <result column="racks_number" property="racksNumber"/>
+ <collection property="glassInfoList" ofType="com.mes.glassinfo.entity.GlassInfo">
+ <id column="id" property="id"/>
+ <result column="flow_card_id" property="flowCardId"/>
+ <result column="glass_type" property="glassType"/>
+ <result column="width" property="width"/>
+ <result column="height" property="height"/>
+ <result column="thickness" property="thickness"/>
+ <result column="filmsid" property="filmsid"/>
+ <result column="total_layer" property="totalLayer"/>
+ <result column="layer" property="layer"/>
+ </collection>
+ </resultMap>
+
+ <select id="queryDownGlassMaxLayer" resultMap="downGlassInfoDTO">
+ SELECT flow_card_id,
+ layer,
+ COUNT(layer) AS count
+ FROM
+ down_glass_info
+ WHERE
+ flow_card_id = #{flowCardId}
+ GROUP BY
+ flow_card_id,
+ layer
+ order by count desc limit 1
+ </select>
+ <select id="queryMaxSequence" resultType="java.lang.Integer">
+ SELECT COALESCE(max(sequence) + 1, 1) as sequence
+ FROM down_glass_info
+ WHERE flow_card_id = #{flowCardId}
+ AND layer = #{layer}
+ </select>
+
+ <select id="queryWorkStationIsIn" resultMap="downGlassInfo">
+ SELECT
+ T.FLOW_CARD_ID,
+ T.LAYER,
+ T.RACKS_NUMBER
+ <if test="!isDownload">
+ ,T1.*
+ </if>
+ FROM
+ DOWN_WORKSTATION T
+ INNER JOIN GLASS_INFO T1 ON T.FLOW_CARD_ID = T1.FLOW_CARD_ID
+ AND T.LAYER = T1.LAYER
+ LEFT JOIN DOWN_GLASS_INFO T2 ON T1.GLASS_ID = T2.GLASS_ID
+ <where>
+ t.workstation_id in
+ <foreach collection="workList" item="item" open='(' close=')' separator=','>
+ #{item}
+ </foreach>
+ <if test="!isDownload">
+ AND T2.GLASS_ID IS NULL
+ </if>
+ <if test="isDownload">
+ AND T2.GLASS_ID IS not NULL
+ </if>
+
+ </where>
+ ORDER BY
+ T.RACKS_NUMBER DESC,
+ T1.TEMPERING_LAYOUT_ID,
+ T1.TEMPERING_FEED_SEQUENCE DESC
+ </select>
+ <select id="queryWorkStationFlowCard" resultMap="downGlassInfo">
+ SELECT
+ T.FLOW_CARD_ID,
+ T.LAYER,
+ T.RACKS_NUMBER
+ FROM
+ DOWN_WORKSTATION T
+ where
+ (t.flow_card_id is not null and t.flow_card_id != '')
+ and t.workstation_id in
+ <foreach collection="workList" item="item" open='(' close=')' separator=','>
+ #{item}
+ </foreach>
+ ORDER BY T.RACKS_NUMBER DESC
+ </select>
+</mapper>
\ No newline at end of file
--
Gitblit v1.8.0