DataItem.java
3.51 KB
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
package com.huaheng.api.wmsinfo2.domain;
import com.alibaba.fastjson.JSON;
public class DataItem {
public String code;
public String json;
public DataItem(String code) {
this.code = code;
}
public void parseJson(DataPkg pkg){
json = JSON.toJSONString(pkg);
}
public void parseJson(DataMaterial mt){
json = JSON.toJSONString(mt);
}
}
/**
说明:categories:对应物资名称; series:对应的数据项; value\": 对应的数值; \"x\":20 若总共有五条数据则x的值为100/5=20
示例:
{
"status": 200,
"data": [{
"code": "月度出入库数量",
"json": "{\"categories\":[\"样品1\",\"样品2\",\"样品3\",\"样品4\",\"样品5\"],\"series\":[{\"colorIndex\":-1,\"data\":[{\"show\":true,\"value\":71,\"x\":20},{\"show\":true,\"value\":19,\"x\":40},{\"show\":true,\"value\":3,\"x\":60},{\"show\":true,\"value\":1,\"x\":80},{\"show\":true,\"value\":1,\"x\":100}],\"name\":\"chart01\",\"show\":true}]}"
},
{
"code": "当月出入库数量",
"json": "{\"categories\":[\"样品1\",\"样品2\",\"样品3\",\"样品4\",\"样品5\"],\"series\":[{\"colorIndex\":-1,\"data\":[{\"show\":true,\"value\":49,\"x\":20},{\"show\":true,\"value\":26,\"x\":40},{\"show\":true,\"value\":3,\"x\":60},{\"show\":true,\"value\":3,\"x\":80},{\"show\":true,\"value\":3,\"x\":100}],\"name\":\"chart02\",\"show\":true}]}"
},
{
"code": "物资周转率",
"json": "{\"categories\":[\"样品1\",\"样品2\",\"样品3\",\"样品4\",\"样品5\"],\"series\":[{\"colorIndex\":-1,\"data\":[{\"show\":true,\"value\":49,\"x\":20},{\"show\":true,\"value\":26,\"x\":40},{\"show\":true,\"value\":3,\"x\":60},{\"show\":true,\"value\":3,\"x\":80},{\"show\":true,\"value\":3,\"x\":100}],\"name\":\"chart02\",\"show\":true}]}"
},
{
"code": "库容使用率",
"json": "{\"categories\":[\"穿梭车库\",\"立体库\"],\"series\":[{\"colorIndex\":-1,\"data\":[{\"show\":true,\"value\":100,\"x\":20}],\"name\":\"穿梭车库\",\"show\":true},{\"colorIndex\":-1,\"data\":[{\"show\":true,\"value\":80,\"x\":20}],\"name\":\"立体库\",\"show\":true}]}"
},
{
Code = "物资分类占比",
Json = "{\"categories\":[\"样品1\",\"样品2\",\"样品3\"],\"series\":[{\"colorIndex\":-1,\"data\":[{\"show\":true,\"value\":19,\"x\":100}],\"name\":\"样品1\",\"show\":true},{\"colorIndex\":-1,\"data\":[{\"show\":true,\"value\":29,\"x\":100}],\"name\":\"样品2\",\"show\":true},{\"colorIndex\":-1,\"data\":[{\"show\":true,\"value\":69,\"x\":100}],\"name\":\"样品3\",\"show\":true}]}"
},
{
"code": "库位情况",
"json": "{\"series\":[{\"name\":\"\",\"show\":true,\"colorIndex\":-1,\"data\":[{\"show\":true,\"value\":113.0,\"x\":100.0}]}],\"categories\":[\"库位情况\"]}"
},
{
"code": "仓库容积",
"json": "{\"series\":[{\"name\":\"\",\"show\":true,\"colorIndex\":-1,\"data\":[{\"show\":true,\"value\":113.0,\"x\":100.0}]}],\"categories\":[\"仓库容积\"]}"
},
{
"code": "总货物数量",
"json": "{\"series\":[{\"name\":\"\",\"show\":true,\"colorIndex\":-1,\"data\":[{\"show\":true,\"value\":113.0,\"x\":100.0}]}],\"categories\":[\"总货物数量\"]}"
}, {
"code": "入库总数",
"json": "{\"series\":[{\"name\":\"\",\"show\":true,\"colorIndex\":-1,\"data\":[{\"show\":true,\"value\":113.0,\"x\":100.0}]}],\"categories\":[\"入库总数\"]}"
}, {
"code": "未领数",
"json": "{\"series\":[{\"name\":\"\",\"show\":true,\"colorIndex\":-1,\"data\":[{\"show\":true,\"value\":113.0,\"x\":100.0}]}],\"categories\":[\"未领数\"]}"
}
]
}
**/