25 KiB
25 KiB
| 1 | table_name | column_name | data_type | col_comment |
|---|---|---|---|---|
| 2 | agv_tasks | id | bigint | |
| 3 | agv_tasks | task_no | character varying | 我方任务号(内部) |
| 4 | agv_tasks | hik_task_code | character varying | RCS-Lite 任务单号(即我方 task_no,下发时透传 taskCode) |
| 5 | agv_tasks | source_dock | character varying | 起点接驳台(常为 DOCK21 库房) |
| 6 | agv_tasks | target_dock | character varying | 终点接驳台 DOCK01..20 |
| 7 | agv_tasks | materials_json | character varying | 物料清单 JSON |
| 8 | agv_tasks | related_request_no | character varying | 关联叫料单号(MES material_request.requestNo) |
| 9 | agv_tasks | related_outbound_no | character varying | 关联出库单号(可选, WMS 回传) |
| 10 | agv_tasks | status | character varying | PENDING/FAILED/1已创建/2执行中/5已取消/9已结束 |
| 11 | agv_tasks | operator | character varying | 下发人 |
| 12 | agv_tasks | dispatched_at | bigint | 下发时间 unix秒 |
| 13 | agv_tasks | arrived_at | bigint | 到位时间 unix秒 |
| 14 | agv_tasks | remark | character varying | 备注/失败原因 |
| 15 | agv_tasks | created_at | bigint | 创建时间 |
| 16 | alert | id | bigint | |
| 17 | alert | rule_id | bigint | 关联规则ID,0=手动触发 |
| 18 | alert | type | character varying | 预警类型 |
| 19 | alert | level | character varying | 级别:信息/警告/严重(空=历史数据未分级) |
| 20 | alert | target | character varying | 目标对象(工位/库房/SN 等) |
| 21 | alert | title | character varying(255) | 标题 |
| 22 | alert | content | character varying | 内容 |
| 23 | alert | ref_type | character varying | 关联业务类型 |
| 24 | alert | ref_id | character varying | 关联业务ID |
| 25 | alert | order_no | character varying | 关联工单号(按工单号查询用) |
| 26 | alert | status | character varying | UNREAD/READ |
| 27 | alert | receiver | character varying | 接收人 |
| 28 | alert | resolved_at | timestamp with time zone | 处置时间(resolve 时写入,未处置为空) |
| 29 | alert | resolved_by | character varying | 处置人(resolve 时写入) |
| 30 | alert | created_at | timestamp with time zone | |
| 31 | alert_rule | id | bigint | |
| 32 | alert_rule | name | character varying | 规则名称 |
| 33 | alert_rule | type | character varying | 预警类型 torque_ng/inspection_ng/inventory_low/task_overdue |
| 34 | alert_rule | threshold | double precision | 阈值(不同类含义不同) |
| 35 | alert_rule | enabled | boolean | 是否启用 |
| 36 | alert_rule | notify_channels | character varying | 通知渠道(BOM 即物料清单无关;本字段为预警通知方式占位,逗号分隔,空=仅预警中心收件箱) |
| 37 | alert_rule | created_by | character varying | 创建人 |
| 38 | alert_rule | created_at | timestamp with time zone | |
| 39 | association_trace | id | bigint | |
| 40 | association_trace | finished_sn | character varying | 成品SN(主件) |
| 41 | association_trace | order_no | character varying | |
| 42 | association_trace | process_code | character varying | 成品的工序组合 |
| 43 | association_trace | batch_items | jsonb | 结构件批次号列表 |
| 44 | association_trace | serial_items | jsonb | 电气件SN码列表 |
| 45 | association_trace | operator | character varying | 完工关联登记人 |
| 46 | association_trace | created_at | timestamp with time zone | |
| 47 | attachment | id | bigint | |
| 48 | attachment | biz_type | character varying | 业务类型 work_order/material/process_flow/inspection |
| 49 | attachment | biz_id | character varying | 业务ID |
| 50 | attachment | file_name | character varying | 原始文件名 |
| 51 | attachment | file_path | character varying | 上传目录相对路径 |
| 52 | attachment | file_size | bigint | 字节数 |
| 53 | attachment | uploader | character varying | 上传人 |
| 54 | attachment | created_at | timestamp with time zone | |
| 55 | attachment | file_type | character varying | 文件类型 大写枚举 PROCESS_PDF/INSPECTION_PHOTO/... |
| 56 | attachment | file_ext | character varying | 扩展名(小写,不含点) |
| 57 | attachment | file_md5 | character varying | 文件MD5(秒传/去重) |
| 58 | attachment | mime_type | character varying | MIME类型 |
| 59 | attachment | archived | boolean | 是否已归档 |
| 60 | attachment | archived_at | bigint | 归档时间(unix秒) |
| 61 | attachment | deleted | boolean | 逻辑删除 |
| 62 | attachment | deleted_at | bigint | 删除时间(unix秒) |
| 63 | attachment | deleted_by | character varying | 删除人 |
| 64 | call_pool | id | bigint | |
| 65 | call_pool | station_no | bigint | 工位号 |
| 66 | call_pool | material_code | character varying | 物料编码(图号) |
| 67 | call_pool | material_name | character varying | |
| 68 | call_pool | unit | character varying | |
| 69 | call_pool | sn_mode | bigint | |
| 70 | call_pool | req_qty | bigint | 需求量(启用排产派生,逐行向上取整后合计) |
| 71 | call_pool | adj_qty | bigint | 人工调整量(可正可负;改动留痕 event_log) |
| 72 | call_pool | sent_qty | bigint | 已发净额(完成备料实发累加;退库收回扣减回补) |
| 73 | call_pool | reserved_qty | bigint | 占用中(待备料叫料单请求量合计) |
| 74 | call_pool | cross_day | boolean | 是否含非今日排产(跨日叫料预警/仓库驳回异常标记) |
| 75 | call_pool | plan_dates | character varying | 派生快照:贡献需求的排产日期(逗号分隔,可空) |
| 76 | call_pool | created_at | timestamp with time zone | |
| 77 | call_pool | updated_at | timestamp with time zone | |
| 78 | daily_plan | id | bigint | |
| 79 | daily_plan | order_no | character varying | 工单号 |
| 80 | daily_plan | plan_date | character varying | 排产日期 yyyy-MM-dd |
| 81 | daily_plan | plan_qty | bigint | 计划数量 |
| 82 | daily_plan | completed_qty | bigint | 已完成数量 |
| 83 | daily_plan | station_plan_qty | jsonb | 各工位产量分配 stationNo→计划产量 |
| 84 | daily_plan | status | character varying | |
| 85 | daily_plan | operator | character varying | |
| 86 | daily_plan | created_at | timestamp with time zone | |
| 87 | daily_plan | updated_at | timestamp with time zone | |
| 88 | dock | id | bigint | |
| 89 | dock | dock_code | character varying | 接驳台编码 DOCK01..21 |
| 90 | dock | name | character varying | 接驳台名称 |
| 91 | dock | dock_type | character varying | 类型 line产线/store库房/other其他 |
| 92 | dock | station_no | bigint | 关联工位号(与工位1:1,非产线为0) |
| 93 | dock | has_pallet | boolean | 当前是否有托盘 |
| 94 | dock | pallet_ref | character varying | 托盘关联(出库单号/备料单号) |
| 95 | dock | status | character varying | |
| 96 | dock | created_at | timestamp with time zone | |
| 97 | event_log | id | bigint | |
| 98 | event_log | event_type | character varying | 事件类型,如 work.order.create |
| 99 | event_log | work_order_no | character varying | 关联工单号 |
| 100 | event_log | operator | character varying | 操作人 |
| 101 | event_log | entity_type | character varying | 实体类型 |
| 102 | event_log | entity_id | character varying | 实体标识 |
| 103 | event_log | description | text | 描述 |
| 104 | event_log | payload | jsonb | 载荷 |
| 105 | event_log | created_at | timestamp with time zone | 创建时间 |
| 106 | flow_material | id | bigint | |
| 107 | flow_material | flow_id | bigint | 所属工艺ID |
| 108 | flow_material | material_code | character varying | 物料编码 |
| 109 | flow_material | material_name | character varying | |
| 110 | flow_material | spec | character varying | |
| 111 | flow_material | unit | character varying | |
| 112 | flow_material | sn_mode | bigint | |
| 113 | flow_material | unit_qty | double precision | 单台用量 |
| 114 | flow_material | loss_rate | double precision | 损耗率% |
| 115 | flow_material | created_at | timestamp with time zone | |
| 116 | inspection_record | id | bigint | |
| 117 | inspection_record | category | character varying | 记录类型 CHECKIN/POINT/PROCESS/DONE/ALARM/INCOMING/FINAL/QC_PROCESS |
| 118 | inspection_record | station_no | character varying | 工位号 |
| 119 | inspection_record | shift | character varying | 班次 早/中/晚 |
| 120 | inspection_record | order_no | character varying | 工单号 |
| 121 | inspection_record | sn | character varying | 工件SN |
| 122 | inspection_record | result | character varying | 结论 |
| 123 | inspection_record | items | jsonb | 点检项/异常类型列表 |
| 124 | inspection_record | photo | character varying | 拍照文件名 |
| 125 | inspection_record | remark | character varying | 文字描述/签字 |
| 126 | inspection_record | operator | character varying | 操作人 |
| 127 | inspection_record | process_code | bigint | 所属工位号(过程巡检所在工位) |
| 128 | inspection_record | step_id | bigint | 工艺步骤ID(过程巡检逐条关联) |
| 129 | inspection_record | step_name | character varying | 工艺步骤名称 |
| 130 | inspection_record | measured_value | character varying | 实测值(过程巡检录入) |
| 131 | inspection_record | report_no | character varying | 报检单号 |
| 132 | inspection_record | material_code | character varying | 物料编码(图号) |
| 133 | inspection_record | material_name | character varying | 物料名称 |
| 134 | inspection_record | manufacturer | character varying | 生产厂家 |
| 135 | inspection_record | inspection_no | character varying | 检验单号 |
| 136 | inspection_record | attachment_ids | character varying | 附件ID,逗号分隔(关联 attachment 表) |
| 137 | inspection_record | disposal_type | character varying | 处置类型 退货/返修/退换/报废 |
| 138 | inspection_record | disposal_remark | character varying | 处置说明 |
| 139 | inspection_record | batch_sn | character varying | 批次号/SN(联动 WMS 在库处置:序列号=是=SN 序列号=否=批次) |
| 140 | inspection_record | related_standard | character varying | 相关标准/试验方案号(完工检用,随成品回流 WMS) |
| 141 | inspection_record | test_record_no | character varying | 试验记录单号(完工检用,随成品回流 WMS) |
| 142 | inspection_record | created_at | timestamp with time zone | |
| 143 | line_point | id | bigint | |
| 144 | line_point | point_type | character varying | FEED上料位/STATION工位/CACHE缓存位/DOCK接驳台/END末端 |
| 145 | line_point | point_no | character varying | 点位编号:IN上料位 / 1~10工位 / C1~C8缓存位 / 1-R1接驳台 / END-U上排末端 / END-D下排末端 |
| 146 | line_point | label | character varying | 点位名称 |
| 147 | line_point | seq | bigint | 传送带顺序(上料位→工位→末端,用于相邻缓存位判定) |
| 148 | line_point | station_no | bigint | 所属工位号(DOCK/CACHE 归属;0=无) |
| 149 | line_point | current_sn | character varying | 当前存放工件SN(空=空闲) |
| 150 | line_point | order_no | character varying | 当前工件所属工单号 |
| 151 | line_point | occupied | boolean | 是否占用 |
| 152 | line_point | updated_at | timestamp with time zone | |
| 153 | material_qty_report | id | bigint | |
| 154 | material_qty_report | station_no | bigint | 工位号 |
| 155 | material_qty_report | order_no | character varying | 工单号 |
| 156 | material_qty_report | sn | character varying | 工件SN |
| 157 | material_qty_report | material_code | character varying | 物料编码 |
| 158 | material_qty_report | material_name | character varying | 物料名称 |
| 159 | material_qty_report | plan_qty | bigint | 应发数量 |
| 160 | material_qty_report | actual_qty | bigint | 实收数量 |
| 161 | material_qty_report | diff_qty | bigint | 差异=应发-实收 |
| 162 | material_qty_report | cause | character varying | 差异原因 |
| 163 | material_qty_report | status | character varying | PENDING/PROCESSING/REPLENISHED/RETURNED/ADJUSTED/CLOSED |
| 164 | material_qty_report | handle_type | character varying | 处理方式 REPLENISH补发/RETURN退库/ADJUST调整 |
| 165 | material_qty_report | handle_doc_no | character varying | 处理生成的单据号(补料单号/退库单号) |
| 166 | material_qty_report | handle_note | character varying | 处理说明 |
| 167 | material_qty_report | handled_by | character varying | 处理人 |
| 168 | material_qty_report | handled_at | bigint | 处理时间(unix 秒) |
| 169 | material_qty_report | operator | character varying | 上报人 |
| 170 | material_qty_report | created_at | timestamp with time zone | |
| 171 | material_qty_report | resolved_at | timestamp with time zone | |
| 172 | material_request | id | bigint | |
| 173 | material_request | request_no | character varying | 叫料单号 |
| 174 | material_request | material_code | character varying | 物料编码 |
| 175 | material_request | material_name | character varying | |
| 176 | material_request | unit | character varying | |
| 177 | material_request | sn_mode | bigint | |
| 178 | material_request | req_qty | double precision | 请求量(发起时占用叫料池可用量) |
| 179 | material_request | status | character varying | |
| 180 | material_request | target_dock | character varying | 目标接驳台(GxR1/GxR2,一单一个托盘) |
| 181 | material_request | station_no | bigint | 目标工位号 |
| 182 | material_request | sent_qty | double precision | 实发量(仓库完成备料时确定,禁单内分批) |
| 183 | material_request | returned_qty | double precision | 退库量(整单退;仓库确认收回后叫料池额度回补) |
| 184 | material_request | source | character varying | 来源 CALL/REFILL |
| 185 | material_request | ref_report_no | character varying | 关联数量不符单号 |
| 186 | material_request | need_agv | boolean | 是否需要AGV配送到接驳台 |
| 187 | material_request | agv_task_no | character varying | AGV 任务号(派车成功后回写) |
| 188 | material_request | cross_day | boolean | 跨日标记:叫料池行含非今日排产(工位预警+仓库可驳回异常) |
| 189 | material_request | outbound_no | character varying | WMS 出库单号(完成备料回写,多个逗号分隔) |
| 190 | material_request | reject_reason | character varying | 驳回理由(仓库拒发时必填) |
| 191 | material_request | operator | character varying | |
| 192 | material_request | created_at | timestamp with time zone | |
| 193 | material_request | updated_at | timestamp with time zone | |
| 194 | materials | id | bigint | |
| 195 | materials | code | character varying | 物料编码(图号),两库同步唯一业务键 |
| 196 | materials | name | character varying | 物料名称 |
| 197 | materials | spec | character varying | 规格型号 |
| 198 | materials | unit | character varying | 计量单位 |
| 199 | materials | description | character varying | 说明 |
| 200 | materials | item_type | bigint | 物料类别 1原材料/3成品(半成品不是物料类别,「其他」已移除) |
| 201 | materials | manage_mode | bigint | 类型 1结构件/2电气件/3其他(仅分类,不决定SN行为) |
| 202 | materials | sn_mode | bigint | 是否逐件SN管理 0未选择(必填)/1序列号=是(录SN)/2序列号=否(不录SN) |
| 203 | materials | template_code | character varying | 模板编码 |
| 204 | materials | safety_stock | bigint | 安全库存(低于触发缺货预警) |
| 205 | materials | is_active | boolean | 启用/停用(两库均不物理删除) |
| 206 | materials | sync_pending | boolean | 推送WMS失败标记,列表请求时异步重推 |
| 207 | materials | created_at | timestamp with time zone | |
| 208 | materials | updated_at | timestamp with time zone | |
| 209 | permission | id | bigint | |
| 210 | permission | code | character varying | 权限编码 |
| 211 | permission | name | character varying | 名称 |
| 212 | permission | type | character varying | |
| 213 | permission | parent_code | character varying | 所属菜单权限码(按钮必填) |
| 214 | permission | path | character varying | 前端路由 |
| 215 | permission | icon | character varying | |
| 216 | permission | sort | bigint | |
| 217 | permission | remark | character varying | |
| 218 | permission | created_at | timestamp with time zone | |
| 219 | plc_send_log | id | bigint | |
| 220 | plc_send_log | order_no | character varying | 工单号 |
| 221 | plc_send_log | sn | character varying | 工件SN |
| 222 | plc_send_log | station_no | bigint | 工位号 |
| 223 | plc_send_log | process_combination | character varying | 工序组合,如 135 |
| 224 | plc_send_log | process_codes | jsonb | 工序码表 |
| 225 | plc_send_log | status | character varying | |
| 226 | plc_send_log | send_time | timestamp with time zone | 下发时间 |
| 227 | plc_send_log | done_time | timestamp with time zone | 收到完成信号时间 |
| 228 | plc_send_log | ack | boolean | 是否收到完成信号 |
| 229 | plc_send_log | remark | character varying | |
| 230 | plc_send_log | operator | character varying | |
| 231 | plc_send_log | created_at | timestamp with time zone | |
| 232 | process_flow | id | bigint | |
| 233 | process_flow | name | character varying | 流程名称,如 3号工位装配流程 |
| 234 | process_flow | pdf_file | character varying | 工艺图纸文件名 |
| 235 | process_flow | status | character varying | |
| 236 | process_flow | remark | character varying | |
| 237 | process_flow | created_at | timestamp with time zone | |
| 238 | process_flow | updated_at | timestamp with time zone | |
| 239 | process_step | id | bigint | |
| 240 | process_step | flow_id | bigint | 所属工艺流程图ID |
| 241 | process_step | seq | bigint | 步骤序号 |
| 242 | process_step | name | character varying | 步骤名称 |
| 243 | process_step | collect_type | character varying | 采集方式 AUTO(拧紧枪自动)/MANUAL(手填)/SCAN(扫码,与手填等价采一串字符串)/NONE(仅记录) |
| 244 | process_step | need_check | boolean | 是否需要检测确认(报工前须检验通过) |
| 245 | process_step | need_operator_sign | boolean | 是否需要操作工签字(报工前须签字确认) |
| 246 | process_step | need_inspector_sign | boolean | 是否需要检验员签字(审核通过并签字后放行) |
| 247 | process_step | need_audit | boolean | 是否需要审核人复核签字(审核通过后放行) |
| 248 | process_step | audit_role | character varying | 审核角色(如班组长/工艺员),具该角色的人员可签 |
| 249 | process_step | attachment | jsonb | 本步骤图纸/附件列表 [{name,url}] |
| 250 | process_step | remark | character varying | |
| 251 | process_step | created_at | timestamp with time zone | |
| 252 | product_process | id | bigint | |
| 253 | product_process | product_code | character varying | 产品编码(WMS 物料档案 item_type=3 图号) |
| 254 | product_process | product_name | character varying | 产品名称(快照,WMS 改名不回写) |
| 255 | product_process | name | character varying | 产品工艺名称,如 DX100常规 |
| 256 | product_process | status | character varying | |
| 257 | product_process | remark | character varying | |
| 258 | product_process | created_at | timestamp with time zone | |
| 259 | product_process_item | id | bigint | |
| 260 | product_process_item | product_process_id | bigint | 所属产品工艺ID |
| 261 | product_process_item | seq | bigint | 顺序号(从1严格递增,即执行顺序) |
| 262 | product_process_item | flow_id | bigint | 工艺ID(process_flow) |
| 263 | product_process_item | created_at | timestamp with time zone | |
| 264 | role | id | bigint | |
| 265 | role | name | character varying | 角色名称 |
| 266 | role | code | character varying | 角色编码 |
| 267 | role | remark | character varying | |
| 268 | role | permission_codes | jsonb | 权限编码列表,如 produce.workorder:view |
| 269 | role | created_at | timestamp with time zone | |
| 270 | semi_flow | id | bigint | |
| 271 | semi_flow | sn | character varying | 工件SN |
| 272 | semi_flow | order_no | character varying | |
| 273 | semi_flow | done_process_codes | jsonb | 已完成工序码(已废除,历史数据保留) |
| 274 | semi_flow | completed_text | character varying | 完成至工位快照(如:已完成至工位3;空=尚未报工) |
| 275 | semi_flow | action | character varying | |
| 276 | semi_flow | target_dock | character varying | |
| 277 | semi_flow | operator | character varying | |
| 278 | semi_flow | created_at | timestamp with time zone | |
| 279 | station | id | bigint | |
| 280 | station | station_no | bigint | 工位号 1..12 |
| 281 | station | name | character varying | 工位名称 |
| 282 | station | flow_id | bigint | 绑定工艺流程图ID |
| 283 | station | station_type | character varying | 工位类型 LINE/OFFLINE |
| 284 | station | status | character varying | |
| 285 | station | is_builtin | boolean | 内置工位:不可改类型/不可删除 |
| 286 | station | visible_tabs | jsonb | |
| 287 | station | created_at | timestamp with time zone | |
| 288 | station_state | id | bigint | |
| 289 | station_state | station_no | bigint | 工位号 |
| 290 | station_state | date | character varying | 生效日期 yyyy-MM-dd(只认当天) |
| 291 | station_state | paused | boolean | 是否停止接单 |
| 292 | station_state | reason | character varying | 停单原因(缺料/故障/其他) |
| 293 | station_state | operator | character varying | 操作人 |
| 294 | station_state | created_at | timestamp with time zone | |
| 295 | station_state | updated_at | timestamp with time zone | |
| 296 | step_criterion | id | bigint | |
| 297 | step_criterion | step_id | bigint | 步骤ID |
| 298 | step_criterion | name | character varying | 指标名,如 扭矩/角度 |
| 299 | step_criterion | unit | character varying | |
| 300 | step_criterion | logic | character varying | |
| 301 | step_criterion | target | double precision | 目标值 |
| 302 | step_criterion | min | double precision | 范围下限 |
| 303 | step_criterion | max | double precision | 范围上限 |
| 304 | step_criterion | created_at | timestamp with time zone | |
| 305 | step_data | id | bigint | |
| 306 | step_data | sn | character varying | 工件SN |
| 307 | step_data | process_id | bigint | 工件工序实绩ID |
| 308 | step_data | step_id | bigint | 步骤ID |
| 309 | step_data | step_name | character varying | |
| 310 | step_data | criterion_id | bigint | 考核标准ID |
| 311 | step_data | criterion_name | character varying | |
| 312 | step_data | criterion_logic | character varying | |
| 313 | step_data | value | double precision | 实际测量值 |
| 314 | step_data | value_text | character varying | 文本值(OK/NG/钢印号) |
| 315 | step_data | is_ok | boolean | 是否合格(可人工修正) |
| 316 | step_data | operator | character varying | |
| 317 | step_data | created_at | timestamp with time zone | |
| 318 | step_sign_record | id | bigint | |
| 319 | step_sign_record | sn | character varying | 工件SN |
| 320 | step_sign_record | order_no | character varying | 工单号 |
| 321 | step_sign_record | flow_id | bigint | 工艺流程ID |
| 322 | step_sign_record | station_no | character varying | 工位号 |
| 323 | step_sign_record | step_id | bigint | 工艺步骤ID |
| 324 | step_sign_record | step_name | character varying | 步骤名称 |
| 325 | step_sign_record | sign_role | character varying | 签字角色 OPERATOR/INSPECTOR |
| 326 | step_sign_record | result | character varying | 签字时点的结论 OK/NG |
| 327 | step_sign_record | signed_by | character varying | 签字人(登录账号) |
| 328 | step_sign_record | signed_at | timestamp with time zone | 签字时间 |
| 329 | step_sign_record | round | bigint | 返修重做轮次(1=首做) |
| 330 | step_sign_record | source | character varying | 签字来源 station/inspect/migrate |
| 331 | step_sign_record | remark | character varying | 签字备注(签字弹框选填) |
| 332 | step_sign_record | revoked | boolean | 是否已撤销 |
| 333 | step_sign_record | revoked_by | character varying | 撤销人 |
| 334 | step_sign_record | revoked_at | timestamp with time zone | 撤销时间 |
| 335 | step_sign_record | revoke_reason | character varying | 撤销原因 |
| 336 | step_sign_record | created_at | timestamp with time zone | |
| 337 | sys_config | id | bigint | |
| 338 | sys_config | key | character varying | 配置键,如 wms.base_url |
| 339 | sys_config | value | character varying | 配置值 |
| 340 | sys_config | remark | character varying | 说明 |
| 341 | torque_record | id | bigint | |
| 342 | torque_record | work_order_no | character varying | workOrder 工单号 |
| 343 | torque_record | sn | character varying | 工件SN |
| 344 | torque_record | screw_no | character varying | 螺丝编号 S1..Sn |
| 345 | torque_record | strain | double precision | 扭矩 Nm |
| 346 | torque_record | torque | double precision | 扭矩别名,与 strain 一致 |
| 347 | torque_record | angle | double precision | 角度 ° |
| 348 | torque_record | result | character varying | |
| 349 | torque_record | operator | character varying | 操作人 |
| 350 | torque_record | operator_id | bigint | 操作人用户ID(0=未采集:虚拟工位/PLC路径或历史数据) |
| 351 | torque_record | station_no | character varying | 工位 |
| 352 | torque_record | time | timestamp with time zone | 采集时间 |
| 353 | torque_record | created_at | timestamp with time zone | |
| 354 | user | id | bigint | |
| 355 | user | username | character varying | 登录名 |
| 356 | user | password | character varying | bcrypt 密码 |
| 357 | user | name | character varying | 姓名/显示名 |
| 358 | user | role_id | bigint | 角色ID |
| 359 | user | can_login_workstation | boolean | 是否允许登录工位终端 |
| 360 | user | workstation_password | character varying | 工位终端密码(bcrypt) |
| 361 | user | status | character varying | |
| 362 | user | last_login_at | bigint | 最近登录时间(unix秒,后台登录更新;工位终端登录不计) |
| 363 | user | created_at | timestamp with time zone | |
| 364 | user | updated_at | timestamp with time zone | |
| 365 | user_station | id | bigint | |
| 366 | user_station | user_id | bigint | 用户ID |
| 367 | user_station | station_no | bigint | 工位号 1..12 |
| 368 | user_station | created_at | timestamp with time zone | |
| 369 | work_order | id | bigint | |
| 370 | work_order | work_order_no | character varying | 工单号 |
| 371 | work_order | product_type_id | bigint | 产品类型ID |
| 372 | work_order | product_code | character varying | 产品编码 |
| 373 | work_order | product_name | character varying | |
| 374 | work_order | quantity | bigint | 工件数量 |
| 375 | work_order | finished_num | bigint | 完成数量 |
| 376 | work_order | fail_num | bigint | NG数量 |
| 377 | work_order | contract_no | character varying | 归属编号(合同号或科技项目号,随归属类型二选一) |
| 378 | work_order | ownership_type | character varying | 归属类型:workorder=合同号/project=科技项目号/other=其他 |
| 379 | work_order | project_no | character varying | 工程编号(已废弃,保留防历史数据迁移) |
| 380 | work_order | product_serial | character varying | 产品序号(工单内每台产品的序号) |
| 381 | work_order | created_by | character varying | 创建人 |
| 382 | work_order | flow_combination | jsonb | 工艺组合 [{flowId,stationNo}] 按工位号升序 |
| 383 | work_order | product_process_id | bigint | 来源产品工艺ID(0=无来源) |
| 384 | work_order | status | character varying | |
| 385 | work_order | plan_start | timestamp with time zone | 计划开始 |
| 386 | work_order | plan_end | timestamp with time zone | 计划结束 |
| 387 | work_order | context | jsonb | 扩展字段 |
| 388 | work_order | completed_at | timestamp with time zone | |
| 389 | work_order | created_at | timestamp with time zone | |
| 390 | work_order | updated_at | timestamp with time zone | |
| 391 | workpiece | id | bigint | |
| 392 | workpiece | sn | character varying | 工件唯一SN |
| 393 | workpiece | order_no | character varying | 所属工单 |
| 394 | workpiece | work_order_id | bigint | 工单ID |
| 395 | workpiece | current_station_no | bigint | 业务位置:最后完成报工的工位号(0=未报任何工艺;下一道=工艺组合中工位号更大的下一条) |
| 396 | workpiece | at_station_no | bigint | 物理位置:工件当前实际所在工位号(0=未在工位;建档/到达即写,完工/入库清空) |
| 397 | workpiece | status | character varying | |
| 398 | workpiece | online_at | timestamp with time zone | 进线时间 |
| 399 | workpiece | done_at | timestamp with time zone | 完工时间 |
| 400 | workpiece | created_at | timestamp with time zone | |
| 401 | workpiece | updated_at | timestamp with time zone | |
| 402 | workpiece | torque_ng_pending | boolean | 拧紧扭矩不合格待人工处置标记 |
| 403 | workpiece | torque_ng_at | timestamp with time zone | 拧紧不合格标记时间 |
| 404 | workpiece | torque_ng_by | character varying | 拧紧不合格标记操作人 |
| 405 | workpiece_bind | id | bigint | |
| 406 | workpiece_bind | sn | character varying | 工件SN |
| 407 | workpiece_bind | order_no | character varying | 工单号 |
| 408 | workpiece_bind | flow_id | bigint | 装配工艺ID |
| 409 | workpiece_bind | station_no | character varying | 绑定工位 |
| 410 | workpiece_bind | material_code | character varying | 物料编码 |
| 411 | workpiece_bind | material_name | character varying | 物料名称 |
| 412 | workpiece_bind | spec | character varying | 规格 |
| 413 | workpiece_bind | unit | character varying | 单位 |
| 414 | workpiece_bind | sn_mode | bigint | |
| 415 | workpiece_bind | bind_value | character varying | 绑定值:批次号 或 SN |
| 416 | workpiece_bind | bind_type | character varying | |
| 417 | workpiece_bind | operator | character varying | 操作人 |
| 418 | workpiece_bind | created_at | timestamp with time zone | 绑定时间 |
| 419 | workpiece_lifecycle_log | id | bigint | |
| 420 | workpiece_lifecycle_log | sn | character varying | 工件SN |
| 421 | workpiece_lifecycle_log | work_order_no | character varying | 所属工单 |
| 422 | workpiece_lifecycle_log | action | character varying | 状态动作:NEW/ONLINE/REPORT/SEMI_IN/SEMI_OUT/DONE/SCRAPPED |
| 423 | workpiece_lifecycle_log | from_status | character varying | 变更前状态 |
| 424 | workpiece_lifecycle_log | to_status | character varying | 变更后状态 |
| 425 | workpiece_lifecycle_log | station_no | bigint | 关联工位号 |
| 426 | workpiece_lifecycle_log | flow_seq | bigint | 工艺序号(工序顺序) |
| 427 | workpiece_lifecycle_log | operator | character varying | 操作人 |
| 428 | workpiece_lifecycle_log | source | character varying | 来源:workstation/mes/admin/reconcile |
| 429 | workpiece_lifecycle_log | remark | character varying | 备注 |
| 430 | workpiece_lifecycle_log | created_at | timestamp with time zone | |
| 431 | workpiece_process | id | bigint | |
| 432 | workpiece_process | sn | character varying | 工件SN |
| 433 | workpiece_process | flow_id | bigint | 完成的工艺ID |
| 434 | workpiece_process | station_no | character varying | 工位号 |
| 435 | workpiece_process | order_no | character varying | |
| 436 | workpiece_process | process_name | character varying | |
| 437 | workpiece_process | status | character varying | |
| 438 | workpiece_process | operator | character varying | |
| 439 | workpiece_process | operator_id | bigint | 操作人用户ID(0=未采集:虚拟工位/PLC路径或历史数据) |
| 440 | workpiece_process | result | character varying | 总判定 OK/NG |
| 441 | workpiece_process | started_at | timestamp with time zone | |
| 442 | workpiece_process | ended_at | timestamp with time zone | |
| 443 | workpiece_process | duration_sec | bigint | 作业时长(秒)=endedAt-startedAt |
| 444 | workpiece_process | remark | character varying | |
| 445 | workpiece_process | created_at | timestamp with time zone |