|
|
|
@ -3,6 +3,7 @@ package com.hnac.hzims.operational.maintenance.service.impl;
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.Wrapper; |
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
|
|
|
import com.hnac.hzims.common.support.constants.Order; |
|
|
|
|
import com.hnac.hzims.operational.maintenance.dto.OperMaintenanceLibraryDTO; |
|
|
|
|
import com.hnac.hzims.operational.maintenance.entity.OperMaintenanceLibraryEntity; |
|
|
|
|
import com.hnac.hzims.operational.maintenance.mapper.OperMaintenanceLibraryMapper; |
|
|
|
@ -27,6 +28,7 @@ import org.springframework.stereotype.Service;
|
|
|
|
|
import java.time.YearMonth; |
|
|
|
|
import java.util.Arrays; |
|
|
|
|
import java.util.Date; |
|
|
|
|
import java.util.HashMap; |
|
|
|
|
import java.util.List; |
|
|
|
|
import java.util.concurrent.ExecutorService; |
|
|
|
|
import java.util.concurrent.Executors; |
|
|
|
@ -61,25 +63,7 @@ public class OperMaintenanceLibraryServiceImpl extends BaseServiceImpl<OperMaint
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public R<IPage<OperMaintenanceLibraryVO>> list(OperMaintenanceLibraryDTO req, Query query) { |
|
|
|
|
Wrapper<OperMaintenanceLibraryEntity> queryWrapper = new LambdaQueryWrapper<OperMaintenanceLibraryEntity>() {{ |
|
|
|
|
orderByDesc(OperMaintenanceLibraryEntity::getCreateTime); |
|
|
|
|
if (StringUtils.isNotBlank(req.getLibraryCode())) { |
|
|
|
|
like(OperMaintenanceLibraryEntity::getLibraryCode, req.getLibraryCode()); |
|
|
|
|
} |
|
|
|
|
if (StringUtils.isNotBlank(req.getEmCode())) { |
|
|
|
|
like(OperMaintenanceLibraryEntity::getEmCode, req.getEmCode()); |
|
|
|
|
} |
|
|
|
|
if (StringUtils.isNotBlank(req.getTypeCode())) { |
|
|
|
|
eq(OperMaintenanceLibraryEntity::getTypeCode, req.getTypeCode()); |
|
|
|
|
} |
|
|
|
|
if (StringUtils.isNotBlank(req.getProcDefId())) { |
|
|
|
|
eq(OperMaintenanceLibraryEntity::getProcDefId, req.getProcDefId()); |
|
|
|
|
} |
|
|
|
|
if (StringUtils.isNotBlank(req.getDisposers())) { |
|
|
|
|
like(OperMaintenanceLibraryEntity::getDisposers, "," + req.getDisposers() + ","); |
|
|
|
|
} |
|
|
|
|
}}; |
|
|
|
|
IPage pages = super.page(Condition.getPage(query), queryWrapper); |
|
|
|
|
IPage pages = super.page(Condition.getPage(query), this.getQueryWrapper(BeanUtil.copy(req, OperMaintenanceLibraryEntity.class))); |
|
|
|
|
pages.setRecords(OperMaintenanceLibraryWrapper.build().listVO(pages.getRecords())); |
|
|
|
|
return R.data(pages); |
|
|
|
|
} |
|
|
|
|