From ef2f5051979a188b0922e3c30908bedca1cc7c74 Mon Sep 17 00:00:00 2001 From: wuyouming666 <2265557248@qq.com> Date: 星期二, 18 六月 2024 13:59:58 +0800 Subject: [PATCH] 绑定架子流程卡号选择显示,和出片优化 --- hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/downglassinfo/service/impl/DownGlassInfoServiceImpl.java | 31 +++++++++++++++++++++++-------- 1 files changed, 23 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 a141494..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,22 +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