mysteel_chemical_index.go 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465
  1. package data_manage
  2. import (
  3. "eta/eta_api/utils"
  4. "fmt"
  5. "github.com/beego/beego/v2/client/orm"
  6. "github.com/rdlucklib/rdluck_tools/paging"
  7. "time"
  8. )
  9. // BaseFromMysteelChemicalIndex 钢联化工指标表
  10. type BaseFromMysteelChemicalIndex struct {
  11. BaseFromMysteelChemicalIndexId int `orm:"column(base_from_mysteel_chemical_index_id);pk"`
  12. BaseFromMysteelChemicalClassifyId int `orm:"column(base_from_mysteel_chemical_classify_id)" description:"钢联化工指标分类id"`
  13. IndexCode string `description:"指标编码"`
  14. IndexName string `description:"指标名称"`
  15. Unit string `description:"单位"`
  16. Source string `description:"数据来源"`
  17. Frequency string `description:"频度"`
  18. StartDate string `description:"开始日期"`
  19. EndDate string `description:"结束日期"`
  20. Describe string `description:"指标描述"`
  21. UpdateWeek string `description:"更新周期"`
  22. UpdateTime string `description:"更新时间1"`
  23. UpdateTime2 string `description:"更新时间2"`
  24. SysUserId int `description:"创建人id"`
  25. SysUserRealName string `description:"创建人姓名"`
  26. ModifyTime time.Time `description:"修改时间"`
  27. CreateTime time.Time `description:"创建时间"`
  28. Sort int `description:"排序字段"`
  29. MergeFilePath string `description:"合并文件"`
  30. TerminalCode string `description:"终端编码"`
  31. IsStop int `description:"是否停更:1:停更,0:未停更"`
  32. EndValue float64 `description:"指标的最新值"`
  33. }
  34. // Update 更新钢联化工指标基础信息
  35. func (item *BaseFromMysteelChemicalIndex) Update(cols []string) (err error) {
  36. o := orm.NewOrmUsingDB("data")
  37. _, err = o.Update(item, cols...)
  38. return
  39. }
  40. // AddBaseFromMysteelChemicalIndex 添加钢联化工指标
  41. func AddBaseFromMysteelChemicalIndex(item *BaseFromMysteelChemicalIndex) (lastId int64, err error) {
  42. o := orm.NewOrmUsingDB("data")
  43. lastId, err = o.Insert(item)
  44. if err != nil {
  45. return
  46. }
  47. item.BaseFromMysteelChemicalIndexId = int(lastId)
  48. return
  49. }
  50. // BaseFromMysteelChemicalData 钢联化工指标数据表
  51. type BaseFromMysteelChemicalData struct {
  52. BaseFromMysteelChemicalDataId int `orm:"column(base_from_mysteel_chemical_data_id);pk"`
  53. BaseFromMysteelChemicalIndexId int `orm:"column(base_from_mysteel_chemical_index_id)" description:"钢联化工指标id"`
  54. IndexCode string `description:"指标编码"`
  55. DataTime time.Time `description:"数据日期"`
  56. Value float64 `description:"数据值"`
  57. ModifyTime time.Time `description:"修改时间"`
  58. CreateTime time.Time `description:"创建时间"`
  59. }
  60. // MysteelChemicalFrequency 钢联化工频度
  61. type MysteelChemicalFrequency struct {
  62. Frequency string `description:"频度:1-日度 2-周度 3-月度 4-季度 5-年度 99-无固定频率"`
  63. }
  64. // GetMysteelChemicalIndexByClassifyId 用于分类展示
  65. func GetMysteelChemicalIndexByClassifyId(classifyId int) (items []*BaseFromMysteelChemicalClassifyItems, err error) {
  66. o := orm.NewOrmUsingDB("data")
  67. sql := ` SELECT base_from_mysteel_chemical_index_id,base_from_mysteel_chemical_classify_id,index_name AS classify_name,
  68. sys_user_id,sys_user_real_name,sort,index_code
  69. FROM base_from_mysteel_chemical_index where base_from_mysteel_chemical_classify_id=? ORDER BY sort asc, create_time ASC `
  70. _, err = o.Raw(sql, classifyId).QueryRows(&items)
  71. return
  72. }
  73. // MysteelChemicalFrequencyByClassifyId 根据分类id获取钢联化工频度数据列表
  74. func MysteelChemicalFrequencyByClassifyId(classifyId int) (items []*MysteelChemicalFrequency, err error) {
  75. o := orm.NewOrmUsingDB("data")
  76. if classifyId == 0 {
  77. sql := ` SELECT frequency FROM base_from_mysteel_chemical_index WHERE frequency != "" GROUP BY frequency ORDER BY frequency ASC `
  78. _, err = o.Raw(sql).QueryRows(&items)
  79. return
  80. } else {
  81. sql := ` SELECT frequency FROM base_from_mysteel_chemical_index WHERE base_from_mysteel_chemical_classify_id = ? AND frequency != "" GROUP BY frequency ORDER BY frequency ASC `
  82. _, err = o.Raw(sql, classifyId).QueryRows(&items)
  83. return
  84. }
  85. }
  86. // GetMysteelChemicalFrequency 获取钢联化工频度数据列表
  87. func GetMysteelChemicalFrequency(condition string, pars []interface{}) (items []*MysteelChemicalFrequency, err error) {
  88. o := orm.NewOrmUsingDB("data")
  89. sql := ` SELECT frequency FROM base_from_mysteel_chemical_index WHERE 1=1 AND frequency != "" `
  90. if condition != "" {
  91. sql += condition
  92. }
  93. sql += ` GROUP BY frequency ORDER BY frequency ASC `
  94. _, err = o.Raw(sql, pars).QueryRows(&items)
  95. return
  96. }
  97. // MysteelChemicalList 钢联化工指标列表
  98. type MysteelChemicalList struct {
  99. Id int `orm:"column(base_from_mysteel_chemical_index_id)"`
  100. BaseFromMysteelChemicalClassifyId int `orm:"column(base_from_mysteel_chemical_classify_id)" description:"钢联化工指标分类id"`
  101. ParentClassifyId int `description:"钢联化工指标父级分类id"`
  102. IndexCode string `description:"指标编码"`
  103. IndexName string `description:"指标名称"`
  104. UnitName string `orm:"column(unit)"`
  105. UniqueCode string `description:"唯一编码"`
  106. FrequencyName string `orm:"column(frequency)"`
  107. UpdateTime string `orm:"column(modify_time)"`
  108. Paging *paging.PagingItem `description:"分页数据"`
  109. DataList []*MysteelChemicalData
  110. }
  111. // MysteelChemicalData 钢联化工数据列表
  112. type MysteelChemicalData struct {
  113. InputValue string `orm:"column(value)" description:"值"`
  114. DataTime string `orm:"column(data_time)" description:"日期"`
  115. }
  116. // GetMysteelChemicalIndex 根据分类id获取钢联化工频度数据列表
  117. func GetMysteelChemicalIndex(condition string, pars []interface{}) (items []*MysteelChemicalList, err error) {
  118. o := orm.NewOrmUsingDB("data")
  119. sql := ` SELECT * FROM base_from_mysteel_chemical_index WHERE 1=1 `
  120. if condition != "" {
  121. sql += condition
  122. }
  123. sql += ` ORDER BY base_from_mysteel_chemical_index_id ASC `
  124. _, err = o.Raw(sql, pars).QueryRows(&items)
  125. return
  126. }
  127. // GetMysteelChemicalIndexData 根据指标code获取钢联化工数据列表
  128. func GetMysteelChemicalIndexData(indexCode string, startSize, pageSize int) (items []*MysteelChemicalData, err error) {
  129. sql := ` SELECT * FROM (
  130. SELECT DISTINCT a.index_code,a.value,a.data_time FROM base_from_mysteel_chemical_data AS a WHERE index_code=?
  131. ORDER BY data_time DESC
  132. )AS t
  133. GROUP BY t.data_time
  134. ORDER BY t.data_time DESC LIMIT ?,? `
  135. o := orm.NewOrmUsingDB("data")
  136. _, err = o.Raw(sql, indexCode, startSize, pageSize).QueryRows(&items)
  137. return
  138. }
  139. // GetMysteelChemicalIndexDataCount 根据指标code获取钢联化工数据列表 获取钢联数据总数
  140. func GetMysteelChemicalIndexDataCount(indexCode string) (count int, err error) {
  141. sql := `SELECT COUNT(1) AS count FROM (
  142. SELECT * FROM (
  143. SELECT DISTINCT a.index_code,a.value,a.data_time FROM base_from_mysteel_chemical_data AS a WHERE index_code=?
  144. ORDER BY data_time DESC
  145. )AS t
  146. GROUP BY t.data_time
  147. ORDER BY t.data_time DESC
  148. )AS n `
  149. o := orm.NewOrmUsingDB("data")
  150. err = o.Raw(sql, indexCode).QueryRow(&count)
  151. return
  152. }
  153. // GetBaseFromMysteelChemicalIndexByIndexId 根据指标id获取指标信息
  154. func GetBaseFromMysteelChemicalIndexByIndexId(indexId int) (item *BaseFromMysteelChemicalIndex, err error) {
  155. o := orm.NewOrmUsingDB("data")
  156. sql := `SELECT * FROM base_from_mysteel_chemical_index WHERE base_from_mysteel_chemical_index_id=? `
  157. err = o.Raw(sql, indexId).QueryRow(&item)
  158. return
  159. }
  160. // GetBaseFromMysteelChemicalIndexByCode 根据指标code获取指标信息
  161. func GetBaseFromMysteelChemicalIndexByCode(indexCode string) (item *BaseFromMysteelChemicalIndex, err error) {
  162. o := orm.NewOrmUsingDB("data")
  163. sql := `SELECT * FROM base_from_mysteel_chemical_index WHERE index_code=? `
  164. err = o.Raw(sql, indexCode).QueryRow(&item)
  165. return
  166. }
  167. // GetBaseFromMysteelChemicalIndexByClassifyIdAndName 根据分类id和指标名名获取指标信息
  168. func GetBaseFromMysteelChemicalIndexByClassifyIdAndName(classifyId int, chartName string) (item *BaseFromMysteelChemicalIndex, err error) {
  169. o := orm.NewOrmUsingDB("data")
  170. sql := ` SELECT * FROM base_from_mysteel_chemical_index WHERE base_from_mysteel_chemical_classify_id = ? and index_name = ? `
  171. err = o.Raw(sql, classifyId, chartName).QueryRow(&item)
  172. return
  173. }
  174. // GetBaseFromMysteelChemicalIndexListByClassifyId 根据指标分类id获取指标列表信息
  175. func GetBaseFromMysteelChemicalIndexListByClassifyId(classifyId int) (items []*BaseFromMysteelChemicalIndex, err error) {
  176. o := orm.NewOrmUsingDB("data")
  177. sql := `SELECT * FROM base_from_mysteel_chemical_index WHERE base_from_mysteel_chemical_classify_id=? `
  178. _, err = o.Raw(sql, classifyId).QueryRows(&items)
  179. return
  180. }
  181. // GetBaseFromMysteelChemicalIndexListByClassifyIdList 根据指标分类id集合获取指标列表信息
  182. func GetBaseFromMysteelChemicalIndexListByClassifyIdList(classifyIdList []int) (items []*BaseFromMysteelChemicalIndex, err error) {
  183. num := len(classifyIdList)
  184. if num <= 0 {
  185. return
  186. }
  187. o := orm.NewOrmUsingDB("data")
  188. sql := `SELECT * FROM base_from_mysteel_chemical_index WHERE base_from_mysteel_chemical_classify_id IN (` + utils.GetOrmInReplace(num) + `) `
  189. _, err = o.Raw(sql, classifyIdList).QueryRows(&items)
  190. return
  191. }
  192. // GetBaseFromMysteelChemicalDataMaxCount 获取分类下指标的最大数量
  193. func GetBaseFromMysteelChemicalDataMaxCount(classifyId int) (count int, err error) {
  194. o := orm.NewOrmUsingDB("data")
  195. sql := `SELECT MAX(t.num) AS count FROM (
  196. SELECT COUNT(1) AS num FROM base_from_mysteel_chemical_index AS a
  197. INNER JOIN base_from_mysteel_chemical_data AS b ON a.base_from_mysteel_chemical_index_id=b.base_from_mysteel_chemical_index_id
  198. WHERE a.base_from_mysteel_chemical_classify_id=?
  199. GROUP BY a.base_from_mysteel_chemical_index_id
  200. )AS t `
  201. err = o.Raw(sql, classifyId).QueryRow(&count)
  202. return
  203. }
  204. // GetMysteelChemicalIndexDataByCode 通过钢联化工指标code获取所有数据列表
  205. func GetMysteelChemicalIndexDataByCode(indexCode string) (items []*MysteelChemicalData, err error) {
  206. sql := ` SELECT * FROM (
  207. SELECT DISTINCT a.index_code,a.value,a.data_time FROM base_from_mysteel_chemical_data AS a WHERE index_code=?
  208. ORDER BY data_time DESC
  209. )AS t
  210. GROUP BY t.data_time
  211. ORDER BY t.data_time DESC `
  212. o := orm.NewOrmUsingDB("data")
  213. _, err = o.Raw(sql, indexCode).QueryRows(&items)
  214. return
  215. }
  216. // MoveBaseFromMysteelChemicalIndex 移动钢联化工指标分类
  217. func MoveBaseFromMysteelChemicalIndex(chartInfoId, classifyId int) (err error) {
  218. o := orm.NewOrmUsingDB("data")
  219. sql := ` UPDATE base_from_mysteel_chemical_index
  220. SET
  221. base_from_mysteel_chemical_classify_id = ?
  222. WHERE base_from_mysteel_chemical_index_id = ?`
  223. _, err = o.Raw(sql, classifyId, chartInfoId).Exec()
  224. return
  225. }
  226. // UpdateBaseFromMysteelChemicalIndexByClassifyId 根据指标id更新排序
  227. func UpdateBaseFromMysteelChemicalIndexByClassifyId(classifyId, nowSort, prevIndexInfoId int, updateSort string) (err error) {
  228. o := orm.NewOrmUsingDB("data")
  229. sql := ` update base_from_mysteel_chemical_index set sort = ` + updateSort + ` WHERE base_from_mysteel_chemical_classify_id=? AND `
  230. if prevIndexInfoId > 0 {
  231. sql += ` ( sort > ? or (base_from_mysteel_chemical_index_id > ` + fmt.Sprint(prevIndexInfoId) + ` and sort = ` + fmt.Sprint(nowSort) + `))`
  232. }
  233. _, err = o.Raw(sql, classifyId, nowSort).Exec()
  234. return
  235. }
  236. // GetFirstBaseFromMysteelChemicalIndexByClassifyId 获取当前分类下,且排序数相同 的排序第一条的数据
  237. func GetFirstBaseFromMysteelChemicalIndexByClassifyId(classifyId int) (item *BaseFromMysteelChemicalIndex, err error) {
  238. o := orm.NewOrmUsingDB("data")
  239. sql := ` SELECT * FROM base_from_mysteel_chemical_index WHERE base_from_mysteel_chemical_classify_id=? order by sort asc,base_from_mysteel_chemical_index_id asc limit 1`
  240. err = o.Raw(sql, classifyId).QueryRow(&item)
  241. return
  242. }
  243. // GetMysteelChemicalIndexCount 根据条件获取钢联化工数据
  244. func GetMysteelChemicalIndexCount(condition string, pars []interface{}) (count int, err error) {
  245. o := orm.NewOrmUsingDB("data")
  246. sql := ` SELECT COUNT(1) AS count FROM base_from_mysteel_chemical_index WHERE 1=1 `
  247. if condition != "" {
  248. sql += condition
  249. }
  250. sql += ` ORDER BY base_from_mysteel_chemical_index_id ASC `
  251. err = o.Raw(sql, pars).QueryRow(&count)
  252. return
  253. }
  254. // GetMysteelChemicalIndexList 根据分类id获取钢联化工频度数据列表
  255. func GetMysteelChemicalIndexList(condition string, pars []interface{}, startSize, pageSize int) (items []*BaseFromMysteelChemicalIndex, err error) {
  256. o := orm.NewOrmUsingDB("data")
  257. sql := ` SELECT * FROM base_from_mysteel_chemical_index WHERE 1=1 `
  258. if condition != "" {
  259. sql += condition
  260. }
  261. sql += ` ORDER BY base_from_mysteel_chemical_index_id ASC LIMIT ?,? `
  262. _, err = o.Raw(sql, pars, startSize, pageSize).QueryRows(&items)
  263. return
  264. }
  265. // GetMysteelChemicalIndexListGroupByUserId 根据指标id列表、用户分组获取指标信息
  266. func GetMysteelChemicalIndexListGroupByUserId(edbIdList []string) (items []*BaseFromMysteelChemicalIndex, err error) {
  267. num := len(edbIdList)
  268. if num <= 0 {
  269. return
  270. }
  271. o := orm.NewOrmUsingDB("data")
  272. sql := ` SELECT * FROM base_from_mysteel_chemical_index WHERE base_from_mysteel_chemical_index_id in (` + utils.GetOrmInReplace(num) + `) GROUP BY sys_user_id `
  273. _, err = o.Raw(sql, edbIdList).QueryRows(&items)
  274. return
  275. }
  276. // ModifyMysteelChemicalIndexUserIdByCodeList 根据指标code列表修改创建人
  277. func ModifyMysteelChemicalIndexUserIdByCodeList(edbIdList []string, userId int, userName string) (err error) {
  278. num := len(edbIdList)
  279. if num <= 0 {
  280. return
  281. }
  282. o := orm.NewOrmUsingDB("data")
  283. sql := `UPDATE base_from_mysteel_chemical_index SET sys_user_id=?,sys_user_real_name=? WHERE base_from_mysteel_chemical_index_id in (` + utils.GetOrmInReplace(num) + `) `
  284. _, err = o.Raw(sql, userId, userName, edbIdList).Exec()
  285. return
  286. }
  287. // GetMysteelChemicalIndexAdminList 获取所有指标创建人
  288. func GetMysteelChemicalIndexAdminList() (list []int, err error) {
  289. o := orm.NewOrmUsingDB("data")
  290. sql := ` SELECT sys_user_id FROM base_from_mysteel_chemical_index GROUP BY sys_user_id `
  291. _, err = o.Raw(sql).QueryRows(&list)
  292. return
  293. }
  294. type TerminalNum struct {
  295. TerminalCode string `description:"terminal_code"`
  296. Num int `description:"num"`
  297. }
  298. // GetMysteelChemicalGroupTerminalNum 获取钢联化工指标的终端分布
  299. func GetMysteelChemicalGroupTerminalNum() (items []*TerminalNum, err error) {
  300. o := orm.NewOrmUsingDB("data")
  301. sql := ` SELECT terminal_code,count(1) num FROM base_from_mysteel_chemical_index GROUP BY terminal_code ORDER BY num ASC `
  302. _, err = o.Raw(sql).QueryRows(&items)
  303. return
  304. }
  305. // BaseRefreshEdbInfo
  306. // @Description: 刷新配置的基础指标信息结构体
  307. type BaseRefreshEdbInfo struct {
  308. EdbInfoId int
  309. ClassifyId int `description:"钢联化工指标分类id"`
  310. IndexCode string `description:"指标编码"`
  311. IndexName string `description:"指标名称"`
  312. EndDate string `description:"最新日期"`
  313. EndValue string `description:"最新值"`
  314. SysUserId int `description:"创建人id"`
  315. SysUserRealName string `description:"创建人姓名"`
  316. Frequency string `description:"频度"`
  317. IsStop int `description:"是否停更:1:停更,0:未停更"`
  318. TerminalCode string `description:"终端编码"`
  319. RefreshTime string `description:"刷新时间"`
  320. }
  321. // RefreshBaseEdbInfoResp
  322. // @Description: 刷新数据源的数据返回
  323. type RefreshBaseEdbInfoResp struct {
  324. Paging *paging.PagingItem
  325. List []*BaseRefreshEdbInfo
  326. }
  327. // GetMysteelChemicalBaseInfoList
  328. // @Description: 获取钢联化工数据列表
  329. // @author: Roc
  330. // @datetime 2024-01-10 14:28:35
  331. // @param condition string
  332. // @param pars []interface{}
  333. // @param orderBy string
  334. // @param startSize int
  335. // @param pageSize int
  336. // @return total int
  337. // @return items []*BaseRefreshEdbInfo
  338. // @return err error
  339. func GetMysteelChemicalBaseInfoList(condition string, pars []interface{}, orderBy string, startSize, pageSize int) (total int, items []*BaseRefreshEdbInfo, err error) {
  340. o := orm.NewOrmUsingDB("data")
  341. // 数量汇总
  342. totalSql := ` SELECT count(1) FROM base_from_mysteel_chemical_index WHERE 1=1 `
  343. if condition != "" {
  344. totalSql += condition
  345. }
  346. err = o.Raw(totalSql, pars).QueryRow(&total)
  347. if err != nil {
  348. return
  349. }
  350. // 列表数据
  351. sql := ` SELECT base_from_mysteel_chemical_index_id as edb_info_id, base_from_mysteel_chemical_classify_id as classify_id,index_code,index_name,end_date,end_value,sys_user_id,sys_user_real_name,frequency,is_stop,terminal_code FROM base_from_mysteel_chemical_index WHERE 1=1 `
  352. if condition != "" {
  353. sql += condition
  354. }
  355. if orderBy != "" {
  356. sql += ` ORDER BY ` + orderBy
  357. } else {
  358. sql += ` ORDER BY base_from_mysteel_chemical_index_id ASC `
  359. }
  360. sql += ` LIMIT ?,? `
  361. _, err = o.Raw(sql, pars, startSize, pageSize).QueryRows(&items)
  362. return
  363. }
  364. // ModifyMysteelChemicalUpdateStatus
  365. // @Description: 修改钢联化工数据停更状态
  366. // @author: Roc
  367. // @datetime 2024-01-08 16:23:31
  368. // @param edbIdList []int
  369. // @param indexCodeList []string
  370. // @param isStop int
  371. // @return err error
  372. func ModifyMysteelChemicalUpdateStatus(edbIdList []int, indexCodeList []string, isStop int) (err error) {
  373. idNum := len(edbIdList)
  374. if idNum <= 0 {
  375. return
  376. }
  377. o, err := orm.NewOrmUsingDB("data").Begin()
  378. if err != nil {
  379. return
  380. }
  381. defer func() {
  382. if err != nil {
  383. _ = o.Rollback()
  384. return
  385. }
  386. _ = o.Commit()
  387. }()
  388. // 更改数据源的更新状态
  389. sql := ` UPDATE base_from_mysteel_chemical_index SET is_stop = ? WHERE base_from_mysteel_chemical_index_id IN (` + utils.GetOrmInReplace(idNum) + `) `
  390. _, err = o.Raw(sql, isStop, edbIdList).Exec()
  391. if err != nil {
  392. return
  393. }
  394. codeNum := len(indexCodeList)
  395. if codeNum <= 0 {
  396. // 需要通过指标id列表查找code列表
  397. sql := ` SELECT index_code FROM base_from_mysteel_chemical_index WHERE base_from_mysteel_chemical_index_id IN (` + utils.GetOrmInReplace(idNum) + `) `
  398. _, err = o.Raw(sql, edbIdList).QueryRows(&indexCodeList)
  399. if err != nil {
  400. return
  401. }
  402. }
  403. codeNum = len(indexCodeList)
  404. // 查出来的编码是空的话,那么就直接返回了
  405. if codeNum <= 0 {
  406. return
  407. }
  408. // 更改指标的更新状态
  409. sql = ` UPDATE edb_info SET no_update = ? WHERE source = ? AND sub_source= ? AND edb_code IN (` + utils.GetOrmInReplace(codeNum) + `) `
  410. _, err = o.Raw(sql, isStop, utils.DATA_SOURCE_MYSTEEL_CHEMICAL, 0, indexCodeList).Exec()
  411. if err != nil {
  412. return
  413. }
  414. return
  415. }