From 0aef9abcba7f6e2cd41e330f397760cb8147c9b7 Mon Sep 17 00:00:00 2001
From: zhoushihao <zsh19950802@163.com>
Date: 星期四, 18 七月 2024 08:38:53 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/resources/mapper/DownGlassInfoMapper.xml | 73 ++++++++++++++++++++++++++++++++++++
1 files changed, 73 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..32bca1a
--- /dev/null
+++ b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/resources/mapper/DownGlassInfoMapper.xml
@@ -0,0 +1,73 @@
+<?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, 0) 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>
+ <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>
+</mapper>
\ No newline at end of file
--
Gitblit v1.8.0