From 2a64b537e8e3bce9ce030585a3da17d48379c0ad Mon Sep 17 00:00:00 2001 From: sfd <sun.sunshine@163.com> Date: 星期一, 26 五月 2025 15:04:45 +0800 Subject: [PATCH] 修改json类型转换错误 --- aps-modules/aps-core/src/main/java/com/aps/core/domain/ApsResourceGroup.java | 19 +++++++++++-------- 1 files changed, 11 insertions(+), 8 deletions(-) diff --git a/aps-modules/aps-core/src/main/java/com/aps/core/domain/ApsResourceGroup.java b/aps-modules/aps-core/src/main/java/com/aps/core/domain/ApsResourceGroup.java index 5b20f9b..7bb0732 100644 --- a/aps-modules/aps-core/src/main/java/com/aps/core/domain/ApsResourceGroup.java +++ b/aps-modules/aps-core/src/main/java/com/aps/core/domain/ApsResourceGroup.java @@ -1,10 +1,12 @@ package com.aps.core.domain; +import com.fasterxml.jackson.annotation.JsonFormat; import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; import com.aps.common.core.annotation.Excel; import com.aps.common.core.web.domain.BaseEntity; +import java.math.BigDecimal; import java.time.LocalDateTime; /** @@ -30,7 +32,7 @@ /** 姣忔棩鐞嗚鏃堕棿 */ @Excel(name = "姣忔棩鐞嗚鏃堕棿") - private Long theoryHours; + private BigDecimal theoryHours; /** 鎴闇�姹傛棩鍓╀綑澶╂暟 */ @Excel(name = "鎴闇�姹傛棩鍓╀綑澶╂暟 ") @@ -38,17 +40,18 @@ /** 鐞嗚浜ц兘 */ @Excel(name = "鐞嗚浜ц兘") - private Long theoryCapacity; + private BigDecimal theoryCapacity; /** 鏈哄姞闇�姹傛棩鏈� */ - @Excel(name = "鏈哄姞闇�姹傛棩鏈�") + @Excel(name = "鏈哄姞闇�姹傛棩鏈�",width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") private LocalDateTime requestDate; /** 鍒犻櫎鏍囧織锛�0浠h〃瀛樺湪 2浠h〃鍒犻櫎锛� */ private String delFlag; /** 宸ュ巶 */ - @Excel(name = "宸ュ巶") +// @Excel(name = "宸ュ巶") private String plant; public void setId(String id) @@ -81,12 +84,12 @@ return devicesQuantity; } - public void setTheoryHours(Long theoryHours) + public void setTheoryHours(BigDecimal theoryHours) { this.theoryHours = theoryHours; } - public Long getTheoryHours() + public BigDecimal getTheoryHours() { return theoryHours; } @@ -101,12 +104,12 @@ return restDays; } - public void setTheoryCapacity(Long theoryCapacity) + public void setTheoryCapacity(BigDecimal theoryCapacity) { this.theoryCapacity = theoryCapacity; } - public Long getTheoryCapacity() + public BigDecimal getTheoryCapacity() { return theoryCapacity; } -- Gitblit v1.9.3