123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- # 注意乌干达111项目有两个仓库600ed97e159c0d0e23ad26bc和600ed9ae159c0d0e23ad26c1,
- # 注意:有两个仓库都要删除的,备件信息删除语句只能在最后一个仓库里面执行
- set @remark = '乌干达111项目';
- set @storeId = '600ed97e159c0d0e23ad26bc';
- #清除bom数据
- DELETE
- FROM
- t_sb_model_spare_bom
- WHERE
- spare_id IN ( SELECT id FROM t_spare_part_info WHERE remark = @remark );
- #清楚出入库和领用数据
- DELETE
- FROM
- t_out_store_form
- WHERE
- store_id in( @storeId);
- DELETE
- FROM
- t_out_store_detail
- WHERE
- store_id in( @storeId);
- DELETE
- FROM
- t_in_store_form
- WHERE
- store_id in( @storeId);
- DELETE
- FROM
- t_in_store_detail
- WHERE
- store_id in( @storeId);
- DELETE
- FROM
- t_spare_pick_form
- WHERE
- store_id in( @storeId);
- DELETE
- FROM
- t_spare_pick_form
- WHERE
- store_id in( @storeId);
- # 清除仓库库存数据
- DELETE
- FROM
- t_spare_store
- WHERE
- store_id in( @storeId);
- # 清除备件数据
- DELETE
- FROM
- t_spare_part_info
- WHERE
- remark = @remark
|