|
@@ -128,18 +128,37 @@ func (c *ExcelInfoController) Rename() {
|
|
|
return
|
|
|
}
|
|
|
|
|
|
- // todo 操作权限校验, 增加协作人判断
|
|
|
+ // 操作权限校验, 增加协作人判断
|
|
|
{
|
|
|
+ checkExcelInfo := excelInfo
|
|
|
+ if excelInfo.Source == utils.BALANCE_TABLE {
|
|
|
+ checkExcelInfoId := excelInfo.ExcelInfoId
|
|
|
+ if excelInfo.BalanceType == 1 {
|
|
|
+ checkExcelInfoId = excelInfo.RelExcelInfoId
|
|
|
+ } else {
|
|
|
+ if excelInfo.ParentId > 0 {
|
|
|
+ checkExcelInfoId = excelInfo.ParentId
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if checkExcelInfoId != excelInfo.ExcelInfoId {
|
|
|
+ checkExcelInfo, err = excel.GetExcelInfoById(excelInfo.ExcelInfoId)
|
|
|
+ if err != nil {
|
|
|
+ br.Msg = "获取平衡表格信息失败"
|
|
|
+ br.ErrMsg = "获取平衡表格信息失败,Err:" + err.Error()
|
|
|
+ return
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
// 数据权限
|
|
|
- haveOperaAuth, err := data_manage_permission.CheckExcelPermissionByExcelInfoId(excelInfo.ExcelInfoId, excelInfo.ExcelClassifyId, excelInfo.IsJoinPermission, c.SysUser.AdminId)
|
|
|
- if err != nil {
|
|
|
- br.Msg = "获取ETA表格失败"
|
|
|
- br.ErrMsg = "获取ETA表格权限失败,Err:" + err.Error()
|
|
|
+ haveOperaAuth, e := data_manage_permission.CheckExcelPermissionByExcelInfoId(checkExcelInfo.ExcelInfoId, checkExcelInfo.ExcelClassifyId, checkExcelInfo.IsJoinPermission, c.SysUser.AdminId)
|
|
|
+ if e != nil {
|
|
|
+ br.Msg = "获取ETA表格权限失败"
|
|
|
+ br.ErrMsg = "获取表格权限信息失败,Err" + e.Error()
|
|
|
return
|
|
|
}
|
|
|
- button := excelService.GetExcelInfoOpButton(sysUser, excelInfo.SysUserId, excelInfo.Source, haveOperaAuth)
|
|
|
+
|
|
|
+ button := excelService.GetBalanceExcelInfoOpButton(sysUser.AdminId, checkExcelInfo.SysUserId, haveOperaAuth, checkExcelInfo.ExcelInfoId)
|
|
|
if !button.OpButton {
|
|
|
- br.Msg = "无操作权限"
|
|
|
br.Msg = "无操作权限"
|
|
|
br.IsSendEmail = false
|
|
|
return
|
|
@@ -219,7 +238,7 @@ func (c *ExcelInfoController) SaveExcelWorker() {
|
|
|
br.ErrMsg = "您没有权限操作!"
|
|
|
return
|
|
|
}
|
|
|
- // todo 操作权限校验, 增加协作人判断
|
|
|
+ // 操作权限校验, 增加协作人判断
|
|
|
{
|
|
|
// 数据权限
|
|
|
haveOperaAuth, err := data_manage_permission.CheckExcelPermissionByExcelInfoId(excelInfo.ExcelInfoId, excelInfo.ExcelClassifyId, excelInfo.IsJoinPermission, c.SysUser.AdminId)
|
|
@@ -230,7 +249,6 @@ func (c *ExcelInfoController) SaveExcelWorker() {
|
|
|
}
|
|
|
button := excelService.GetExcelInfoOpButton(sysUser, excelInfo.SysUserId, excelInfo.Source, haveOperaAuth)
|
|
|
if !button.OpButton {
|
|
|
- br.Msg = "无操作权限"
|
|
|
br.Msg = "无操作权限"
|
|
|
br.IsSendEmail = false
|
|
|
return
|
|
@@ -656,7 +674,7 @@ func (c *ExcelInfoController) DeleteBalanceChart() {
|
|
|
return
|
|
|
}
|
|
|
|
|
|
- // todo 查询权限
|
|
|
+ // todo 查询图表权限
|
|
|
/*chartClassifyItem, err := data_manage.GetChartClassifyById(chartInfo.ChartClassifyId)
|
|
|
if err != nil {
|
|
|
br.Msg = "获取失败"
|
|
@@ -795,7 +813,6 @@ func (c *ExcelInfoController) BalanceSeasonChartLegendPreview() {
|
|
|
dataList := make([]*data_manage.EdbDataList, 0)
|
|
|
|
|
|
for i, v := range req.DateArr {
|
|
|
- // todo 处理DataTimestamp
|
|
|
dataTime, e := time.ParseInLocation(utils.FormatDate, v, time.Local)
|
|
|
if e != nil {
|
|
|
br.Msg = "日期格式错误"
|