|
@@ -5,6 +5,7 @@ import com.gyee.frame.common.domain.AjaxResult;
|
|
import com.gyee.frame.model.custom.SingleAnalysisVo;
|
|
import com.gyee.frame.model.custom.SingleAnalysisVo;
|
|
import com.gyee.frame.model.custom.Tablepar;
|
|
import com.gyee.frame.model.custom.Tablepar;
|
|
import com.gyee.frame.service.singleanalysis.SingleAnalysisService;
|
|
import com.gyee.frame.service.singleanalysis.SingleAnalysisService;
|
|
|
|
+import com.gyee.frame.util.DateUtils;
|
|
import com.gyee.frame.util.StringUtils;
|
|
import com.gyee.frame.util.StringUtils;
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.ApiImplicitParam;
|
|
import io.swagger.annotations.ApiImplicitParam;
|
|
@@ -30,8 +31,6 @@ public class SingleAnalysisController {
|
|
* 单机信息总览首页
|
|
* 单机信息总览首页
|
|
* @param tablepar
|
|
* @param tablepar
|
|
* @param wpId
|
|
* @param wpId
|
|
- * @param year
|
|
|
|
- * @param month
|
|
|
|
* @return
|
|
* @return
|
|
* @throws Exception
|
|
* @throws Exception
|
|
*/
|
|
*/
|
|
@@ -41,16 +40,16 @@ public class SingleAnalysisController {
|
|
@ApiImplicitParams({
|
|
@ApiImplicitParams({
|
|
@ApiImplicitParam(name = "tablepar", value = "分页对象", required = true, dataType = "Tablepar", paramType = "query"),
|
|
@ApiImplicitParam(name = "tablepar", value = "分页对象", required = true, dataType = "Tablepar", paramType = "query"),
|
|
@ApiImplicitParam(name = "wpId", value = "风场编号", required = true, dataType = "string", paramType = "query"),
|
|
@ApiImplicitParam(name = "wpId", value = "风场编号", required = true, dataType = "string", paramType = "query"),
|
|
- @ApiImplicitParam(name = "year", value = "年份", required = true, dataType = "string", paramType = "query"),
|
|
|
|
- @ApiImplicitParam(name = "month", value = "月份", required = true, dataType = "string", paramType = "query")})
|
|
|
|
|
|
+ @ApiImplicitParam(name = "beginDate", value = "开始日期", required = true, dataType = "string", paramType = "query"),
|
|
|
|
+ @ApiImplicitParam(name = "endDate", value = "结束日期", required = true, dataType = "string", paramType = "query")})
|
|
|
|
|
|
- public AjaxResult singleanalysisMain(Tablepar tablepar, String wpId, String year, String month) throws Exception {
|
|
|
|
|
|
+ public AjaxResult singleanalysisMain(Tablepar tablepar, String wpId, String beginDate, String endDate) throws Exception {
|
|
|
|
|
|
List<SingleAnalysisVo> vos =new ArrayList<>();
|
|
List<SingleAnalysisVo> vos =new ArrayList<>();
|
|
|
|
|
|
- if (StringUtils.notEmp(wpId) && StringUtils.notEmp(year) && StringUtils.notEmp(month)) {
|
|
|
|
|
|
+ if (StringUtils.notEmp(wpId) && StringUtils.notEmp(beginDate) && StringUtils.notEmp(endDate)) {
|
|
|
|
|
|
- Calendar cal = Calendar.getInstance();
|
|
|
|
|
|
+ /*Calendar cal = Calendar.getInstance();
|
|
cal.set(Calendar.HOUR_OF_DAY, 0);
|
|
cal.set(Calendar.HOUR_OF_DAY, 0);
|
|
cal.set(Calendar.MINUTE, 0);
|
|
cal.set(Calendar.MINUTE, 0);
|
|
cal.set(Calendar.SECOND, 0);
|
|
cal.set(Calendar.SECOND, 0);
|
|
@@ -61,9 +60,16 @@ public class SingleAnalysisController {
|
|
cal.set(Calendar.DAY_OF_MONTH, cal.getActualMinimum(Calendar.DAY_OF_MONTH));
|
|
cal.set(Calendar.DAY_OF_MONTH, cal.getActualMinimum(Calendar.DAY_OF_MONTH));
|
|
Date beginDate = cal.getTime();
|
|
Date beginDate = cal.getTime();
|
|
cal.add(Calendar.MONTH, 1);
|
|
cal.add(Calendar.MONTH, 1);
|
|
- Date endDate = cal.getTime();
|
|
|
|
|
|
+ Date endDate = cal.getTime();*/
|
|
|
|
+ Date date1 = DateUtils.parseDate(beginDate);
|
|
|
|
+ Date date2 = DateUtils.parseDate(endDate);
|
|
|
|
+ Calendar cal = Calendar.getInstance();
|
|
|
|
+ cal.setTime(date2);
|
|
|
|
+ cal.add(Calendar.DATE, 1);
|
|
|
|
+ cal.add(Calendar.MILLISECOND, -1);
|
|
|
|
+ date2 = cal.getTime();
|
|
|
|
|
|
- vos =singleAnalysisService.SingleAnalysisList(tablepar, wpId,beginDate,endDate);
|
|
|
|
|
|
+ vos =singleAnalysisService.SingleAnalysisList(tablepar, wpId,date1,date2);
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|