123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437 |
- package cygx
- import (
- "fmt"
- "gopkg.in/gomail.v2"
- "hongze/hz_crm_api/models/cygx"
- "sort"
- "strings"
- )
- // 发送邮件
- func SendResearchSummaryEmail(detail *cygx.DetailCygxResearchSummaryRep, touser []string) bool {
- //if RunMode == "debug" {
- // fmt.Println("len(touser):", len(touser))
- // FileLog.Info(fmt.Sprint(title, ";", content))
- // return false
- //}
- m := gomail.NewMessage()
- m.SetHeader("From", "hzcygx@hzinsights.com ")
- //m.SetHeader("To", touser...)
- var user []string
- user = append(user, "zwxi@hzinsights.com ")
- user = append(user, "zqliu@hzinsights.com ")
- user = append(user, "tshen@hzinsights.com ")
- user = append(user, "hdong@hzinsights.com ")
- user = append(user, "cxzhang@hzinsights.com ")
- m.SetHeader("Bcc", user...)
- m.SetHeader("Subject", detail.Title)
- date := strings.ReplaceAll(detail.Title, "月", "/")
- date = strings.ReplaceAll(date, "日", "")
- date = strings.ReplaceAll(date, "至", "-")
- titleArr := strings.Split(date, "(")
- title := "【" + titleArr[0] + "】" + titleArr[1]
- title = strings.ReplaceAll(title, ")", "")
- title = strings.ReplaceAll(title, "(", "")
- head := "<!DOCTYPE html>\n<html lang=\"en\">\n <head>\n <meta charset=\"UTF-8\" />\n <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\" />\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n <title>Document</title>\n <style>\n * {\n padding: 0;\n margin: 0;\n }\n a {\n text-decoration: none;\n }\n\n a:hover {\n text-decoration: underline;\n }\n div {\n box-sizing: border-box;\n }\n h4 {\n color: #ff0c15;\n margin-bottom: 10px;\n }\n .title-content {\n margin: 6px 0;\n }\n .link {\n display: block;\n margin: 5px 0 35px;\n }\n </style>\n </head>\n " +
- "<body>\n <!-- 深度报告篇 、产业调研纪要篇 、晨会精华篇 -->\n "
- div := " <div class=\"box\">\n <p style=\"font-size: 16px;\">Dear All,</p>\n\n<p style=\"font-size: 16px; margin-left: 60px;\">以下是弘则研究" + title + ",供您参考。</p>"
- allBody := ""
- bodyMap := make(map[string]string)
- {
- //深度报告篇
- sectionBody := ""
- report := " <br /><br /><h4>深度报告篇</h4>\n "
- //company := " <span style=\"color: #ff1720\">#芯碁微装#广信材料#东威科技#爱旭股份#海源复材</span>\n </div>\n "
- body := ""
- list := cygx.RSList{}
- list = detail.ListSdbg
- sort.Sort(list)
- i := 0
- for _, item := range list {
- var industry string
- var secondBody string
- if len(item.List) > 0 {
- if i > 0 {
- industry += "<br />"
- }
- industry += " <p><strong>【" + item.ChartPermissionName + "】</strong></p>\n "
- for _, log := range item.List {
- sdbgBody := strings.TrimRight(log.Body, "<br />")
- sdbgLink := " <a href=" + log.ReportLink + " class=\"link\" style=\"color: #1534e7\">" + log.ReportLink + "</a>\n </div>\n\n "
- thirdBody := sdbgBody + sdbgLink
- secondBody += thirdBody
- //sdbgBody := " <div>\n 1、金属化环节降银耗是非硅降本核心:银栅线成本是光伏电池片非硅成本大头,尤其是异质结使用低温银浆用量更高,降银耗是未来降本核心。\n 2、铜栅线效率高,成本较低具备显著经济性:铜栅线导电性优于银栅线,且高宽比好、遮光少,转换效率更高;摆脱银的使用后单瓦成本低,虽然设备投资额较高但回收期具备经济性。\n 3、铜电镀研发加速,有望联合异质结加速产业化:龙头光伏企业、设备公司研发取得良好进展,各环节不存在硬伤问题,有望解决异质结银耗高的问题后双双加速产业化。\n </div>\n " +
- // " <a href=\"\" class=\"link\" style=\"color: #1534e7\">https://vmp.hzinsights.com/v2/articles/7269</a>\n </div>\n\n " +
- // " <!-- 上市公司调研纪要篇 和 事件点评篇 -->\n <div class=\"box\">\n <h4>事件点评篇</h4>\n " +
- // " <div class=\"title-content\">【<span style=\"color: #ff1720\">海康威视</span>:创新不止,成长不息】</div>\n " +
- // " <div>\n 1、金属化环节降银耗是非硅降本核心:银栅线成本是光伏电池片非硅成本大头,尤其是异质结使用低温银浆用量更高,降银耗是未来降本核心。\n 2、铜栅线效率高,成本较低具备显著经济性:铜栅线导电性优于银栅线,且高宽比好、遮光少,转换效率更高;摆脱银的使用后单瓦成本低,虽然设备投资额较高但回收期具备经济性。\n 3、铜电镀研发加速,有望联合异质结加速产业化:龙头光伏企业、设备公司研发取得良好进展,各环节不存在硬伤问题,有望解决异质结银耗高的问题后双双加速产业化。\n </div>\n " +
- // " <a href=\"\" class=\"link\" style=\"color: #1534e7\">https://vmp.hzinsights.com/v2/articles/7269</a>\n </div>\n "
- }
- i++
- }
- body += industry + secondBody
- }
- if body != "" {
- sectionBody = report + body
- bodyMap[detail.SortSdbg] = sectionBody
- }
- }
- {
- sectionBody := ""
- //产业调研纪要
- report := " <br /><br /><h4>产业调研纪要</h4>\n "
- //company := " <span style=\"color: #ff1720\">#芯碁微装#广信材料#东威科技#爱旭股份#海源复材</span>\n </div>\n "
- body := ""
- list := cygx.RSList{}
- list = detail.ListCydyjy
- sort.Sort(list)
- i := 0
- for _, item := range list {
- var industry string
- var secondBody string
- if len(item.List) > 0 {
- if i > 0 {
- industry += "<br />"
- }
- industry += " <p><strong>【" + item.ChartPermissionName + "】</strong></p>\n "
- for _, log := range item.List {
- sdbgBody := strings.TrimRight(log.Body, "<br />")
- sdbgLink := " <a href=" + log.ReportLink + " class=\"link\" style=\"color: #1534e7\">" + log.ReportLink + "</a>\n </div>\n\n "
- thirdBody := sdbgBody + sdbgLink
- secondBody += thirdBody
- //sdbgBody := " <div>\n 1、金属化环节降银耗是非硅降本核心:银栅线成本是光伏电池片非硅成本大头,尤其是异质结使用低温银浆用量更高,降银耗是未来降本核心。\n 2、铜栅线效率高,成本较低具备显著经济性:铜栅线导电性优于银栅线,且高宽比好、遮光少,转换效率更高;摆脱银的使用后单瓦成本低,虽然设备投资额较高但回收期具备经济性。\n 3、铜电镀研发加速,有望联合异质结加速产业化:龙头光伏企业、设备公司研发取得良好进展,各环节不存在硬伤问题,有望解决异质结银耗高的问题后双双加速产业化。\n </div>\n " +
- // " <a href=\"\" class=\"link\" style=\"color: #1534e7\">https://vmp.hzinsights.com/v2/articles/7269</a>\n </div>\n\n " +
- // " <!-- 上市公司调研纪要篇 和 事件点评篇 -->\n <div class=\"box\">\n <h4>事件点评篇</h4>\n " +
- // " <div class=\"title-content\">【<span style=\"color: #ff1720\">海康威视</span>:创新不止,成长不息】</div>\n " +
- // " <div>\n 1、金属化环节降银耗是非硅降本核心:银栅线成本是光伏电池片非硅成本大头,尤其是异质结使用低温银浆用量更高,降银耗是未来降本核心。\n 2、铜栅线效率高,成本较低具备显著经济性:铜栅线导电性优于银栅线,且高宽比好、遮光少,转换效率更高;摆脱银的使用后单瓦成本低,虽然设备投资额较高但回收期具备经济性。\n 3、铜电镀研发加速,有望联合异质结加速产业化:龙头光伏企业、设备公司研发取得良好进展,各环节不存在硬伤问题,有望解决异质结银耗高的问题后双双加速产业化。\n </div>\n " +
- // " <a href=\"\" class=\"link\" style=\"color: #1534e7\">https://vmp.hzinsights.com/v2/articles/7269</a>\n </div>\n "
- }
- i++
- }
- body += industry + secondBody
- }
- if body != "" {
- sectionBody = report + body
- bodyMap[detail.SortCydyjy] = sectionBody
- }
- }
- {
- sectionBody := ""
- report := " <br /><br /><h4>上市公司调研纪要</h4>\n "
- //company := " <span style=\"color: #ff1720\">#芯碁微装#广信材料#东威科技#爱旭股份#海源复材</span>\n </div>\n "
- body := ""
- list := cygx.RSList{}
- list = detail.ListSsgs
- sort.Sort(list)
- i := 0
- for _, item := range list {
- var industry string
- var secondBody string
- if len(item.List) > 0 {
- if i > 0 {
- industry += "<br />"
- }
- industry += " <p><strong>【" + item.ChartPermissionName + "】</strong></p>\n "
- for _, log := range item.List {
- sdbgBody := strings.TrimRight(log.Body, "<br />")
- sdbgLink := " <a href=" + log.ReportLink + " class=\"link\" style=\"color: #1534e7\">" + log.ReportLink + "</a>\n </div>\n\n "
- thirdBody := sdbgBody + sdbgLink
- secondBody += thirdBody
- //sdbgBody := " <div>\n 1、金属化环节降银耗是非硅降本核心:银栅线成本是光伏电池片非硅成本大头,尤其是异质结使用低温银浆用量更高,降银耗是未来降本核心。\n 2、铜栅线效率高,成本较低具备显著经济性:铜栅线导电性优于银栅线,且高宽比好、遮光少,转换效率更高;摆脱银的使用后单瓦成本低,虽然设备投资额较高但回收期具备经济性。\n 3、铜电镀研发加速,有望联合异质结加速产业化:龙头光伏企业、设备公司研发取得良好进展,各环节不存在硬伤问题,有望解决异质结银耗高的问题后双双加速产业化。\n </div>\n " +
- // " <a href=\"\" class=\"link\" style=\"color: #1534e7\">https://vmp.hzinsights.com/v2/articles/7269</a>\n </div>\n\n " +
- // " <!-- 上市公司调研纪要篇 和 事件点评篇 -->\n <div class=\"box\">\n <h4>事件点评篇</h4>\n " +
- // " <div class=\"title-content\">【<span style=\"color: #ff1720\">海康威视</span>:创新不止,成长不息】</div>\n " +
- // " <div>\n 1、金属化环节降银耗是非硅降本核心:银栅线成本是光伏电池片非硅成本大头,尤其是异质结使用低温银浆用量更高,降银耗是未来降本核心。\n 2、铜栅线效率高,成本较低具备显著经济性:铜栅线导电性优于银栅线,且高宽比好、遮光少,转换效率更高;摆脱银的使用后单瓦成本低,虽然设备投资额较高但回收期具备经济性。\n 3、铜电镀研发加速,有望联合异质结加速产业化:龙头光伏企业、设备公司研发取得良好进展,各环节不存在硬伤问题,有望解决异质结银耗高的问题后双双加速产业化。\n </div>\n " +
- // " <a href=\"\" class=\"link\" style=\"color: #1534e7\">https://vmp.hzinsights.com/v2/articles/7269</a>\n </div>\n "
- }
- i++
- }
- body += industry + secondBody
- }
- if body != "" {
- sectionBody = report + body
- bodyMap[detail.SortSsgs] = sectionBody
- }
- }
- {
- sectionBody := ""
- report := " <br /><br /><h4>事件点评</h4>\n "
- //company := " <span style=\"color: #ff1720\">#芯碁微装#广信材料#东威科技#爱旭股份#海源复材</span>\n </div>\n "
- body := ""
- i := 0
- for _, item := range detail.ListSjdp {
- var industry string
- if i > 0 {
- industry += "<br />"
- }
- var secondBody string
- sdbgBody := strings.TrimRight(item.Body, "<br />")
- sdbgLink := " <a href=\"\" class=\"link\" style=\"color: #1534e7\">" + item.ReportLink + "</a>\n </div>\n\n "
- thirdBody := sdbgBody + sdbgLink
- secondBody += thirdBody
- //sdbgBody := " <div>\n 1、金属化环节降银耗是非硅降本核心:银栅线成本是光伏电池片非硅成本大头,尤其是异质结使用低温银浆用量更高,降银耗是未来降本核心。\n 2、铜栅线效率高,成本较低具备显著经济性:铜栅线导电性优于银栅线,且高宽比好、遮光少,转换效率更高;摆脱银的使用后单瓦成本低,虽然设备投资额较高但回收期具备经济性。\n 3、铜电镀研发加速,有望联合异质结加速产业化:龙头光伏企业、设备公司研发取得良好进展,各环节不存在硬伤问题,有望解决异质结银耗高的问题后双双加速产业化。\n </div>\n " +
- // " <a href=\"\" class=\"link\" style=\"color: #1534e7\">https://vmp.hzinsights.com/v2/articles/7269</a>\n </div>\n\n " +
- // " <!-- 上市公司调研纪要篇 和 事件点评篇 -->\n <div class=\"box\">\n <h4>事件点评篇</h4>\n " +
- // " <div class=\"title-content\">【<span style=\"color: #ff1720\">海康威视</span>:创新不止,成长不息】</div>\n " +
- // " <div>\n 1、金属化环节降银耗是非硅降本核心:银栅线成本是光伏电池片非硅成本大头,尤其是异质结使用低温银浆用量更高,降银耗是未来降本核心。\n 2、铜栅线效率高,成本较低具备显著经济性:铜栅线导电性优于银栅线,且高宽比好、遮光少,转换效率更高;摆脱银的使用后单瓦成本低,虽然设备投资额较高但回收期具备经济性。\n 3、铜电镀研发加速,有望联合异质结加速产业化:龙头光伏企业、设备公司研发取得良好进展,各环节不存在硬伤问题,有望解决异质结银耗高的问题后双双加速产业化。\n </div>\n " +
- // " <a href=\"\" class=\"link\" style=\"color: #1534e7\">https://vmp.hzinsights.com/v2/articles/7269</a>\n </div>\n "
- body += industry + secondBody
- i++
- }
- if body != "" {
- sectionBody = report + body
- bodyMap[detail.SortSjdp] = sectionBody
- }
- }
- //{
- // sectionBody := ""
- // report := " <br /><br /><h4>买方研选</h4>\n "
- // //company := " <span style=\"color: #ff1720\">#芯碁微装#广信材料#东威科技#爱旭股份#海源复材</span>\n </div>\n "
- // body := ""
- // list := cygx.RSList{}
- // list = detail.ListYanx
- // sort.Sort(list)
- // i := 0
- // for _, item := range list {
- // var industry string
- // var secondBody string
- // if len(item.List) > 0 {
- // if i > 0 {
- // industry += "<br />"
- // }
- // industry += " <p><strong>【" + item.ChartPermissionName + "】</strong></p>\n "
- // for _, log := range item.List {
- // sdbgBody := strings.TrimRight(log.Body, "<br />")
- // sdbgLink := " <a href=" + log.ReportLink + " class=\"link\" style=\"color: #1534e7\">" + log.ReportLink + "</a>\n </div>\n\n "
- // thirdBody := sdbgBody + sdbgLink
- // secondBody += thirdBody
- // //sdbgBody := " <div>\n 1、金属化环节降银耗是非硅降本核心:银栅线成本是光伏电池片非硅成本大头,尤其是异质结使用低温银浆用量更高,降银耗是未来降本核心。\n 2、铜栅线效率高,成本较低具备显著经济性:铜栅线导电性优于银栅线,且高宽比好、遮光少,转换效率更高;摆脱银的使用后单瓦成本低,虽然设备投资额较高但回收期具备经济性。\n 3、铜电镀研发加速,有望联合异质结加速产业化:龙头光伏企业、设备公司研发取得良好进展,各环节不存在硬伤问题,有望解决异质结银耗高的问题后双双加速产业化。\n </div>\n " +
- // // " <a href=\"\" class=\"link\" style=\"color: #1534e7\">https://vmp.hzinsights.com/v2/articles/7269</a>\n </div>\n\n " +
- // // " <!-- 上市公司调研纪要篇 和 事件点评篇 -->\n <div class=\"box\">\n <h4>事件点评篇</h4>\n " +
- // // " <div class=\"title-content\">【<span style=\"color: #ff1720\">海康威视</span>:创新不止,成长不息】</div>\n " +
- // // " <div>\n 1、金属化环节降银耗是非硅降本核心:银栅线成本是光伏电池片非硅成本大头,尤其是异质结使用低温银浆用量更高,降银耗是未来降本核心。\n 2、铜栅线效率高,成本较低具备显著经济性:铜栅线导电性优于银栅线,且高宽比好、遮光少,转换效率更高;摆脱银的使用后单瓦成本低,虽然设备投资额较高但回收期具备经济性。\n 3、铜电镀研发加速,有望联合异质结加速产业化:龙头光伏企业、设备公司研发取得良好进展,各环节不存在硬伤问题,有望解决异质结银耗高的问题后双双加速产业化。\n </div>\n " +
- // // " <a href=\"\" class=\"link\" style=\"color: #1534e7\">https://vmp.hzinsights.com/v2/articles/7269</a>\n </div>\n "
- // }
- // i++
- // }
- // body += industry + secondBody
- // }
- // if body != "" {
- // sectionBody = report + body
- // bodyMap[detail.SortYanx] = sectionBody
- // }
- //}
- {
- sectionBody := ""
- report := " <br /><br /><h4>本周晨会精华</h4>\n "
- //company := " <span style=\"color: #ff1720\">#芯碁微装#广信材料#东威科技#爱旭股份#海源复材</span>\n </div>\n "
- body := ""
- list := cygx.RSList{}
- list = detail.ListBzchjh
- sort.Sort(list)
- i := 0
- for _, item := range list {
- var industry string
- var secondBody string
- if len(item.List) > 0 {
- if i > 0 {
- industry += "<br />"
- }
- industry += " <p><strong>【" + item.ChartPermissionName + "】</strong></p>\n "
- for _, log := range item.List {
- sdbgBody := strings.TrimRight(log.Body, "<br />")
- sdbgLink := " <a href=" + log.ReportLink + " class=\"link\" style=\"color: #1534e7\">" + log.ReportLink + "</a>\n </div>\n\n "
- thirdBody := sdbgBody + sdbgLink
- secondBody += thirdBody
- //sdbgBody := " <div>\n 1、金属化环节降银耗是非硅降本核心:银栅线成本是光伏电池片非硅成本大头,尤其是异质结使用低温银浆用量更高,降银耗是未来降本核心。\n 2、铜栅线效率高,成本较低具备显著经济性:铜栅线导电性优于银栅线,且高宽比好、遮光少,转换效率更高;摆脱银的使用后单瓦成本低,虽然设备投资额较高但回收期具备经济性。\n 3、铜电镀研发加速,有望联合异质结加速产业化:龙头光伏企业、设备公司研发取得良好进展,各环节不存在硬伤问题,有望解决异质结银耗高的问题后双双加速产业化。\n </div>\n " +
- // " <a href=\"\" class=\"link\" style=\"color: #1534e7\">https://vmp.hzinsights.com/v2/articles/7269</a>\n </div>\n\n " +
- // " <!-- 上市公司调研纪要篇 和 事件点评篇 -->\n <div class=\"box\">\n <h4>事件点评篇</h4>\n " +
- // " <div class=\"title-content\">【<span style=\"color: #ff1720\">海康威视</span>:创新不止,成长不息】</div>\n " +
- // " <div>\n 1、金属化环节降银耗是非硅降本核心:银栅线成本是光伏电池片非硅成本大头,尤其是异质结使用低温银浆用量更高,降银耗是未来降本核心。\n 2、铜栅线效率高,成本较低具备显著经济性:铜栅线导电性优于银栅线,且高宽比好、遮光少,转换效率更高;摆脱银的使用后单瓦成本低,虽然设备投资额较高但回收期具备经济性。\n 3、铜电镀研发加速,有望联合异质结加速产业化:龙头光伏企业、设备公司研发取得良好进展,各环节不存在硬伤问题,有望解决异质结银耗高的问题后双双加速产业化。\n </div>\n " +
- // " <a href=\"\" class=\"link\" style=\"color: #1534e7\">https://vmp.hzinsights.com/v2/articles/7269</a>\n </div>\n "
- }
- i++
- }
- body += industry + secondBody
- }
- if body != "" {
- sectionBody = report + body
- bodyMap[detail.SortBzchjh] = sectionBody
- }
- }
- for i := 'A'; i <= 'Z'; i++ {
- k := fmt.Sprintf("%c", i)
- allBody += bodyMap[k]
- }
- bodyEnd := " </body>\n</html>"
- m.SetBody("text/html", head+div+allBody+bodyEnd)
- d := gomail.NewDialer("smtp.mxhichina.com", 465, "hzcygx@hzinsights.com", "Hzinsights2024")
- if err := d.DialAndSend(m); err != nil {
- return false
- }
- return true
- }
- func SendMinutesSummaryEmail(detail *cygx.DetailCygxMinutesSummaryRep, touser []string) bool {
- //if RunMode == "debug" {
- // fmt.Println("len(touser):", len(touser))
- // FileLog.Info(fmt.Sprint(title, ";", content))
- // return false
- //}
- m := gomail.NewMessage()
- m.SetHeader("From", "hzcygx@hzinsights.com ")
- //m.SetHeader("To", touser...)
- var user []string
- user = append(user, "zwxi@hzinsights.com ")
- user = append(user, "zqliu@hzinsights.com ")
- user = append(user, "tshen@hzinsights.com ")
- user = append(user, "hdong@hzinsights.com ")
- user = append(user, "cxzhang@hzinsights.com ")
- m.SetHeader("To", user...)
- m.SetHeader("Subject", detail.Title)
- head := "<!DOCTYPE html>\n<html lang=\"en\">\n <head>\n <meta charset=\"UTF-8\" />\n <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\" />\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n <title>Document</title>\n <style>\n * {\n padding: 0;\n margin: 0;\n }\n a {\n text-decoration: none;\n }\n\n a:hover {\n text-decoration: underline;\n }\n div {\n box-sizing: border-box;\n }\n h4 {\n color: #ff0c15;\n margin-bottom: 10px;\n }\n .title-content {\n margin: 6px 0;\n }\n .link {\n display: block;\n margin: 5px 0 35px;\n }\n </style>\n </head>\n " +
- "<body>\n <!-- 深度报告篇 、产业调研纪要篇 、晨会精华篇 -->\n "
- div := " <div class=\"box\">\n "
- allBody := ""
- bodyMap := make(map[string]string)
- {
- sectionBody := ""
- //产业调研纪要
- report := " <br /><br /><h4>产业调研纪要</h4>\n "
- body := ""
- list := cygx.RSList{}
- list = detail.ListCydyjy
- sort.Sort(list)
- i := 0
- for _, item := range list {
- var industry string
- var secondBody string
- if len(item.List) > 0 {
- if i > 0 {
- industry += "<br />"
- }
- industry += " <p><strong>【" + item.ChartPermissionName + "】</strong></p>\n "
- for _, log := range item.List {
- sdbgBody := strings.TrimRight(log.Body, "<br />")
- //第一个井号是颜色,拿第二个作为公司的分隔符
- first := strings.Index(sdbgBody, "#")
- second := strings.Index(sdbgBody[first+1:], "#") + first + 1
- d := strings.Index(sdbgBody, "</span>")
- if d < second {
- d = strings.Index(sdbgBody, "</span>")
- }
- if second != -1 {
- pre := sdbgBody[:second]
- company := sdbgBody[second:d]
- sdbgBody = pre + " <span style=\"color: #ff1720\">" + company + "</span>\n </div>\n " + sdbgBody[d:]
- }
- sdbgLink := " <a href=" + log.ReportLink + " class=\"link\" style=\"color: #1534e7\">" + log.ReportLink + "</a>\n </div>\n\n "
- thirdBody := sdbgBody + sdbgLink
- secondBody += thirdBody
- //sdbgBody := " <div>\n 1、金属化环节降银耗是非硅降本核心:银栅线成本是光伏电池片非硅成本大头,尤其是异质结使用低温银浆用量更高,降银耗是未来降本核心。\n 2、铜栅线效率高,成本较低具备显著经济性:铜栅线导电性优于银栅线,且高宽比好、遮光少,转换效率更高;摆脱银的使用后单瓦成本低,虽然设备投资额较高但回收期具备经济性。\n 3、铜电镀研发加速,有望联合异质结加速产业化:龙头光伏企业、设备公司研发取得良好进展,各环节不存在硬伤问题,有望解决异质结银耗高的问题后双双加速产业化。\n </div>\n " +
- // " <a href=\"\" class=\"link\" style=\"color: #1534e7\">https://vmp.hzinsights.com/v2/articles/7269</a>\n </div>\n\n " +
- // " <!-- 上市公司调研纪要篇 和 事件点评篇 -->\n <div class=\"box\">\n <h4>事件点评篇</h4>\n " +
- // " <div class=\"title-content\">【<span style=\"color: #ff1720\">海康威视</span>:创新不止,成长不息】</div>\n " +
- // " <div>\n 1、金属化环节降银耗是非硅降本核心:银栅线成本是光伏电池片非硅成本大头,尤其是异质结使用低温银浆用量更高,降银耗是未来降本核心。\n 2、铜栅线效率高,成本较低具备显著经济性:铜栅线导电性优于银栅线,且高宽比好、遮光少,转换效率更高;摆脱银的使用后单瓦成本低,虽然设备投资额较高但回收期具备经济性。\n 3、铜电镀研发加速,有望联合异质结加速产业化:龙头光伏企业、设备公司研发取得良好进展,各环节不存在硬伤问题,有望解决异质结银耗高的问题后双双加速产业化。\n </div>\n " +
- // " <a href=\"\" class=\"link\" style=\"color: #1534e7\">https://vmp.hzinsights.com/v2/articles/7269</a>\n </div>\n "
- }
- i++
- }
- body += industry + secondBody
- }
- if body != "" {
- sectionBody = report + body
- bodyMap[detail.SortCydyjy] = sectionBody
- }
- }
- {
- sectionBody := ""
- report := " <br /><br /><h4>上市公司调研纪要</h4>\n "
- //company := " <span style=\"color: #ff1720\">#芯碁微装#广信材料#东威科技#爱旭股份#海源复材</span>\n </div>\n "
- body := ""
- list := cygx.RSList{}
- list = detail.ListSsgs
- sort.Sort(list)
- i := 0
- for _, item := range list {
- var industry string
- var secondBody string
- if len(item.List) > 0 {
- if i > 0 {
- industry += "<br />"
- }
- industry += " <p><strong>【" + item.ChartPermissionName + "】</strong></p>\n "
- for _, log := range item.List {
- sdbgBody := strings.TrimRight(log.Body, "<br />")
- sdbgLink := " <a href=" + log.ReportLink + " class=\"link\" style=\"color: #1534e7\">" + log.ReportLink + "</a>\n </div>\n\n "
- thirdBody := sdbgBody + sdbgLink
- secondBody += thirdBody
- //sdbgBody := " <div>\n 1、金属化环节降银耗是非硅降本核心:银栅线成本是光伏电池片非硅成本大头,尤其是异质结使用低温银浆用量更高,降银耗是未来降本核心。\n 2、铜栅线效率高,成本较低具备显著经济性:铜栅线导电性优于银栅线,且高宽比好、遮光少,转换效率更高;摆脱银的使用后单瓦成本低,虽然设备投资额较高但回收期具备经济性。\n 3、铜电镀研发加速,有望联合异质结加速产业化:龙头光伏企业、设备公司研发取得良好进展,各环节不存在硬伤问题,有望解决异质结银耗高的问题后双双加速产业化。\n </div>\n " +
- // " <a href=\"\" class=\"link\" style=\"color: #1534e7\">https://vmp.hzinsights.com/v2/articles/7269</a>\n </div>\n\n " +
- // " <!-- 上市公司调研纪要篇 和 事件点评篇 -->\n <div class=\"box\">\n <h4>事件点评篇</h4>\n " +
- // " <div class=\"title-content\">【<span style=\"color: #ff1720\">海康威视</span>:创新不止,成长不息】</div>\n " +
- // " <div>\n 1、金属化环节降银耗是非硅降本核心:银栅线成本是光伏电池片非硅成本大头,尤其是异质结使用低温银浆用量更高,降银耗是未来降本核心。\n 2、铜栅线效率高,成本较低具备显著经济性:铜栅线导电性优于银栅线,且高宽比好、遮光少,转换效率更高;摆脱银的使用后单瓦成本低,虽然设备投资额较高但回收期具备经济性。\n 3、铜电镀研发加速,有望联合异质结加速产业化:龙头光伏企业、设备公司研发取得良好进展,各环节不存在硬伤问题,有望解决异质结银耗高的问题后双双加速产业化。\n </div>\n " +
- // " <a href=\"\" class=\"link\" style=\"color: #1534e7\">https://vmp.hzinsights.com/v2/articles/7269</a>\n </div>\n "
- }
- i++
- }
- body += industry + secondBody
- }
- if body != "" {
- sectionBody = report + body
- bodyMap[detail.SortSsgs] = sectionBody
- }
- }
- //{
- // sectionBody := ""
- // report := " <br /><br /><h4>买方研选</h4>\n "
- // //company := " <span style=\"color: #ff1720\">#芯碁微装#广信材料#东威科技#爱旭股份#海源复材</span>\n </div>\n "
- // body := ""
- // list := cygx.RSList{}
- // list = detail.ListSsgs
- // sort.Sort(list)
- // i := 0
- // for _, item := range detail.ListYanx {
- // var industry string
- // if i > 0 {
- // industry += "<br />"
- // }
- // var secondBody string
- // sdbgBody := strings.TrimRight(item.Body, "<br />")
- // sdbgLink := " <a href=" + item.ReportLink + " class=\"link\" style=\"color: #1534e7\">" + item.ReportLink + "</a>\n </div>\n\n "
- // thirdBody := sdbgBody + sdbgLink
- // secondBody += thirdBody
- // //sdbgBody := " <div>\n 1、金属化环节降银耗是非硅降本核心:银栅线成本是光伏电池片非硅成本大头,尤其是异质结使用低温银浆用量更高,降银耗是未来降本核心。\n 2、铜栅线效率高,成本较低具备显著经济性:铜栅线导电性优于银栅线,且高宽比好、遮光少,转换效率更高;摆脱银的使用后单瓦成本低,虽然设备投资额较高但回收期具备经济性。\n 3、铜电镀研发加速,有望联合异质结加速产业化:龙头光伏企业、设备公司研发取得良好进展,各环节不存在硬伤问题,有望解决异质结银耗高的问题后双双加速产业化。\n </div>\n " +
- // // " <a href=\"\" class=\"link\" style=\"color: #1534e7\">https://vmp.hzinsights.com/v2/articles/7269</a>\n </div>\n\n " +
- // // " <!-- 上市公司调研纪要篇 和 事件点评篇 -->\n <div class=\"box\">\n <h4>事件点评篇</h4>\n " +
- // // " <div class=\"title-content\">【<span style=\"color: #ff1720\">海康威视</span>:创新不止,成长不息】</div>\n " +
- // // " <div>\n 1、金属化环节降银耗是非硅降本核心:银栅线成本是光伏电池片非硅成本大头,尤其是异质结使用低温银浆用量更高,降银耗是未来降本核心。\n 2、铜栅线效率高,成本较低具备显著经济性:铜栅线导电性优于银栅线,且高宽比好、遮光少,转换效率更高;摆脱银的使用后单瓦成本低,虽然设备投资额较高但回收期具备经济性。\n 3、铜电镀研发加速,有望联合异质结加速产业化:龙头光伏企业、设备公司研发取得良好进展,各环节不存在硬伤问题,有望解决异质结银耗高的问题后双双加速产业化。\n </div>\n " +
- // // " <a href=\"\" class=\"link\" style=\"color: #1534e7\">https://vmp.hzinsights.com/v2/articles/7269</a>\n </div>\n "
- // body += industry + secondBody
- // i++
- // }
- // if body != "" {
- // sectionBody = report + body
- // bodyMap[detail.SortYanx] = sectionBody
- // }
- //}
- for i := 'A'; i <= 'Z'; i++ {
- k := fmt.Sprintf("%c", i)
- allBody += bodyMap[k]
- }
- bodyEnd := " </body>\n</html>"
- m.SetBody("text/html", head+div+allBody+bodyEnd)
- d := gomail.NewDialer("smtp.mxhichina.com", 465, "hzcygx@hzinsights.com", "Hzinsights2024")
- if err := d.DialAndSend(m); err != nil {
- return false
- }
- return true
- }
|