|
@@ -75,13 +75,14 @@ func GetReportProjectInfo(param *ReportProjectInfoParam, positionId int64) (data
|
|
|
// 行业 {"水利水电":["水利工程","发电工程","航运工程","其他工程"]} sql中处理成 "水利水电_水利工程"
|
|
|
tmpArr := []string{}
|
|
|
for topIndustry, subList := range param.Industry {
|
|
|
- for i := 0; i < len(subList); i++ {
|
|
|
- tmpArr = append(tmpArr, "find_in_set(?,subscopeclass)")
|
|
|
- values = append(values, fmt.Sprintf("%s_%s", topIndustry, subList[i]))
|
|
|
- }
|
|
|
if param.From == From {
|
|
|
tmpArr = append(tmpArr, "find_in_set(?,subscopeclass)")
|
|
|
values = append(values, topIndustry)
|
|
|
+ } else {
|
|
|
+ for i := 0; i < len(subList); i++ {
|
|
|
+ tmpArr = append(tmpArr, "find_in_set(?,subscopeclass)")
|
|
|
+ values = append(values, fmt.Sprintf("%s_%s", topIndustry, subList[i]))
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
qstr = append(qstr, fmt.Sprintf("(%s)", strings.Join(tmpArr, " or ")))
|