浏览代码

项目 兼容 推送

master
PoffyZhang 11 个月前
父节点
当前提交
b7b2839596
共有 1 个文件被更改,包括 13 次插入1 次删除
  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 查看文件

@@ -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());


正在加载...
取消
保存