|
|
@ -7,9 +7,8 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
|
|
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
|
|
|
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
|
|
|
|
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
|
|
|
import com.google.common.collect.Lists; |
|
|
|
import com.google.common.collect.Lists; |
|
|
|
import com.hnac.hzims.equipment.entity.EmInfoEntity; |
|
|
|
|
|
|
|
import com.hnac.hzims.equipment.entity.PlanGenerationEntity; |
|
|
|
|
|
|
|
import com.hnac.hzims.message.MessageConstants; |
|
|
|
import com.hnac.hzims.message.MessageConstants; |
|
|
|
import com.hnac.hzims.message.dto.MessagePushRecordDto; |
|
|
|
import com.hnac.hzims.message.dto.MessagePushRecordDto; |
|
|
|
import com.hnac.hzims.message.fegin.IMessageClient; |
|
|
|
import com.hnac.hzims.message.fegin.IMessageClient; |
|
|
@ -36,7 +35,6 @@ import com.hnac.hzims.operational.duty.vo.ImsRecVo; |
|
|
|
import com.hnac.hzims.operational.duty.vo.ImsSchedulingVo; |
|
|
|
import com.hnac.hzims.operational.duty.vo.ImsSchedulingVo; |
|
|
|
import com.hnac.hzims.operational.duty.wrapper.ImsDutyRecWrapper; |
|
|
|
import com.hnac.hzims.operational.duty.wrapper.ImsDutyRecWrapper; |
|
|
|
import com.hnac.hzims.operational.station.service.IStationService; |
|
|
|
import com.hnac.hzims.operational.station.service.IStationService; |
|
|
|
import com.hnac.hzims.ticket.allTicket.dto.TicketStatisticDTO; |
|
|
|
|
|
|
|
import com.hnac.hzims.ticket.standardTicket.entity.StandardTicketInfoEntity; |
|
|
|
import com.hnac.hzims.ticket.standardTicket.entity.StandardTicketInfoEntity; |
|
|
|
import com.hnac.hzims.ticket.workTicket.entity.WorkTicketInfoEntity; |
|
|
|
import com.hnac.hzims.ticket.workTicket.entity.WorkTicketInfoEntity; |
|
|
|
import com.hnac.hzims.ticket.workTicket.feign.ITicketInfoClient; |
|
|
|
import com.hnac.hzims.ticket.workTicket.feign.ITicketInfoClient; |
|
|
@ -45,7 +43,6 @@ import com.hnac.hzinfo.inspect.plan.feign.IInspectPlanClient; |
|
|
|
import com.hnac.hzinfo.inspect.plan.vo.PlanVO; |
|
|
|
import com.hnac.hzinfo.inspect.plan.vo.PlanVO; |
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
import org.springblade.core.log.exception.ServiceException; |
|
|
|
import org.springblade.core.log.exception.ServiceException; |
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
|
|
|
|
|
|
|
import org.springblade.core.secure.utils.AuthUtil; |
|
|
|
import org.springblade.core.secure.utils.AuthUtil; |
|
|
|
import org.springblade.core.tool.api.R; |
|
|
|
import org.springblade.core.tool.api.R; |
|
|
|
import org.springblade.core.tool.support.Kv; |
|
|
|
import org.springblade.core.tool.support.Kv; |
|
|
@ -65,7 +62,6 @@ import org.springframework.util.Assert; |
|
|
|
import org.springframework.util.ObjectUtils; |
|
|
|
import org.springframework.util.ObjectUtils; |
|
|
|
|
|
|
|
|
|
|
|
import javax.annotation.Resource; |
|
|
|
import javax.annotation.Resource; |
|
|
|
import javax.xml.ws.WebServiceException; |
|
|
|
|
|
|
|
import java.math.BigDecimal; |
|
|
|
import java.math.BigDecimal; |
|
|
|
import java.math.RoundingMode; |
|
|
|
import java.math.RoundingMode; |
|
|
|
import java.sql.Time; |
|
|
|
import java.sql.Time; |
|
|
@ -1611,6 +1607,62 @@ public class ImsDutyRecServiceImpl extends ServiceImpl<ImsDutyRecMapper, ImsDuty |
|
|
|
return R.data(dutyLogEntity); |
|
|
|
return R.data(dutyLogEntity); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* 交接班记录查询 |
|
|
|
|
|
|
|
* @param vo |
|
|
|
|
|
|
|
* @return |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
|
|
public List<ImsDutyRecVO> dutyRecs(ImsDutyRecVO vo) { |
|
|
|
|
|
|
|
List<ImsDutyRecEntity> recs = this.list(new LambdaQueryWrapper<ImsDutyRecEntity>() {{ |
|
|
|
|
|
|
|
orderByDesc(ImsDutyRecEntity::getExecTime); |
|
|
|
|
|
|
|
if (StringUtil.isNotBlank(vo.getDutyInfo())) { |
|
|
|
|
|
|
|
like(ImsDutyRecEntity::getDutyInfo, vo.getDutyInfo()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (StringUtil.isNotBlank(vo.getAcceptInfo())) { |
|
|
|
|
|
|
|
like(ImsDutyRecEntity::getAcceptInfo, vo.getAcceptInfo()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (StringUtil.isNotBlank(vo.getLeftProblem())) { |
|
|
|
|
|
|
|
like(ImsDutyRecEntity::getLeftProblem, vo.getLeftProblem()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (StringUtil.isNotBlank(vo.getStartDate())) { |
|
|
|
|
|
|
|
ge(ImsDutyRecEntity::getExecTime, vo.getStartDate()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (StringUtil.isNotBlank(vo.getEndDate())) { |
|
|
|
|
|
|
|
le(ImsDutyRecEntity::getExecTime, vo.getEndDate()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (ObjectUtil.isNotEmpty(vo.getCreateDept())) { |
|
|
|
|
|
|
|
eq(ImsDutyRecEntity::getCreateDept, vo.getCreateDept()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}}); |
|
|
|
|
|
|
|
List<ImsDutyRecVO> records = ImsDutyRecWrapper.build().listVO(recs); |
|
|
|
|
|
|
|
if (CollectionUtil.isEmpty(records)) { |
|
|
|
|
|
|
|
return new ArrayList<>(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return records.stream().peek(record->{ |
|
|
|
|
|
|
|
ImsSchedulingVo imsSchedulingVo = imsDutyMainService.getByIdOneV2(record.getDutyId(), null); |
|
|
|
|
|
|
|
record.setHeadDutyMainVo(imsSchedulingVo); |
|
|
|
|
|
|
|
ImsSchedulingVo carryDutyMainVo = imsDutyMainMapper.selectByPreDutyIdOne(Optional.ofNullable(imsSchedulingVo).map(ImsSchedulingVo::getId).orElse(null)); |
|
|
|
|
|
|
|
if (ObjectUtil.isNotEmpty(carryDutyMainVo)){ |
|
|
|
|
|
|
|
if (StringUtil.isBlank(carryDutyMainVo.getGroupName())){ |
|
|
|
|
|
|
|
carryDutyMainVo.setGroupName("临时班组"); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
record.setCarryDutyMainVo(carryDutyMainVo); |
|
|
|
|
|
|
|
// 机构名称
|
|
|
|
|
|
|
|
R<String> result = sysClient.getDeptName(record.getCreateDept()); |
|
|
|
|
|
|
|
if (result.isSuccess() && ObjectUtil.isNotEmpty(result.getData())) { |
|
|
|
|
|
|
|
record.setStationName(result.getData()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
Long dutyId = record.getDutyId(); |
|
|
|
|
|
|
|
ImsDutyLogEntity dutyLogEntity = imsDutyLogService.getOne(new LambdaQueryWrapper<ImsDutyLogEntity>() {{ |
|
|
|
|
|
|
|
eq(ImsDutyLogEntity::getDutyId, dutyId); |
|
|
|
|
|
|
|
last(" limit 1;"); |
|
|
|
|
|
|
|
}}); |
|
|
|
|
|
|
|
record.setImsDutyLogEntity(dutyLogEntity); |
|
|
|
|
|
|
|
}).collect(Collectors.toList()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private String getManagerName(ImsDutyMainEntity mainEntity) { |
|
|
|
private String getManagerName(ImsDutyMainEntity mainEntity) { |
|
|
|
String managerName=""; |
|
|
|
String managerName=""; |
|
|
|