From 09bb613cb75774426df43ecd5152aeac35e5315c Mon Sep 17 00:00:00 2001
From: ZengTao <2773468879@qq.com>
Date: 星期一, 09 九月 2024 15:01:56 +0800
Subject: [PATCH] 掰片查询修改为查卧式理片数据,钢化查询界面添加显示更多信息,去除重复玻璃id不能连续扫码限制,人工下片添加判断是否超尺寸
---
hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/job/DownLoadCacheGlassTask.java | 47 ++++++++++++++++++++++++++++++++++++++++++++---
1 files changed, 44 insertions(+), 3 deletions(-)
diff --git a/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/job/DownLoadCacheGlassTask.java b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/job/DownLoadCacheGlassTask.java
index 3905579..f3a73be 100644
--- a/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/job/DownLoadCacheGlassTask.java
+++ b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/job/DownLoadCacheGlassTask.java
@@ -30,6 +30,7 @@
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
+import org.springframework.scheduling.annotation.Async;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
@@ -80,6 +81,7 @@
@Scheduled(fixedDelay = 300)
+ @Async
public void plcHomeEdgTask() {
PlcParameterObject plcParameterObject = S7object.getinstance().PlcMesObject;
String requestWord = plcParameterObject.getPlcParameter("requestWord").getValue();
@@ -129,6 +131,7 @@
}
@Scheduled(fixedDelay = 300)
+ @Async
public void plcShelfFull() {
List<DownWorkstation> list = downGlassInfoService.queryWorkStationIsFull();
if (CollectionUtils.isNotEmpty(list)) {
@@ -139,6 +142,7 @@
}
@Scheduled(fixedDelay = 1000)
+ @Async
public void dealDamageTask() {
Date startDate = new Date();
log.info("涓嬬墖鐮存崯鐜荤拑娓呴櫎浠诲姟寮�濮嬫墽琛屾椂闂达細{}", startDate);
@@ -149,6 +153,20 @@
List<String> glassList = downGlassTaskList.stream().map(DownGlassTask::getGlassId).collect(Collectors.toList());
//灏嗕换鍔¤〃涓殑鏁版嵁鍒犻櫎
downGlassTaskService.remove(new LambdaQueryWrapper<DownGlassTask>().in(DownGlassTask::getTaskType, Const.GLASS_CACHE_TYPE_OUT_ALL).in(DownGlassTask::getGlassId, glassList));
+ //娓呴櫎涓嬬墖鐜荤拑淇℃伅琛ㄦ暟鎹�
+ downGlassInfoService.remove(new LambdaQueryWrapper<DownGlassInfo>().in(DownGlassInfo::getGlassId, glassList));
+ //涓嬬墖鏁伴噺-1
+ for (DownGlassTask downGlassTask : downGlassTaskList
+ ) {
+ if (Const.GLASS_CACHE_TYPE_OUT_ALL.equals(downGlassTask.getTaskType())) {
+ downWorkstationService.update(
+ new LambdaUpdateWrapper<DownWorkstation>()
+ .setSql("racks_number = racks_number-1")
+ .eq(DownWorkstation::getWorkstationId, downGlassTask.getEndCell())
+ );
+
+ }
+ }
List<Damage> damageList = downGlassTaskList.stream().map(e -> {
Damage damage = new Damage();
damage.setGlassId(e.getGlassId());
@@ -169,6 +187,7 @@
* 鏇存柊宸茬粦瀹氬伐浣嶆祦绋嬪崱鐨勭牬鎹�/鎷胯蛋鐨勬暟閲忎俊鎭�
*/
@Scheduled(fixedDelay = 1000)
+ @Async
public void updateWorkStationOtherCount() {
Date startDate = new Date();
log.info("涓嬬墖鐮存洿鏂版崯鐜荤拑鏁伴噺浠诲姟寮�濮嬫墽琛屾椂闂达細{}", startDate);
@@ -229,6 +248,7 @@
log.info("鏈夌┖鏋跺瓙,灏嗘祦绋嬪崱涓庢灦瀛愬ソ缁戝畾锛屾墽琛岃繘鐗囦换鍔� 缁撴潫");
//缁戝畾娴佺▼鍗�
downWorkstationService.updateFlowCardIdAndCount(glassInfo.getFlowCardId(), list.get(0).getWorkstationId(), glassInfo.getLayer());
+// downWorkstationService.updateFlowCardIdAndCount(glassInfo.getFlowCardId(), list.get(0).getId(), glassInfo.getLayer());
checkFlag = Boolean.TRUE;
}
}
@@ -277,12 +297,18 @@
//灏嗕换鍔℃彃鍏ョ悊鐗囩璇︽儏琛�
DownStorageCageDetails downStorageCageDetails = new DownStorageCageDetails();
BeanUtils.copyProperties(glassInfo, downStorageCageDetails);
+ //褰撻渶瑕佸悎骞惰惤鏋舵椂涓嶇粦瀹氬眰鍙�
+ if(glassInfo.getCombine()==0){
+ downStorageCageDetails.setLayer(null);
+ }
downStorageCageDetails.setState(Const.GLASS_STATE_IN);
downStorageCageDetails.setSlot(nearestEmpty.getSlot());
downStorageCageDetails.setDeviceId(nearestEmpty.getDeviceId());
downStorageCageDetailsService.save(downStorageCageDetails);
// 鐢熸垚杩涚墖浠诲姟
initDownGlassTask(glassInfo, 0, nearestEmpty.getSlot(), Const.GLASS_CACHE_TYPE_IN);
+ //鍒犻櫎鐞嗙墖绗艰〃鎷胯蛋/鐮存崯鏁版嵁鏁版嵁
+ damageService.deleteByGlassId(glassInfo.getGlassId());
}
public Boolean outTo(String glassStatus06, String out08Glassstate, String glassStatus11, String
@@ -299,6 +325,10 @@
if (StringUtils.isNotBlank(glassId)) {
GlassInfo glassInfo = glassInfoService.getOne(new LambdaQueryWrapper<GlassInfo>().eq(GlassInfo::getGlassId, glassId));
BeanUtils.copyProperties(glassInfo, cageDetails);
+ //褰撻渶瑕佸悎骞惰惤鏋舵椂涓嶇粦瀹氬眰鍙�
+ if(glassInfo.getCombine()==0){
+ cageDetails.setLayer(null);
+ }
//鑾峰彇褰撳墠绗煎瓙绌烘牸淇℃伅
DownStorageCage empty = downStorageCageService.selectCacheEmpty(Integer.parseInt(currentSlot), Boolean.TRUE);
cageDetails.setSlot(empty.getSlot());
@@ -590,15 +620,24 @@
if (null != emptyDownWorkstation) {
log.info("鑾峰彇鍒扮┖鏋跺瓙淇℃伅锛岀粦瀹氭祦绋嬪崱");
downWorkstationService.updateFlowCardIdAndCount(downStorageCageDetails.getFlowCardId(), emptyDownWorkstation.getWorkstationId(), downStorageCageDetails.getLayer());
+// downWorkstationService.updateFlowCardIdAndCount(downStorageCageDetails.getFlowCardId(), emptyDownWorkstation.getId(), downStorageCageDetails.getLayer());
endCell = emptyDownWorkstation.getWorkstationId();
} else {
+ //todo:澧炲姞铏氭嫙宸ヤ綅,缁戝畾娴佺▼鍗�
+// downWorkstationService.insertDownWorkstation();
+// endCell = Const.G13_WORK_STATION;
+// downWorkstationService.updateFlowCardIdAndCount(downStorageCageDetails.getFlowCardId(), emptyDownWorkstation.getId(), downStorageCageDetails.getLayer());
log.info("娌℃湁绌烘灦瀛愪俊鎭紝鏃犳硶缁戝畾娴佺▼鍗�");
return Boolean.FALSE;
}
} else {
- DownWorkstation workstation = downWorkstationService.getOne(new LambdaUpdateWrapper<DownWorkstation>()
- .eq(DownWorkstation::getFlowCardId, downStorageCageDetails.getFlowCardId()).eq(DownWorkstation::getLayer, downStorageCageDetails.getLayer()));
- endCell = workstation.getWorkstationId();
+ if (downStorageCageDetails.getWidth() > maxWidth || downStorageCageDetails.getHeight() > maxHeight) {
+ endCell = Const.G13_WORK_STATION;
+ } else {
+ DownWorkstation workstation = downWorkstationService.getOne(new LambdaUpdateWrapper<DownWorkstation>()
+ .eq(DownWorkstation::getFlowCardId, downStorageCageDetails.getFlowCardId()).eq(DownWorkstation::getLayer, downStorageCageDetails.getLayer()));
+ endCell = workstation.getWorkstationId();
+ }
}
//鏇存柊钀芥灦鐜荤拑鏁伴噺
if (endCell == Const.G13_WORK_STATION) {
@@ -620,6 +659,8 @@
//鐢熸垚浠诲姟淇℃伅
GlassInfo glassInfo = new GlassInfo();
BeanUtils.copyProperties(downStorageCageDetails, glassInfo);
+ //鍒犻櫎鐞嗙墖绗艰〃鎷胯蛋/鐮存崯鏁版嵁鏁版嵁
+ damageService.deleteByGlassId(glassInfo.getGlassId());
return initDownGlassTask(glassInfo, downStorageCageDetails.getSlot(), endCell, taskType);
}
--
Gitblit v1.8.0