正在显示
7 个修改的文件
包含
23 行增加
和
0 行删除
| @@ -36,6 +36,7 @@ func TaskSendSummaryEvaluationV2() error { | @@ -36,6 +36,7 @@ func TaskSendSummaryEvaluationV2() error { | ||
| 36 | return nil | 36 | return nil |
| 37 | } | 37 | } |
| 38 | 38 | ||
| 39 | +func getPrepareEvaluationCycle() {} | ||
| 39 | func getPrepareSummaryEvaluation() ([]*domain.EvaluationProject, error) { | 40 | func getPrepareSummaryEvaluation() ([]*domain.EvaluationProject, error) { |
| 40 | transactionContext, err := factory.CreateTransactionContext(nil) | 41 | transactionContext, err := factory.CreateTransactionContext(nil) |
| 41 | if err != nil { | 42 | if err != nil { |
| @@ -28,6 +28,7 @@ type EvaluationCycle struct { | @@ -28,6 +28,7 @@ type EvaluationCycle struct { | ||
| 28 | CompanyId int64 `json:"companyId,string" comment:"公司ID"` | 28 | CompanyId int64 `json:"companyId,string" comment:"公司ID"` |
| 29 | CreatorId int64 `json:"creatorId,string" comment:"创建人ID"` | 29 | CreatorId int64 `json:"creatorId,string" comment:"创建人ID"` |
| 30 | KpiCycle int `json:"kpiCycle" comment:"考核周期(1日、2周、3月)"` | 30 | KpiCycle int `json:"kpiCycle" comment:"考核周期(1日、2周、3月)"` |
| 31 | + SummaryState ProjectSummaryState `json:"summaryState" comment:"周期评估是否下发"` | ||
| 31 | CreatedAt time.Time `json:"createdAt" comment:"创建时间"` | 32 | CreatedAt time.Time `json:"createdAt" comment:"创建时间"` |
| 32 | UpdatedAt time.Time `json:"updatedAt" comment:"更新时间"` | 33 | UpdatedAt time.Time `json:"updatedAt" comment:"更新时间"` |
| 33 | DeletedAt *time.Time `json:"deletedAt" comment:"删除时间"` | 34 | DeletedAt *time.Time `json:"deletedAt" comment:"删除时间"` |
| @@ -33,6 +33,7 @@ type EvaluationProject struct { | @@ -33,6 +33,7 @@ type EvaluationProject struct { | ||
| 33 | DeletedAt *time.Time `json:"deletedAt" comment:"删除时间"` | 33 | DeletedAt *time.Time `json:"deletedAt" comment:"删除时间"` |
| 34 | } | 34 | } |
| 35 | 35 | ||
| 36 | +// 周期评估的下发状态 | ||
| 36 | type ProjectSummaryState int | 37 | type ProjectSummaryState int |
| 37 | 38 | ||
| 38 | const ( | 39 | const ( |
| @@ -13,6 +13,7 @@ type EvaluationCycle struct { | @@ -13,6 +13,7 @@ type EvaluationCycle struct { | ||
| 13 | CompanyId int64 `comment:"公司ID"` | 13 | CompanyId int64 `comment:"公司ID"` |
| 14 | CreatorId int64 `comment:"创建人ID"` | 14 | CreatorId int64 `comment:"创建人ID"` |
| 15 | KpiCycle int `comment:"考核周期(1日、2周、3月)"` | 15 | KpiCycle int `comment:"考核周期(1日、2周、3月)"` |
| 16 | + SummaryState int `comment:"周期评估是否下发" pg:",use_zero"` | ||
| 16 | CreatedAt time.Time `comment:"创建时间"` | 17 | CreatedAt time.Time `comment:"创建时间"` |
| 17 | UpdatedAt time.Time `comment:"更新时间"` | 18 | UpdatedAt time.Time `comment:"更新时间"` |
| 18 | DeletedAt *time.Time `comment:"删除时间"` | 19 | DeletedAt *time.Time `comment:"删除时间"` |
| @@ -30,6 +30,7 @@ func (repo *EvaluationCycleRepository) TransformToDomain(m *models.EvaluationCyc | @@ -30,6 +30,7 @@ func (repo *EvaluationCycleRepository) TransformToDomain(m *models.EvaluationCyc | ||
| 30 | CompanyId: m.CompanyId, | 30 | CompanyId: m.CompanyId, |
| 31 | CreatorId: m.CreatorId, | 31 | CreatorId: m.CreatorId, |
| 32 | KpiCycle: m.KpiCycle, | 32 | KpiCycle: m.KpiCycle, |
| 33 | + SummaryState: domain.ProjectSummaryState(m.SummaryState), | ||
| 33 | CreatedAt: m.CreatedAt.Local(), | 34 | CreatedAt: m.CreatedAt.Local(), |
| 34 | UpdatedAt: m.UpdatedAt.Local(), | 35 | UpdatedAt: m.UpdatedAt.Local(), |
| 35 | DeletedAt: m.DeletedAt, | 36 | DeletedAt: m.DeletedAt, |
| @@ -45,6 +46,7 @@ func (repo *EvaluationCycleRepository) TransformToModel(d *domain.EvaluationCycl | @@ -45,6 +46,7 @@ func (repo *EvaluationCycleRepository) TransformToModel(d *domain.EvaluationCycl | ||
| 45 | CompanyId: d.CompanyId, | 46 | CompanyId: d.CompanyId, |
| 46 | CreatorId: d.CreatorId, | 47 | CreatorId: d.CreatorId, |
| 47 | KpiCycle: d.KpiCycle, | 48 | KpiCycle: d.KpiCycle, |
| 49 | + SummaryState: int(d.SummaryState), | ||
| 48 | CreatedAt: d.CreatedAt, | 50 | CreatedAt: d.CreatedAt, |
| 49 | UpdatedAt: d.UpdatedAt, | 51 | UpdatedAt: d.UpdatedAt, |
| 50 | DeletedAt: d.DeletedAt, | 52 | DeletedAt: d.DeletedAt, |
| @@ -341,3 +341,19 @@ func (c *StaffAssessController) ListTargetUserSelfCycle() { | @@ -341,3 +341,19 @@ func (c *StaffAssessController) ListTargetUserSelfCycle() { | ||
| 341 | data, err := srv.ListTargetUserSelfCycle(paramReq) | 341 | data, err := srv.ListTargetUserSelfCycle(paramReq) |
| 342 | c.Response(data, err) | 342 | c.Response(data, err) |
| 343 | } | 343 | } |
| 344 | + | ||
| 345 | +// ListTargetUserSelfCycle 按照周期获取员工的每日自评小结 | ||
| 346 | +func (c *StaffAssessController) GetStaffAsessSelfCountLevel() { | ||
| 347 | + srv := service.NewStaffAssessServeice() | ||
| 348 | + paramReq := &query.StaffAsessSelfCountLevel{} | ||
| 349 | + err := c.BindJSON(paramReq) | ||
| 350 | + if err != nil { | ||
| 351 | + e := application.ThrowError(application.ARG_ERROR, "json 解析错误"+err.Error()) | ||
| 352 | + c.Response(nil, e) | ||
| 353 | + return | ||
| 354 | + } | ||
| 355 | + userReq := middlewares.GetUser(c.Ctx) | ||
| 356 | + paramReq.CompanyId = int(userReq.CompanyId) | ||
| 357 | + data, err := srv.GetStaffAsessSelfCountLevel(paramReq) | ||
| 358 | + c.Response(data, err) | ||
| 359 | +} |
| @@ -36,6 +36,7 @@ func init() { | @@ -36,6 +36,7 @@ func init() { | ||
| 36 | web.NSCtrlPost("/summary/users-indicator", (*controllers.StaffAssessController).QueryMemberPerformanceIndicator), //员工绩效-综合管理-绩效导出指标 | 36 | web.NSCtrlPost("/summary/users-indicator", (*controllers.StaffAssessController).QueryMemberPerformanceIndicator), //员工绩效-综合管理-绩效导出指标 |
| 37 | web.NSCtrlPost("/summary/export-indicator", (*controllers.StaffAssessController).ExportPerformanceIndicator), //员工绩效-综合管理-绩效导出指标 | 37 | web.NSCtrlPost("/summary/export-indicator", (*controllers.StaffAssessController).ExportPerformanceIndicator), //员工绩效-综合管理-绩效导出指标 |
| 38 | web.NSCtrlPost("/target_user/self/cycle", (*controllers.StaffAssessController).ListTargetUserSelfCycle), //获取员工自评的周期下拉列表 | 38 | web.NSCtrlPost("/target_user/self/cycle", (*controllers.StaffAssessController).ListTargetUserSelfCycle), //获取员工自评的周期下拉列表 |
| 39 | + web.NSCtrlPost("/target_user/self/summary", (*controllers.StaffAssessController).GetStaffAsessSelfCountLevel), //获取员工每日自评小结 | ||
| 39 | ) | 40 | ) |
| 40 | //v2 改版 | 41 | //v2 改版 |
| 41 | assessTaskV2NS := web.NewNamespace("/v2/staff-assess-task", | 42 | assessTaskV2NS := web.NewNamespace("/v2/staff-assess-task", |
-
请 注册 或 登录 后发表评论