|
@@ -844,42 +844,6 @@ func NewTaskRunAll(tt *TTask, budp bool, mapInfo map[string]interface{}) int {
|
|
|
SMap.Map["topscope_dy"] = u.RemoveDuplicateString(tops)
|
|
|
}
|
|
|
}
|
|
|
- //3.针对行业分类,添加默认值
|
|
|
- if mapInfo["stype"] == "hangye" || strings.TrimSpace(tt.S_name) == "行业分类" {
|
|
|
- /**没有一级分类是,默认一级 '其它',二级'其它_其它'
|
|
|
- **/
|
|
|
- //tops := SMap.Map["topscopeclass"]
|
|
|
- //subs := SMap.Map["subscopeclass"]
|
|
|
- resultSubs := make([]string, 0)
|
|
|
- resultTobs := make([]string, 0)
|
|
|
- //存在行业一级分类
|
|
|
- if tops, ok := SMap.Map["topscopeclass"]; ok {
|
|
|
- if topps, ok2 := tops.([]string); ok2 {
|
|
|
- for _, v := range topps {
|
|
|
- top := util.ObjToString(v)
|
|
|
- if top != "" {
|
|
|
- resultTobs = append(resultTobs, top)
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- if subs, ok3 := SMap.Map["subscopeclass"]; ok3 {
|
|
|
- if subbs, ok4 := subs.([]string); ok4 {
|
|
|
- for _, v := range subbs {
|
|
|
- sub := util.ObjToString(v)
|
|
|
- if sub != "" {
|
|
|
- resultSubs = append(resultSubs, sub)
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- newTops, newSubs := u.ProcessTopscopeclass(resultTobs, resultSubs)
|
|
|
- SMap.Map["topscopeclass"] = newTops
|
|
|
- SMap.Map["subscopeclass"] = newSubs
|
|
|
- } else {
|
|
|
- SMap.Map["topscopeclass"] = []string{"其它"}
|
|
|
- SMap.Map["subscopeclass"] = []string{"其它"}
|
|
|
- }
|
|
|
- }
|
|
|
|
|
|
//追加时处理,//更新字段 I_fieldUpdate 0:覆盖 1:追加
|
|
|
if tt.I_fieldUpdate == 1 && tt.I_multiclass == 1 {
|
|
@@ -1226,6 +1190,42 @@ func UdpTaskRunAll(tt *TTask, budp bool, mapInfo map[string]interface{}, stype s
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ //3.针对行业分类,添加默认值
|
|
|
+ if mapInfo["stype"] == "hangye" || strings.TrimSpace(tt.S_name) == "行业分类" {
|
|
|
+ /**没有一级分类是,默认一级 '其它',二级'其它_其它'
|
|
|
+ **/
|
|
|
+ //tops := SMap.Map["topscopeclass"]
|
|
|
+ //subs := SMap.Map["subscopeclass"]
|
|
|
+ resultSubs := make([]string, 0)
|
|
|
+ resultTobs := make([]string, 0)
|
|
|
+ //存在行业一级分类
|
|
|
+ if tops, ok := SMap.Map["topscopeclass"]; ok {
|
|
|
+ if topps, ok2 := tops.([]string); ok2 {
|
|
|
+ for _, v := range topps {
|
|
|
+ top := util.ObjToString(v)
|
|
|
+ if top != "" {
|
|
|
+ resultTobs = append(resultTobs, top)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if subs, ok3 := SMap.Map["subscopeclass"]; ok3 {
|
|
|
+ if subbs, ok4 := subs.([]string); ok4 {
|
|
|
+ for _, v := range subbs {
|
|
|
+ sub := util.ObjToString(v)
|
|
|
+ if sub != "" {
|
|
|
+ resultSubs = append(resultSubs, sub)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ newTops, newSubs := u.ProcessTopscopeclass(resultTobs, resultSubs)
|
|
|
+ SMap.Map["topscopeclass"] = newTops
|
|
|
+ SMap.Map["subscopeclass"] = newSubs
|
|
|
+ } else {
|
|
|
+ SMap.Map["topscopeclass"] = []string{"其它"}
|
|
|
+ SMap.Map["subscopeclass"] = []string{"其它"}
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
if tt.I_fieldUpdate == 1 && tt.I_multiclass == 1 { //更新字段 I_fieldUpdate 0:覆盖 1:追加
|