package org.jeecg.modules.tms.service.impl;
|
|
import cn.hutool.core.util.StrUtil;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
import org.jeecg.modules.tms.entity.ParaThreadingTool;
|
import org.jeecg.modules.tms.entity.dto.ToolQueryParamDto;
|
import org.jeecg.modules.tms.entity.vo.ParaThreadingToolVo;
|
import org.jeecg.modules.tms.mapper.ParaThreadingToolMapper;
|
import org.jeecg.modules.tms.service.IParaThreadingToolService;
|
import org.springframework.stereotype.Service;
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
import java.util.Collections;
|
import java.util.List;
|
|
/**
|
* @Description: tms_para_threading_tool
|
* @Author: jeecg-boot
|
* @Date: 2025-05-12
|
* @Version: V1.0
|
*/
|
@Service
|
public class ParaThreadingToolServiceImpl extends ServiceImpl<ParaThreadingToolMapper, ParaThreadingTool> implements IParaThreadingToolService {
|
|
@Override
|
public List<ParaThreadingToolVo> selectByClassifyAndParam(ToolQueryParamDto paramDto) {
|
QueryWrapper<ParaThreadingTool> 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.getThreadCode()), "t.thread_code", paramDto.getThreadCode())
|
.eq(StrUtil.isNotBlank(paramDto.getPitch()), "t.pitch", paramDto.getPitch())
|
.eq(StrUtil.isNotBlank(paramDto.getRotationDirection()), "t.rotation_direction", paramDto.getRotationDirection())
|
.eq(StrUtil.isNotBlank(paramDto.getTolerancezoneLevel()), "t.tolerancezone_level", paramDto.getTolerancezoneLevel())
|
.eq(StrUtil.isNotBlank(paramDto.getExternalDimensions()), "t.external_dimensions", paramDto.getExternalDimensions())
|
.eq(StrUtil.isNotBlank(paramDto.getHandleSpecifications()), "t.handle_specifications", paramDto.getHandleSpecifications())
|
.eq(StrUtil.isNotBlank(paramDto.getScrewHoleType()), "t.screw_hole_type", paramDto.getScrewHoleType())
|
.eq(StrUtil.isNotBlank(paramDto.getThreadStandard()), "t.thread_standard", paramDto.getThreadStandard())
|
.eq(StrUtil.isNotBlank(paramDto.getFluteSoltType()), "t.flute_solt_type", paramDto.getFluteSoltType())
|
.eq(StrUtil.isNotBlank(paramDto.getThreadType()), "t.thread_type", paramDto.getThreadType())
|
.eq(StrUtil.isNotBlank(paramDto.getGuidingSize()), "t.guiding_size", paramDto.getGuidingSize())
|
.eq(StrUtil.isNotBlank(paramDto.getConnectionAperture()), "t.connection_aperture", paramDto.getConnectionAperture())
|
.eq(StrUtil.isNotBlank(paramDto.getConnectingKeyway()), "t.connecting_keyway", paramDto.getConnectingKeyway());
|
}
|
return this.baseMapper.selectByClassifyAndParam(queryWrapper);
|
}
|
}
|