Browse Source

1.修复库内作业扫描托盘bug

training
zhenghaoyu 2 years ago
parent
commit
caaa90c5da
  1. 9
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseTrayTypeMapper.xml
  2. 28
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseTrayTypeServiceImpl.java

9
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseTrayTypeMapper.xml

@ -5,11 +5,10 @@
<select id="orderPageList" resultType="com.logpm.warehouse.vo.WarehouseTrayTypeVO">
select lwtt.*
from logpm_warehouse_tray_type lwtt
left join logpm_warehouse_tary_allocation lwta on lwtt.tray_id = lwta.tray_id and lwta.is_deleted = 0
where 1=1
and lwtt.type = #{param.type}
and lwtt.is_deleted = 0
and lwtt.warehouse_id = #{warehouseId}
and lwtt.is_deleted = 0
and lwtt.type = #{param.type}
and lwtt.warehouse_id = #{warehouseId}
<if test="param.trayCode != null and param.trayCode != '' ">
and lwtt.tray_code = #{param.trayCode}
</if>
@ -30,8 +29,8 @@
left join logpm_distribution_parcel_list ldpl on ldpl.id = lwtg.association_id and ldpl.is_deleted = 0
left join logpm_distribution_stock_article ldsa on ldsa.id = ldpl.stock_article_id and ldsa.is_deleted = 0
where lwtt.is_deleted = 0
and lwtt.type = #{type}
and lwtt.tray_code = #{trayCode}
and lwtt.type = #{type}
group by ldsa.order_code
</select>

28
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseTrayTypeServiceImpl.java

@ -106,6 +106,10 @@ public class WarehouseTrayTypeServiceImpl extends BaseServiceImpl<WarehouseTrayT
@Override
public TrayTypeDataVO getEntityByTrayCode(String trayCode,Long warehouseId) {
BasicdataTrayEntity basicdataTrayEntity = basicdataTrayClient.getTrayByTrayCode(trayCode);
if(Objects.isNull(basicdataTrayEntity)){
log.warn("###############getEntityByTrayCode: 托盘不存在 trayCode={}",trayCode);
throw new CustomerException(403,"托盘不存在");
}
Integer disableType = basicdataTrayEntity.getDisableType();
if(disableType == 2){
log.warn("###############getEntityByTrayCode: 该托盘已被禁用 trayCode={}",trayCode);
@ -120,8 +124,8 @@ public class WarehouseTrayTypeServiceImpl extends BaseServiceImpl<WarehouseTrayT
//根据托盘编码查询是否有托盘编码存在打托数据
QueryWrapper<WarehouseTrayTypeEntity> queryTrayTypeWrapper = new QueryWrapper<>();
queryTrayTypeWrapper.eq("tray_code",trayCode)
.eq("is_deleted",0);
queryTrayTypeWrapper.eq("is_deleted",0)
.eq("tray_code",trayCode);
WarehouseTrayTypeEntity trayTypeEntity = baseMapper.selectOne(queryTrayTypeWrapper);
if(Objects.isNull(trayTypeEntity)){
//没有查询到托盘打托信息
@ -177,15 +181,19 @@ public class WarehouseTrayTypeServiceImpl extends BaseServiceImpl<WarehouseTrayT
@Override
public TrayTypeDataVO getEntityByTrayCodeWithNull(String trayCode) {
BasicdataTrayEntity basicdataTrayEntity = basicdataTrayClient.getTrayByTrayCode(trayCode);
if(Objects.isNull(basicdataTrayEntity)){
log.warn("###############getEntityByTrayCodeWithNull: 托盘不存在 trayCode={}",trayCode);
throw new CustomerException(403,"托盘不存在");
}
Integer disableType = basicdataTrayEntity.getDisableType();
if(disableType == 2){
log.warn("###############getEntityByTrayCode: 该托盘已被禁用 trayCode={}",trayCode);
log.warn("###############getEntityByTrayCodeWithNull: 该托盘已被禁用 trayCode={}",trayCode);
throw new CustomerException(403,"该托盘已被禁用");
}
Long trayId = basicdataTrayEntity.getId();
Long allocationId = warehouseTaryAllocationService.getAllocationIdByTrayId(trayId);
if(!Objects.isNull(allocationId)){
log.warn("###############getEntityByTrayCode: 托盘已上架 allocationId={}",allocationId);
log.warn("###############getEntityByTrayCodeWithNull: 托盘已上架 allocationId={}",allocationId);
throw new CustomerException(403,"托盘已上架");
}
@ -242,7 +250,7 @@ public class WarehouseTrayTypeServiceImpl extends BaseServiceImpl<WarehouseTrayT
List<TrayTypeDataListVO> list = warehouseTrayGoodsService.getStockListByTrayTypeId(trayTypeId);
trayTypeDataVO.setList(list);
}else {
log.warn("##################getEntityByTrayCode: 未知的打托类型");
log.warn("##################getEntityByTrayCodeWithNull: 未知的打托类型");
}
return trayTypeDataVO;
}
@ -251,15 +259,19 @@ public class WarehouseTrayTypeServiceImpl extends BaseServiceImpl<WarehouseTrayT
@Override
public TrayTypeDataVO getEntityByTrayCodeWithUpdown(String trayCode) {
BasicdataTrayEntity basicdataTrayEntity = basicdataTrayClient.getTrayByTrayCode(trayCode);
if(Objects.isNull(basicdataTrayEntity)){
log.warn("###############getEntityByTrayCodeWithUpdown: 托盘不存在 trayCode={}",trayCode);
throw new CustomerException(403,"托盘不存在");
}
Integer disableType = basicdataTrayEntity.getDisableType();
if(disableType == 2){
log.warn("###############getEntityByTrayCode: 该托盘已被禁用 trayCode={}",trayCode);
log.warn("###############getEntityByTrayCodeWithUpdown: 该托盘已被禁用 trayCode={}",trayCode);
throw new CustomerException(403,"该托盘已被禁用");
}
Long trayId = basicdataTrayEntity.getId();
Long allocationId = warehouseTaryAllocationService.getAllocationIdByTrayId(trayId);
if(Objects.isNull(allocationId)){
log.warn("###############getEntityByTrayCode: 托盘未上架 allocationId={}",allocationId);
log.warn("###############getEntityByTrayCodeWithUpdown: 托盘未上架 allocationId={}",allocationId);
throw new CustomerException(403,"托盘未上架");
}
@ -309,7 +321,7 @@ public class WarehouseTrayTypeServiceImpl extends BaseServiceImpl<WarehouseTrayT
List<TrayTypeDataListVO> list = warehouseTrayGoodsService.getStockListByTrayTypeId(trayTypeId);
trayTypeDataVO.setList(list);
}else {
log.warn("##################getEntityByTrayCode: 未知的打托类型");
log.warn("##################getEntityByTrayCodeWithUpdown: 未知的打托类型");
}
return trayTypeDataVO;
}

Loading…
Cancel
Save