|
@@ -552,30 +552,35 @@ func (this *CompanyUserController) AddUser() {
|
|
|
|
|
|
|
|
|
|
|
|
- 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 != "" && 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 := 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 != "" && 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 != "" && 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 != "" && strings.Contains(mobileStr, req.Mobile) {
|
|
|
+ isFlag = true
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
if !isFlag {
|
|
|
|
|
|
|