|
@@ -431,8 +431,30 @@ func (c *ExcelInfoController) List() {
|
|
|
//只看我的
|
|
|
isShowMe, _ := c.GetBool("IsShowMe")
|
|
|
if isShowMe {
|
|
|
- condition += " AND sys_user_id = ? "
|
|
|
- pars = append(pars, sysUser.AdminId)
|
|
|
+ if source == utils.BALANCE_TABLE { //平衡表的,显示同时需要显示协作人相关的图表
|
|
|
+ //找到当前协作人相关的表格ID
|
|
|
+ obj := new(excel3.ExcelWorker)
|
|
|
+ existList, err := obj.GetBySysUserId(sysUser.AdminId)
|
|
|
+ if err != nil {
|
|
|
+ br.Msg = "获取表格协作人失败!"
|
|
|
+ br.ErrMsg = "获取表格协作人失败,Err:" + err.Error()
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if len(existList) > 0 {
|
|
|
+ var excelIds []int
|
|
|
+ for _, v := range existList {
|
|
|
+ excelIds = append(excelIds, v.ExcelInfoId)
|
|
|
+ }
|
|
|
+ condition += fmt.Sprintf(` AND ( excel_info_id IN (%s) or sys_user_id = ?)`, utils.GetOrmInReplace(len(excelIds)))
|
|
|
+ pars = append(pars, excelIds, sysUser.AdminId)
|
|
|
+ } else {
|
|
|
+ condition += " AND sys_user_id = ? "
|
|
|
+ pars = append(pars, sysUser.AdminId)
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ condition += " AND sys_user_id = ? "
|
|
|
+ pars = append(pars, sysUser.AdminId)
|
|
|
+ }
|
|
|
}
|
|
|
//获取表格信息
|
|
|
list, err := excel3.GetNoContentExcelListByCondition(condition, pars, startSize, pageSize)
|