切换导航条
此项目
正在载入...
登录
allied-creation
/
performance
·
提交
转到一个项目
GitLab
转到群组
项目
活动
文件
提交
管道
0
构建
0
图表
里程碑
问题
0
合并请求
0
成员
标记
维基
派生
网络
创建新的问题
下载为
邮件补丁
差异文件
浏览文件
作者
tangxvhui
2 years ago
提交
84668964ebf68b1ddd0aac0d60a091a4efff68ae
1 个父辈
d3eddfc0
更换路由
隐藏空白字符变更
内嵌
并排对比
正在显示
8 个修改的文件
包含
52 行增加
和
30 行删除
pkg/application/notify/command/get_user_message.go
pkg/application/notify/message.go
pkg/application/notify/message_personal.go
pkg/application/summary_evaluation/service/export.go
pkg/application/summary_evaluation/service/service.go
pkg/domain/message_personal.go
pkg/port/beego/controllers/summary_evaluation_controller.go
pkg/port/beego/routers/summary_evaluation_router.go
pkg/application/notify/command/get_user_message.go
0 → 100644
查看文件 @
8466896
package
command
type
GetUserMessageCommand
struct
{
UserId
int
`json:"-"`
}
...
...
pkg/application/notify/message.go
已删除
100644 → 0
查看文件 @
d3eddfc
package
notify
import
"gitlab.fjmaimaimai.com/allied-creation/performance/pkg/domain"
// 个人信息提示
// 周期综合自评下发时 ,添加一条消息用于页面展示
func
AddMessageSummaryEvaluation
(
param
[]
*
domain
.
SummaryEvaluation
)
error
{
return
nil
}
type
MessageService
struct
{
}
func
NewSummaryEvaluationService
()
*
MessageService
{
newService
:=
&
MessageService
{}
return
newService
}
pkg/application/notify/message_personal.go
0 → 100644
查看文件 @
8466896
package
notify
import
(
"github.com/linmadan/egglib-go/core/application"
"gitlab.fjmaimaimai.com/allied-creation/performance/pkg/application/factory"
"gitlab.fjmaimaimai.com/allied-creation/performance/pkg/application/notify/command"
)
// 个人信息提示
type
MessagePersonalService
struct
{
}
func
NewMessagePersonalService
()
*
MessagePersonalService
{
newService
:=
&
MessagePersonalService
{}
return
newService
}
// 获取今天的周期综合自评消息提示
func
(
srv
*
MessagePersonalService
)
TodayMessageSummaryEvaluationSelf
(
param
*
command
.
GetUserMessageCommand
)
(
interface
{},
error
)
{
transactionContext
,
err
:=
factory
.
CreateTransactionContext
(
nil
)
if
err
!=
nil
{
return
nil
,
application
.
ThrowError
(
application
.
TRANSACTION_ERROR
,
err
.
Error
())
}
if
err
:=
transactionContext
.
StartTransaction
();
err
!=
nil
{
return
nil
,
application
.
ThrowError
(
application
.
TRANSACTION_ERROR
,
err
.
Error
())
}
defer
func
()
{
_
=
transactionContext
.
RollbackTransaction
()
}()
// nowTime := time.Now()
if
err
:=
transactionContext
.
CommitTransaction
();
err
!=
nil
{
return
nil
,
application
.
ThrowError
(
application
.
INTERNAL_SERVER_ERROR
,
err
.
Error
())
}
return
nil
,
nil
}
...
...
pkg/application/summary_evaluation/service/export.go
查看文件 @
8466896
...
...
@@ -14,7 +14,7 @@ import (
// 导出数据
// 综合管理-周期评估
func
(
srv
*
SummaryEvaluationService
)
ExportAllEvaluation
Super
(
param
*
command
.
QueryEvaluationList
)
(
*
excelize
.
File
,
error
)
{
func
(
srv
*
SummaryEvaluationService
)
ExportAllEvaluation
Finish
(
param
*
command
.
QueryEvaluationList
)
(
*
excelize
.
File
,
error
)
{
transactionContext
,
err
:=
factory
.
CreateTransactionContext
(
nil
)
if
err
!=
nil
{
return
nil
,
application
.
ThrowError
(
application
.
TRANSACTION_ERROR
,
err
.
Error
())
...
...
pkg/application/summary_evaluation/service/service.go
查看文件 @
8466896
...
...
@@ -1595,10 +1595,6 @@ func (srv *SummaryEvaluationService) GetTargetUserEvaluationSuper(param *command
return
&
result
,
nil
}
func
(
srv
*
SummaryEvaluationService
)
ListAllEvaluationSuper
(
param
*
command
.
QueryEvaluationList
)
(
map
[
string
]
interface
{},
error
)
{
return
nil
,
nil
}
// 按周期获取所有员工的评估考核结果
func
(
srv
*
SummaryEvaluationService
)
ListAllEvaluationFinish
(
param
*
command
.
QueryEvaluationList
)
(
map
[
string
]
interface
{},
error
)
{
transactionContext
,
err
:=
factory
.
CreateTransactionContext
(
nil
)
...
...
pkg/domain/message_personal.go
查看文件 @
8466896
...
...
@@ -12,7 +12,7 @@ type MessagePersonal struct {
Content
string
//消息的内容
CreatedAt
time
.
Time
UpdatedAt
time
.
Time
//
Payload string //消息的额外承载的数据
Payload
string
//消息的额外承载的数据
}
type
MessageTypes
string
...
...
pkg/port/beego/controllers/summary_evaluation_controller.go
查看文件 @
8466896
...
...
@@ -321,7 +321,7 @@ func (c *SummaryEvaluationController) GetTargetUserEvaluationSuper() {
}
// 按周期获取上级评估列表
func
(
c
*
SummaryEvaluationController
)
ListAllEvaluation
Super
()
{
func
(
c
*
SummaryEvaluationController
)
ListAllEvaluation
Finish
()
{
srv
:=
service
.
NewSummaryEvaluationService
()
param
:=
&
command
.
QueryEvaluationList
{}
err
:=
c
.
BindJSON
(
param
)
...
...
@@ -333,12 +333,12 @@ func (c *SummaryEvaluationController) ListAllEvaluationSuper() {
userReq
:=
middlewares
.
GetUser
(
c
.
Ctx
)
param
.
CompanyId
=
int
(
userReq
.
CompanyId
)
param
.
UserId
=
int
(
userReq
.
UserId
)
data
,
err
:=
srv
.
ListAllEvaluation
Super
(
param
)
data
,
err
:=
srv
.
ListAllEvaluation
Finish
(
param
)
c
.
Response
(
data
,
err
)
}
// 按周期 导出上级评估列表
func
(
c
*
SummaryEvaluationController
)
ExportAllEvaluation
Super
()
{
func
(
c
*
SummaryEvaluationController
)
ExportAllEvaluation
Finish
()
{
srv
:=
service
.
NewSummaryEvaluationService
()
param
:=
&
command
.
QueryEvaluationList
{}
err
:=
c
.
BindJSON
(
param
)
...
...
@@ -350,7 +350,7 @@ func (c *SummaryEvaluationController) ExportAllEvaluationSuper() {
userReq
:=
middlewares
.
GetUser
(
c
.
Ctx
)
param
.
UserId
=
int
(
userReq
.
UserId
)
param
.
CompanyId
=
int
(
userReq
.
CompanyId
)
data
,
err
:=
srv
.
ExportAllEvaluation
Super
(
param
)
data
,
err
:=
srv
.
ExportAllEvaluation
Finish
(
param
)
if
err
!=
nil
{
c
.
Response
(
nil
,
err
)
return
...
...
pkg/port/beego/routers/summary_evaluation_router.go
查看文件 @
8466896
...
...
@@ -29,8 +29,10 @@ func init() {
web
.
NSCtrlPost
(
"/evaluation-super/list"
,
(
*
controllers
.
SummaryEvaluationController
)
.
ListExecutorEvaluationSuper
),
web
.
NSCtrlPost
(
"/evaluation-super/confirm"
,
(
*
controllers
.
SummaryEvaluationController
)
.
ConfirmScoreSuperEvaluation
),
web
.
NSCtrlPost
(
"/target_user/evaluation-super"
,
(
*
controllers
.
SummaryEvaluationController
)
.
GetTargetUserEvaluationSuper
),
web
.
NSCtrlPost
(
"/evaluation-super/all"
,
(
*
controllers
.
SummaryEvaluationController
)
.
ListAllEvaluationSuper
),
web
.
NSCtrlPost
(
"/evaluation-super/all/export"
,
(
*
controllers
.
SummaryEvaluationController
)
.
ExportAllEvaluationSuper
),
// web.NSCtrlPost("/evaluation-super/all", (*controllers.SummaryEvaluationController).ListAllEvaluationSuper),
web
.
NSCtrlPost
(
"/evaluation-finish/all"
,
(
*
controllers
.
SummaryEvaluationController
)
.
ListAllEvaluationFinish
),
// web.NSCtrlPost("/evaluation-super/all/export", (*controllers.SummaryEvaluationController).ExportAllEvaluationSuper),
web
.
NSCtrlPost
(
"/evaluation-finish/all/export"
,
(
*
controllers
.
SummaryEvaluationController
)
.
ExportAllEvaluationFinish
),
web
.
NSCtrlGet
(
"/evaluation-self/now"
,
(
*
controllers
.
SummaryEvaluationController
)
.
ListExecutorEvaluationSelf
),
//
)
...
...
请
注册
或
登录
后发表评论