Files
KArtSell.Aegis/docs/Design/kbx-foundation-v60-status-canonical-contract-hardening/backend/Modules/WMS/Picking/Shared/PickingTransitions.cs
T
kjh2064 3f293d8aa8
deploy / deploy (push) Successful in 1m52s
deploy / notify (push) Successful in 1s
V13-FE-006: consolidate approved UI and contract hardening
2026-08-13 02:41:00 +09:00

30 lines
928 B
C#

using Dapper;
using Npgsql;
namespace Modules.WMS.Picking.Shared;
public static class PickingTransitions
{
public static async Task AutoConfirmNextSameLocationAsync(
NpgsqlConnection connection,
NpgsqlTransaction transaction,
Guid taskId,
string completedLocation,
CancellationToken ct)
{
await connection.ExecuteAsync(new CommandDefinition("""
update wms.picking_lines
set location_confirmed=true, updated_at=now()
where id = (
select id
from wms.picking_lines
where task_id=@TaskId
and status <> 'COMPLETED'
order by line_no
limit 1
)
and location_code=@LocationCode;
""", new { TaskId = taskId, LocationCode = completedLocation }, transaction, cancellationToken: ct));
}
}