opt:分离入库出库获取载具宽度车型
This commit is contained in:
@@ -5,9 +5,18 @@ import org.nl.wms.basedata_manage.service.dao.MdPbStoragevehicletype;
|
||||
|
||||
public interface IMdPbStoragevehicletypeService extends IService<MdPbStoragevehicletype> {
|
||||
/**
|
||||
* 根据编码获取载具
|
||||
* 入库根据编码获取载具
|
||||
* @param storagevehicle_stype 载具类型细分
|
||||
* @return 实体类
|
||||
*/
|
||||
MdPbStoragevehicletype getByCode(String storagevehicle_stype);
|
||||
|
||||
/**
|
||||
* 出库根据编码获取载具
|
||||
* @param storagevehicle_stype 载具类型细分
|
||||
* @return 实体类
|
||||
*/
|
||||
MdPbStoragevehicletype getOutVehicleType(String storagevehicle_stype);
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -6,7 +6,6 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.nl.common.exception.BadRequestException;
|
||||
import org.nl.wms.basedata_manage.service.IMdPbStoragevehicletypeService;
|
||||
import org.nl.wms.basedata_manage.service.dao.MdPbStoragevehicleinfo;
|
||||
import org.nl.wms.basedata_manage.service.dao.MdPbStoragevehicletype;
|
||||
import org.nl.wms.basedata_manage.service.dao.mapper.MdPbStoragevehicletypeMapper;
|
||||
import org.springframework.stereotype.Service;
|
||||
@@ -17,15 +16,26 @@ import java.util.List;
|
||||
public class MdPbStoragevehicletypeServiceImpl extends ServiceImpl<MdPbStoragevehicletypeMapper, MdPbStoragevehicletype> implements IMdPbStoragevehicletypeService {
|
||||
@Override
|
||||
public MdPbStoragevehicletype getByCode(String storagevehicle_stype) {
|
||||
MdPbStoragevehicletype one = this.getOne(
|
||||
new QueryWrapper<MdPbStoragevehicletype>().lambda()
|
||||
.eq(MdPbStoragevehicletype::getStoragevehicle_stype, storagevehicle_stype)
|
||||
);
|
||||
if (ObjectUtil.isEmpty(one)) {
|
||||
throw new BadRequestException("载具类型为【" + storagevehicle_stype + "】的不存在!");
|
||||
}
|
||||
return one;
|
||||
}
|
||||
|
||||
@Override
|
||||
public MdPbStoragevehicletype getOutVehicleType(String storagevehicle_stype) {
|
||||
List<MdPbStoragevehicletype> list = this.list(
|
||||
new QueryWrapper<MdPbStoragevehicletype>().lambda()
|
||||
.and(wrapper -> wrapper
|
||||
.eq(MdPbStoragevehicletype::getStoragevehicle_stype, storagevehicle_stype)
|
||||
.or()
|
||||
.eq(MdPbStoragevehicletype::getStoragevehicle_btype, storagevehicle_stype)
|
||||
));
|
||||
.eq(MdPbStoragevehicletype::getStoragevehicle_stype, storagevehicle_stype)
|
||||
.or()
|
||||
.eq(MdPbStoragevehicletype::getStoragevehicle_btype, storagevehicle_stype)
|
||||
.orderByDesc(MdPbStoragevehicletype::getCar_width));
|
||||
if (ObjectUtil.isEmpty(list)) {
|
||||
throw new BadRequestException("载具类型为【"+storagevehicle_stype+"】的不存在!");
|
||||
throw new BadRequestException("载具类型为【" + storagevehicle_stype + "】的不存在!");
|
||||
}
|
||||
return list.get(0);
|
||||
}
|
||||
|
||||
@@ -16,8 +16,8 @@ import org.apache.commons.lang3.StringUtils;
|
||||
import org.nl.common.domain.query.PageQuery;
|
||||
import org.nl.common.exception.BadRequestException;
|
||||
import org.nl.common.utils.CodeUtil;
|
||||
import org.nl.common.utils.IdUtil;
|
||||
import org.nl.common.utils.SecurityUtils;
|
||||
import org.nl.common.utils.IdUtil;;
|
||||
import org.nl.config.SpringContextHolder;
|
||||
import org.nl.wms.basedata_manage.enums.BaseDataEnum;
|
||||
import org.nl.wms.basedata_manage.service.IBsrealStorattrService;
|
||||
@@ -38,10 +38,7 @@ import org.nl.wms.sch_manage.service.dao.mapper.SchBasePointMapper;
|
||||
import org.nl.wms.sch_manage.service.util.tasks.StOutTask;
|
||||
import org.nl.wms.warehouse_manage.enums.IOSConstant;
|
||||
import org.nl.wms.warehouse_manage.enums.IOSEnum;
|
||||
import org.nl.wms.warehouse_manage.inAndOut.service.dto.TOWMSMSG;
|
||||
import org.nl.wms.warehouse_manage.service.IMdPbGroupplateService;
|
||||
import org.nl.wms.warehouse_manage.inAndOut.service.IOutBillService;
|
||||
import org.nl.wms.warehouse_manage.service.dao.GroupPlate;
|
||||
import org.nl.wms.warehouse_manage.inAndOut.service.dao.IOStorInv;
|
||||
import org.nl.wms.warehouse_manage.inAndOut.service.dao.IOStorInvDis;
|
||||
import org.nl.wms.warehouse_manage.inAndOut.service.dao.IOStorInvDtl;
|
||||
@@ -50,9 +47,11 @@ import org.nl.wms.warehouse_manage.inAndOut.service.dao.mapper.IOStorInvDtlMappe
|
||||
import org.nl.wms.warehouse_manage.inAndOut.service.dao.mapper.IOStorInvMapper;
|
||||
import org.nl.wms.warehouse_manage.inAndOut.service.dto.IOStorInvDisDto;
|
||||
import org.nl.wms.warehouse_manage.inAndOut.service.dto.IOStorInvDtlDto;
|
||||
import org.nl.wms.warehouse_manage.inAndOut.service.dto.TOWMSMSG;
|
||||
import org.nl.wms.warehouse_manage.service.IMdPbGroupplateService;
|
||||
import org.nl.wms.warehouse_manage.service.dao.GroupPlate;
|
||||
import org.nl.wms.warehouse_manage.service.dao.mapper.MdPbGroupplateMapper;
|
||||
import org.nl.wms.wbwms.service.IWmsToWmsService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
@@ -63,6 +62,8 @@ import java.text.SimpleDateFormat;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
;
|
||||
|
||||
/**
|
||||
* @author dsh
|
||||
* 2025/5/29
|
||||
@@ -1183,13 +1184,15 @@ public class OutBillServiceImpl extends ServiceImpl<IOStorInvMapper,IOStorInv> i
|
||||
String car_type=null;
|
||||
String car_width=null;
|
||||
structattr=iStructattrService.getByCode(struct_code);
|
||||
if(structattr.getLayer_num().equals(4)){
|
||||
car_type="2";
|
||||
String storagevehicle_code=structattr.getStoragevehicle_code();
|
||||
MdPbStoragevehicleinfo mdPbStoragevehicleinfo=iMdPbStoragevehicleinfoService.getByCode(storagevehicle_code);
|
||||
String storagevehicle_stype=mdPbStoragevehicleinfo.getStoragevehicle_type();
|
||||
MdPbStoragevehicletype mdPbStoragevehicletype=iMdPbStoragevehicletypeService.getByCode(storagevehicle_stype);
|
||||
car_width=mdPbStoragevehicletype.getCar_width();
|
||||
if(structattr.getLayer_num().equals(4)) {
|
||||
car_type = "2";
|
||||
String storagevehicle_code = structattr.getStoragevehicle_code();
|
||||
MdPbStoragevehicleinfo mdPbStoragevehicleinfo = iMdPbStoragevehicleinfoService.getByCode(storagevehicle_code);
|
||||
if (StringUtils.isBlank(mdPbStoragevehicleinfo.getStoragevehicle_type())) {
|
||||
throw new BadRequestException("未查到" + mdPbStoragevehicleinfo.getStoragevehicle_code() + "的载具类型!");
|
||||
}
|
||||
MdPbStoragevehicletype mdPbStoragevehicletype = iMdPbStoragevehicletypeService.getOutVehicleType(mdPbStoragevehicleinfo.getStoragevehicle_type());
|
||||
car_width = mdPbStoragevehicletype.getCar_width();
|
||||
}else{
|
||||
car_type="1";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user