Browse Source

Merge remote-tracking branch 'origin/master'

platform-api
yx 2 years ago
parent
commit
858f20eecd
  1. 17
      ruoyi-code/src/main/java/com/ruoyi/code/camera/service/impl/WaterPhotoInfoServiceImpl.java

17
ruoyi-code/src/main/java/com/ruoyi/code/camera/service/impl/WaterPhotoInfoServiceImpl.java

@ -15,8 +15,10 @@ import com.ruoyi.common.utils.Query; @@ -15,8 +15,10 @@ import com.ruoyi.common.utils.Query;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* Service业务层处理
@ -58,12 +60,6 @@ public class WaterPhotoInfoServiceImpl extends ServiceImpl<WaterPhotoInfoMapper, @@ -58,12 +60,6 @@ public class WaterPhotoInfoServiceImpl extends ServiceImpl<WaterPhotoInfoMapper,
List<String> legend = new ArrayList<>();
List<ChartData> series = new ArrayList<>();
String startTime = (String)params.get("startTime");
String endTime = (String)params.get("endTime");
if(!startTime.contains("-")){
params.put("startTime",formatDate(new Long(startTime)));
params.put("endTime",formatDate(new Long(endTime)));
}
// 获取表名
Integer dataType = Integer.parseInt((String) params.get("dataType"));
String dataTableName = getDataTableName(dataType);
@ -117,11 +113,6 @@ public class WaterPhotoInfoServiceImpl extends ServiceImpl<WaterPhotoInfoMapper, @@ -117,11 +113,6 @@ public class WaterPhotoInfoServiceImpl extends ServiceImpl<WaterPhotoInfoMapper,
}
return "";
}
public String formatDate(Long d){
Date date = new Date(d);
SimpleDateFormat sm = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
return sm.format(date);
}
public ChartData getChartOptionData(Map<String, Object> params){
ChartData data = null;
List<YcData> dataList = baseMapper.selectWaterData(params);

Loading…
Cancel
Save