|
@@ -763,6 +763,14 @@ func ReplaceEdbInExcel(oldEdbInfoId, newEdbInfoId int, updateExcelList []*ExcelI
|
|
|
return
|
|
|
}
|
|
|
//更新配置中的指标B
|
|
|
+ // 判断是否已存在绑定,如果存在则删除
|
|
|
+ sql = `DELETE FROM excel_edb_mapping WHERE excel_info_id=? and edb_info_id=?`
|
|
|
+ _, err = to.Raw(sql, excelInfo.ExcelInfoId, newEdbInfoId).Exec()
|
|
|
+ if err != nil {
|
|
|
+ errmsg = "删除指标B关联图表配置信息失败:Err:" + err.Error()
|
|
|
+ return
|
|
|
+ }
|
|
|
+ // 插入新的绑定
|
|
|
sql = `UPDATE excel_edb_mapping SET edb_info_id=?, modify_time=? WHERE excel_info_id=? and edb_info_id=?`
|
|
|
_, err = to.Raw(sql, newEdbInfoId, time.Now(), excelInfo.ExcelInfoId, oldEdbInfoId).Exec()
|
|
|
if err != nil {
|