1、大理片笼详情表新增膜系字段
2、钢化查询接口改造:0非钢查询 1 钢化查询
3、指定钢化界面新增接口缺少详情接口:点击可查看当前工程+流程下缺失的玻璃信息 ,isdamage是否破损,当为1的时候无破损按钮 ,0时可以有破损按钮
6个文件已修改
3个文件已添加
255 ■■■■ 已修改文件
hangzhoumesParent/common/servicebase/src/main/java/com/mes/base/entity/BigStorageCageBaseInfo.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/bigstorage/controller/BigStorageCageDetailsController.java 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/bigstorage/entity/dto/GlassInfoLackDTO.java 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/bigstorage/entity/dto/TemperingGlassCountDTO.java 46 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/bigstorage/entity/vo/BigStorageQueryVO.java 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/bigstorage/mapper/BigStorageCageDetailsMapper.java 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/bigstorage/service/BigStorageCageDetailsService.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/bigstorage/service/impl/BigStorageCageDetailsServiceImpl.java 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/resources/mapper/BigStorageCageDetailsMapper.xml 118 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/common/servicebase/src/main/java/com/mes/base/entity/BigStorageCageBaseInfo.java
@@ -43,6 +43,11 @@
     */
    @ApiModelProperty(value = "高")
    private double height;
    /**
     * 膜系
     */
    @ApiModelProperty(value = "膜系")
    private String filmsId;
    /**
     * 格子号
hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/bigstorage/controller/BigStorageCageDetailsController.java
@@ -4,9 +4,13 @@
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.mes.bigstorage.entity.BigStorageCageDetails;
import com.mes.bigstorage.entity.dto.GlassInfoLackDTO;
import com.mes.bigstorage.entity.dto.TemperingGlassCountDTO;
import com.mes.bigstorage.entity.vo.BigStorageQueryVO;
import com.mes.bigstorage.service.BigStorageCageDetailsService;
import com.mes.bigstorage.service.BigStorageCageService;
import com.mes.common.config.Const;
import com.mes.glassinfo.entity.GlassInfo;
import com.mes.utils.RedisUtil;
import com.mes.utils.Result;
import io.swagger.annotations.Api;
@@ -100,10 +104,16 @@
        }
    }
    @ApiOperation("钢化查询")
    @ApiOperation("钢化/非钢化查询:0 非钢化  1:钢化")
    @PostMapping("/selectTemperingGlass")
    public Result selectTemperingGlass() {
        return Result.build(200, "查询成功", bigStorageCageDetailsService.selectTemperingGlass());
    public Result<List<TemperingGlassCountDTO>> selectTemperingGlass(int isTempering) {
        return Result.build(200, "查询成功", bigStorageCageDetailsService.selectTemperingGlass(isTempering));
    }
    @ApiOperation("缺片数量查询")
    @PostMapping("/queryLackGlassInfo")
    public Result<List<GlassInfoLackDTO>> queryLackGlassInfo(@RequestBody BigStorageQueryVO bigStorageQueryVO) {
        return Result.build(200, "查询成功", bigStorageCageDetailsService.queryLackGlassInfo(bigStorageQueryVO));
    }
    @ApiOperation("是否调度开关")
hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/bigstorage/entity/dto/GlassInfoLackDTO.java
New file
@@ -0,0 +1,18 @@
package com.mes.bigstorage.entity.dto;
import com.mes.glassinfo.entity.GlassInfo;
import lombok.Data;
/**
 * @Author : zhoush
 * @Date: 2024/12/16 16:17
 * @Description:
 */
@Data
public class GlassInfoLackDTO extends GlassInfo {
    /**
     * 是否破损
     */
    private int isDamage;
}
hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/bigstorage/entity/dto/TemperingGlassCountDTO.java
New file
@@ -0,0 +1,46 @@
package com.mes.bigstorage.entity.dto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
 * @Author : zhoush
 * @Date: 2024/11/25 18:53
 * @Description:
 */
@Data
public class TemperingGlassCountDTO {
    /**
     * 工程号
     */
    private String engineerId;
    /**
     * 钢化版图id
     */
    private Integer temperingLayoutId;
    /**
     * 膜系
     */
    private String filmsId;
    /**
     * /*厚度
     */
    private Double thickness;
    /**
     * 总片数
     */
    private Integer totalCount;
    /**
     * 实际片数
     */
    private Integer realCount;
    /**
     * 破损片数
     */
    private Integer damageCount;
    /**
     * 缺少片数
     */
    private Integer lackCount;
}
hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/bigstorage/entity/vo/BigStorageQueryVO.java
New file
@@ -0,0 +1,21 @@
package com.mes.bigstorage.entity.vo;
import lombok.Data;
/**
 * @Author : zhoush
 * @Date: 2024/6/13 15:51
 * @Description:
 */
