Commit 8b1fb384 authored by 单欣鑫's avatar 单欣鑫

修复首页筛选

修复打印
修复打包问题
parent 6b96845e
......@@ -29,7 +29,7 @@ public class PageParam implements Serializable {
@Schema(description = "每页条数,最大值为 100", requiredMode = Schema.RequiredMode.REQUIRED, example = "10")
@NotNull(message = "每页条数不能为空")
@Min(value = 1, message = "每页条数最小值为 1")
@Min(value = -1, message = "每页条数最小值为 1")
@Max(value = 100, message = "每页条数最大值为 100")
private Integer pageSize = PAGE_SIZE;
......
......@@ -128,4 +128,17 @@
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.2</version> <!-- 使用你当前的版本 -->
<configuration>
<skipTests>true</skipTests>
</configuration>
</plugin>
</plugins>
</build>
</project>
......@@ -120,4 +120,18 @@
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.2</version> <!-- 使用你当前的版本 -->
<configuration>
<skipTests>true</skipTests>
</configuration>
</plugin>
</plugins>
</build>
</project>
......@@ -10,6 +10,7 @@ import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.Operation;
import javax.annotation.security.PermitAll;
import javax.validation.constraints.*;
import javax.validation.*;
import javax.servlet.http.*;
......@@ -136,6 +137,8 @@ public class InfoController {
@Operation(summary = "获得合并客户拜访打印信息根据Ids")
@PreAuthorize("@ss.hasPermission('visit:info:print')")
public CommonResult<List<InfoPrintVO>> getUnionAllPrintListByIds(@Valid InfoPageReqVO pageReqVO) {
// 如果前端没有传递pageSize和pageNo参数,则设置为不分页
PageResult<InfoDO> pageResult = infoService.getInfoPage(pageReqVO);
if (pageResult.getTotal()==0){
throw new RuntimeException("当前不存在可打印数据");
......
......@@ -28,6 +28,7 @@ import java.time.DayOfWeek;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.LocalTime;
import java.time.temporal.ChronoUnit;
import java.util.*;
import java.util.stream.Collectors;
import java.util.stream.Stream;
......@@ -156,7 +157,8 @@ public class HomeServiceImpl implements HomeService {
for (int i = 0; i < 10; i++) {
LocalDateTime weekStart = start.plusWeeks(i).with(LocalTime.MIN);;
LocalDateTime weekEnd = weekStart.plusDays(6).with(LocalTime.MAX);
// LocalTime.MAX表示当天时间的23.59.59.9999999,这样会导致MySQL数据库自动进1,导致出错
LocalDateTime weekEnd = weekStart.plusDays(6).with(LocalTime.MAX).truncatedTo(ChronoUnit.MILLIS);;
LocalDateTime[] week = new LocalDateTime[]{weekStart, weekEnd};
if (weekStart.isAfter(end)) break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment