|
@@ -1,18 +1,18 @@
|
|
|
package com.fjhx.victoriatourist.service.abnormal.impl;
|
|
|
|
|
|
import com.baomidou.dynamic.datasource.annotation.DS;
|
|
|
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
import com.fjhx.common.constant.SourceConstant;
|
|
|
+import com.fjhx.victoriatourist.entity.abnormal.dto.AbnormalInfoSelectDto;
|
|
|
import com.fjhx.victoriatourist.entity.abnormal.po.AbnormalInfo;
|
|
|
+import com.fjhx.victoriatourist.entity.abnormal.vo.AbnormalInfoVo;
|
|
|
import com.fjhx.victoriatourist.mapper.abnormal.AbnormalInfoMapper;
|
|
|
import com.fjhx.victoriatourist.service.abnormal.AbnormalInfoService;
|
|
|
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
+import com.ruoyi.common.utils.wrapper.IWrapper;
|
|
|
import com.ruoyi.common.utils.wrapper.SqlField;
|
|
|
import com.ruoyi.system.utils.UserUtil;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
-import com.fjhx.victoriatourist.entity.abnormal.vo.AbnormalInfoVo;
|
|
|
-import com.fjhx.victoriatourist.entity.abnormal.dto.AbnormalInfoSelectDto;
|
|
|
-import com.ruoyi.common.utils.wrapper.IWrapper;
|
|
|
|
|
|
|
|
|
/**
|
|
@@ -20,7 +20,7 @@ import com.ruoyi.common.utils.wrapper.IWrapper;
|
|
|
* 异常记录 服务实现类
|
|
|
* </p>
|
|
|
*
|
|
|
- * @author
|
|
|
+ * @author
|
|
|
* @since 2023-04-11
|
|
|
*/
|
|
|
@DS(SourceConstant.VICTORIATOURIST)
|
|
@@ -32,6 +32,9 @@ public class AbnormalInfoServiceImpl extends ServiceImpl<AbnormalInfoMapper, Abn
|
|
|
IWrapper<AbnormalInfo> wrapper = getWrapper();
|
|
|
wrapper.eq(AbnormalInfo::getType, dto.getType())
|
|
|
.eq(AbnormalInfo::getStatus, dto.getStatus());
|
|
|
+
|
|
|
+ //采购人id过滤
|
|
|
+ wrapper.eq("p.create_user", dto.getPurchaseUserId());
|
|
|
wrapper.keyword(dto.getKeyword(),
|
|
|
new SqlField(AbnormalInfo::getTitle),
|
|
|
new SqlField(AbnormalInfo::getLinkCode)
|
|
@@ -39,8 +42,12 @@ public class AbnormalInfoServiceImpl extends ServiceImpl<AbnormalInfoMapper, Abn
|
|
|
|
|
|
wrapper.orderByDesc("ai", AbnormalInfo::getId);
|
|
|
Page<AbnormalInfoVo> page = this.baseMapper.getPage(dto.getPage(), wrapper);
|
|
|
- //赋值最近操作人
|
|
|
- UserUtil.assignmentNickName(page.getRecords(),AbnormalInfo::getUpdateUser,AbnormalInfoVo::setHandleUserName);
|
|
|
+ //赋值创建人名称
|
|
|
+ UserUtil.assignmentNickName(page.getRecords(), AbnormalInfo::getCreateUser, AbnormalInfoVo::setCreateUserName);
|
|
|
+ //赋值跟进人名称
|
|
|
+ UserUtil.assignmentNickName(page.getRecords(), AbnormalInfo::getHandleUser, AbnormalInfoVo::setHandleUserName);
|
|
|
+ //赋值采购人名称
|
|
|
+ UserUtil.assignmentNickName(page.getRecords(), AbnormalInfoVo::getPurchaseUserId, AbnormalInfoVo::setPurchaseUserName);
|
|
|
return page;
|
|
|
}
|
|
|
|