|
@@ -1200,18 +1200,10 @@ func getBalanceDataListStartDateAndValue(dataList []*data_manage.EdbDataList) (s
|
|
|
}
|
|
|
|
|
|
// AddBalanceStaticExcel 另存为和存为静态表以及子表的复制都调用该接口
|
|
|
-func AddBalanceStaticExcel(oldExcelInfoId int, versionName string, sysUser *system.Admin, parentId, relExcelInfoId, balanceType int, childExcelList []*excelModel.ExcelInfo) (excelInfo *excelModel.ExcelInfo, err error, errMsg string, isSendEmail bool) {
|
|
|
+func AddBalanceStaticExcel(oldExcelInfo *excelModel.ExcelInfo, versionName string, sysUser *system.Admin, parentId, relExcelInfoId, balanceType int, childExcelList []*excelModel.ExcelInfo) (excelInfo *excelModel.ExcelInfo, err error, errMsg string, isSendEmail bool) {
|
|
|
isSendEmail = true
|
|
|
|
|
|
versionName = utils.TrimLRStr(versionName)
|
|
|
-
|
|
|
- // 获取原ETA表格信息
|
|
|
- oldExcelInfo, err := excelModel.GetExcelInfoById(oldExcelInfoId)
|
|
|
- if err != nil {
|
|
|
- errMsg = "获取ETA表格失败"
|
|
|
- return
|
|
|
- }
|
|
|
-
|
|
|
// todo 操作权限校验
|
|
|
{
|
|
|
// 数据权限
|
|
@@ -1236,7 +1228,7 @@ func AddBalanceStaticExcel(oldExcelInfoId int, versionName string, sysUser *syst
|
|
|
var condition string
|
|
|
var pars []interface{}
|
|
|
condition += " AND rel_excel_info_id=? "
|
|
|
- pars = append(pars, oldExcelInfoId)
|
|
|
+ pars = append(pars, oldExcelInfo.ExcelInfoId)
|
|
|
|
|
|
condition += " AND version_name=? "
|
|
|
pars = append(pars, versionName)
|
|
@@ -1311,7 +1303,7 @@ func AddBalanceStaticExcel(oldExcelInfoId int, versionName string, sysUser *syst
|
|
|
}
|
|
|
if parentId == 0 && len(childExcelList) > 0 {
|
|
|
for _, childExcelInfo := range childExcelList {
|
|
|
- _, err, errMsg, isSendEmail = AddBalanceStaticExcel(childExcelInfo.ExcelInfoId, versionName, sysUser, excelInfo.ExcelInfoId, relExcelInfoId, balanceType, []*excelModel.ExcelInfo{})
|
|
|
+ _, err, errMsg, isSendEmail = AddBalanceStaticExcel(childExcelInfo, versionName, sysUser, excelInfo.ExcelInfoId, relExcelInfoId, balanceType, []*excelModel.ExcelInfo{})
|
|
|
if err != nil {
|
|
|
return
|
|
|
}
|