wangfei
2025-11-04 aea7379082d3a9d53a35f62e8ff435254be8d213
Merge branch 'master' of http://10.153.19.25:10105/r/YiWuProject
18个文件已修改
479 ■■■■ 已修改文件
hangzhoumesParent/common/springsecurity/src/main/java/com/mes/menu/entity/SysMenu.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/common/springsecurity/src/main/java/com/mes/menu/service/impl/SysMenuServiceImpl.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/job/OpcCacheGlassNewTask.java 59 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/job/PushMessageToIndex.java 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/bigstorage/controller/BigStorageCageDetailsController.java 8 ●●●●● 补丁 | 查看 | 原始文档 | 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 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/bigstorage/service/impl/BigStorageCageDetailsServiceImpl.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/bigstorage/service/impl/BigStorageGlassInfoServiceImpl.java 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/job/OpcPlcStorageCageNewTask.java 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/resources/mapper/BigStorageCageDetailsMapper.xml 142 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/job/Downpush.java 85 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/hollowGlassModule/src/main/java/com/mes/hollow/controller/HollowBigStorageCageDetailsController.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/hollowGlassModule/src/main/java/com/mes/hollow/mapper/HollowBigStorageCageDetailsMapper.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/hollowGlassModule/src/main/java/com/mes/hollow/service/HollowBigStorageCageDetailsService.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/hollowGlassModule/src/main/java/com/mes/hollow/service/impl/HollowBigStorageCageDetailsServiceImpl.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/hollowGlassModule/src/main/java/com/mes/job/OpcPlcStorageCageHollowTask.java 42 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/moduleService/hollowGlassModule/src/main/resources/mapper/HollowBigStorageCageDetailsMapper.xml 34 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
hangzhoumesParent/common/springsecurity/src/main/java/com/mes/menu/entity/SysMenu.java
@@ -65,7 +65,7 @@
    /**
     * 排序
     */
    private String listSort;
    private Integer listSort;
    /**
     * 创建时间
hangzhoumesParent/common/springsecurity/src/main/java/com/mes/menu/service/impl/SysMenuServiceImpl.java
@@ -65,11 +65,12 @@
                .innerJoin(SysRoleMenu.class, SysRoleMenu::getRoleId, SysUserRole::getRoleId)
                .innerJoin(SysMenu.class, SysMenu::getId, SysRoleMenu::getMenuId)
                .eq(SysUser::getId, user.getId())
                .like(StringUtils.isNotBlank(request.getKey()), SysMenu::getMenuName, request.getKey());
                .like(StringUtils.isNotBlank(request.getKey()), SysMenu::getMenuName, request.getKey())
                .orderByAsc(SysMenu::getListSort);
        //
        List<SysMenu> menuList = sysUserRoleMapper.selectJoinList(SysMenu.class, wrapper);
        log.info("userinfos:{}",menuList);
        log.info("userinfos:{}", menuList);
        return create(menuList);
    }
hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/job/OpcCacheGlassNewTask.java
@@ -8,6 +8,8 @@
import com.github.xingshuangs.iot.protocol.s7.serializer.S7Serializer;
import com.kangaroohy.milo.model.ReadWriteEntity;
import com.kangaroohy.milo.service.MiloService;
import com.mes.alarm.entity.ProductAlarmInfo;
import com.mes.alarm.service.ProductAlarmInfoService;
import com.mes.common.config.Const;
import com.mes.common.config.ConstSysConfig;
import com.mes.damage.service.DamageService;
@@ -113,8 +115,24 @@
    private String glassIdOne = "";
    private String glassIdTwo = "";
    @Resource
    private ProductAlarmInfoService productAlarmInfoService;
    private static final String ALARM_MODULE = "磨边";
    private static final String ALARM_TYPE1 = "一线卧式理片笼";
    private static final String ALARM_TYPE2 = "二线卧式理片笼";
    private static final String ALARM_CODE_NOGLASS = "noGlass";
    @Scheduled(fixedDelay = 1000)
    public void startOneOpcTask() throws Exception {
        List<ProductAlarmInfo> alarmInfos = productAlarmInfoService.list(new LambdaQueryWrapper<ProductAlarmInfo>()
                .eq(ProductAlarmInfo::getState, Const.LOAD_RAW_GLASS_NEW)
                .eq(ProductAlarmInfo::getAlarmModule, ALARM_MODULE)
                .eq(ProductAlarmInfo::getAlarmType, ALARM_TYPE1));
        if (CollectionUtil.isNotEmpty(alarmInfos)) {
            log.info("界面报警,等待人工干预处理");
            return;
        }
        S7DataWL s7DataWLTwo = s7SerializerWLTwo.read(S7DataWL.class);
        S7DataWL s7DataWLOne = s7SerializerWLOne.read(S7DataWL.class);
        S7DataWLExtra s7DataWLExtraTwo = s7SerializerWLTwo.read(S7DataWLExtra.class);
@@ -132,6 +150,14 @@
    @Scheduled(fixedDelay = 1000)
    public void startTwoOpcTask() throws Exception {
        List<ProductAlarmInfo> alarmInfos = productAlarmInfoService.list(new LambdaQueryWrapper<ProductAlarmInfo>()
                .eq(ProductAlarmInfo::getState, Const.LOAD_RAW_GLASS_NEW)
                .eq(ProductAlarmInfo::getAlarmModule, ALARM_MODULE)
                .eq(ProductAlarmInfo::getAlarmType, ALARM_TYPE2));
        if (CollectionUtil.isNotEmpty(alarmInfos)) {
            log.info("界面报警,等待人工干预处理");
            return;
        }
        S7DataWL s7DataWLOne = s7SerializerWLOne.read(S7DataWL.class);
        S7DataWL s7DataWLTwo = s7SerializerWLTwo.read(S7DataWL.class);
        S7DataWLExtra s7DataWLExtraTwo = s7SerializerWLTwo.read(S7DataWLExtra.class);
@@ -280,6 +306,17 @@
        GlassInfo glassInfo = glassInfoService.getOne(new LambdaQueryWrapper<GlassInfo>().eq(GlassInfo::getGlassId, task.getGlassIdIn()));
        if (null == glassInfo) {
            log.info("进片玻璃信息不存在,玻璃id:{}", task.getGlassIdIn());
            ProductAlarmInfo alarmInfo = new ProductAlarmInfo();
            alarmInfo.setState(Const.LOAD_RAW_GLASS_NEW);
            alarmInfo.setAlarmModule(ALARM_MODULE);
            if (deviceId == 1) {
                alarmInfo.setAlarmType(ALARM_TYPE1);
            } else {
                alarmInfo.setAlarmType(ALARM_TYPE2);
            }
            alarmInfo.setAlarmCode(ALARM_CODE_NOGLASS);
            alarmInfo.setAlarmMessage(task.getGlassIdIn());
            productAlarmInfoService.save(alarmInfo);
            Date endDate = new Date();
            log.info("结束进片任务设备为{},结束时间为:{},共耗时:{}ms", deviceId, endDate, endDate.getTime() - startDate.getTime());
            return Boolean.FALSE;
@@ -343,6 +380,24 @@
    private boolean outTask(S7DataWL task, int deviceId, int cellFlag) {
        Date startDate = new Date();
        GlassInfo glassInfo = glassInfoService.getOne(new LambdaQueryWrapper<GlassInfo>().eq(GlassInfo::getGlassId, task.getGlassIdIn()));
        if (null == glassInfo) {
            log.info("进片玻璃信息不存在,玻璃id:{}", task.getGlassIdIn());
            ProductAlarmInfo alarmInfo = new ProductAlarmInfo();
            alarmInfo.setState(Const.LOAD_RAW_GLASS_NEW);
            alarmInfo.setAlarmModule(ALARM_MODULE);
            if (deviceId == 1) {
                alarmInfo.setAlarmType(ALARM_TYPE1);
            } else {
                alarmInfo.setAlarmType(ALARM_TYPE2);
            }
            alarmInfo.setAlarmCode(ALARM_CODE_NOGLASS);
            alarmInfo.setAlarmMessage(task.getGlassIdIn());
            productAlarmInfoService.save(alarmInfo);
            Date endDate = new Date();
            log.info("结束进片任务设备为{},结束时间为:{},共耗时:{}ms", deviceId, endDate, endDate.getTime() - startDate.getTime());
            return Boolean.FALSE;
        }
        //获取对应的设备状态信息
        S7DataWL s7DataWLOne = s7SerializerWLOne.read(S7DataWL.class);
        S7DataWL s7DataWLTwo = s7SerializerWLTwo.read(S7DataWL.class);
@@ -382,9 +437,9 @@
                cell = Const.ONE_OUT_TARGET_POSITION;
            } else if (Const.OUT_BUSY.equals(twoOutState)) {
                cell = Const.TWO_OUT_TARGET_POSITION;
            }else if(Const.OUT_BUSY.equals(oneOutState)){
            } else if (Const.OUT_BUSY.equals(oneOutState)) {
                cell = Const.ONE_OUT_TARGET_POSITION;
            }else{
            } else {
                return Boolean.FALSE;
            }
        }
hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/job/PushMessageToIndex.java
@@ -2,6 +2,8 @@
import cn.hutool.json.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.mes.alarm.entity.ProductAlarmInfo;
import com.mes.alarm.service.ProductAlarmInfoService;
import com.mes.common.config.Const;
import com.mes.edgglasstask.entity.EdgGlassTaskInfo;
import com.mes.edgglasstask.service.EdgGlassTaskInfoService;
@@ -55,6 +57,13 @@
    EngineeringService engineeringService;
    @Resource
    LargenScreenService largenScreenService;
    @Resource
    private ProductAlarmInfoService productAlarmInfoService;
    private static final String ALARM_MODULE = "磨边";
    private static final String ALARM_TYPE1 = "一线卧式理片笼";
    private static final String ALARM_TYPE2 = "二线卧式理片笼";
    private static final String ALARM_CODE_NOGLASS = "noGlass";
    @Resource
    private WebSocketUtils webSocketUtils;
@@ -81,6 +90,20 @@
                .eq(EdgStorageDeviceTaskHistory::getTaskState, Const.RAW_GLASS_TASK_NEW)
                .orderByDesc(EdgStorageDeviceTaskHistory::getCreateTime).last("limit 1"));
        jsonObject.append("taskMessage", taskHistory);
        //推送报警信息
        if (deviceId == 1) {
            jsonObject.append("alarmInfo", productAlarmInfoService.list(new LambdaQueryWrapper<ProductAlarmInfo>()
                    .eq(ProductAlarmInfo::getState, Const.LOAD_RAW_GLASS_NEW)
                    .eq(ProductAlarmInfo::getAlarmModule, ALARM_MODULE)
                    .eq(ProductAlarmInfo::getAlarmType, ALARM_TYPE1)));
        } else {
            jsonObject.append("alarmInfo", productAlarmInfoService.list(new LambdaQueryWrapper<ProductAlarmInfo>()
                    .eq(ProductAlarmInfo::getState, Const.LOAD_RAW_GLASS_NEW)
                    .eq(ProductAlarmInfo::getAlarmModule, ALARM_MODULE)
                    .eq(ProductAlarmInfo::getAlarmType, ALARM_TYPE2)));
        }
        webSocketUtils.sendToWeb(webSocketName, jsonObject);
    }
hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/bigstorage/controller/BigStorageCageDetailsController.java
@@ -6,7 +6,9 @@
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.request.BigCageDetailsRequest;
import com.mes.bigstorage.entity.vo.BigStorageQueryVO;
import com.mes.bigstorage.entity.vo.BigCageDetailsVO;
import com.mes.bigstorage.service.BigStorageCageDetailsService;
import com.mes.bigstorage.service.BigStorageCageService;
import com.mes.common.config.Const;
@@ -211,5 +213,11 @@
        return Result.build(200, "", result);
    }
    @ApiOperation("(列表)按列表照查询条件(设备id、流程卡、膜系)获取设备对应的笼子玻璃信息")
    @PostMapping("/queryVerticalSheetCageDetailsList")
    public Result<List<BigCageDetailsVO>> queryVerticalSheetCageDetailsList(@RequestBody BigCageDetailsRequest request) {
        return Result.build(200, "查询成功", bigStorageCageDetailsService.queryVerticalSheetCageDetailsList(request));
    }
}
hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/bigstorage/mapper/BigStorageCageDetailsMapper.java
@@ -4,7 +4,9 @@
import com.mes.base.entity.vo.BigStorageVO;
import com.mes.bigstorage.entity.BigStorageCageDetails;
import com.mes.bigstorage.entity.dto.*;
import com.mes.bigstorage.entity.request.BigCageDetailsRequest;
import com.mes.bigstorage.entity.vo.BigStorageQueryVO;
import com.mes.bigstorage.entity.vo.BigCageDetailsVO;
import com.mes.bigstoragetask.entity.UpdateBigStorageCageDTO;
import org.apache.ibatis.annotations.Param;
@@ -73,4 +75,12 @@
    BigStorageSlotDTO queryNeedDispatchSlotBySequence();
    List<TemperingGlassCountDTO> queryTemperingGlassCountSummary(int isTempering);
    /**
     * (列表)按列表照查询条件(设备id、流程卡、膜系)获取设备对应的笼子玻璃信息
     *
     * @param request
     * @return
     */
    List<BigCageDetailsVO> queryVerticalSheetCageDetailsList(BigCageDetailsRequest request);
}
hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/bigstorage/service/BigStorageCageDetailsService.java
@@ -4,7 +4,9 @@
import com.mes.base.entity.vo.BigStorageVO;
import com.mes.bigstorage.entity.BigStorageCageDetails;
import com.mes.bigstorage.entity.dto.*;
import com.mes.bigstorage.entity.request.BigCageDetailsRequest;
import com.mes.bigstorage.entity.vo.BigStorageQueryVO;
import com.mes.bigstorage.entity.vo.BigCageDetailsVO;
import com.mes.bigstoragetask.entity.UpdateBigStorageCageDTO;
import com.mes.glassinfo.entity.GlassInfo;
import com.mes.pp.entity.OptimizeProject;
@@ -155,4 +157,6 @@
     * @return OptimizeProject 钢化排产顺序
     */
    List<OptimizeProject> queryTemperingOrder();
    List<BigCageDetailsVO> queryVerticalSheetCageDetailsList(BigCageDetailsRequest request);
}
hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/bigstorage/service/impl/BigStorageCageDetailsServiceImpl.java
@@ -11,7 +11,9 @@
import com.mes.bigstorage.entity.BigStorageCage;
import com.mes.bigstorage.entity.BigStorageCageDetails;
import com.mes.bigstorage.entity.dto.*;
import com.mes.bigstorage.entity.request.BigCageDetailsRequest;
import com.mes.bigstorage.entity.vo.BigStorageQueryVO;
import com.mes.bigstorage.entity.vo.BigCageDetailsVO;
import com.mes.bigstorage.mapper.BigStorageCageDetailsMapper;
import com.mes.bigstorage.service.BigStorageCageDetailsService;
import com.mes.bigstorage.service.BigStorageCageService;
@@ -620,4 +622,9 @@
        }
        return resultList;
    }
    @Override
    public List<BigCageDetailsVO> queryVerticalSheetCageDetailsList(BigCageDetailsRequest request) {
        return baseMapper.queryVerticalSheetCageDetailsList(request);
    }
}
hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/bigstorage/service/impl/BigStorageGlassInfoServiceImpl.java
@@ -4,6 +4,8 @@
import cn.hutool.core.lang.Assert;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.mes.alarm.entity.ProductAlarmInfo;
import com.mes.alarm.service.ProductAlarmInfoService;
import com.mes.bigstorage.entity.BigStorageCage;
import com.mes.bigstorage.entity.BigStorageCageDetails;
import com.mes.bigstorage.entity.BigStorageGlassInfo;
@@ -48,6 +50,15 @@
    BigStorageGlassRelationInfoService bigStorageGlassRelationInfoService;
    @Resource
    SysConfigService sysConfigService;
    @Resource
    private ProductAlarmInfoService productAlarmInfoService;
    private static final String ALARM_MODULE = "钢化";
    private static final String ALARM_TYPE = "钢化大理片";
    private static final String ALARM_CODE_SIZE = "sizeSame";
    private static final String ALARM_CODE_ID = "idSame";
    private static final String ALARM_CODE_SLOT = "slotLess";
    private static final String ALARM_CODE_OVER = "overSize";
