feat(order): 导入订单时新增结算相关字段支持
- 新增结算金额、实发金额、结算单价、税费和月份字段 - 支持从Excel导入时读取新增的结算相关数据 - 在订单实体中添加对应的字段定义和注解 - 根据导入数据设置用户ID并更新订单失效状态 - 完善导入逻辑以处理新增字段的数据映射
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user