diff --git a/mhd_oms/src/main/java/com/mhd/oms/application/service/erpCountry/ErpCountryApplicationService.java b/mhd_oms/src/main/java/com/mhd/oms/application/service/erpCountry/ErpCountryApplicationService.java index 04cbd0e98..247b4d0e0 100644 --- a/mhd_oms/src/main/java/com/mhd/oms/application/service/erpCountry/ErpCountryApplicationService.java +++ b/mhd_oms/src/main/java/com/mhd/oms/application/service/erpCountry/ErpCountryApplicationService.java @@ -61,6 +61,28 @@ public class ErpCountryApplicationService{ + } + + + public TableDataInfo queryList1(ErpCountryDTO erpCountryDTO) { + LoginUser loginUser = SecurityUtils.getLoginUser(); + if (loginUser != null) { + Long topOrganizationId = loginUser.getUserPo().getTopOrganizationId(); + if (topOrganizationId != null && topOrganizationId != 1) { + erpCountryDTO.setTopOrganizationId(topOrganizationId); + } + } + + List list = erpCountryMapper.queryList(erpCountryDTO); + + + TableDataInfo tableDataInfo = new TableDataInfo(); + tableDataInfo.setData(list); + tableDataInfo.setCode(200); + return tableDataInfo; + + + } public int insert(ErpCountryDTO erpCountryDTO) { diff --git a/mhd_oms/src/main/java/com/mhd/oms/interfaces/facade/erpCountry/ErpCountryApi.java b/mhd_oms/src/main/java/com/mhd/oms/interfaces/facade/erpCountry/ErpCountryApi.java index aa8a9449a..e5c9504f1 100644 --- a/mhd_oms/src/main/java/com/mhd/oms/interfaces/facade/erpCountry/ErpCountryApi.java +++ b/mhd_oms/src/main/java/com/mhd/oms/interfaces/facade/erpCountry/ErpCountryApi.java @@ -76,7 +76,7 @@ public class ErpCountryApi extends BaseController{ @ApiOperation("查询企业国别列表-下拉框用") @GetMapping("/countryList") public AjaxResult countryList(ErpCountryDTO erpCountryDTO){ - TableDataInfo tableDataInfo = erpCountryApplicationService.queryList(erpCountryDTO); + TableDataInfo tableDataInfo = erpCountryApplicationService.queryList1(erpCountryDTO); return AjaxResult.success(tableDataInfo.getData()); }