Ver Fonte

修复 bidding_file,bidding_normal 没有分类默认值

wcc há 1 ano atrás
pai
commit
af70060fd1
1 ficheiros alterados com 4 adições e 4 exclusões
  1. 4 4
      src/task/task.go

+ 4 - 4
src/task/task.go

@@ -769,10 +769,11 @@ func NewTaskRunAll(tt *TTask, budp bool, mapInfo map[string]interface{}) int {
 					} else { //常规任务
 						SMap = NewClassificationRun(tt, tmp)
 						//1.针对招标分类的特殊处理
-						if tt.ID == "57982b4436b82b073c000001" && tt.S_name == "招标分类" {
+						//if tt.ID == "57982b4436b82b073c000001" && tt.S_name == "招标分类" {
+						if strings.Contains(tt.S_name, "招标分类") || tt.S_name == "招标分类" {
 							//1.一级分类时,符合结果中成交规则时
 							//todo  如果没有打上分类,调用ai 模型分类
-							if _, ok := SMap.Map["toptype"]; !ok {
+							if _, ok := SMap.Map["toptype"]; !ok || util.ObjToString(SMap.Map["toptype"]) == "其它" {
 								if util.ObjToString(tools.Config["aiurl"]) != "" {
 									now := time.Now()
 									data := map[string]interface{}{
@@ -827,9 +828,8 @@ func NewTaskRunAll(tt *TTask, budp bool, mapInfo map[string]interface{}) int {
 									SMap.Map["subtype"] = "其它"
 								}
 							} else {
-								//没有一二级,直接其它
-								SMap.Map["subtype"] = "其它"
 								SMap.Map["toptype"] = "其它"
+								SMap.Map["subtype"] = "其它"
 							}
 						}
 					}