|
|
@ -5,12 +5,10 @@ import com.alibaba.excel.ExcelWriter; |
|
|
|
import com.alibaba.excel.converters.longconverter.LongStringConverter; |
|
|
|
import com.alibaba.excel.converters.longconverter.LongStringConverter; |
|
|
|
import com.alibaba.excel.write.metadata.WriteSheet; |
|
|
|
import com.alibaba.excel.write.metadata.WriteSheet; |
|
|
|
import com.alibaba.excel.write.style.column.SimpleColumnWidthStyleStrategy; |
|
|
|
import com.alibaba.excel.write.style.column.SimpleColumnWidthStyleStrategy; |
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
|
|
|
import com.hnac.hzims.common.utils.Condition; |
|
|
|
|
|
|
|
import com.hnac.hzims.safeproduct.constants.SafeProductConstant; |
|
|
|
import com.hnac.hzims.safeproduct.constants.SafeProductConstant; |
|
|
|
import com.hnac.hzims.safeproduct.dto.AnalysisYearDTO; |
|
|
|
import com.hnac.hzims.safeproduct.dto.AnalysisYearDTO; |
|
|
|
import com.hnac.hzims.safeproduct.entity.TrainPlanEntity; |
|
|
|
import com.hnac.hzims.safeproduct.entity.TrainPlanEntity; |
|
|
@ -265,21 +263,8 @@ public class TrainPlanServiceImpl extends ServiceImpl<TrainPlanMapper, TrainPlan |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public IPage<TrainPlanEntity> trainPlanPage(Map<String, Object> param, Query query) { |
|
|
|
public IPage<TrainPlanEntity> trainPlanPage(Map<String, Object> param, Query query) { |
|
|
|
QueryWrapper<TrainPlanEntity> queryWrapper = new QueryWrapper<>(); |
|
|
|
IPage<TrainPlanEntity> page = new Page<>(query.getCurrent(), query.getSize()); |
|
|
|
String unit = String.valueOf(param.get("unit")); |
|
|
|
return baseMapper.trainPlanPage(page, param); |
|
|
|
String startTime = String.valueOf(param.get("scheduledStartTime")); |
|
|
|
|
|
|
|
String endTime = String.valueOf((param.get("scheduledEndTime"))); |
|
|
|
|
|
|
|
if (!unit.equals("null") && !unit.equals("")) { |
|
|
|
|
|
|
|
queryWrapper.lambda().like(TrainPlanEntity::getUnit, unit); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (!startTime.equals("null") && !startTime.equals("")) { |
|
|
|
|
|
|
|
queryWrapper.lambda().ge(TrainPlanEntity::getScheduledStartTime, startTime); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (!endTime.equals("null") && !endTime.equals("")) { |
|
|
|
|
|
|
|
queryWrapper.lambda().le(TrainPlanEntity::getScheduledEndTime, endTime); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
queryWrapper.lambda().orderByDesc(TrainPlanEntity::getCreateTime); |
|
|
|
|
|
|
|
return this.page(Condition.getPage(query), queryWrapper); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
@ -290,17 +275,6 @@ public class TrainPlanServiceImpl extends ServiceImpl<TrainPlanMapper, TrainPlan |
|
|
|
* @return 培训计划列表 |
|
|
|
* @return 培训计划列表 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public List<TrainPlanEntity> getTrainPlanByUnitAndDate(String unit, String startTime, String endTime) { |
|
|
|
public List<TrainPlanEntity> getTrainPlanByUnitAndDate(String unit, String startTime, String endTime) { |
|
|
|
LambdaQueryWrapper<TrainPlanEntity> queryWrapper = new LambdaQueryWrapper<>(); |
|
|
|
return baseMapper.selectListByUnitAndDate(unit, startTime, endTime); |
|
|
|
if (!unit.equals("null")) { |
|
|
|
|
|
|
|
queryWrapper.eq(TrainPlanEntity::getUnit, unit); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (!startTime.equals("null")) { |
|
|
|
|
|
|
|
queryWrapper.ge(TrainPlanEntity::getScheduledStartTime, startTime); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (!endTime.equals("null")) { |
|
|
|
|
|
|
|
queryWrapper.lt(TrainPlanEntity::getScheduledEndTime, endTime); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
queryWrapper.orderByDesc(TrainPlanEntity::getCreateTime); |
|
|
|
|
|
|
|
return this.list(queryWrapper); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|