@@ -4,7 +4,10 @@ import cn.hutool.core.collection.CollUtil; | |||||
import com.alibaba.fastjson.JSON; | import com.alibaba.fastjson.JSON; | ||||
import com.alibaba.fastjson.JSONArray; | import com.alibaba.fastjson.JSONArray; | ||||
import com.alibaba.fastjson.JSONObject; | import com.alibaba.fastjson.JSONObject; | ||||
import com.google.common.collect.Lists; | |||||
import com.ningdatech.basic.util.StrPool; | import com.ningdatech.basic.util.StrPool; | ||||
import com.ningdatech.file.entity.File; | |||||
import com.ningdatech.file.service.FileService; | |||||
import com.ningdatech.pmapi.common.constant.RegionConst; | import com.ningdatech.pmapi.common.constant.RegionConst; | ||||
import com.ningdatech.pmapi.common.util.BizUtils; | import com.ningdatech.pmapi.common.util.BizUtils; | ||||
import com.ningdatech.pmapi.gov.enumeration.GovProjectClassifiedEnum; | import com.ningdatech.pmapi.gov.enumeration.GovProjectClassifiedEnum; | ||||
@@ -38,7 +41,7 @@ public class ProjectConvertUtil { | |||||
* @param project | * @param project | ||||
* @return | * @return | ||||
*/ | */ | ||||
public static GovBizProjectDetailVO declaredToCollection(ProjectDetailVO project){ | |||||
public static GovBizProjectDetailVO declaredToCollection(ProjectDetailVO project, FileService fileService){ | |||||
GovBizProjectDetailVO projectCollection = new GovBizProjectDetailVO(); | GovBizProjectDetailVO projectCollection = new GovBizProjectDetailVO(); | ||||
if(Objects.isNull(project)){ | if(Objects.isNull(project)){ | ||||
return projectCollection; | return projectCollection; | ||||
@@ -49,7 +52,7 @@ public class ProjectConvertUtil { | |||||
projectCollection.setBaseProjName(projectName); | projectCollection.setBaseProjName(projectName); | ||||
projectCollection.setBaseinfo(buildBaseinfo(project)); | projectCollection.setBaseinfo(buildBaseinfo(project)); | ||||
projectCollection.setApply(buildApply(project)); | projectCollection.setApply(buildApply(project)); | ||||
projectCollection.setApprove(buildApprove(project)); | |||||
projectCollection.setApprove(buildApprove(project,fileService)); | |||||
String projectType = project.getProjectType(); | String projectType = project.getProjectType(); | ||||
ProjectTypeNewEnum match = ProjectTypeNewEnum.match(projectType); | ProjectTypeNewEnum match = ProjectTypeNewEnum.match(projectType); | ||||
if(Objects.nonNull(match)){ | if(Objects.nonNull(match)){ | ||||
@@ -200,11 +203,14 @@ public class ProjectConvertUtil { | |||||
} | } | ||||
//转化审批信息 | //转化审批信息 | ||||
private static GovBizProjectApproveVO buildApprove(ProjectDetailVO project) { | |||||
private static GovBizProjectApproveVO buildApprove(ProjectDetailVO project,FileService fileService) { | |||||
GovBizProjectApproveVO approve = new GovBizProjectApproveVO(); | GovBizProjectApproveVO approve = new GovBizProjectApproveVO(); | ||||
// approve.setBaseProjId(project.getProjectCode()); | // approve.setBaseProjId(project.getProjectCode()); | ||||
approve.setBaseProjName(project.getProjectName()); | approve.setBaseProjName(project.getProjectName()); | ||||
approve.setApprovalFile(project.getApprovedFile()); | |||||
File file = fileService.getById(project.getApprovedFile()); | |||||
if(Objects.nonNull(file)){ | |||||
approve.setApprovalFile(JSON.toJSONString(Lists.newArrayList(file))); | |||||
} | |||||
approve.setAreaCode(RegionConst.RC_LS); | approve.setAreaCode(RegionConst.RC_LS); | ||||
approve.setDeleted(Boolean.FALSE); | approve.setDeleted(Boolean.FALSE); | ||||
approve.setBaseDevelopCode(project.getDevelopCode()); | approve.setBaseDevelopCode(project.getDevelopCode()); | ||||
@@ -251,14 +251,18 @@ public class ConstructionManage { | |||||
* @return | * @return | ||||
*/ | */ | ||||
public ContractVO detailContractByProjectId(Long projectId) { | public ContractVO detailContractByProjectId(Long projectId) { | ||||
Project project = projectService.getNewProject(projectId); | |||||
if(Objects.isNull(project)){ | |||||
return null; | |||||
} | |||||
Contract contract = contractService.getOne(Wrappers.lambdaQuery(Contract.class) | Contract contract = contractService.getOne(Wrappers.lambdaQuery(Contract.class) | ||||
.eq(Contract::getProjectId, projectId) | |||||
.eq(Contract::getProjectCode, project.getProjectCode()) | |||||
.last(BizConst.LIMIT_1)); | .last(BizConst.LIMIT_1)); | ||||
ContractVO vo = BeanUtil.copyProperties(contract, ContractVO.class); | ContractVO vo = BeanUtil.copyProperties(contract, ContractVO.class); | ||||
List<PaymentPlan> payments = paymentPlanService.list(Wrappers.lambdaQuery(PaymentPlan.class) | List<PaymentPlan> payments = paymentPlanService.list(Wrappers.lambdaQuery(PaymentPlan.class) | ||||
.eq(PaymentPlan::getProjectId, projectId) | |||||
.eq(PaymentPlan::getProjectCode, project.getProjectCode()) | |||||
.orderByAsc(PaymentPlan::getPaymentTime)); | .orderByAsc(PaymentPlan::getPaymentTime)); | ||||
if (CollUtil.isNotEmpty(payments)) { | if (CollUtil.isNotEmpty(payments)) { | ||||
@@ -29,7 +29,6 @@ import com.ningdatech.pmapi.common.statemachine.util.StateMachineUtils; | |||||
import com.ningdatech.pmapi.common.util.BizUtils; | import com.ningdatech.pmapi.common.util.BizUtils; | ||||
import com.ningdatech.pmapi.common.util.ExcelDownUtil; | import com.ningdatech.pmapi.common.util.ExcelDownUtil; | ||||
import com.ningdatech.pmapi.dashboard.handle.ApplicationHandler; | import com.ningdatech.pmapi.dashboard.handle.ApplicationHandler; | ||||
import com.ningdatech.pmapi.dashboard.handle.ProjectStatusHandler; | |||||
import com.ningdatech.pmapi.datascope.model.DataScopeDTO; | import com.ningdatech.pmapi.datascope.model.DataScopeDTO; | ||||
import com.ningdatech.pmapi.datascope.utils.DataScopeUtil; | import com.ningdatech.pmapi.datascope.utils.DataScopeUtil; | ||||
import com.ningdatech.pmapi.expert.model.entity.ExpertReview; | import com.ningdatech.pmapi.expert.model.entity.ExpertReview; | ||||
@@ -39,8 +38,6 @@ import com.ningdatech.pmapi.filemanage.model.entity.ProjectApplyBorrow; | |||||
import com.ningdatech.pmapi.filemanage.service.INdProjectApplyBorrowService; | import com.ningdatech.pmapi.filemanage.service.INdProjectApplyBorrowService; | ||||
import com.ningdatech.pmapi.gov.model.vo.GovBizProjectDetailVO; | import com.ningdatech.pmapi.gov.model.vo.GovBizProjectDetailVO; | ||||
import com.ningdatech.pmapi.gov.utils.ProjectConvertUtil; | import com.ningdatech.pmapi.gov.utils.ProjectConvertUtil; | ||||
import com.ningdatech.pmapi.meeting.entity.domain.Meeting; | |||||
import com.ningdatech.pmapi.meeting.service.IMeetingService; | |||||
import com.ningdatech.pmapi.organization.model.entity.DingOrganization; | import com.ningdatech.pmapi.organization.model.entity.DingOrganization; | ||||
import com.ningdatech.pmapi.organization.service.IDingOrganizationService; | import com.ningdatech.pmapi.organization.service.IDingOrganizationService; | ||||
import com.ningdatech.pmapi.performance.model.dto.ProjectCoreBusinessDTO; | import com.ningdatech.pmapi.performance.model.dto.ProjectCoreBusinessDTO; | ||||
@@ -151,8 +148,6 @@ public class ProjectLibManage { | |||||
private final IExpertReviewService expertReviewService; | private final IExpertReviewService expertReviewService; | ||||
private final IMeetingService meetingService; | |||||
public PageVo<ProjectLibListItemVO> projectLibList(ProjectListReq req) { | public PageVo<ProjectLibListItemVO> projectLibList(ProjectListReq req) { | ||||
LambdaQueryWrapper<Project> query = ProjectHelper.projectQuery(req); | LambdaQueryWrapper<Project> query = ProjectHelper.projectQuery(req); | ||||
query.eq(Project::getNewest, Boolean.TRUE); | query.eq(Project::getNewest, Boolean.TRUE); | ||||
@@ -1708,6 +1703,6 @@ public class ProjectLibManage { | |||||
*/ | */ | ||||
public GovBizProjectDetailVO convertToCollection(String projectCode) { | public GovBizProjectDetailVO convertToCollection(String projectCode) { | ||||
ProjectDetailVO projectDetailVO = this.detailProjectCode(projectCode); | ProjectDetailVO projectDetailVO = this.detailProjectCode(projectCode); | ||||
return ProjectConvertUtil.declaredToCollection(projectDetailVO); | |||||
return ProjectConvertUtil.declaredToCollection(projectDetailVO,fileService); | |||||
} | } | ||||
} | } |
@@ -4,6 +4,7 @@ import cn.hutool.core.collection.CollUtil; | |||||
import cn.hutool.core.date.StopWatch; | import cn.hutool.core.date.StopWatch; | ||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers; | import com.baomidou.mybatisplus.core.toolkit.Wrappers; | ||||
import com.ningdatech.basic.model.PageVo; | import com.ningdatech.basic.model.PageVo; | ||||
import com.ningdatech.file.service.FileService; | |||||
import com.ningdatech.pmapi.common.constant.BizConst; | import com.ningdatech.pmapi.common.constant.BizConst; | ||||
import com.ningdatech.pmapi.gov.manage.GovProjectCollectionManage; | import com.ningdatech.pmapi.gov.manage.GovProjectCollectionManage; | ||||
import com.ningdatech.pmapi.gov.model.entity.*; | import com.ningdatech.pmapi.gov.model.entity.*; | ||||
@@ -71,6 +72,9 @@ public class SynProjectCollectionTask { | |||||
@Autowired | @Autowired | ||||
private ProjectLibManage projectLibManage; | private ProjectLibManage projectLibManage; | ||||
@Autowired | |||||
private FileService fileService; | |||||
private final Integer PAGE_NUMBER = 1; | private final Integer PAGE_NUMBER = 1; | ||||
/** | /** | ||||
@@ -134,7 +138,7 @@ public class SynProjectCollectionTask { | |||||
log.info("projects need push size :{}",projects.size()); | log.info("projects need push size :{}",projects.size()); | ||||
for(Project project : projects){ | for(Project project : projects){ | ||||
ProjectDetailVO projectDetailVO = projectLibManage.detailProjectCode(project.getProjectCode()); | ProjectDetailVO projectDetailVO = projectLibManage.detailProjectCode(project.getProjectCode()); | ||||
GovBizProjectDetailVO vo = ProjectConvertUtil.declaredToCollection(projectDetailVO); | |||||
GovBizProjectDetailVO vo = ProjectConvertUtil.declaredToCollection(projectDetailVO,fileService); | |||||
if(Objects.nonNull(vo)){ | if(Objects.nonNull(vo)){ | ||||
collectionManage.pushProjectVo(vo); | collectionManage.pushProjectVo(vo); | ||||
} | } | ||||