diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/org/OrgUnitController.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/org/OrgUnitController.java index 270a7fff6..3b230497b 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/org/OrgUnitController.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/org/OrgUnitController.java @@ -119,6 +119,14 @@ public class OrgUnitController { return success(BeanUtils.toBean(aDo, OrgUnitRespVO.class)); } + @GetMapping("/orgSngetnoe") + public CommonResult getSnoneorg(@RequestParam("orgSN") String orgSN) + { + OrgUnitDO aDo = Service.getSnonekey(orgSN); + return success(BeanUtils.toBean(aDo, OrgUnitRespVO.class)); + } + + @GetMapping("/getlist") @Operation(summary = "获得机构管理字典") @PreAuthorize("@ss.hasPermission('org::query')") diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/org/OrgUnitMapper.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/org/OrgUnitMapper.java index 8abda4dca..01111f514 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/org/OrgUnitMapper.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/org/OrgUnitMapper.java @@ -46,4 +46,8 @@ public interface OrgUnitMapper extends BaseMapperX { default OrgUnitDO selectByKey(String key) { return selectOne(OrgUnitDO::getOrgID, key); } + default OrgUnitDO selectBySnKey(String key) { + return selectOne(OrgUnitDO::getOrgSN, key); + } + } \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/org/OrgUnitService.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/org/OrgUnitService.java index 1c1ac466c..117b59617 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/org/OrgUnitService.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/org/OrgUnitService.java @@ -59,4 +59,6 @@ public interface OrgUnitService { List getOrgUnitList(); OrgUnitDO getonekey(String orgId); + + OrgUnitDO getSnonekey(String orgSn); } \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/org/OrgUnitServiceImpl.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/org/OrgUnitServiceImpl.java index 95261492f..a4f9ae4b6 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/org/OrgUnitServiceImpl.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/org/OrgUnitServiceImpl.java @@ -89,4 +89,9 @@ public class OrgUnitServiceImpl implements OrgUnitService { { return Mapper.selectByKey(orgId); } + + @Override + public OrgUnitDO getSnonekey(String orgSn) { + return Mapper.selectBySnKey(orgSn); + } } \ No newline at end of file