|
|
@@ -3,12 +3,17 @@ package com.yunfeiyun.agmp.fms.service.impl;
|
|
|
import com.yunfeiyun.agmp.fms.domain.dto.FmsScreenPlanStatDto;
|
|
|
import com.yunfeiyun.agmp.fms.domain.reqvo.FmsScreenStatReqVo;
|
|
|
import com.yunfeiyun.agmp.fms.domain.resvo.FmsScreenLandStatResVo;
|
|
|
+import com.yunfeiyun.agmp.fms.domain.resvo.FmsScreenPlanPickStatResVo;
|
|
|
import com.yunfeiyun.agmp.fms.domain.resvo.FmsScreenPlanStatResVo;
|
|
|
import com.yunfeiyun.agmp.fms.mapper.FmsScreenMapper;
|
|
|
import com.yunfeiyun.agmp.fms.service.IFmsScreenService;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
+import java.time.LocalDate;
|
|
|
+import java.time.LocalTime;
|
|
|
+import java.time.ZoneId;
|
|
|
+import java.time.format.DateTimeFormatter;
|
|
|
import java.util.List;
|
|
|
|
|
|
@Service
|
|
|
@@ -53,4 +58,23 @@ public class FmsScreenServiceImpl implements IFmsScreenService {
|
|
|
planStatResVo.setPlanStatList(planStatResVoList);
|
|
|
return planStatResVo;
|
|
|
}
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public List<FmsScreenPlanPickStatResVo> planPickStat(FmsScreenStatReqVo reqVo) {
|
|
|
+ int year = LocalDate.now().getYear();
|
|
|
+
|
|
|
+ // 计算当年第一天(格式化为yyyy-MM-dd 00:00:00)
|
|
|
+ String startDate = LocalDate.of(year, 1, 1)
|
|
|
+ .atStartOfDay(ZoneId.systemDefault())
|
|
|
+ .format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"));
|
|
|
+
|
|
|
+ // 计算当年最后一天(格式化为yyyy-MM-dd 23:59:59)
|
|
|
+ String endDate = LocalDate.of(year, 12, 31)
|
|
|
+ .atTime(LocalTime.MAX)
|
|
|
+ .format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"));
|
|
|
+
|
|
|
+ reqVo.setStartDate(startDate);
|
|
|
+ reqVo.setEndDate(endDate);
|
|
|
+ return fmsScreenMapper.planPickStat(reqVo);
|
|
|
+ }
|
|
|
}
|