@Data
public class BigStorageQueryVO {
    /**
     * 钢化版图id
     */
    private String engineerId;
    /**
     * 钢化版图id
     */
    private Integer temperingLayoutId;
}
hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/bigstorage/mapper/BigStorageCageDetailsMapper.java
@@ -2,10 +2,8 @@
import com.github.yulichang.base.MPJBaseMapper;
import com.mes.bigstorage.entity.BigStorageCageDetails;
import com.mes.bigstorage.entity.dto.BigStorageRelationDTO;
import com.mes.bigstorage.entity.dto.BigStorageSequenceDTO;
import com.mes.bigstorage.entity.dto.SlotSequenceDTO;
import com.mes.bigstorage.entity.dto.TemperingLayoutDTO;
import com.mes.bigstorage.entity.dto.*;
import com.mes.bigstorage.entity.vo.BigStorageQueryVO;
import com.mes.bigstoragetask.entity.UpdateBigStorageCageDTO;
import org.apache.ibatis.annotations.Param;
@@ -48,9 +46,11 @@
     */
    void updateBySlot(@Param(value = "list") List<UpdateBigStorageCageDTO> glassList, @Param(value = "state") int state);
    List<Map<String, Object>> selectTemperingGlassCount();
    List<TemperingGlassCountDTO> selectTemperingGlassCount(int isTempering);
    List<BigStorageRelationDTO> queryIsAllNeedDispatchVirtualSlot();
    List<BigStorageSequenceDTO> queryNeedDispatchSlot(BigStorageRelationDTO bigStorageRelationDTO);
    List<GlassInfoLackDTO> queryLackGlassInfo(BigStorageQueryVO bigStorageQueryVO);
}
hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/bigstorage/service/BigStorageCageDetailsService.java
@@ -3,6 +3,7 @@
import com.baomidou.mybatisplus.extension.service.IService;
import com.mes.bigstorage.entity.BigStorageCageDetails;
import com.mes.bigstorage.entity.dto.*;
import com.mes.bigstorage.entity.vo.BigStorageQueryVO;
import com.mes.bigstoragetask.entity.UpdateBigStorageCageDTO;
import com.mes.glassinfo.entity.GlassInfo;
@@ -69,7 +70,7 @@
    boolean temperingGlass(String temperingLayoutId, String engineerId, String temperingFeedSequence);
    List<Map<String, Object>> selectTemperingGlass();
    List<TemperingGlassCountDTO> selectTemperingGlass(int isTempering);
    void updateBySlot(List<UpdateBigStorageCageDTO> glassList, int state);
