| ¶Ô±ÈÐÂÎļþ |
| | |
| | | # å·¥èºè·¯çº¿é¡¹ç® |
| | | drop table if exists process_route_item; |
| | | create table process_route_item |
| | | ( |
| | | id bigint auto_increment primary key, |
| | | route_id bigint not null default 0 comment 'å·¥èºè·¯çº¿id', |
| | | product_model_id bigint not null default 0 comment '产åid', |
| | | process_id bigint not null default 0 comment 'å·¥åºid', |
| | | tenant_id bigint not null comment 'ç§æ·id', |
| | | create_time datetime null comment 'å½å
¥æ¶é´', |
| | | update_time datetime null comment 'æ´æ°æ¶é´' |
| | | ); |
| | | |
| | | # ç产工èºè·¯çº¿é¡¹ç® |
| | | drop table if exists product_process_route_item; |
| | | create table product_process_route_item |
| | | ( |
| | | id bigint auto_increment primary key, |
| | | route_id bigint not null default 0 comment 'å·¥èºè·¯çº¿id', |
| | | product_model_id bigint not null default 0 comment 'éå®å°è´¦äº§åid', |
| | | process_id bigint not null default 0 comment 'å·¥åºid', |
| | | tenant_id bigint not null comment 'ç§æ·id', |
| | | create_time datetime null comment 'å½å
¥æ¶é´', |
| | | update_time datetime null comment 'æ´æ°æ¶é´' |
| | | ); |
| | | |
| | | # ç产订å |
| | | drop table if exists product_order; |
| | | create table product_order |
| | | ( |
| | | id bigint auto_increment primary key, |
| | | sales_ledger_id bigint not null default 0 comment 'éå®å°è´¦id', |
| | | product_model_id bigint not null default 0 comment 'éå®å°è´¦äº§åid', |
| | | route_id bigint not null default 0 comment 'å·¥èºè·¯çº¿id', |
| | | nps_no varchar(255) not null default '' comment 'ç产订åå·', |
| | | status int not null default 0 comment 'ç¶æ 0 å¾
确认 1 已确认', |
| | | tenant_id bigint not null comment 'ç§æ·id', |
| | | create_time datetime null comment 'å½å
¥æ¶é´', |
| | | update_time datetime null comment 'æ´æ°æ¶é´' |
| | | ); |
| | | alter table quality_inspect |
| | | add purchase_ledger_id int null comment 'éè´è®¢åid'; |
| | | |
| | | # ç产工å |
| | | drop table if exists product_work_order; |
| | | create table product_work_order |
| | | ( |
| | | id bigint auto_increment primary key, |
| | | product_process_route_item_id bigint not null default 0 comment 'å·¥èºè·¯çº¿é¡¹ç®id', |
| | | create_time datetime null comment 'å½å
¥æ¶é´', |
| | | update_time datetime null comment 'æ´æ°æ¶é´', |
| | | work_order_no varchar(255) not null default '' comment 'å·¥åç¼å·', |
| | | plan_start_time datetime null comment '计åå¼å§æ¶é´', |
| | | plan_end_time datetime null comment '计åç»ææ¶é´', |
| | | actual_start_time datetime null comment 'å®é
å¼å§æ¶é´', |
| | | actual_end_time datetime null comment 'å®é
ç»ææ¶é´', |
| | | status int not null default 0 comment 'ç¶æ 1 å¾
确认 2 å¾
ç产 3çäº§ä¸ 4å·²ç产 ', |
| | | tenant_id bigint not null comment 'ç§æ·id' |
| | | ); |
| | | |
| | | alter table product_process |
| | | add salary_quota numeric(16,3) null comment 'å·¥èµå®é¢'; |