作者 陈志颖

fix:订单、退货单导入必填项校验

@@ -406,7 +406,8 @@ func (dividendsOrderService *DividendsOrderService) ImportDividendsOrder(importD @@ -406,7 +406,8 @@ func (dividendsOrderService *DividendsOrderService) ImportDividendsOrder(importD
406 v := reflect.ValueOf(dividendsOrder) 406 v := reflect.ValueOf(dividendsOrder)
407 for k := 0; k < t.NumField(); k++ { 407 for k := 0; k < t.NumField(); k++ {
408 //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")) 408 //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"))
409 - if k != 7 && k != 8 { 409 + fmt.Println("name:", fmt.Sprintf("%+v", t.Field(k).Name), ", value:", fmt.Sprintf("%v", v.Field(k).Interface()))
  410 + if t.Field(k).Name != "RegionName" && t.Field(k).Name != "Expense" {
410 if v.Field(k).Interface() == "" { 411 if v.Field(k).Interface() == "" {
411 col := strconv.Itoa(k + 1) 412 col := strconv.Itoa(k + 1)
412 nullCell = append(nullCell, col) 413 nullCell = append(nullCell, col)
@@ -445,7 +445,8 @@ func (dividendsReturnedOrderService *DividendsReturnedOrderService) ImportDivide @@ -445,7 +445,8 @@ func (dividendsReturnedOrderService *DividendsReturnedOrderService) ImportDivide
445 t := reflect.TypeOf(dividendsReturnedOrder) 445 t := reflect.TypeOf(dividendsReturnedOrder)
446 v := reflect.ValueOf(dividendsReturnedOrder) 446 v := reflect.ValueOf(dividendsReturnedOrder)
447 for k := 0; k < t.NumField(); k++ { 447 for k := 0; k < t.NumField(); k++ {
448 - if k != 5 && k != 8 { 448 + fmt.Println("name:", fmt.Sprintf("%+v", t.Field(k).Name), ", value:", fmt.Sprintf("%v", v.Field(k).Interface()))
  449 + if t.Field(k).Name != "RegionName" && t.Field(k).Name != "CooperationContractNumber" {
449 if v.Field(k).Interface() == "" { 450 if v.Field(k).Interface() == "" {
450 col := strconv.Itoa(k + 1) 451 col := strconv.Itoa(k + 1)
451 nullCell = append(nullCell, col) 452 nullCell = append(nullCell, col)