Pārlūkot izejas kodu

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

王浩 7 mēneši atpakaļ
vecāks
revīzija
2a9fa9c136
1 mainītis faili ar 10 papildinājumiem un 7 dzēšanām
  1. 10 7
      jyBXCore/rpc/service/operator.go

+ 10 - 7
jyBXCore/rpc/service/operator.go

@@ -299,25 +299,28 @@ func getConfiguration(conditionName, conditionType string, entId int64, position
 	data := IC.BiMysql.SelectBySql(`SELECT
 					DISTINCT b.name,b.code as code
 				FROM
-					customer_data_yys_permissions  a  INNER JOIN   d_yys_analyze_dimensions  b  
+					customer_data_yys_permissions  a  
+				INNER JOIN   d_yys_analyze_dimensions  b  
 				on  
 				    a.position_id=?
 					and a.ent_id = ?
 					and a.is_delete = 0 
 					AND a.element_name = ?
-				and  FIND_IN_SET( b.code,a.element_value)	
-				and  b.type=?  order by  code `, positionId, entId, conditionName, filedType)
+				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, filedType)
 	options := []map[string]interface{}{}
 	if data == nil {
 		return options, dataMap
 	}
 	if len(*data) == 0 {
 		data = IC.BiMysql.SelectBySql(`SELECT
-					DISTINCT name,code as  code
+					DISTINCT a.name,a.code
 				FROM
-					d_yys_analyze_dimensions  where 
-					ent_id = ?
-				and  type=?  order by  code`, entId, filedType)
+					d_yys_analyze_dimensions a  
+				inner  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)
 	}
 	if data != nil && len(*data) > 0 {
 		options = append(options, map[string]interface{}{