浏览代码

Merge branch 'feature/eta1.8.5_excel_balance' into debug

xyxie 10 月之前
父节点
当前提交
8fb85953bf

+ 4 - 16
controllers/data_manage/excel/excel_info.go

@@ -933,13 +933,15 @@ func (c *ExcelInfoController) Edit() {
 	excelInfo.ExcelType = req.ExcelType
 	excelInfo.ExcelClassifyId = req.ExcelClassifyId
 	excelInfo.ExcelImage = req.ExcelImage
+	excelInfo.UpdateUserId = sysUser.AdminId
+	excelInfo.UpdateUserRealName = sysUser.RealName
 	excelInfo.Content = content
 	// 自动保存时不会传缩略图,也就不更新这个字段
 	var updateExcelInfoParams []string
 	if req.ExcelImage != "" {
-		updateExcelInfoParams = []string{"ModifyTime", "ExcelName", "ExcelType", "ExcelClassifyId", "ExcelImage", "Content"}
+		updateExcelInfoParams = []string{"ModifyTime", "ExcelName", "ExcelType", "ExcelClassifyId", "ExcelImage", "Content", "UpdateUserId", "UpdateUserRealName"}
 	} else {
-		updateExcelInfoParams = []string{"ModifyTime", "ExcelName", "ExcelType", "ExcelClassifyId", "Content"}
+		updateExcelInfoParams = []string{"ModifyTime", "ExcelName", "ExcelType", "ExcelClassifyId", "Content", "UpdateUserId", "UpdateUserRealName"}
 	}
 
 	excelEdbMappingList := make([]*excel3.ExcelEdbMapping, 0)
@@ -963,20 +965,6 @@ func (c *ExcelInfoController) Edit() {
 		return
 	}
 
-	if excelInfo.Source == utils.BALANCE_TABLE && req.IsAuto == false {
-		// 更新人变更
-		parentExcelInfoId := excelInfo.ParentId
-		if excelInfo.BalanceType == 1 {
-			parentExcelInfoId = excelInfo.RelExcelInfoId
-		}
-		err = excel3.ModifyExcelInfoUpdateUserId(parentExcelInfoId, sysUser.AdminId, sysUser.RealName)
-		if err != nil {
-			br.Msg = "保存失败"
-			br.ErrMsg = "保存失败,Err:" + err.Error()
-			return
-		}
-
-	}
 	// 更新excel下载地址(默认的EXCEL需要更新,自定义表格不需要更新)
 	if excelInfo.Source == 1 {
 		go excel2.UpdateExcelInfoFileUrl(excelInfo)

+ 0 - 7
models/data_manage/excel/excel_info.go

@@ -731,10 +731,3 @@ type ExcelInfoDetailButton struct {
 	RefreshEdbButton bool `description:"是否可刷新指标"`
 	OpWorkerButton   bool `description:"是否修改协作人"`
 }
-
-func ModifyExcelInfoUpdateUserId(excelInfoId, userId int, userName string) (err error) {
-	o := orm.NewOrmUsingDB("data")
-	sql := `UPDATE excel_info SET update_user_id=?,update_user_real_name=? WHERE excel_info_id =? `
-	_, err = o.Raw(sql, userId, userName, excelInfoId).Exec()
-	return
-}

+ 0 - 1
models/data_manage/excel/request/excel_info.go

@@ -35,7 +35,6 @@ type EditExcelInfoReq struct {
 	ExcelClassifyId int         `description:"分类id"`
 	Content         string      `description:"Excel表格内容"`
 	TableData       interface{} `description:"自定义表格的数据内容"`
-	IsAuto          bool        `description:"是否自动保存,1:是,2:否,默认:1"`
 }
 
 // SetExcelInfoImageReq 设置excel表格图片请求