Browse Source

项目 兼容 推送

tags/24080901
PoffyZhang 1 year ago
parent
commit
b7b2839596
1 changed files with 13 additions and 1 deletions
  1. +13
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/gov/utils/ProjectConvertUtil.java

+ 13
- 1
pmapi/src/main/java/com/ningdatech/pmapi/gov/utils/ProjectConvertUtil.java View File

@@ -169,7 +169,19 @@ public class ProjectConvertUtil {
if(StringUtils.isNotBlank(endTime)){
apply.setBaseProjEndTime(BizUtils.convertLocalDateTime(endTime));
}
apply.setBaseProjDuration(project.getBuildCycle());
if(StringUtils.isNotBlank(beginTime) && StringUtils.isNotBlank(endTime)){
try{
String yearEnd = endTime.split(StrPool.DASH)[0];
String yearStart = beginTime.split(StrPool.DASH)[0];
String monthEnd = endTime.split(StrPool.DASH)[1];
String monthStart = beginTime.split(StrPool.DASH)[1];
Integer duration = Integer.parseInt(monthEnd) - Integer.parseInt(monthStart) +
(Integer.parseInt(yearEnd) - Integer.parseInt(yearStart)) * 12;
apply.setBaseProjDuration(String.valueOf(duration));
}catch (Exception e){
log.error("日期转换失败:",e);
}
}
apply.setBaseProjConsClass(project.getBuildLevel());
apply.setBaseProjIntro(project.getProjectIntroduction());
apply.setBaseProjBasis(project.getBaseProjBasis());


Loading…
Cancel
Save