Service - Unit Packing: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
| (2 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
= Overview = | = Overview = | ||
Handler service for the packing unit that | Handler service for the packing unit that groups multiple standard units packed into a single trackable unit, eg carton or container. | ||
= Repository = | = Repository = | ||
| Line 7: | Line 7: | ||
https://bitbucket.org/izara-supply-units/izara-supply-units-unit-packing | https://bitbucket.org/izara-supply-units/izara-supply-units-unit-packing | ||
= | = Notes = | ||
* unitPacking can themselves be added to other unitPackings | |||
* When a Unit has a inPackingUnit relationship, it cannot have another inPackingUnit added, ie one unit can only be packed inside one unitPacking | |||
* multiple unitStandards used in a [[Service - Transform Units]] operation that are also inPackingUnit must all be inside the same unitPacking, and any resulting unitStandards will add inPackingUnit to the same unitPacking | |||
* When a unit is added to a unitPacking it can change currentSupplyLocation to oldSupplyLocation, then use the unitPackings currentSupplyLocation for location changes until it is removed from the unitPacking, at which time the unit adds a currentSupplyLocation matching the unitPacking at time of removal | |||
= | = objectSchemas = | ||
<syntaxhighlight lang="JavaScript"> | <syntaxhighlight lang="JavaScript"> | ||
{ | { | ||
objectType: "unitPacking", | |||
extendObjType: { | |||
serviceTag: "unitManager", | |||
} | objectType: "unit", | ||
}, | |||
storageResources:{ | |||
"xxx":{ | |||
storageType: "graph", | |||
graphServerTag: "xx", | |||
} | |||
}, | |||
fieldNames: { | |||
// from stage objectType | |||
}, | |||
identifiers: [ | |||
// from stage objectType | |||
] | |||
}, | |||
</syntaxhighlight> | </syntaxhighlight> | ||
<syntaxhighlight lang="JavaScript"> | <syntaxhighlight lang="JavaScript"> | ||
{ | [ | ||
{ | |||
"inPackingUnit": { | |||
storageResources:{ | |||
} | "xxx":{ | ||
storageType: "graph", | |||
graphServerTag: "xx", | |||
} | |||
}, | |||
links: [ | |||
{ | |||
storageResourceTags: ["xxx"], | |||
canDelete: true, | |||
from: { | |||
objType: { | |||
serviceTag: "unitManager", | |||
objectType: "unit" | |||
}, | |||
linkType: "many", | |||
}, | |||
to: { | |||
objType: { | |||
serviceTag: "unitPacking", | |||
objectType: "unitPacking" | |||
}, | |||
linkType: "one", | |||
} | |||
} | |||
] | |||
} | |||
} | |||
] | |||
</syntaxhighlight> | </syntaxhighlight> | ||
* Units current unitPacking | |||
[[ | <syntaxhighlight lang="JavaScript"> | ||
[ | |||
{ | |||
"oldInPackingUnit": { | |||
storageResources:{ | |||
"xxx":{ | |||
storageType: "graph", | |||
graphServerTag: "xx", | |||
} | |||
}, | |||
fieldNames: { | |||
"fromTimestamp": { | |||
type: "timestamp", | |||
requiredOnCreate: true, | |||
}, | |||
"toTimestamp": { | |||
type: "timestamp", | |||
requiredOnCreate: true, | |||
} | |||
}, | |||
links: [ | |||
{ | |||
storageResourceTags: ["xxx"], | |||
canDelete: true, | |||
from: { | |||
objType: { | |||
serviceTag: "unitManager", | |||
objectType: "unit" | |||
}, | |||
linkType: "one", | |||
}, | |||
to: { | |||
objType: { | |||
serviceTag: "unitPacking", | |||
objectType: "unitPacking" | |||
}, | |||
linkType: "many", | |||
} | |||
} | |||
] | |||
} | |||
} | |||
] | |||
</syntaxhighlight> | |||
* | * old inPackingUnit for a unit, maintains packing history for a unit | ||
* | * when a unit is removed from a unitPacking the inPackingUnit link is removed and an oldInPackingUnit is created (the unit can then be added to a new unitPacking if needed) | ||
= Working documents = | = Working documents = | ||
Latest revision as of 12:28, 16 February 2025
Overview
Handler service for the packing unit that groups multiple standard units packed into a single trackable unit, eg carton or container.
Repository
https://bitbucket.org/izara-supply-units/izara-supply-units-unit-packing
Notes
- unitPacking can themselves be added to other unitPackings
- When a Unit has a inPackingUnit relationship, it cannot have another inPackingUnit added, ie one unit can only be packed inside one unitPacking
- multiple unitStandards used in a Service - Transform Units operation that are also inPackingUnit must all be inside the same unitPacking, and any resulting unitStandards will add inPackingUnit to the same unitPacking
- When a unit is added to a unitPacking it can change currentSupplyLocation to oldSupplyLocation, then use the unitPackings currentSupplyLocation for location changes until it is removed from the unitPacking, at which time the unit adds a currentSupplyLocation matching the unitPacking at time of removal
objectSchemas
{
objectType: "unitPacking",
extendObjType: {
serviceTag: "unitManager",
objectType: "unit",
},
storageResources:{
"xxx":{
storageType: "graph",
graphServerTag: "xx",
}
},
fieldNames: {
// from stage objectType
},
identifiers: [
// from stage objectType
]
},
[
{
"inPackingUnit": {
storageResources:{
"xxx":{
storageType: "graph",
graphServerTag: "xx",
}
},
links: [
{
storageResourceTags: ["xxx"],
canDelete: true,
from: {
objType: {
serviceTag: "unitManager",
objectType: "unit"
},
linkType: "many",
},
to: {
objType: {
serviceTag: "unitPacking",
objectType: "unitPacking"
},
linkType: "one",
}
}
]
}
}
]
- Units current unitPacking
[
{
"oldInPackingUnit": {
storageResources:{
"xxx":{
storageType: "graph",
graphServerTag: "xx",
}
},
fieldNames: {
"fromTimestamp": {
type: "timestamp",
requiredOnCreate: true,
},
"toTimestamp": {
type: "timestamp",
requiredOnCreate: true,
}
},
links: [
{
storageResourceTags: ["xxx"],
canDelete: true,
from: {
objType: {
serviceTag: "unitManager",
objectType: "unit"
},
linkType: "one",
},
to: {
objType: {
serviceTag: "unitPacking",
objectType: "unitPacking"
},
linkType: "many",
}
}
]
}
}
]
- old inPackingUnit for a unit, maintains packing history for a unit
- when a unit is removed from a unitPacking the inPackingUnit link is removed and an oldInPackingUnit is created (the unit can then be added to a new unitPacking if needed)