|
|
|
@ -108,29 +108,46 @@ public class FoamBoxDeviceInfoServiceImpl implements IFoamBoxDeviceInfoService {
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
List<FoamBoxParamTemperature> foamBoxParamTemperatures = foamBoxParamTemperatureMapper.selectList(wrapper);
|
|
|
|
|
//List<FoamBoxParamTemperature> foamBoxParamTemperatures = foamBoxParamTemperatureMapper.selectList(wrapper);
|
|
|
|
|
List<FoamBoxParamTemperature> foamBoxParamTemperatures = new ArrayList<>();
|
|
|
|
|
String[] legendArray = new String[]{"1#pol","2#pol","1#piol","2#pol"};
|
|
|
|
|
result.put("legendArray",legendArray);
|
|
|
|
|
if(foamBoxParamTemperatures.size() > 0) {
|
|
|
|
|
String[] xAxisArray = new String[foamBoxParamTemperatures.size()];
|
|
|
|
|
String[] isoArray1 = new String[foamBoxParamTemperatures.size()];
|
|
|
|
|
String[] isoArray2 = new String[foamBoxParamTemperatures.size()];
|
|
|
|
|
String[] polArray1 = new String[foamBoxParamTemperatures.size()];
|
|
|
|
|
String[] polArray2 = new String[foamBoxParamTemperatures.size()];
|
|
|
|
|
for (int i = 0;i<foamBoxParamTemperatures.size();i++){
|
|
|
|
|
String[] xAxisArray = new String[foamBoxParamTemperatures.size()];
|
|
|
|
|
String[] isoArray1 = new String[foamBoxParamTemperatures.size()];
|
|
|
|
|
String[] isoArray2 = new String[foamBoxParamTemperatures.size()];
|
|
|
|
|
String[] polArray1 = new String[foamBoxParamTemperatures.size()];
|
|
|
|
|
String[] polArray2 = new String[foamBoxParamTemperatures.size()];
|
|
|
|
|
|
|
|
|
|
xAxisArray[i] = simpleDateFormat.format(foamBoxParamTemperatures.get(0).getCollectTime());
|
|
|
|
|
isoArray1[i] = foamBoxParamTemperatures.get(i).getIso1();
|
|
|
|
|
isoArray2[i] = foamBoxParamTemperatures.get(i).getIso2();
|
|
|
|
|
polArray1[i] = foamBoxParamTemperatures.get(i).getPol1();
|
|
|
|
|
polArray2[i] = foamBoxParamTemperatures.get(i).getPol2();
|
|
|
|
|
|
|
|
|
|
result.put("xAxisArray",xAxisArray);
|
|
|
|
|
result.put("isoArray1",isoArray1);
|
|
|
|
|
result.put("isoArray2",isoArray2);
|
|
|
|
|
result.put("polArray1",polArray1);
|
|
|
|
|
result.put("polArray2",polArray2);
|
|
|
|
|
isoArray1[i] = foamBoxParamTemperatures.get(i).getIso1() == null ? "0" :foamBoxParamTemperatures.get(i).getIso1();
|
|
|
|
|
isoArray2[i] = foamBoxParamTemperatures.get(i).getIso2() == null ? "0" : foamBoxParamTemperatures.get(i).getIso2();
|
|
|
|
|
polArray1[i] = foamBoxParamTemperatures.get(i).getPol1() == null ? "0" : foamBoxParamTemperatures.get(i).getPol1();
|
|
|
|
|
polArray2[i] = foamBoxParamTemperatures.get(i).getPol2() == null ? "0" : foamBoxParamTemperatures.get(i).getPol2();
|
|
|
|
|
}
|
|
|
|
|
result.put("xAxisArray",xAxisArray);
|
|
|
|
|
result.put("isoArray1",isoArray1);
|
|
|
|
|
result.put("isoArray2",isoArray2);
|
|
|
|
|
result.put("polArray1",polArray1);
|
|
|
|
|
result.put("polArray2",polArray2);
|
|
|
|
|
}else {
|
|
|
|
|
String[] xAxisArray = new String[15];
|
|
|
|
|
String[] isoArray1 = new String[15];
|
|
|
|
|
String[] isoArray2 = new String[15];
|
|
|
|
|
String[] polArray1 = new String[15];
|
|
|
|
|
String[] polArray2 = new String[15];
|
|
|
|
|
for (int i = 0;i<15;i++){
|
|
|
|
|
xAxisArray[i] = 0+i+"";
|
|
|
|
|
isoArray1[i] = 1+i+"";
|
|
|
|
|
isoArray2[i] = 2+i+"";
|
|
|
|
|
polArray1[i] = 1+i+"";
|
|
|
|
|
polArray2[i] = 2+i+"";
|
|
|
|
|
}
|
|
|
|
|
result.put("xAxisArray",xAxisArray);
|
|
|
|
|
result.put("isoArray1",isoArray1);
|
|
|
|
|
result.put("isoArray2",isoArray2);
|
|
|
|
|
result.put("polArray1",polArray1);
|
|
|
|
|
result.put("polArray2",polArray2);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return JSONArray.toJSONString(result);
|
|
|
|
|