|
|
|
|
@ -93,7 +93,17 @@ public class TicketManagementServiceImpl implements TicketManagementService {
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public PageResult<TicketManagementDO> getTicketManagementPage(TicketManagementPageReqVO pageReqVO) {
|
|
|
|
|
if(StringUtils.isNotBlank(pageReqVO.getDeviceLineId())||StringUtils.isNotBlank(pageReqVO.getPlanNo())) {
|
|
|
|
|
if (pageReqVO.getDeviceId() != null) {
|
|
|
|
|
pageReqVO.setPlanNo(null);
|
|
|
|
|
DeviceLedgerDO deviceLedgerDO = deviceLedgerMapper.selectById(pageReqVO.getDeviceId());
|
|
|
|
|
if (deviceLedgerDO != null
|
|
|
|
|
&& StringUtils.isNotBlank(deviceLedgerDO.getDeviceName())
|
|
|
|
|
&& matchesDeviceLine(deviceLedgerDO, pageReqVO.getDeviceLineId())) {
|
|
|
|
|
pageReqVO.setMachineryNames(Collections.singletonList(deviceLedgerDO.getDeviceName()));
|
|
|
|
|
} else {
|
|
|
|
|
pageReqVO.setMachineryNames(emptyResultMachineryNames());
|
|
|
|
|
}
|
|
|
|
|
} else if(StringUtils.isNotBlank(pageReqVO.getDeviceLineId())||StringUtils.isNotBlank(pageReqVO.getPlanNo())) {
|
|
|
|
|
LambdaQueryWrapperX<DeviceLedgerDO> deviceLedgerDOLambdaQueryWrapperX = new LambdaQueryWrapperX<>();
|
|
|
|
|
if(StringUtils.isNotBlank(pageReqVO.getDeviceLineId()))
|
|
|
|
|
deviceLedgerDOLambdaQueryWrapperX.eqIfPresent(DeviceLedgerDO::getDeviceLine, pageReqVO.getDeviceLineId());
|
|
|
|
|
@ -109,15 +119,23 @@ public class TicketManagementServiceImpl implements TicketManagementService {
|
|
|
|
|
if(CollUtil.isNotEmpty(machineryNames)){
|
|
|
|
|
pageReqVO.setMachineryNames(machineryNames);
|
|
|
|
|
}else {
|
|
|
|
|
List<String> objects = new ArrayList<>();
|
|
|
|
|
objects.add("adsaf");
|
|
|
|
|
pageReqVO.setMachineryNames(objects);
|
|
|
|
|
pageReqVO.setMachineryNames(emptyResultMachineryNames());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return ticketManagementMapper.selectPage(pageReqVO);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private boolean matchesDeviceLine(DeviceLedgerDO deviceLedgerDO, String deviceLineId) {
|
|
|
|
|
return StringUtils.isBlank(deviceLineId)
|
|
|
|
|
|| (deviceLedgerDO.getDeviceLine() != null
|
|
|
|
|
&& Objects.equals(String.valueOf(deviceLedgerDO.getDeviceLine()), deviceLineId));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private List<String> emptyResultMachineryNames() {
|
|
|
|
|
return Collections.singletonList("adsaf");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
|
|
public void batchUpdateJobStatus(TicketManagementBatchUpdateReqVO reqVO) {
|
|
|
|
|
|