diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/system/controller/SysDictDataController.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/system/controller/SysDictDataController.java index 38b9eb8..7e01e0e 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/system/controller/SysDictDataController.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/system/controller/SysDictDataController.java @@ -107,6 +107,24 @@ public class SysDictDataController extends BaseController @GetMapping(value = "/type/{dictType}") public AjaxResult dictType(@PathVariable String dictType) { + if(StringUtils.equals(dictType,"business_ccwz")) { + StorageLocationSearchForm form = new StorageLocationSearchForm(); + List superiorAndSubordinate = sysDeptService.getSuperiorAndSubordinate(SecurityUtils.getLoginUser().getSysUser().getDeptId()); + List deptIdList = superiorAndSubordinate.stream().map(SysDept::getDeptId).collect(Collectors.toList()); + form.setDeptIdList(deptIdList); + form.setStatus(NormalEnum.yes.getValue()); + List list = storageLocationService.queryList(form); + List data = new ArrayList<>(); + for (StorageLocation storageLocation : list) { + SysDictData sysDictData = new SysDictData(); + sysDictData.setDictType("business_ccwz");; + sysDictData.setDictLabel(storageLocation.getLocation() + "/" + storageLocation.getName() + "/" + storageLocation.getShelfPlacement()); + sysDictData.setDictValue(storageLocation.getLocation() + "/" + storageLocation.getName() + "/" + storageLocation.getShelfPlacement()); + sysDictData.setRemark(storageLocation.getCompartment()); + data.add(sysDictData); + } + return success(data); + } List data = dictTypeService.selectDictDataByType(dictType); if (StringUtils.isNull(data)) {