|
|
|
@ -10,6 +10,7 @@ import com.github.yulichang.wrapper.MPJLambdaWrapper;
|
|
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
|
|
|
import lombok.RequiredArgsConstructor;
|
|
|
|
|
import org.dromara.mes.domain.BaseMaterialInfo;
|
|
|
|
|
import org.dromara.mes.mapper.BaseMaterialInfoMapper;
|
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
import org.dromara.mes.domain.bo.BaseEqualMaterialInfoBo;
|
|
|
|
|
import org.dromara.mes.domain.vo.BaseEqualMaterialInfoVo;
|
|
|
|
@ -21,6 +22,8 @@ import java.util.List;
|
|
|
|
|
import java.util.Map;
|
|
|
|
|
import java.util.Collection;
|
|
|
|
|
|
|
|
|
|
import org.springframework.util.ObjectUtils;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 等同物料信息Service业务层处理
|
|
|
|
|
*
|
|
|
|
@ -32,6 +35,7 @@ import java.util.Collection;
|
|
|
|
|
public class BaseEqualMaterialInfoServiceImpl implements IBaseEqualMaterialInfoService {
|
|
|
|
|
|
|
|
|
|
private final BaseEqualMaterialInfoMapper baseMapper;
|
|
|
|
|
private final BaseMaterialInfoMapper baseMaterialInfoMapper;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 查询等同物料信息
|
|
|
|
@ -41,7 +45,16 @@ public class BaseEqualMaterialInfoServiceImpl implements IBaseEqualMaterialInfoS
|
|
|
|
|
*/
|
|
|
|
|
@Override
|
|
|
|
|
public BaseEqualMaterialInfoVo queryById(Long equalMaterialInfoId){
|
|
|
|
|
return baseMapper.selectVoById(equalMaterialInfoId);
|
|
|
|
|
BaseEqualMaterialInfoVo baseEqualMaterialInfoVo = baseMapper.selectVoById(equalMaterialInfoId);
|
|
|
|
|
if (!ObjectUtils.isEmpty(baseEqualMaterialInfoVo)) {
|
|
|
|
|
// 关联物料名称
|
|
|
|
|
BaseMaterialInfo baseMaterialInfo = baseMaterialInfoMapper.selectOne(Wrappers.lambdaQuery(BaseMaterialInfo.class)
|
|
|
|
|
.eq(BaseMaterialInfo::getMaterialId, baseEqualMaterialInfoVo.getMaterialId()));
|
|
|
|
|
if (!ObjectUtils.isEmpty(baseMaterialInfo)) {
|
|
|
|
|
baseEqualMaterialInfoVo.setMaterialName(baseMaterialInfo.getMaterialName());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return baseEqualMaterialInfoVo;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|