|
|
@@ -10,7 +10,6 @@ import com.ningdatech.pmapi.projectlib.model.entity.Project; |
|
|
|
import com.ningdatech.pmapi.projectlib.model.entity.ProjectAnnualAccumulateAmount; |
|
|
|
import com.ningdatech.pmapi.projectlib.model.entity.ProjectApplication; |
|
|
|
import com.ningdatech.pmapi.projectlib.model.req.ProjectListReq; |
|
|
|
import com.ningdatech.pmapi.projectlib.model.vo.ProjectApplicationVO; |
|
|
|
import com.ningdatech.pmapi.projectlib.model.vo.ProjectDetailVO; |
|
|
|
import com.ningdatech.pmapi.projectlib.model.vo.ProjectLibListItemVO; |
|
|
|
import com.ningdatech.pmapi.projectlib.service.IProjectAnnualAccumulateAmountService; |
|
|
@@ -87,25 +86,15 @@ public class ProjectLibManage { |
|
|
|
.eq(ProjectApplication::getProjectId, vo.getId())); |
|
|
|
Optional.ofNullable(applications).ifPresent(apps -> |
|
|
|
vo.setProjectApplications(CollUtils.convert(apps, |
|
|
|
app-> { |
|
|
|
ProjectApplicationVO appVo = new ProjectApplicationVO(); |
|
|
|
BeanUtils.copyProperties(app, appVo); |
|
|
|
return appVo; |
|
|
|
} |
|
|
|
) |
|
|
|
ProjectHelper::convertVO) |
|
|
|
)); |
|
|
|
//查询年度投资金额 |
|
|
|
List<ProjectAnnualAccumulateAmount> annualAmount = announcementAccumulateAmountService.list(Wrappers.lambdaQuery(ProjectAnnualAccumulateAmount.class) |
|
|
|
.eq(ProjectAnnualAccumulateAmount::getProjectId, vo.getId()) |
|
|
|
.orderByAsc(ProjectAnnualAccumulateAmount::getProjectYear)); |
|
|
|
Optional.ofNullable(annualAmount).ifPresent(amounts -> |
|
|
|
vo.setAnnualAccumulateAmountDetail(CollUtils.joinByComma(amounts, |
|
|
|
amount-> { |
|
|
|
StringBuffer sb = new StringBuffer(); |
|
|
|
sb.append(amount.getProjectYear() + "年投资" + amount.getConvertTenThousand() + "万元。\n"); |
|
|
|
return sb.toString(); |
|
|
|
} |
|
|
|
) |
|
|
|
vo.setAnnualAccumulateAmountDetail(CollUtils.joinByComma( |
|
|
|
amounts,ProjectHelper::convertAnnualAmountDetail) |
|
|
|
)); |
|
|
|
return vo; |
|
|
|
} |
|
|
|