Commit 8bbf9199e9c8b213672f473201ee4af1692d7d92
1 parent
c603fa0b
feat:agv点位判断
Showing
1 changed file
with
16 additions
and
0 deletions
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/agvPort/service/impl/AgvPortServiceImpl.java
1 | 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 | 6 | import org.jeecg.modules.wms.config.agvPort.entity.AgvPort; |
4 | 7 | import org.jeecg.modules.wms.config.agvPort.mapper.AgvPortMapper; |
5 | 8 | import org.jeecg.modules.wms.config.agvPort.service.IAgvPortService; |
9 | +import org.jeecg.utils.StringUtils; | |
6 | 10 | import org.springframework.stereotype.Service; |
7 | 11 | |
8 | 12 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
9 | 13 | |
14 | +import javax.annotation.Resource; | |
15 | + | |
10 | 16 | /** |
11 | 17 | * @Description: AGV点位 |
12 | 18 | * @Author: jeecg-boot |
... | ... | @@ -16,4 +22,14 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
16 | 22 | @Service |
17 | 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 | } |
... | ... |