From 1a18962c28753cf751589c4bd3a4a3895a5bfa79 Mon Sep 17 00:00:00 2001 From: "liang.chao" <1360241448@qq.com> Date: Fri, 13 Sep 2024 17:20:46 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=B0=E9=87=8F=E5=AD=97=E6=AE=B5=E7=BB=9F?= =?UTF-8?q?=E4=B8=80=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/bootstrap-sgzb_cloud_dev.yml | 2 +- .../sgzb/app/domain/LeaseApplyDetails.java | 4 ++-- .../bonus/sgzb/app/domain/StorageStatus.java | 5 +++-- .../sgzb/largeScreen/domain/CarUseVo.java | 2 +- .../sgzb/largeScreen/domain/MaTypeDo.java | 2 +- .../largeScreen/domain/MaterialDataVo.java | 2 +- .../largeScreen/domain/MaterialDetailVo.java | 4 ++-- .../sgzb/largeScreen/util/CommonUtil.java | 4 ++-- .../sgzb/material/domain/BackRecord.java | 2 +- .../material/domain/CheckDetailsInfo.java | 9 ++++---- .../sgzb/material/domain/InputRecord.java | 4 ++-- .../material/domain/LeaseApplyDetails.java | 2 +- .../material/domain/PlanManagementVO.java | 15 ++++++------- .../bonus/sgzb/material/domain/PlanVO.java | 9 ++++---- .../sgzb/material/domain/ProjUsingRecord.java | 13 ++++++------ .../material/domain/PurchaseMacodeInfo.java | 6 +++--- .../domain/RepairTestInputDetailVo.java | 2 +- .../sgzb/material/domain/StorageStatus.java | 21 ++++++++++--------- .../impl/PlanManagementServiceImpl.java | 7 ++++--- 19 files changed, 61 insertions(+), 54 deletions(-) diff --git a/sgzb-gateway/src/main/resources/bootstrap-sgzb_cloud_dev.yml b/sgzb-gateway/src/main/resources/bootstrap-sgzb_cloud_dev.yml index f7d6ef7..dc668e5 100644 --- a/sgzb-gateway/src/main/resources/bootstrap-sgzb_cloud_dev.yml +++ b/sgzb-gateway/src/main/resources/bootstrap-sgzb_cloud_dev.yml @@ -38,7 +38,7 @@ spring: datasource: ds1: nacos: - server-addr: 192.168.0.56:8848 + server-addr: 192.168.1.2:8848 dataId: sentinel-sgzb-gateway groupId: DEFAULT_GROUP data-type: json diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/app/domain/LeaseApplyDetails.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/app/domain/LeaseApplyDetails.java index c4c4ebb..b886051 100644 --- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/app/domain/LeaseApplyDetails.java +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/app/domain/LeaseApplyDetails.java @@ -152,7 +152,7 @@ public class LeaseApplyDetails implements Serializable { * 实时库存 */ @ApiModelProperty(value = "实时库存") - private Double num; + private Integer num; @ApiModelProperty(value = "库管员id") private Integer userId; @@ -172,5 +172,5 @@ public class LeaseApplyDetails implements Serializable { @ApiModelProperty(value="设备状态") private String maStatus; @ApiModelProperty(value="预领数量-已领数量的差值") - private Double nums; + private Integer nums; } \ No newline at end of file diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/app/domain/StorageStatus.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/app/domain/StorageStatus.java index 9a5c917..58b25b0 100644 --- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/app/domain/StorageStatus.java +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/app/domain/StorageStatus.java @@ -8,6 +8,7 @@ import io.swagger.annotations.ApiModelProperty; import lombok.Data; import org.springframework.format.annotation.DateTimeFormat; +import java.math.BigDecimal; import java.util.Date; import java.util.List; @@ -128,13 +129,13 @@ public class StorageStatus { * 在用总价值 */ @ApiModelProperty(value = "在用总价值") - private Double usPrice; + private BigDecimal usPrice; /** * 投入总价值 */ @ApiModelProperty(value = "投入总价值") - private Double totalPrice; + private BigDecimal totalPrice; /** * 退料人 diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/largeScreen/domain/CarUseVo.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/largeScreen/domain/CarUseVo.java index b70dd52..ad7c36f 100644 --- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/largeScreen/domain/CarUseVo.java +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/largeScreen/domain/CarUseVo.java @@ -13,7 +13,7 @@ public class CarUseVo { private String carNo; /** 使用频次油耗*/ - private int useNum; + private Integer useNum; /** 油耗*/ private double squander; diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/largeScreen/domain/MaTypeDo.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/largeScreen/domain/MaTypeDo.java index 474272f..7132042 100644 --- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/largeScreen/domain/MaTypeDo.java +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/largeScreen/domain/MaTypeDo.java @@ -13,7 +13,7 @@ public class MaTypeDo { private String typeName; /** 数量*/ - private double num; + private Integer num; /** 管理方式(0编号 1计数)*/ private String manageType; diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/largeScreen/domain/MaterialDataVo.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/largeScreen/domain/MaterialDataVo.java index 1b468f5..a377d54 100644 --- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/largeScreen/domain/MaterialDataVo.java +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/largeScreen/domain/MaterialDataVo.java @@ -13,5 +13,5 @@ public class MaterialDataVo { private String unitName; /** 数量*/ - private double num; + private Integer num; } diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/largeScreen/domain/MaterialDetailVo.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/largeScreen/domain/MaterialDetailVo.java index 19fe965..d18d2d1 100644 --- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/largeScreen/domain/MaterialDetailVo.java +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/largeScreen/domain/MaterialDetailVo.java @@ -33,11 +33,11 @@ public class MaterialDetailVo { /** 领、退料数量*/ @ApiModelProperty(value = "领、退料数量") - private Double num; + private Integer num; /** 实际退料数量*/ @ApiModelProperty(value = "实际退料数量") - private Double realityNum; + private Integer realityNum; /** 设备负责人*/ @ApiModelProperty(value = "设备负责人") diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/largeScreen/util/CommonUtil.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/largeScreen/util/CommonUtil.java index 3b4c8f8..e55df3d 100644 --- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/largeScreen/util/CommonUtil.java +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/largeScreen/util/CommonUtil.java @@ -151,11 +151,11 @@ public class CommonUtil { MaterialDataVo vo = lyList.get(i); if (Objects.nonNull(vo.getUnitName())) { nameList.add(vo.getUnitName()); - valueList.add((int) Math.round(vo.getNum())); + valueList.add(vo.getNum()); for (int j = 0; j < bfList.size(); j++) { MaterialDataVo vo2 = bfList.get(j); if (Objects.nonNull(vo2.getUnitName()) && Objects.equals(vo.getUnitName(), vo2.getUnitName())) { - valueList2.add((int) Math.round(vo2.getNum())); + valueList2.add(vo2.getNum()); } } } diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/BackRecord.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/BackRecord.java index fd4330d..d748cd4 100644 --- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/BackRecord.java +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/BackRecord.java @@ -181,6 +181,6 @@ public class BackRecord { * 实时库存 */ @ApiModelProperty(value = "实时库存") - private Double num; + private Integer num; } \ No newline at end of file diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/CheckDetailsInfo.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/CheckDetailsInfo.java index 2694ad2..36588b3 100644 --- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/CheckDetailsInfo.java +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/CheckDetailsInfo.java @@ -7,6 +7,7 @@ import lombok.Data; import lombok.NoArgsConstructor; import org.springframework.format.annotation.DateTimeFormat; +import java.math.BigDecimal; import java.util.Date; /** @@ -37,19 +38,19 @@ public class CheckDetailsInfo { /** 计划单价 */ @ApiModelProperty(value = "计划单价") - private Double purchasePrice; + private BigDecimal purchasePrice; /** 计划数量 */ @ApiModelProperty(value = "计划数量") - private Double purchaseNum; + private Integer purchaseNum; /** 借出数量 */ @ApiModelProperty(value = "借出数量") - private Double borrowNum; + private Integer borrowNum; /** 计划总价 */ @ApiModelProperty(value = "计划总价") - private Double totalPrice; + private BigDecimal totalPrice; /** 备注 */ @ApiModelProperty(value = "备注") diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/InputRecord.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/InputRecord.java index 1762e19..a00926b 100644 --- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/InputRecord.java +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/InputRecord.java @@ -69,7 +69,7 @@ public class InputRecord { */ @ApiModelProperty(value = "入库数量") @Excel(name = "入库数量",cellType = Excel.ColumnType.NUMERIC) - private Double inputNum; + private Integer inputNum; /** * 创建时间 @@ -214,6 +214,6 @@ public class InputRecord { * 实时库存 */ @ApiModelProperty(value = "实时库存") - private Double num; + private Integer num; } \ No newline at end of file diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/LeaseApplyDetails.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/LeaseApplyDetails.java index d9732d6..4dc2786 100644 --- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/LeaseApplyDetails.java +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/LeaseApplyDetails.java @@ -145,6 +145,6 @@ public class LeaseApplyDetails implements Serializable { * 实时库存 */ @ApiModelProperty(value = "实时库存") - private Double num; + private Integer num; } \ No newline at end of file diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/PlanManagementVO.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/PlanManagementVO.java index 22305a6..e654444 100644 --- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/PlanManagementVO.java +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/PlanManagementVO.java @@ -6,6 +6,7 @@ import io.swagger.annotations.ApiModelProperty; import lombok.Data; import org.springframework.format.annotation.DateTimeFormat; +import java.math.BigDecimal; import java.util.Date; /** @@ -55,12 +56,12 @@ public class PlanManagementVO { /** 借出方原计划数 */ @Excel(name = "原计划数") @ApiModelProperty(value = "借出方原计划数") - private Double borrowerOrigPlanNum; + private Integer borrowerOrigPlanNum; /** 借出方现计划数 */ @Excel(name = "现计划数") @ApiModelProperty(value = "借出方现计划数") - private Double borrowerNowPlanNum; + private Integer borrowerNowPlanNum; /** 借入方单位 */ @Excel(name = "借入方单位") @@ -69,25 +70,25 @@ public class PlanManagementVO { /** 借入方原计划数 */ @ApiModelProperty(value = "借入方原计划数") - private Double lenderOrigPlanNum; + private Integer lenderOrigPlanNum; /** 借入方现计划数 */ @Excel(name = "现有计划数") @ApiModelProperty(value = "借入方现计划数") - private Double lenderNowPlanNum; + private Integer lenderNowPlanNum; /** 借出数 */ @Excel(name = "借调数量") @ApiModelProperty(value = "借出数") - private Double borrowNum; + private Integer borrowNum; /** 计划单价 */ @ApiModelProperty(value = "计划单价") - private Double planPrice; + private BigDecimal planPrice; /** 计划总价 */ @ApiModelProperty(value = "计划总价") - private Double planCost; + private BigDecimal planCost; /** 类型id */ @ApiModelProperty(value = "类型id") diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/PlanVO.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/PlanVO.java index 6301fe3..472ee26 100644 --- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/PlanVO.java +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/PlanVO.java @@ -6,6 +6,7 @@ import io.swagger.annotations.ApiModelProperty; import lombok.Data; import org.springframework.format.annotation.DateTimeFormat; +import java.math.BigDecimal; import java.util.Date; /** @@ -47,17 +48,17 @@ public class PlanVO { /** 计划数 */ @Excel(name = "计划数") @ApiModelProperty(value = "计划数") - private Double lenderOrigPlanNum; + private Integer lenderOrigPlanNum; /** 计划单价 */ @Excel(name = "计划单价") @ApiModelProperty(value = "计划单价") - private Double planPrice; + private BigDecimal planPrice; /** 计划总价 */ @Excel(name = "计划总价") @ApiModelProperty(value = "计划总价") - private Double planCost; + private BigDecimal planCost; /** 类型id */ @ApiModelProperty(value = "类型id") @@ -79,7 +80,7 @@ public class PlanVO { /** 借出数 */ @ApiModelProperty(value = "借出数") - private Double borrowNum; + private Integer borrowNum; /** 备注 */ @Excel(name = "备注") diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/ProjUsingRecord.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/ProjUsingRecord.java index d6e05a7..156a728 100644 --- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/ProjUsingRecord.java +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/ProjUsingRecord.java @@ -7,6 +7,7 @@ import io.swagger.annotations.ApiModelProperty; import lombok.Data; import org.springframework.format.annotation.DateTimeFormat; +import java.math.BigDecimal; import java.util.Date; /** @@ -101,33 +102,33 @@ public class ProjUsingRecord { */ @ApiModelProperty(value = "租赁数量") @Excel(name = "租赁数量",cellType = Excel.ColumnType.NUMERIC) - private Double outNum; + private Integer outNum; /** * 归还数量 */ @ApiModelProperty(value = "归还数量") @Excel(name = "归还数量",cellType = Excel.ColumnType.NUMERIC) - private Double backNum; + private Integer backNum; /** * 在用数量 */ @ApiModelProperty(value = "在用数量") @Excel(name = "在用数量",cellType = Excel.ColumnType.NUMERIC) - private Double usNum; + private Integer usNum; /** * 在用总价值 */ @ApiModelProperty(value = "在用总价值") - private Double usPrice; + private BigDecimal usPrice; /** * 投入总价值 */ @ApiModelProperty(value = "投入总价值") - private Double totalPrice; + private BigDecimal totalPrice; /** * 退料人 @@ -207,6 +208,6 @@ public class ProjUsingRecord { * 实时库存 */ @ApiModelProperty(value = "实时库存") - private Double num; + private Integer num; } \ No newline at end of file diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/PurchaseMacodeInfo.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/PurchaseMacodeInfo.java index 72ac4bd..ad20d91 100644 --- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/PurchaseMacodeInfo.java +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/PurchaseMacodeInfo.java @@ -37,7 +37,7 @@ public class PurchaseMacodeInfo extends BaseEntity * 库存数量 */ @ApiModelProperty(value = "库存数量") - private Double num; + private Integer num; /** 机具编号 */ @ApiModelProperty(value = "机具编号") @@ -190,11 +190,11 @@ public class PurchaseMacodeInfo extends BaseEntity return typeId; } - public Double getNum() { + public Integer getNum() { return num; } - public void setNum(Double num) { + public void setNum(Integer num) { this.num = num; } diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/RepairTestInputDetailVo.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/RepairTestInputDetailVo.java index 6edad57..138b0c4 100644 --- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/RepairTestInputDetailVo.java +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/RepairTestInputDetailVo.java @@ -46,7 +46,7 @@ public class RepairTestInputDetailVo { /** 数量*/ @Excel(name = "数量") - private double repairNum; + private Integer repairNum; /** 编号*/ @Excel(name = "编号") diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/StorageStatus.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/StorageStatus.java index bae14c0..aa3c937 100644 --- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/StorageStatus.java +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/StorageStatus.java @@ -7,6 +7,7 @@ import io.swagger.annotations.ApiModelProperty; import lombok.Data; import org.springframework.format.annotation.DateTimeFormat; +import java.math.BigDecimal; import java.util.Date; /** @@ -62,42 +63,42 @@ public class StorageStatus { */ @ApiModelProperty(value = "在库数量") @Excel(name = "在库数量",cellType = Excel.ColumnType.NUMERIC) - private Double num; + private Integer num; /** * 在用数量 */ @ApiModelProperty(value = "在用数量") @Excel(name = "在用数量",cellType = Excel.ColumnType.NUMERIC) - private Double usNum; + private Integer usNum; /** * 在修数量 */ @ApiModelProperty(value = "在修数量") @Excel(name = "在修数量",cellType = Excel.ColumnType.NUMERIC) - private Double repairNum; + private Integer repairNum; /** * 修试后待入库 */ @ApiModelProperty(value = "修试后待入库") @Excel(name = "修试后待入库",cellType = Excel.ColumnType.NUMERIC) - private Double repairInputNum; + private Integer repairInputNum; /** * 新购待入库 */ @ApiModelProperty(value = "新购待入库") @Excel(name = "新购待入库",cellType = Excel.ColumnType.NUMERIC) - private Double inputNum; + private Integer inputNum; /** * 总保有量 */ @ApiModelProperty(value = "总保有量") @Excel(name = "总保有量",cellType = Excel.ColumnType.NUMERIC) - private Double allNum; + private Integer allNum; /** * 是否计数 @@ -112,27 +113,27 @@ public class StorageStatus { */ @ApiModelProperty(value = "租赁数量") @Excel(name = "租赁数量",cellType = Excel.ColumnType.NUMERIC) - private Double outNum; + private Integer outNum; /** * 归还数量 */ @ApiModelProperty(value = "归还数量") @Excel(name = "归还数量",cellType = Excel.ColumnType.NUMERIC) - private Double backNum; + private Integer backNum; /** * 在用总价值 */ @ApiModelProperty(value = "在用总价值") - private Double usPrice; + private BigDecimal usPrice; /** * 投入总价值 */ @ApiModelProperty(value = "投入总价值") - private Double totalPrice; + private BigDecimal totalPrice; /** * 退料人 diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/PlanManagementServiceImpl.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/PlanManagementServiceImpl.java index 9fbd80d..7fa31e2 100644 --- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/PlanManagementServiceImpl.java +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/PlanManagementServiceImpl.java @@ -14,6 +14,7 @@ import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.interceptor.TransactionAspectSupport; +import java.math.BigDecimal; import java.util.List; /** @@ -93,11 +94,11 @@ public class PlanManagementServiceImpl implements PlanManagementService { info.setCreateBy(dto.getCreateBy()); info.setUpdateBy(dto.getUpdateBy()); if (info.getPurchasePrice() != null && info.getPurchaseNum() != null) { - Double total = info.getPurchasePrice() * info.getPurchaseNum(); - total = (double) Math.round(total * 100) / 100; + BigDecimal total = info.getPurchasePrice().multiply(new BigDecimal(info.getPurchaseNum())); +// total = (double) Math.round(total * 100) / 100; info.setTotalPrice(total); } else { - info.setTotalPrice(0.00); + info.setTotalPrice(new BigDecimal(0)); } res += planManagementMapper.insertPlanNeedInfo(info); res += planManagementMapper.insertPlanNeedDetail(info);