| | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.lang.NonNull; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * 项目管理基础信息表展示 |
| | |
| | | |
| | | /** 主管部门(对应审批部门id) */ |
| | | @ApiModelProperty("主管部门(对应审批部门id)") |
| | | private Integer competentDepartment; |
| | | private List<Long> competentDepartmentList; |
| | | |
| | | /** 行政区域 */ |
| | | @ApiModelProperty("行政区域") |
| | | private String areaCode; |
| | | private String area; |
| | | |
| | | /** 管理归口 (0基本建设(发改), 1更新改造(经信), 2单纯购置(发改), 3信息化(发改), 4其他投资) */ |
| | | @ApiModelProperty("管理归口 (0基本建设(发改), 1更新改造(经信), 2单纯购置(发改), 3信息化(发改), 4其他投资)") |
| | | private String managementCentralization; |
| | | private List<String> managementCentralizationList; |
| | | |
| | | /** 项目审批类型 */ |
| | | @ApiModelProperty("项目审批类型") |
| | | private String projectApprovalType; |
| | | |
| | | /** 投资目录(?) */ |
| | | @ApiModelProperty("投资目录(?)") |
| | | private String investmentCatalogue; |
| | | |
| | | /** 重点分类 (0省重点项目, 1遂宁市重点项目, 2.射洪市重点项目, 3.一般项目) */ |
| | | @ApiModelProperty("重点分类 (0省重点项目, 1遂宁市重点项目, 2.射洪市重点项目, 3.一般项目)") |
| | |
| | | @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) { |
| | | vo = new ProjectInfoVO(); |
| | | } |
| | | BeanUtils.copyProperties(entity, vo); |
| | | //主管部门转成list |
| | | String competentDepartment = entity.getCompetentDepartment(); |
| | | if(!StringUtils.isBlank(competentDepartment)){ |
| | | List<Long> list = Arrays.stream(competentDepartment.split(",")) |
| | | .map(Long::parseLong) |
| | | .collect(Collectors.toList()); |
| | | vo.setCompetentDepartmentList(list); |
| | | } |
| | | //管理归口转换 |
| | | String managementCentralization = entity.getManagementCentralization(); |
| | | if(!StringUtils.isBlank(managementCentralization)){ |
| | | vo.setManagementCentralizationList(Arrays.asList(managementCentralization.split(","))); |
| | | } |
| | | return vo; |
| | | } |
| | | |