opt:优化载具查询
This commit is contained in:
@@ -24,7 +24,7 @@ public class MdPbStoragevehicletype {
|
|||||||
private String storagevehicle_btype;
|
private String storagevehicle_btype;
|
||||||
private String storagevehicle_size;
|
private String storagevehicle_size;
|
||||||
/**
|
/**
|
||||||
* 1.RT16 2.PS20 3.RT16和PS20
|
* 1.RT16(3层) 2.PS20(四层) 3.RT16和PS20
|
||||||
*/
|
*/
|
||||||
private String suitable_car;
|
private String suitable_car;
|
||||||
private String storagevehicle_name;
|
private String storagevehicle_name;
|
||||||
|
|||||||
@@ -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.nl.wms.basedata_manage.service.dao.mapper.MdPbStoragevehicletypeMapper;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
public class MdPbStoragevehicletypeServiceImpl extends ServiceImpl<MdPbStoragevehicletypeMapper, MdPbStoragevehicletype> implements IMdPbStoragevehicletypeService {
|
public class MdPbStoragevehicletypeServiceImpl extends ServiceImpl<MdPbStoragevehicletypeMapper, MdPbStoragevehicletype> implements IMdPbStoragevehicletypeService {
|
||||||
@Override
|
@Override
|
||||||
public MdPbStoragevehicletype getByCode(String storagevehicle_stype) {
|
public MdPbStoragevehicletype getByCode(String storagevehicle_stype) {
|
||||||
MdPbStoragevehicletype one = this.getOne(
|
List<MdPbStoragevehicletype> list = this.list(
|
||||||
new QueryWrapper<MdPbStoragevehicletype>().lambda()
|
new QueryWrapper<MdPbStoragevehicletype>().lambda()
|
||||||
.eq(MdPbStoragevehicletype::getStoragevehicle_stype, storagevehicle_stype)
|
.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+"】的不存在!");
|
throw new BadRequestException("载具类型为【"+storagevehicle_stype+"】的不存在!");
|
||||||
}
|
}
|
||||||
return one;
|
return list.get(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -82,6 +82,11 @@ public class SchBaseRegionServiceImpl extends ServiceImpl<SchBaseRegionMapper, S
|
|||||||
schBaseRegionMapper.deleteBatchIds(ids);
|
schBaseRegionMapper.deleteBatchIds(ids);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void relse() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<SchBaseRegion> getRegionList(SchBaseRegion region) {
|
public List<SchBaseRegion> getRegionList(SchBaseRegion region) {
|
||||||
return schBaseRegionMapper.selectList(new LambdaQueryWrapper<SchBaseRegion>()
|
return schBaseRegionMapper.selectList(new LambdaQueryWrapper<SchBaseRegion>()
|
||||||
|
|||||||
Reference in New Issue
Block a user