Merge remote-tracking branch 'origin/master'

master
zhouhy 6 months ago
commit b909cecff2

@ -101,7 +101,7 @@ public class BoxTemperatureHistoryController extends BaseController {
* */
@PostMapping("/testTemp")
public TableDataInfo getTestTemp(@RequestBody BoxTemperatureHistory boxTemperatureHistory){
return getDataTable(boxTemperatureHistoryService.getTestTemp(boxTemperatureHistory));
public AjaxResult getTestTemp(@RequestBody BoxTemperatureHistory boxTemperatureHistory){
return success(boxTemperatureHistoryService.getTestTemp(boxTemperatureHistory));
}
}

@ -1,5 +1,6 @@
package com.aucma.report.service;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@ -61,5 +62,5 @@ public interface IBoxTemperatureHistoryService
*/
public int deleteBoxTemperatureHistoryByObjId(Long objId);
public List<String[]> getTestTemp(BoxTemperatureHistory boxTemperatureHistory);
public HashMap<String, Object> getTestTemp(BoxTemperatureHistory boxTemperatureHistory);
}

@ -95,24 +95,29 @@ public class BoxTemperatureHistoryServiceImpl implements IBoxTemperatureHistoryS
}
@Override
public List<String[]> getTestTemp(BoxTemperatureHistory boxTemperatureHistory) {
public HashMap<String, Object> getTestTemp(BoxTemperatureHistory boxTemperatureHistory) {
HashMap<String, Object> result = new HashMap<>();
// BoxTemperatureHistory boxTemperatureHistory = new BoxTemperatureHistory();
// cpno = "B24051383025017990384";
// boxTemperatureHistory.setCpno(cpno);
// boxTemperatureHistory.setCpno("B24051383025017990384");
List<BoxTemperatureHistory> boxTemperatureHistories = boxTemperatureHistoryMapper.selectBoxTemperatureHistoryList(boxTemperatureHistory);
BoxTemperatureHistory boxTemp = boxTemperatureHistories.get(0);
BoxTemperatureHistory boxTemp = boxTemperatureHistoryMapper.selectBoxTemperatureHistoryByObjId(boxTemperatureHistory.getObjId());
//获取数据
String tempMes = boxTemp.getTempMes();
String powerMes = boxTemp.getPowerMes();
Date begindatetime = boxTemp.getBegindatetime();
List<String[]> stringList = getStringList(tempMes, begindatetime);
List<String[]> stringList1 = getStringList(powerMes, begindatetime);
//温度数据
List<String[]> tempList = getStringList(tempMes, begindatetime);
result.put("tempList", tempList);
return stringList;
//功率数据
List<String[]> vList = getStringList(powerMes, begindatetime);
List<String[]> wList = new ArrayList<>();
wList.add(vList.get(1));
result.put("vList", wList);
return result;
}

Loading…
Cancel
Save