作者 tangxvhui

添加矩阵分析的接口

... ... @@ -1716,7 +1716,7 @@ func (srv StaffAssessServeice) SaveAssessInfo(param *command.SaveAssessInfoComma
//转换填入的评估值
err = v.TransformValue()
if err != nil {
return nil, application.ThrowError(application.BUSINESS_ERROR, err.Error())
return nil, application.ThrowError(application.BUSINESS_ERROR, v.Category+"-"+v.Name+":"+err.Error())
}
}
for ii := range v.Remark {
... ...
... ... @@ -358,3 +358,20 @@ func (c *StaffAssessController) SaveAssessCache() {
c.Response(cacheService.SaveAssessCache(in))
}
}
// 员工绩效-项目管理-矩阵分析
func (c *StaffAssessController) AnalysisData() {
srv := service.NewStaffAssessServeice()
paramReq := &query.ListAssessContentCycleDay{}
err := c.BindJSON(paramReq)
if err != nil {
e := application.ThrowError(application.ARG_ERROR, "json 解析错误"+err.Error())
c.Response(nil, e)
return
}
userReq := middlewares.GetUser(c.Ctx)
paramReq.CompanyId = int(userReq.CompanyId)
paramReq.OperaterId = int(userReq.UserId)
data, err := srv.AnalysisData(paramReq)
c.Response(data, err)
}
... ...
... ... @@ -17,6 +17,7 @@ func init() {
web.NSCtrlPost("/cycle/day", (*controllers.StaffAssessController).ListAssessCycleDay), //获取周期中的考核日期
web.NSCtrlPost("/cycle/day/content", (*controllers.StaffAssessController).ListAssessContentCycleDay), //根据周期里的考核日期,获取员工填写评估内容列表
web.NSCtrlPost("/cycle/day/content/export", (*controllers.StaffAssessController).ExportAssessContentCycleDay), //根据周期里的考核日期,导出员工填写评估内容列表
web.NSCtrlPost("/cycle/day/analysis", (*controllers.StaffAssessController).AnalysisData), //员工绩效-项目管理-矩阵分析
)
assessNS := web.NewNamespace("/v1/staff-assess",
... ...