|
|
|
@ -4,8 +4,10 @@ import cn.afterturn.easypoi.entity.ImageEntity;
|
|
|
|
|
import cn.hutool.core.date.DatePattern; |
|
|
|
|
import com.alibaba.excel.util.CollectionUtils; |
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
|
|
|
|
import com.hnac.hzims.common.logs.utils.StringUtils; |
|
|
|
|
import com.hnac.hzims.common.utils.Condition; |
|
|
|
|
import com.hnac.hzims.safeproduct.constants.SafeProductConstant; |
|
|
|
|
import com.hnac.hzims.safeproduct.entity.RehearsalPlanEntity; |
|
|
|
|
import com.hnac.hzims.safeproduct.entity.RehearsalRecordEntity; |
|
|
|
@ -17,6 +19,7 @@ import com.hnac.hzims.safeproduct.service.IRehearsalRecordService;
|
|
|
|
|
import com.hnac.hzims.safeproduct.utils.BaseUtil; |
|
|
|
|
import com.hnac.hzims.safeproduct.vo.RehearsalRecordDetailVO; |
|
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
|
import org.springblade.core.mp.support.Query; |
|
|
|
|
import org.springframework.beans.factory.annotation.Value; |
|
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
|
@ -174,4 +177,26 @@ public class RehearsalRecordServiceImpl extends ServiceImpl<RehearsalRecordMappe
|
|
|
|
|
public RehearsalRecordDetailVO getRecordDetailVOById(Long id) { |
|
|
|
|
return baseMapper.getRecordDetailVOById(id); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 演练记录分页 |
|
|
|
|
*/ |
|
|
|
|
@Override |
|
|
|
|
public IPage<RehearsalRecordEntity> rehearsalRecordPage(Map<String, Object> param, Query query) { |
|
|
|
|
QueryWrapper<RehearsalRecordEntity> queryWrapper = new QueryWrapper<>(); |
|
|
|
|
String rehearsalPlanId = String.valueOf(param.get("rehearsalPlanId")); |
|
|
|
|
String actualStartTime = String.valueOf(param.get("actualStartTime")); |
|
|
|
|
String actualEndTime = String.valueOf(param.get("actualEndTime")); |
|
|
|
|
if (!rehearsalPlanId.equals("null") && !rehearsalPlanId.equals("")) { |
|
|
|
|
queryWrapper.lambda().eq(RehearsalRecordEntity::getRehearsalPlanId, rehearsalPlanId); |
|
|
|
|
} |
|
|
|
|
if (!actualStartTime.equals("null") && !actualStartTime.equals("")) { |
|
|
|
|
queryWrapper.lambda().ge(RehearsalRecordEntity::getActualStartTime, actualStartTime); |
|
|
|
|
} |
|
|
|
|
if (!actualEndTime.equals("null") && !actualEndTime.equals("")) { |
|
|
|
|
queryWrapper.lambda().le(RehearsalRecordEntity::getActualEndTime, actualEndTime); |
|
|
|
|
} |
|
|
|
|
queryWrapper.lambda().orderByDesc(RehearsalRecordEntity::getCreateTime); |
|
|
|
|
return this.page(Condition.getPage(query), queryWrapper); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|