|
@@ -48,6 +48,7 @@ import org.springframework.stereotype.Service;
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
import java.io.*;
|
|
|
import java.text.SimpleDateFormat;
|
|
|
+import java.time.LocalDate;
|
|
|
import java.time.LocalDateTime;
|
|
|
import java.time.LocalTime;
|
|
|
import java.time.ZoneId;
|
|
@@ -1935,6 +1936,9 @@ public class ZhcxProjectManageServiceImpl extends ServiceImpl<ZhcxProjectManageD
|
|
|
public void cronGenerateRectifyData() {
|
|
|
List<ZhcxProjectManageDo> list = this.list(Wrappers.<ZhcxProjectManageDo>lambdaQuery()
|
|
|
.eq(ZhcxProjectManageDo:: getDeleted,"0"));
|
|
|
+ LocalDate today = LocalDate.now(ZoneId.systemDefault()); // 获取系统默认时区的当前日期
|
|
|
+ LocalDateTime startOfDay = today.atStartOfDay(); // 今天 00:00:00
|
|
|
+ LocalDateTime endOfDay = today.plusDays(1).atStartOfDay(); // 明天 00:00:00
|
|
|
for (ZhcxProjectManageDo manageDo : list) {
|
|
|
String projectId = manageDo.getId();
|
|
|
List<String> machinenoList = projectDeviceNumberService.list(Wrappers.<ZhcxProjectDeviceNumberDo>lambdaQuery()
|
|
@@ -1945,6 +1949,8 @@ public class ZhcxProjectManageServiceImpl extends ServiceImpl<ZhcxProjectManageD
|
|
|
List<String> collect = zhcxProjectRectifySnapService.list(Wrappers.<ZhcxProjectRectifySnapDo>lambdaQuery()
|
|
|
.eq(ZhcxProjectRectifySnapDo::getDeleted, "0")
|
|
|
.eq(ZhcxProjectRectifySnapDo::getProjectid, projectId)
|
|
|
+ .ge(ZhcxProjectRectifySnapDo::getDate, startOfDay)
|
|
|
+ .lt(ZhcxProjectRectifySnapDo::getDate, endOfDay)
|
|
|
.select(ZhcxProjectRectifySnapDo::getMachineno)
|
|
|
.groupBy(ZhcxProjectRectifySnapDo::getMachineno)).stream()
|
|
|
.map(ZhcxProjectRectifySnapDo::getMachineno)
|