|
@@ -599,7 +599,7 @@ public class WmDaAgentServiceImpl extends ServiceImpl<WmDaAgentMapper, WmDaAgent
|
|
|
}
|
|
|
|
|
|
// 如果是二级cso 则允许更新区域
|
|
|
- if (sysDept.getLevel() == 4 && CollUtil.isNotEmpty(wmDaAgent.getAreaCodes())){
|
|
|
+ if (sysDept.getLevel() == 4 && CollUtil.isNotEmpty(wmDaAgent.getAreaCodes())) {
|
|
|
enterpriseAreaService.updateRelation(Long.valueOf(sysDept.getDeptId()), wmDaAgent.getAreaCodes());
|
|
|
}
|
|
|
|
|
@@ -674,6 +674,20 @@ public class WmDaAgentServiceImpl extends ServiceImpl<WmDaAgentMapper, WmDaAgent
|
|
|
wmDeptList.add(wmDept);
|
|
|
}
|
|
|
return wmDeptList;
|
|
|
+ } else if (SecurityUtils.getRoles().contains(50)) {
|
|
|
+
|
|
|
+ List<SysDept> sysDepts = sysDeptMapper.selectList(Wrappers.<SysDept>lambdaQuery()
|
|
|
+ .gt(SysDept::getLevel, 1)
|
|
|
+ .eq(SysDept::getDelFlag, CommonConstants.STATUS_NORMAL));
|
|
|
+
|
|
|
+ for (SysDept dept : sysDepts) {
|
|
|
+ WmDept wmDept = new WmDept();
|
|
|
+ wmDept.setDeptId(Integer.parseInt(String.valueOf(dept.getDeptId())));
|
|
|
+ wmDept.setName(dept.getName());
|
|
|
+ wmDeptList.add(wmDept);
|
|
|
+ }
|
|
|
+ return wmDeptList;
|
|
|
+
|
|
|
} else {
|
|
|
|
|
|
final List<SysDeptRelation> sysDeptRelationList = new ArrayList<>();
|