|
@@ -6,6 +6,7 @@ import (
|
|
|
"eta/eta_api/controllers"
|
|
|
"eta/eta_api/models"
|
|
|
"eta/eta_api/models/data_manage"
|
|
|
+ excel3 "eta/eta_api/models/data_manage/excel"
|
|
|
"eta/eta_api/models/data_manage/request"
|
|
|
"eta/eta_api/models/data_manage/response"
|
|
|
"eta/eta_api/services"
|
|
@@ -83,7 +84,7 @@ func (c *ExcelInfoController) Add() {
|
|
|
return
|
|
|
}
|
|
|
|
|
|
- excelClassify, err := data_manage.GetExcelClassifyById(req.ExcelClassifyId)
|
|
|
+ excelClassify, err := excel3.GetExcelClassifyById(req.ExcelClassifyId)
|
|
|
if err != nil {
|
|
|
if err.Error() == utils.ErrNoRow() {
|
|
|
br.Msg = "分类不存在"
|
|
@@ -111,7 +112,7 @@ func (c *ExcelInfoController) Add() {
|
|
|
pars = append(pars, req.ExcelName)
|
|
|
|
|
|
// 获取分类下是否存在该表格名称
|
|
|
- count, err := data_manage.GetExcelInfoCountByCondition(condition, pars)
|
|
|
+ count, err := excel3.GetExcelInfoCountByCondition(condition, pars)
|
|
|
if err != nil {
|
|
|
br.Msg = "判断表格名称是否存在失败"
|
|
|
br.ErrMsg = "判断表格名称是否存在失败,Err:" + err.Error()
|
|
@@ -171,7 +172,7 @@ func (c *ExcelInfoController) Add() {
|
|
|
}
|
|
|
|
|
|
timestamp := strconv.FormatInt(time.Now().UnixNano(), 10)
|
|
|
- excelInfo := &data_manage.ExcelInfo{
|
|
|
+ excelInfo := &excel3.ExcelInfo{
|
|
|
//ExcelInfoId: 0,
|
|
|
ExcelName: req.ExcelName,
|
|
|
Source: req.Source,
|
|
@@ -188,7 +189,7 @@ func (c *ExcelInfoController) Add() {
|
|
|
CreateTime: time.Now(),
|
|
|
}
|
|
|
|
|
|
- err = data_manage.AddExcelInfo(excelInfo)
|
|
|
+ err = excel3.AddExcelInfo(excelInfo)
|
|
|
if err != nil {
|
|
|
br.Msg = "保存失败"
|
|
|
br.ErrMsg = "保存失败,Err:" + err.Error()
|
|
@@ -286,7 +287,7 @@ func (c *ExcelInfoController) List() {
|
|
|
|
|
|
// 筛选分类
|
|
|
if excelClassifyId > 0 {
|
|
|
- _, err := data_manage.GetExcelClassifyById(excelClassifyId)
|
|
|
+ _, err := excel3.GetExcelClassifyById(excelClassifyId)
|
|
|
if err != nil && err.Error() != utils.ErrNoRow() {
|
|
|
br.Msg = "获取表格信息失败"
|
|
|
br.ErrMsg = "获取信息失败,GetExcelClassify,Err:" + err.Error()
|
|
@@ -310,7 +311,7 @@ func (c *ExcelInfoController) List() {
|
|
|
pars = append(pars, sysUser.AdminId)
|
|
|
}
|
|
|
//获取表格信息
|
|
|
- list, err := data_manage.GetNoContentExcelListByCondition(condition, pars, startSize, pageSize)
|
|
|
+ list, err := excel3.GetNoContentExcelListByCondition(condition, pars, startSize, pageSize)
|
|
|
if err != nil && err.Error() != utils.ErrNoRow() {
|
|
|
br.Success = true
|
|
|
br.Msg = "获取表格信息失败"
|
|
@@ -319,10 +320,10 @@ func (c *ExcelInfoController) List() {
|
|
|
}
|
|
|
|
|
|
if list == nil || len(list) <= 0 || (err != nil && err.Error() == utils.ErrNoRow()) {
|
|
|
- list = make([]*data_manage.MyExcelInfoList, 0)
|
|
|
+ list = make([]*excel3.MyExcelInfoList, 0)
|
|
|
}
|
|
|
// 总数据量
|
|
|
- dataCount, err := data_manage.GetExcelListCountByCondition(condition, pars)
|
|
|
+ dataCount, err := excel3.GetExcelListCountByCondition(condition, pars)
|
|
|
if err != nil && err.Error() != utils.ErrNoRow() {
|
|
|
br.Msg = "获取表格列表信息失败"
|
|
|
br.ErrMsg = "获取表格列表数据总数失败,Err:" + err.Error()
|
|
@@ -443,7 +444,7 @@ func (c *ExcelInfoController) Edit() {
|
|
|
return
|
|
|
}
|
|
|
|
|
|
- excelClassify, err := data_manage.GetExcelClassifyById(req.ExcelClassifyId)
|
|
|
+ excelClassify, err := excel3.GetExcelClassifyById(req.ExcelClassifyId)
|
|
|
if err != nil {
|
|
|
if err.Error() == utils.ErrNoRow() {
|
|
|
br.Msg = "分类不存在"
|
|
@@ -475,7 +476,7 @@ func (c *ExcelInfoController) Edit() {
|
|
|
pars = append(pars, req.ExcelName)
|
|
|
|
|
|
// 获取分类下是否存在该表格名称
|
|
|
- count, err := data_manage.GetExcelInfoCountByCondition(condition, pars)
|
|
|
+ count, err := excel3.GetExcelInfoCountByCondition(condition, pars)
|
|
|
if err != nil {
|
|
|
br.Msg = "ETA判断表格名称是否存在失败"
|
|
|
br.ErrMsg = "判断ETA表格名称是否存在失败,Err:" + err.Error()
|
|
@@ -487,7 +488,7 @@ func (c *ExcelInfoController) Edit() {
|
|
|
return
|
|
|
}
|
|
|
|
|
|
- excelInfo, err := data_manage.GetExcelInfoById(req.ExcelInfoId)
|
|
|
+ excelInfo, err := excel3.GetExcelInfoById(req.ExcelInfoId)
|
|
|
if err != nil {
|
|
|
br.Msg = "获取ETA表格失败"
|
|
|
br.ErrMsg = "获取ETA表格失败,Err:" + err.Error()
|
|
@@ -553,7 +554,7 @@ func (c *ExcelInfoController) Edit() {
|
|
|
|
|
|
updateExcelInfoParams := []string{"ModifyTime", "ExcelName", "ExcelType", "ExcelClassifyId", "ExcelImage", "Content"}
|
|
|
|
|
|
- err = data_manage.EditExcelInfo(excelInfo, updateExcelInfoParams)
|
|
|
+ err = excel3.EditExcelInfo(excelInfo, updateExcelInfoParams)
|
|
|
if err != nil {
|
|
|
br.Msg = "保存失败"
|
|
|
br.ErrMsg = "保存失败,Err:" + err.Error()
|
|
@@ -567,7 +568,7 @@ func (c *ExcelInfoController) Edit() {
|
|
|
|
|
|
// 加入草稿
|
|
|
{
|
|
|
- excelDraftInfo := &data_manage.ExcelDraft{
|
|
|
+ excelDraftInfo := &excel3.ExcelDraft{
|
|
|
//ExcelDraftId: 0,
|
|
|
ExcelId: req.ExcelInfoId,
|
|
|
Name: req.ExcelName,
|
|
@@ -577,7 +578,7 @@ func (c *ExcelInfoController) Edit() {
|
|
|
CreateTime: time.Now(),
|
|
|
}
|
|
|
|
|
|
- err = data_manage.AddExcelDraft(excelDraftInfo)
|
|
|
+ err = excel3.AddExcelDraft(excelDraftInfo)
|
|
|
}
|
|
|
|
|
|
resp := response.AddExcelInfoResp{
|
|
@@ -638,7 +639,7 @@ func (c *ExcelInfoController) Move() {
|
|
|
}
|
|
|
|
|
|
//判断分类是否存在
|
|
|
- _, err = data_manage.GetExcelClassifyById(req.ExcelClassifyId)
|
|
|
+ _, err = excel3.GetExcelClassifyById(req.ExcelClassifyId)
|
|
|
if err != nil {
|
|
|
br.Msg = "移动失败"
|
|
|
br.ErrMsg = "获取分类信息失败" + err.Error()
|
|
@@ -652,7 +653,7 @@ func (c *ExcelInfoController) Move() {
|
|
|
}
|
|
|
|
|
|
// 获取表格信息
|
|
|
- excelInfo, err := data_manage.GetExcelInfoById(req.ExcelInfoId)
|
|
|
+ excelInfo, err := excel3.GetExcelInfoById(req.ExcelInfoId)
|
|
|
if err != nil {
|
|
|
br.Msg = "移动失败"
|
|
|
br.ErrMsg = "获取表格信息失败,Err:" + err.Error()
|
|
@@ -662,7 +663,7 @@ func (c *ExcelInfoController) Move() {
|
|
|
//如果改变了分类,那么移动该表格数据
|
|
|
if excelInfo.ExcelClassifyId != req.ExcelClassifyId {
|
|
|
//查询需要修改的分类下是否存在同一个表格名称
|
|
|
- tmpExcelInfo, tmpErr := data_manage.GetExcelInfoByClassifyIdAndName(req.ExcelClassifyId, excelInfo.ExcelName)
|
|
|
+ tmpExcelInfo, tmpErr := excel3.GetExcelInfoByClassifyIdAndName(req.ExcelClassifyId, excelInfo.ExcelName)
|
|
|
if tmpErr != nil && tmpErr.Error() != utils.ErrNoRow() {
|
|
|
br.Msg = "移动失败"
|
|
|
br.ErrMsg = "移动失败,Err:" + tmpErr.Error()
|
|
@@ -689,7 +690,7 @@ func (c *ExcelInfoController) Move() {
|
|
|
updateCol := make([]string, 0)
|
|
|
//如果有传入 上一个兄弟节点分类id
|
|
|
if req.PrevExcelInfoId > 0 {
|
|
|
- prevExcelInfo, err := data_manage.GetExcelInfoById(req.PrevExcelInfoId)
|
|
|
+ prevExcelInfo, err := excel3.GetExcelInfoById(req.PrevExcelInfoId)
|
|
|
if err != nil {
|
|
|
br.Msg = "移动失败"
|
|
|
br.ErrMsg = "获取上一个兄弟节点分类信息失败,Err:" + err.Error()
|
|
@@ -699,7 +700,7 @@ func (c *ExcelInfoController) Move() {
|
|
|
//如果是移动在两个兄弟节点之间
|
|
|
if req.NextExcelInfoId > 0 {
|
|
|
//下一个兄弟节点
|
|
|
- nextExcelInfo, err := data_manage.GetExcelInfoById(req.NextExcelInfoId)
|
|
|
+ nextExcelInfo, err := excel3.GetExcelInfoById(req.NextExcelInfoId)
|
|
|
if err != nil {
|
|
|
br.Msg = "移动失败"
|
|
|
br.ErrMsg = "获取下一个兄弟节点分类信息失败,Err:" + err.Error()
|
|
@@ -709,13 +710,13 @@ func (c *ExcelInfoController) Move() {
|
|
|
if prevExcelInfo.Sort == nextExcelInfo.Sort || prevExcelInfo.Sort == excelInfo.Sort {
|
|
|
//变更兄弟节点的排序
|
|
|
updateSortStr := `sort + 2`
|
|
|
- _ = data_manage.UpdateExcelInfoSortByClassifyId(prevExcelInfo.ExcelClassifyId, prevExcelInfo.Sort, prevExcelInfo.ExcelInfoId, updateSortStr)
|
|
|
+ _ = excel3.UpdateExcelInfoSortByClassifyId(prevExcelInfo.ExcelClassifyId, prevExcelInfo.Sort, prevExcelInfo.ExcelInfoId, updateSortStr)
|
|
|
} else {
|
|
|
//如果下一个兄弟的排序权重正好是上个兄弟节点下一层,那么需要再加一层了
|
|
|
if nextExcelInfo.Sort-prevExcelInfo.Sort == 1 {
|
|
|
//变更兄弟节点的排序
|
|
|
updateSortStr := `sort + 1`
|
|
|
- _ = data_manage.UpdateExcelInfoSortByClassifyId(prevExcelInfo.ExcelClassifyId, prevExcelInfo.Sort, prevExcelInfo.ExcelInfoId, updateSortStr)
|
|
|
+ _ = excel3.UpdateExcelInfoSortByClassifyId(prevExcelInfo.ExcelClassifyId, prevExcelInfo.Sort, prevExcelInfo.ExcelInfoId, updateSortStr)
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -726,7 +727,7 @@ func (c *ExcelInfoController) Move() {
|
|
|
updateCol = append(updateCol, "Sort", "ModifyTime")
|
|
|
|
|
|
} else {
|
|
|
- firstClassify, err := data_manage.GetFirstExcelInfoByClassifyId(req.ExcelClassifyId)
|
|
|
+ firstClassify, err := excel3.GetFirstExcelInfoByClassifyId(req.ExcelClassifyId)
|
|
|
if err != nil && err.Error() != utils.ErrNoRow() {
|
|
|
br.Msg = "移动失败"
|
|
|
br.ErrMsg = "获取获取当前父级分类下的排序第一条的分类信息失败,Err:" + err.Error()
|
|
@@ -736,7 +737,7 @@ func (c *ExcelInfoController) Move() {
|
|
|
//如果该分类下存在其他分类,且第一个其他分类的排序等于0,那么需要调整排序
|
|
|
if firstClassify != nil && firstClassify.Sort == 0 {
|
|
|
updateSortStr := ` sort + 1 `
|
|
|
- _ = data_manage.UpdateExcelInfoSortByClassifyId(firstClassify.ExcelClassifyId, 0, firstClassify.ExcelInfoId-1, updateSortStr)
|
|
|
+ _ = excel3.UpdateExcelInfoSortByClassifyId(firstClassify.ExcelClassifyId, 0, firstClassify.ExcelInfoId-1, updateSortStr)
|
|
|
}
|
|
|
|
|
|
// 变更表格在当前分类下的排序
|
|
@@ -822,7 +823,7 @@ func (c *ExcelInfoController) Delete() {
|
|
|
}
|
|
|
|
|
|
// 获取表格信息
|
|
|
- excelInfo, err := data_manage.GetExcelInfoById(req.ExcelInfoId)
|
|
|
+ excelInfo, err := excel3.GetExcelInfoById(req.ExcelInfoId)
|
|
|
if err != nil {
|
|
|
br.Msg = "删除失败"
|
|
|
br.ErrMsg = "获取表格信息失败,Err:" + err.Error()
|
|
@@ -851,7 +852,7 @@ func (c *ExcelInfoController) Delete() {
|
|
|
|
|
|
// 返回下一个表格的信息
|
|
|
{
|
|
|
- var nextItem *data_manage.ExcelInfo
|
|
|
+ var nextItem *excel3.ExcelInfo
|
|
|
var condition string
|
|
|
var pars []interface{}
|
|
|
condition += " AND excel_classify_id=? "
|
|
@@ -859,7 +860,7 @@ func (c *ExcelInfoController) Delete() {
|
|
|
|
|
|
condition += " AND sort>=? "
|
|
|
pars = append(pars, excelInfo.Sort)
|
|
|
- nextItem, err = data_manage.GetNextExcelInfoByCondition(condition, pars)
|
|
|
+ nextItem, err = excel3.GetNextExcelInfoByCondition(condition, pars)
|
|
|
if err != nil && err.Error() != utils.ErrNoRow() {
|
|
|
br.Msg = "删除失败"
|
|
|
br.ErrMsg = "获取下一级表格信息失败,Err:" + err.Error()
|
|
@@ -868,7 +869,7 @@ func (c *ExcelInfoController) Delete() {
|
|
|
|
|
|
// 如果没找到,那么查找下一个分类的第一个表格
|
|
|
if nextItem == nil {
|
|
|
- currClassifyInfo, err := data_manage.GetExcelClassifyById(excelInfo.ExcelClassifyId)
|
|
|
+ currClassifyInfo, err := excel3.GetExcelClassifyById(excelInfo.ExcelClassifyId)
|
|
|
if err != nil && err.Error() != utils.ErrNoRow() {
|
|
|
br.Msg = "删除失败"
|
|
|
br.ErrMsg = "获取当前表格分类信息失败,Err:" + err.Error()
|
|
@@ -897,7 +898,7 @@ func (c *ExcelInfoController) Delete() {
|
|
|
// }
|
|
|
//}
|
|
|
|
|
|
- nextItem, err = data_manage.GetNextExcelInfo(excelInfo.ExcelClassifyId, currClassifyInfo.Sort, currClassifyInfo.Source)
|
|
|
+ nextItem, err = excel3.GetNextExcelInfo(excelInfo.ExcelClassifyId, currClassifyInfo.Sort, currClassifyInfo.Source)
|
|
|
if err != nil && err.Error() != utils.ErrNoRow() {
|
|
|
br.Msg = "删除失败"
|
|
|
br.ErrMsg = "获取下一级表格信息失败,Err:" + err.Error()
|
|
@@ -966,7 +967,7 @@ func (c *ExcelInfoController) AddDraft() {
|
|
|
return
|
|
|
}
|
|
|
|
|
|
- excelClassify, err := data_manage.GetExcelClassifyById(req.ExcelClassifyId)
|
|
|
+ excelClassify, err := excel3.GetExcelClassifyById(req.ExcelClassifyId)
|
|
|
if err != nil {
|
|
|
if err.Error() == utils.ErrNoRow() {
|
|
|
br.Msg = "分类不存在"
|
|
@@ -994,14 +995,14 @@ func (c *ExcelInfoController) AddDraft() {
|
|
|
pars = append(pars, req.ExcelName)
|
|
|
|
|
|
// 获取分类下是否存在该表格名称
|
|
|
- _, err = data_manage.GetExcelInfoById(req.ExcelInfoId)
|
|
|
+ _, err = excel3.GetExcelInfoById(req.ExcelInfoId)
|
|
|
if err != nil {
|
|
|
br.Msg = "判断表格名称是否存在失败"
|
|
|
br.ErrMsg = "判断表格名称是否存在失败,Err:" + err.Error()
|
|
|
return
|
|
|
}
|
|
|
|
|
|
- excelDraftInfo := &data_manage.ExcelDraft{
|
|
|
+ excelDraftInfo := &excel3.ExcelDraft{
|
|
|
//ExcelDraftId: 0,
|
|
|
ExcelId: req.ExcelInfoId,
|
|
|
Name: req.ExcelName,
|
|
@@ -1011,7 +1012,7 @@ func (c *ExcelInfoController) AddDraft() {
|
|
|
CreateTime: time.Now(),
|
|
|
}
|
|
|
|
|
|
- err = data_manage.AddExcelDraft(excelDraftInfo)
|
|
|
+ err = excel3.AddExcelDraft(excelDraftInfo)
|
|
|
if err != nil {
|
|
|
br.Msg = "保存失败"
|
|
|
br.ErrMsg = "保存失败,Err:" + err.Error()
|
|
@@ -1052,7 +1053,7 @@ func (c *ExcelInfoController) GetExcelTableData() {
|
|
|
return
|
|
|
}
|
|
|
//获取eta表格信息
|
|
|
- excelInfo, err := data_manage.GetExcelInfoByUniqueCode(uniqueCode)
|
|
|
+ excelInfo, err := excel3.GetExcelInfoByUniqueCode(uniqueCode)
|
|
|
if err != nil {
|
|
|
br.Msg = "获取失败"
|
|
|
br.ErrMsg = "获取ETA表格信息失败,Err:" + err.Error()
|
|
@@ -1137,7 +1138,7 @@ func (c *ExcelInfoController) GetExcelTableData() {
|
|
|
}
|
|
|
|
|
|
// UpdateExcelInfoFileUrl 更新excel表格的下载地址
|
|
|
-func UpdateExcelInfoFileUrl(excelInfo *data_manage.ExcelInfo) {
|
|
|
+func UpdateExcelInfoFileUrl(excelInfo *excel3.ExcelInfo) {
|
|
|
var err error
|
|
|
defer func() {
|
|
|
if err != nil {
|
|
@@ -1807,13 +1808,13 @@ func (c *ExcelInfoController) Download() {
|
|
|
br.IsSendEmail = false
|
|
|
return
|
|
|
}
|
|
|
- var excelInfo *data_manage.ExcelInfo
|
|
|
+ var excelInfo *excel3.ExcelInfo
|
|
|
var err error
|
|
|
//获取eta表格信息
|
|
|
if excelInfoId > 0 {
|
|
|
- excelInfo, err = data_manage.GetExcelInfoById(excelInfoId)
|
|
|
+ excelInfo, err = excel3.GetExcelInfoById(excelInfoId)
|
|
|
} else {
|
|
|
- excelInfo, err = data_manage.GetExcelInfoByUniqueCode(uniqueCode)
|
|
|
+ excelInfo, err = excel3.GetExcelInfoByUniqueCode(uniqueCode)
|
|
|
}
|
|
|
if err != nil {
|
|
|
br.Msg = "获取失败"
|
|
@@ -1954,7 +1955,7 @@ func (c *ExcelInfoController) Copy() {
|
|
|
return
|
|
|
}
|
|
|
|
|
|
- excelClassify, err := data_manage.GetExcelClassifyById(req.ExcelClassifyId)
|
|
|
+ excelClassify, err := excel3.GetExcelClassifyById(req.ExcelClassifyId)
|
|
|
if err != nil {
|
|
|
if err.Error() == utils.ErrNoRow() {
|
|
|
br.Msg = "分类不存在"
|
|
@@ -1974,7 +1975,7 @@ func (c *ExcelInfoController) Copy() {
|
|
|
}
|
|
|
|
|
|
// 获取原ETA表格信息
|
|
|
- oldExcelInfo, err := data_manage.GetExcelInfoById(req.ExcelInfoId)
|
|
|
+ oldExcelInfo, err := excel3.GetExcelInfoById(req.ExcelInfoId)
|
|
|
if err != nil {
|
|
|
br.Msg = "获取ETA表格失败"
|
|
|
br.ErrMsg = "获取ETA表格失败,Err:" + err.Error()
|
|
@@ -2002,7 +2003,7 @@ func (c *ExcelInfoController) Copy() {
|
|
|
condition += " AND excel_name=? "
|
|
|
pars = append(pars, req.ExcelName)
|
|
|
|
|
|
- count, err := data_manage.GetExcelInfoCountByCondition(condition, pars)
|
|
|
+ count, err := excel3.GetExcelInfoCountByCondition(condition, pars)
|
|
|
if err != nil {
|
|
|
br.Msg = "判断表格名称是否存在失败"
|
|
|
br.ErrMsg = "判断表格名称是否存在失败,Err:" + err.Error()
|
|
@@ -2016,7 +2017,7 @@ func (c *ExcelInfoController) Copy() {
|
|
|
}
|
|
|
|
|
|
timestamp := strconv.FormatInt(time.Now().UnixNano(), 10)
|
|
|
- excelInfo := &data_manage.ExcelInfo{
|
|
|
+ excelInfo := &excel3.ExcelInfo{
|
|
|
//ExcelInfoId: 0,
|
|
|
ExcelName: req.ExcelName,
|
|
|
Source: oldExcelInfo.Source,
|
|
@@ -2033,7 +2034,7 @@ func (c *ExcelInfoController) Copy() {
|
|
|
CreateTime: time.Now(),
|
|
|
}
|
|
|
|
|
|
- err = data_manage.AddExcelInfo(excelInfo)
|
|
|
+ err = excel3.AddExcelInfo(excelInfo)
|
|
|
if err != nil {
|
|
|
br.Msg = "保存失败"
|
|
|
br.ErrMsg = "保存失败,Err:" + err.Error()
|
|
@@ -2183,7 +2184,7 @@ func decompressZip(src string) error {
|
|
|
// FixTableData ETA1.0.2 自定义分析(生成指标数据修复)
|
|
|
func FixTableData() {
|
|
|
// 获取一级分类
|
|
|
- classifyList, err := data_manage.GetExcelClassifyByParentId(0, utils.EXCEL_DEFAULT)
|
|
|
+ classifyList, err := excel3.GetExcelClassifyByParentId(0, utils.EXCEL_DEFAULT)
|
|
|
if err != nil && err.Error() != utils.ErrNoRow() {
|
|
|
fmt.Println("数据修复失败,Err:" + err.Error())
|
|
|
return
|
|
@@ -2192,7 +2193,7 @@ func FixTableData() {
|
|
|
mixTableMap := make(map[int]int)
|
|
|
for _, v := range classifyList {
|
|
|
// 时间序列表格
|
|
|
- classify := &data_manage.ExcelClassify{
|
|
|
+ classify := &excel3.ExcelClassify{
|
|
|
//ExcelClassifyId: 0,
|
|
|
ExcelClassifyName: v.ExcelClassifyName,
|
|
|
ParentId: v.ParentId,
|
|
@@ -2205,11 +2206,11 @@ func FixTableData() {
|
|
|
CreateTime: time.Now(),
|
|
|
ModifyTime: time.Now(),
|
|
|
}
|
|
|
- _, err = data_manage.AddExcelClassify(classify)
|
|
|
+ _, err = excel3.AddExcelClassify(classify)
|
|
|
timeTableMap[v.ExcelClassifyId] = classify.ExcelClassifyId
|
|
|
|
|
|
// 混合表格
|
|
|
- classify2 := &data_manage.ExcelClassify{
|
|
|
+ classify2 := &excel3.ExcelClassify{
|
|
|
//ExcelClassifyId: 0,
|
|
|
ExcelClassifyName: v.ExcelClassifyName,
|
|
|
ParentId: v.ParentId,
|
|
@@ -2222,14 +2223,14 @@ func FixTableData() {
|
|
|
CreateTime: time.Now(),
|
|
|
ModifyTime: time.Now(),
|
|
|
}
|
|
|
- _, err = data_manage.AddExcelClassify(classify2)
|
|
|
+ _, err = excel3.AddExcelClassify(classify2)
|
|
|
mixTableMap[v.ExcelClassifyId] = classify2.ExcelClassifyId
|
|
|
}
|
|
|
|
|
|
// 修改时间序列表
|
|
|
{
|
|
|
// 获取时间序列表
|
|
|
- timeTableExcelList, err := data_manage.GetNoContentExcelInfoAll(utils.TIME_TABLE)
|
|
|
+ timeTableExcelList, err := excel3.GetNoContentExcelInfoAll(utils.TIME_TABLE)
|
|
|
if err != nil && err.Error() != utils.ErrNoRow() {
|
|
|
fmt.Println("获取时间序列表列表失败,Err:" + err.Error())
|
|
|
return
|
|
@@ -2240,14 +2241,14 @@ func FixTableData() {
|
|
|
if !ok {
|
|
|
continue
|
|
|
}
|
|
|
- data_manage.UpdateExcelInfoClassifyId(classifyId, v.ExcelInfoId)
|
|
|
+ excel3.UpdateExcelInfoClassifyId(classifyId, v.ExcelInfoId)
|
|
|
}
|
|
|
}
|
|
|
|
|
|
// 修改混合序列表
|
|
|
{
|
|
|
// 获取时间序列表
|
|
|
- mixTableExcelList, err := data_manage.GetNoContentExcelInfoAll(utils.MIXED_TABLE)
|
|
|
+ mixTableExcelList, err := excel3.GetNoContentExcelInfoAll(utils.MIXED_TABLE)
|
|
|
if err != nil && err.Error() != utils.ErrNoRow() {
|
|
|
fmt.Println("获取时间序列表列表失败,Err:" + err.Error())
|
|
|
return
|
|
@@ -2258,7 +2259,7 @@ func FixTableData() {
|
|
|
if !ok {
|
|
|
continue
|
|
|
}
|
|
|
- data_manage.UpdateExcelInfoClassifyId(classifyId, v.ExcelInfoId)
|
|
|
+ excel3.UpdateExcelInfoClassifyId(classifyId, v.ExcelInfoId)
|
|
|
}
|
|
|
}
|
|
|
|