package cygx

import (
	"fmt"
	"hongze/hz_crm_api/models/cygx"
	"hongze/hz_crm_api/services/alarm_msg"
)

// 报告匹配类型映射
func GetCygxReportMappingCygxListMap() (mapResp map[int]string) {
	var err error
	defer func() {
		if err != nil {
			fmt.Println(err)
			go alarm_msg.SendAlarmMsg("报告匹配类型映射，信息失败，Err："+err.Error(), 3)
		}
	}()
	var condition string
	var pars []interface{}
	list, err := cygx.GetCygxReportMappingCygxList(condition, pars, 0, 0)
	if err != nil {
		return
	}
	mapResp = make(map[int]string, 0)
	for _, v := range list {
		mapResp[v.Id] = v.MatchTypeName
	}
	return
}
