Переглянути джерело

Merge branch 'dev_v1.1.63_wh' of BaseService/jyMicroservices into feature/v1.1.63

王浩 7 місяців тому
батько
коміт
9fa10f7e79
1 змінених файлів з 13 додано та 13 видалено
  1. 13 13
      jyBXCore/rpc/service/operator.go

+ 13 - 13
jyBXCore/rpc/service/operator.go

@@ -320,8 +320,8 @@ func getConfiguration(conditionName, conditionType string, entId int64, position
 					and a.is_delete = 0 
 					AND a.element_name = ?
 				and  FIND_IN_SET( b.code,a.element_value)
-				inner   join  d_yys_dimensions_order c  on  b.name=c.name and   b.type= c.type and  b.type=?
-				order by  c.id `, positionId, entId, conditionName, filedType)
+				left   join  d_yys_dimensions_order c  on  b.name=c.name and   b.type= c.type and  b.type=?
+				order by  c.id,b.code`, positionId, entId, conditionName, filedType)
 	} else {
 		if conditionType == "winner_tag" {
 			filedType = "3"
@@ -339,8 +339,8 @@ func getConfiguration(conditionName, conditionType string, entId int64, position
 					and a.is_delete = 0 
 					AND a.element_name = ?
 				and  FIND_IN_SET( b.code,a.element_value)
-				inner   join  d_yys_dimensions_order c  on  b.name=c.name and   b.type= c.type and  b.type=?
-				order by  c.id `, positionId, entId, conditionName, filedType)
+				left   join  d_yys_dimensions_order c  on  b.name=c.name and   b.type= c.type and  b.type=?
+				order by  c.id,b.code `, positionId, entId, conditionName, filedType)
 	}
 
 	options := []map[string]interface{}{}
@@ -353,9 +353,9 @@ func getConfiguration(conditionName, conditionType string, entId int64, position
 					DISTINCT a.name,a.code
 				FROM
 					d_yys_analyze_dimensions a  
-				inner  join d_yys_dimensions_order b  on  a.name=b.name and  a.type=b.type    and   
+				left   join d_yys_dimensions_order b  on  a.name=b.name and  a.type=b.type    and   
 					a.ent_id = ?
-				and  a.type=?  order by  b.id`, entId, filedType)
+				and  a.type=?  order by  b.id,a.code`, entId, filedType)
 		} else {
 			data = IC.BiMysql.SelectBySql(`SELECT
 					DISTINCT a.name,a.code
@@ -469,9 +469,9 @@ func getArea(entid, positionId int64, labelArr *[]map[string]interface{}) map[st
 				is_delete = 0  and    position_id=? and   ent_id=?
 		) t1 ON  t0.eid = t1.企业_ID 
 		WHERE 
-			(t1.行业要素值 IS NULL OR FIND_IN_SET(t0.INDUSTRY, t1.行业要素值)) AND 
-			(t1.地区要素值 IS NULL OR FIND_IN_SET(t0.REGION, t1.地区要素值)) AND 
-			(t1.中标标签要素值 IS NULL OR FIND_IN_SET(t0.WINNER_TAG, t1.中标标签要素值)) AND 
+			(t1.行业要素值 IS NULL OR  t1.行业要素值="null" OR FIND_IN_SET(t0.INDUSTRY, t1.行业要素值)) AND 
+			(t1.地区要素值 IS NULL OR  t1.地区要素值="null" OR FIND_IN_SET(t0.REGION, t1.地区要素值)) AND 
+			(t1.中标标签要素值 IS NULL OR  t1.中标标签要素值="null" OR FIND_IN_SET(t0.WINNER_TAG, t1.中标标签要素值)) AND 
 			(t1.经营单位要素值 IS NULL OR  t1.经营单位要素值="null"  or   FIND_IN_SET(t0.tagname2, t1.经营单位要素值)) AND 
 			(t0.STATUS = 1) 
 		GROUP BY area, city, district ORDER BY  area, city, district`, positionId, entid)
@@ -844,16 +844,16 @@ func SearchList(operator Operator) (int64, *[]map[string]interface{}, int64) {
 		region := gconv.String((*configData)[0]["region"])
 		winner_tag := gconv.String((*configData)[0]["winner_tag"])
 		industry := gconv.String((*configData)[0]["industry"])
-		if tagname != "" {
+		if tagname != "" && tagname != "null" {
 			filterArr = append(filterArr, fmt.Sprintf(`{"terms":{"tagname":["%s"]}}`, strings.Join(strings.Split(tagname, ","), `","`)))
 		}
-		if region != "" {
+		if region != "" && tagname != "null" {
 			filterArr = append(filterArr, fmt.Sprintf(`{"terms":{"region":["%s"]}}`, strings.Join(strings.Split(region, ","), `","`)))
 		}
-		if winner_tag != "" {
+		if winner_tag != "" && tagname != "null" {
 			filterArr = append(filterArr, fmt.Sprintf(`{"terms":{"winner_tag":["%s"]}}`, strings.Join(strings.Split(winner_tag, ","), `","`)))
 		}
-		if industry != "" {
+		if industry != "" && tagname != "null" {
 			filterArr = append(filterArr, fmt.Sprintf(`{"terms":{"industry":["%s"]}}`, strings.Join(strings.Split(industry, ","), `","`)))
 		}
 	}