| | |
| | | package org.jeecg.modules.tms.service.impl; |
| | | |
| | | import cn.hutool.core.util.StrUtil; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | 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 |
| | |
| | | @Service |
| | | public class ParaMillToolServiceImpl extends ServiceImpl<ParaMillToolMapper, ParaMillTool> implements IParaMillToolService { |
| | | |
| | | @Override |
| | | public List<ParaMillToolVo> selectByClassifyAndDiameter(ToolQueryParamDto paramDto) { |
| | | QueryWrapper<ParaMillTool> queryWrapper = Wrappers.query(); |
| | | if (paramDto != null) { |
| | | //铣削刀具相关参数字段 |
| | | queryWrapper |
| | | .like(StrUtil.isNotBlank(paramDto.getToolCode()), "t1.tool_code", paramDto.getToolCode()) |
| | | .like(StrUtil.isNotBlank(paramDto.getToolModel()), "t.tool_model", paramDto.getToolModel()) |
| | | .like(StrUtil.isNotBlank(paramDto.getChineseName()), "t.chinese_name", paramDto.getChineseName()) |
| | | .eq(StrUtil.isNotBlank(paramDto.getClassifyId()), "t.classify_id", paramDto.getClassifyId()) |
| | | .eq(StrUtil.isNotBlank(paramDto.getDiameter()), "t.diameter", paramDto.getDiameter()) |
| | | .eq(StrUtil.isNotBlank(paramDto.getTotalLength()), "t.total_length", paramDto.getTotalLength()) |
| | | .eq(StrUtil.isNotBlank(paramDto.getToolMaterial()), "t.tool_material", paramDto.getToolMaterial()) |
| | | .eq(StrUtil.isNotBlank(paramDto.getEdgeLength()), "t.edge_length", paramDto.getEdgeLength()) |
| | | .eq(StrUtil.isNotBlank(paramDto.getNumberOfTeeth()), "t.number_of_teeth", paramDto.getNumberOfTeeth()) |
| | | .eq(StrUtil.isNotBlank(paramDto.getNeckDiameter()), "t.neck_diameter", paramDto.getNeckDiameter()) |
| | | .eq(StrUtil.isNotBlank(paramDto.getSmallDiameter()), "t.small_diameter", paramDto.getSmallDiameter()) |
| | | .eq(StrUtil.isNotBlank(paramDto.getHandleLength()), "t.handle_length", paramDto.getHandleLength()) |
| | | .eq(StrUtil.isNotBlank(paramDto.getDeepestDepth()), "t.deepest_depth", paramDto.getDeepestDepth()) |
| | | .eq(StrUtil.isNotBlank(paramDto.getHandleNeckLength()), "t.handle_neck_length", paramDto.getHandleNeckLength()) |
| | | .eq(StrUtil.isNotBlank(paramDto.getOverhangingLength()), "t.overhanging_length", paramDto.getOverhangingLength()) |
| | | .eq(StrUtil.isNotBlank(paramDto.getPitch()), "t.pitch", paramDto.getPitch()) |
| | | .eq(StrUtil.isNotBlank(paramDto.getRecentlyDiameter()), "t.recently_diameter", paramDto.getRecentlyDiameter()); |
| | | } |
| | | return this.baseMapper.selectByClassifyAndDiameter(queryWrapper); |
| | | } |
| | | } |