Production tech map
Technological maps — the step graph that turns route sheets into a finished product
INFO
Har bir javob umumiy konvertda qaytadi — code, message, messages, status_code, time — foydali yuk esa data ichida. Quyidagi jadvallar faqat data ichini tavsiflaydi.
POST /production-tech-map/create
Create a technological map — the step graph that turns route sheets into a finished product. Each item pairs a production step with the route sheet that produces it and names the steps that follow.
So‘rov tanasi
| Maydon | Tur | Majburiy | Tavsif |
|---|---|---|---|
name | string | Ha | Display name of the technological map |
group_id | string | Yo‘q | Production-group ObjectId (a group of type tech_map) this map belongs to |
code | string | Yo‘q | Optional short code for the map |
note | string | Yo‘q | Optional free-text note |
items | object[] | Ha | Ordered steps of the map, at least one. Each entry pairs a step with the route sheet that produces it and names the steps that come next. |
items[].step_id | string | Ha | Production-step ObjectId this node of the map executes |
items[].route_sheet_id | string | Ha | Production route-sheet ObjectId holding the recipe for this step |
items[].next_step_ids | string[] | Yo‘q | Production-step ObjectIds that follow this one. Empty for a terminal step; more than one fans the route out in parallel. This is what turns the flat items[] array into a graph. |
attachments | object[] | Yo‘q | Files attached to the map (drawings, specifications) |
attachments[].file_id | string | Yo‘q | Uploaded file ObjectId |
attachments[].name | string | Yo‘q | Original file name |
{
"name": "string",
"group_id": "string",
"code": "string",
"note": "string",
"items": [
{
"step_id": "string",
"route_sheet_id": "string",
"next_step_ids": []
}
],
"attachments": [
{
"file_id": "string",
"name": "string"
}
]
}Javob
| Maydon | Tur | Tavsif |
|---|---|---|
name | string | Display name of the technological map |
group_id | string | Production-group ObjectId (a group of type tech_map) this map belongs to |
code | string | Optional short code for the map |
note | string | Optional free-text note |
items | object[] | Hydrated step graph — each item carries its step and route sheet inline alongside the ids sent on create |
items[].step_id | string | Production-step ObjectId this node of the map executes |
items[].route_sheet_id | string | Production route-sheet ObjectId holding the recipe for this step |
items[].next_step_ids | string[] | Production-step ObjectIds that follow this one. Empty for a terminal step; more than one fans the route out in parallel. This is what turns the flat items[] array into a graph. |
items[]._id | string | Tech-map item ObjectId |
items[].tech_map_id | string | Owning technological map ObjectId |
items[].step | object | Hydrated production step |
items[].step._id | string | |
items[].step.name | string | |
items[].route_sheet | object | Hydrated route sheet |
items[].route_sheet._id | string | |
items[].route_sheet.name | string | |
items[].route_sheet.number | string | |
attachments | object[] | Files attached to the map (drawings, specifications) |
attachments[].file_id | string | Uploaded file ObjectId |
attachments[].name | string | Original file name |
_id | string | Technological map ObjectId |
number | string | Auto-generated sequential map number |
group | object | Hydrated production group this map belongs to |
group._id | string | |
group.name | string | |
route_sheet_ids | string[] | Every route-sheet ObjectId referenced by the map's items |
last_route_sheet_id | string | Route sheet of the terminal step — the one that yields the finished product |
is_deleted | boolean | Soft-delete flag |
created_at | string (date-time) | Creation timestamp (ISO 8601) |
updated_at | string (date-time) | Last update timestamp (ISO 8601) |
{
"code": 0,
"message": "Success",
"status_code": 200,
"data": {
"name": "string",
"group_id": "string",
"code": "string",
"note": "string",
"items": [
{
"step_id": "string",
"route_sheet_id": "string",
"next_step_ids": [],
"_id": "string",
"tech_map_id": "string",
"step": {
"_id": null,
"name": null
},
"route_sheet": {
"_id": null,
"name": null,
"number": null
}
}
],
"attachments": [
{
"file_id": "string",
"name": "string"
}
],
"_id": "string",
"number": "string",
"group": {
"_id": "string",
"name": "string"
},
"route_sheet_ids": [
"string"
],
"last_route_sheet_id": "string",
"is_deleted": false,
"created_at": "2025-05-01T12:00:00Z",
"updated_at": "2025-05-01T12:00:00Z"
},
"time": "2025-05-01T12:00:00Z"
}GET /production-tech-map/get-by-id/{id}
Fetch a single technological map by ObjectId, hydrated with its step graph, steps and route sheets.
Yo‘l parametrlari
| Parametr | Tur | Majburiy | Tavsif |
|---|---|---|---|
id | string | Ha | Technological-map ObjectId |
So‘rov tanasi
So‘rov tanasi talab qilinmaydi.
Javob
Javob tuzilishi quyidagi bilan bir xil: POST /production-tech-map/create.
POST /production-tech-map/get-paging
Paginated list of technological maps, filterable by production group and free-text search over name, number and code.
So‘rov tanasi
| Maydon | Tur | Majburiy | Tavsif |
|---|---|---|---|
page | number | Ha | Standart: 1 |
limit | number | Ha | Standart: 20 |
search | string | Yo‘q | Filter by name, number or code |
group_id | string | Yo‘q | Filter by production-group ObjectId |
{
"page": 1,
"limit": 20,
"search": "string",
"group_id": "string"
}Javob
| Maydon | Tur | Tavsif |
|---|---|---|
total | number | |
list | object[] | |
list[].name | string | Display name of the technological map |
list[].group_id | string | Production-group ObjectId (a group of type tech_map) this map belongs to |
list[].code | string | Optional short code for the map |
list[].note | string | Optional free-text note |
list[].items | object[] | Hydrated step graph — each item carries its step and route sheet inline alongside the ids sent on create |
list[].items[].step_id | string | Production-step ObjectId this node of the map executes |
list[].items[].route_sheet_id | string | Production route-sheet ObjectId holding the recipe for this step |
list[].items[].next_step_ids | string[] | Production-step ObjectIds that follow this one. Empty for a terminal step; more than one fans the route out in parallel. This is what turns the flat items[] array into a graph. |
list[].items[]._id | string | Tech-map item ObjectId |
list[].items[].tech_map_id | string | Owning technological map ObjectId |
list[].items[].step | object | Hydrated production step |
list[].items[].route_sheet | object | Hydrated route sheet |
list[].attachments | object[] | Files attached to the map (drawings, specifications) |
list[].attachments[].file_id | string | Uploaded file ObjectId |
list[].attachments[].name | string | Original file name |
list[]._id | string | Technological map ObjectId |
list[].number | string | Auto-generated sequential map number |
list[].group | object | Hydrated production group this map belongs to |
list[].group._id | string | |
list[].group.name | string | |
list[].route_sheet_ids | string[] | Every route-sheet ObjectId referenced by the map's items |
list[].last_route_sheet_id | string | Route sheet of the terminal step — the one that yields the finished product |
list[].is_deleted | boolean | Soft-delete flag |
list[].created_at | string (date-time) | Creation timestamp (ISO 8601) |
list[].updated_at | string (date-time) | Last update timestamp (ISO 8601) |
{
"code": 0,
"message": "Success",
"status_code": 200,
"data": {
"total": 0,
"list": [
{
"name": "string",
"group_id": "string",
"code": "string",
"note": "string",
"items": [],
"attachments": [],
"_id": "string",
"number": "string",
"group": {
"_id": null,
"name": null
},
"route_sheet_ids": [],
"last_route_sheet_id": "string",
"is_deleted": false,
"created_at": "2025-05-01T12:00:00Z",
"updated_at": "2025-05-01T12:00:00Z"
}
]
},
"time": "2025-05-01T12:00:00Z"
}PUT /production-tech-map/update/{id}
Update an existing technological map. The item graph is rewritten from the items[] array, so send every step — not just the changed ones.
Yo‘l parametrlari
| Parametr | Tur | Majburiy | Tavsif |
|---|---|---|---|
id | string | Ha | Technological-map ObjectId |
So‘rov tanasi
| Maydon | Tur | Majburiy | Tavsif |
|---|---|---|---|
name | string | Ha | Display name of the technological map |
group_id | string | Yo‘q | Production-group ObjectId (a group of type tech_map) this map belongs to |
code | string | Yo‘q | Optional short code for the map |
note | string | Yo‘q | Optional free-text note |
items | object[] | Ha | Full replacement set of steps. The item graph is rewritten from this array, so send every step, not just the changed ones. |
items[].step_id | string | Ha | Production-step ObjectId this node of the map executes |
items[].route_sheet_id | string | Ha | Production route-sheet ObjectId holding the recipe for this step |
items[].next_step_ids | string[] | Yo‘q | Production-step ObjectIds that follow this one. Empty for a terminal step; more than one fans the route out in parallel. This is what turns the flat items[] array into a graph. |
attachments | object[] | Yo‘q | Files attached to the map (drawings, specifications) |
attachments[].file_id | string | Yo‘q | Uploaded file ObjectId |
attachments[].name | string | Yo‘q | Original file name |
{
"name": "string",
"group_id": "string",
"code": "string",
"note": "string",
"items": [
{
"step_id": "string",
"route_sheet_id": "string",
"next_step_ids": []
}
],
"attachments": [
{
"file_id": "string",
"name": "string"
}
]
}Javob
Javob tuzilishi quyidagi bilan bir xil: POST /production-tech-map/create.
DELETE /production-tech-map/delete/{id}
Soft-delete a technological map by ObjectId.
Yo‘l parametrlari
| Parametr | Tur | Majburiy | Tavsif |
|---|---|---|---|
id | string | Ha | Technological-map ObjectId |
So‘rov tanasi
So‘rov tanasi talab qilinmaydi.
Javob
{
"code": 0,
"message": "Success",
"status_code": 200,
"data": "ok",
"time": "2025-05-01T12:00:00Z"
}Bu sahifa OpenAPI spetsifikatsiyasidan yaratilgan.