diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/gov/utils/ProjectConvertUtil.java b/pmapi/src/main/java/com/ningdatech/pmapi/gov/utils/ProjectConvertUtil.java index 8f518fa..9fc25e0 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/gov/utils/ProjectConvertUtil.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/gov/utils/ProjectConvertUtil.java @@ -1,10 +1,11 @@ package com.ningdatech.pmapi.gov.utils; -import com.ningdatech.pmapi.gov.model.vo.GovBizProjectDetailVO; +import com.google.common.collect.Lists; +import com.ningdatech.pmapi.common.constant.RegionConst; +import com.ningdatech.pmapi.common.enumeration.CommonEnum; +import com.ningdatech.pmapi.gov.model.vo.*; import com.ningdatech.pmapi.projectlib.model.entity.Project; -import lombok.extern.slf4j.Slf4j; -import org.springframework.stereotype.Component; - +import java.util.List; import java.util.Objects; /** @@ -28,7 +29,69 @@ public class ProjectConvertUtil { String projectCode = project.getProjectCode(); String projectName = project.getProjectName(); projectCollection.setBaseProjId(projectCode); + projectCollection.setBaseProjName(projectName); + projectCollection.setBaseinfo(buildBaseinfo(project)); + projectCollection.setApply(buildApply(project)); + projectCollection.setApprove(buildApprove(project)); + projectCollection.setCimplement(buildCim(project)); + projectCollection.setMimplement(buildMim(project)); + projectCollection.setProcures(buildProcure(project)); return projectCollection; } + //转化基本信息 + private static GovBizProjectBaseinfoVO buildBaseinfo(Project project) { + GovBizProjectBaseinfoVO baseinfo = new GovBizProjectBaseinfoVO(); + baseinfo.setBaseProjId(project.getProjectCode()); + baseinfo.setBaseProjName(project.getProjectName()); + baseinfo.setAreaCode(RegionConst.RC_LS); + baseinfo.setBaseAreaCode(project.getAreaCode() + RegionConst.NINE_CODE_LAST); + baseinfo.setBaseAreaName(project.getArea()); + baseinfo.setBaseBuildDeprt(project.getBuildOrgName()); + baseinfo.setBaseBuildDeprtDing(project.getBuildOrgCode()); + baseinfo.setBaseBuildDepartUsci(project.getOrgCreditCode()); + baseinfo.setBaseConstructionType(project.getBaseConstructionType()); + baseinfo.setBaseManDeprt(project.getSuperOrg()); + baseinfo.setBaseManDeprtDing(project.getSuperOrgCode()); + baseinfo.setBaseManDepartUsci(project.getSuperOrgCreditCode()); + baseinfo.setBaseProjContacts(project.getContactName()); + baseinfo.setBaseProjContactsCall(project.getContactPhone()); +// baseinfo.setBaseProjIsConfidentiality(CommonEnum.NO.getCode()); + return baseinfo; + } + + //转化申报信息 + private static GovBizProjectApplyVO buildApply(Project project) { + GovBizProjectApplyVO apply = new GovBizProjectApplyVO(); + + return apply; + } + + //转化审批信息 + private static GovBizProjectApproveVO buildApprove(Project project) { + GovBizProjectApproveVO approve = new GovBizProjectApproveVO(); + + return approve; + } + + //转化建设 实施 + private static GovBizProjectCimplementVO buildCim(Project project) { + GovBizProjectCimplementVO cim = new GovBizProjectCimplementVO(); + + return cim; + } + + //转化运维实施 + private static GovBizProjectMimplementVO buildMim(Project project) { + GovBizProjectMimplementVO mim = new GovBizProjectMimplementVO(); + + return mim; + } + + //转化采购信息 + private static List buildProcure(Project project) { + List procures = Lists.newArrayList(); + + return procures; + } } diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/workbench/manage/WorkbenchManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/workbench/manage/WorkbenchManage.java index 097602f..b187770 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/workbench/manage/WorkbenchManage.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/workbench/manage/WorkbenchManage.java @@ -338,11 +338,10 @@ public class WorkbenchManage { String[] employees = batchEmployees.split(StrPool.COMMA); //算出 当前和他的 小时差 临期 Long adventBetween = ChronoUnit.HOURS.between(instStart,LocalDateTime.now()); - Integer overBetween = overTime - adventBetween.intValue(); Integer times = 0; for(String employee : employees){ earlyWarningManage.urging(noticeMethod,noticeContent,adventBetween.intValue() - ,overBetween,biz, + ,adventBetween.intValue(),biz, instStart,employee,project, ruleType,noticeType,path,batchEmployees,record.getNodeId()); times++;