Commit 8bbf9199e9c8b213672f473201ee4af1692d7d92

Authored by 唐高鑫
1 parent c603fa0b

feat:agv点位判断

huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/agvPort/service/impl/AgvPortServiceImpl.java
1 package org.jeecg.modules.wms.config.agvPort.service.impl; 1 package org.jeecg.modules.wms.config.agvPort.service.impl;
2 2
  3 +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
  4 +import com.baomidou.mybatisplus.core.toolkit.Wrappers;
  5 +import org.jeecg.common.exception.JeecgBootException;
3 import org.jeecg.modules.wms.config.agvPort.entity.AgvPort; 6 import org.jeecg.modules.wms.config.agvPort.entity.AgvPort;
4 import org.jeecg.modules.wms.config.agvPort.mapper.AgvPortMapper; 7 import org.jeecg.modules.wms.config.agvPort.mapper.AgvPortMapper;
5 import org.jeecg.modules.wms.config.agvPort.service.IAgvPortService; 8 import org.jeecg.modules.wms.config.agvPort.service.IAgvPortService;
  9 +import org.jeecg.utils.StringUtils;
6 import org.springframework.stereotype.Service; 10 import org.springframework.stereotype.Service;
7 11
8 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; 12 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
9 13
  14 +import javax.annotation.Resource;
  15 +
10 /** 16 /**
11 * @Description: AGV点位 17 * @Description: AGV点位
12 * @Author: jeecg-boot 18 * @Author: jeecg-boot
@@ -16,4 +22,14 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; @@ -16,4 +22,14 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
16 @Service 22 @Service
17 public class AgvPortServiceImpl extends ServiceImpl<AgvPortMapper, AgvPort> implements IAgvPortService { 23 public class AgvPortServiceImpl extends ServiceImpl<AgvPortMapper, AgvPort> implements IAgvPortService {
18 24
  25 + @Override
  26 + public AgvPort isAgvPortExsit(String code) {
  27 + if (StringUtils.isEmpty(code)){
  28 + throw new JeecgBootException("AGV工位为空");
  29 + }
  30 + LambdaQueryWrapper<AgvPort> agvPortLambdaQueryWrapper = Wrappers.lambdaQuery();
  31 + agvPortLambdaQueryWrapper.eq(AgvPort::getCode,code);
  32 + AgvPort agvPort = this.getOne(agvPortLambdaQueryWrapper);
  33 + return agvPort;
  34 + }
19 } 35 }