Explorar o código

Merge branch 'dev_v1.0.4_wh' of CRM/application into feature/v1.0.4

王浩 hai 1 ano
pai
achega
c5ef992fe9
Modificáronse 1 ficheiros con 7 adicións e 8 borrados
  1. 7 8
      api/internal/service/owner.go

+ 7 - 8
api/internal/service/owner.go

@@ -627,6 +627,12 @@ func ProcessingStatusInit(positionId int64, dataMap *map[string]map[string]inter
 	newMap := &map[string]map[string]interface{}{}
 	//所有采购单位和处理状态对比
 	for buyerId, value := range *dataMap {
+		if _, ok := ignoredMap[buyerId]; ok {
+			value["isIgnore"] = true
+		}
+		if _, ok := createdMap[buyerId]; ok {
+			value["isCreateCustomer"] = true
+		}
 		for _, v := range strings.Split(processingStatus, ",") {
 			switch v {
 			case "1":
@@ -635,21 +641,14 @@ func ProcessingStatusInit(positionId int64, dataMap *map[string]map[string]inter
 				}
 			case "2":
 				if _, ok := ignoredMap[buyerId]; ok {
-					value["isIgnore"] = true
 					(*newMap)[buyerId] = value
 				}
+
 			case "3":
 				if _, ok := createdMap[buyerId]; ok {
-					value["isCreateCustomer"] = true
 					(*newMap)[buyerId] = value
 				}
 			case "全部", "":
-				if _, ok := ignoredMap[buyerId]; ok {
-					value["isIgnore"] = true
-				}
-				if _, ok := createdMap[buyerId]; ok {
-					value["isCreateCustomer"] = true
-				}
 				(*newMap)[buyerId] = value
 			}
 		}