浏览代码

天然气

ziwen 2 年之前
父节点
当前提交
4af0609427
共有 1 个文件被更改,包括 12 次插入12 次删除
  1. 12 12
      models/base_from_gie.go

+ 12 - 12
models/base_from_gie.go

@@ -134,13 +134,9 @@ func AddEdbDataFromGie(edbCode string) (err error) {
 	l := len(edbCode)
 	if strings.Contains(edbCode[l-2:], "GS") {
 		suffix = "GS"
-	} else if strings.Contains(edbCode[l-1:], "C") {
-		suffix = "C"
-	} else if strings.Contains(edbCode[l-2:], "CF") {
+	}else if strings.Contains(edbCode[l-2:], "CF") {
 		suffix = "CF"
-	} else if strings.Contains(edbCode[l-1:], "F") {
-		suffix = "F"
-	} else if strings.Contains(edbCode[l-1:], "T") {
+	}  else if strings.Contains(edbCode[l-1:], "T") {
 		suffix = "T"
 	} else if strings.Contains(edbCode[l-2:], "In") {
 		suffix = "In"
@@ -152,6 +148,10 @@ func AddEdbDataFromGie(edbCode string) (err error) {
 		suffix = "IC"
 	} else if strings.Contains(edbCode[l-2:], "WC") {
 		suffix = "WC"
+	} else if strings.Contains(edbCode[l-1:], "F") {
+		suffix = "F"
+	} else if strings.Contains(edbCode[l-1:], "C") {
+		suffix = "C"
 	} else {
 		suffix = ""
 	}
@@ -245,13 +245,9 @@ func RefreshEdbDataFromGie(edbInfoId int, edbCode, startDate string) (err error)
 	l := len(edbCode)
 	if strings.Contains(edbCode[l-2:], "GS") {
 		suffix = "GS"
-	} else if strings.Contains(edbCode[l-1:], "C") {
-		suffix = "C"
-	} else if strings.Contains(edbCode[l-2:], "CF") {
+	}else if strings.Contains(edbCode[l-2:], "CF") {
 		suffix = "CF"
-	} else if strings.Contains(edbCode[l-1:], "F") {
-		suffix = "F"
-	} else if strings.Contains(edbCode[l-1:], "T") {
+	}  else if strings.Contains(edbCode[l-1:], "T") {
 		suffix = "T"
 	} else if strings.Contains(edbCode[l-2:], "In") {
 		suffix = "In"
@@ -263,6 +259,10 @@ func RefreshEdbDataFromGie(edbInfoId int, edbCode, startDate string) (err error)
 		suffix = "IC"
 	} else if strings.Contains(edbCode[l-2:], "WC") {
 		suffix = "WC"
+	} else if strings.Contains(edbCode[l-1:], "F") {
+		suffix = "F"
+	} else if strings.Contains(edbCode[l-1:], "C") {
+		suffix = "C"
 	} else {
 		suffix = ""
 	}