From e31a077927d47bd05bcfdc3367deafb8c4069c6d Mon Sep 17 00:00:00 2001
From: zhoushihao <zsh19950802@163.com>
Date: 星期四, 26 十二月 2024 23:57:34 +0800
Subject: [PATCH] 1、卧式理片玻璃替换仅替换版图信息 2、指定钢化、指定工程fixbug:膜系字段修改为filmsId 3、移除大理片笼向前端推送钢化历史任务数据 4、中空领取任务界面接口改造:新增开始/暂停/结束任务按钮,流程卡列表、预览任务、删除任务接口 5、领取/强制任务接口改造:新增除膜信息、李赛克文件需要的数据信息
---
hangzhoumesParent/moduleService/howllowGlassModule/src/main/java/com/mes/hollow/mapper/HollowGlassOutRelationTaskDetailsMapper.java | 15 +
hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/job/OPCPlcSlicecage.java | 2
hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/bigstorage/service/impl/BigStorageCageDetailsServiceImpl.java | 14
hangzhoumesParent/moduleService/howllowGlassModule/src/main/java/com/mes/hollow/service/impl/HollowGlassOutRelationInfoServiceImpl.java | 132 ++++++++++++--
hangzhoumesParent/moduleService/TemperingGlassModule/src/main/java/com/mes/job/TemperingTask.java | 3
hangzhoumesParent/common/servicebase/src/main/resources/mapper/TemperingGlassInfoMapper.xml | 4
hangzhoumesParent/moduleService/howllowGlassModule/src/main/java/com/mes/hollow/entity/request/HollowTaskRequest.java | 64 +++++++
hangzhoumesParent/moduleService/howllowGlassModule/src/main/java/com/mes/hollow/service/impl/HollowGlassOutRelationTaskDetailsServiceImpl.java | 19 ++
hangzhoumesParent/moduleService/howllowGlassModule/src/main/java/com/mes/hollow/service/HollowGlassOutRelationInfoService.java | 20 ++
hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/job/OpcCacheGlassTask.java | 51 +++-
hangzhoumesParent/moduleService/TemperingGlassModule/src/main/java/com/mes/job/OpcNGTemperingTask.java | 3
hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/job/OpcPlcStorageCageNewTask.java | 6
hangzhoumesParent/moduleService/howllowGlassModule/src/main/java/com/mes/hollow/service/HollowGlassOutRelationTaskDetailsService.java | 15 +
hangzhoumesParent/moduleService/howllowGlassModule/src/main/java/com/mes/hollowqueue/entity/HollowGlassQueueInfo.java | 5
hangzhoumesParent/common/servicebase/src/main/java/com/mes/temperingglass/entity/TemperingGlassInfo.java | 6
hangzhoumesParent/moduleService/howllowGlassModule/src/main/java/com/mes/hollow/entity/HollowGlassOutRelationTaskDetails.java | 113 ++++++++++++
hangzhoumesParent/moduleService/howllowGlassModule/src/main/java/com/mes/hollow/controller/HollowGlassOutRelationInfoController.java | 48 ++++
17 files changed, 452 insertions(+), 68 deletions(-)
diff --git a/hangzhoumesParent/common/servicebase/src/main/java/com/mes/temperingglass/entity/TemperingGlassInfo.java b/hangzhoumesParent/common/servicebase/src/main/java/com/mes/temperingglass/entity/TemperingGlassInfo.java
index a61d9a6..7a5431d 100644
--- a/hangzhoumesParent/common/servicebase/src/main/java/com/mes/temperingglass/entity/TemperingGlassInfo.java
+++ b/hangzhoumesParent/common/servicebase/src/main/java/com/mes/temperingglass/entity/TemperingGlassInfo.java
@@ -52,12 +52,6 @@
private double thickness;
/**
- * 鑶滅郴
- */
- @ApiModelProperty(value = "鑶滅郴", position = 9)
- private String filmsid;
-
- /**
* 閽㈠寲鏄惁鎺ュ彈妯斁
*/
@ApiModelProperty(value = "閽㈠寲鏄惁鎺ュ彈妯斁", position = 10)
diff --git a/hangzhoumesParent/common/servicebase/src/main/resources/mapper/TemperingGlassInfoMapper.xml b/hangzhoumesParent/common/servicebase/src/main/resources/mapper/TemperingGlassInfoMapper.xml
index 48ea8cc..55b503b 100644
--- a/hangzhoumesParent/common/servicebase/src/main/resources/mapper/TemperingGlassInfoMapper.xml
+++ b/hangzhoumesParent/common/servicebase/src/main/resources/mapper/TemperingGlassInfoMapper.xml
@@ -2,12 +2,12 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.mes.temperingglass.mapper.TemperingGlassInfoMapper">
<insert id="saveBatch">
- INSERT INTO tempering_glass_info (glass_id, flow_card_id, glass_type, width, height, thickness, filmsid,
+ INSERT INTO tempering_glass_info (glass_id, flow_card_id, glass_type, width, height, thickness, films_id,
ishorizontal, tempering_layout_id,
tempering_feed_sequence, x_coordinate, y_coordinate, angle, state, slot, engineer_id, deleted) VALUES
<foreach collection="list" item="item" separator=",">
(#{item.glassId}, #{item.flowCardId}, #{item.glassType}, #{item.width}, #{item.height}, #{item.thickness},
- #{item.filmsid},#{item.ishorizontal},
+ #{item.filmsId},#{item.ishorizontal},
#{item.temperingLayoutId}, #{item.temperingFeedSequence}, #{item.xCoordinate}, #{item.yCoordinate},
#{item.angle}, #{item.state}, #{item.slot}, #{item.engineerId}, 0)
</foreach>
diff --git a/hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/job/OpcCacheGlassTask.java b/hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/job/OpcCacheGlassTask.java
index fcbc261..2cb907c 100644
--- a/hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/job/OpcCacheGlassTask.java
+++ b/hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/job/OpcCacheGlassTask.java
@@ -492,7 +492,7 @@
.orderByDesc(EdgStorageDeviceTaskHistory::getCreateTime).last("limit 1"));
//濡傛灉浠诲姟绫诲瀷涓�1锛�3锛屽皢鍒囧壊瀹屾垚鐨勭幓鐠冭嚜鍔ㄦ姤宸�
if (Const.GLASS_CACHE_TYPE_IN_ALL.contains(taskHistory.getTaskType())) {
- damageService.autoSubmitReport(taskHistory.getGlassIdIn(), taskHistory.getDeviceId(),"鍒囧壊","杩涘崸鐞�",1);
+ damageService.autoSubmitReport(taskHistory.getGlassIdIn(), taskHistory.getDeviceId(), "鍒囧壊", "杩涘崸鐞�", 1);
}
updateCellRemainWidth(cell, device, taskHistory);
edgStorageDeviceTaskHistoryService.update(new LambdaUpdateWrapper<EdgStorageDeviceTaskHistory>()
@@ -535,26 +535,43 @@
.last("Limit 1");
GlassInfo swapGlassInfo = glassInfoService.getOne(queryWrapper);
if (swapGlassInfo != null && !glassInfo.getGlassId().equals(swapGlassInfo.getGlassId())) {
+ //寰呮浛鎹㈢殑鐜荤拑淇℃伅
+ Integer ishorizontal = glassInfo.getIshorizontal();
+ Integer temperingLayoutId = glassInfo.getTemperingLayoutId();
+ Integer temperingFeedSequence = glassInfo.getTemperingFeedSequence();
+ Integer xCoordinate = glassInfo.getXCoordinate();
+ Integer yCoordinate = glassInfo.getYCoordinate();
+ double angle = glassInfo.getAngle();
+ Integer ruleId = glassInfo.getRuleId();
+ //鏇挎崲鍚庣殑鐜荤拑淇℃伅
+ Integer swapIshorizontal = swapGlassInfo.getIshorizontal();
+ Integer swapTemperingLayoutId = swapGlassInfo.getTemperingLayoutId();
+ Integer swapTemperingFeedSequence = swapGlassInfo.getTemperingFeedSequence();
+ Integer swapXCoordinate = swapGlassInfo.getXCoordinate();
+ Integer swapYCoordinate = swapGlassInfo.getYCoordinate();
+ double swapAngle = swapGlassInfo.getAngle();
+ Integer swapRuleId = swapGlassInfo.getRuleId();
+ //鏇挎崲鐜荤拑淇℃伅
+ glassInfo.setIshorizontal(swapIshorizontal);
+ glassInfo.setTemperingLayoutId(swapTemperingLayoutId);
+ glassInfo.setTemperingFeedSequence(swapTemperingFeedSequence);
+ glassInfo.setXCoordinate(swapXCoordinate);
+ glassInfo.setYCoordinate(swapYCoordinate);
+ glassInfo.setAngle(swapAngle);
+ glassInfo.setRuleId(swapRuleId);
- int patternSequence = glassInfo.getPatternSequence();
- int xAxis = glassInfo.getXAxis();
- int yAxis = glassInfo.getYAxis();
- String swapGlassId = swapGlassInfo.getGlassId();
- int swapPatternSequence = swapGlassInfo.getPatternSequence();
- int swapXAxis = swapGlassInfo.getXAxis();
- int swapYAxis = swapGlassInfo.getYAxis();
- swapGlassInfo.setGlassId(glassId);
- swapGlassInfo.setPatternSequence(patternSequence);
- swapGlassInfo.setXAxis(xAxis);
- swapGlassInfo.setYAxis(yAxis);
- glassInfo.setGlassId(swapGlassId);
- glassInfo.setPatternSequence(swapPatternSequence);
- glassInfo.setXAxis(swapXAxis);
- glassInfo.setYAxis(swapYAxis);
+ swapGlassInfo.setIshorizontal(ishorizontal);
+ swapGlassInfo.setTemperingLayoutId(temperingLayoutId);
+ swapGlassInfo.setTemperingFeedSequence(temperingFeedSequence);
+ swapGlassInfo.setXCoordinate(xCoordinate);
+ swapGlassInfo.setYCoordinate(yCoordinate);
+ swapGlassInfo.setAngle(angle);
+ swapGlassInfo.setRuleId(ruleId);
+
log.info("灏嗙幓鐠儃}鍜岀幓鐠儃}锛屼俊鎭簰鎹�(鍘熺墖搴忓彿鍙婂潗鏍囬櫎澶�),杩涚幓鐠� {}", glassInfo, swapGlassInfo, swapGlassInfo);
glassInfoService.updateById(swapGlassInfo);
glassInfoService.updateById(glassInfo);
- return swapGlassId;
+ return swapGlassInfo.getGlassId();
}
return "";
}
diff --git a/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/bigstorage/service/impl/BigStorageCageDetailsServiceImpl.java b/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/bigstorage/service/impl/BigStorageCageDetailsServiceImpl.java
index ba05600..6b35e83 100644
--- a/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/bigstorage/service/impl/BigStorageCageDetailsServiceImpl.java
+++ b/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/bigstorage/service/impl/BigStorageCageDetailsServiceImpl.java
@@ -397,9 +397,9 @@
if (temperingGlassInfoList.size() == 0) {
List<TemperingGlassInfo> temperingGlassInfos = glassInfoService.selectJoinList(TemperingGlassInfo.class, JoinWrappers.lambda(GlassInfo.class)
- .selectAll(GlassInfo.class)
- .select("-1 as state")
- .selectAs(BigStorageCageDetails::getSlot, TemperingGlassInfo::getSlot)
+ .select("-1 as state,t.filmsid as films_id,t.glass_id,t.flow_card_id,t.glass_type,t.width,t.height" +
+ ",t.thickness,t.ishorizontal,t.tempering_layout_id,t.tempering_feed_sequence,t.x_coordinate,t.y_coordinate," +
+ "t.angle,t1.slot,t.engineer_id")
.innerJoin(BigStorageCageDetails.class, BigStorageCageDetails::getGlassId, GlassInfo::getGlassId)
.eq(GlassInfo::getTemperingLayoutId, temperingLayoutId)
.eq(GlassInfo::getEngineerId, engineerId)
@@ -446,7 +446,7 @@
return this.list(new LambdaQueryWrapper<BigStorageCageDetails>()
.eq(BigStorageCageDetails::getEngineerId, bigStorageQueryVO.getEngineerId())
.eq(BigStorageCageDetails::getTemperingLayoutId, bigStorageQueryVO.getTemperingLayoutId())
- .in(BigStorageCageDetails::getState, Const.GLASS_STATE_IN_ALL));
+ .in(BigStorageCageDetails::getState, Const.GLASS_STATE_IN_ALL).orderByAsc(BigStorageCageDetails::getTemperingFeedSequence));
}
@Override
@@ -469,9 +469,9 @@
if (temperingGlassInfoList.size() == 0) {
List<TemperingGlassInfo> temperingGlassInfos = glassInfoService.selectJoinList(TemperingGlassInfo.class, JoinWrappers.lambda(GlassInfo.class)
- .selectAll(GlassInfo.class)
- .select("-1 as state")
- .selectAs(BigStorageCageDetails::getSlot, TemperingGlassInfo::getSlot)
+ .select("-1 as state,t.filmsid as films_id,t.glass_id,t.flow_card_id,t.glass_type,t.width,t.height" +
+ ",t.thickness,t.ishorizontal,t.tempering_layout_id,t.tempering_feed_sequence,t.x_coordinate,t.y_coordinate," +
+ "t.angle,t1.slot,t.engineer_id")
.innerJoin(BigStorageCageDetails.class, BigStorageCageDetails::getGlassId, GlassInfo::getGlassId)
.eq(GlassInfo::getEngineerId, engineerId)
.ne(GlassInfo::getTemperingLayoutId, 0)
diff --git a/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/job/OPCPlcSlicecage.java b/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/job/OPCPlcSlicecage.java
index 3da57d1..091726e 100644
--- a/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/job/OPCPlcSlicecage.java
+++ b/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/job/OPCPlcSlicecage.java
@@ -172,7 +172,7 @@
//鏌ヨ浣跨敤鏁版嵁婧�1鏌ヨ鏁版嵁
queryDataSource1();
//鏌ヨ浣跨敤鏁版嵁婧�2鏌ヨ鏁版嵁
- queryDataSource2();
+// queryDataSource2();
ArrayList<WebSocketServer> sendwServer = WebSocketServer.sessionMap.get("slicecage");
if (sendwServer != null) {
diff --git a/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/job/OpcPlcStorageCageNewTask.java b/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/job/OpcPlcStorageCageNewTask.java
index 15db66a..699aae0 100644
--- a/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/job/OpcPlcStorageCageNewTask.java
+++ b/hangzhoumesParent/moduleService/CacheVerticalGlassModule/src/main/java/com/mes/job/OpcPlcStorageCageNewTask.java
@@ -318,9 +318,9 @@
for (TemperingLayoutDTO item : temperingLayoutDTOList) {
// if (item.getEngineerId().equals(redisUtil.getCacheObject("temperingengineerId"))) {
List<TemperingGlassInfo> temperingGlassInfos = glassInfoService.selectJoinList(TemperingGlassInfo.class, JoinWrappers.lambda(GlassInfo.class)
- .selectAll(GlassInfo.class)
- .select("-1 as state")
- .selectAs(BigStorageCageDetails::getSlot, TemperingGlassInfo::getSlot)
+ .select("-1 as state,t.filmsid as films_id,t.glass_id,t.flow_card_id,t.glass_type,t.width,t.height" +
+ ",t.thickness,t.ishorizontal,t.tempering_layout_id,t.tempering_feed_sequence,t.x_coordinate,t.y_coordinate," +
+ "t.angle,t1.slot,t.engineer_id")
.innerJoin(BigStorageCageDetails.class, BigStorageCageDetails::getGlassId, GlassInfo::getGlassId)
.eq(BigStorageCageDetails::getState, Const.GLASS_STATE_IN)
.eq(GlassInfo::getTemperingLayoutId, item.getTemperingLayoutId())
diff --git a/hangzhoumesParent/moduleService/TemperingGlassModule/src/main/java/com/mes/job/OpcNGTemperingTask.java b/hangzhoumesParent/moduleService/TemperingGlassModule/src/main/java/com/mes/job/OpcNGTemperingTask.java
index 826707b..e1b9d7e 100644
--- a/hangzhoumesParent/moduleService/TemperingGlassModule/src/main/java/com/mes/job/OpcNGTemperingTask.java
+++ b/hangzhoumesParent/moduleService/TemperingGlassModule/src/main/java/com/mes/job/OpcNGTemperingTask.java
@@ -17,7 +17,6 @@
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
-import java.util.Comparator;
import java.util.List;
import java.util.Optional;
@@ -108,7 +107,7 @@
}
List<TemperingGlassInfo> glassList = temperingAgoService.selectGlassInfoById(temperingid);
if (glassList != null && glassList.size() > 0) {
- int glasstype = GetGlassType(glassList.get(0).getFilmsid());//鑶滅郴
+ int glasstype = GetGlassType(glassList.get(0).getFilmsId());//鑶滅郴
int process = 0;//閽㈠寲绫诲瀷
int thiness = (int) glassList.get(0).getThickness();//鍘氬害
String engineerId = glassList.get(0).getEngineerId();
diff --git a/hangzhoumesParent/moduleService/TemperingGlassModule/src/main/java/com/mes/job/TemperingTask.java b/hangzhoumesParent/moduleService/TemperingGlassModule/src/main/java/com/mes/job/TemperingTask.java
index ea60901..d29e489 100644
--- a/hangzhoumesParent/moduleService/TemperingGlassModule/src/main/java/com/mes/job/TemperingTask.java
+++ b/hangzhoumesParent/moduleService/TemperingGlassModule/src/main/java/com/mes/job/TemperingTask.java
@@ -19,7 +19,6 @@
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
-import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import java.util.Comparator;
@@ -100,7 +99,7 @@
.sorted(Comparator.comparing(TemperingGlassInfo::getTemperingFeedSequence)).collect(Collectors.toList());
//鎸夌収鑶滅郴鑾峰彇鐜荤拑鏉愯川
SysDictData glassTypeSysDictData = sysDictDataService.getOne(new QueryWrapper<SysDictData>()
- .eq(StringUtils.isNotBlank(temperingGlassList.get(0).getFilmsid()), "dict_label", temperingGlassList.get(0).getFilmsid()));
+ .eq(StringUtils.isNotBlank(temperingGlassList.get(0).getFilmsId()), "dict_label", temperingGlassList.get(0).getFilmsId()));
double sumArea = temperingGlassList.stream().mapToDouble(e -> e.getWidth() * e.getHeight()).sum();
double maxArea = temperingGlassList.stream().mapToDouble(e -> e.getWidth() * e.getHeight()).max().orElse(0.0);
diff --git a/hangzhoumesParent/moduleService/howllowGlassModule/src/main/java/com/mes/hollow/controller/HollowGlassOutRelationInfoController.java b/hangzhoumesParent/moduleService/howllowGlassModule/src/main/java/com/mes/hollow/controller/HollowGlassOutRelationInfoController.java
index e935cc4..6674652 100644
--- a/hangzhoumesParent/moduleService/howllowGlassModule/src/main/java/com/mes/hollow/controller/HollowGlassOutRelationInfoController.java
+++ b/hangzhoumesParent/moduleService/howllowGlassModule/src/main/java/com/mes/hollow/controller/HollowGlassOutRelationInfoController.java
@@ -2,7 +2,9 @@
import com.mes.hollow.entity.HollowGlassOutRelationInfo;
+import com.mes.hollow.entity.request.HollowTaskRequest;
import com.mes.hollow.service.HollowGlassOutRelationInfoService;
+import com.mes.hollowqueue.entity.HollowGlassQueueInfo;
import com.mes.utils.Result;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
@@ -10,6 +12,7 @@
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
+import java.util.List;
/**
* (HollowGlassOutRelationInfo)琛ㄦ帶鍒跺眰
@@ -26,20 +29,19 @@
@ApiOperation("棰嗗彇浠诲姟")
@PostMapping("/receiveTask")
- public Result<HollowGlassOutRelationInfo> receiveTask(String flowCardId, int cell, int totalPairQuantity) {
- HollowGlassOutRelationInfo hollowGlassOutRelationInfo = hollowGlassOutRelationInfoService.receiveTask(flowCardId, cell, totalPairQuantity);
+ public Result<HollowGlassOutRelationInfo> receiveTask(HollowTaskRequest request) {
+ HollowGlassOutRelationInfo hollowGlassOutRelationInfo = hollowGlassOutRelationInfoService.receiveTask(request);
if (null == hollowGlassOutRelationInfo) {
return Result.error(500, "鏈夋鍦ㄦ墽琛岀殑浠诲姟锛岃鍏堢‘淇濅换鍔″畬鎴愬悗锛屽啀娆¢鍙栦换鍔�");
} else {
return Result.success(hollowGlassOutRelationInfo);
}
-
}
@ApiOperation("寮哄埗鍑虹墖")
@PostMapping("/forceOutGlass")
- public Result<HollowGlassOutRelationInfo> forceOutGlass(String flowCardId, int cell, int totalPairQuantity) {
- HollowGlassOutRelationInfo hollowGlassOutRelationInfo = hollowGlassOutRelationInfoService.forceOutGlass(flowCardId, cell, totalPairQuantity);
+ public Result<HollowGlassOutRelationInfo> forceOutGlass(HollowTaskRequest request) {
+ HollowGlassOutRelationInfo hollowGlassOutRelationInfo = hollowGlassOutRelationInfoService.forceOutGlass(request);
if (null == hollowGlassOutRelationInfo) {
return Result.error(500, "鏈夋鍦ㄦ墽琛岀殑浠诲姟锛岃鍏堢‘淇濅换鍔″畬鎴愬悗锛屽啀娆″己鍒舵墽琛屼换鍔�");
} else {
@@ -47,6 +49,42 @@
}
}
+ @ApiOperation("娴佺▼鍗′换鍔″垪琛�")
+ @PostMapping("/hollowTaskList")
+ public Result<List<String>> hollowTaskList(int cell) {
+ return Result.build(200, "娴佺▼鍗′换鍔″垪琛ㄦ煡璇㈡垚鍔�", hollowGlassOutRelationInfoService.hollowTaskList(cell));
+ }
+
+ @ApiOperation("棰勮鎸囧畾浠诲姟淇℃伅")
+ @PostMapping("/appointHollowTaskDetails")
+ public Result<List<HollowGlassQueueInfo>> appointHollowTaskDetails(String flowCardId, int cell) {
+ return Result.build(200, "棰勮鎸囧畾浠诲姟淇℃伅鎴愬姛", hollowGlassOutRelationInfoService.appointHollowTaskDetails(flowCardId, cell));
+ }
+
+ @ApiOperation("鍒犻櫎鎸囧畾浠诲姟淇℃伅")
+ @PostMapping("/deleteHollowTaskDetails")
+ public Result<Boolean> deleteHollowTaskDetails(String flowCardId, int cell) {
+ return Result.build(200, "棰勮鎸囧畾浠诲姟淇℃伅鎴愬姛", hollowGlassOutRelationInfoService.deleteHollowTaskDetails(flowCardId, cell));
+ }
+
+ @ApiOperation("寮�濮嬩换鍔�")
+ @PostMapping("/startTask")
+ public Result<Boolean> startTask(String flowCardId, int cell) {
+ return Result.build(200, "寮�濮嬩换鍔℃垚鍔�", hollowGlassOutRelationInfoService.startTask(flowCardId, cell));
+ }
+
+ @ApiOperation("鏆傚仠浠诲姟")
+ @PostMapping("/pauseTask")
+ public Result<Boolean> pauseTask(String flowCardId, int cell) {
+ return Result.build(200, "鏆傚仠浠诲姟鎴愬姛", hollowGlassOutRelationInfoService.pauseTask(flowCardId, cell));
+ }
+
+ @ApiOperation("缁撴潫浠诲姟")
+ @PostMapping("/finishTask")
+ public Result<Boolean> finishTask(String flowCardId, int cell) {
+ return Result.build(200, "缁撴潫浠诲姟鎴愬姛", hollowGlassOutRelationInfoService.finishTask(flowCardId, cell));
+ }
+
@ApiOperation("鏄惁璋冨害寮�鍏�")
@PostMapping("/dispatchHollowSwitch")
public Result<Boolean> dispatchHollowSwitch(Boolean flag) {
diff --git a/hangzhoumesParent/moduleService/howllowGlassModule/src/main/java/com/mes/hollow/entity/HollowGlassOutRelationTaskDetails.java b/hangzhoumesParent/moduleService/howllowGlassModule/src/main/java/com/mes/hollow/entity/HollowGlassOutRelationTaskDetails.java
new file mode 100644
index 0000000..a182874
--- /dev/null
+++ b/hangzhoumesParent/moduleService/howllowGlassModule/src/main/java/com/mes/hollow/entity/HollowGlassOutRelationTaskDetails.java
@@ -0,0 +1,113 @@
+package com.mes.hollow.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import lombok.Data;
+
+import java.util.Date;
+
+/**
+ * (HollowGlassOutRelationTaskDetails)琛ㄥ疄浣撶被
+ *
+ * @author makejava
+ * @since 2024-12-26 22:57:45
+ */
+@Data
+public class HollowGlassOutRelationTaskDetails {
+
+ @TableId(value = "id", type = IdType.AUTO)
+ private Long id;
+
+ private Long relationId;
+ /**
+ * 娴佺▼鍗�
+ */
+ private String flowCardId;
+ /**
+ * 璺嚎锛�930锛堟潕璧涘厠锛岀晫闈㈤渶瑕佽緭鍏ョ浉鍏虫暟鎹級 931
+ */
+ private Integer cell;
+ /**
+ * 閰嶅鏁伴噺
+ */
+ private Integer totalPairQuantity;
+ /**
+ * 闄よ啘鏂瑰紡
+ */
+ private Integer filmRemove;
+ /**
+ * 涓婁晶闄よ啘閲�
+ */
+ private Integer topRemove;
+ /**
+ * 涓嬩晶闄よ啘閲�
+ */
+ private Integer bottomRemove;
+ /**
+ * 宸︿晶闄よ啘閲�
+ */
+ private Integer leftRemove;
+ /**
+ * 鍙充晶闄よ啘閲�
+ */
+ private Integer rightRemove;
+ /**
+ * 闂撮殧鏉�1浠g爜
+ */
+ private Integer frameOne;
+ /**
+ * 闂撮殧鏉�2浠g爜
+ */
+ private Integer frameTwo;
+ /**
+ * 闂撮殧鏉�3浠g爜
+ */
+ private Integer frameThree;
+ /**
+ * 闂撮殧鏉�4浠g爜
+ */
+ private Integer frameFour;
+ /**
+ * 瀵嗗皝宓屽叆(mm)
+ */
+ private Integer sealInsert;
+ /**
+ * 姘斾綋1(0鏃� 1鏈�)
+ */
+ private Integer casOne;
+ /**
+ * 姘斾綋2(0鏃� 1鏈�)
+ */
+ private Integer casTwo;
+ /**
+ * 姘斾綋3(0鏃� 1鏈�)
+ */
+ private Integer casThree;
+ /**
+ * 姘斾綋4(0鏃� 1鏈�)
+ */
+ private Integer casFour;
+ /**
+ * 闂撮殧妗嗙被鍨嬶紙tps鑳朵负05 閾濋棿闅旀潯01锛�
+ */
+ private Integer intervalFrameType;
+ /**
+ * 闂撮殧妗嗗搴�(mm)
+ */
+ private Integer intervalFrameWidth;
+ /**
+ * 闂撮殧妗嗛珮搴�(mm)
+ */
+ private Integer intervalFrameHeight;
+ /**
+ * 鍒涘缓鏃堕棿
+ */
+ private Date createTime;
+ /**
+ * 鏇存柊鏃堕棿
+ */
+ private Date updateTime;
+
+
+}
+
diff --git a/hangzhoumesParent/moduleService/howllowGlassModule/src/main/java/com/mes/hollow/entity/request/HollowTaskRequest.java b/hangzhoumesParent/moduleService/howllowGlassModule/src/main/java/com/mes/hollow/entity/request/HollowTaskRequest.java
new file mode 100644
index 0000000..8aea28c
--- /dev/null
+++ b/hangzhoumesParent/moduleService/howllowGlassModule/src/main/java/com/mes/hollow/entity/request/HollowTaskRequest.java
@@ -0,0 +1,64 @@
+package com.mes.hollow.entity.request;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+/**
+ * @Author : zhoush
+ * @Date: 2024/12/26 20:40
+ * @Description:
+ */
+@ApiModel(description = "涓┖浠诲姟淇℃伅琛�")
+@Data
+public class HollowTaskRequest {
+
+ @ApiModelProperty(value = "娴佺▼鍗�")
+ private String flowCardId;
+ @ApiModelProperty(value = "璺嚎锛�930锛堟潕璧涘厠锛岀晫闈㈤渶瑕佽緭鍏ョ浉鍏虫暟鎹級 931")
+ private int cell;
+ @ApiModelProperty(value = "閰嶅鏁伴噺 930 931")
+ private int totalPairQuantity;
+ @ApiModelProperty(value = "闄よ啘鏂瑰紡 930 931")
+ private Integer filmRemove;
+ @ApiModelProperty(value = "涓婁晶闄よ啘閲� 930 931")
+ private Integer topRemove;
+ @ApiModelProperty(value = "涓嬩晶闄よ啘閲� 930 931")
+ private Integer bottomRemove;
+ @ApiModelProperty(value = "宸︿晶闄よ啘閲� 930 931")
+ private Integer leftRemove;
+ @ApiModelProperty(value = "鍙充晶闄よ啘閲� 930 931")
+ private Integer rightRemove;
+
+ /**
+ * 鍒嗗壊绾�
+ */
+ @ApiModelProperty(value = "闂撮殧鏉�1浠g爜 930涓撶敤")
+ private Integer frameOne;
+ @ApiModelProperty(value = "闂撮殧鏉�2浠g爜 930涓撶敤")
+ private Integer frameTwo;
+ @ApiModelProperty(value = "闂撮殧鏉�3浠g爜 930涓撶敤")
+ private Integer frameThree;
+ @ApiModelProperty(value = "闂撮殧鏉�4浠g爜 930涓撶敤")
+ private Integer frameFour;
+ @ApiModelProperty(value = "瀵嗗皝宓屽叆 930涓撶敤")
+ private Integer sealInsert;
+ @ApiModelProperty(value = "姘斾綋1(0鏃� 1鏈�) 930涓撶敤")
+ private Integer casOne;
+ @ApiModelProperty(value = "姘斾綋2(0鏃� 1鏈�) 930涓撶敤")
+ private Integer casTwo;
+ @ApiModelProperty(value = "姘斾綋3(0鏃� 1鏈�) 930涓撶敤")
+ private Integer casThree;
+ @ApiModelProperty(value = "姘斾綋4(0鏃� 1鏈�) 930涓撶敤")
+ private Integer casFour;
+ @ApiModelProperty(value = "闂撮殧妗嗙被鍨嬶紙tps鑳朵负05 閾濋棿闅旀潯01锛� 930涓撶敤")
+ private Integer intervalFrameType;
+ @ApiModelProperty(value = "闂撮殧妗嗗搴� 930涓撶敤")
+ private Integer intervalFrameWidth;
+ @ApiModelProperty(value = "闂撮殧妗嗛珮搴� 930涓撶敤")
+ private Integer intervalFrameHeight;
+
+
+}
+
+
diff --git a/hangzhoumesParent/moduleService/howllowGlassModule/src/main/java/com/mes/hollow/mapper/HollowGlassOutRelationTaskDetailsMapper.java b/hangzhoumesParent/moduleService/howllowGlassModule/src/main/java/com/mes/hollow/mapper/HollowGlassOutRelationTaskDetailsMapper.java
new file mode 100644
index 0000000..38a658c
--- /dev/null
+++ b/hangzhoumesParent/moduleService/howllowGlassModule/src/main/java/com/mes/hollow/mapper/HollowGlassOutRelationTaskDetailsMapper.java
@@ -0,0 +1,15 @@
+package com.mes.hollow.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.mes.hollow.entity.HollowGlassOutRelationTaskDetails;
+
+/**
+ * (HollowGlassOutRelationTaskDetails)琛ㄦ暟鎹簱璁块棶灞�
+ *
+ * @author makejava
+ * @since 2024-12-26 22:48:36
+ */
+public interface HollowGlassOutRelationTaskDetailsMapper extends BaseMapper<HollowGlassOutRelationTaskDetails> {
+
+}
+
diff --git a/hangzhoumesParent/moduleService/howllowGlassModule/src/main/java/com/mes/hollow/service/HollowGlassOutRelationInfoService.java b/hangzhoumesParent/moduleService/howllowGlassModule/src/main/java/com/mes/hollow/service/HollowGlassOutRelationInfoService.java
index 8858806..6cd97b3 100644
--- a/hangzhoumesParent/moduleService/howllowGlassModule/src/main/java/com/mes/hollow/service/HollowGlassOutRelationInfoService.java
+++ b/hangzhoumesParent/moduleService/howllowGlassModule/src/main/java/com/mes/hollow/service/HollowGlassOutRelationInfoService.java
@@ -2,6 +2,10 @@
import com.baomidou.mybatisplus.extension.service.IService;
import com.mes.hollow.entity.HollowGlassOutRelationInfo;
+import com.mes.hollow.entity.request.HollowTaskRequest;
+import com.mes.hollowqueue.entity.HollowGlassQueueInfo;
+
+import java.util.List;
/**
* (HollowGlassOutRelationInfo)琛ㄦ湇鍔℃帴鍙�
@@ -11,10 +15,22 @@
*/
public interface HollowGlassOutRelationInfoService extends IService<HollowGlassOutRelationInfo> {
- HollowGlassOutRelationInfo receiveTask(String flowCardId, int cell, int totalPairQuantity);
+ HollowGlassOutRelationInfo receiveTask(HollowTaskRequest request);
- HollowGlassOutRelationInfo forceOutGlass(String flowCardId, int cell, int totalPairQuantity);
+ HollowGlassOutRelationInfo forceOutGlass(HollowTaskRequest request);
Boolean dispatchHollowSwitch(Boolean flag);
+
+ List<String> hollowTaskList(int cell);
+
+ List<HollowGlassQueueInfo> appointHollowTaskDetails(String flowCardId, int cell);
+
+ Boolean startTask(String flowCardId, int cell);
+
+ Boolean pauseTask(String flowCardId, int cell);
+
+ Boolean finishTask(String flowCardId, int cell);
+
+ Boolean deleteHollowTaskDetails(String flowCardId, int cell);
}
diff --git a/hangzhoumesParent/moduleService/howllowGlassModule/src/main/java/com/mes/hollow/service/HollowGlassOutRelationTaskDetailsService.java b/hangzhoumesParent/moduleService/howllowGlassModule/src/main/java/com/mes/hollow/service/HollowGlassOutRelationTaskDetailsService.java
new file mode 100644
index 0000000..0ca61f4
--- /dev/null
+++ b/hangzhoumesParent/moduleService/howllowGlassModule/src/main/java/com/mes/hollow/service/HollowGlassOutRelationTaskDetailsService.java
@@ -0,0 +1,15 @@
+package com.mes.hollow.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.mes.hollow.entity.HollowGlassOutRelationTaskDetails;
+
+/**
+ * (HollowGlassOutRelationTaskDetails)琛ㄦ湇鍔℃帴鍙�
+ *
+ * @author makejava
+ * @since 2024-12-26 22:48:38
+ */
+public interface HollowGlassOutRelationTaskDetailsService extends IService<HollowGlassOutRelationTaskDetails> {
+
+}
+
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 e110c40..f9f171e 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
@@ -2,15 +2,19 @@
import cn.hutool.core.collection.CollectionUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.mes.common.config.Const;
import com.mes.glassinfo.entity.GlassInfo;
import com.mes.glassinfo.service.GlassInfoService;
import com.mes.hollow.entity.HollowBigStorageCageDetails;
import com.mes.hollow.entity.HollowGlassOutRelationInfo;
+import com.mes.hollow.entity.HollowGlassOutRelationTaskDetails;
+import com.mes.hollow.entity.request.HollowTaskRequest;
import com.mes.hollow.mapper.HollowGlassOutRelationInfoMapper;
import com.mes.hollow.service.HollowBigStorageCageDetailsService;
import com.mes.hollow.service.HollowGlassOutRelationInfoService;
+import com.mes.hollow.service.HollowGlassOutRelationTaskDetailsService;
import com.mes.hollowqueue.entity.HollowGlassQueueInfo;
import com.mes.hollowqueue.service.HollowGlassQueueInfoService;
import com.mes.utils.RedisUtil;
@@ -40,66 +44,152 @@
HollowBigStorageCageDetailsService hollowBigStorageCageDetailsService;
@Resource
HollowGlassQueueInfoService hollowGlassQueueInfoService;
+ @Resource
+ HollowGlassOutRelationTaskDetailsService hollowGlassOutRelationTaskDetailsService;
@Resource
RedisUtil redisUtil;
@Override
- public HollowGlassOutRelationInfo receiveTask(String flowCardId, int cell, int totalPairQuantity) {
- return childrenTask(flowCardId,cell,totalPairQuantity,0);
+ public HollowGlassOutRelationInfo receiveTask(HollowTaskRequest request) {
+ return childrenTask(request, 0);
}
@Override
- public HollowGlassOutRelationInfo forceOutGlass(String flowCardId, int cell, int totalPairQuantity) {
- return childrenTask(flowCardId,cell,totalPairQuantity,1);
+ public HollowGlassOutRelationInfo forceOutGlass(HollowTaskRequest request) {
+ return childrenTask(request, 1);
}
@Override
public Boolean dispatchHollowSwitch(Boolean flag) {
redisUtil.setCacheObject("dispatchHollowSwitch", flag);
- return redisUtil.getCacheObject("dispatchHollowSwitch");
+ return redisUtil.getCacheObject("dispatchHollowSwitch");
+ }
+
+ @Override
+ public List<String> hollowTaskList(int cell) {
+ //鏌ヨ浠诲姟琛ㄤ腑鏈潯绾挎墍鏈夋湭瀹屾垚鐨勪换鍔′俊鎭�
+ List<HollowGlassOutRelationInfo> list = this.list(new LambdaQueryWrapper<HollowGlassOutRelationInfo>()
+ .in(HollowGlassOutRelationInfo::getState, Const.HOLLOW_FLOW_CARD_NEW, Const.HOLLOW_FLOW_CARD_START, Const.HOLLOW_FLOW_CARD_PAUSE)
+ .eq(HollowGlassOutRelationInfo::getCell, cell));
+ if (CollectionUtil.isNotEmpty(list)) {
+ return list.stream().map(HollowGlassOutRelationInfo::getFlowCardId).collect(Collectors.toList());
+ }
+ return new ArrayList<String>();
+ }
+
+ @Override
+ public List<HollowGlassQueueInfo> appointHollowTaskDetails(String flowCardId, int cell) {
+ //鎸夌収娴佺▼鍗″強璺嚎锛屾煡鎵惧搴旂殑浠诲姟淇℃伅
+ HollowGlassOutRelationInfo hollowGlassOutRelationInfo = this.getOne(new LambdaQueryWrapper<HollowGlassOutRelationInfo>()
+ .in(HollowGlassOutRelationInfo::getState, Const.HOLLOW_FLOW_CARD_NEW, Const.HOLLOW_FLOW_CARD_START, Const.HOLLOW_FLOW_CARD_PAUSE)
+ .eq(HollowGlassOutRelationInfo::getFlowCardId, flowCardId)
+ .eq(HollowGlassOutRelationInfo::getCell, cell).last("limit 1"));
+ if (null == hollowGlassOutRelationInfo) {
+ return new ArrayList<HollowGlassQueueInfo>();
+ }
+ //鎸夌収浠诲姟id鏌ヨ瀵瑰垪琛ㄤ腑鐨勯槦鍒椾俊鎭�
+ return hollowGlassQueueInfoService.list(new LambdaQueryWrapper<HollowGlassQueueInfo>()
+ .eq(HollowGlassQueueInfo::getRelationId, hollowGlassOutRelationInfo.getId()));
+ }
+
+ @Override
+ public Boolean startTask(String flowCardId, int cell) {
+ //鏇存柊浠诲姟鐘舵�佷负寮�濮�
+ return this.update(new LambdaUpdateWrapper<HollowGlassOutRelationInfo>()
+ .set(HollowGlassOutRelationInfo::getState, Const.HOLLOW_FLOW_CARD_START)
+ .eq(HollowGlassOutRelationInfo::getFlowCardId, flowCardId)
+ .eq(HollowGlassOutRelationInfo::getCell, cell));
+ }
+
+ @Override
+ public Boolean pauseTask(String flowCardId, int cell) {
+// 鏇存柊浠诲姟鐘舵�佷负鏆傚仠
+ return this.update(new LambdaUpdateWrapper<HollowGlassOutRelationInfo>()
+ .set(HollowGlassOutRelationInfo::getState, Const.HOLLOW_FLOW_CARD_PAUSE)
+ .eq(HollowGlassOutRelationInfo::getFlowCardId, flowCardId)
+ .eq(HollowGlassOutRelationInfo::getCell, cell));
+ }
+
+ @Override
+ public Boolean finishTask(String flowCardId, int cell) {
+ //娓呯┖闃熷垪琛ㄤ腑鏈畬鎴愮殑鐜荤拑淇℃伅
+ hollowGlassQueueInfoService.remove(new LambdaQueryWrapper<HollowGlassQueueInfo>()
+ .in(HollowGlassQueueInfo::getState, Const.TEMPERING_NEW)
+ .eq(HollowGlassQueueInfo::getFlowCardId, flowCardId)
+ .eq(HollowGlassQueueInfo::getCell, cell));
+ //鏇存柊浠诲姟鐘舵�佹湭宸插畬鎴�
+ return this.update(new LambdaUpdateWrapper<HollowGlassOutRelationInfo>()
+ .set(HollowGlassOutRelationInfo::getState, Const.HOLLOW_FLOW_CARD_SUCCESS)
+ .eq(HollowGlassOutRelationInfo::getFlowCardId, flowCardId)
+ .eq(HollowGlassOutRelationInfo::getCell, cell));
+ }
+
+ @Override
+ public Boolean deleteHollowTaskDetails(String flowCardId, int cell) {
+ //鎸夌収娴佺▼鍗″強璺嚎锛屾煡鎵惧搴旂殑浠诲姟淇℃伅
+ this.remove(new LambdaQueryWrapper<HollowGlassOutRelationInfo>()
+ .in(HollowGlassOutRelationInfo::getState, Const.HOLLOW_FLOW_CARD_NEW, Const.HOLLOW_FLOW_CARD_START, Const.HOLLOW_FLOW_CARD_PAUSE)
+ .eq(HollowGlassOutRelationInfo::getFlowCardId, flowCardId)
+ .eq(HollowGlassOutRelationInfo::getCell, cell));
+ hollowGlassQueueInfoService.remove(new LambdaQueryWrapper<HollowGlassQueueInfo>()
+ .in(HollowGlassQueueInfo::getState, Const.TEMPERING_NEW)
+ .eq(HollowGlassQueueInfo::getFlowCardId, flowCardId)
+ .eq(HollowGlassQueueInfo::getCell, cell));
+ return Boolean.TRUE;
}
- 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"));
+ 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::getCell, cell)
- .in(HollowGlassOutRelationInfo::getState, Const.HOLLOW_FLOW_CARD_START));
- if (CollectionUtil.isNotEmpty(outRelationInfos)){
+ List<HollowGlassOutRelationInfo> outRelationInfos = this.list(new LambdaQueryWrapper<HollowGlassOutRelationInfo>()
+ .eq(HollowGlassOutRelationInfo::getCell, request.getCell())
+ .eq(HollowGlassOutRelationInfo::getState, Const.HOLLOW_FLOW_CARD_START));
+ if (CollectionUtil.isNotEmpty(outRelationInfos)) {
+ log.info("鏈夋鍦ㄦ墽琛岀殑浠诲姟");
return null;
}
- info.setFlowCardId(flowCardId);
- info.setCell(cell);
+ //淇濆瓨浠诲姟鍏崇郴涓昏〃
+ info.setFlowCardId(request.getFlowCardId());
+ info.setCell(request.getCell());
info.setIsForce(isForce);
info.setTotalLayer(glassInfo.getTotalLayer());
- info.setState(Const.HOLLOW_FLOW_CARD_START);
- info.setTotalPairQuantity(totalPairQuantity);
- List<HollowBigStorageCageDetails> hollowBigStorageCageDetailsList = hollowBigStorageCageDetailsService.queryOutGlassList(flowCardId, cell);
- int isPairCount = glassInfo.getTotalLayer() * totalPairQuantity;
+ info.setState(Const.HOLLOW_FLOW_CARD_NEW);
+ info.setTotalPairQuantity(request.getTotalPairQuantity());
+ this.save(info);
+ //淇濆瓨浠诲姟璇︽儏琛�
+ HollowGlassOutRelationTaskDetails taskDetails = new HollowGlassOutRelationTaskDetails();
+ BeanUtils.copyProperties(request, taskDetails);
+ taskDetails.setRelationId(info.getId());
+ hollowGlassOutRelationTaskDetailsService.save(taskDetails);
+ // 鏌ヨ鍑洪渶瑕佸嚭鐜荤拑鐨勯槦鍒�
+ List<HollowBigStorageCageDetails> hollowBigStorageCageDetailsList = hollowBigStorageCageDetailsService
+ .queryOutGlassList(request.getFlowCardId(), request.getCell());
+ int isPairCount = glassInfo.getTotalLayer() * request.getTotalPairQuantity();
List<HollowGlassQueueInfo> hollowQueues = new ArrayList<>();
loop:
for (HollowBigStorageCageDetails queue : hollowBigStorageCageDetailsList) {
HollowGlassQueueInfo queueInfo = new HollowGlassQueueInfo();
BeanUtils.copyProperties(queue, queueInfo);
+ queueInfo.setRelationId(info.getId());
queueInfo.setState(Const.TEMPERING_NEW);
- queueInfo.setCell(cell);
+ queueInfo.setCell(request.getCell());
queueInfo.setCreateTime(new Date());
queueInfo.setUpdateTime(new Date());
hollowQueues.add(queueInfo);
- if (queue.getIsPair() == 1){
- isPairCount -=1;
- if (isPairCount == 0){
+ if (queue.getIsPair() == 1) {
+ isPairCount -= 1;
+ if (isPairCount == 0) {
break loop;
}
}
}
hollowGlassQueueInfoService.saveBatch(hollowQueues);
- this.save(info);
return info;
}
}
diff --git a/hangzhoumesParent/moduleService/howllowGlassModule/src/main/java/com/mes/hollow/service/impl/HollowGlassOutRelationTaskDetailsServiceImpl.java b/hangzhoumesParent/moduleService/howllowGlassModule/src/main/java/com/mes/hollow/service/impl/HollowGlassOutRelationTaskDetailsServiceImpl.java
new file mode 100644
index 0000000..fdcc125
--- /dev/null
+++ b/hangzhoumesParent/moduleService/howllowGlassModule/src/main/java/com/mes/hollow/service/impl/HollowGlassOutRelationTaskDetailsServiceImpl.java
@@ -0,0 +1,19 @@
+package com.mes.hollow.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.mes.hollow.entity.HollowGlassOutRelationTaskDetails;
+import com.mes.hollow.mapper.HollowGlassOutRelationTaskDetailsMapper;
+import com.mes.hollow.service.HollowGlassOutRelationTaskDetailsService;
+import org.springframework.stereotype.Service;
+
+/**
+ * (HollowGlassOutRelationTaskDetails)琛ㄦ湇鍔″疄鐜扮被
+ *
+ * @author makejava
+ * @since 2024-12-26 22:48:38
+ */
+@Service
+public class HollowGlassOutRelationTaskDetailsServiceImpl extends ServiceImpl<HollowGlassOutRelationTaskDetailsMapper, HollowGlassOutRelationTaskDetails> implements HollowGlassOutRelationTaskDetailsService {
+
+}
+
diff --git a/hangzhoumesParent/moduleService/howllowGlassModule/src/main/java/com/mes/hollowqueue/entity/HollowGlassQueueInfo.java b/hangzhoumesParent/moduleService/howllowGlassModule/src/main/java/com/mes/hollowqueue/entity/HollowGlassQueueInfo.java
index a230379..807c4e0 100644
--- a/hangzhoumesParent/moduleService/howllowGlassModule/src/main/java/com/mes/hollowqueue/entity/HollowGlassQueueInfo.java
+++ b/hangzhoumesParent/moduleService/howllowGlassModule/src/main/java/com/mes/hollowqueue/entity/HollowGlassQueueInfo.java
@@ -20,6 +20,11 @@
*/
@TableId(value = "id", type = IdType.AUTO)
private Long id;
+
+ /**
+ * /*澶х悊鐗囩璇︽儏琛╥d
+ */
+ private Long relationId;
/**
* /*璁惧id
*/
--
Gitblit v1.8.0