Production tech map
Technological maps — the step graph that turns route sheets into a finished product
INFO
Каждый ответ приходит в общем конверте — code, message, messages, status_code, time — а полезная нагрузка лежит в data. Таблицы ниже описывают содержимое data.
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.
Тело запроса
| Поле | Тип | Обязательно | Описание |
|---|---|---|---|
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[] | Да | 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 | Да | 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. |
attachments | object[] | Нет | Files attached to the map (drawings, specifications) |
attachments[].file_id | string | Нет | Uploaded file ObjectId |
attachments[].name | string | Нет | 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"
}
]
}Ответ
| Поле | Тип | Описание |
|---|---|---|
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.
Параметры пути
| Параметр | Тип | Обязательно | Описание |
|---|---|---|---|
id | string | Да | Technological-map ObjectId |
Тело запроса
Тело запроса не требуется.
Ответ
Структура ответа совпадает с 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.
Тело запроса
| Поле | Тип | Обязательно | Описание |
|---|---|---|---|
page | number | Да | По умолчанию: 1 |
limit | number | Да | По умолчанию: 20 |
search | string | Нет | Filter by name, number or code |
group_id | string | Нет | Filter by production-group ObjectId |
{
"page": 1,
"limit": 20,
"search": "string",
"group_id": "string"
}Ответ
| Поле | Тип | Описание |
|---|---|---|
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.
Параметры пути
| Параметр | Тип | Обязательно | Описание |
|---|---|---|---|
id | string | Да | Technological-map ObjectId |
Тело запроса
| Поле | Тип | Обязательно | Описание |
|---|---|---|---|
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[] | Да | 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 | Да | 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. |
attachments | object[] | Нет | Files attached to the map (drawings, specifications) |
attachments[].file_id | string | Нет | Uploaded file ObjectId |
attachments[].name | string | Нет | 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"
}
]
}Ответ
Структура ответа совпадает с POST /production-tech-map/create.
DELETE /production-tech-map/delete/{id}
Soft-delete a technological map by ObjectId.
Параметры пути
| Параметр | Тип | Обязательно | Описание |
|---|---|---|---|
id | string | Да | Technological-map ObjectId |
Тело запроса
Тело запроса не требуется.
Ответ
{
"code": 0,
"message": "Success",
"status_code": 200,
"data": "ok",
"time": "2025-05-01T12:00:00Z"
}Эта страница сгенерирована из спецификации OpenAPI.