xyxie 1 year ago
parent
commit
34a12beccf
1 changed files with 1 additions and 1 deletions
  1. 1 1
      services/base_from_yongyi.go

+ 1 - 1
services/base_from_yongyi.go

@@ -131,6 +131,7 @@ func handleYongyiIndex(req *models.HandleYongyiExcelData, terminalCode string) (
 		}
 		indexObj.YongyiIndexId = indexId
 	} else if isAdd == 2 {
+		indexId = item.YongyiIndexId
 		if item.TerminalCode == `` && terminalCode != `` {
 			item.TerminalCode = terminalCode
 			err = item.Update([]string{"TerminalCode"})
@@ -176,7 +177,6 @@ func handleYongyiIndex(req *models.HandleYongyiExcelData, terminalCode string) (
 		dateStr := v.DataTime
 		exitDataMap[dateStr] = v
 	}
-	indexId = item.YongyiIndexId
 
 	// 遍历excel数据,然后跟现有的数据做校验,不存在则入库
 	for date, value := range excelDataMap {