|
@@ -2,9 +2,9 @@ package com.qunzhixinxi.hnqz.admin.service.impl;
|
|
|
|
|
|
import cn.hutool.core.collection.CollUtil;
|
|
|
import cn.hutool.core.collection.CollectionUtil;
|
|
|
-import cn.hutool.core.util.ArrayUtil;
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
|
|
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
@@ -256,6 +256,7 @@ public class WmDaAgentServiceImpl extends ServiceImpl<WmDaAgentMapper, WmDaAgent
|
|
|
agent.setAreaCodes(areas);
|
|
|
SysDept sysDept = sysDeptMapper.selectById(agent.getDeptId());
|
|
|
agent.setAbbr(sysDept != null ? sysDept.getAbbr() : "");
|
|
|
+ agent.setProvAbbr(sysDept != null ? sysDept.getProvAbbr() : "");
|
|
|
});
|
|
|
}
|
|
|
|
|
@@ -406,17 +407,16 @@ public class WmDaAgentServiceImpl extends ServiceImpl<WmDaAgentMapper, WmDaAgent
|
|
|
wmTaskTypeEntRef.setAgentId(wmDaAgent.getId());
|
|
|
wmTaskTypeEntRef.setDrugentId(null);
|
|
|
|
|
|
- String[] drugId = null;
|
|
|
+ LambdaQueryWrapper<WmTaskType> queryWrapper = Wrappers.<WmTaskType>lambdaQuery()
|
|
|
+ .eq(WmTaskType::getLevel1Id, wmDaAgent.getId())
|
|
|
+ .eq(WmTaskType::getDelFlag, CommonConstants.STATUS_NORMAL);
|
|
|
+
|
|
|
if (StrUtil.isNotBlank(wmDaAgent.getDrugEntId())) {
|
|
|
- drugId = wmDaAgent.getDrugEntId().contains(StrUtil.COMMA) ? wmDaAgent.getDrugEntId().split(StrUtil.COMMA) : new String[]{wmDaAgent.getDrugEntId()};
|
|
|
+ String[] drugId = wmDaAgent.getDrugEntId().contains(StrUtil.COMMA) ? wmDaAgent.getDrugEntId().split(StrUtil.COMMA) : new String[]{wmDaAgent.getDrugEntId()};
|
|
|
+ queryWrapper.in(WmTaskType::getDurgentId, Arrays.stream(drugId).collect(Collectors.toSet()));
|
|
|
}
|
|
|
|
|
|
- List<WmTaskType> list = wmTaskTypeMapper.selectList(Wrappers.<WmTaskType>lambdaQuery()
|
|
|
- .in(ArrayUtil.isNotEmpty(drugId), WmTaskType::getDurgentId, Arrays.stream(drugId).collect(Collectors.toSet()))
|
|
|
- .eq(WmTaskType::getLevel1Id, wmDaAgent.getId())
|
|
|
- .eq(WmTaskType::getDelFlag, CommonConstants.STATUS_NORMAL)
|
|
|
-
|
|
|
- );
|
|
|
+ List<WmTaskType> list = wmTaskTypeMapper.selectList(queryWrapper);
|
|
|
if (CollUtil.isNotEmpty(list)) {
|
|
|
return R.failed("一代积分规则已分配");
|
|
|
} else {
|