Browse Source

项目归集

tags/24080901
PoffyZhang 1 year ago
parent
commit
2e24ec1605
1 changed files with 6 additions and 1 deletions
  1. +6
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/ProjectCollectionManage.java

+ 6
- 1
pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/ProjectCollectionManage.java View File

@@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ningdatech.basic.function.VUtils; import com.ningdatech.basic.function.VUtils;
import com.ningdatech.basic.model.PageVo; import com.ningdatech.basic.model.PageVo;
import com.ningdatech.pmapi.common.constant.RegionConst;
import com.ningdatech.pmapi.common.helper.RegionCacheHelper; import com.ningdatech.pmapi.common.helper.RegionCacheHelper;
import com.ningdatech.pmapi.projectdeclared.utils.GenerateProjectCodeUtil; import com.ningdatech.pmapi.projectdeclared.utils.GenerateProjectCodeUtil;
import com.ningdatech.pmapi.projectlib.model.dto.ProjectCollectionSaveDTO; import com.ningdatech.pmapi.projectlib.model.dto.ProjectCollectionSaveDTO;
@@ -78,7 +79,11 @@ public class ProjectCollectionManage {
} }


List<ProjectCollectionVO> res = page.getRecords().stream() List<ProjectCollectionVO> res = page.getRecords().stream()
.map(record -> BeanUtil.copyProperties(record,ProjectCollectionVO.class))
.map(record -> {
ProjectCollectionVO vo = BeanUtil.copyProperties(record, ProjectCollectionVO.class);
vo.setArea(regionCacheHelper.getDisplayName(record.getAreaCode(), RegionConst.RL_COUNTY));
return vo;
})
.collect(Collectors.toList()); .collect(Collectors.toList());


return PageVo.of(res,page.getTotal()); return PageVo.of(res,page.getTotal());


Loading…
Cancel
Save