//    @Value("${mes.slotWidth}")
//    private Integer slotWidth;
//    @Value("${mes.glassGap}")
@@ -118,6 +129,15 @@
            } else {
                BigStorageCage bigStorageCage = bigStorageCageService.getOne(new LambdaQueryWrapper<BigStorageCage>()
                        .eq(BigStorageCage::getEnableState, Const.SLOT_ON).eq(BigStorageCage::getSlot, beforeGlass.getSlot()));
                if (bigStorageCage == null) {
                    ProductAlarmInfo alarmInfo = new ProductAlarmInfo();
                    alarmInfo.setState(Const.LOAD_RAW_GLASS_NEW);
                    alarmInfo.setAlarmModule(ALARM_MODULE);
                    alarmInfo.setAlarmType(ALARM_TYPE);
                    alarmInfo.setAlarmCode(ALARM_CODE_SLOT);
                    alarmInfo.setAlarmMessage("");
                    productAlarmInfoService.save(alarmInfo);
                }
                Assert.isTrue(null != bigStorageCage, "没有空余的笼子存放玻璃");
                storageCageDTO = new BigStorageDTO();
                storageCageDTO.setWidth(bigStorageCage.getRemainWidth());
hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/job/OpcPlcStorageCageNewTask.java
@@ -104,6 +104,8 @@
    private static final String ALARM_TYPE = "钢化大理片";
    private static final String ALARM_CODE_SIZE = "sizeSame";
    private static final String ALARM_CODE_ID = "idSame";
    private static final String ALARM_CODE_SLOT = "slotLess";
    private static final String ALARM_CODE_OVER = "overSize";
    @Resource
    private RedisUtil redisUtil;
@@ -231,6 +233,13 @@
                        .ge(BigStorageCage::getMaxThickness, entry.getKey()));
                if (count < entry.getValue()) {
                    log.info("笼内格子剩余数量不足,结束本次进片");
                    ProductAlarmInfo alarmInfo = new ProductAlarmInfo();
                    alarmInfo.setState(Const.LOAD_RAW_GLASS_NEW);
                    alarmInfo.setAlarmModule(ALARM_MODULE);
                    alarmInfo.setAlarmType(ALARM_TYPE);
                    alarmInfo.setAlarmCode(ALARM_CODE_SLOT);
                    alarmInfo.setAlarmMessage(count + "");
                    productAlarmInfoService.save(alarmInfo);
                    //向plc发送报警:笼内格子剩余数量不足
//                    miloService.writeToOpcWord(generateReadWriteEntity("DLP1A.DLP1A.alarmSignal", 16));
                    s7DataDLPOne = new S7DataDLPOne();
@@ -247,6 +256,13 @@
                    .in(BigStorageCageDetails::getState, Const.GLASS_STATE_IN_ALL));
            if (count > 0) {
                log.info("直通片台存在玻璃,结束本次进片");
                ProductAlarmInfo alarmInfo = new ProductAlarmInfo();
                alarmInfo.setState(Const.LOAD_RAW_GLASS_NEW);
                alarmInfo.setAlarmModule(ALARM_MODULE);
                alarmInfo.setAlarmType(ALARM_TYPE);
                alarmInfo.setAlarmCode(ALARM_CODE_OVER);
                alarmInfo.setAlarmMessage("");
                productAlarmInfoService.save(alarmInfo);
                //向plc发送报警:直通片台存在玻璃,无法继续直通
//                miloService.writeToOpcWord(generateReadWriteEntity("DLP1A.DLP1A.alarmSignal", 64));
                s7DataDLPOne = new S7DataDLPOne();
hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/resources/mapper/BigStorageCageDetailsMapper.xml
@@ -76,7 +76,7 @@
                             WHERE ENGINEER_ID = #{engineerId}
                               AND TEMPERING_LAYOUT_ID = #{temperingLayoutId}
                             GROUP BY ENGINEER_ID,
                                      TEMPERING_LAYOUT_ID) T1
                                 TEMPERING_LAYOUT_ID) T1
                            ON T.ENGINEER_ID = T1.ENGINEER_ID
                                AND T.TEMPERING_LAYOUT_ID = T1.TEMPERING_LAYOUT_ID
                                AND T.COUNT = T1.COUNT
