|
@@ -6,6 +6,7 @@ import com.baomidou.dynamic.datasource.toolkit.DynamicDataSourceContextHolder;
|
|
|
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.common.utils.Assert;
|
|
|
import com.fjhx.victoriatourist.entity.abnormal.dto.AbnormalInfoSelectDto;
|
|
|
import com.fjhx.victoriatourist.entity.abnormal.po.AbnormalInfo;
|
|
|
import com.fjhx.victoriatourist.entity.abnormal.vo.AbnormalInfoVo;
|
|
@@ -39,14 +40,14 @@ public class AbnormalInfoServiceImpl extends ServiceImpl<AbnormalInfoMapper, Abn
|
|
|
@Override
|
|
|
public Page<AbnormalInfoVo> getPage(AbnormalInfoSelectDto dto) {
|
|
|
IWrapper<AbnormalInfo> wrapper = getWrapper();
|
|
|
- wrapper.eq("ai",AbnormalInfo::getType, dto.getType())
|
|
|
- .eq("ai",AbnormalInfo::getStatus, dto.getStatus());
|
|
|
+ wrapper.eq("ai", AbnormalInfo::getType, dto.getType())
|
|
|
+ .eq("ai", AbnormalInfo::getStatus, dto.getStatus());
|
|
|
|
|
|
//采购人id过滤
|
|
|
wrapper.eq("p.create_user", dto.getPurchaseUserId());
|
|
|
wrapper.keyword(dto.getKeyword(),
|
|
|
- new SqlField("ai",AbnormalInfo::getTitle),
|
|
|
- new SqlField("ai",AbnormalInfo::getLinkCode),
|
|
|
+ new SqlField("ai", AbnormalInfo::getTitle),
|
|
|
+ new SqlField("ai", AbnormalInfo::getLinkCode),
|
|
|
new SqlField("pi.custom_code"),
|
|
|
new SqlField("pi.name")
|
|
|
);
|
|
@@ -66,7 +67,8 @@ public class AbnormalInfoServiceImpl extends ServiceImpl<AbnormalInfoMapper, Abn
|
|
|
wrapper.groupBy("ai.id");
|
|
|
|
|
|
wrapper.orderByDesc("ai", AbnormalInfo::getId);
|
|
|
- Page<AbnormalInfoVo> page = this.baseMapper.getPage(dto.getPage(), wrapper);
|
|
|
+ Assert.notEmpty(dto.getType(), "异常来源类型不能为空");
|
|
|
+ Page<AbnormalInfoVo> page = this.baseMapper.getPage(dto.getPage(), wrapper, dto.getType());
|
|
|
//赋值创建人名称
|
|
|
UserUtil.assignmentNickName(page.getRecords(), AbnormalInfo::getCreateUser, AbnormalInfoVo::setCreateUserName);
|
|
|
//赋值跟进人名称
|