zwxi 7 月之前
父节点
当前提交
4094dad5df
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      services/base_from_oilchem.go

+ 4 - 0
services/base_from_oilchem.go

@@ -107,6 +107,8 @@ func OilchemIndexCodeGenerator(indexName, indexCodeStr, marketSampleName string)
 		a.Fallback = func(r rune, a pinyin.Args) []string {
 			return []string{string(r)}
 		}
+		indexCodeStr = strings.Replace(indexCodeStr, "(", "", -1)
+		indexCodeStr = strings.Replace(indexCodeStr, ")", "", -1)
 		rows := pinyin.Pinyin(indexCodeStr, a)
 		for i := 0; i < len(rows); i++ {
 			//strResult += rows[i][0]
@@ -143,7 +145,9 @@ func OilchemIndexCodeGenerator(indexName, indexCodeStr, marketSampleName string)
 		strResult = strings.Replace(strResult, "(", "", -1)
 		strResult = strings.Replace(strResult, ")", "", -1)
 
+
 		needAdd = true
+		strResult = "lzzxw" + strResult
 		indexCode = strings.Replace(strResult, " ", "", -1)
 		IndexCodeMap[indexName] = indexCode
 	}