refactor: 删除冗余常量文件并整合常量定义

This commit is contained in:
TsMask
2025-02-20 09:50:29 +08:00
parent 1b435074cb
commit a1296b6fe6
63 changed files with 1823 additions and 1748 deletions

View File

@@ -7,7 +7,7 @@ import (
"path/filepath"
"time"
"be.ems/src/framework/constants/uploadsubpath"
"be.ems/src/framework/constants"
"be.ems/src/framework/logger"
"be.ems/src/framework/utils/date"
@@ -26,7 +26,7 @@ func TransferExeclUploadFile(file *multipart.FileHeader) (string, error) {
// 上传资源路径
_, dir := resourceUpload()
// 新文件名称并组装文件地址
filePath := filepath.Join(uploadsubpath.IMPORT, date.ParseDatePath(time.Now()))
filePath := filepath.Join(constants.UPLOAD_IMPORT, date.ParseDatePath(time.Now()))
fileName := generateFileName(file.Filename)
writePathFile := filepath.Join(dir, filePath, fileName)
// 存入新文件路径
@@ -138,7 +138,7 @@ func WriteSheet(headerCells map[string]string, dataCells []map[string]any, fileN
// 上传资源路径
_, dir := resourceUpload()
filePath := filepath.Join(uploadsubpath.EXPORT, date.ParseDatePath(time.Now()))
filePath := filepath.Join(constants.UPLOAD_EXPORT, date.ParseDatePath(time.Now()))
saveFilePath := filepath.Join(dir, filePath, fileName)
// 创建文件目录