|
|
@ -1,13 +1,9 @@
|
|
|
|
package org.dromara.dms.service.impl;
|
|
|
|
package org.dromara.dms.service.impl;
|
|
|
|
|
|
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
|
|
|
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
|
import com.github.yulichang.toolkit.JoinWrappers;
|
|
|
|
import com.github.yulichang.toolkit.JoinWrappers;
|
|
|
|
import com.github.yulichang.wrapper.MPJLambdaWrapper;
|
|
|
|
import com.github.yulichang.wrapper.MPJLambdaWrapper;
|
|
|
|
import lombok.RequiredArgsConstructor;
|
|
|
|
import lombok.RequiredArgsConstructor;
|
|
|
|
import org.dromara.common.core.exception.ServiceException;
|
|
|
|
|
|
|
|
import org.dromara.common.core.utils.MapstructUtils;
|
|
|
|
|
|
|
|
import org.dromara.common.core.utils.StringUtils;
|
|
|
|
import org.dromara.common.core.utils.StringUtils;
|
|
|
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
|
|
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
|
|
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
|
|
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
|
|
@ -15,16 +11,14 @@ import org.dromara.dms.domain.DmsBaseMachineInfo;
|
|
|
|
import org.dromara.dms.domain.bo.DmsBaseMachineInfoBo;
|
|
|
|
import org.dromara.dms.domain.bo.DmsBaseMachineInfoBo;
|
|
|
|
import org.dromara.dms.domain.vo.DmsBaseMachineInfoVo;
|
|
|
|
import org.dromara.dms.domain.vo.DmsBaseMachineInfoVo;
|
|
|
|
import org.dromara.dms.mapper.DmsBaseMachineInfoMapper;
|
|
|
|
import org.dromara.dms.mapper.DmsBaseMachineInfoMapper;
|
|
|
|
|
|
|
|
|
|
|
|
import org.dromara.dms.service.IDmsBaseMachineInfoService;
|
|
|
|
import org.dromara.dms.service.IDmsBaseMachineInfoService;
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
|
|
|
|
|
|
import java.util.Collection;
|
|
|
|
|
|
|
|
import java.util.List;
|
|
|
|
import java.util.List;
|
|
|
|
import java.util.Map;
|
|
|
|
import java.util.Map;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 机台信息Service业务层处理
|
|
|
|
* 设备信息Service业务层处理
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* @author zangch
|
|
|
|
* @author zangch
|
|
|
|
* @date 2025-01-20
|
|
|
|
* @date 2025-01-20
|
|
|
@ -37,10 +31,10 @@ public class DmsBaseMachineInfoServiceImpl implements IDmsBaseMachineInfoService
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 查询机台信息
|
|
|
|
* 查询设备信息
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* @param machineId 主键
|
|
|
|
* @param machineId 主键
|
|
|
|
* @return 机台信息
|
|
|
|
* @return 设备信息
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public DmsBaseMachineInfoVo queryById(Long machineId) {
|
|
|
|
public DmsBaseMachineInfoVo queryById(Long machineId) {
|
|
|
@ -48,16 +42,22 @@ public class DmsBaseMachineInfoServiceImpl implements IDmsBaseMachineInfoService
|
|
|
|
bo.setMachineId(machineId);
|
|
|
|
bo.setMachineId(machineId);
|
|
|
|
MPJLambdaWrapper<DmsBaseMachineInfo> lqw = buildQueryWrapper(bo);
|
|
|
|
MPJLambdaWrapper<DmsBaseMachineInfo> lqw = buildQueryWrapper(bo);
|
|
|
|
DmsBaseMachineInfoVo prodBaseMachineInfoVo = baseMapper.selectVoOne(lqw);
|
|
|
|
DmsBaseMachineInfoVo prodBaseMachineInfoVo = baseMapper.selectVoOne(lqw);
|
|
|
|
|
|
|
|
//机台关联工序
|
|
|
|
|
|
|
|
/* MPJLambdaWrapper<ProdBaseMachineProcess> lqwRelation = JoinWrappers.lambda(ProdBaseMachineProcess.class)
|
|
|
|
|
|
|
|
.selectAll(ProdBaseMachineProcess.class)
|
|
|
|
|
|
|
|
.eq(bo.getMachineId() != null, ProdBaseMachineProcess::getMachineId, bo.getMachineId())
|
|
|
|
|
|
|
|
.orderByAsc(ProdBaseMachineProcess::getCreateTime);
|
|
|
|
|
|
|
|
List<ProdBaseMachineProcess> prodBaseMachineProcesses = prodBaseMachineProcessMapper.selectList(lqwRelation);
|
|
|
|
|
|
|
|
prodBaseMachineInfoVo.setBaseMachineProcessList(prodBaseMachineProcesses);*/
|
|
|
|
return prodBaseMachineInfoVo;
|
|
|
|
return prodBaseMachineInfoVo;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 分页查询机台信息列表
|
|
|
|
* 分页查询设备信息列表
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* @param bo 查询条件
|
|
|
|
* @param bo 查询条件
|
|
|
|
* @param pageQuery 分页参数
|
|
|
|
* @param pageQuery 分页参数
|
|
|
|
* @return 机台信息分页列表
|
|
|
|
* @return 设备信息分页列表
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public TableDataInfo<DmsBaseMachineInfoVo> queryPageList(DmsBaseMachineInfoBo bo, PageQuery pageQuery) {
|
|
|
|
public TableDataInfo<DmsBaseMachineInfoVo> queryPageList(DmsBaseMachineInfoBo bo, PageQuery pageQuery) {
|
|
|
@ -67,10 +67,10 @@ public class DmsBaseMachineInfoServiceImpl implements IDmsBaseMachineInfoService
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 查询符合条件的机台信息列表
|
|
|
|
* 查询符合条件的设备信息列表
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* @param bo 查询条件
|
|
|
|
* @param bo 查询条件
|
|
|
|
* @return 机台信息列表
|
|
|
|
* @return 设备信息列表
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public List<DmsBaseMachineInfoVo> queryList(DmsBaseMachineInfoBo bo) {
|
|
|
|
public List<DmsBaseMachineInfoVo> queryList(DmsBaseMachineInfoBo bo) {
|
|
|
@ -83,6 +83,10 @@ public class DmsBaseMachineInfoServiceImpl implements IDmsBaseMachineInfoService
|
|
|
|
Map<String, Object> params = bo.getParams();
|
|
|
|
Map<String, Object> params = bo.getParams();
|
|
|
|
MPJLambdaWrapper<DmsBaseMachineInfo> lqw = JoinWrappers.lambda(DmsBaseMachineInfo.class)
|
|
|
|
MPJLambdaWrapper<DmsBaseMachineInfo> lqw = JoinWrappers.lambda(DmsBaseMachineInfo.class)
|
|
|
|
.selectAll(DmsBaseMachineInfo.class)
|
|
|
|
.selectAll(DmsBaseMachineInfo.class)
|
|
|
|
|
|
|
|
/* .select(ProdBaseWorkshopInfo::getWorkshopName)
|
|
|
|
|
|
|
|
.select(ProdBaseDeviceMode::getDeviceModeName)
|
|
|
|
|
|
|
|
.leftJoin(ProdBaseWorkshopInfo.class, ProdBaseWorkshopInfo::getWorkshopId, ProdBaseMachineInfo::getWorkshopId)
|
|
|
|
|
|
|
|
.leftJoin(ProdBaseDeviceMode.class, ProdBaseDeviceMode::getDeviceModeId, ProdBaseMachineInfo::getDeviceModeId)*/
|
|
|
|
.eq(bo.getMachineId() != null, DmsBaseMachineInfo::getMachineId, bo.getMachineId())
|
|
|
|
.eq(bo.getMachineId() != null, DmsBaseMachineInfo::getMachineId, bo.getMachineId())
|
|
|
|
.like(StringUtils.isNotBlank(bo.getMachineCode()), DmsBaseMachineInfo::getMachineCode, bo.getMachineCode())
|
|
|
|
.like(StringUtils.isNotBlank(bo.getMachineCode()), DmsBaseMachineInfo::getMachineCode, bo.getMachineCode())
|
|
|
|
.like(StringUtils.isNotBlank(bo.getMachineName()), DmsBaseMachineInfo::getMachineName, bo.getMachineName())
|
|
|
|
.like(StringUtils.isNotBlank(bo.getMachineName()), DmsBaseMachineInfo::getMachineName, bo.getMachineName())
|
|
|
@ -97,9 +101,9 @@ public class DmsBaseMachineInfoServiceImpl implements IDmsBaseMachineInfoService
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* *//**
|
|
|
|
/* *//**
|
|
|
|
* 新增机台信息
|
|
|
|
* 新增设备信息
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* @param bo 机台信息
|
|
|
|
* @param bo 设备信息
|
|
|
|
* @return 是否新增成功
|
|
|
|
* @return 是否新增成功
|
|
|
|
*//*
|
|
|
|
*//*
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
@ -114,9 +118,9 @@ public class DmsBaseMachineInfoServiceImpl implements IDmsBaseMachineInfoService
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
*//**
|
|
|
|
*//**
|
|
|
|
* 修改机台信息
|
|
|
|
* 修改设备信息
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* @param bo 机台信息
|
|
|
|
* @param bo 设备信息
|
|
|
|
* @return 是否修改成功
|
|
|
|
* @return 是否修改成功
|
|
|
|
*//*
|
|
|
|
*//*
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
@ -145,7 +149,7 @@ public class DmsBaseMachineInfoServiceImpl implements IDmsBaseMachineInfoService
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
*//**
|
|
|
|
*//**
|
|
|
|
* 校验并批量删除机台信息信息
|
|
|
|
* 校验并批量删除设备信息信息
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* @param ids 待删除的主键集合
|
|
|
|
* @param ids 待删除的主键集合
|
|
|
|
* @param isValid 是否进行有效性校验
|
|
|
|
* @param isValid 是否进行有效性校验
|
|
|
|