|
|
|
@ -276,7 +276,6 @@ public class RehearsalPlanServiceImpl extends ServiceImpl<RehearsalPlanMapper, R
|
|
|
|
|
String unit = String.valueOf(param.get("unit")); |
|
|
|
|
String startTime = String.valueOf(param.get("scheduledStartTime")); |
|
|
|
|
String endTime = String.valueOf(param.get("scheduledEndTime")); |
|
|
|
|
String rehearsalStatus = String.valueOf(param.get("rehearsalStatus")); |
|
|
|
|
if (!unit.equals("null") && !unit.equals("")) { |
|
|
|
|
queryWrapper.lambda().like(RehearsalPlanEntity::getUnit, unit); |
|
|
|
|
} |
|
|
|
@ -286,9 +285,39 @@ public class RehearsalPlanServiceImpl extends ServiceImpl<RehearsalPlanMapper, R
|
|
|
|
|
if (!endTime.equals("null") && !endTime.equals("")) { |
|
|
|
|
queryWrapper.lambda().le(RehearsalPlanEntity::getScheduledEndTime, endTime); |
|
|
|
|
} |
|
|
|
|
queryWrapper.lambda().orderByDesc(RehearsalPlanEntity::getCreateTime); |
|
|
|
|
return this.page(Condition.getPage(query), queryWrapper); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 查询月度详情列表 |
|
|
|
|
*/ |
|
|
|
|
@Override |
|
|
|
|
public IPage<RehearsalPlanEntity> getDetailListByMonth(Query query, Map<String, Object> param) { |
|
|
|
|
QueryWrapper<RehearsalPlanEntity> queryWrapper = new QueryWrapper<>(); |
|
|
|
|
String unit = String.valueOf(param.get("unit")); |
|
|
|
|
String startTime = String.valueOf(param.get("scheduledStartTime")); |
|
|
|
|
String endTime = String.valueOf(param.get("scheduledEndTime")); |
|
|
|
|
String rehearsalStatus = String.valueOf(param.get("rehearsalStatus")); |
|
|
|
|
if (!unit.equals("null") && !unit.equals("")) { |
|
|
|
|
queryWrapper.lambda().like(RehearsalPlanEntity::getUnit, unit); |
|
|
|
|
} |
|
|
|
|
if (!startTime.equals("null") && !startTime.equals("")) { |
|
|
|
|
queryWrapper.lambda().ge(RehearsalPlanEntity::getScheduledEndTime, startTime); |
|
|
|
|
} |
|
|
|
|
if (!endTime.equals("null") && !endTime.equals("")) { |
|
|
|
|
queryWrapper.lambda().le(RehearsalPlanEntity::getScheduledEndTime, endTime); |
|
|
|
|
} |
|
|
|
|
if (!rehearsalStatus.equals("null") && !rehearsalStatus.equals("")) { |
|
|
|
|
// 未完成计划包括UNFINISHED和WAITING两种状态
|
|
|
|
|
if (rehearsalStatus.equals("UNFINISHED+WAITING")) { |
|
|
|
|
queryWrapper.lambda().and(wrapper -> wrapper.eq(RehearsalPlanEntity::getRehearsalStatus, RehearsalStatusEnum.UNFINISHED.getValue()) |
|
|
|
|
.or() |
|
|
|
|
.eq(RehearsalPlanEntity::getRehearsalStatus, RehearsalStatusEnum.WAITING.getValue())); |
|
|
|
|
} else { |
|
|
|
|
queryWrapper.lambda().eq(RehearsalPlanEntity::getRehearsalStatus, rehearsalStatus); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
queryWrapper.lambda().orderByDesc(RehearsalPlanEntity::getCreateTime); |
|
|
|
|
return this.page(Condition.getPage(query), queryWrapper); |
|
|
|
|
} |
|
|
|
|