dividends_incentives_estimate_dto.go 1.3 KB
package dto

import (
	"gitlab.fjmaimaimai.com/allied-creation/allied-creation-cooperation/pkg/domain"
	"time"
)

type DividendsIncentivesEstimateDto struct {
	//	分红订单产品ID
	OrderGoodId int64 `json:"orderGoodId,string"`
	//	共创合约编号
	CooperationContractNumber string `json:"cooperationContractNumber"`
	//	分红订单号或退货单号、
	OrderNumber string `json:"orderNumber"`
	//	来源单号
	OriginalOrderNum string `json:"originalOrderNum"`
	//	客户名称
	CustomerName string `json:"customerName"`
	//	订单区域
	RegionName string `json:"region"`
	// 订单产品名称
	OrderGoodName string `json:"orderGoodName"`
	//	订单金额
	OrderAmount float64 `json:"orderAmount"`
	//	订单/退货单日期
	OrderDate time.Time `json:"orderDate"`
}

func (dto *DividendsIncentivesEstimateDto) LoadDto(orderGood *domain.OrderGood, orderNumber string, originalOrderNum string, customerName string, regionName string, orderDate time.Time) error {
	dto.OrderGoodId = orderGood.OrderGoodId
	dto.CooperationContractNumber = orderGood.CooperationContractNumber
	dto.OrderNumber = orderNumber
	dto.OriginalOrderNum = originalOrderNum
	dto.CustomerName = customerName
	dto.RegionName = regionName
	dto.OrderGoodName = orderGood.OrderGoodName
	dto.OrderAmount = orderGood.OrderGoodAmount
	dto.OrderDate = orderDate
	return nil
}