作者 陈志颖

fix:导入分红订单

... ... @@ -604,7 +604,7 @@ func (dividendsOrderService *DividendsOrderService) ImportDividendsOrder(importD
dividendsOrderCommands[hashString] = &command.CreateDividendsOrderCommand{
CustomerName: dividendsOrder.DividendsCustomerName,
DividendsOriginalOrderNum: dividendsOrder.OriginalOrderNum,
OrderTime: string(rune(timeValue.Nanosecond() / 1000)),
OrderTime: strconv.FormatInt(timeValue.Local().UnixNano()/1e6, 10),
Remarks: "",
RegionName: dividendsOrder.RegionName,
OperatorUid: strconv.FormatInt(importDividendsOrderCommand.UserId, 10),
... ...
... ... @@ -502,6 +502,18 @@ func (dividendsReturnedOrderService *DividendsReturnedOrderService) ImportDivide
break
}
// 退货日期格式转换
timeValue2, err := time.ParseInLocation("2006/01/02", dividendsReturnedOrder.DividendsReturnedDate, time.Local)
if err != nil {
var tmpRow []string
tmpRow = append(tmpRow, "无效的订单日期") // 错误信息
s := strconv.Itoa(i + 1)
tmpRow = append(tmpRow, s) // 行号
//tmpRow = append(tmpRow, dividendsReturnedOrder.OriginalOrderNum) // TODO 错误行数据
aggregateErrorList = append(aggregateErrorList, tmpRow)
break
}
// 产品相关:产品名称,退货数量、退货价格
quantity, err := strconv.ParseInt(dividendsReturnedOrder.OrderGoodQuantity, 10, 64)
if err != nil {
... ... @@ -516,9 +528,10 @@ func (dividendsReturnedOrderService *DividendsReturnedOrderService) ImportDivide
dividendsReturnedOrderCommands[hashString] = &command.CreateDividendsReturnedOrderCommand{
DividendsReturnedCustomerName: dividendsReturnedOrder.DividendsReturnedCustomerName,
OriginalOrderNum: dividendsReturnedOrder.OriginalOrderNum,
OrderTime: string(rune(timeValue.Nanosecond() / 1000)),
OrderTime: strconv.FormatInt(timeValue.Local().UnixNano()/1e6, 10),
Remarks: "",
RegionName: dividendsReturnedOrder.RegionName,
DividendsReturnedDate: strconv.FormatInt(timeValue2.Local().UnixNano()/1e6, 10),
OperatorUid: strconv.FormatInt(importDividendsReturnedOrderCommand.UserId, 10),
OrderGoods: []command.OrderGoods{
{
... ...