From b94ae4d8f439b78a419da97d12e863d41ac4c181 Mon Sep 17 00:00:00 2001
From: zhoushihao <zsh19950802@163.com>
Date: 星期二, 10 十二月 2024 18:57:43 +0800
Subject: [PATCH] 1、fixbug:玻璃出片调度未将格子置空导致有进片任务,占用同一格的情况 2、大理片笼界面显示缺少任务信息 3、优化钢化推送任务
---
hangzhoumesParent/moduleService/howllowGlassModule/src/main/java/com/mes/hollow/service/impl/HollowGlassOutRelationInfoServiceImpl.java | 19 +++++++++++++++++++
1 files changed, 19 insertions(+), 0 deletions(-)
diff --git a/hangzhoumesParent/moduleService/howllowGlassModule/src/main/java/com/mes/hollow/service/impl/HollowGlassOutRelationInfoServiceImpl.java b/hangzhoumesParent/moduleService/howllowGlassModule/src/main/java/com/mes/hollow/service/impl/HollowGlassOutRelationInfoServiceImpl.java
index 9b7ffb7..e110c40 100644
--- a/hangzhoumesParent/moduleService/howllowGlassModule/src/main/java/com/mes/hollow/service/impl/HollowGlassOutRelationInfoServiceImpl.java
+++ b/hangzhoumesParent/moduleService/howllowGlassModule/src/main/java/com/mes/hollow/service/impl/HollowGlassOutRelationInfoServiceImpl.java
@@ -1,5 +1,6 @@
package com.mes.hollow.service.impl;
+import cn.hutool.core.collection.CollectionUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.mes.common.config.Const;
@@ -12,12 +13,14 @@
import com.mes.hollow.service.HollowGlassOutRelationInfoService;
import com.mes.hollowqueue.entity.HollowGlassQueueInfo;
import com.mes.hollowqueue.service.HollowGlassQueueInfoService;
+import com.mes.utils.RedisUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.ArrayList;
+import java.util.Date;
import java.util.List;
import java.util.stream.Collectors;
@@ -38,6 +41,9 @@
@Resource
HollowGlassQueueInfoService hollowGlassQueueInfoService;
+ @Resource
+ RedisUtil redisUtil;
+
@Override
public HollowGlassOutRelationInfo receiveTask(String flowCardId, int cell, int totalPairQuantity) {
return childrenTask(flowCardId,cell,totalPairQuantity,0);
@@ -48,6 +54,12 @@
return childrenTask(flowCardId,cell,totalPairQuantity,1);
}
+ @Override
+ public Boolean dispatchHollowSwitch(Boolean flag) {
+ redisUtil.setCacheObject("dispatchHollowSwitch", flag);
+ return redisUtil.getCacheObject("dispatchHollowSwitch");
+ }
+
private HollowGlassOutRelationInfo childrenTask(String flowCardId, int cell, int totalPairQuantity,int isForce) {
GlassInfo glassInfo = glassInfoService.getOne(new LambdaQueryWrapper<GlassInfo>().eq(GlassInfo::getFlowCardId, flowCardId).last("limit 1"));
@@ -55,6 +67,11 @@
if (null == glassInfo) {
log.info("璇ユ祦绋嬪崱淇℃伅绯荤粺鏈壘鍒�");
return info;
+ }
+ List<HollowGlassOutRelationInfo> outRelationInfos = this.list(new LambdaQueryWrapper<HollowGlassOutRelationInfo>().eq(HollowGlassOutRelationInfo::getCell, cell)
+ .in(HollowGlassOutRelationInfo::getState, Const.HOLLOW_FLOW_CARD_START));
+ if (CollectionUtil.isNotEmpty(outRelationInfos)){
+ return null;
}
info.setFlowCardId(flowCardId);
info.setCell(cell);
@@ -71,6 +88,8 @@
BeanUtils.copyProperties(queue, queueInfo);
queueInfo.setState(Const.TEMPERING_NEW);
queueInfo.setCell(cell);
+ queueInfo.setCreateTime(new Date());
+ queueInfo.setUpdateTime(new Date());
hollowQueues.add(queueInfo);
if (queue.getIsPair() == 1){
isPairCount -=1;
--
Gitblit v1.8.0