feat(ocp): create and book in plus dyco controller implemented

This commit is contained in:
2025-03-26 22:07:19 -05:00
parent 878e650e62
commit 7a1a4773e7
23 changed files with 1233 additions and 40 deletions

View File

@@ -0,0 +1,17 @@
export const mmQuery = `
SELECT lot.ProductionLotHumanReadableId,
case when SourcingState in (1, 2) then 1
when x.ProvidedAmount > 0 then 1
when x.EffectiveConsumption > 0 then 1
else 0 end as Staged,
x.ProvidedAmount as Provided,
x.EffectiveConsumption as consumption,
x.IsManualProcess as isManual,
MaterialHumanReadableId
FROM [test1_AlplaPROD2.0_Read].[issueMaterial].[MaterialDemand] x (nolock)
left join
[test1_AlplaPROD2.0_Read].[issueMaterial].[ProductionLot] as lot on
x.ProductionLotId = lot.Id
where lot.ProductionLotHumanReadableId = [lotNumber]
and IsMainMaterial = 1
`;