From 1d9f9bd9afb6e18aa73b456555256564e34b2acc Mon Sep 17 00:00:00 2001
From: zhoushihao <zsh19950802@163.com>
Date: 星期二, 28 五月 2024 13:20:06 +0800
Subject: [PATCH] 卧式理片笼线程改造:1、优化任务查询,每次只获取第一条数据,避免任务表数据过多 2、玻璃尺寸限制改为配置
---
hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downglassinfo/service/impl/DownGlassInfoServiceImpl.java | 33 +++++++++++++++++++++++++--------
1 files changed, 25 insertions(+), 8 deletions(-)
diff --git a/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downglassinfo/service/impl/DownGlassInfoServiceImpl.java b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downglassinfo/service/impl/DownGlassInfoServiceImpl.java
index 9e972ba..e5bf336 100644
--- a/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downglassinfo/service/impl/DownGlassInfoServiceImpl.java
+++ b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downglassinfo/service/impl/DownGlassInfoServiceImpl.java
@@ -1,20 +1,37 @@
package com.mes.downglassinfo.service.impl;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.mes.downglassinfo.entity.DownGlassInfo;
import com.mes.downglassinfo.mapper.DownGlassInfoMapper;
import com.mes.downglassinfo.service.DownGlassInfoService;
import org.springframework.stereotype.Service;
-/**
- * <p>
- * 鏈嶅姟瀹炵幇绫�
- * </p>
- *
- * @author zhoush
- * @since 2024-03-27
- */
@Service
public class DownGlassInfoServiceImpl extends ServiceImpl<DownGlassInfoMapper, DownGlassInfo> implements DownGlassInfoService {
+ // 鏍规嵁娴佺▼鍗″彿鏌ヨ鏈�澶у簭鍙�
+ @Override
+ public Integer getMaxSequenceByFlowCardId(String flowCardId) {
+ LambdaQueryWrapper<DownGlassInfo> lambdaQueryWrapper = Wrappers.lambdaQuery();
+ lambdaQueryWrapper.eq(DownGlassInfo::getFlowCardId, flowCardId)
+ .select(DownGlassInfo::getSequence)
+ .orderByDesc(DownGlassInfo::getSequence)
+ .last("LIMIT 1");
+
+ DownGlassInfo downGlassInfo = baseMapper.selectOne(lambdaQueryWrapper);
+ return downGlassInfo != null ? downGlassInfo.getSequence() : 0;
+ }
+
+
+ @Override
+ public void insertDownGlassInfo(DownGlassInfo downGlassInfo) {
+
+
+
+ baseMapper.insert(downGlassInfo);
+ }
+
+
}
--
Gitblit v1.8.0