|
@@ -552,30 +552,35 @@ func (this *CompanyUserController) AddUser() {
|
|
|
//for _, v := range card.WordsResult {
|
|
|
// mobileStr += v.Words + ","
|
|
|
//}
|
|
|
- isFlag := true
|
|
|
+ isFlag := false
|
|
|
if len(card.WordsResult.MOBILE) > 0 {
|
|
|
mobileStr := strings.Join(card.WordsResult.MOBILE, ",")
|
|
|
- if req.MobileOne != "" {
|
|
|
- if strings.Contains(mobileStr, req.MobileOne) || mobileStr == "" {
|
|
|
- isFlag = true
|
|
|
- } else {
|
|
|
- isFlag = false
|
|
|
- }
|
|
|
+ //if req.MobileOne != "" {
|
|
|
+ // if strings.Contains(mobileStr, req.MobileOne) || mobileStr == "" {
|
|
|
+ // isFlag = true
|
|
|
+ // } else {
|
|
|
+ // isFlag = false
|
|
|
+ // }
|
|
|
+ //}
|
|
|
+ //
|
|
|
+ //if isFlag == false && req.MobileTwo != "" {
|
|
|
+ // if strings.Contains(mobileStr, req.MobileTwo) {
|
|
|
+ // isFlag = true
|
|
|
+ // } else {
|
|
|
+ // isFlag = false
|
|
|
+ // }
|
|
|
+ //}
|
|
|
+ if req.MobileOne != "" && strings.Contains(mobileStr, req.MobileOne) {
|
|
|
+ isFlag = true
|
|
|
}
|
|
|
-
|
|
|
- if isFlag == false && req.MobileTwo != "" {
|
|
|
- if strings.Contains(mobileStr, req.MobileTwo) {
|
|
|
- isFlag = true
|
|
|
- } else {
|
|
|
- isFlag = false
|
|
|
- }
|
|
|
+ if req.MobileTwo != "" && strings.Contains(mobileStr, req.MobileTwo) {
|
|
|
+ isFlag = true
|
|
|
}
|
|
|
//如果百度识别出来了客户名称,那么将识别出来的客户名称添加到待校验客户名称切片中
|
|
|
if len(card.WordsResult.COMPANY) > 0 && card.WordsResult.COMPANY[0] != "" {
|
|
|
companyNameSlice = card.WordsResult.COMPANY
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
//如果百度未识别出来手机号或者公司名称,那么进行阿里识别
|
|
|
if !isFlag || (len(companyNameSlice) == 0 && crmConfig.ConfigValue == "true") {
|
|
|
//阿里云识别
|
|
@@ -1958,20 +1963,26 @@ func (this *CompanyUserController) EditUser() {
|
|
|
// mobileStr += v.Words + ","
|
|
|
//}
|
|
|
mobileStr := strings.Join(card.WordsResult.MOBILE, ",")
|
|
|
- isFlag := true
|
|
|
- if req.MobileOne != "" {
|
|
|
- if strings.Contains(mobileStr, req.MobileOne) {
|
|
|
- isFlag = true
|
|
|
- } else {
|
|
|
- isFlag = false
|
|
|
- }
|
|
|
+ isFlag := false
|
|
|
+ //if req.MobileOne != "" {
|
|
|
+ // if strings.Contains(mobileStr, req.MobileOne) {
|
|
|
+ // isFlag = true
|
|
|
+ // } else {
|
|
|
+ // isFlag = false
|
|
|
+ // }
|
|
|
+ //}
|
|
|
+ //if isFlag == false && req.MobileTwo != "" {
|
|
|
+ // if strings.Contains(mobileStr, req.MobileTwo) {
|
|
|
+ // isFlag = true
|
|
|
+ // } else {
|
|
|
+ // isFlag = false
|
|
|
+ // }
|
|
|
+ //}
|
|
|
+ if req.MobileOne != "" && strings.Contains(mobileStr, req.MobileOne) {
|
|
|
+ isFlag = true
|
|
|
}
|
|
|
- if isFlag == false && req.MobileTwo != "" {
|
|
|
- if strings.Contains(mobileStr, req.MobileTwo) {
|
|
|
- isFlag = true
|
|
|
- } else {
|
|
|
- isFlag = false
|
|
|
- }
|
|
|
+ if req.MobileTwo != "" && strings.Contains(mobileStr, req.MobileTwo) {
|
|
|
+ isFlag = true
|
|
|
}
|
|
|
|
|
|
if !isFlag {
|
|
@@ -2491,15 +2502,18 @@ func (this *CompanyController) PotentialUserMove() {
|
|
|
br.ErrMsg = "名片识别失败,Err:" + err.Error()
|
|
|
return
|
|
|
}
|
|
|
- isFlag := true
|
|
|
+ isFlag := false
|
|
|
if len(card.WordsResult.MOBILE) > 0 {
|
|
|
mobileStr := strings.Join(card.WordsResult.MOBILE, ",")
|
|
|
- if req.Mobile != "" {
|
|
|
- if strings.Contains(mobileStr, req.Mobile) || mobileStr == "" {
|
|
|
- isFlag = true
|
|
|
- } else {
|
|
|
- isFlag = false
|
|
|
- }
|
|
|
+ //if req.Mobile != "" {
|
|
|
+ // if strings.Contains(mobileStr, req.Mobile) || mobileStr == "" {
|
|
|
+ // isFlag = true
|
|
|
+ // } else {
|
|
|
+ // isFlag = false
|
|
|
+ // }
|
|
|
+ //}
|
|
|
+ if req.Mobile != "" && strings.Contains(mobileStr, req.Mobile) {
|
|
|
+ isFlag = true
|
|
|
}
|
|
|
}
|
|
|
if !isFlag {
|
|
@@ -5080,17 +5094,22 @@ func (this *CompanyController) ApplyRecordPotentialUserMove() {
|
|
|
br.ErrMsg = "名片识别失败,Err:" + err.Error()
|
|
|
return
|
|
|
}
|
|
|
- isFlag := true
|
|
|
+ isFlag := false
|
|
|
if len(card.WordsResult.MOBILE) > 0 {
|
|
|
mobileStr := strings.Join(card.WordsResult.MOBILE, ",")
|
|
|
- if req.Mobile != "" {
|
|
|
- if strings.Contains(mobileStr, req.Mobile) || mobileStr == "" {
|
|
|
- isFlag = true
|
|
|
- } else {
|
|
|
- isFlag = false
|
|
|
- }
|
|
|
+ //if req.Mobile != "" {
|
|
|
+ // if strings.Contains(mobileStr, req.Mobile) || mobileStr == "" {
|
|
|
+ // isFlag = true
|
|
|
+ // } else {
|
|
|
+ // isFlag = false
|
|
|
+ // }
|
|
|
+ //}
|
|
|
+
|
|
|
+ if req.Mobile != "" && strings.Contains(mobileStr, req.Mobile) {
|
|
|
+ isFlag = true
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
if !isFlag {
|
|
|
//阿里云识别
|
|
|
//if utils.RunMode == "release" {
|