فهرست منبع

Merge branch 'cygx/cygx_need_959' of http://8.136.199.33:3000/hongze/hz_crm_api into debug

zhangchuanxing 5 ماه پیش
والد
کامیت
15f87e446f
1فایلهای تغییر یافته به همراه11 افزوده شده و 6 حذف شده
  1. 11 6
      controllers/cygx/report_selection.go

+ 11 - 6
controllers/cygx/report_selection.go

@@ -398,14 +398,19 @@ func (this *ReportSelectionController) Detail() {
 			return
 		}
 		for kIndustrial, vIndustrial := range listSon {
+			var industrialNames string
 			//如果报告精选关联的产业被删除了 则做以下处理
-			//if vIndustrial.IndustrialManagementName == "" {
-			industrialNames, err := cygx.GetindustrialManagementNamesBySubjectName(vIndustrial.IndustrialSubjectName, vIndustrial.ChartPermissionId)
-			if err != nil {
-				br.Msg = "获取失败!"
-				br.ErrMsg = "获取删除删除之后的产业失败,Err:" + err.Error() + vIndustrial.IndustrialSubjectId
-				return
+			if vIndustrial.IndustrialSubjectName == "" {
+				industrialNames = vIndustrial.IndustrialManagementNames
+			} else {
+				industrialNames, err = cygx.GetindustrialManagementNamesBySubjectName(vIndustrial.IndustrialSubjectName, vIndustrial.ChartPermissionId)
+				if err != nil {
+					br.Msg = "获取失败!"
+					br.ErrMsg = "获取删除删除之后的产业失败,Err:" + err.Error() + vIndustrial.IndustrialSubjectId
+					return
+				}
 			}
+
 			if vIndustrial.Label != "" {
 				vIndustrial.CompanyLabel = strings.Split(vIndustrial.Label, "{|}")
 			}