Browse Source

feat:[系统管理][存储位置选择器]

master
HanLong 4 weeks ago
parent
commit
e1d92fc725
1 changed files with 18 additions and 0 deletions
  1. +18
    -0
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/system/controller/SysDictDataController.java

+ 18
- 0
hxhq-modules/hxhq-system/src/main/java/com/hxhq/system/controller/SysDictDataController.java View File

@ -107,6 +107,24 @@ public class SysDictDataController extends BaseController
@GetMapping(value = "/type/{dictType}") @GetMapping(value = "/type/{dictType}")
public AjaxResult dictType(@PathVariable String dictType) public AjaxResult dictType(@PathVariable String dictType)
{ {
if(StringUtils.equals(dictType,"business_ccwz")) {
StorageLocationSearchForm form = new StorageLocationSearchForm();
List<SysDept> superiorAndSubordinate = sysDeptService.getSuperiorAndSubordinate(SecurityUtils.getLoginUser().getSysUser().getDeptId());
List<Long> deptIdList = superiorAndSubordinate.stream().map(SysDept::getDeptId).collect(Collectors.toList());
form.setDeptIdList(deptIdList);
form.setStatus(NormalEnum.yes.getValue());
List<StorageLocation> list = storageLocationService.queryList(form);
List<SysDictData> 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<SysDictData> data = dictTypeService.selectDictDataByType(dictType); List<SysDictData> data = dictTypeService.selectDictDataByType(dictType);
if (StringUtils.isNull(data)) if (StringUtils.isNull(data))
{ {

Loading…
Cancel
Save