12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- set @remark = '依拉拉';
- set @storeId = '6000536c159c0d5c6a472e02';
- #清除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 = @storeId;
- DELETE
- FROM
- t_out_store_detail
- WHERE
- store_id = @storeId;
- DELETE
- FROM
- t_in_store_form
- WHERE
- store_id = @storeId;
- DELETE
- FROM
- t_in_store_detail
- WHERE
- store_id = @storeId;
- DELETE
- FROM
- t_spare_pick_form
- WHERE
- store_id = @storeId;
- DELETE
- FROM
- t_spare_pick_form
- WHERE
- store_id = @storeId;
- # 清除仓库库存数据
- DELETE
- FROM
- t_spare_store
- WHERE
- store_id = @storeId;
- # 清除备件数据
- DELETE
- FROM
- t_spare_part_info
- WHERE
- remark = @remark
|