diff --git a/pkg/application/orderinfo/service/order_info.go b/pkg/application/orderinfo/service/order_info.go index a796b5a..ea910f9 100644 --- a/pkg/application/orderinfo/service/order_info.go +++ b/pkg/application/orderinfo/service/order_info.go @@ -1179,6 +1179,7 @@ func (service OrderInfoService) CreateNewOrderByImport(createOrderCommands []*co PartnerInfo: partnerData.Partner, SalesmanBonusPercent: cmd.SalesmanBonusPercent, CompanyId: cmd.CompanyId, + SaleDate: cmd.SaleDate, } // 批量校验合伙人分类数据 diff --git a/pkg/port/beego/controllers/order_info_controlller.go b/pkg/port/beego/controllers/order_info_controlller.go index ce2d923..354803a 100644 --- a/pkg/port/beego/controllers/order_info_controlller.go +++ b/pkg/port/beego/controllers/order_info_controlller.go @@ -1151,7 +1151,10 @@ func (c *OrderInfoController) ImportOrderFromExcel() { return } - fmt.Print(timeValue, "\n") + //saleDate, err := time.ParseInLocation("2006-01-02 15:04:05", param.SaleDate, time.Local) + saleDateWithTz := time.Date(timeValue.Year(), timeValue.Month(), timeValue.Day(), time.Now().Hour(), time.Now().Minute(), time.Now().Second(), time.Now().Nanosecond(), time.Local) + + fmt.Print("销售日期:", saleDateWithTz, "\n") // 初始化建订单命令集 orderCommands[hashString] = &orderCmd.CreateOrderCommand{ @@ -1160,7 +1163,7 @@ func (c *OrderInfoController) ImportOrderFromExcel() { DeliveryCode: row[1], BuyerName: row[2], OrderRegion: row[3], - SaleDate: timeValue, + SaleDate: saleDateWithTz, PartnerId: 0, // 根据合伙人类型+合伙人编号查找合伙人id SalesmanBonusPercent: sbPercent, Goods: []orderCmd.OrderGoodData{