Merge branch 'master' of http://10.153.19.25:10105/r/YiWuProject
| | |
| | | /** |
| | | * 排序 |
| | | */ |
| | | private String listSort; |
| | | private Integer listSort; |
| | | |
| | | /** |
| | | * 创建时间 |
| | |
| | | .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); |
| | | } |
| | | |
| | |
| | | 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; |
| | |
| | | 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); |
| | |
| | | |
| | | @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); |
| | |
| | | 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; |
| | |
| | | |
| | | 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); |
| | |
| | | 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; |
| | | } |
| | | } |
| | |
| | | |
| | | 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; |
| | |
| | | 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; |
| | |
| | | .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); |
| | | } |
| | | |
| | |
| | | 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; |
| | |
| | | return Result.build(200, "", result); |
| | | } |
| | | |
| | | @ApiOperation("(列表)按列表照查询条件(设备id、流程卡、膜系)获取设备对应的笼子玻璃信息") |
| | | @PostMapping("/queryVerticalSheetCageDetailsList") |
| | | public Result<List<BigCageDetailsVO>> queryVerticalSheetCageDetailsList(@RequestBody BigCageDetailsRequest request) { |
| | | return Result.build(200, "查询成功", bigStorageCageDetailsService.queryVerticalSheetCageDetailsList(request)); |
| | | } |
| | | |
| | | } |
| | | |
| | |
| | | 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; |
| | | |
| | |
| | | BigStorageSlotDTO queryNeedDispatchSlotBySequence(); |
| | | |
| | | List<TemperingGlassCountDTO> queryTemperingGlassCountSummary(int isTempering); |
| | | |
| | | /** |
| | | * (列表)按列表照查询条件(设备id、流程卡、膜系)获取设备对应的笼子玻璃信息 |
| | | * |
| | | * @param request |
| | | * @return |
| | | */ |
| | | List<BigCageDetailsVO> queryVerticalSheetCageDetailsList(BigCageDetailsRequest request); |
| | | } |
| | |
| | | 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; |
| | |
| | | * @return OptimizeProject 钢化排产顺序 |
| | | */ |
| | | List<OptimizeProject> queryTemperingOrder(); |
| | | |
| | | List<BigCageDetailsVO> queryVerticalSheetCageDetailsList(BigCageDetailsRequest request); |
| | | } |
| | |
| | | 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; |
| | |
| | | } |
| | | return resultList; |
| | | } |
| | | |
| | | @Override |
| | | public List<BigCageDetailsVO> queryVerticalSheetCageDetailsList(BigCageDetailsRequest request) { |
| | | return baseMapper.queryVerticalSheetCageDetailsList(request); |
| | | } |
| | | } |
| | |
| | | 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; |
| | |
| | | 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}") |
| | |
| | | } 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()); |
| | |
| | | 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; |
| | |
| | | .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(); |
| | |
| | | .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(); |
| | |
| | | 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 |
| | |
| | | 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 |
| | |
| | | |
| | | <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 |
| | |
| | | <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 ( |
| | |
| | | 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> |
| | |
| | | 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;
|
| | |
| | | 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;
|
| | |
| | | private DownGlassTaskService downGlassTaskService;
|
| | | @Autowired
|
| | | private GlassInfoService glassInfoService;
|
| | | @Resource
|
| | | private WebSocketUtils webSocketUtils;
|
| | |
|
| | | @Value("${mes.scan.ip}")
|
| | | private String scanIp;
|
| | |
| | | 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)
|
| | |
| | | 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)
|
| | |
| | | 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)
|
| | |
| | | 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)
|
| | |
| | | .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)
|
| | |
| | | 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)
|
| | |
| | | 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());
|
| | | }
|
| | |
| | | |
| | | 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; |
| | |
| | | return Result.build(200, "启用/禁用成功", 1); |
| | | } |
| | | |
| | | @ApiOperation("(列表)按列表照查询条件(设备id、流程卡、膜系)获取设备对应的笼子玻璃信息") |
| | | @PostMapping("/queryVerticalSheetCageDetailsList") |
| | | public Result<List<HollowBigCageDetailsVO>> queryVerticalSheetCageDetailsList(@RequestBody HollowBigCageDetailsRequest request) { |
| | | return Result.build(200, "查询成功", hollowBigStorageCageDetailsService.queryVerticalSheetCageDetailsList(request)); |
| | | } |
| | | } |
| | | |
| | |
| | | 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; |
| | | |
| | |
| | | * @return |
| | | */ |
| | | List<FlowCardGlassInfoDTO> queryHollowAllFlowCard(HollowBigStorageDetailsQueryVO query); |
| | | |
| | | List<HollowBigCageDetailsVO> queryVerticalSheetCageDetailsList(HollowBigCageDetailsRequest request); |
| | | } |
| | | |
| | |
| | | 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; |
| | |
| | | List<FlowCardVirtualSlotDTO> queryFlowCardIdsAndLayer(); |
| | | |
| | | List<FlowCardGlassInfoDTO> queryHollowAllFlowCard(HollowBigStorageDetailsQueryVO query); |
| | | |
| | | List<HollowBigCageDetailsVO> queryVerticalSheetCageDetailsList(HollowBigCageDetailsRequest request); |
| | | } |
| | | |
| | |
| | | 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; |
| | |
| | | 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>() |
| | |
| | | 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"; |
| | | |
| | | /** |
| | | * 直通格子 |
| | |
| | | .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); |
| | |
| | | }); |
| | | } |
| | | |
| | | 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()); |
| | |
| | | log.info("当前未收到进片请求,结束进片任务"); |
| | | return; |
| | | } |
| | | if (StringUtils.isNotBlank(s7DataZKDLPOne.getId1())){ |
| | | if (StringUtils.isNotBlank(s7DataZKDLPOne.getId1())) { |
| | | log.info("当前存在进片任务,结束"); |
| | | return; |
| | | } |
| | | if (StringUtils.isNotBlank(s7DataZKDLPOne.getId1())) { |
| | | log.info("当前存在进片任务请求,结束本次大笼子调度"); |
| | | return; |
| | | } |
| | |
| | | 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>() |
| | |
| | | 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, "任务调度没有多余格子,结束调度任务"); |
| | | } |
| | | |
| | |
| | | <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> |
| | |
| | | AND films_id LIKE CONCAT( '%', #{filmsId}, '%') |
| | | </if> |
| | | <if test="thickness != 0"> |
| | | AND thickness = #{thickness} |
| | | AND thickness = #{thickness} |
| | | </if> |
| | | ), |
| | | hollow_details_temp AS ( |
| | |
| | | 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 |
| | |
| | | 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> |