|
@@ -290,28 +290,34 @@ func getGetCriteriaType(entId, positionId, tag int64) []map[string]interface{} {
|
|
|
}
|
|
|
func getConfiguration(conditionName, conditionType string, entId int64, positionId int64) ([]map[string]interface{}, map[string]interface{}) {
|
|
|
dataMap := make(map[string]interface{})
|
|
|
+ filedType := ""
|
|
|
+ if conditionType == "industry" {
|
|
|
+ filedType = "2"
|
|
|
+ } else {
|
|
|
+ filedType = "3"
|
|
|
+ }
|
|
|
data := IC.BiMysql.SelectBySql(`SELECT
|
|
|
- DISTINCT b.name,b.element_value as code
|
|
|
+ DISTINCT b.name,b.code as code
|
|
|
FROM
|
|
|
- customer_data_yys_permissions a INNER JOIN customer_data_yys_permission_elements 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.element_value,a.element_value)
|
|
|
- and b.element_field=? order by code `, positionId, entId, conditionName, conditionType)
|
|
|
+ and FIND_IN_SET( b.code,a.element_value)
|
|
|
+ and b.type=? order by code `, positionId, entId, conditionName, filedType)
|
|
|
options := []map[string]interface{}{}
|
|
|
if data == nil {
|
|
|
return options, dataMap
|
|
|
}
|
|
|
if len(*data) == 0 {
|
|
|
data = IC.BiMysql.SelectBySql(`SELECT
|
|
|
- DISTINCT name,element_value as code
|
|
|
+ DISTINCT name,code as code
|
|
|
FROM
|
|
|
- customer_data_yys_permission_elements where
|
|
|
+ d_yys_analyze_dimensions where
|
|
|
ent_id = ?
|
|
|
- and element_field=? and pcode!="" order by code`, entId, conditionType)
|
|
|
+ and type=? order by code`, entId, filedType)
|
|
|
}
|
|
|
if data != nil && len(*data) > 0 {
|
|
|
options = append(options, map[string]interface{}{
|