industrial_management.go 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549
  1. package services
  2. import (
  3. "encoding/json"
  4. "errors"
  5. "fmt"
  6. "hongze/hongze_clpt/models"
  7. "hongze/hongze_clpt/utils"
  8. "strconv"
  9. "strings"
  10. "time"
  11. )
  12. // 根据行业处理所选的全部赛道字段
  13. func DoXzsChooseSend(chartPermissionName string) string {
  14. var allIn string
  15. if chartPermissionName == utils.YI_YAO_NAME {
  16. allIn = "all_in_yi_yao"
  17. } else if chartPermissionName == utils.XIAO_FEI_NAME {
  18. allIn = "all_in_xiao_fei"
  19. } else if chartPermissionName == utils.KE_JI_NAME {
  20. allIn = "all_in_ke_ji"
  21. } else if chartPermissionName == utils.ZHI_ZAO_NAME {
  22. allIn = "all_in_zhi_zao"
  23. } else if chartPermissionName == utils.CHART_PERMISSION_NAME_MF_YANXUAN {
  24. allIn = "all_in_yan_xuan"
  25. }
  26. return allIn
  27. }
  28. // 行业关注或者取消关注的时候,对于用户全部赛道的影响
  29. func IndustryFllowWithTrack(industrialManagementId, count, uid int) (err error) {
  30. defer func() {
  31. if err != nil {
  32. fmt.Println(err)
  33. go utils.SendAlarmMsg("修改行业关注或者取消关注的时候,对于用户全部赛道的影响信息失败"+err.Error(), 2)
  34. go utils.SendEmail(utils.APPNAME+"【"+utils.RunMode+"】"+"失败提醒", "修改行业关注或者取消关注的时候,对于用户全部赛道的影响信息失败 ErrMsg:"+err.Error(), utils.EmailSendToUsers)
  35. }
  36. }()
  37. detail, err := models.GetIndustrialManagementDetail(industrialManagementId)
  38. if err != nil {
  39. return err
  40. }
  41. categoryinfo, err := models.GetChartPermissionById(detail.ChartPermissionId)
  42. if err != nil {
  43. return err
  44. }
  45. var allIn string
  46. allIn = DoXzsChooseSend(categoryinfo.PermissionName)
  47. if allIn != "" {
  48. //如果取消关注就把该赛道设置为非全部赛道
  49. if count == 1 {
  50. err = models.UpdateCygxXzsChooseSendIsAllIn(allIn, 0, uid)
  51. if err != nil {
  52. return err
  53. }
  54. } else {
  55. //医药、消费、科技、智造、研选下的产业赛道
  56. mapIndustrial := make(map[int][]*models.IndustrialManagementRep)
  57. industrialList, err := models.GetindustrialManagement()
  58. if err != nil {
  59. return err
  60. }
  61. for _, v := range industrialList {
  62. mapIndustrial[v.ChartPermissionId] = append(mapIndustrial[v.ChartPermissionId], v)
  63. }
  64. fllowNum, err := models.GetCountCygxIndustryFllowByUidAndChartPermissionId(uid, detail.ChartPermissionId)
  65. if err != nil {
  66. return err
  67. }
  68. if fllowNum == len(mapIndustrial[detail.ChartPermissionId]) {
  69. err = models.UpdateCygxXzsChooseSendIsAllIn(allIn, 1, uid)
  70. if err != nil {
  71. return err
  72. }
  73. }
  74. }
  75. }
  76. return err
  77. }
  78. // HandleIndustryList预处理产业列表字段
  79. func HandleIndustryList(list []*models.IndustrialManagement, user *models.WxUserItem, resource string) (items []*models.IndustrialManagement, err error) {
  80. userId := user.UserId
  81. fllowList, err := models.GetUserFllowIndustrialList(userId)
  82. if err != nil {
  83. return
  84. }
  85. fllowMap := make(map[int]int)
  86. fllowTypeMap := make(map[int]int)
  87. if len(fllowList) > 0 {
  88. for _, v := range fllowList {
  89. fllowMap[v.IndustrialManagementId] = v.IndustrialManagementId
  90. fllowTypeMap[v.IndustrialManagementId] = v.FollowType
  91. }
  92. }
  93. hotMap, e := IndustrialManagementHotMapGropuPermission()
  94. if e != nil {
  95. err = errors.New("获取hot标签失败,IndustrialManagementHotMapGropuPermission " + e.Error())
  96. return
  97. }
  98. var condition string
  99. var pars []interface{}
  100. articleTypeIds, _ := GetYanXuanArticleTypeIds()
  101. //给默认值
  102. if resource != "Yx" {
  103. resource = "Hz"
  104. }
  105. if articleTypeIds != "" {
  106. if resource == "Yx" {
  107. condition = ` AND a.publish_status = 1 AND a.article_type_id IN (` + articleTypeIds + `) `
  108. } else {
  109. condition = ` AND a.article_type_id NOT IN (` + articleTypeIds + `) `
  110. }
  111. }
  112. mapindustrialId, e := GetMicroRoadshowVideoMap()
  113. if e != nil {
  114. err = e
  115. return
  116. }
  117. //合并产业关联的标的
  118. listSubjcet, err := models.GetThemeHeatSubjectList("")
  119. if err != nil {
  120. return
  121. }
  122. industrialIdArr := make([]int, 0)
  123. for k, v := range list {
  124. list[k].Source = 1
  125. if fllowMap[v.IndustrialManagementId] > 0 {
  126. list[k].IsFollow = true
  127. }
  128. v.IsHot = hotMap[v.IndustrialManagementId]
  129. industrialIdArr = append(industrialIdArr, v.IndustrialManagementId)
  130. v.FollowType = fllowTypeMap[v.IndustrialManagementId]
  131. if _, ok := mapindustrialId[v.IndustrialManagementId]; !ok {
  132. continue
  133. }
  134. videoSimple, au, e := GetindustryVideo(user, v.IndustrialManagementId)
  135. if e != nil {
  136. err = errors.New("获取产业关联的视频失败,GetindustryVideo " + e.Error())
  137. return
  138. }
  139. if videoSimple != nil && videoSimple.Id > 0 {
  140. v.IndustryVideo = videoSimple
  141. }
  142. v.AuthInfo = au
  143. }
  144. if len(industrialIdArr) > 0 {
  145. //合并产业关联的标的
  146. conditionSubject := condition + ` AND m.industrial_management_id IN (` + utils.GetOrmInReplace(len(industrialIdArr)) + `)`
  147. pars = append(pars, industrialIdArr)
  148. listSubjcet, err = models.GetIndustrialSubjectAllByIndustrialId(pars, conditionSubject)
  149. if err != nil {
  150. return
  151. }
  152. mapIndustrial := make(map[string]int)
  153. for _, v := range listSubjcet {
  154. for k2, v2 := range list {
  155. if v2.IndustrialManagementId == v.IndustrialManagementId && mapIndustrial[fmt.Sprint(v2.IndustrialManagementId, "Hz", v.SubjectName)] == 0 {
  156. list[k2].IndustrialSubjectList = append(list[k2].IndustrialSubjectList, v)
  157. mapIndustrial[fmt.Sprint(v2.IndustrialManagementId, "Hz", v.SubjectName)] = v2.IndustrialManagementId
  158. }
  159. }
  160. }
  161. }
  162. //获取产业关联的的文章用户是否阅读
  163. mapIndustrialArticleHistory, err := GetUserArticleHistoryIndustrialNewPublishDate(user, industrialIdArr, articleTypeIds, resource)
  164. if err != nil {
  165. err = errors.New("获取产业关联的的文章用户是否阅读失败 " + err.Error())
  166. return
  167. }
  168. mapUPdateTime := make(map[int]string)
  169. articleIdArr := make([]int, 0)
  170. //获取这些产业下最新更新的文章
  171. var conditionindustrial string
  172. var parsindustrial []interface{}
  173. var industrialIds string
  174. if len(industrialIdArr) > 0 {
  175. conditionindustrial = condition + ` AND mg.industrial_management_id IN (` + utils.GetOrmInReplace(len(industrialIdArr)) + `)`
  176. parsindustrial = append(parsindustrial, industrialIdArr)
  177. listUpdateTime, e := models.GetNewArticleDetailByIndustrialIds(parsindustrial, conditionindustrial)
  178. if e != nil && e.Error() != utils.ErrNoRow() {
  179. err = errors.New("GetNewArticleDetailByIndustrialIds Err " + e.Error())
  180. return
  181. }
  182. for _, v := range listUpdateTime {
  183. mapUPdateTime[v.IndustrialManagementId] = v.PublishDate
  184. articleIdArr = append(articleIdArr, v.ArticleId)
  185. }
  186. //时间线的更新时间
  187. // maptimelineUPdateTime := make(map[int]string)
  188. listtimelinePublishdate, e := models.GetTimeLineReportIndustrialPublishdateList(industrialIdArr)
  189. if e != nil && e.Error() != utils.ErrNoRow() {
  190. err = e
  191. return
  192. }
  193. for _, v := range listtimelinePublishdate {
  194. if mapUPdateTime[v.IndustrialManagementId] != "" {
  195. if utils.StrTimeToTime(v.PublishDate).After(utils.StrTimeToTime(mapUPdateTime[v.IndustrialManagementId])) {
  196. mapUPdateTime[v.IndustrialManagementId] = v.PublishDate
  197. }
  198. }
  199. }
  200. //产品内测的更新时间线
  201. listtProductInterior, e := models.GetNewProductInteriorByIndustrialIds(industrialIdArr)
  202. if e != nil && e.Error() != utils.ErrNoRow() {
  203. err = e
  204. return
  205. }
  206. for _, v := range listtProductInterior {
  207. if mapUPdateTime[v.IndustrialManagementId] != "" {
  208. if utils.StrTimeToTime(v.PublishDate).After(utils.StrTimeToTime(mapUPdateTime[v.IndustrialManagementId])) {
  209. mapUPdateTime[v.IndustrialManagementId] = v.PublishDate
  210. }
  211. }
  212. }
  213. for _, id := range industrialIdArr {
  214. industrialIds += strconv.Itoa(id) + ","
  215. }
  216. industrialIds = strings.TrimRight(industrialIds, ",")
  217. articleList, e := models.GetReportIndustrialReadNumList(userId, industrialIds, user.CreatedTime)
  218. if e != nil && e.Error() != utils.ErrNoRow() {
  219. err = e
  220. return
  221. }
  222. mapHistroyindustrialId := make(map[int]int)
  223. for _, v := range articleList {
  224. mapHistroyindustrialId[v.IndustrialManagementId] = v.Readnum
  225. }
  226. }
  227. nowTime := time.Now().Local()
  228. threeMonBefore := nowTime.AddDate(0, -3, 0)
  229. //查询用户今天是否看过时间线
  230. //haveMorningMeeting := false
  231. //var morningMeetingTime string
  232. recrodList, err := models.GetCygxTimelineLogCount(user.UserId, industrialIdArr)
  233. if err != nil && err.Error() != utils.ErrNoRow() {
  234. return
  235. }
  236. var industrialManagementIdstr string
  237. industrialIdMap := make(map[string]time.Time)
  238. for _, v := range recrodList {
  239. //fmt.Println(v.Router)
  240. //sliceindustrial := strings.Split(v.Router, "=")
  241. //industrialManagementIdstr = strings.TrimLeft(v.Router, utils.TIME_LINE_ROUTE)
  242. industrialManagementIdstr = strconv.Itoa(v.IndustrialManagementId)
  243. industrialIdMap[industrialManagementIdstr] = v.ModifyTime
  244. //fmt.Println(industrialManagementIdstr)
  245. //if createTime, ok := industrialIdMap[industrialManagementIdstr]; ok {
  246. // if createTime.Before(v.CreateTime) {
  247. // industrialIdMap[industrialManagementIdstr] = v.CreateTime
  248. // }
  249. //} else {
  250. // industrialIdMap[industrialManagementIdstr] = v.CreateTime
  251. //}
  252. }
  253. morningMeetingTimeMap := make(map[int]time.Time)
  254. if industrialIds != "" {
  255. mmList, e := models.GetCygxMorningMeetingReviewsListByIndustrialIds(industrialIds)
  256. if e != nil {
  257. err = e
  258. return
  259. }
  260. for _, v := range mmList {
  261. morningMeetingTimeMap[v.IndustryId] = v.CreateTime
  262. }
  263. }
  264. timeLineRedMap := make(map[int]bool, 0)
  265. for _, industrialId := range industrialIdArr {
  266. //if createTime, ok := industrialIdMap[strconv.Itoa(industrialId)]; ok {
  267. // if createTime.Before(morningMeetingTimeMap[industrialId]) {
  268. // timeLineRedMap[industrialId] = true
  269. // }
  270. //}
  271. if industrialIdMap[strconv.Itoa(industrialId)].Before(morningMeetingTimeMap[industrialId]) {
  272. timeLineRedMap[industrialId] = true
  273. }
  274. }
  275. //fmt.Println(industrialIdMap["90"])
  276. //fmt.Println(timeLineRedMap[90])
  277. //fmt.Println(mapIndustrialArticleHistory[90])
  278. for k, v := range list {
  279. list[k].UpdateTime = utils.TimeRemoveHms(mapUPdateTime[v.IndustrialManagementId])
  280. if userId > 0 {
  281. //如果文章没有阅读,而且,文章的发布时间晚于项目的上线时间,而且文章的发布时间晚于用户的注册时间,就进行标红处理
  282. if mapIndustrialArticleHistory[v.IndustrialManagementId] || timeLineRedMap[v.IndustrialManagementId] {
  283. //if mapHistroyindustrialId[v.IndustrialManagementId] == 0 || timeLineRedMap[v.IndustrialManagementId] {
  284. if user.CreatedTime.Before(utils.StrTimeToTime(mapUPdateTime[v.IndustrialManagementId])) && utils.StrTimeToTime(utils.OnlineTime).Before(utils.StrTimeToTime(mapUPdateTime[v.IndustrialManagementId])) {
  285. list[k].IsRed = true
  286. }
  287. }
  288. } else {
  289. if utils.StrTimeToTime(utils.OnlineTime).Before(utils.StrTimeToTime(mapUPdateTime[v.IndustrialManagementId])) {
  290. list[k].IsRed = true
  291. }
  292. list[k].IsFollow = true
  293. }
  294. list[k].UpdateTime = utils.TimeRemoveHms(mapUPdateTime[v.IndustrialManagementId])
  295. if resource == "Yx" {
  296. list[k].IsRed = false
  297. }
  298. // 关联报告发布时间均在3个月内则标记New
  299. if v.MinReportTime != "" {
  300. t, e := time.Parse(utils.FormatDateTime, v.MinReportTime)
  301. if e != nil {
  302. err = errors.New("报告最早发布时间有误,GetindustryVideo " + e.Error())
  303. return
  304. }
  305. if t.After(threeMonBefore) {
  306. list[k].IsNew = true
  307. }
  308. }
  309. if v.ChartPermissionId == utils.CHART_PERMISSION_ID_YANXUAN {
  310. v.Source = 1
  311. } else {
  312. v.Source = 2
  313. }
  314. if v.TimeLineData == "" {
  315. v.ListTimeLine = make([]models.TimeLineReportResp, 0)
  316. } else {
  317. if err = json.Unmarshal([]byte(v.TimeLineData), &v.ListTimeLine); err != nil {
  318. e = errors.New("Unmarshal, Err: " + e.Error())
  319. return
  320. }
  321. }
  322. }
  323. items = list
  324. return
  325. }
  326. func HandleIndustryListHzAndYx(list []*models.IndustrialManagement, user *models.WxUserItem, resource string) (items []*models.IndustrialManagement, err error) {
  327. var listHz []*models.IndustrialManagement
  328. var lisYx []*models.IndustrialManagement
  329. for _, v := range list {
  330. if v.ChartPermissionId == utils.CHART_PERMISSION_ID_YANXUAN {
  331. lisYx = append(lisYx, v)
  332. } else {
  333. listHz = append(listHz, v)
  334. }
  335. }
  336. listHz, err = HandleIndustryList(listHz, user, "Hz")
  337. if err != nil {
  338. return
  339. }
  340. lisYx, err = HandleIndustryList(lisYx, user, "Yx")
  341. if err != nil {
  342. return
  343. }
  344. maplistHz := make(map[int]*models.IndustrialManagement)
  345. maplistYx := make(map[int]*models.IndustrialManagement)
  346. for _, v := range listHz {
  347. maplistHz[v.IndustrialManagementId] = v
  348. }
  349. for _, v := range lisYx {
  350. maplistYx[v.IndustrialManagementId] = v
  351. }
  352. for _, v := range list {
  353. if maplistHz[v.IndustrialManagementId] != nil {
  354. items = append(items, maplistHz[v.IndustrialManagementId])
  355. }
  356. if maplistYx[v.IndustrialManagementId] != nil {
  357. items = append(items, maplistYx[v.IndustrialManagementId])
  358. }
  359. }
  360. return
  361. }
  362. // 通过文章ID获取文章所关联的产业
  363. func GetArticleIndustrialByArticleId(articleIds []int) (itemMap map[int][]*models.IndustrialManagementResp, err error) {
  364. lenarticleIds := len(articleIds)
  365. if lenarticleIds == 0 {
  366. return
  367. }
  368. var condition string
  369. var pars []interface{}
  370. condition = ` AND mg.article_id IN (` + utils.GetOrmInReplace(lenarticleIds) + `)`
  371. pars = append(pars, articleIds)
  372. industrialList, err := models.GetIndustrialListByarticleId(pars, condition)
  373. if err != nil {
  374. return
  375. }
  376. industrialMap := make(map[int][]*models.IndustrialManagementResp)
  377. if len(industrialList) > 0 {
  378. for _, v := range industrialList {
  379. item := new(models.IndustrialManagementResp)
  380. item.IndustrialManagementId = v.IndustrialManagementId
  381. item.IndustryName = v.IndustryName
  382. item.ChartPermissionId = v.ChartPermissionId
  383. industrialMap[v.ArticleId] = append(industrialMap[v.ArticleId], item)
  384. }
  385. }
  386. itemMap = industrialMap
  387. return
  388. }
  389. // 获取研选文章类型的配置信息
  390. func GetArticleTypeMap() (nameMapResp map[int]string, buttonStyleMapResp map[int]string, err error) {
  391. condition := " AND is_show_yanx = 1 "
  392. list, e := models.GetCygxArticleTypeListCondition(condition)
  393. if e != nil {
  394. err = errors.New("报告最早发布时间有误,GetindustryVideo " + e.Error())
  395. return
  396. }
  397. nameMap := make(map[int]string)
  398. buttonStyleMap := make(map[int]string)
  399. if len(list) > 0 {
  400. for _, v := range list {
  401. nameMap[v.ArticleTypeId] = v.ArticleTypeName
  402. buttonStyleMap[v.ArticleTypeId] = v.ButtonStyle
  403. }
  404. }
  405. nameMapResp = nameMap
  406. buttonStyleMapResp = buttonStyleMap
  407. return
  408. }
  409. // GetUserFollowIndustrialMap获取用户关注的产业
  410. func GetUserFollowIndustrialMap(user *models.WxUserItem) (mapResp map[int]int, err error) {
  411. list, e := models.GetUserFllowIndustrialList(user.UserId)
  412. if e != nil {
  413. err = errors.New("GetUserFllowIndustrialList " + e.Error())
  414. return
  415. }
  416. fllowMap := make(map[int]int)
  417. if len(list) > 0 {
  418. for _, v := range list {
  419. fllowMap[v.IndustrialManagementId] = v.IndustrialManagementId
  420. }
  421. }
  422. mapResp = fllowMap
  423. return
  424. }
  425. // IndustrialManagementHotMapGropuPermission获取近一个月报告阅读数量最多的产业信息 根据行业分组
  426. func IndustrialManagementHotMapGropuPermission() (mapResp map[int]bool, err error) {
  427. var topCond string
  428. var topPars []interface{}
  429. toplist, err := models.GetTopOneMonthArtReadNumIndustryAll(topCond, topPars)
  430. if err != nil {
  431. return
  432. }
  433. mapPermission := make(map[int][]*models.IndustrialManagement)
  434. mapPermissionMax := make(map[int]int)
  435. for _, v := range toplist {
  436. item := new(models.IndustrialManagement)
  437. item.ChartPermissionId = v.ChartPermissionId
  438. item.IndustrialManagementId = v.IndustrialManagementId
  439. item.ArticleReadNum = v.ArticleReadNum
  440. mapPermission[v.ChartPermissionId] = append(mapPermission[v.ChartPermissionId], item)
  441. }
  442. for k, v := range mapPermission {
  443. for _, item := range v {
  444. //mapPermissionMax[k] = item.ArticleReadNum
  445. if item.ArticleReadNum > mapPermissionMax[k] {
  446. mapPermissionMax[k] = item.ArticleReadNum
  447. }
  448. }
  449. }
  450. mapResp = make(map[int]bool, 0)
  451. for _, v := range toplist {
  452. if v.ArticleReadNum == mapPermissionMax[v.ChartPermissionId] {
  453. mapResp[v.IndustrialManagementId] = true
  454. }
  455. }
  456. return
  457. }
  458. // GetCygxIndustryFllowListTypeMapByMobile 根据手机号获取产业关注的信息
  459. func GetCygxIndustryFllowListTypeMapByMobile(mobile string) (mapFollowTypeResp map[int]int) {
  460. if mobile == "" {
  461. return
  462. }
  463. var err error
  464. defer func() {
  465. if err != nil {
  466. fmt.Println("err:", err)
  467. go utils.SendAlarmMsg(fmt.Sprint("根据手机号获取产业关注的信息 失败,GetCygxIndustryFllowListTypeMapByMobile Err:"+err.Error()+"mobile", mobile), 3)
  468. }
  469. }()
  470. mapFollowTypeResp = make(map[int]int, 0)
  471. fllowList, e := models.GetCygxIndustryFllowList(mobile)
  472. //策略的处理
  473. if e != nil {
  474. err = errors.New("GetUserFllowIndustrialList, Err: " + err.Error())
  475. return
  476. }
  477. for _, v := range fllowList {
  478. mapFollowTypeResp[v.IndustrialManagementId] = v.FollowType
  479. }
  480. return
  481. }
  482. //func init() {
  483. // IndustrialManagementTimeLineDateList3(542)
  484. //}
  485. // 时间线关联文章的三条数据
  486. func IndustrialManagementTimeLineDateList3(industrialManagementId int) (err error) {
  487. defer func() {
  488. if err != nil {
  489. fmt.Println(err)
  490. go utils.SendAlarmMsg("修改行业关注或者取消关注的时候,对于用户全部赛道的影响信息失败"+err.Error(), 2)
  491. }
  492. }()
  493. list, total, e := models.GetTimeLineReportIndustrialListTime(0, industrialManagementId, 0, 3)
  494. if e != nil {
  495. err = errors.New("GetCompanySellerAndShareMobileByRai, Err: " + e.Error())
  496. return
  497. }
  498. fmt.Println(total)
  499. type TimeLineReportItem struct {
  500. Title string `description:"标题"`
  501. PublishDate string `description:"发布时间"`
  502. }
  503. //type TimeLIineData struct {
  504. // ListTimeLine []*TimeLineReportItem
  505. //}
  506. var listData []*TimeLineReportItem
  507. for _, v := range list {
  508. item := new(TimeLineReportItem)
  509. item.Title = v.Title
  510. item.PublishDate = utils.TimeRemoveHms2(v.PublishDate)
  511. listData = append(listData, item)
  512. }
  513. //var listData2 TimeLIineData
  514. //listData2.ListTimeLine = listData
  515. jsonData, err := json.Marshal(listData)
  516. if err != nil {
  517. fmt.Println("Error marshaling to JSON:", err)
  518. return
  519. }
  520. e = models.UpdateIndustrialManagementTimeLineData(industrialManagementId, string(jsonData))
  521. fmt.Println(string(jsonData))
  522. fmt.Println(e)
  523. return err
  524. }