优化日报模块
This commit is contained in:
1 parent
79d5ae6b66
commit
51fd90fc51
17 files changed
+1767
-257
No files matched your search
@@ -97,6 +97,22 @@ func (c *AppOaController) DailyReportMineList() {
|
||||
c.oaOk(res)
|
||||
}
|
||||
|
||||
// DailyReportCalendar GET /api/oa/dailyreport/calendar
|
||||
// 我的日报近期热力图:months 默认 3,返回区间内逐日状态(草稿/已提交)。
|
||||
func (c *AppOaController) DailyReportCalendar() {
|
||||
u, ok := c.dailyReportCtx()
|
||||
if !ok {
|
||||
return
|
||||
}
|
||||
months, _ := c.GetInt("months", 3)
|
||||
res, err := dailyreport.Calendar(u, months)
|
||||
if err != nil {
|
||||
c.dailyReportFail(err)
|
||||
return
|
||||
}
|
||||
c.oaOk(res)
|
||||
}
|
||||
|
||||
// DailyReportSave POST /api/oa/dailyreport/save
|
||||
func (c *AppOaController) DailyReportSave() {
|
||||
u, ok := c.dailyReportCtx()
|
||||
@@ -152,6 +168,25 @@ func (c *AppOaController) DailyReportDelete() {
|
||||
c.oaOk(map[string]interface{}{"id": id})
|
||||
}
|
||||
|
||||
// DailyReportWithdraw POST /api/oa/dailyreport/withdraw/:id
|
||||
// 撤销提交:已提交日报退回草稿并留存本次提交的内容快照,改完需重新提交。
|
||||
func (c *AppOaController) DailyReportWithdraw() {
|
||||
u, ok := c.dailyReportCtx()
|
||||
if !ok {
|
||||
return
|
||||
}
|
||||
id := c.dailyReportID()
|
||||
if id == 0 {
|
||||
return
|
||||
}
|
||||
item, err := dailyreport.Withdraw(u, id)
|
||||
if err != nil {
|
||||
c.dailyReportFail(err)
|
||||
return
|
||||
}
|
||||
c.oaOk(item)
|
||||
}
|
||||
|
||||
// DailyReportTeamStatus GET /api/oa/dailyreport/team/status
|
||||
func (c *AppOaController) DailyReportTeamStatus() {
|
||||
u, ok := c.dailyReportCtx()
|
||||
|
||||
@@ -175,6 +175,41 @@ func (c *BackendOaDailyReportController) Delete() {
|
||||
c.odrOk(map[string]interface{}{"id": id})
|
||||
}
|
||||
|
||||
// Withdraw POST /backend/oa/dailyreport/withdraw/:id
|
||||
// 撤销提交:已提交日报退回草稿并留存本次提交的内容快照,改完需重新提交。
|
||||
func (c *BackendOaDailyReportController) Withdraw() {
|
||||
u, ok := c.odrCtx()
|
||||
if !ok {
|
||||
return
|
||||
}
|
||||
id := c.odrIDParam(":id")
|
||||
if id == 0 {
|
||||
return
|
||||
}
|
||||
item, err := dailyreport.Withdraw(u, id)
|
||||
if err != nil {
|
||||
c.odrFail(err)
|
||||
return
|
||||
}
|
||||
c.odrOk(item)
|
||||
}
|
||||
|
||||
// Calendar GET /backend/oa/dailyreport/calendar
|
||||
// 我的日报近期热力图:months 默认 3,返回区间内逐日状态(草稿/已提交),供前端按月、按周渲染。
|
||||
func (c *BackendOaDailyReportController) Calendar() {
|
||||
u, ok := c.odrCtx()
|
||||
if !ok {
|
||||
return
|
||||
}
|
||||
months, _ := c.GetInt("months", 3)
|
||||
res, err := dailyreport.Calendar(u, months)
|
||||
if err != nil {
|
||||
c.odrFail(err)
|
||||
return
|
||||
}
|
||||
c.odrOk(res)
|
||||
}
|
||||
|
||||
// TeamStatus GET /backend/oa/dailyreport/team/status
|
||||
// 团队日报汇总:date/org_id/keyword/page/pageSize。
|
||||
func (c *BackendOaDailyReportController) TeamStatus() {
|
||||
|
||||
Reference in new issue
Block a user