@@ -89,14 +89,14 @@
                        T.TEMPERING_LAYOUT_ID,
                        COUNT(T.TEMPERING_FEED_SEQUENCE) AS COUNT
                 FROM GLASS_INFO T
                          LEFT JOIN DAMAGE T1
                                    ON T.ENGINEER_ID = T1.ENGINEER_ID
                                        AND T.GLASS_ID = T1.GLASS_ID
                                        AND (T1.TYPE = 8
                                            OR T1.TYPE = 9)
                     LEFT JOIN DAMAGE T1
                 ON T.ENGINEER_ID = T1.ENGINEER_ID
                     AND T.GLASS_ID = T1.GLASS_ID
                     AND (T1.TYPE = 8
                     OR T1.TYPE = 9)
                 WHERE T1.GLASS_ID IS NULL
                 GROUP BY T.ENGINEER_ID,
                          T.TEMPERING_LAYOUT_ID
                     T.TEMPERING_LAYOUT_ID
             ) T2
                 INNER JOIN (SELECT ENGINEER_ID, TEMPERING_LAYOUT_ID, COUNT(TEMPERING_FEED_SEQUENCE) AS COUNT
                             FROM BIG_STORAGE_CAGE_DETAILS
@@ -212,31 +212,31 @@
    <select id="queryIsAllNeedDispatchVirtualSlot" resultMap="virtualSlotSequenceDTO">
        with relation_temp as (
            select engineer_id, tempering_layout_id, virtual_slot, count(1) as slot_count
            from big_storage_glass_relation_info
            group by engineer_id, tempering_layout_id, virtual_slot
        select engineer_id, tempering_layout_id, virtual_slot, count(1) as slot_count
        from big_storage_glass_relation_info
        group by engineer_id, tempering_layout_id, virtual_slot
        ),
             details_temp as (
                 select t.engineer_id, t.tempering_layout_id, t.virtual_slot, count(1) as slot_count
                 from big_storage_glass_relation_info t
                          left join big_storage_cage_details t1 on
                         t.engineer_id = t1.engineer_id and t.tempering_layout_id = t1.tempering_layout_id and
                         t.tempering_feed_sequence = t1.tempering_feed_sequence
                 where t1.state = 100
        details_temp as (
        select t.engineer_id, t.tempering_layout_id, t.virtual_slot, count(1) as slot_count
        from big_storage_glass_relation_info t
        left join big_storage_cage_details t1 on
        t.engineer_id = t1.engineer_id and t.tempering_layout_id = t1.tempering_layout_id and
        t.tempering_feed_sequence = t1.tempering_feed_sequence
        where t1.state = 100
        AND T1.DEVICE_ID IN
        <foreach collection="deviceIdList" item="item" open='(' close=')' separator=','>
            #{item}
        </foreach>
                 group by t.engineer_id, t.tempering_layout_id, t.virtual_slot
             ),
             result_one as (
                 select t.*, t1.slot_count as tslot_count
                 from relation_temp t
                          INNER JOIN details_temp t1 on t.engineer_id = t1.engineer_id and
                                                        t.tempering_layout_id = t1.tempering_layout_id and
                                                        t.virtual_slot = t1.virtual_slot
                 where t.slot_count = t1.slot_count
             )
        group by t.engineer_id, t.tempering_layout_id, t.virtual_slot
        ),
        result_one as (
        select t.*, t1.slot_count as tslot_count
        from relation_temp t
        INNER JOIN details_temp t1 on t.engineer_id = t1.engineer_id and
        t.tempering_layout_id = t1.tempering_layout_id and
        t.virtual_slot = t1.virtual_slot
        where t.slot_count = t1.slot_count
        )
        select engineer_id, tempering_layout_id, virtual_slot
        from result_one
        order by engineer_id, tempering_layout_id
@@ -296,35 +296,55 @@
    <select id="querybigStorageCageDetail" resultType="com.mes.base.entity.vo.BigStorageVO">
        select bsc.device_id, bsc.slot, count(bscd.glass_id) as count
        from big_storage_cage bsc
                 left join big_storage_cage_details bscd
                           on bsc.slot = bscd.slot and bscd.state in (100, 102, 103, 104)
            left join big_storage_cage_details bscd
        on bsc.slot = bscd.slot and bscd.state in (100, 102, 103, 104)
        group by bsc.device_id, bsc.slot
        order by bsc.device_id, bsc.slot
    </select>
    <select id="queryNeedDispatch" resultType="com.mes.bigstorage.entity.BigStorageCageDetails">
        SELECT * FROM big_storage_cage_details WHERE STATE = 100 AND SLOT = (SELECT SLOT FROM big_storage_cage_details WHERE STATE = 100 AND sequence = 1 order by slot desc LIMIT 1) ORDER BY tempering_feed_sequence
        SELECT *
        FROM big_storage_cage_details
        WHERE STATE = 100
          AND SLOT =
              (SELECT SLOT FROM big_storage_cage_details WHERE STATE = 100 AND sequence = 1 order by slot desc LIMIT 1)
        ORDER BY tempering_feed_sequence
    </select>
    <select id="queryNeedDispatchSlotBySequence" resultType="com.mes.bigstorage.entity.dto.BigStorageSlotDTO">
        with glass_temp as (
        select t.* ,t1.virtual_slot,t1.slot_sequence from big_storage_cage_details t inner join
        big_storage_glass_relation_info t1 on t.engineer_id = t1.engineer_id
        and t.tempering_layout_id = t1.tempering_layout_id
        and t.tempering_feed_sequence = t1.tempering_feed_sequence where t.state = 100
        ),slot_max_temp as (
        select ROW_NUMBER()over(PARTITION by engineer_id, tempering_layout_id, virtual_slot order by slot_sequence desc)
        as rn,t.* from glass_temp t where t.device_id in (5,6)
        ) ,slot_max_message as (select * from slot_max_temp where rn =1)
        ,slot_min_temp as (
        select ROW_NUMBER()over(PARTITION by engineer_id, tempering_layout_id, virtual_slot order by slot_sequence) as
        rn,t.* from glass_temp t where t.device_id in (5,6)
        ) ,slot_min_message as (select * from slot_min_temp where rn =1)
        ,result as (
        select t.slot as target_slot ,t1.slot as start_slot from slot_max_message t inner join slot_min_message t1 on
        t.engineer_id = t1.engineer_id and t.tempering_layout_id = t1.tempering_layout_id and t.virtual_slot =
        t1.virtual_slot and t.tempering_layout_id = t1.tempering_layout_id and t.tempering_feed_sequence =
        t1.tempering_feed_sequence -1
        )select * from result limit 1
            select t.*, t1.virtual_slot, t1.slot_sequence
            from big_storage_cage_details t
                     inner join
                 big_storage_glass_relation_info t1 on t.engineer_id = t1.engineer_id
                     and t.tempering_layout_id = t1.tempering_layout_id
                     and t.tempering_feed_sequence = t1.tempering_feed_sequence
            where t.state = 100
        )
           , slot_max_temp as (
            select ROW_NUMBER() over(PARTITION by engineer_id, tempering_layout_id, virtual_slot order by slot_sequence desc)
        as rn,t.*
            from glass_temp t
            where t.device_id in (5, 6)
        )
           , slot_max_message as (select * from slot_max_temp where rn = 1)
           , slot_min_temp as (
            select ROW_NUMBER() over(PARTITION by engineer_id, tempering_layout_id, virtual_slot order by slot_sequence) as
        rn,t.*
            from glass_temp t
            where t.device_id in (5, 6)
        )
           , slot_min_message as (select * from slot_min_temp where rn = 1)
           , result as (
            select t.slot as target_slot, t1.slot as start_slot
            from slot_max_message t
                     inner join slot_min_message t1 on
                    t.engineer_id = t1.engineer_id and t.tempering_layout_id = t1.tempering_layout_id and
                    t.virtual_slot =
                    t1.virtual_slot and t.tempering_layout_id = t1.tempering_layout_id and t.tempering_feed_sequence =
                                                                                           t1.tempering_feed_sequence - 1
        )
        select *
        from result limit 1
    </select>
    <select id="queryTemperingGlassCountSummary" resultMap="temperingGlassCount">
        with glass_info_temp as (
@@ -382,4 +402,30 @@
        from secondary_summary
        order by engineer_id, films_id, thickness
    </select>
    <select id="queryVerticalSheetCageDetailsList"
            resultType="com.mes.bigstorage.entity.vo.BigCageDetailsVO">
        SELECT t.id,t.device_id,t.slot,t.remain_width ,t.enable_state,t1.engineer_id,
        t1.id as detail_id,t1.device_id as detail_device_id ,t1.slot as
        detail_slot,t1.engineer_id,t1.glass_id,t1.tempering_layout_id,t1.tempering_feed_sequence,
        t1.flow_card_id,t1.layer,t1.width,t1.height,t1.thickness,t1.films_id
        FROM big_storage_cage t
        left join big_storage_cage_details t1 on t.slot = t1.slot
        and t1.state in (100, 102, 103, 104)
        <if test="filmsId != null and filmsId != ''">
            and t1.films_id like CONCAT('%', #{filmsId}, '%')
        </if>
        <if test="flowCardId != null and flowCardId != ''">
            and t1.flow_card_id like CONCAT('%', #{flowCardId}, '%')
        </if>
        <if test="engineerId != null and engineerId != ''">
            and t1.engineer_id like CONCAT('%', #{engineerId}, '%')
        </if>
        <if test="glassId != null and glassId != ''">
            and t1.glass_id like CONCAT('%', #{glassId}, '%')
        </if>
        <if test="thickness != -1">
            and t1.thickness = #{thickness}
        </if>
        order by t.slot
    </select>
</mapper>
hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/job/Downpush.java
@@ -17,6 +17,7 @@
import com.mes.glassinfo.service.GlassInfoService;
import com.mes.tools.DateUtil;
import com.mes.tools.WebSocketServer;
import com.mes.tools.WebSocketUtils;
import com.mes.utils.RedisUtil;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.StringUtils;
@@ -25,6 +26,7 @@
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.Socket;
@@ -47,6 +49,8 @@
    private DownGlassTaskService downGlassTaskService;
    @Autowired
    private GlassInfoService glassInfoService;
    @Resource
    private WebSocketUtils webSocketUtils;
    @Value("${mes.scan.ip}")
    private String scanIp;
@@ -65,15 +69,8 @@
        List<DownWorkstation> data = downWorkstationService.list();
        jsonObject.append("params", data);
        log.info(jsonObject.toString());
        ArrayList<WebSocketServer> sendwServer = WebSocketServer.sessionMap.get("unloadglass");
        if (sendwServer != null) {
            for (WebSocketServer webserver : sendwServer) {
                if (webserver != null && webserver.session.isOpen()) {
                    log.info("已发送");
                    webserver.sendMessage(jsonObject.toString());
                }
            }
        }
        webSocketUtils.sendToWeb("unloadglass", jsonObject);
    }
    @Scheduled(fixedDelay = 1000)
@@ -83,14 +80,7 @@
        List<Map<String, Object>> glassinfodata = downWorkstationService.getTotalGlassDimensionsByWorkstation(1, 3);
        jsonObject2.append("glassinfo", glassinfodata);
        log.info(jsonObject2.toString());
        ArrayList<WebSocketServer> sendwServer2 = WebSocketServer.sessionMap.get("unloadglass2");
        if (sendwServer2 != null) {
            for (WebSocketServer webserver : sendwServer2) {
                if (webserver != null && webserver.session.isOpen()) {
                    webserver.sendMessage(jsonObject2.toString());
                }
            }
        }
        webSocketUtils.sendToWeb("unloadglass2", jsonObject2);
    }
    @Scheduled(fixedDelay = 1000)
@@ -100,14 +90,7 @@
        List<Map<String, Object>> glassinfodata2 = downWorkstationService.getTotalGlassDimensionsByWorkstation(4, 6);
        jsonObject3.append("glassinfo2", glassinfodata2);
        log.info(jsonObject3.toString());
        ArrayList<WebSocketServer> sendwServer3 = WebSocketServer.sessionMap.get("unloadglass3");
        if (sendwServer3 != null) {
            for (WebSocketServer webserver : sendwServer3) {
                if (webserver != null && webserver.session.isOpen()) {
                    webserver.sendMessage(jsonObject3.toString());
                }
            }
        }
        webSocketUtils.sendToWeb("unloadglass3", jsonObject3);
    }
    @Scheduled(fixedDelay = 2000)
@@ -117,14 +100,7 @@
        List<Map<String, Object>> list = downStorageCageService.selectDownStorageCages();
        jsonObject4.append("params2", list);
        log.info(jsonObject4.toString());
        ArrayList<WebSocketServer> sendwServer4 = WebSocketServer.sessionMap.get("downcache");
        if (sendwServer4 != null) {
            for (WebSocketServer webserver : sendwServer4) {
                if (webserver != null && webserver.session.isOpen()) {
                    webserver.sendMessage(jsonObject4.toString());
                }
            }
        }
        webSocketUtils.sendToWeb("downcache", jsonObject4);
    }
    @Scheduled(fixedDelay = 2000)
@@ -170,18 +146,11 @@
                        .lt("task_status", Const.UNLOAD_GLASS_DOWN)
                        .orderByAsc("id")
        );
        if(takeGlass!=null){
        if (takeGlass != null) {
            jsonObject4.append("takeGlass", takeGlass);
        }
        ArrayList<WebSocketServer> sendwServer4 = WebSocketServer.sessionMap.get("unloadglass");
        if (sendwServer4 != null) {
            for (WebSocketServer webserver : sendwServer4) {
                if (webserver != null && webserver.session.isOpen()) {
                    webserver.sendMessage(jsonObject4.toString());
                }
            }
        }
        webSocketUtils.sendToWeb("unloadglass", jsonObject4);
    }
    @Scheduled(fixedDelay = 1000)
