|
@@ -24,8 +24,6 @@ import (
|
|
|
var LetterCase = regexp.MustCompile("[A-Za-z]")
|
|
|
var LetterCase2 = regexp.MustCompile("[A-Za-z0-9]")
|
|
|
|
|
|
-// var FilteReg = regexp.MustCompile("[()(){}]*")
|
|
|
-var FilteReg = regexp.MustCompile("[{}]*")
|
|
|
var Gmails []*mail.GmailAuth
|
|
|
|
|
|
// 匹配方式map
|
|
@@ -351,28 +349,6 @@ func GetIdRange() (bson.M, bool) {
|
|
|
|
|
|
}
|
|
|
|
|
|
-func GetFieldData(tmp map[string]interface{}, field string) string {
|
|
|
- if strings.Contains(field, "procurementlist.") {
|
|
|
- text := ""
|
|
|
- field = strings.ReplaceAll(field, "procurementlist.", "")
|
|
|
- for _, pm := range tmp["procurementlist"].([]interface{}) {
|
|
|
- pm1 := pm.(map[string]interface{})
|
|
|
- text += common.ObjToString(pm1[field])
|
|
|
- }
|
|
|
- return text
|
|
|
- } else {
|
|
|
- return common.ObjToString(tmp[field])
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-// 处理文本
|
|
|
-func ProcessData(text string) string {
|
|
|
- defer common.Catch()
|
|
|
- text = strings.ToUpper(text) //文本中的英文全转为大写
|
|
|
- text = FilteReg.ReplaceAllString(text, "") //去除一些特殊符号
|
|
|
- return text
|
|
|
-}
|
|
|
-
|
|
|
// 校验字母
|
|
|
func CheckLetter(text string, reg *regexp.Regexp, indexArr [][]int) (flag bool) {
|
|
|
defer common.Catch()
|