-
Notifications
You must be signed in to change notification settings - Fork 2
/
Count_order.h
53 lines (49 loc) · 1.26 KB
/
Count_order.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
/*
用于统计
*/
#ifndef _COUNT_ORDER_H_
#define _COUNT_ORDER_H_
#include<iostream>
#include<string>
#include<new>
#include<fstream>
#include"destination_graph.h"
#include"order_linkqueue.h"
#include"set_sqlist.h"
#include"Count_order.h"
#include"OrderCountList.h"
#define OK 1
#define ERROR 0
using namespace std;
typedef int Status;
typedef struct CountSElem{
//用来统计套餐
char mark1;//编号1
int mark2;//编号2
int delivetotal;//已派送总数
int undelivetotal;//未派送总数
int canceltotal;//已取消总数
float totalprice;//总金额
}CountSElem;
typedef struct CountSList{
CountSElem * elem;
int length;
}CountSList;
typedef struct CountDElem{
string destination;
int cnt;
}CountDElem;
typedef struct CountDList{
CountDElem * elem;
int sumd;//地点总数
int length;
}CountDList;
bool CmpS(CountSElem a, CountSElem b);//
Status InitCountSList(CountSList &L, int n);//初始化
Status InitCountDList(CountDList &D, int n);
Status CountSet(string start, string end, OrderCountList C, SetList S, Order_LinkQueue Q);//进行统计
void Destination_Count(Order_LinkQueue Q, OrderCountList C, DestinationGraph G);//地点统计
void HeapAdjust(CountSList &L, int s, int m);//
void Heap_Sort_S(CountSList &L);//
void CreateHeap(CountSList &L);//
#endif