|
@@ -15,6 +15,7 @@ import com.ruoyi.basicData.service.ITWarehouseService;
|
|
import com.ruoyi.common.constant.UserConstants;
|
|
import com.ruoyi.common.constant.UserConstants;
|
|
import com.ruoyi.common.core.domain.AjaxResult;
|
|
import com.ruoyi.common.core.domain.AjaxResult;
|
|
import com.ruoyi.common.core.domain.TreeSelect;
|
|
import com.ruoyi.common.core.domain.TreeSelect;
|
|
|
|
+import com.ruoyi.common.core.domain.entity.SysDictData;
|
|
import com.ruoyi.common.core.domain.entity.SysUser;
|
|
import com.ruoyi.common.core.domain.entity.SysUser;
|
|
import com.ruoyi.common.core.domain.entity.TWarehouse;
|
|
import com.ruoyi.common.core.domain.entity.TWarehouse;
|
|
import com.ruoyi.common.core.domain.entity.TWarehouseImport;
|
|
import com.ruoyi.common.core.domain.entity.TWarehouseImport;
|
|
@@ -155,13 +156,31 @@ public class TWarehouseServiceImpl implements ITWarehouseService {
|
|
annex.setfActid(AnnexActEnum.WAREHOUSE.getType());
|
|
annex.setfActid(AnnexActEnum.WAREHOUSE.getType());
|
|
List<TAnnex> annexList = annexMapper.selectListByPId(annex);
|
|
List<TAnnex> annexList = annexMapper.selectListByPId(annex);
|
|
List<WarehouseInfoVO> tWarehouseList = new ArrayList<>();
|
|
List<WarehouseInfoVO> tWarehouseList = new ArrayList<>();
|
|
|
|
+ List<SysDictData> fPropertiesList = sysDictDataService.selectList("warehouse_properties");
|
|
|
|
+ List<SysDictData> fTypeList = sysDictDataService.selectList("warehouse_type");
|
|
|
|
+ List<SysDictData> fGoodsTypeList = sysDictDataService.selectList("data_goods_category");
|
|
for (TWarehouse tWarehouse1 : list) {
|
|
for (TWarehouse tWarehouse1 : list) {
|
|
WarehouseInfoVO warehouseInfoVO = new WarehouseInfoVO();
|
|
WarehouseInfoVO warehouseInfoVO = new WarehouseInfoVO();
|
|
BeanUtils.copyProperties(tWarehouse1, warehouseInfoVO);
|
|
BeanUtils.copyProperties(tWarehouse1, warehouseInfoVO);
|
|
- warehouseInfoVO.setfProperties(sysDictDataService.selectDictLabel("warehouse_properties", tWarehouse1.getfProperties()));
|
|
|
|
- warehouseInfoVO.setfType(sysDictDataService.selectDictLabel("warehouse_type", tWarehouse1.getfType()));
|
|
|
|
- warehouseInfoVO.setfGoodsType(sysDictDataService.selectDictLabels("data_goods_category", tWarehouse1.getfGoodsType()));
|
|
|
|
- if (ObjectUtils.isNotNull(annexList) && annexList.size() > 0) {
|
|
|
|
|
|
+ if (!fPropertiesList.isEmpty() && ObjectUtils.isNotNull(tWarehouse1.getfProperties())){
|
|
|
|
+ List<SysDictData> fProperties = fPropertiesList.stream().filter(e-> tWarehouse1.getfProperties().contains(e.getDictLabel())).collect(Collectors.toList());
|
|
|
|
+ if (!fProperties.isEmpty()){
|
|
|
|
+ warehouseInfoVO.setfProperties(fProperties.stream().map(SysDictData::getDictLabel).collect(Collectors.joining(",")));
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if (!fTypeList.isEmpty() && ObjectUtils.isNotNull(tWarehouse1.getfType())){
|
|
|
|
+ List<SysDictData> fType = fTypeList.stream().filter(e-> tWarehouse1.getfType().contains(e.getDictLabel())).collect(Collectors.toList());
|
|
|
|
+ if (!fType.isEmpty()){
|
|
|
|
+ warehouseInfoVO.setfType(fType.stream().map(SysDictData::getDictLabel).collect(Collectors.joining(",")));
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if (!fGoodsTypeList.isEmpty() && ObjectUtils.isNotNull(tWarehouse1.getfGoodsType())){
|
|
|
|
+ List<SysDictData> fGoodsType = fGoodsTypeList.stream().filter(e-> tWarehouse1.getfGoodsType().contains(e.getDictLabel())).collect(Collectors.toList());
|
|
|
|
+ if (!fGoodsType.isEmpty()){
|
|
|
|
+ warehouseInfoVO.setfGoodsType(fGoodsType.stream().map(SysDictData::getDictLabel).collect(Collectors.joining(",")));
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if (ObjectUtils.isNotNull(annexList) && !annexList.isEmpty()) {
|
|
warehouseInfoVO.setAnnexList(annexList.stream().filter(e -> ObjectUtils.isNotNull(e.getfPid()) && e.getfPid().equals(tWarehouse1.getfId())).collect(Collectors.toList()));
|
|
warehouseInfoVO.setAnnexList(annexList.stream().filter(e -> ObjectUtils.isNotNull(e.getfPid()) && e.getfPid().equals(tWarehouse1.getfId())).collect(Collectors.toList()));
|
|
}
|
|
}
|
|
tWarehouseList.add(warehouseInfoVO);
|
|
tWarehouseList.add(warehouseInfoVO);
|