作者 Your Name

暂存

... ... @@ -25,7 +25,7 @@ type StaffAssessTask struct {
CycleName string `json:"cycleName"` //对应周期的名称
BeginTime time.Time `json:"beginTime"` //绩效考核开始时间
EndTime time.Time `json:"endTime"` //绩效考核截止时间
StepList []AssessTaskStep `json:"steps"` //考评的流程
StepList []AssessTaskStep `json:"stepList"` //考评的流程
ExecutorId []int `json:"executorId"` //参与此次考评的人
CreatedAt time.Time `json:"createdAt"` //数据创建时间
UpdatedAt time.Time `json:"updatedAt"` //数据更新时间
... ...
... ... @@ -12,7 +12,7 @@ type RuleController struct {
beego.BaseController
}
func (controller *RoleController) CreateRule() {
func (controller *RuleController) CreateRule() {
ruService := service.NewEvaluationRuleService()
in := &command.CreateRuleCommand{}
if err := controller.Unmarshal(in); err != nil {
... ...
... ... @@ -38,6 +38,8 @@ func (c *StaffAssessController) AssessTaskMeDesc() {
return
}
//TODO 获取当前用户信息
paramReq.CompanyId = 1
paramReq.UserId = 1
data, err := srv.AssessTaskDesc(paramReq)
c.Response(data, err)
}
... ...
... ... @@ -10,7 +10,7 @@ import (
func init() {
ns := web.NewNamespace("/v1/evaluation-template",
web.NSBefore(filters.AllowCors(), middlewares.CheckToken()),
web.NSRouter("/", &controllers.TemplateController{}, "Post:CreateTemplate"),
// web.NSRouter("/", &controllers.TemplateController{}, "Post:CreateTemplate"),
web.NSRouter("/", &controllers.TemplateController{}, "Put:UpdateTemplate"),
web.NSRouter("/", &controllers.TemplateController{}, "Delete:RemoveTemplate"),
web.NSRouter("/:Id", &controllers.TemplateController{}, "Get:GetTemplate"),
... ...
... ... @@ -3,16 +3,15 @@ package routers
import (
"github.com/beego/beego/v2/server/web"
"github.com/linmadan/egglib-go/web/beego/filters"
"gitlab.fjmaimaimai.com/allied-creation/performance/pkg/port/beego/controllers"
"gitlab.fjmaimaimai.com/allied-creation/performance/pkg/port/beego/middlewares"
)
func init() {
ns := web.NewNamespace("/v1/role-user",
web.NSBefore(filters.AllowCors(), middlewares.CheckToken()),
web.NSRouter("/", &controllers.RoleUserController{}, "Post:CreateRole"),
web.NSRouter("/", &controllers.RoleUserController{}, "Delete:RemoveRole"),
web.NSRouter("/all", &controllers.RoleUserController{}, "Post:ListRoleUser"),
// web.NSRouter("/", &controllers.RoleUserController{}, "Post:CreateRole"),
// web.NSRouter("/", &controllers.RoleUserController{}, "Delete:RemoveRole"),
// web.NSRouter("/all", &controllers.RoleUserController{}, "Post:ListRoleUser"),
)
web.AddNamespace(ns)
}
... ...
... ... @@ -2,21 +2,19 @@ package routers
import (
"github.com/beego/beego/v2/server/web"
"github.com/linmadan/egglib-go/web/beego/filters"
"gitlab.fjmaimaimai.com/allied-creation/performance/pkg/port/beego/controllers"
"gitlab.fjmaimaimai.com/allied-creation/performance/pkg/port/beego/middlewares"
)
func init() {
assessTaskNS := web.NewNamespace("/v1/staff-assess-task",
web.NSBefore(filters.AllowCors(), middlewares.CheckToken()),
// web.NSBefore(filters.AllowCors(), middlewares.CheckToken()),
web.NSCtrlPost("/search/me", (*controllers.StaffAssessController).SearchAssessTaskMe), //获取我参与过的评估项目列表
web.NSCtrlPost("/desc/me", (*controllers.StaffAssessController).AssessTaskMeDesc), //获取我的项目评估进度描述
web.NSCtrlPost("/", (*controllers.StaffAssessController).CreateStaffAssessTask), //创建员工的评估任务
)
// /v1/staff-assess/self/me/list
assessNS := web.NewNamespace("/v1/staff-assess",
web.NSBefore(filters.AllowCors(), middlewares.CheckToken()),
// web.NSBefore(filters.AllowCors(), middlewares.CheckToken()),
web.NSCtrlPost("/self/me/list", (*controllers.StaffAssessController).AssessSelfMeList), //获取我的自评反馈列表
// web.NSCtrlPost("/self/me/info", (*controllers.StaffAssessController).AssessSelfMeList),
)
... ...