From 8583e92ca1979ddbe3ec85b1568fbb9fb4600588 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E5=BF=A0=E6=9E=97?= <170083662@qq.com> Date: Mon, 13 Oct 2025 01:07:25 +0800 Subject: [PATCH] =?UTF-8?q?feat(order):=20=E5=AF=BC=E5=85=A5=E8=AE=A2?= =?UTF-8?q?=E5=8D=95=E6=97=B6=E6=96=B0=E5=A2=9E=E7=BB=93=E7=AE=97=E7=9B=B8?= =?UTF-8?q?=E5=85=B3=E5=AD=97=E6=AE=B5=E6=94=AF=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 新增结算金额、实发金额、结算单价、税费和月份字段 - 支持从Excel导入时读取新增的结算相关数据 - 在订单实体中添加对应的字段定义和注解 - 根据导入数据设置用户ID并更新订单失效状态 - 完善导入逻辑以处理新增字段的数据映射 --- .../controller/SdyDealerOrderController.java | 10 ++++++++++ .../sdy/param/SdyDealerOrderImportParam.java | 17 +++++++++++++++++ .../gxwebsoft/shop/entity/ShopDealerOrder.java | 13 +++++++++++-- 3 files changed, 38 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/gxwebsoft/sdy/controller/SdyDealerOrderController.java b/src/main/java/com/gxwebsoft/sdy/controller/SdyDealerOrderController.java index ca47b42..e110ccc 100644 --- a/src/main/java/com/gxwebsoft/sdy/controller/SdyDealerOrderController.java +++ b/src/main/java/com/gxwebsoft/sdy/controller/SdyDealerOrderController.java @@ -93,12 +93,22 @@ public class SdyDealerOrderController extends BaseController { item.setThirdMoney(d.getThirdMoney()); item.setTenantId(d.getTenantId()); item.setComments(d.getComments()); + item.setPrice(d.getPrice()); + item.setSettledPrice(d.getSettledPrice()); + item.setRate(d.getRate()); + item.setMonth(d.getMonth()); item.setIsInvalid(1); item.setIsSettled(0); // 新导入的数据设为未结算 // 查询绑定关系 ShopDealerApply dealerApply = shopDealerApplyService.getByDealerNameRel(d.getComments()); + // 指定用户ID + if(d.getUserId() != null){ + item.setUserId(d.getUserId()); + item.setIsInvalid(1); + } + // 已签约客户 if(dealerApply != null){ item.setIsInvalid(0); diff --git a/src/main/java/com/gxwebsoft/sdy/param/SdyDealerOrderImportParam.java b/src/main/java/com/gxwebsoft/sdy/param/SdyDealerOrderImportParam.java index cb29635..b58c398 100644 --- a/src/main/java/com/gxwebsoft/sdy/param/SdyDealerOrderImportParam.java +++ b/src/main/java/com/gxwebsoft/sdy/param/SdyDealerOrderImportParam.java @@ -1,6 +1,8 @@ package com.gxwebsoft.sdy.param; import cn.afterturn.easypoi.excel.annotation.Excel; +import com.baomidou.mybatisplus.annotation.TableField; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import java.io.Serializable; @@ -26,6 +28,21 @@ public class SdyDealerOrderImportParam implements Serializable { @Excel(name = "结算电量") private BigDecimal orderPrice; + @Excel(name = "结算金额") + private BigDecimal settledPrice; + + @Excel(name = "实发金额") + private BigDecimal payPrice; + + @Excel(name = "结算单价") + private BigDecimal price; + + @Excel(name = "税费") + private BigDecimal rate; + + @Excel(name = "月份") + private String month; + @Excel(name = "一级分销商ID") private Integer firstUserId; diff --git a/src/main/java/com/gxwebsoft/shop/entity/ShopDealerOrder.java b/src/main/java/com/gxwebsoft/shop/entity/ShopDealerOrder.java index d9b3d74..80e0a81 100644 --- a/src/main/java/com/gxwebsoft/shop/entity/ShopDealerOrder.java +++ b/src/main/java/com/gxwebsoft/shop/entity/ShopDealerOrder.java @@ -1,6 +1,8 @@ package com.gxwebsoft.shop.entity; import java.math.BigDecimal; + +import cn.afterturn.easypoi.excel.annotation.Excel; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableId; @@ -41,6 +43,12 @@ public class ShopDealerOrder implements Serializable { @Schema(description = "订单总金额(不含运费)") private BigDecimal orderPrice; + @Schema(description = "结算金额") + private BigDecimal settledPrice; + + @Schema(description = "实发金额") + private BigDecimal payPrice; + @Schema(description = "分销商用户id(一级)") private Integer firstUserId; @@ -72,13 +80,14 @@ public class ShopDealerOrder implements Serializable { private BigDecimal thirdMoney; @Schema(description = "佣金比例") - @TableField(exist = false) private BigDecimal rate; @Schema(description = "单价") - @TableField(exist = false) private BigDecimal price; + @Schema(description = "结算月份") + private String month; + @Schema(description = "订单是否失效(0未失效 1已失效)") private Integer isInvalid;