Jianghan 1 年之前
父節點
當前提交
87df93ff36
共有 1 個文件被更改,包括 5 次插入3 次删除
  1. 5 3
      CMPlatform/util/util.go

+ 5 - 3
CMPlatform/util/util.go

@@ -177,9 +177,11 @@ func GetFieldData(tmp map[string]interface{}, field string) string {
 	if strings.Contains(field, "procurementlist.") {
 		text := ""
 		field = strings.ReplaceAll(field, "procurementlist.", "")
-		for _, pm := range tmp["procurementlist"].([]interface{}) {
-			pm1 := pm.(map[string]interface{})
-			text += common.ObjToString(pm1[field])
+		if tmp["procurementlist"] != nil {
+			for _, pm := range tmp["procurementlist"].([]interface{}) {
+				pm1 := pm.(map[string]interface{})
+				text += common.ObjToString(pm1[field])
+			}
 		}
 		return text
 	} else {