drop table if exists production_product_report_daily;
|
create table production_product_report_daily
|
(
|
id bigint auto_increment primary key,
|
product_main_id bigint not null comment '报工主表ID',
|
work_order_id bigint not null comment '工单ID',
|
product_process_route_item_id bigint not null comment '工艺路线项目ID',
|
user_id bigint not null comment '报工人ID',
|
report_date date not null comment '报工日期(按天统计)',
|
start_time datetime not null comment '当日开始时间',
|
end_time datetime not null comment '当日结束时间',
|
duration_minutes decimal(16,2) not null comment '当日时长(分钟)',
|
create_time datetime null comment '创建时间',
|
create_user int null comment '创建用户',
|
update_time datetime null comment '修改时间',
|
update_user int null comment '修改用户',
|
tenant_id bigint not null comment '租户ID',
|
dept_id bigint null comment '部门ID',
|
key idx_product_main_id (product_main_id),
|
key idx_work_order_user_date (work_order_id, user_id, report_date),
|
key idx_user_date (user_id, report_date)
|
) comment '生产报工-每日时长明细';
|