@@ -192,16 +161,8 @@
        jsonObject.append("downWorkstation", downWorkstation);
        List<DownGlassTask> downGlassTask = downGlassTaskService.selectOutTaskCache();
        jsonObject.append("downGlassTask", downGlassTask);
        ArrayList<WebSocketServer> sendwServer = WebSocketServer.sessionMap.get("unLoadGlassIsRun");
        if (sendwServer != null) {
            for (WebSocketServer webserver : sendwServer) {
                if (webserver != null) {
                    webserver.sendMessage(jsonObject.toString());
                } else {
                    log.info("unLoadGlassIsRun is closed");
                }
            }
        }
        webSocketUtils.sendToWeb("unLoadGlassIsRun", jsonObject);
    }
    @Scheduled(fixedDelay = Long.MAX_VALUE)
@@ -215,20 +176,14 @@
                log.info("等待扫码中......");
                String glassId = in.readLine();
                log.info("扫描到的玻璃id:{}", glassId);
                List<WebSocketServer> sendwServer = WebSocketServer.sessionMap.get("unloadglass");
                if (CollectionUtils.isNotEmpty(sendwServer)) {
                    //按照玻璃id获取玻璃信息返回给前端界面,具体需要哪些数据待确认
                    GlassInfo glassInfo = glassInfoService.getOne(new LambdaQueryWrapper<GlassInfo>()
                            .eq(GlassInfo::getGlassId, glassId).last("limit 1"));
                    if (null == glassInfo) {
                        log.info("按照玻璃id:{},无法找到玻璃信息", glassId);
                    } else {
                        for (WebSocketServer webserver : sendwServer) {
                                jsonObject.append("scanGlass", glassInfo);
                                webserver.sendMessage(jsonObject.toString());
                        }
                    }
                //按照玻璃id获取玻璃信息返回给前端界面,具体需要哪些数据待确认
                GlassInfo glassInfo = glassInfoService.getOne(new LambdaQueryWrapper<GlassInfo>()
                        .eq(GlassInfo::getGlassId, glassId).last("limit 1"));
                if (null == glassInfo) {
                    log.info("按照玻璃id:{},无法找到玻璃信息", glassId);
                    return;
                }
                webSocketUtils.sendToWeb("scanGlass", glassInfo);
            } catch (Exception exception) {
                log.info("读取异常,原因为{}", exception.getMessage());
            }
