@ -12,4 +12,6 @@ public interface WarehouseTaryAllocationMapper extends BaseMapper<WarehouseTaryA
BasicdataTrayEntity getTrayByAllocation(@Param("allocationCode") String allocationCode);
BasicdataTrayEntity getTrayByAllocationId(@Param("allocationId") Long allocationId);
void deleteByTrayIdAndAllocationId(@Param("trayId") Long trayId, @Param("allocationId") Long allocationId);
}
@ -22,4 +22,12 @@
and lwta.allocation_id = #{allocationId}
</select>
<update id="deleteByTrayIdAndAllocationId" >
update logpm_warehouse_tary_allocation lwta
set lwta.is_deleted = 1
where lwta.tray_id = #{trayId}
and lwta.is_deleted = 0
</update>
</mapper>
@ -13,4 +13,7 @@ public interface IWarehouseTaryAllocationService extends BaseService<WarehouseTa
void deleteById(WarehouseTaryAllocationEntity taryAllocationEntity);
Long getAllocationIdByTrayId(Long trayId);
void deleteByTrayIdAndAllocationId(Long trayId, Long allocationId);
@ -43,4 +43,9 @@ public class WarehouseTaryAllocationServiceImpl extends BaseServiceImpl<Warehous
return taryAllocationEntity.getAllocationId();
@Override
public void deleteByTrayIdAndAllocationId(Long trayId, Long allocationId) {
baseMapper.deleteByTrayIdAndAllocationId(trayId,allocationId);
@ -1293,7 +1293,7 @@ public class WarehouseTrayTypeServiceImpl extends BaseServiceImpl<WarehouseTrayT
//存入有数据库存品与托盘绑定关系表
warehouseTrayGoodsService.saveEntityStock(materialId, marketId,trayTypeEntity,incomingBatch,cargoNumber,num, "0");
}else{
warehouseTrayGoodsService.updateEntityStock(warehouseTrayGoodsEntity,-num);
warehouseTrayGoodsService.updateEntityStock(warehouseTrayGoodsEntity,num);
// //添加上拖日志表
@ -933,6 +933,10 @@ public class WarehouseUpdownTypeServiceImpl extends BaseServiceImpl<WarehouseUpd
if(!Objects.isNull(trayEntity)){
//绑定了托盘
warehouseTrayTypeService.deleteZeroOrderByTrayCode(orderCode,trayEntity.getPalletCode());
//解除托盘与库位绑定
warehouseTaryAllocationService.deleteByTrayIdAndAllocationId(trayEntity.getId(),allocationId);
//全部下架
Integer residue = warehouseUpdownGoodsService.deleteByUpdownGoodsId(updownGoodsId);