|
|
@ -1,6 +1,8 @@
|
|
|
|
package com.glxp.api.service.dev.impl;
|
|
|
|
package com.glxp.api.service.dev.impl;
|
|
|
|
|
|
|
|
|
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
|
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
|
import com.github.pagehelper.PageHelper;
|
|
|
|
import com.github.pagehelper.PageHelper;
|
|
|
@ -24,6 +26,7 @@ import org.springframework.stereotype.Service;
|
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
|
|
|
|
|
|
import java.time.LocalDateTime;
|
|
|
|
import java.time.LocalDateTime;
|
|
|
|
|
|
|
|
import java.util.Arrays;
|
|
|
|
import java.util.List;
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
@ -43,16 +46,43 @@ public class DeviceRepairApplyServiceImpl extends ServiceImpl<DeviceRepairApplyM
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public List<DeviceRepairApplyEntity> pageList(DeviceRepairApplyQuery query) {
|
|
|
|
public List<DeviceRepairApplyEntity> pageList(DeviceRepairApplyQuery query) {
|
|
|
|
|
|
|
|
String acceptInfo = query.getAcceptInfo();
|
|
|
|
|
|
|
|
String repairInfo = query.getRepairInfo();
|
|
|
|
if (query.getPage() != null) {
|
|
|
|
if (query.getPage() != null) {
|
|
|
|
PageHelper.startPage(query.getPage(), query.getLimit());
|
|
|
|
PageHelper.startPage(query.getPage(), query.getLimit());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
List<DeviceRepairApplyEntity> list = super.list(Wrappers.lambdaQuery(DeviceRepairApplyEntity.class)
|
|
|
|
LambdaQueryWrapper<DeviceRepairApplyEntity> wrapper = Wrappers.lambdaQuery(DeviceRepairApplyEntity.class);
|
|
|
|
.eq(query.getApplyId() != null, DeviceRepairApplyEntity::getId, query.getApplyId())
|
|
|
|
wrapper.eq(query.getApplyId() != null, DeviceRepairApplyEntity::getId, query.getApplyId())
|
|
|
|
.eq(query.getStatus() != null, DeviceRepairApplyEntity::getStatus, query.getStatus())
|
|
|
|
.eq(query.getStatus() != null, DeviceRepairApplyEntity::getStatus, query.getStatus())
|
|
|
|
.eq(query.getConfirmUserId() != null, DeviceRepairApplyEntity::getConfirmUserId, query.getConfirmUserId())
|
|
|
|
.eq(query.getConfirmUserId() != null, DeviceRepairApplyEntity::getConfirmUserId, query.getConfirmUserId())
|
|
|
|
.eq(StrUtil.isNotBlank(query.getApplyDeptCode()), DeviceRepairApplyEntity::getApplyDeptCode, query.getApplyDeptCode())
|
|
|
|
.eq(StrUtil.isNotBlank(query.getApplyDeptCode()), DeviceRepairApplyEntity::getApplyDeptCode, query.getApplyDeptCode())
|
|
|
|
.orderByDesc(DeviceRepairApplyEntity::getStatus, DeviceRepairApplyEntity::getApplyTime)
|
|
|
|
.orderByDesc(DeviceRepairApplyEntity::getStatus, DeviceRepairApplyEntity::getApplyTime);
|
|
|
|
);
|
|
|
|
if (StringUtils.isNotBlank(acceptInfo)){
|
|
|
|
|
|
|
|
wrapper.and(warpper->warpper.like(DeviceRepairApplyEntity::getConfirmDeptCode, acceptInfo)
|
|
|
|
|
|
|
|
.or()
|
|
|
|
|
|
|
|
.like(DeviceRepairApplyEntity::getConfirmDeptName, acceptInfo)
|
|
|
|
|
|
|
|
.or()
|
|
|
|
|
|
|
|
.like(DeviceRepairApplyEntity::getConfirmUserId, acceptInfo)
|
|
|
|
|
|
|
|
.or()
|
|
|
|
|
|
|
|
.like(DeviceRepairApplyEntity::getConfirmUserName, acceptInfo)
|
|
|
|
|
|
|
|
.or()
|
|
|
|
|
|
|
|
.like(DeviceRepairApplyEntity::getConfirmPhone, acceptInfo));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (StringUtils.isNotBlank(repairInfo)){
|
|
|
|
|
|
|
|
wrapper.and(warpper->warpper.like(DeviceRepairApplyEntity::getApplyDeptCode, repairInfo)
|
|
|
|
|
|
|
|
.or()
|
|
|
|
|
|
|
|
.like(DeviceRepairApplyEntity::getApplyDeptName, repairInfo)
|
|
|
|
|
|
|
|
.or()
|
|
|
|
|
|
|
|
.like(DeviceRepairApplyEntity::getApplyUserId, repairInfo)
|
|
|
|
|
|
|
|
.or()
|
|
|
|
|
|
|
|
.like(DeviceRepairApplyEntity::getApplyUserName, repairInfo)
|
|
|
|
|
|
|
|
.or()
|
|
|
|
|
|
|
|
.like(DeviceRepairApplyEntity::getApplyUserPhone, repairInfo)
|
|
|
|
|
|
|
|
.or()
|
|
|
|
|
|
|
|
.like(DeviceRepairApplyEntity::getId, repairInfo));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<DeviceRepairApplyEntity> list = super.list(wrapper);
|
|
|
|
return list;
|
|
|
|
return list;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|