From 3124ce87407fe85f6780b3ba1a219d8d9e8d7475 Mon Sep 17 00:00:00 2001
From: wu <731351411@qq.com>
Date: 星期四, 30 十月 2025 13:21:32 +0800
Subject: [PATCH] Merge branch 'master' of http://10.153.19.25:10101/r/YiWuProject
---
UI-Project/src/views/Slicecage/slicecage.vue | 46 +++---
UI-Project/src/views/hollow/hollowslicecage.vue | 46 +++---
hangzhoumesParent/moduleService/hollowGlassModule/src/main/java/com/mes/hollow/service/impl/HollowGlassOutRelationInfoServiceImpl.java | 179 ++++++++++++++++-------------
hangzhoumesParent/moduleService/hollowGlassModule/src/main/java/com/mes/job/OpcPlcStorageCageHollowTask.java | 36 +++--
hangzhoumesParent/moduleService/hollowGlassModule/src/main/resources/mapper/HollowGlassQueueInfoMapper.xml | 42 ++++--
UI-Project/src/views/NewPage.vue | 8
6 files changed, 198 insertions(+), 159 deletions(-)
diff --git a/UI-Project/src/views/NewPage.vue b/UI-Project/src/views/NewPage.vue
index 96c235d..29d459e 100644
--- a/UI-Project/src/views/NewPage.vue
+++ b/UI-Project/src/views/NewPage.vue
@@ -22,10 +22,10 @@
height: `${rect.height}px`,
backgroundColor: 'lightblue'}">
<div class="centered-text">
- <div style="font-size: 15px;font-weight: bold;">{{ rect.sort }}</div>
- <div style="font-size: 15px;font-weight: bold;">{{ rect.process_id }}</div>
- <div style="font-size: 15px;font-weight: bold;">{{ rect.project_no }}</div>
- <div style="font-size: 30px;font-weight: bold;">{{ rect.widtha }}*{{ rect.heighta }}</div>
+ <div style="font-size: 10px;font-weight: bold;">{{ rect.sort }}</div>
+ <div style="font-size: 10px;font-weight: bold;">{{ rect.process_id }}</div>
+ <div style="font-size: 10px;font-weight: bold;">{{ rect.project_no }}</div>
+ <div style="font-size: 10px;font-weight: bold;">{{ rect.widtha }}*{{ rect.heighta }}</div>
</div>
</div>
</div>
diff --git a/UI-Project/src/views/Slicecage/slicecage.vue b/UI-Project/src/views/Slicecage/slicecage.vue
index 98578a7..aa87387 100644
--- a/UI-Project/src/views/Slicecage/slicecage.vue
+++ b/UI-Project/src/views/Slicecage/slicecage.vue
@@ -710,28 +710,28 @@
}
}
// 浠诲姟閲嶇疆
-const handleptask = async() => {
- try {
- const confirmResult = await ElMessageBox.confirm(
- t('searchOrder.partasks'),
- t('workOrder.prompt'),
- {
- confirmButtonText: t('workOrder.yes'),
- cancelButtonText: t('workOrder.cancel'),
- type: 'warning',
- }
- );
- if (confirmResult === 'confirm') {
- const response = await request.post('/cacheVerticalGlass/bigStorageCage/resetCage')
- if (response.code === 200) {
- ElMessage.success(response.message);
- } else {
- ElMessage.error(response.msg);
- }
- }
- } catch (error) {
- }
-};
+// const handleptask = async() => {
+// try {
+// const confirmResult = await ElMessageBox.confirm(
+// t('searchOrder.partasks'),
+// t('workOrder.prompt'),
+// {
+// confirmButtonText: t('workOrder.yes'),
+// cancelButtonText: t('workOrder.cancel'),
+// type: 'warning',
+// }
+// );
+// if (confirmResult === 'confirm') {
+// const response = await request.post('/cacheVerticalGlass/bigStorageCage/resetCage')
+// if (response.code === 200) {
+// ElMessage.success(response.message);
+// } else {
+// ElMessage.error(response.msg);
+// }
+// }
+// } catch (error) {
+// }
+// };
// 璀︽姤纭
const handleSure = async (row) => {
try {
@@ -1191,7 +1191,7 @@
<el-button style="margin-top: 7px;margin-left: 10px;" id="searchButton" type="success" @click="handlehistorical">{{ $t('searchOrder.historicaltasks') }}</el-button>
<el-button style="margin-top: 7px;margin-left: 10px;" id="searchButton" type="warning" @click="handleganghua">{{ $t('searchOrder.temperingqueries') }}</el-button>
<el-button style="margin-top: 7px;margin-left: 10px;" id="searchButton" type="info" @click="dialogFormVisibles=true;fetchFlows()">{{ $t('searchOrder.searchlayout') }}</el-button>
- <el-button style="margin-top: 7px;margin-left: 10px;" id="searchButton" type="danger" @click="handleptask()">{{ $t('searchOrder.partask') }}</el-button>
+ <!-- <el-button style="margin-top: 7px;margin-left: 10px;" id="searchButton" type="danger" @click="handleptask()">{{ $t('searchOrder.partask') }}</el-button> -->
<el-switch style="margin-top: 7px;margin-left: 10px;" v-model="ganghua" class="mb-2" :inactive-text="$t('searchOrder.temperedswitch')" @change="handleChange" />
<el-switch style="margin-top: 7px;margin-left: 10px;" v-model="diaodu" class="mb-2" :inactive-text="$t('searchOrder.Schedulingswitch')" @change="handlediaodu" />
<div id="dotClass">
diff --git a/UI-Project/src/views/hollow/hollowslicecage.vue b/UI-Project/src/views/hollow/hollowslicecage.vue
index eedbead..6c1b644 100644
--- a/UI-Project/src/views/hollow/hollowslicecage.vue
+++ b/UI-Project/src/views/hollow/hollowslicecage.vue
@@ -451,28 +451,28 @@
selectedRow.value = row; // 鏇存柊閫変腑鐨勮鏁版嵁
}
// 浠诲姟閲嶇疆
-const handleptask = async() => {
- try {
- const confirmResult = await ElMessageBox.confirm(
- t('searchOrder.partasks'),
- t('workOrder.prompt'),
- {
- confirmButtonText: t('workOrder.yes'),
- cancelButtonText: t('workOrder.cancel'),
- type: 'warning',
- }
- );
- if (confirmResult === 'confirm') {
- const response = await request.post('/hollowGlass/hollowBigStorageCage/resetCage')
- if (response.code === 200) {
- ElMessage.success(response.message);
- } else {
- ElMessage.error(response.msg);
- }
- }
- } catch (error) {
- }
-};
+// const handleptask = async() => {
+// try {
+// const confirmResult = await ElMessageBox.confirm(
+// t('searchOrder.partasks'),
+// t('workOrder.prompt'),
+// {
+// confirmButtonText: t('workOrder.yes'),
+// cancelButtonText: t('workOrder.cancel'),
+// type: 'warning',
+// }
+// );
+// if (confirmResult === 'confirm') {
+// const response = await request.post('/hollowGlass/hollowBigStorageCage/resetCage')
+// if (response.code === 200) {
+// ElMessage.success(response.message);
+// } else {
+// ElMessage.error(response.msg);
+// }
+// }
+// } catch (error) {
+// }
+// };
// 璋冨害寮�鍏�
const handlediaodu = async () => {
try {
@@ -944,7 +944,7 @@
<div style="display: flex;">
<el-button style="margin-top: 7px;margin-left: 10px;" id="searchButton" type="primary" @click="handlexiang">{{ $t('searchOrder.cageinformation') }}</el-button>
<el-button style="margin-top: 7px;margin-left: 10px;" id="searchButton" type="success" @click="handlehistorical">{{ $t('searchOrder.historicaltasks') }}</el-button>
- <el-button style="margin-top: 7px;margin-left: 10px;" id="searchButton" type="danger" @click="handleptask()">{{ $t('searchOrder.partask') }}</el-button>
+ <!-- <el-button style="margin-top: 7px;margin-left: 10px;" id="searchButton" type="danger" @click="handleptask()">{{ $t('searchOrder.partask') }}</el-button> -->
<el-switch style="margin-top: 7px;margin-left: 10px;" v-model="diaodu" class="mb-2" :inactive-text="$t('searchOrder.Schedulingswitch')" @change="handlediaodu" />
<div style="display: flex;">
<div style="margin-left: 15px;margin-top: 5px;font-size: 14px;top: 5vh;margin-top: 12px;">{{ $t('searchOrder.hollowPriority') }}锛�</div>
diff --git a/hangzhoumesParent/moduleService/hollowGlassModule/src/main/java/com/mes/hollow/service/impl/HollowGlassOutRelationInfoServiceImpl.java b/hangzhoumesParent/moduleService/hollowGlassModule/src/main/java/com/mes/hollow/service/impl/HollowGlassOutRelationInfoServiceImpl.java
index 92fd878..3b1bf13 100644
--- a/hangzhoumesParent/moduleService/hollowGlassModule/src/main/java/com/mes/hollow/service/impl/HollowGlassOutRelationInfoServiceImpl.java
+++ b/hangzhoumesParent/moduleService/hollowGlassModule/src/main/java/com/mes/hollow/service/impl/HollowGlassOutRelationInfoServiceImpl.java
@@ -14,7 +14,10 @@
import com.mes.hollow.entity.HollowBigStorageCageDetails;
import com.mes.hollow.entity.HollowFormulaDetails;
import com.mes.hollow.entity.HollowGlassOutRelationInfo;
-import com.mes.hollow.entity.dto.*;
+import com.mes.hollow.entity.dto.LisecHollowDetails;
+import com.mes.hollow.entity.dto.LisecHollowFrameDetails;
+import com.mes.hollow.entity.dto.LisecHollowGlassAndFrameDetails;
+import com.mes.hollow.entity.dto.LisecHollowGlassDetails;
import com.mes.hollow.entity.request.HollowHistoryTaskRequest;
import com.mes.hollow.entity.request.HollowTaskRequest;
import com.mes.hollow.mapper.HollowGlassOutRelationInfoMapper;
@@ -85,13 +88,13 @@
private static final int ID_RATIO = 10;
@Override
- @Transactional
+// @Transactional
public HollowGlassOutRelationInfo receiveTask(HollowTaskRequest request) {
return childrenTask(request, 0);
}
@Override
- @Transactional
+// @Transactional
public HollowGlassOutRelationInfo forceOutGlass(HollowTaskRequest request) {
return childrenTask(request, 1);
}
@@ -200,6 +203,7 @@
if (CollectionUtil.isEmpty(outRelationList) || outRelationList.size() != 1) {
return "鏈潯绾夸笉瀛樺湪璇ユ祦绋嬩换鍔℃垨鑰呭悓娴佺▼鍗′换鍔℃暟澶т簬1";
}
+ log.info("鏉庤禌鍏嬫祦绋嬪崱锛歿}", flowCardId);
HollowGlassOutRelationInfo relationInfo = outRelationList.get(0);
if (relationInfo.getTotalLayer() < 2) {
return "浠诲姟鎬诲眰鏁板皬浜�2锛屼笉鐢熸垚鏉庤禌鍏嬫枃浠�";
@@ -209,6 +213,7 @@
if (null == order) {
return "鐢熸垚澶辫触锛岀浉鍏宠鍗曚俊鎭笉瀛樺湪";
}
+ log.info("鏉庤禌鍏嬬浉鍏宠鍗曚俊鎭瘂}", order);
//鑾峰彇閰嶆柟鐩稿叧淇℃伅
HollowFormulaDetails formulaDetails = hollowFormulaDetailsService.getById(relationInfo.getFormulaId());
if (null == formulaDetails) {
@@ -219,6 +224,8 @@
if (layerCount != relationInfo.getTotalLayer() && isForce == 0) {
return "鐢熸垚澶辫触锛岃娴佺▼鍗″唴灞傛暟涓庤繘绗煎叧绯昏〃鍐呭眰鏁版暟閲忎笉鐩稿悓";
}
+
+ log.info("鏉庤禌鍏嬫�诲眰鏁皗}", layerCount);
//璁剧疆鏂囦欢鐨勪富浣撳唴瀹�
LisecHollowDetails details = new LisecHollowDetails();
String randomNumber = "" + (int) (Math.random() * 100000 + 100000);
@@ -308,6 +315,7 @@
// 鍒涘缓Calculator瀹炰緥
Blank blank = new Blank();
+ log.info("鏉庤禌鍏嬪熀纭�鏁版嵁宸茬敓鎴愶細{}", details);
// 鍒涘缓鏁版嵁妯″瀷
Map<String, Object> root = new HashMap<>();
root.put("blank", blank);
@@ -327,6 +335,8 @@
writer.write(out.toString());
} catch (TemplateException | IOException e) {
e.printStackTrace();
+
+ log.info("鏉庤禌鍏嬬敓鎴愬紓甯革細{}", e.getMessage());
}
return "success";
}
@@ -356,90 +366,99 @@
}
private HollowGlassOutRelationInfo childrenTask(HollowTaskRequest request, int isForce) {
- GlassInfo glassInfo = glassInfoService.getOne(new LambdaQueryWrapper<GlassInfo>().eq(GlassInfo::getFlowCardId, request.getFlowCardId()).last("limit 1"));
- HollowGlassOutRelationInfo info = new HollowGlassOutRelationInfo();
- if (null == glassInfo) {
- log.info("璇ユ祦绋嬪崱淇℃伅绯荤粺鏈壘鍒�");
- return info;
- }
- List<HollowGlassOutRelationInfo> outRelationInfos = this.list(new LambdaQueryWrapper<HollowGlassOutRelationInfo>()
- .eq(HollowGlassOutRelationInfo::getFlowCardId, request.getFlowCardId())
- .in(HollowGlassOutRelationInfo::getState, Const.HOLLOW_FLOW_CARD_NEW, Const.HOLLOW_FLOW_CARD_START, Const.HOLLOW_FLOW_CARD_PAUSE));
- if (CollectionUtil.isNotEmpty(outRelationInfos)) {
- log.info("褰撳墠娴佺▼鍗℃湁鏈畬鎴愮殑浠诲姟");
- return null;
- }
- //淇濆瓨浠诲姟鍏崇郴涓昏〃
- info.setFlowCardId(request.getFlowCardId());
- info.setCell(request.getCell());
- info.setIsForce(isForce);
- info.setTotalLayer(glassInfo.getTotalLayer());
- info.setState(Const.HOLLOW_FLOW_CARD_NEW);
- info.setTotalPairQuantity(request.getTotalPairQuantity());
- info.setFormulaId(request.getFormulaId());
- this.save(info);
- // 鏌ヨ鍑洪渶瑕佸嚭鐜荤拑鐨勯槦鍒�
- List<HollowBigStorageCageDetails> hollowBigStorageCageDetailsList = hollowBigStorageCageDetailsService
- .queryOutGlassList(request.getFlowCardId(), request.getCell());
- int isPairCount = glassInfo.getTotalLayer() * request.getTotalPairQuantity();
- List<HollowGlassQueueInfo> hollowQueues = new ArrayList<>();
- Integer carWidth = sysConfigService.queryConfigValue(ConstSysConfig.HOLLOW_CAR_WIDTH);
-// Integer glassGap = sysConfigService.queryConfigValue(ConstSysConfig.HOLLOW_GLASS_GAP);
- Integer glassGap = hollowGlassRelationInfoService.getGlassGapByThickness(hollowBigStorageCageDetailsList.get(0).getThickness());
- if (930 == request.getCell()) {
- Map<Integer, List<HollowBigStorageCageDetails>> listMap = hollowBigStorageCageDetailsList.stream()
- .collect(Collectors.groupingBy(HollowBigStorageCageDetails::getHollowSequence));
- Map<Integer, List<HollowBigStorageCageDetails>> sortListMap = new TreeMap<>();
- sortListMap.putAll(listMap);
- for (Map.Entry<Integer, List<HollowBigStorageCageDetails>> entry : sortListMap.entrySet()) {
- //鍒涘缓闃熷垪鎺ユ敹涓嶆弧瓒虫垚瀵规儏鍐典笅锛氫竴瀵圭幓鐠冨垎鍑犳涓婅溅鐨勬搴忛棶棰�
- List<HollowGlassQueueInfo> tempList = new ArrayList<>();
- //鍏堝皢鐜荤拑鎸夌収姝e父椤哄簭鎺掑垪锛岃绠椾竴杞︽渶澶氭斁鍑犲潡锛岀畻濂藉潡鏁颁箣鍚庡皢涓�杞︾殑鐜荤拑鎸夌収鍊掑簭瀛樺偍
- List<HollowBigStorageCageDetails> reverse = CollectionUtil.reverse(entry.getValue());
- int remainWidth = carWidth;
- for (HollowBigStorageCageDetails item : reverse) {
- remainWidth = remainWidth - (int) Math.max(item.getWidth(), item.getHeight());
- if (remainWidth < 0) {
- hollowQueues.addAll(CollectionUtil.reverse(tempList));
- tempList = new ArrayList<>();
- remainWidth = carWidth - (int) Math.max(item.getWidth(), item.getHeight());
- }
- HollowGlassQueueInfo queueInfo = HollowBDetailToQueue(item, info.getId(), request.getCell());
- tempList.add(queueInfo);
- remainWidth = remainWidth - glassGap;
- }
- hollowQueues.addAll(CollectionUtil.reverse(tempList));
- HollowBigStorageCageDetails cageDetails = entry.getValue().get(0);
- if (cageDetails.getIsPair() == 1) {
- isPairCount = isPairCount - cageDetails.getTotalLayer();
- if (isPairCount == 0) {
- break;
- }
- }
- }
- } else {
- loop:
- for (HollowBigStorageCageDetails item : hollowBigStorageCageDetailsList) {
- HollowGlassQueueInfo queueInfo = HollowBDetailToQueue(item, info.getId(), request.getCell());
- hollowQueues.add(queueInfo);
- if (item.getIsPair() == 1) {
- isPairCount = isPairCount - 1;
- if (isPairCount == 0) {
- break loop;
+ try {
+
+ GlassInfo glassInfo = glassInfoService.getOne(new LambdaQueryWrapper<GlassInfo>().eq(GlassInfo::getFlowCardId, request.getFlowCardId()).last("limit 1"));
+ HollowGlassOutRelationInfo info = new HollowGlassOutRelationInfo();
+ if (null == glassInfo) {
+ log.info("璇ユ祦绋嬪崱淇℃伅绯荤粺鏈壘鍒�");
+ return info;
+ }
+ log.error("鍒涘缓浠诲姟鏃惰幏鍙栫幓鐠冧俊鎭細{}", info);
+ List<HollowGlassOutRelationInfo> outRelationInfos = this.list(new LambdaQueryWrapper<HollowGlassOutRelationInfo>()
+ .eq(HollowGlassOutRelationInfo::getFlowCardId, request.getFlowCardId())
+ .in(HollowGlassOutRelationInfo::getState, Const.HOLLOW_FLOW_CARD_NEW, Const.HOLLOW_FLOW_CARD_START, Const.HOLLOW_FLOW_CARD_PAUSE));
+ if (CollectionUtil.isNotEmpty(outRelationInfos)) {
+ log.info("褰撳墠娴佺▼鍗℃湁鏈畬鎴愮殑浠诲姟");
+ return null;
+ }
+ //淇濆瓨浠诲姟鍏崇郴涓昏〃
+ info.setFlowCardId(request.getFlowCardId());
+ info.setCell(request.getCell());
+ info.setIsForce(isForce);
+ info.setTotalLayer(glassInfo.getTotalLayer());
+ info.setState(Const.HOLLOW_FLOW_CARD_NEW);
+ info.setTotalPairQuantity(request.getTotalPairQuantity());
+ info.setFormulaId(request.getFormulaId());
+ this.save(info);
+ // 鏌ヨ鍑洪渶瑕佸嚭鐜荤拑鐨勯槦鍒�
+ List<HollowBigStorageCageDetails> hollowBigStorageCageDetailsList = hollowBigStorageCageDetailsService
+ .queryOutGlassList(request.getFlowCardId(), request.getCell());
+ int isPairCount = glassInfo.getTotalLayer() * request.getTotalPairQuantity();
+ List<HollowGlassQueueInfo> hollowQueues = new ArrayList<>();
+ Integer carWidth = sysConfigService.queryConfigValue(ConstSysConfig.HOLLOW_CAR_WIDTH);
+ Integer glassGap = hollowGlassRelationInfoService.getGlassGapByThickness(hollowBigStorageCageDetailsList.get(0).getThickness());
+ if (930 == request.getCell()) {
+ Map<Integer, List<HollowBigStorageCageDetails>> listMap = hollowBigStorageCageDetailsList.stream()
+ .collect(Collectors.groupingBy(HollowBigStorageCageDetails::getHollowSequence));
+ Map<Integer, List<HollowBigStorageCageDetails>> sortListMap = new TreeMap<>();
+ sortListMap.putAll(listMap);
+ for (Map.Entry<Integer, List<HollowBigStorageCageDetails>> entry : sortListMap.entrySet()) {
+ //鍒涘缓闃熷垪鎺ユ敹涓嶆弧瓒虫垚瀵规儏鍐典笅锛氫竴瀵圭幓鐠冨垎鍑犳涓婅溅鐨勬搴忛棶棰�
+ List<HollowGlassQueueInfo> tempList = new ArrayList<>();
+ //鍏堝皢鐜荤拑鎸夌収姝e父椤哄簭鎺掑垪锛岃绠椾竴杞︽渶澶氭斁鍑犲潡锛岀畻濂藉潡鏁颁箣鍚庡皢涓�杞︾殑鐜荤拑鎸夌収鍊掑簭瀛樺偍
+ List<HollowBigStorageCageDetails> reverse = CollectionUtil.reverse(entry.getValue());
+ int remainWidth = carWidth;
+ for (HollowBigStorageCageDetails item : reverse) {
+ remainWidth = remainWidth - (int) Math.max(item.getWidth(), item.getHeight());
+ if (remainWidth < 0) {
+ hollowQueues.addAll(CollectionUtil.reverse(tempList));
+ tempList = new ArrayList<>();
+ remainWidth = carWidth - (int) Math.max(item.getWidth(), item.getHeight());
+ }
+ HollowGlassQueueInfo queueInfo = HollowBDetailToQueue(item, info.getId(), request.getCell());
+ tempList.add(queueInfo);
+ remainWidth = remainWidth - glassGap;
+ }
+ hollowQueues.addAll(CollectionUtil.reverse(tempList));
+ HollowBigStorageCageDetails cageDetails = entry.getValue().get(0);
+ if (cageDetails.getIsPair() == 1) {
+ isPairCount = isPairCount - cageDetails.getTotalLayer();
+ if (isPairCount == 0) {
+ break;
+ }
+ }
+ }
+
+ } else {
+ loop:
+ for (HollowBigStorageCageDetails item : hollowBigStorageCageDetailsList) {
+ HollowGlassQueueInfo queueInfo = HollowBDetailToQueue(item, info.getId(), request.getCell());
+ hollowQueues.add(queueInfo);
+ if (item.getIsPair() == 1) {
+ isPairCount = isPairCount - 1;
+ if (isPairCount == 0) {
+ break loop;
+ }
}
}
}
- }
- hollowGlassQueueInfoService.saveBatch(hollowQueues);
- try {
- if (request.getCell() == 930) {
- generateHollowLisecFile(request.getFlowCardId(), 930, isForce, 0);
+ hollowGlassQueueInfoService.saveBatch(hollowQueues);
+ try {
+ log.info("鏉庤禌鍏嬬敓鎴愭枃浠讹細{}", request);
+ if (request.getCell() == 930) {
+ generateHollowLisecFile(request.getFlowCardId(), 930, isForce, 0);
+ }
+ } catch (Exception e) {
+ log.info("鐢熸垚鏉庤禌鍏嬫枃浠舵椂鍙戠敓寮傚父锛屾祦绋嬪崱鍙蜂负{}", request.getFlowCardId());
}
+ return info;
+
} catch (Exception e) {
- log.info("鐢熸垚鏉庤禌鍏嬫枃浠舵椂鍙戠敓寮傚父锛屾祦绋嬪崱鍙蜂负{}", request.getFlowCardId());
+ log.error("鍒涘缓浠诲姟鏃跺彂鐢熷紓甯革細{}", e.getMessage());
+ throw new RuntimeException(e);
}
- return info;
}
private HollowGlassQueueInfo HollowBDetailToQueue(HollowBigStorageCageDetails details, Long taskId, int targetCell) {
diff --git a/hangzhoumesParent/moduleService/hollowGlassModule/src/main/java/com/mes/job/OpcPlcStorageCageHollowTask.java b/hangzhoumesParent/moduleService/hollowGlassModule/src/main/java/com/mes/job/OpcPlcStorageCageHollowTask.java
index 2365b5b..2b87ea3 100644
--- a/hangzhoumesParent/moduleService/hollowGlassModule/src/main/java/com/mes/job/OpcPlcStorageCageHollowTask.java
+++ b/hangzhoumesParent/moduleService/hollowGlassModule/src/main/java/com/mes/job/OpcPlcStorageCageHollowTask.java
@@ -515,11 +515,17 @@
.eq(HollowBigStorageCageDetails::getSlot, THROUGH_SLOT)
.in(HollowBigStorageCageDetails::getState, Const.GLASS_STATE_IN_ALL).last("limit 1"));
log.info("涓┖澶х悊鐗囩洿閫氬彴鐜荤拑淇℃伅{}", details);
- if (details != null && details.getGlassId().equals(unFinishHollowQueueList.get(0).getGlassId())) {
- unFinishHollowQueueList.get(0).setSlot(THROUGH_SLOT);
- log.info("灏嗕腑绌洪槦鍒椾腑鐨勬牸瀛愬彿鏇挎崲涓虹洿閫氬彴{}", unFinishHollowQueueList);
+ if (details != null) {
+ unFinishHollowQueueList.stream().forEach(e -> {
+ if (e.getGlassId().equals(details.getGlassId())) {
+ e.setSlot(THROUGH_SLOT);
+ e.setDeviceId(0);
+ log.info("灏嗕腑绌洪槦鍒椾腑鐨勬牸瀛愬彿鏇挎崲涓虹洿閫氬彴{}", e);
+ }
+ });
}
- List<HollowGlassQueueInfo> infoList = unFinishHollowQueueList.stream().filter(e -> !(e.getSlot() > 500 && 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());
@@ -910,18 +916,21 @@
int count = hollowBigStorageCageDetailsService.count(new LambdaQueryWrapper<HollowBigStorageCageDetails>()
.eq(HollowBigStorageCageDetails::getState, Const.GLASS_STATE_IN)
.eq(HollowBigStorageCageDetails::getSlot, THROUGH_SLOT));
+ log.info("鐩撮�氱墖鍙扮殑浠诲姟鏁伴噺涓猴細{}", count);
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::getDeviceId, 6)
.in(HollowBigStorageCageDetails::getGlassId, glassIdList));
+ log.info("鑾峰彇璋冨害浠诲姟鍒楄〃锛歿}", list);
if (CollectionUtil.isEmpty(list)) {
return;
}
HollowBigStorageCageDetails details = list.get(0);
- //todo:鐢熸垚杩涜繘鐗囧ぇ杞︿换鍔�
+ log.info("鑾峰彇闇�瑕佽皟搴︾殑鍗曟潯浠诲姟锛歿}", details);
+ //鐢熸垚杩涜繘鐗囧ぇ杞︿换鍔�
hollowBigStorageCageDetailsService.update(new LambdaUpdateWrapper<HollowBigStorageCageDetails>()
.set(HollowBigStorageCageDetails::getState, Const.RAW_GLASS_STATE_OUT)
.eq(HollowBigStorageCageDetails::getGlassId, details.getGlassId()));
@@ -1106,15 +1115,6 @@
Integer glassGap = hollowGlassRelationInfoService.getGlassGapByThickness(list.get(0).getThickness());
log.info("涓┖鐢熸垚涓�杞︿换鍔★細{}", list);
for (T e : list) {
- //鏍煎瓙涓虹浜斾釜绗煎瓙鏃朵笉娣诲姞鍑虹墖浠诲姟
- HollowBigStorageCage hollowBigStorageCage = hollowBigStorageCageService.getOne(
- new LambdaQueryWrapper<HollowBigStorageCage>()
- .eq(HollowBigStorageCage::getSlot, e.getSlot())
- );
-
- if (hollowBigStorageCage != null && hollowBigStorageCage.getDeviceId() == 6) {
- break;
- }
if (templist.size() >= outCarMaxSize || Math.max((int) e.getWidth(), (int) e.getHeight()) > remainWidth) {
break;
}
@@ -1166,6 +1166,12 @@
for (T t : baseInfoList) {
bigStorageCageTaskList.add(new BigStorageCageTask(t.getGlassId(), t.getSlot(), targetSlot, 0));
}
+
+ List<BigStorageCageTask> tasks = bigStorageCageTaskList.stream().filter(e -> e.getStartSlot() >= 500 && e.getStartSlot() < 900).collect(Collectors.toList());
+ if (CollectionUtil.isNotEmpty(tasks)) {
+ log.info("褰撳墠鍑虹墖闃熷垪瀛樺湪鏂扮瀛愮殑鐜荤拑灏忕墖锛岀粨鏉熸湰娆′换鍔★細{}", tasks);
+ return false;
+ }
//娓呯┖浠诲姟琛ㄦ暟鎹�
resetOutTask();
log.info("鐢熸垚鍑虹墖浠诲姟鏁版嵁{}", bigStorageCageTaskList);
diff --git a/hangzhoumesParent/moduleService/hollowGlassModule/src/main/resources/mapper/HollowGlassQueueInfoMapper.xml b/hangzhoumesParent/moduleService/hollowGlassModule/src/main/resources/mapper/HollowGlassQueueInfoMapper.xml
index 221f097..008730c 100644
--- a/hangzhoumesParent/moduleService/hollowGlassModule/src/main/resources/mapper/HollowGlassQueueInfoMapper.xml
+++ b/hangzhoumesParent/moduleService/hollowGlassModule/src/main/resources/mapper/HollowGlassQueueInfoMapper.xml
@@ -4,20 +4,34 @@
<select id="queryNeedInCarGlass" resultType="java.lang.String">
WITH queue_temp AS (
- SELECT slot,
- glass_id,
- LEAST(width, height) AS height,
- relation_id,
- ROW_NUMBER() OVER ( PARTITION BY cell ORDER BY hollow_sequence ) AS rn
- FROM hollow_glass_queue_info
- WHERE state = - 1
+ SELECT
+ slot,
+ glass_id,
+ LEAST( width, height ) AS height,
+ relation_id,
+ is_pair,
+ ROW_NUMBER() OVER ( PARTITION BY cell ORDER BY hollow_sequence ) AS rn
+ FROM
+ hollow_glass_queue_info
+ WHERE
+ state = - 1
),
- glass_id_temp AS (SELECT * FROM queue_temp WHERE rn = 1),
- task_temp AS (SELECT *
- FROM glass_id_temp t
- INNER JOIN hollow_glass_out_relation_info t1 ON t.relation_id = t1.id
- WHERE t1.state = 1)
- SELECT glass_id
- FROM task_temp
+ task_temp AS (
+ SELECT
+ t.*
+ FROM
+ queue_temp t
+ INNER JOIN hollow_glass_out_relation_info t1 ON t.relation_id = t1.id
+ WHERE
+ t1.state = 1
+ and t.slot BETWEEN 500 and 900
+ AND (
+ t.is_pair = 1
+ OR ( t.is_pair = 0 AND t1.is_force = 1 )) )SELECT
+ glass_id
+ FROM
+ task_temp
+ ORDER BY
+ rn
</select>
</mapper>
\ No newline at end of file
--
Gitblit v1.8.0