|
|
@@ -1,5 +1,6 @@ |
|
|
|
package com.hz.pm.api.workbench.model.vo; |
|
|
|
|
|
|
|
import cn.hutool.core.util.ObjectUtil; |
|
|
|
import com.hz.pm.api.projectlib.model.vo.ProjectLibListItemVO; |
|
|
|
import com.hz.pm.api.sys.model.vo.NoticeListItemVO; |
|
|
|
import com.hz.pm.api.sys.model.vo.ProjectEarlyWarningVO; |
|
|
@@ -23,7 +24,7 @@ import java.util.Objects; |
|
|
|
* @Author PoffyZhang |
|
|
|
*/ |
|
|
|
@Data |
|
|
|
public class WorkbenchVO implements Serializable { |
|
|
|
public class WorkbenchVO { |
|
|
|
|
|
|
|
@ApiModelProperty("待办中心统计数据 以及代办处理") |
|
|
|
public TodoCenterStatisticsVO todoCerter; |
|
|
@@ -38,7 +39,7 @@ public class WorkbenchVO implements Serializable { |
|
|
|
public List<ProjectLibListItemVO> projects; |
|
|
|
|
|
|
|
@ApiModelProperty("公告列表") |
|
|
|
public Map<String,List<NoticeListItemVO>> noticeList; |
|
|
|
public Map<String, List<NoticeListItemVO>> noticeList; |
|
|
|
|
|
|
|
@ApiModelProperty("预警记录") |
|
|
|
public List<EarlyWarning> earlyWarning; |
|
|
@@ -126,36 +127,29 @@ public class WorkbenchVO implements Serializable { |
|
|
|
@ApiModelProperty("立项总金额-较去年 增长") |
|
|
|
private BigDecimal approvalAmountGrowthRate = BigDecimal.ZERO; |
|
|
|
|
|
|
|
public BigDecimal getDeclaredAmountGrowthRate(){ |
|
|
|
if(Objects.isNull(declaredAmount)){ |
|
|
|
public BigDecimal getDeclaredAmountGrowthRate() { |
|
|
|
if (Objects.isNull(declaredAmount)) { |
|
|
|
this.declaredAmount = BigDecimal.ZERO; |
|
|
|
} |
|
|
|
|
|
|
|
// if((Objects.nonNull(declaredAmount)&&declaredAmount.compareTo(BigDecimal.ZERO) > 0) && (Objects.isNull(declaredAmountLastYear) || |
|
|
|
// declaredAmountLastYear.compareTo(BigDecimal.ZERO) == 0)){ |
|
|
|
// return BigDecimal.valueOf(100); |
|
|
|
// } |
|
|
|
|
|
|
|
if(Objects.nonNull(declaredAmountLastYear) && declaredAmountLastYear.compareTo(BigDecimal.ZERO) > 0){ |
|
|
|
if (!ObjectUtil.hasNull(declaredAmountLastYear, declaredAmountLastYear) |
|
|
|
&& declaredAmountLastYear.compareTo(BigDecimal.ZERO) > 0) { |
|
|
|
return declaredAmount.subtract(declaredAmountLastYear).multiply(BigDecimal.valueOf(100)) |
|
|
|
.divide(declaredAmountLastYear,BigDecimal.ROUND_CEILING) |
|
|
|
.divide(declaredAmountLastYear, RoundingMode.CEILING) |
|
|
|
.setScale(BigDecimal.ROUND_CEILING, RoundingMode.CEILING); |
|
|
|
} |
|
|
|
return BigDecimal.ZERO; |
|
|
|
} |
|
|
|
|
|
|
|
public BigDecimal getApprovalAmountGrowthRate(){ |
|
|
|
if(Objects.isNull(approvalAmount)){ |
|
|
|
public BigDecimal getApprovalAmountGrowthRate() { |
|
|
|
if (Objects.isNull(approvalAmount)) { |
|
|
|
this.approvalAmount = BigDecimal.ZERO; |
|
|
|
} |
|
|
|
// if((Objects.nonNull(approvalAmount)&&approvalAmount.compareTo(BigDecimal.ZERO) > 0) && (Objects.isNull(approvalAmountLastYear) || |
|
|
|
// approvalAmountLastYear.compareTo(BigDecimal.ZERO) == 0)){ |
|
|
|
// return BigDecimal.valueOf(100); |
|
|
|
// } |
|
|
|
|
|
|
|
if(Objects.nonNull(declaredAmountLastYear) && approvalAmountLastYear.compareTo(BigDecimal.ZERO) > 0){ |
|
|
|
if (!ObjectUtil.hasNull(declaredAmountLastYear, approvalAmountLastYear) |
|
|
|
&& approvalAmountLastYear.compareTo(BigDecimal.ZERO) > 0) { |
|
|
|
return approvalAmount.subtract(approvalAmountLastYear).multiply(BigDecimal.valueOf(100)) |
|
|
|
.divide(approvalAmountLastYear,BigDecimal.ROUND_CEILING) |
|
|
|
.divide(approvalAmountLastYear, RoundingMode.CEILING) |
|
|
|
.setScale(BigDecimal.ROUND_CEILING, RoundingMode.CEILING); |
|
|
|
} |
|
|
|
return BigDecimal.ZERO; |
|
|
|