opt:优化载具查询

This commit is contained in:
2026-03-17 17:18:35 +08:00
parent a1941577f0
commit 24521db25a
3 changed files with 17 additions and 6 deletions

View File

@@ -24,7 +24,7 @@ public class MdPbStoragevehicletype {
private String storagevehicle_btype;
private String storagevehicle_size;
/**
* 1.RT16 2.PS20 3.RT16和PS20
* 1.RT163层 2.PS20(四层) 3.RT16和PS20
*/
private String suitable_car;
private String storagevehicle_name;

View File

@@ -11,17 +11,23 @@ import org.nl.wms.basedata_manage.service.dao.MdPbStoragevehicletype;
import org.nl.wms.basedata_manage.service.dao.mapper.MdPbStoragevehicletypeMapper;
import org.springframework.stereotype.Service;
import java.util.List;
@Service
public class MdPbStoragevehicletypeServiceImpl extends ServiceImpl<MdPbStoragevehicletypeMapper, MdPbStoragevehicletype> implements IMdPbStoragevehicletypeService {
@Override
public MdPbStoragevehicletype getByCode(String storagevehicle_stype) {
MdPbStoragevehicletype one = this.getOne(
List<MdPbStoragevehicletype> list = this.list(
new QueryWrapper<MdPbStoragevehicletype>().lambda()
.and(wrapper -> wrapper
.eq(MdPbStoragevehicletype::getStoragevehicle_stype, storagevehicle_stype)
);
if (ObjectUtil.isEmpty(one)) {
.or()
.eq(MdPbStoragevehicletype::getStoragevehicle_btype, storagevehicle_stype)
));
if (ObjectUtil.isEmpty(list)) {
throw new BadRequestException("载具类型为【"+storagevehicle_stype+"】的不存在!");
}
return one;
return list.get(0);
}
}

View File

@@ -82,6 +82,11 @@ public class SchBaseRegionServiceImpl extends ServiceImpl<SchBaseRegionMapper, S
schBaseRegionMapper.deleteBatchIds(ids);
}
@Override
public void relse() {
}
@Override
public List<SchBaseRegion> getRegionList(SchBaseRegion region) {
return schBaseRegionMapper.selectList(new LambdaQueryWrapper<SchBaseRegion>()