hangzhoumesParent/moduleService/hollowGlassModule/src/main/java/com/mes/hollow/controller/HollowBigStorageCageDetailsController.java
@@ -3,6 +3,8 @@
import com.mes.hollow.entity.HollowBigStorageCageDetails;
import com.mes.hollow.entity.dto.HollowBigStorageAndDetailsDTO;
import com.mes.hollow.entity.request.HollowBigCageDetailsRequest;
import com.mes.hollow.entity.vo.HollowBigCageDetailsVO;
import com.mes.hollow.service.HollowBigStorageCageDetailsService;
import com.mes.utils.Result;
import io.swagger.annotations.Api;
@@ -54,5 +56,10 @@
        return Result.build(200, "启用/禁用成功", 1);
    }
    @ApiOperation("(列表)按列表照查询条件(设备id、流程卡、膜系)获取设备对应的笼子玻璃信息")
    @PostMapping("/queryVerticalSheetCageDetailsList")
    public Result<List<HollowBigCageDetailsVO>> queryVerticalSheetCageDetailsList(@RequestBody HollowBigCageDetailsRequest request) {
        return Result.build(200, "查询成功", hollowBigStorageCageDetailsService.queryVerticalSheetCageDetailsList(request));
    }
}
hangzhoumesParent/moduleService/hollowGlassModule/src/main/java/com/mes/hollow/mapper/HollowBigStorageCageDetailsMapper.java
@@ -7,6 +7,8 @@
import com.mes.hollow.entity.dto.FlowCardGlassInfoDTO;
import com.mes.hollow.entity.dto.FlowCardVirtualSlotDTO;
import com.mes.hollow.entity.dto.UpdateHollowBigStorageCageDTO;
import com.mes.hollow.entity.request.HollowBigCageDetailsRequest;
import com.mes.hollow.entity.vo.HollowBigCageDetailsVO;
import com.mes.hollow.entity.vo.HollowBigStorageDetailsQueryVO;
import org.apache.ibatis.annotations.Param;
@@ -47,5 +49,7 @@
     * @return
     */
    List<FlowCardGlassInfoDTO> queryHollowAllFlowCard(HollowBigStorageDetailsQueryVO query);
    List<HollowBigCageDetailsVO> queryVerticalSheetCageDetailsList(HollowBigCageDetailsRequest request);
}
hangzhoumesParent/moduleService/hollowGlassModule/src/main/java/com/mes/hollow/service/HollowBigStorageCageDetailsService.java
@@ -4,7 +4,9 @@
import com.mes.base.entity.vo.BigStorageVO;
import com.mes.hollow.entity.HollowBigStorageCageDetails;
import com.mes.hollow.entity.dto.*;
import com.mes.hollow.entity.request.HollowBigCageDetailsRequest;
import com.mes.hollow.entity.vo.HollowAllFlowCardVO;
import com.mes.hollow.entity.vo.HollowBigCageDetailsVO;
import com.mes.hollow.entity.vo.HollowBigStorageDetailsQueryVO;
import java.util.List;
@@ -70,5 +72,7 @@
    List<FlowCardVirtualSlotDTO> queryFlowCardIdsAndLayer();
    List<FlowCardGlassInfoDTO> queryHollowAllFlowCard(HollowBigStorageDetailsQueryVO query);
    List<HollowBigCageDetailsVO> queryVerticalSheetCageDetailsList(HollowBigCageDetailsRequest request);
}
hangzhoumesParent/moduleService/hollowGlassModule/src/main/java/com/mes/hollow/service/impl/HollowBigStorageCageDetailsServiceImpl.java
@@ -11,6 +11,8 @@
import com.mes.hollow.entity.HollowBigStorageCageDetails;
import com.mes.hollow.entity.HollowGlassRelationInfo;
import com.mes.hollow.entity.dto.*;
import com.mes.hollow.entity.request.HollowBigCageDetailsRequest;
import com.mes.hollow.entity.vo.HollowBigCageDetailsVO;
import com.mes.hollow.entity.vo.HollowBigStorageDetailsQueryVO;
import com.mes.hollow.mapper.HollowBigStorageCageDetailsMapper;
import com.mes.hollow.service.HollowBigStorageCageDetailsService;
@@ -150,6 +152,11 @@
        return baseMapper.queryHollowAllFlowCard(query);
    }
    @Override
    public List<HollowBigCageDetailsVO> queryVerticalSheetCageDetailsList(HollowBigCageDetailsRequest request) {
        return baseMapper.queryVerticalSheetCageDetailsList(request);
    }
    private List<HollowBigStorageAndDetailsDTO> hollowBigStorageCageDetailsChild(String glassId, Integer deviceId, Integer slot, int state) {
        //将对应格子号的玻璃id置为101
        this.update(new LambdaUpdateWrapper<HollowBigStorageCageDetails>()
hangzhoumesParent/moduleService/hollowGlassModule/src/main/java/com/mes/job/OpcPlcStorageCageHollowTask.java
@@ -117,6 +117,8 @@
    private static final String ALARM_TYPE = "中空大理片";
    private static final String ALARM_CODE_SIZE = "sizeSame";
    private static final String ALARM_CODE_ID = "idSame";
    private static final String ALARM_CODE_SLOT = "slotLess";
    private static final String ALARM_CODE_OVER = "overSize";
    /**
     * 直通格子
@@ -245,6 +247,13 @@
                    .ge(HollowBigStorageCage::getMaxThickness, entry.getKey()));
            if (count < entry.getValue()) {
                log.info("笼内格子剩余数量不足,结束本次进片");
                ProductAlarmInfo alarmInfo = new ProductAlarmInfo();
                alarmInfo.setState(Const.LOAD_RAW_GLASS_NEW);
                alarmInfo.setAlarmModule(ALARM_MODULE);
                alarmInfo.setAlarmType(ALARM_TYPE);
                alarmInfo.setAlarmCode(ALARM_CODE_SLOT);
                alarmInfo.setAlarmMessage(count + "");
                productAlarmInfoService.save(alarmInfo);
                //向plc发送报警:笼内格子剩余数量不足
                s7DataZKDLPOne = new S7DataZKDLPOne();
                s7DataZKDLPOne.setAlramSignal(16);
@@ -525,7 +534,7 @@
                    });
                }
                List<HollowGlassQueueInfo> infoList = unFinishHollowQueueList.stream().filter(e -> !(e.getSlot() > 500 && e.getSlot() < 900 && e.getIsPair() != 1)).collect(Collectors.toList());
                List<HollowGlassQueueInfo> infoList = unFinishHollowQueueList.stream().filter(e -> !(e.getSlot() >= 500 && e.getSlot() < 900 && e.getIsPair() != 1)).collect(Collectors.toList());
                log.info("有正在出片的中空任务");
                Integer isPair = infoList.get(0).getIsPair();
                hollowOutGlassByIsPair(infoList, hollowGlassOutRelationInfo.getCell(), isPair, hollowGlassOutRelationInfo.getTotalLayer(), hollowGlassOutRelationInfo.getIsForce());
@@ -908,7 +917,11 @@
            log.info("当前未收到进片请求,结束进片任务");
            return;
        }
        if (StringUtils.isNotBlank(s7DataZKDLPOne.getId1())){
        if (StringUtils.isNotBlank(s7DataZKDLPOne.getId1())) {
            log.info("当前存在进片任务,结束");
            return;
        }
        if (StringUtils.isNotBlank(s7DataZKDLPOne.getId1())) {
            log.info("当前存在进片任务请求,结束本次大笼子调度");
            return;
        }
@@ -924,15 +937,19 @@
        if (count > 0) {
            return;
        }
        List<HollowBigStorageCageDetails> list = hollowBigStorageCageDetailsService.list(new LambdaQueryWrapper<HollowBigStorageCageDetails>()
                .eq(HollowBigStorageCageDetails::getState, Const.GLASS_STATE_IN)
//                .in(HollowBigStorageCageDetails::getDeviceId, 6)
                .in(HollowBigStorageCageDetails::getGlassId, glassIdList));
        log.info("获取调度任务列表:{}", list);
        if (CollectionUtil.isEmpty(list)) {
        HollowBigStorageCageDetails details = null;
        for (String glassId : glassIdList) {
            details = hollowBigStorageCageDetailsService.getOne(new LambdaQueryWrapper<HollowBigStorageCageDetails>()
                    .eq(HollowBigStorageCageDetails::getState, Const.GLASS_STATE_IN)
                    .eq(HollowBigStorageCageDetails::getGlassId, glassId).last("limit 1"));
            log.info("获取调度任务:{}", details);
            if (details != null) {
                break;
            }
        }
        if (details == null) {
            return;
        }
        HollowBigStorageCageDetails details = list.get(0);
        log.info("获取需要调度的单条任务:{}", details);
        //生成进进片大车任务
        hollowBigStorageCageDetailsService.update(new LambdaUpdateWrapper<HollowBigStorageCageDetails>()
@@ -1084,6 +1101,13 @@
                    S7DataZKDLPOne s7DataZKDLPOne = new S7DataZKDLPOne();
                    s7DataZKDLPOne.setAlramSignal(16);
                    s7SerializerZKDLPOne.write(s7DataZKDLPOne);
                    ProductAlarmInfo alarmInfo = new ProductAlarmInfo();
                    alarmInfo.setState(Const.LOAD_RAW_GLASS_NEW);
                    alarmInfo.setAlarmModule(ALARM_MODULE);
                    alarmInfo.setAlarmType(ALARM_TYPE);
                    alarmInfo.setAlarmCode(ALARM_CODE_SLOT);
                    alarmInfo.setAlarmMessage("");
                    productAlarmInfoService.save(alarmInfo);
                    Assert.isFalse(storageCage == null, "任务调度没有多余格子,结束调度任务");
                }
hangzhoumesParent/moduleService/hollowGlassModule/src/main/resources/mapper/HollowBigStorageCageDetailsMapper.xml
@@ -207,8 +207,8 @@
    <select id="queryHollowbigStorageCageDetail" resultType="com.mes.base.entity.vo.BigStorageVO">
        select hbsc.device_id, hbsc.slot, count(hbscd.glass_id) as count
        from hollow_big_storage_cage hbsc
                 left join hollow_big_storage_cage_details hbscd
                           on hbsc.slot = hbscd.slot and hbscd.state in (100, 102, 103, 104)
            left join hollow_big_storage_cage_details hbscd
        on hbsc.slot = hbscd.slot and hbscd.state in (100, 102, 103, 104)
        group by hbsc.device_id, hbsc.slot
        order by hbsc.device_id, hbsc.slot
    </select>
@@ -269,7 +269,7 @@
            AND films_id LIKE CONCAT( '%', #{filmsId}, '%')
        </if>
        <if test="thickness != 0">
          AND thickness = #{thickness}
            AND thickness = #{thickness}
        </if>
        ),
        hollow_details_temp AS (
@@ -293,7 +293,7 @@
            AND films_id LIKE CONCAT( '%', #{filmsId}, '%')
        </if>
        <if test="thickness != 0">
          AND thickness = #{thickness}
            AND thickness = #{thickness}
        </if>
        ),
        hollow_through_temp AS ( SELECT flow_card_id, MIN( hollow_sequence ) AS hollow_sequence, MAX( total_layer ) AS
@@ -416,6 +416,32 @@
        ORDER BY
        t.flow_card_id
    </select>
    <select id="queryVerticalSheetCageDetailsList"
            resultType="com.mes.hollow.entity.vo.HollowBigCageDetailsVO">
        SELECT t.id,t.device_id,t.slot,t.remain_width ,t.enable_state,t1.virtual_slot,total_layer,t1.engineer_id,
        t1.id as detail_id,t1.device_id as detail_device_id ,t1.slot as
        detail_slot,t1.engineer_id,t1.glass_id,t1.tempering_layout_id,t1.tempering_feed_sequence,
        t1.flow_card_id,t1.layer,t1.width,t1.height,t1.thickness,t1.films_id
        FROM hollow_big_storage_cage t
        left join hollow_big_storage_cage_details t1 on t.slot = t1.slot
        and t1.state in (100, 102, 103, 104)
        <if test="filmsId != null and filmsId != ''">
            and t1.films_id like CONCAT('%', #{filmsId}, '%')
        </if>
        <if test="flowCardId != null and flowCardId != ''">
            and t1.flow_card_id like CONCAT('%', #{flowCardId}, '%')
        </if>
        <if test="engineerId != null and engineerId != ''">
            and t1.engineer_id like CONCAT('%', #{engineerId}, '%')
        </if>
        <if test="glassId != null and glassId != ''">
            and t1.glass_id like CONCAT('%', #{glassId}, '%')
        </if>
        <if test="thickness != -1">
            and t1.thickness = #{thickness}
        </if>
        order by t.slot
    </select>
</mapper>