Commit cdca1959 by 刘鑫

fix(ID1003911): 博西PEA_V1.0-工作日历-批量删除

des: 选择同一天日期进行批量删除数据,匹配不到工作日程
fix: 修改日期范围 以及替换查询语句为BETWEEN AND
1 parent 3fb34a76
...@@ -16,7 +16,7 @@ public interface CapacityEngineerCalendarDao extends JpaRepository<CapacityEngin ...@@ -16,7 +16,7 @@ public interface CapacityEngineerCalendarDao extends JpaRepository<CapacityEngin
CapacityEngineerCalendarEntity getByPlanId(String planId); CapacityEngineerCalendarEntity getByPlanId(String planId);
@Query("select count(*) from CapacityEngineerCalendarEntity a where a.type = :type and a.startTime >= :startDate and a.endTime <= :endDate and a.engineerCode in :engineers") @Query("select count(*) from CapacityEngineerCalendarEntity a where a.type = :type and (a.startTime BETWEEN :startDate and :endDate) and a.engineerCode in :engineers")
Integer queryEngineerPlanNum(List<String> engineers, LocalDateTime startDate, LocalDateTime endDate, String type); Integer queryEngineerPlanNum(List<String> engineers, LocalDateTime startDate, LocalDateTime endDate, String type);
@Modifying @Modifying
......
...@@ -305,7 +305,7 @@ public class EngineerCalendarServiceImpl implements EngineerCalendarService { ...@@ -305,7 +305,7 @@ public class EngineerCalendarServiceImpl implements EngineerCalendarService {
return Result.failed("没有选中工程师"); return Result.failed("没有选中工程师");
} }
LocalDateTime startDate = DateUtils.localDateFromStr(reqDTO.getStartDate()).atTime(LocalTime.MIDNIGHT); LocalDateTime startDate = DateUtils.localDateFromStr(reqDTO.getStartDate()).atTime(LocalTime.MIDNIGHT);
LocalDateTime endDate = DateUtils.localDateFromStr(reqDTO.getEndDate()).atTime(LocalTime.MIDNIGHT); LocalDateTime endDate = DateUtils.localDateFromStr(reqDTO.getEndDate()).atTime(LocalTime.MAX);
Integer num = capacityEngineerCalendarDao.queryEngineerPlanNum(reqDTO.getEngineerCodes(), startDate, endDate, reqDTO.getType()); Integer num = capacityEngineerCalendarDao.queryEngineerPlanNum(reqDTO.getEngineerCodes(), startDate, endDate, reqDTO.getType());
CalendarQueryNumDTO.Result rs = new CalendarQueryNumDTO.Result(); CalendarQueryNumDTO.Result rs = new CalendarQueryNumDTO.Result();
rs.setPlanNum(num); rs.setPlanNum(num);
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!