package org.jeecg.modules.tms.service.impl; import cn.hutool.core.util.StrUtil; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import org.jeecg.modules.tms.entity.ParaMillTool; import org.jeecg.modules.tms.entity.dto.ToolQueryParamDto; import org.jeecg.modules.tms.entity.vo.ParaMillToolVo; import org.jeecg.modules.tms.mapper.ParaMillToolMapper; import org.jeecg.modules.tms.service.IParaMillToolService; import org.springframework.stereotype.Service; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import java.util.Collections; import java.util.List; /** * @Description: tms_para_mill_tool * @Author: jeecg-boot * @Date: 2025-05-12 * @Version: V1.0 */ @Service public class ParaMillToolServiceImpl extends ServiceImpl implements IParaMillToolService { @Override public List selectByClassifyAndDiameter(ToolQueryParamDto paramDto) { LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); if (paramDto != null) { //铣削刀具相关参数字段 queryWrapper .eq(StrUtil.isNotBlank(paramDto.getClassifyId()), ParaMillTool::getClassifyId, paramDto.getClassifyId()) .eq(StrUtil.isNotBlank(paramDto.getDiameter()), ParaMillTool::getDiameter, paramDto.getDiameter()) .eq(StrUtil.isNotBlank(paramDto.getTotalLength()), ParaMillTool::getTotalLength, paramDto.getTotalLength()) .eq(StrUtil.isNotBlank(paramDto.getToolMaterial()), ParaMillTool::getToolMaterial, paramDto.getToolMaterial()) .eq(StrUtil.isNotBlank(paramDto.getEdgeLength()), ParaMillTool::getEdgeLength, paramDto.getEdgeLength()) .eq(StrUtil.isNotBlank(paramDto.getNumberOfTeeth()), ParaMillTool::getNumberOfTeeth, paramDto.getNumberOfTeeth()) .eq(StrUtil.isNotBlank(paramDto.getNeckDiameter()), ParaMillTool::getNeckDiameter, paramDto.getNeckDiameter()) .eq(StrUtil.isNotBlank(paramDto.getSmallDiameter()), ParaMillTool::getSmallDiameter, paramDto.getSmallDiameter()) .eq(StrUtil.isNotBlank(paramDto.getHandleLength()), ParaMillTool::getHandleLength, paramDto.getHandleLength()) .eq(StrUtil.isNotBlank(paramDto.getDeepestDepth()), ParaMillTool::getDeepestDepth, paramDto.getDeepestDepth()) .eq(StrUtil.isNotBlank(paramDto.getHandleNeckLength()), ParaMillTool::getHandleNeckLength, paramDto.getHandleNeckLength()) .eq(StrUtil.isNotBlank(paramDto.getOverhangingLength()), ParaMillTool::getOverhangingLength, paramDto.getOverhangingLength()) .eq(StrUtil.isNotBlank(paramDto.getPitch()), ParaMillTool::getPitch, paramDto.getPitch()) .eq(StrUtil.isNotBlank(paramDto.getRecentlyDiameter()), ParaMillTool::getRecentlyDiameter, paramDto.getRecentlyDiameter()); } return this.baseMapper.selectByClassifyAndDiameter(queryWrapper); } }