正在显示
8 个修改的文件
包含
52 行增加
和
30 行删除
pkg/application/notify/message.go
已删除
100644 → 0
1 | -package notify | ||
2 | - | ||
3 | -import "gitlab.fjmaimaimai.com/allied-creation/performance/pkg/domain" | ||
4 | - | ||
5 | -// 个人信息提示 | ||
6 | - | ||
7 | -// 周期综合自评下发时 ,添加一条消息用于页面展示 | ||
8 | -func AddMessageSummaryEvaluation(param []*domain.SummaryEvaluation) error { | ||
9 | - return nil | ||
10 | -} | ||
11 | - | ||
12 | -type MessageService struct { | ||
13 | -} | ||
14 | - | ||
15 | -func NewSummaryEvaluationService() *MessageService { | ||
16 | - newService := &MessageService{} | ||
17 | - return newService | ||
18 | -} |
pkg/application/notify/message_personal.go
0 → 100644
1 | +package notify | ||
2 | + | ||
3 | +import ( | ||
4 | + "github.com/linmadan/egglib-go/core/application" | ||
5 | + "gitlab.fjmaimaimai.com/allied-creation/performance/pkg/application/factory" | ||
6 | + "gitlab.fjmaimaimai.com/allied-creation/performance/pkg/application/notify/command" | ||
7 | +) | ||
8 | + | ||
9 | +// 个人信息提示 | ||
10 | + | ||
11 | +type MessagePersonalService struct { | ||
12 | +} | ||
13 | + | ||
14 | +func NewMessagePersonalService() *MessagePersonalService { | ||
15 | + newService := &MessagePersonalService{} | ||
16 | + return newService | ||
17 | +} | ||
18 | + | ||
19 | +// 获取今天的周期综合自评消息提示 | ||
20 | +func (srv *MessagePersonalService) TodayMessageSummaryEvaluationSelf(param *command.GetUserMessageCommand) (interface{}, error) { | ||
21 | + transactionContext, err := factory.CreateTransactionContext(nil) | ||
22 | + if err != nil { | ||
23 | + return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error()) | ||
24 | + } | ||
25 | + if err := transactionContext.StartTransaction(); err != nil { | ||
26 | + return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error()) | ||
27 | + } | ||
28 | + defer func() { | ||
29 | + _ = transactionContext.RollbackTransaction() | ||
30 | + }() | ||
31 | + // nowTime := time.Now() | ||
32 | + | ||
33 | + if err := transactionContext.CommitTransaction(); err != nil { | ||
34 | + return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error()) | ||
35 | + } | ||
36 | + return nil, nil | ||
37 | +} |
@@ -14,7 +14,7 @@ import ( | @@ -14,7 +14,7 @@ import ( | ||
14 | 14 | ||
15 | // 导出数据 | 15 | // 导出数据 |
16 | // 综合管理-周期评估 | 16 | // 综合管理-周期评估 |
17 | -func (srv *SummaryEvaluationService) ExportAllEvaluationSuper(param *command.QueryEvaluationList) (*excelize.File, error) { | 17 | +func (srv *SummaryEvaluationService) ExportAllEvaluationFinish(param *command.QueryEvaluationList) (*excelize.File, error) { |
18 | transactionContext, err := factory.CreateTransactionContext(nil) | 18 | transactionContext, err := factory.CreateTransactionContext(nil) |
19 | if err != nil { | 19 | if err != nil { |
20 | return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error()) | 20 | return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error()) |
@@ -1595,10 +1595,6 @@ func (srv *SummaryEvaluationService) GetTargetUserEvaluationSuper(param *command | @@ -1595,10 +1595,6 @@ func (srv *SummaryEvaluationService) GetTargetUserEvaluationSuper(param *command | ||
1595 | return &result, nil | 1595 | return &result, nil |
1596 | } | 1596 | } |
1597 | 1597 | ||
1598 | -func (srv *SummaryEvaluationService) ListAllEvaluationSuper(param *command.QueryEvaluationList) (map[string]interface{}, error) { | ||
1599 | - return nil, nil | ||
1600 | -} | ||
1601 | - | ||
1602 | // 按周期获取所有员工的评估考核结果 | 1598 | // 按周期获取所有员工的评估考核结果 |
1603 | func (srv *SummaryEvaluationService) ListAllEvaluationFinish(param *command.QueryEvaluationList) (map[string]interface{}, error) { | 1599 | func (srv *SummaryEvaluationService) ListAllEvaluationFinish(param *command.QueryEvaluationList) (map[string]interface{}, error) { |
1604 | transactionContext, err := factory.CreateTransactionContext(nil) | 1600 | transactionContext, err := factory.CreateTransactionContext(nil) |
@@ -12,7 +12,7 @@ type MessagePersonal struct { | @@ -12,7 +12,7 @@ type MessagePersonal struct { | ||
12 | Content string //消息的内容 | 12 | Content string //消息的内容 |
13 | CreatedAt time.Time | 13 | CreatedAt time.Time |
14 | UpdatedAt time.Time | 14 | UpdatedAt time.Time |
15 | - //Payload string //消息的额外承载的数据 | 15 | + Payload string //消息的额外承载的数据 |
16 | } | 16 | } |
17 | 17 | ||
18 | type MessageTypes string | 18 | type MessageTypes string |
@@ -321,7 +321,7 @@ func (c *SummaryEvaluationController) GetTargetUserEvaluationSuper() { | @@ -321,7 +321,7 @@ func (c *SummaryEvaluationController) GetTargetUserEvaluationSuper() { | ||
321 | } | 321 | } |
322 | 322 | ||
323 | // 按周期获取上级评估列表 | 323 | // 按周期获取上级评估列表 |
324 | -func (c *SummaryEvaluationController) ListAllEvaluationSuper() { | 324 | +func (c *SummaryEvaluationController) ListAllEvaluationFinish() { |
325 | srv := service.NewSummaryEvaluationService() | 325 | srv := service.NewSummaryEvaluationService() |
326 | param := &command.QueryEvaluationList{} | 326 | param := &command.QueryEvaluationList{} |
327 | err := c.BindJSON(param) | 327 | err := c.BindJSON(param) |
@@ -333,12 +333,12 @@ func (c *SummaryEvaluationController) ListAllEvaluationSuper() { | @@ -333,12 +333,12 @@ func (c *SummaryEvaluationController) ListAllEvaluationSuper() { | ||
333 | userReq := middlewares.GetUser(c.Ctx) | 333 | userReq := middlewares.GetUser(c.Ctx) |
334 | param.CompanyId = int(userReq.CompanyId) | 334 | param.CompanyId = int(userReq.CompanyId) |
335 | param.UserId = int(userReq.UserId) | 335 | param.UserId = int(userReq.UserId) |
336 | - data, err := srv.ListAllEvaluationSuper(param) | 336 | + data, err := srv.ListAllEvaluationFinish(param) |
337 | c.Response(data, err) | 337 | c.Response(data, err) |
338 | } | 338 | } |
339 | 339 | ||
340 | // 按周期 导出上级评估列表 | 340 | // 按周期 导出上级评估列表 |
341 | -func (c *SummaryEvaluationController) ExportAllEvaluationSuper() { | 341 | +func (c *SummaryEvaluationController) ExportAllEvaluationFinish() { |
342 | srv := service.NewSummaryEvaluationService() | 342 | srv := service.NewSummaryEvaluationService() |
343 | param := &command.QueryEvaluationList{} | 343 | param := &command.QueryEvaluationList{} |
344 | err := c.BindJSON(param) | 344 | err := c.BindJSON(param) |
@@ -350,7 +350,7 @@ func (c *SummaryEvaluationController) ExportAllEvaluationSuper() { | @@ -350,7 +350,7 @@ func (c *SummaryEvaluationController) ExportAllEvaluationSuper() { | ||
350 | userReq := middlewares.GetUser(c.Ctx) | 350 | userReq := middlewares.GetUser(c.Ctx) |
351 | param.UserId = int(userReq.UserId) | 351 | param.UserId = int(userReq.UserId) |
352 | param.CompanyId = int(userReq.CompanyId) | 352 | param.CompanyId = int(userReq.CompanyId) |
353 | - data, err := srv.ExportAllEvaluationSuper(param) | 353 | + data, err := srv.ExportAllEvaluationFinish(param) |
354 | if err != nil { | 354 | if err != nil { |
355 | c.Response(nil, err) | 355 | c.Response(nil, err) |
356 | return | 356 | return |
@@ -29,8 +29,10 @@ func init() { | @@ -29,8 +29,10 @@ func init() { | ||
29 | web.NSCtrlPost("/evaluation-super/list", (*controllers.SummaryEvaluationController).ListExecutorEvaluationSuper), | 29 | web.NSCtrlPost("/evaluation-super/list", (*controllers.SummaryEvaluationController).ListExecutorEvaluationSuper), |
30 | web.NSCtrlPost("/evaluation-super/confirm", (*controllers.SummaryEvaluationController).ConfirmScoreSuperEvaluation), | 30 | web.NSCtrlPost("/evaluation-super/confirm", (*controllers.SummaryEvaluationController).ConfirmScoreSuperEvaluation), |
31 | web.NSCtrlPost("/target_user/evaluation-super", (*controllers.SummaryEvaluationController).GetTargetUserEvaluationSuper), | 31 | web.NSCtrlPost("/target_user/evaluation-super", (*controllers.SummaryEvaluationController).GetTargetUserEvaluationSuper), |
32 | - web.NSCtrlPost("/evaluation-super/all", (*controllers.SummaryEvaluationController).ListAllEvaluationSuper), | ||
33 | - web.NSCtrlPost("/evaluation-super/all/export", (*controllers.SummaryEvaluationController).ExportAllEvaluationSuper), | 32 | + // web.NSCtrlPost("/evaluation-super/all", (*controllers.SummaryEvaluationController).ListAllEvaluationSuper), |
33 | + web.NSCtrlPost("/evaluation-finish/all", (*controllers.SummaryEvaluationController).ListAllEvaluationFinish), | ||
34 | + // web.NSCtrlPost("/evaluation-super/all/export", (*controllers.SummaryEvaluationController).ExportAllEvaluationSuper), | ||
35 | + web.NSCtrlPost("/evaluation-finish/all/export", (*controllers.SummaryEvaluationController).ExportAllEvaluationFinish), | ||
34 | web.NSCtrlGet("/evaluation-self/now", (*controllers.SummaryEvaluationController).ListExecutorEvaluationSelf), | 36 | web.NSCtrlGet("/evaluation-self/now", (*controllers.SummaryEvaluationController).ListExecutorEvaluationSelf), |
35 | // | 37 | // |
36 | ) | 38 | ) |
-
请 注册 或 登录 后发表评论