|
@@ -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{}{
|