|
|
@@ -1,5 +1,6 @@
|
|
|
package org.springblade.meter.vo;
|
|
|
|
|
|
+import com.fasterxml.jackson.annotation.JsonFormat;
|
|
|
import io.swagger.annotations.ApiModelProperty;
|
|
|
import lombok.Data;
|
|
|
|
|
|
@@ -35,12 +36,15 @@ public class ChangeNodeVO {
|
|
|
private String beforeContractPicture;
|
|
|
|
|
|
@ApiModelProperty(value = "变更前-施工图金额")
|
|
|
+ @JsonFormat(shape = JsonFormat.Shape.STRING)
|
|
|
private BigDecimal beforeBuildMoney;
|
|
|
|
|
|
@ApiModelProperty(value = "变更前-变更后金额")
|
|
|
+ @JsonFormat(shape = JsonFormat.Shape.STRING)
|
|
|
private BigDecimal beforeChangeMoney;
|
|
|
|
|
|
@ApiModelProperty(value = "变更后金额")
|
|
|
+ @JsonFormat(shape = JsonFormat.Shape.STRING)
|
|
|
private BigDecimal changeMoney;
|
|
|
|
|
|
@ApiModelProperty(value = "是否增补")
|
|
|
@@ -52,6 +56,17 @@ public class ChangeNodeVO {
|
|
|
@ApiModelProperty(value = "清单集合")
|
|
|
private List<ChangeFormVO2> formList;
|
|
|
|
|
|
+ public void setBeforeBuildMoney(BigDecimal beforeBuildMoney) {
|
|
|
+ this.beforeBuildMoney = trimTrailingZeros(beforeBuildMoney);
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setBeforeChangeMoney(BigDecimal beforeChangeMoney) {
|
|
|
+ this.beforeChangeMoney = trimTrailingZeros(beforeChangeMoney);
|
|
|
+ }
|
|
|
+ public void setChangeMoney(BigDecimal changeMoney) {
|
|
|
+ this.changeMoney = trimTrailingZeros(changeMoney);
|
|
|
+ }
|
|
|
+
|
|
|
@Override
|
|
|
public boolean equals(Object o) {
|
|
|
if (this == o) return true;
|
|
|
@@ -65,4 +80,13 @@ public class ChangeNodeVO {
|
|
|
public int hashCode() {
|
|
|
return Objects.hash(id);
|
|
|
}
|
|
|
+
|
|
|
+ private BigDecimal trimTrailingZeros(BigDecimal value) {
|
|
|
+ if (value == null) {
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+ // 先去除末尾零,然后使用普通字符串表示避免科学计数法
|
|
|
+ BigDecimal stripped = value.stripTrailingZeros();
|
|
|
+ return new BigDecimal(stripped.toPlainString());
|
|
|
+ }
|
|
|
}
|