| | |
| | | import java.util.Arrays; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * 项目管理基础信息表展示 |
| | |
| | | @ApiModelProperty("联系方式") |
| | | private String contact; |
| | | |
| | | /** 创建时间 */ |
| | | @ApiModelProperty("创建时间") |
| | | private Date gmtCreateTime; |
| | | |
| | | /** 更新时间 */ |
| | | @ApiModelProperty("更新时间") |
| | | private Date gmtUpdateTime; |
| | | |
| | | /** 更新人 */ |
| | | @ApiModelProperty("更新人") |
| | | private Long updateBy; |
| | |
| | | /** 创建人 */ |
| | | @ApiModelProperty("创建人") |
| | | private Long createBy; |
| | | |
| | | // TODO 关联其它几张表 |
| | | |
| | | public static ProjectInfoVO getVoByEntity(@NonNull ProjectInfo entity, ProjectInfoVO vo) { |
| | | if(vo == null) { |
| | |
| | | //主管部门转成list |
| | | String competentDepartment = entity.getCompetentDepartment(); |
| | | if(!StringUtils.isBlank(competentDepartment)){ |
| | | List<Long> competentDepartmentList = new ArrayList<>(); |
| | | String[] split = competentDepartment.split(","); |
| | | for (String s : split) { |
| | | Long.parseLong(s); |
| | | } |
| | | List<Long> list = Arrays.stream(competentDepartment.split(",")) |
| | | .map(Long::parseLong) |
| | | .collect(Collectors.toList()); |
| | | vo.setCompetentDepartmentList(list); |
| | | } |
| | | //管理归口转换 |
| | | String managementCentralization = entity.getManagementCentralization(); |
| | | if(!StringUtils.isBlank(managementCentralization)){ |
| | | Arrays.asList(managementCentralization.split(",")); |
| | | vo.setManagementCentralizationList(Arrays.asList(managementCentralization.split(","))); |
| | | } |
| | | return vo; |
| | | } |