|
@@ -34,7 +34,7 @@ public class AssetServiceImpl implements AssetService {
|
|
ThreadLocalRandom random = ThreadLocalRandom.current();
|
|
ThreadLocalRandom random = ThreadLocalRandom.current();
|
|
//List<Label> labels1 = GeneralMethod.getInstance().dataGeneration(param, labKey);
|
|
//List<Label> labels1 = GeneralMethod.getInstance().dataGeneration(param, labKey);
|
|
List<Label> list = new ArrayList<>();
|
|
List<Label> list = new ArrayList<>();
|
|
- for (int i = 0; i < labKey.length; i++) {
|
|
|
|
|
|
+ /* for (int i = 0; i < labKey.length; i++) {
|
|
Label label = new Label();
|
|
Label label = new Label();
|
|
JSONObject jsonObject = new JSONObject();
|
|
JSONObject jsonObject = new JSONObject();
|
|
int i1 = random.nextInt(500, 620);
|
|
int i1 = random.nextInt(500, 620);
|
|
@@ -50,7 +50,54 @@ public class AssetServiceImpl implements AssetService {
|
|
label.setJsonObject(jsonObject);
|
|
label.setJsonObject(jsonObject);
|
|
label.setLabel(labKey[i]);
|
|
label.setLabel(labKey[i]);
|
|
list.add(label);
|
|
list.add(label);
|
|
- }
|
|
|
|
|
|
+ }*/
|
|
|
|
+
|
|
|
|
+ Label label = new Label();
|
|
|
|
+ JSONObject jsonObject = new JSONObject();
|
|
|
|
+ jsonObject.put(param[0],767);
|
|
|
|
+ jsonObject.put(param[1],300);
|
|
|
|
+ jsonObject.put(param[2],489);
|
|
|
|
+ jsonObject.put(param[3],612);
|
|
|
|
+ jsonObject.put(param[4],54);
|
|
|
|
+ label.setJsonObject(jsonObject);
|
|
|
|
+ label.setLabel(labKey[0]);
|
|
|
|
+ list.add(label);
|
|
|
|
+
|
|
|
|
+ Label label1 = new Label();
|
|
|
|
+ JSONObject jsonObject1 = new JSONObject();
|
|
|
|
+
|
|
|
|
+ jsonObject1.put(param[0],398);
|
|
|
|
+ jsonObject1.put(param[1],621);
|
|
|
|
+ jsonObject1.put(param[2],489);
|
|
|
|
+ jsonObject1.put(param[3],730);
|
|
|
|
+ jsonObject1.put(param[4],63);
|
|
|
|
+ label1.setJsonObject(jsonObject);
|
|
|
|
+ label1.setLabel(labKey[1]);
|
|
|
|
+ list.add(label1);
|
|
|
|
+
|
|
|
|
+ Label label2 = new Label();
|
|
|
|
+ JSONObject jsonObject2 = new JSONObject();
|
|
|
|
+
|
|
|
|
+ jsonObject2.put(param[0],498);
|
|
|
|
+ jsonObject2.put(param[1],439);
|
|
|
|
+ jsonObject2.put(param[2],500);
|
|
|
|
+ jsonObject2.put(param[3],300);
|
|
|
|
+ jsonObject2.put(param[4],40);
|
|
|
|
+ label2.setJsonObject(jsonObject2);
|
|
|
|
+ label2.setLabel(labKey[2]);
|
|
|
|
+ list.add(label2);
|
|
|
|
+
|
|
|
|
+ Label label3 = new Label();
|
|
|
|
+ JSONObject jsonObject3 = new JSONObject();
|
|
|
|
+
|
|
|
|
+ jsonObject3.put(param[0],550);
|
|
|
|
+ jsonObject3.put(param[1],480);
|
|
|
|
+ jsonObject3.put(param[2],620);
|
|
|
|
+ jsonObject3.put(param[3],600);
|
|
|
|
+ jsonObject3.put(param[4],70);
|
|
|
|
+ label3.setJsonObject(jsonObject3);
|
|
|
|
+ label3.setLabel(labKey[3]);
|
|
|
|
+ list.add(label3);
|
|
return ReturnMsg.ok(list);
|
|
return ReturnMsg.ok(list);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -60,17 +107,43 @@ public class AssetServiceImpl implements AssetService {
|
|
String[] labKey = {"资产1","资产2","资产3","资产4","资产5","资产6"};
|
|
String[] labKey = {"资产1","资产2","资产3","资产4","资产5","资产6"};
|
|
ThreadLocalRandom random = ThreadLocalRandom.current();
|
|
ThreadLocalRandom random = ThreadLocalRandom.current();
|
|
List<Label> list = new ArrayList<>();
|
|
List<Label> list = new ArrayList<>();
|
|
- for (int i = 0; i < labKey.length; i++) {
|
|
|
|
- Label label = new Label();
|
|
|
|
- JSONObject jsonObject = new JSONObject();
|
|
|
|
- int i2 = random.nextInt(2, 15);
|
|
|
|
- int i1 = random.nextInt(2, 8);
|
|
|
|
- jsonObject.put(param[0],i1);
|
|
|
|
- jsonObject.put(param[1],i2);
|
|
|
|
- label.setJsonObject(jsonObject);
|
|
|
|
- label.setLabel(labKey[i]);
|
|
|
|
- list.add(label);
|
|
|
|
- }
|
|
|
|
|
|
+ Label label1 = new Label();
|
|
|
|
+ JSONObject jsonObject = new JSONObject();
|
|
|
|
+ int i2 = 5;
|
|
|
|
+ int i1 = 3;
|
|
|
|
+ jsonObject.put(param[0],i1);
|
|
|
|
+ jsonObject.put(param[1],i2);
|
|
|
|
+ label1.setJsonObject(jsonObject);
|
|
|
|
+ label1.setLabel(labKey[0]);
|
|
|
|
+ list.add(label1);
|
|
|
|
+ Label label2 = new Label();
|
|
|
|
+ JSONObject jsonObject2 = new JSONObject();
|
|
|
|
+ jsonObject2.put(param[0],2);
|
|
|
|
+ jsonObject2.put(param[1],5);
|
|
|
|
+ label2.setJsonObject(jsonObject2);
|
|
|
|
+ label2.setLabel(labKey[1]);
|
|
|
|
+ list.add(label2);
|
|
|
|
+ Label label3 = new Label();
|
|
|
|
+ JSONObject jsonObject3 = new JSONObject();
|
|
|
|
+ jsonObject3.put(param[0],4);
|
|
|
|
+ jsonObject3.put(param[1],9);
|
|
|
|
+ label3.setJsonObject(jsonObject);
|
|
|
|
+ label3.setLabel(labKey[2]);
|
|
|
|
+ list.add(label3);
|
|
|
|
+ Label label4 = new Label();
|
|
|
|
+ JSONObject jsonObject4 = new JSONObject();
|
|
|
|
+ jsonObject4.put(param[0],3);
|
|
|
|
+ jsonObject4.put(param[1],6);
|
|
|
|
+ label4.setJsonObject(jsonObject4);
|
|
|
|
+ label4.setLabel(labKey[3]);
|
|
|
|
+ list.add(label4);
|
|
|
|
+ Label label5 = new Label();
|
|
|
|
+ JSONObject jsonObject5 = new JSONObject();
|
|
|
|
+ jsonObject5.put(param[0],5);
|
|
|
|
+ jsonObject5.put(param[1],8);
|
|
|
|
+ label5.setJsonObject(jsonObject5);
|
|
|
|
+ label5.setLabel(labKey[4]);
|
|
|
|
+ list.add(label5);
|
|
// List<Label> labels1 = GeneralMethod.getInstance().dataGeneration(param, labKey);
|
|
// List<Label> labels1 = GeneralMethod.getInstance().dataGeneration(param, labKey);
|
|
return ReturnMsg.ok(list);
|
|
return ReturnMsg.ok(list);
|
|
}
|
|
}
|