|
|
|
@ -1,5 +1,6 @@
|
|
|
|
|
package com.hnac.hzims.operational.census.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.baomidou.mybatisplus.core.toolkit.Wrappers; |
|
|
|
@ -10,13 +11,18 @@ import com.hnac.hzims.equipment.feign.IEmInfoClient;
|
|
|
|
|
import com.hnac.hzims.equipment.feign.IPlanGenertionClient; |
|
|
|
|
import com.hnac.hzims.equipment.vo.EminfoAndEmParamVo; |
|
|
|
|
import com.hnac.hzims.operational.access.dto.OperAccessTaskDTO; |
|
|
|
|
import com.hnac.hzims.operational.access.entity.OperAccessTaskEntity; |
|
|
|
|
import com.hnac.hzims.operational.access.service.IOperAccessTaskService; |
|
|
|
|
import com.hnac.hzims.operational.access.vo.OperAccessTaskVO; |
|
|
|
|
import com.hnac.hzims.operational.access.wrapper.OperAccessTaskWrapper; |
|
|
|
|
import com.hnac.hzims.operational.census.constants.CensusConstant; |
|
|
|
|
import com.hnac.hzims.operational.census.service.TargetService; |
|
|
|
|
import com.hnac.hzims.operational.census.vo.WaterTargetVo; |
|
|
|
|
import com.hnac.hzims.operational.census.vo.*; |
|
|
|
|
import com.hnac.hzims.operational.defect.entity.OperPhenomenonEntity; |
|
|
|
|
import com.hnac.hzims.operational.defect.service.IOperPhenomenonService; |
|
|
|
|
import com.hnac.hzims.operational.defect.vo.OperPhenomenonVO; |
|
|
|
|
import com.hnac.hzims.operational.defect.wrapper.OperPhenomenonWrapper; |
|
|
|
|
import com.hnac.hzims.operational.fill.entity.*; |
|
|
|
|
import com.hnac.hzims.operational.fill.service.*; |
|
|
|
|
import com.hnac.hzims.operational.main.constant.HomePageConstant; |
|
|
|
@ -24,22 +30,22 @@ import com.hnac.hzims.operational.main.service.AreaService;
|
|
|
|
|
import com.hnac.hzims.operational.main.service.IMainSystemMonitoringService; |
|
|
|
|
import com.hnac.hzims.operational.main.vo.*; |
|
|
|
|
import com.hnac.hzims.operational.maintenance.dto.OperMaintenanceTaskDTO; |
|
|
|
|
import com.hnac.hzims.operational.maintenance.entity.OperMaintenanceTaskEntity; |
|
|
|
|
import com.hnac.hzims.operational.maintenance.service.IOperMaintenanceTaskService; |
|
|
|
|
import com.hnac.hzims.operational.maintenance.vo.OperMaintenanceTaskVO; |
|
|
|
|
import com.hnac.hzims.operational.maintenance.wrapper.OperMaintenanceTaskWrapper; |
|
|
|
|
import com.hnac.hzims.operational.report.vo.DutyDefectVO; |
|
|
|
|
import com.hnac.hzims.operational.station.entity.StationEntity; |
|
|
|
|
import com.hnac.hzims.operational.station.service.IStationService; |
|
|
|
|
import com.hnac.hzims.ticket.allTicket.dto.TicketStatisticDTO; |
|
|
|
|
import com.hnac.hzims.ticket.allTicket.fegin.ITicketInfoAllClient; |
|
|
|
|
import com.hnac.hzims.ticket.allTicket.vo.DoublePassRateVO; |
|
|
|
|
import com.hnac.hzims.ticket.areamonthly.vo.MaintenanceTaskVo; |
|
|
|
|
import lombok.RequiredArgsConstructor; |
|
|
|
|
import org.apache.commons.collections4.MapUtils; |
|
|
|
|
import org.springblade.core.mp.support.Query; |
|
|
|
|
import org.springblade.core.tool.api.R; |
|
|
|
|
import org.springblade.core.tool.utils.CollectionUtil; |
|
|
|
|
import org.springblade.core.tool.utils.DateUtil; |
|
|
|
|
import org.springblade.core.tool.utils.ObjectUtil; |
|
|
|
|
import org.springblade.core.tool.utils.StringUtil; |
|
|
|
|
import org.springblade.core.tool.utils.*; |
|
|
|
|
import org.springblade.system.entity.Dept; |
|
|
|
|
import org.springblade.system.feign.ISysClient; |
|
|
|
|
import org.springframework.beans.factory.annotation.Value; |
|
|
|
@ -800,7 +806,7 @@ public class TargetServiceImpl implements TargetService {
|
|
|
|
|
return page; |
|
|
|
|
} |
|
|
|
|
// 获取设备集合
|
|
|
|
|
List<DeviceClassifyVo> deviceClassifys = devices.stream().filter(device->detpIds.contains(device.getCreateDept())).sorted(Comparator.comparing(EmInfoEntity::getCreateDept)).map(device -> { |
|
|
|
|
List<DeviceClassifyVo> deviceClassifys = devices.stream().filter(device->detpIds.contains(device.getCreateDept()) && "1".equals(device.getHomePageDisplay())).sorted(Comparator.comparing(EmInfoEntity::getCreateDept)).map(device -> { |
|
|
|
|
DeviceClassifyVo deviceClassify = new DeviceClassifyVo(); |
|
|
|
|
deviceClassify.setStationName(stations.stream().filter(o-> o.getRefDept().equals(device.getCreateDept())).collect(Collectors.toList()).get(0).getName()); |
|
|
|
|
deviceClassify.setDeviceName(device.getName()); |
|
|
|
@ -1090,4 +1096,113 @@ public class TargetServiceImpl implements TargetService {
|
|
|
|
|
calendar.add(Calendar.SECOND, -calendar.get(Calendar.SECOND)); |
|
|
|
|
return DateUtil.format(calendar.getTime(),DateUtil.PATTERN_DATETIME); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 日常维护-数据关联 |
|
|
|
|
* @param page |
|
|
|
|
* @param business |
|
|
|
|
* @return |
|
|
|
|
*/ |
|
|
|
|
@Override |
|
|
|
|
public IPage<MaintenanceTaskVo> maintenance(IPage<OperMaintenanceTaskEntity> page, MaintenanceAssociationVo business) { |
|
|
|
|
Wrapper<OperMaintenanceTaskEntity> queryWrapper = new LambdaQueryWrapper<OperMaintenanceTaskEntity>() {{ |
|
|
|
|
orderByDesc(OperMaintenanceTaskEntity::getDisposeTime); |
|
|
|
|
if (!StringUtil.isEmpty(business.getTitle())) { |
|
|
|
|
like(OperMaintenanceTaskEntity::getTitle, business.getTitle()); |
|
|
|
|
} |
|
|
|
|
if (!StringUtil.isEmpty(business.getTaskType())) { |
|
|
|
|
eq(OperMaintenanceTaskEntity::getTaskType, business.getTaskType()); |
|
|
|
|
} |
|
|
|
|
if (!StringUtil.isEmpty(business.getContent())) { |
|
|
|
|
like(OperMaintenanceTaskEntity::getContent, business.getContent()); |
|
|
|
|
} |
|
|
|
|
if (!StringUtil.isEmpty(business.getStartTime())) { |
|
|
|
|
ge(OperMaintenanceTaskEntity::getDisposeTime,business.getStartTime()); |
|
|
|
|
} |
|
|
|
|
if (!StringUtil.isEmpty(business.getEndTime())) { |
|
|
|
|
le(OperMaintenanceTaskEntity::getDisposeTime,business.getEndTime()); |
|
|
|
|
} |
|
|
|
|
if(!StringUtil.isEmpty(business.getType()) && "1".equals(business.getType())){ |
|
|
|
|
eq(OperMaintenanceTaskEntity::getFlowTaskName,"结束"); |
|
|
|
|
} |
|
|
|
|
if(!StringUtil.isEmpty(business.getDeptIds())){ |
|
|
|
|
in(OperMaintenanceTaskEntity::getCreateDept, Func.toLongList(",",business.getDeptIds())); |
|
|
|
|
} |
|
|
|
|
}}; |
|
|
|
|
IPage pages = maintenanceTaskService.page(page,queryWrapper); |
|
|
|
|
pages.setRecords(OperMaintenanceTaskWrapper.build().listVO(pages.getRecords())); |
|
|
|
|
return pages; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 现象任务-数据关联 |
|
|
|
|
* @param page |
|
|
|
|
* @param business |
|
|
|
|
* @return |
|
|
|
|
*/ |
|
|
|
|
@Override |
|
|
|
|
public IPage<OperPhenomenonVO> phenomenon(IPage<OperPhenomenonEntity> page, MaintenancePhenomenonVo business) { |
|
|
|
|
Wrapper<OperPhenomenonEntity> queryWrapper = new LambdaQueryWrapper<OperPhenomenonEntity>() {{ |
|
|
|
|
orderByDesc(OperPhenomenonEntity::getCreateTime); |
|
|
|
|
if (!StringUtil.isEmpty(business.getFaultName())) { |
|
|
|
|
like(OperPhenomenonEntity::getFaultName,business.getFaultName()); |
|
|
|
|
} |
|
|
|
|
if (!ObjectUtil.isEmpty(business.getIsDefect())) { |
|
|
|
|
eq(OperPhenomenonEntity::getIsDefect,business.getIsDefect()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (!StringUtil.isEmpty(business.getFindStartTime())) { |
|
|
|
|
ge(OperPhenomenonEntity::getFindTime,business.getFindStartTime()); |
|
|
|
|
} |
|
|
|
|
if (!StringUtil.isEmpty(business.getFindEndTime())) { |
|
|
|
|
le(OperPhenomenonEntity::getFindTime,business.getFindEndTime()); |
|
|
|
|
} |
|
|
|
|
if (!StringUtil.isEmpty(business.getStartTime())) { |
|
|
|
|
ge(OperPhenomenonEntity::getCreateTime,business.getStartTime()); |
|
|
|
|
} |
|
|
|
|
if (!StringUtil.isEmpty(business.getEndTime())) { |
|
|
|
|
le(OperPhenomenonEntity::getCreateTime,business.getEndTime()); |
|
|
|
|
} |
|
|
|
|
if(!StringUtil.isEmpty(business.getType()) && "1".equals(business.getType())){ |
|
|
|
|
isNotNull(OperPhenomenonEntity::getHandleTaskId); |
|
|
|
|
} |
|
|
|
|
if(!StringUtil.isEmpty(business.getDeptIds())){ |
|
|
|
|
in(OperPhenomenonEntity::getCreateDept, Func.toLongList(",",business.getDeptIds())); |
|
|
|
|
} |
|
|
|
|
}}; |
|
|
|
|
IPage pages = phenomenonService.page(page, queryWrapper); |
|
|
|
|
pages.setRecords(OperPhenomenonWrapper.build().listVO(pages.getRecords())); |
|
|
|
|
return pages; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 检修任务-数据关联 |
|
|
|
|
* @param page |
|
|
|
|
* @param business |
|
|
|
|
* @return |
|
|
|
|
*/ |
|
|
|
|
@Override |
|
|
|
|
public IPage<OperAccessTaskVO> access(IPage<OperAccessTaskEntity> page, AccessAssociationVo business) { |
|
|
|
|
Wrapper<OperAccessTaskEntity> queryWrapper = new LambdaQueryWrapper<OperAccessTaskEntity>() {{ |
|
|
|
|
orderByDesc(OperAccessTaskEntity::getPlanStartTime); |
|
|
|
|
if (!StringUtil.isEmpty(business.getName())) { |
|
|
|
|
like(OperAccessTaskEntity::getName,business.getName()); |
|
|
|
|
} |
|
|
|
|
if (!StringUtil.isEmpty(business.getStartTime())) { |
|
|
|
|
ge(OperAccessTaskEntity::getPlanStartTime,business.getStartTime()); |
|
|
|
|
} |
|
|
|
|
if (!StringUtil.isEmpty(business.getEndTime())) { |
|
|
|
|
le(OperAccessTaskEntity::getPlanStartTime,business.getEndTime()); |
|
|
|
|
} |
|
|
|
|
if(!StringUtil.isEmpty(business.getType()) && "1".equals(business.getType())){ |
|
|
|
|
eq(OperAccessTaskEntity::getStatus,4); |
|
|
|
|
} |
|
|
|
|
if(!StringUtil.isEmpty(business.getDeptIds())){ |
|
|
|
|
in(OperAccessTaskEntity::getCreateDept, Func.toLongList(",",business.getDeptIds())); |
|
|
|
|
} |
|
|
|
|
}}; |
|
|
|
|
IPage pages = accessTaskService.page(page, queryWrapper); |
|
|
|
|
pages.setRecords(OperAccessTaskWrapper.build().listVOExtras(pages.getRecords())); |
|
|
|
|
return pages; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|