fix: 修复精度丢失的问题

This commit is contained in:
han0
2025-03-28 15:19:20 +08:00
parent 48efc1bb81
commit 938a511e8b
2 changed files with 28 additions and 35 deletions

View File

@@ -175,20 +175,20 @@ public class PriceResult extends Model<PriceResult> {
public PriceResult update(PriceResultEditRequest item) { public PriceResult update(PriceResultEditRequest item) {
this.setDisplayDigit(item.getDisplayDigit()); this.setDisplayDigit(item.getDisplayDigit());
this.setPriceFtb(item.getPriceFtb().floatValue()); this.setPriceFtb(item.getPriceFtb());
this.setFluctuatingFtb(item.getFluctuatingFtb().floatValue()); this.setFluctuatingFtb(item.getFluctuatingFtb());
this.setPriceSs(item.getPriceSs().floatValue()); this.setPriceSs(item.getPriceSs());
this.setFluctuatingSs(item.getFluctuatingSs().floatValue()); this.setFluctuatingSs(item.getFluctuatingSs());
this.setPriceFhb(item.getPriceFhb().floatValue()); this.setPriceFhb(item.getPriceFhb());
this.setFluctuatingFhb(item.getFluctuatingFhb().floatValue()); this.setFluctuatingFhb(item.getFluctuatingFhb());
this.setPriceNetwork(item.getPriceNetwork().floatValue()); this.setPriceNetwork(item.getPriceNetwork());
this.setFluctuatingNetwork(item.getFluctuatingNetwork().floatValue()); this.setFluctuatingNetwork(item.getFluctuatingNetwork());
this.setPriceSurvey(item.getPriceSurvey().floatValue()); this.setPriceSurvey(item.getPriceSurvey());
this.setFluctuatingSurvey(item.getFluctuatingSurvey().floatValue()); this.setFluctuatingSurvey(item.getFluctuatingSurvey());
this.setPriceLastMonth(item.getPriceLastMonth().floatValue()); this.setPriceLastMonth(item.getPriceLastMonth());
this.setPriceCalculate(item.getPriceCalculate().floatValue()); this.setPriceCalculate(item.getPriceCalculate());
this.setPriceRecommend(item.getPriceRecommend().floatValue()); this.setPriceRecommend(item.getPriceRecommend());
this.setFluctuatingRecommend(item.getFluctuatingRecommend().floatValue()); this.setFluctuatingRecommend(item.getFluctuatingRecommend());
return this; return this;
} }

View File

@@ -8,55 +8,48 @@ import lombok.Setter;
@Getter @Getter
@Setter @Setter
public class PriceResultEditRequest { public class PriceResultEditRequest {
// private String materialId;
// private String name;
// private Integer year;
// private Integer month;
// @JsonProperty(value = "price_ftb") // @JsonProperty(value = "price_ftb")
private Integer priceFtb; private Float priceFtb;
// @JsonProperty(value = "fluctuating_ftb") // @JsonProperty(value = "fluctuating_ftb")
private Integer fluctuatingFtb; private Float fluctuatingFtb;
// @JsonProperty(value = "price_ss") // @JsonProperty(value = "price_ss")
private Integer priceSs; private Float priceSs;
// @JsonProperty(value = "fluctuating_ss") // @JsonProperty(value = "fluctuating_ss")
private Integer fluctuatingSs; private Float fluctuatingSs;
// @JsonProperty(value = "price_fhb") // @JsonProperty(value = "price_fhb")
private Integer priceFhb; private Float priceFhb;
// @JsonProperty(value = "fluctuating_fhb") // @JsonProperty(value = "fluctuating_fhb")
private Integer fluctuatingFhb; private Float fluctuatingFhb;
// @JsonProperty(value = "price_network") // @JsonProperty(value = "price_network")
private Integer priceNetwork; private Float priceNetwork;
// @JsonProperty(value = "fluctuating_network") // @JsonProperty(value = "fluctuating_network")
private Integer fluctuatingNetwork; private Float fluctuatingNetwork;
// @JsonProperty(value = "price_survey") // @JsonProperty(value = "price_survey")
private Integer priceSurvey; private Float priceSurvey;
// @JsonProperty(value = "fluctuating_survey") // @JsonProperty(value = "fluctuating_survey")
private Integer fluctuatingSurvey; private Float fluctuatingSurvey;
// @JsonProperty(value = "priceLast_month") // @JsonProperty(value = "priceLast_month")
private Integer priceLastMonth; private Float priceLastMonth;
// @JsonProperty(value = "price_calculate") // @JsonProperty(value = "price_calculate")
private Integer priceCalculate; private Float priceCalculate;
// @JsonProperty(value = "price_recommend") // @JsonProperty(value = "price_recommend")
private Integer priceRecommend; private Float priceRecommend;
// @JsonProperty(value = "fluctuating_recommend") // @JsonProperty(value = "fluctuating_recommend")
private Integer fluctuatingRecommend; private Float fluctuatingRecommend;
private Integer displayDigit; private Integer displayDigit;
} }