|
|
@ -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)) |
|
|
{ |
|
|
{ |
|
|
|