作者 陈志颖

fix:订单、退货单导入必填项修改

... ... @@ -406,8 +406,8 @@ func (dividendsOrderService *DividendsOrderService) ImportDividendsOrder(importD
v := reflect.ValueOf(dividendsOrder)
for k := 0; k < t.NumField(); k++ {
//fmt.Println("name:", fmt.Sprintf("%+v", t.Field(k).Name), ", value:", fmt.Sprintf("%v", v.Field(k).Interface()), ", yaml:", t.Field(k).Tag.Get("yaml"))
fmt.Println("name:", fmt.Sprintf("%+v", t.Field(k).Name), ", value:", fmt.Sprintf("%v", v.Field(k).Interface()))
if t.Field(k).Name != "RegionName" && t.Field(k).Name != "Expense" {
//fmt.Println("name:", fmt.Sprintf("%+v", t.Field(k).Name), ", value:", fmt.Sprintf("%v", v.Field(k).Interface()))
if t.Field(k).Name != "Expense" {
if v.Field(k).Interface() == "" {
col := strconv.Itoa(k + 1)
nullCell = append(nullCell, col)
... ...
... ... @@ -445,14 +445,14 @@ func (dividendsReturnedOrderService *DividendsReturnedOrderService) ImportDivide
t := reflect.TypeOf(dividendsReturnedOrder)
v := reflect.ValueOf(dividendsReturnedOrder)
for k := 0; k < t.NumField(); k++ {
fmt.Println("name:", fmt.Sprintf("%+v", t.Field(k).Name), ", value:", fmt.Sprintf("%v", v.Field(k).Interface()))
if t.Field(k).Name != "RegionName" {
if v.Field(k).Interface() == "" {
col := strconv.Itoa(k + 1)
nullCell = append(nullCell, col)
nullFlag = true
}
//fmt.Println("name:", fmt.Sprintf("%+v", t.Field(k).Name), ", value:", fmt.Sprintf("%v", v.Field(k).Interface()))
//if t.Field(k).Name != "RegionName" {
if v.Field(k).Interface() == "" {
col := strconv.Itoa(k + 1)
nullCell = append(nullCell, col)
nullFlag = true
}
//}
}
if nullFlag {
myRow := &domain.FailReturnedInfo{
... ...