change - 数据源修改

master
wenjy 2 years ago
parent 3531fc5abe
commit 3bb0455b09

@ -226,7 +226,7 @@ public class UShellMesController {
calendar.set(Calendar.SECOND, 0); calendar.set(Calendar.SECOND, 0);
Date endTime = calendar.getTime(); Date endTime = calendar.getTime();
// List<ScadaUkHourData> info = iScadaUkHourDataRepository.findByRecordTimeBetween(beginTime,endTime); //List<ScadaUkHourData> info = iScadaUkHourDataRepository.findByRecordTimeBetween(beginTime,endTime);
List<ScadaUkHourData> info = imosPrPlanService.findByRecordTimeBetweenNew(); List<ScadaUkHourData> info = imosPrPlanService.findByRecordTimeBetweenNew();
List<ScadaUkHourData> infoList = info.stream().sorted(Comparator.comparing(ScadaUkHourData:: getRecordTime)).collect(Collectors.toList()); List<ScadaUkHourData> infoList = info.stream().sorted(Comparator.comparing(ScadaUkHourData:: getRecordTime)).collect(Collectors.toList());
@ -250,11 +250,17 @@ public class UShellMesController {
@ResponseBody @ResponseBody
public String getPlanData(){ public String getPlanData(){
String jsonInfo = "";
try{
OrderInfo planInfoList = imosPrPlanService.getSumUHullPlanInfo().get(0); OrderInfo planInfoList = imosPrPlanService.getSumUHullPlanInfo().get(0);
String jsonInfo = JSONArray.toJSONString(planInfoList); jsonInfo = JSONArray.toJSONString(planInfoList);
System.out.println("U壳计划汇总"+jsonInfo); System.out.println("U壳计划汇总"+jsonInfo);
}catch (Exception ex) {
System.out.println("U壳计划汇总异常"+ex.getMessage());
}
return jsonInfo; return jsonInfo;
} }

@ -33,6 +33,6 @@ public class ScadaUkHourData {
// @Column(name = "DEVICESTATE") // @Column(name = "DEVICESTATE")
// public int DEVICESTATE; // public int DEVICESTATE;
@Column(name = "RECORDTIME") @Column(name = "recordTime")
public Date recordTime; public Date recordTime;
} }

@ -768,6 +768,7 @@ public class ImosPrPlanServiceImpl implements IImosPrPlanService
} }
@Override @Override
@DataSource(value = DataSourceType.MASTER)
public List<ScadaUkHourData> findByRecordTimeBetweenNew() { public List<ScadaUkHourData> findByRecordTimeBetweenNew() {
return imosPrPlanMapper.findByRecordTimeBetweenNew(in_id); return imosPrPlanMapper.findByRecordTimeBetweenNew(in_id);
} }

Loading…
Cancel
Save