|
@@ -807,12 +807,16 @@ public class WmDaAgentController {
|
|
} else if (byId.getLevel() == 3) {
|
|
} else if (byId.getLevel() == 3) {
|
|
// WmDaAgent anId = wmDaAgentService.selectByDeptId(byId.getDeptId());
|
|
// WmDaAgent anId = wmDaAgentService.selectByDeptId(byId.getDeptId());
|
|
List<WmRelation> wmRelation = wmRelationMapper.selectByUpId(byId.getDeptId());
|
|
List<WmRelation> wmRelation = wmRelationMapper.selectByUpId(byId.getDeptId());
|
|
- //获取上级药企和cso自己
|
|
|
|
- for (WmRelation wmRelation1 : wmRelation) {
|
|
|
|
- wmDaDrugEnts = wmDaDrugEntService.selectEntNameByByDeptIds(wmRelation1.getDownId());
|
|
|
|
|
|
+ if (CollectionUtil.isEmpty(wmRelation)) {
|
|
|
|
+ // 如果为空,则直接返回当前自己的
|
|
|
|
+ wmDaDrugEnts = wmDaDrugEntService.selectEntNameByByDeptIds(byId.getDeptId());
|
|
|
|
+ } else {
|
|
|
|
+ //获取上级药企和cso自己
|
|
|
|
+ for (WmRelation wmRelation1 : wmRelation) {
|
|
|
|
+ wmDaDrugEnts = wmDaDrugEntService.selectEntNameByByDeptIds(wmRelation1.getDownId());
|
|
// wmDaDrugEnts = wmDaDrugEntService.selectEntNameByDeptId(byId.getDeptId());
|
|
// wmDaDrugEnts = wmDaDrugEntService.selectEntNameByDeptId(byId.getDeptId());
|
|
|
|
+ }
|
|
}
|
|
}
|
|
-
|
|
|
|
}
|
|
}
|
|
return R.ok(wmDaDrugEnts);
|
|
return R.ok(wmDaDrugEnts);
|
|
}
|
|
}
|