@@ -82,4 +83,11 @@
    List<BigStorageSequenceDTO> dispatchBigStorageGlassInfo(BigStorageRelationDTO bigStorageRelationDTO);
    String dispatchSwitch(Boolean flag);
    /**
     * 按照工程信息及钢化id(炉号)获取缺少的玻璃信息
     * @param bigStorageQueryVO
     * @return
     */
    List<GlassInfoLackDTO> queryLackGlassInfo(BigStorageQueryVO bigStorageQueryVO);
}
hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/bigstorage/service/impl/BigStorageCageDetailsServiceImpl.java
@@ -9,6 +9,7 @@
import com.mes.bigstorage.entity.BigStorageCage;
import com.mes.bigstorage.entity.BigStorageCageDetails;
import com.mes.bigstorage.entity.dto.*;
import com.mes.bigstorage.entity.vo.BigStorageQueryVO;
import com.mes.bigstorage.mapper.BigStorageCageDetailsMapper;
import com.mes.bigstorage.service.BigStorageCageDetailsService;
import com.mes.bigstorage.service.BigStorageCageService;
@@ -419,9 +420,8 @@
    @Override
    public List<Map<String, Object>> selectTemperingGlass() {
        List<Map<String, Object>> temperingGlass = baseMapper.selectTemperingGlassCount();
        return temperingGlass;
    public List<TemperingGlassCountDTO> selectTemperingGlass(int isTempering) {
        return baseMapper.selectTemperingGlassCount(isTempering);
    }
    @Override
@@ -436,6 +436,11 @@
    }
    @Override
    public List<GlassInfoLackDTO> queryLackGlassInfo(BigStorageQueryVO bigStorageQueryVO) {
        return baseMapper.queryLackGlassInfo(bigStorageQueryVO);
    }
    @Override
    public String temperingSwitch(Boolean flag) {
        redisUtil.setCacheObject("temperingSwitch", flag);
        return "success";
hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/resources/mapper/BigStorageCageDetailsMapper.xml
@@ -30,6 +30,35 @@
        <result column="min_sequence" property="minSequence"/>
    </resultMap>
    <resultMap id="temperingGlassCount" type="com.mes.bigstorage.entity.dto.TemperingGlassCountDTO">
        <result column="engineer_id" property="engineerId"/>
        <result column="tempering_layout_id" property="temperingLayoutId"/>
        <result column="films_id" property="filmsId"/>
        <result column="thickness" property="thickness"/>
        <result column="total_count" property="totalCount"/>
        <result column="real_count" property="realCount"/>
        <result column="damage_count" property="damageCount"/>
        <result column="lack_count" property="lackCount"/>
    </resultMap>
    <resultMap id="glassInfoLackDTO" type="com.mes.bigstorage.entity.dto.GlassInfoLackDTO">
        <result column="flow_card_id" property="flowCardId"/>
        <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"/>
        <result column="tempering_layout_id" property="temperingLayoutId"/>
        <result column="tempering_feed_sequence" property="temperingFeedSequence"/>
        <result column="x_coordinate" property="xCoordinate"/>
        <result column="y_coordinate" property="yCoordinate"/>
        <result column="angle" property="angle"/>
        <result column="engineer_id" property="engineerId"/>
        <result column="glass_id" property="glassId"/>
        <result column="is_damage" property="isDamage"/>
    </resultMap>
    <select id="temperingIsAll" resultMap="temperingLayoutDTO">
        SELECT T2.*
        FROM (
@@ -103,27 +132,50 @@
        </where>
    </update>
    <select id="selectTemperingGlassCount" resultType="java.util.Map">
        select a.engineer_id,
               a.tempering_layout_id,
               count2,
               count1,
               count2 - count1   as count3,
               count(c.glass_id) as count4
        from (select engineer_id, tempering_layout_id, count(*) as count1
    <select id="selectTemperingGlassCount" resultMap="temperingGlassCount">
        with glass_info_temp as (
        select engineer_id, tempering_layout_id, count(*) as total_count
        from glass_info
        group by engineer_id, tempering_layout_id
        ),
        big_details_temp as (
        select engineer_id, tempering_layout_id, count(*) as real_count, films_id, thickness
              from big_storage_cage_details
              where state = 100
              group by engineer_id, tempering_layout_id) as a
                 left join
             (select engineer_id, tempering_layout_id, count(*) as count2
              from glass_info
              group by engineer_id, tempering_layout_id) as b
             on a.engineer_id = b.engineer_id and a.tempering_layout_id = b.tempering_layout_id
                 left join damage as c
                           on a.engineer_id = c.engineer_id and a.tempering_layout_id = c.tempering_layout_id and
                              (type = 8 or type = 9)
        group by a.engineer_id, a.tempering_layout_id
        order by a.engineer_id, a.tempering_layout_id
        <if test="isTempering == 0">
            and tempering_layout_id = 0
        </if>
        <if test="isTempering == 1">
            and tempering_layout_id != 0
        </if>
        group by engineer_id, tempering_layout_id, films_id, thickness
        ),
        damage_temp as (
        select engineer_id, tempering_layout_id, count(*) as damage_count
        from damage
        where type in(8,9)
        group by engineer_id, tempering_layout_id
        ),
        result as (
        select t.engineer_id,
        t.tempering_layout_id,
        t.films_id,
        t.thickness,
        total_count,
        real_count,
        ifnull(damage_count, 0) as damage_count,
        total_count - real_count - ifnull(damage_count, 0) as lack_count
        from big_details_temp t
        inner join glass_info_temp t1 on t.engineer_id = t1.engineer_id and
        t.tempering_layout_id = t1.tempering_layout_id
        left join damage_temp t2
        on t.engineer_id = t2.engineer_id and t.tempering_layout_id = t2.tempering_layout_id
        )
        select *
        from result
        order by engineer_id
    </select>
    <select id="queryIsAllNeedDispatchVirtualSlot" resultMap="virtualSlotSequenceDTO">
@@ -172,4 +224,32 @@
        group by t.slot
        order by max_sequence desc
    </select>
    <select id="queryLackGlassInfo" resultMap="glassInfoLackDTO">
        WITH glass_info_temp AS (SELECT *
                                 FROM glass_info
                                 WHERE engineer_id = #{engineerId} AND tempering_layout_id = #{temperingLayoutId}),
             big_details_temp AS (SELECT *
                                  FROM big_storage_cage_details
                                  WHERE state = 100 AND engineer_id = #{engineerId} AND tempering_layout_id =  #{temperingLayoutId}),
             damage_temp AS (SELECT *
                             FROM damage
                             WHERE type IN (8, 9) AND engineer_id = #{engineerId} AND tempering_layout_id =  #{temperingLayoutId}),
             result_lack AS (SELECT t.*
                             FROM glass_info_temp t
                                      LEFT JOIN big_details_temp t1 ON t.glass_id = t1.glass_id
                             WHERE t1.glass_id IS NULL),
             result AS (
                 SELECT t.*,
                        CASE
                            WHEN t1.glass_id is null THEN
                                0
                            ELSE 1
                            END AS is_damage
                 FROM result_lack t
                          LEFT JOIN damage_temp t1 ON t.glass_id = t1.glass_id
             )
        SELECT *
        FROM result
    </select>
</mapper>