1、中空/大理片笼前端推送数据改成格子号及数量,减少websocket向前端推送的数量
| | |
| | | package com.mes.bigstorage.mapper; |
| | | |
| | | import com.github.yulichang.base.MPJBaseMapper; |
| | | import com.mes.base.entity.vo.BigStorageVO; |
| | | import com.mes.bigstorage.entity.BigStorageCageDetails; |
| | | import com.mes.bigstorage.entity.dto.*; |
| | | import com.mes.bigstorage.entity.vo.BigStorageQueryVO; |
| | |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | |
| | | /** |
| | |
| | | List<GlassInfoLackDTO> queryLackGlassInfo(BigStorageQueryVO bigStorageQueryVO); |
| | | |
| | | void updateDeviceIdBySlot(@Param("list") List<Integer> slotList); |
| | | |
| | | List<BigStorageVO> querybigStorageCageDetail(); |
| | | } |
| | |
| | | package com.mes.bigstorage.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.mes.base.entity.vo.BigStorageVO; |
| | | import com.mes.bigstorage.entity.BigStorageCageDetails; |
| | | import com.mes.bigstorage.entity.dto.*; |
| | | import com.mes.bigstorage.entity.vo.BigStorageQueryVO; |
| | |
| | | import com.mes.glassinfo.entity.GlassInfo; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | |
| | | /** |
| | | * 按照工程信息及钢化id(炉号)获取实际笼内的玻璃信息 |
| | | * |
| | | * @param bigStorageQueryVO |
| | | * @return |
| | | */ |
| | | List<BigStorageCageDetails> queryRealGlassInfo(BigStorageQueryVO bigStorageQueryVO); |
| | | |
| | | List<BigStorageVO> querybigStorageCageDetail(); |
| | | } |
| | |
| | | import com.github.yulichang.base.MPJBaseServiceImpl; |
| | | import com.github.yulichang.toolkit.JoinWrappers; |
| | | import com.github.yulichang.wrapper.MPJLambdaWrapper; |
| | | import com.mes.base.entity.vo.BigStorageVO; |
| | | import com.mes.bigstorage.entity.BigStorageCage; |
| | | import com.mes.bigstorage.entity.BigStorageCageDetails; |
| | | import com.mes.bigstorage.entity.dto.*; |
| | |
| | | @Override |
| | | public List<BigStorageCageDetails> queryRealGlassInfo(BigStorageQueryVO bigStorageQueryVO) { |
| | | return this.list(new LambdaQueryWrapper<BigStorageCageDetails>() |
| | | .eq(BigStorageCageDetails::getEngineerId,bigStorageQueryVO.getEngineerId()) |
| | | .eq(BigStorageCageDetails::getTemperingLayoutId,bigStorageQueryVO.getTemperingLayoutId()) |
| | | .in(BigStorageCageDetails::getState,Const.GLASS_STATE_IN_ALL)); |
| | | .eq(BigStorageCageDetails::getEngineerId, bigStorageQueryVO.getEngineerId()) |
| | | .eq(BigStorageCageDetails::getTemperingLayoutId, bigStorageQueryVO.getTemperingLayoutId()) |
| | | .in(BigStorageCageDetails::getState, Const.GLASS_STATE_IN_ALL)); |
| | | } |
| | | |
| | | @Override |
| | | public List<BigStorageVO> querybigStorageCageDetail() { |
| | | return baseMapper.querybigStorageCageDetail(); |
| | | } |
| | | |
| | | @Override |
| | |
| | | package com.mes.job; |
| | | |
| | | import cn.hutool.json.JSONObject; |
| | | import cn.smallbun.screw.core.util.CollectionUtils; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.kangaroohy.milo.model.ReadWriteEntity; |
| | | import com.kangaroohy.milo.service.MiloService; |
| | | import com.mes.bigstorage.entity.BigStorageCageDetails; |
| | | import com.mes.bigstorage.service.BigStorageCageDetailsService; |
| | | import com.mes.bigstorage.service.BigStorageCageService; |
| | | import com.mes.bigstoragecagetask.entity.BigStorageCageTask; |
| | | import com.mes.bigstoragecagetask.service.BigStorageCageTaskService; |
| | | import com.mes.glassinfo.entity.GlassInfo; |
| | | import com.mes.glassinfo.service.GlassInfoService; |
| | | import com.mes.temperingglass.entity.TemperingGlassInfo; |
| | | import com.mes.temperingglass.service.TemperingGlassInfoService; |
| | |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.io.BufferedReader; |
| | | import java.io.InputStreamReader; |
| | | import java.net.Socket; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | |
| | | carPostion.add(0.5); |
| | | jsonObject.append("carPostion", carPostion); |
| | | //界面展示笼子信息 |
| | | jsonObject.append("bigStorageCageInfos", bigStorageCageService.querybigStorageCageDetail()); |
| | | jsonObject.append("bigStorageCageInfos", bigStorageCageDetailsService.querybigStorageCageDetail()); |
| | | |
| | | try{ |
| | | //进片任务数据 |
| | |
| | | SELECT * |
| | | FROM result |
| | | </select> |
| | | <select id="querybigStorageCageDetail" resultType="com.mes.base.entity.vo.BigStorageVO"> |
| | | SELECT SLOT, COUNT(1) AS COUNT |
| | | FROM BIG_STORAGE_CAGE_DETAILS |
| | | where state in (100, 102, 103, 104) |
| | | group by SLOT |
| | | ORDER BY SLOT |
| | | </select> |
| | | </mapper> |
| | |
| | | package com.mes.hollow.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.mes.base.entity.vo.BigStorageVO; |
| | | import com.mes.hollow.entity.HollowBigStorageCageDetails; |
| | | import com.mes.hollow.entity.dto.BigStorageSequenceDTO; |
| | | import com.mes.hollow.entity.dto.FlowCardGlassInfoDTO; |
| | |
| | | List<BigStorageSequenceDTO> queryNeedDispatchSlot(FlowCardVirtualSlotDTO flowCardVirtualSlotDTO); |
| | | |
| | | List<HollowBigStorageCageDetails> queryOutGlassList(@Param("flowCardId") String flowCardId, @Param("cell") int cell); |
| | | |
| | | List<BigStorageVO> queryHollowbigStorageCageDetail(); |
| | | } |
| | | |
| | |
| | | package com.mes.hollow.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.mes.base.entity.vo.BigStorageVO; |
| | | import com.mes.hollow.entity.HollowBigStorageCageDetails; |
| | | import com.mes.hollow.entity.dto.BigStorageSequenceDTO; |
| | | import com.mes.hollow.entity.dto.FlowCardGlassInfoDTO; |
| | |
| | | List<BigStorageSequenceDTO> queryNeedDispatchSlot(FlowCardVirtualSlotDTO flowCardVirtualSlotDTO); |
| | | |
| | | List<HollowBigStorageCageDetails> queryOutGlassList(String flowCardId, int cell); |
| | | |
| | | List<BigStorageVO> queryHollowbigStorageCageDetail(); |
| | | } |
| | | |
| | |
| | | package com.mes.hollow.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.mes.base.entity.vo.BigStorageVO; |
| | | import com.mes.hollow.entity.HollowBigStorageCageDetails; |
| | | import com.mes.hollow.entity.dto.BigStorageSequenceDTO; |
| | | import com.mes.hollow.entity.dto.FlowCardGlassInfoDTO; |
| | |
| | | public List<HollowBigStorageCageDetails> queryOutGlassList(String flowCardId, int cell) { |
| | | return baseMapper.queryOutGlassList(flowCardId, cell); |
| | | } |
| | | |
| | | @Override |
| | | public List<BigStorageVO> queryHollowbigStorageCageDetail() { |
| | | return baseMapper.queryHollowbigStorageCageDetail(); |
| | | } |
| | | } |
| | | |
| | |
| | | import com.mes.bigstoragecagetask.entity.BigStorageCageTask; |
| | | import com.mes.bigstoragecagetask.service.BigStorageCageTaskService; |
| | | import com.mes.common.config.Const; |
| | | import com.mes.hollow.entity.HollowBigStorageCage; |
| | | import com.mes.hollow.entity.HollowGlassOutRelationInfo; |
| | | import com.mes.hollow.service.HollowBigStorageCageDetailsService; |
| | | import com.mes.hollow.service.HollowBigStorageCageService; |
| | | import com.mes.hollow.service.HollowGlassOutRelationInfoService; |
| | | import com.mes.hollowqueue.entity.HollowGlassQueueInfo; |
| | | import com.mes.hollowqueue.service.HollowGlassQueueInfoService; |
| | | import com.mes.temperingglass.entity.TemperingGlassInfo; |
| | | import com.mes.tools.WebSocketServer; |
| | | import com.mes.utils.RedisUtil; |
| | | import lombok.extern.slf4j.Slf4j; |
| | |
| | | public class PushMessageToIndex { |
| | | |
| | | @Resource |
| | | HollowGlassQueueInfoService hollowGlassQueueInfoService; |
| | | HollowGlassQueueInfoService hollowGlassQueueInfoService; |
| | | @Resource |
| | | HollowGlassOutRelationInfoService hollowGlassOutRelationInfoService; |
| | | @Resource |
| | | HollowBigStorageCageService hollowBigStorageCageService; |
| | | @Resource |
| | | HollowBigStorageCageDetailsService hollowBigStorageCageDetailsService; |
| | | @Resource |
| | | BigStorageCageTaskService bigStorageCageTaskService; |
| | | |
| | |
| | | |
| | | @Resource |
| | | RedisUtil redisUtil; |
| | | |
| | | @Scheduled(fixedDelay = 1000) |
| | | public void hollowGlassTask() { |
| | | List<HollowGlassOutRelationInfo> taskList = hollowGlassOutRelationInfoService.list(new LambdaQueryWrapper<HollowGlassOutRelationInfo>() |
| | |
| | | carPostion.add(0.5); |
| | | jsonObject.append("carPostion", carPostion); |
| | | //界面展示笼子信息 |
| | | jsonObject.append("bigStorageCageInfos", hollowBigStorageCageService.queryHollowbigStorageCageDetail()); |
| | | jsonObject.append("bigStorageCageInfos", hollowBigStorageCageDetailsService.queryHollowbigStorageCageDetail()); |
| | | |
| | | try{ |
| | | //进片任务数据 |
| | |
| | | real_flow_layer_count AS ( SELECT flow_card_id, layer, count(*) AS real_count FROM |
| | | hollow_big_storage_cage_details t WHERE state = 100 GROUP BY flow_card_id, layer ), |
| | | damage_flow_layer_count AS ( SELECT process_id AS flow_card_id, technology_number AS layer, count(*) as |
| | | damage_count FROM damage GROUP BY process_id, technology_number ), |
| | | damage_count FROM damage where type in(8,9) GROUP BY process_id, technology_number ), |
| | | lack_flow_layer_count AS ( |
| | | SELECT |
| | | t.flow_card_id, |
| | |
| | | desc |
| | | </if> |
| | | </select> |
| | | <select id="queryHollowbigStorageCageDetail" resultType="com.mes.base.entity.vo.BigStorageVO"> |
| | | SELECT SLOT, COUNT(1) AS COUNT |
| | | FROM HOLLOW_BIG_STORAGE_CAGE_DETAILS |
| | | where state in (100, 102, 103, 104) |
| | | group by SLOT |
| | | ORDER BY SLOT |
| | | </select> |
| | | </mapper> |