From 8d5dddd1cc1a9ff3859d6acd251c3488ca066b21 Mon Sep 17 00:00:00 2001 From: wuyouming666 <2265557248@qq.com> Date: 星期一, 27 五月 2024 14:38:14 +0800 Subject: [PATCH] 修改路径 --- hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/glassinfo/service/impl/GlassInfoServiceImpl.java | 61 +++++++++++++++++------------- 1 files changed, 35 insertions(+), 26 deletions(-) diff --git a/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/glassinfo/service/impl/GlassInfoServiceImpl.java b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/glassinfo/service/impl/GlassInfoServiceImpl.java index e3f797b..12a1604 100644 --- a/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/glassinfo/service/impl/GlassInfoServiceImpl.java +++ b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/glassinfo/service/impl/GlassInfoServiceImpl.java @@ -1,12 +1,14 @@ -package com.mes.uppattenusage.service.impl; +package com.mes.glassinfo.service.impl; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.mes.downworkstation.entity.DownWorkstation; -import com.mes.uppattenusage.entity.GlassInfo; -import com.mes.uppattenusage.mapper.GlassInfoMapper; -import com.mes.uppattenusage.service.GlassInfoService; +import com.github.yulichang.toolkit.JoinWrappers; +import com.mes.engineering.entity.Engineering; +import com.mes.engineering.mapper.EngineeringMapper; +import com.mes.glassinfo.entity.GlassInfo; +import com.mes.glassinfo.mapper.GlassInfoMapper; +import com.mes.glassinfo.service.GlassInfoService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -15,7 +17,7 @@ /** * <p> - * 鏈嶅姟瀹炵幇绫� + * 鏈嶅姟瀹炵幇绫� * </p> * * @author zhoush @@ -24,40 +26,47 @@ @Service public class GlassInfoServiceImpl extends ServiceImpl<GlassInfoMapper, GlassInfo> implements GlassInfoService { + private EngineeringMapper engineeringMapper; private GlassInfoMapper glassInfoMapper; - @Autowired - public GlassInfoServiceImpl(GlassInfoMapper glassInfoMapper) { + @Autowired(required=false) + public GlassInfoServiceImpl(GlassInfoMapper glassInfoMapper, EngineeringMapper engineeringMapper) { this.glassInfoMapper = glassInfoMapper; + this.engineeringMapper = engineeringMapper; } @Override public int getGlassInfoCountByFlowCardId(String flowCardId) { - QueryWrapper<GlassInfo> queryWrapper = new QueryWrapper<>(); - queryWrapper.eq("flowcard_id", flowCardId); - - return baseMapper.selectCount(queryWrapper); + return baseMapper.selectCount(new QueryWrapper<GlassInfo>().lambda() + .eq(GlassInfo::getFlowCardId, flowCardId)); } + + + @Override public List<Map<String, Object>> getFlowCardId() { - return baseMapper.selectMaps(new QueryWrapper<GlassInfo>().select("DISTINCT flowcard_id")); + + return glassInfoMapper.selectJoinMaps(JoinWrappers.lambda(GlassInfo.class) + .select(GlassInfo::getFlowCardId) // 閫夋嫨闇�瑕佹煡璇㈢殑瀛楁 + .eq(GlassInfo::getEngineerId, Engineering::getEngineerId) // 璁剧疆鍏宠仈鏉′欢 + .eq(Engineering::getState, 0) + .distinct() + + ); } + + + + + + @Override public GlassInfo selectGlassId(String id) { - QueryWrapper<GlassInfo> queryWrapper = new QueryWrapper<>(); - queryWrapper.eq("id", id); - - return baseMapper.selectOne(queryWrapper); + return baseMapper.selectOne(new QueryWrapper<GlassInfo>().lambda() + .eq(GlassInfo::getGlassId, id)); } -// public void updateFlowCardIdAndCount(String flowCardId, int glassInfoCount, int workstationId) { -// int rowsAffected = glassInfoMapper.updateFlowCardIdAndCount(flowCardId, glassInfoCount, workstationId); -// if (rowsAffected > 0) { -// System.out.println("鏇存柊鏋跺瓙涓婃祦绋嬪崱 ID 鍜屾暟閲忔垚鍔�"); -// } else { -// System.out.println("鏇存柊鏋跺瓙涓婃祦绋嬪崱 ID 鍜屾暟閲忓け璐�"); -// } -// } + } -- Gitblit v1.8.0