From 9495105fd6b7424cf2ccf662e9151e7fdd34cbd0 Mon Sep 17 00:00:00 2001 From: herenshan112 Date: Wed, 8 Jun 2022 09:22:18 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gin_server_admin/README.md | 3 ++- .../api/index/evaluation/lookquantita.go | 4 +-- .../api/index/statistics/enter.go | 7 ++++++ gin_server_admin/api/v1/shiyan/enter.go | 21 ++++++++++++++++ gin_server_admin/api/v1/shiyan/shiyan.go | 25 +++++++++++++++++++ .../model/assessmentmodel/dutyclass.go | 2 ++ .../assessmentmodel/performance_appraisal.go | 6 ++--- gin_server_admin/router/shiyan/sys_shiyan.go | 2 ++ 8 files changed, 64 insertions(+), 6 deletions(-) diff --git a/gin_server_admin/README.md b/gin_server_admin/README.md index 00c0b90..0c38eee 100644 --- a/gin_server_admin/README.md +++ b/gin_server_admin/README.md @@ -110,7 +110,8 @@ rectification 整改措施 ``` 2、添加视图 evalprocess - select `dt`.`title` AS `class_title`,`et`.`et_title` AS `et_title`,`dgt`.`dt_title` AS `dt_title`,`ep`.`ep_id` AS `ep_id`,`ep`.`ep_order_key` AS `ep_order_key`,`ep`.`ep_step` AS `ep_step`,`ep`.`ep_cont` AS `ep_cont`,`ep`.`ep_next_cont` AS `ep_next_cont`,`ep`.`ep_time` AS `ep_time`,`ep`.`ep_state` AS `ep_state`,`ep`.`ep_role_group` AS `ep_role_group`,`ep`.`ep_type` AS `ep_type`,`ep`.`ep_participants` AS `ep_participants`,`ep`.`ep_start_time` AS `ep_start_time`,`ep`.`ep_next_step` AS `ep_next_step`,`ep`.`ep_next_executor` AS `ep_next_executor`,`ep`.`ep_setup_department` AS `ep_setup_department`,`ep`.`ep_dimension` AS `ep_dimension`,`ep`.`ep_target` AS `ep_target`,`ep`.`ep_detailedtarget` AS `ep_detailedtarget`,`ep`.`ep_accept_department` AS `ep_accept_department` from (((`evaluation_process` `ep` left join `dutyclass` `dt` on(find_in_set(`dt`.`id`,`ep`.`ep_dimension`))) left join `evaluationtarget` `et` on(find_in_set(`et`.`et_id`,`ep`.`ep_target`))) left join `detailed_target` `dgt` on(find_in_set(`dgt`.`dt_id`,`ep`.`ep_detailedtarget`))) + select `dt`.`title` AS `class_title`,`et`.`et_title` AS `et_title`,`dgt`.`dt_title` AS `dt_title`,`ep`.`ep_id` AS `ep_id`,`ep`.`ep_order_key` AS `ep_order_key`,`ep`.`ep_step` AS `ep_step`,`ep`.`ep_cont` AS `ep_cont`,`ep`.`ep_next_cont` AS `ep_next_cont`,`ep`.`ep_time` AS `ep_time`,`ep`.`ep_state` AS `ep_state`,`ep`.`ep_role_group` AS `ep_role_group`,`ep`.`ep_type` AS `ep_type`,`ep`.`ep_participants` AS `ep_participants`,`ep`.`ep_start_time` AS `ep_start_time`,`ep`.`ep_next_step` AS `ep_next_step`,`ep`.`ep_next_executor` AS `ep_next_executor`,`ep`.`ep_setup_department` AS `ep_setup_department`,`ep`.`ep_dimension` AS `ep_dimension`,`ep`.`ep_target` AS `ep_target`,`ep`.`ep_detailedtarget` AS `ep_detailedtarget`,`ep`.`ep_accept_department` AS `ep_accept_department`,`sf`.`sf_duty_department` AS `sf_depart`,`fl`.`fl_duty_department` AS `fl_depart` from (((((`evaluation_process` `ep` left join `dutyclass` `dt` on(find_in_set(`dt`.`id`,`ep`.`ep_dimension`))) left join `evaluationtarget` `et` on(find_in_set(`et`.`et_id`,`ep`.`ep_target`))) left join `detailed_target` `dgt` on(find_in_set(`dgt`.`dt_id`,`ep`.`ep_detailedtarget`))) left join `score_flow` `sf` on((`ep`.`ep_order_key` = `sf`.`sf_key`))) left join `flow_log` `fl` on((`ep`.`ep_order_key` = `fl`.`fl_key`))) + ``` ``` diff --git a/gin_server_admin/api/index/evaluation/lookquantita.go b/gin_server_admin/api/index/evaluation/lookquantita.go index aaf824a..6826c59 100644 --- a/gin_server_admin/api/index/evaluation/lookquantita.go +++ b/gin_server_admin/api/index/evaluation/lookquantita.go @@ -404,10 +404,10 @@ func (e *EvaluationInterface) SeeFlowLog(c *gin.Context) { if requestData.Title != "" || requestData.Department != "" { if requestData.Title != "" { - gormDb = gormDb.Where("dc.title LIKE ? OR et.et_title LIKE ? OR dt.dt_title LIKE ?", "%"+requestData.Title+"%", "%"+requestData.Title+"%", "%"+requestData.Title+"%") + gormDb = gormDb.Where("class_title LIKE ? OR et_title LIKE ? OR dt_title LIKE ?", "%"+requestData.Title+"%", "%"+requestData.Title+"%", "%"+requestData.Title+"%") } if requestData.Department != "" { - gormDb = gormDb.Where("sf.sf_duty_department = ? OR fl.fl_evaluation_department = ?", requestData.Department, requestData.Department) + gormDb = gormDb.Where("sf_depart = ? OR fl_depart = ?", requestData.Department, requestData.Department) } } //是否为管理员(1:不是;2:分公司;3:集团管理员;4:超级管 diff --git a/gin_server_admin/api/index/statistics/enter.go b/gin_server_admin/api/index/statistics/enter.go index f0a586f..56d0cb8 100644 --- a/gin_server_admin/api/index/statistics/enter.go +++ b/gin_server_admin/api/index/statistics/enter.go @@ -225,3 +225,10 @@ type FlowDataLogList struct { ScoringScore float64 `json:"scoringscore" gorm:"column:fld_scoring_score;type:bigint(20) unsigned;default:0;not null;comment:手动分"` EvaluationDepartment int64 `json:"evaluationdepartment" gorm:"column:fl_evaluation_department;type:bigint(20) unsigned;default:0;not null;comment:测评部门"` } + +//绩效考核成绩表 +type TranscriptTable struct { + Group string `json:"group"` + Department string `json:"department"` + Year string `year` +} diff --git a/gin_server_admin/api/v1/shiyan/enter.go b/gin_server_admin/api/v1/shiyan/enter.go index 2ad934a..ef255d3 100644 --- a/gin_server_admin/api/v1/shiyan/enter.go +++ b/gin_server_admin/api/v1/shiyan/enter.go @@ -54,3 +54,24 @@ type FlowLogAllZreo struct { Capping float64 `json:"capping"` //封顶值"` } + +type Looknoepares struct { + FlId int64 `json:"fid" gorm:"primaryKey;column:fid;type:bigint(20) unsigned;not null;comment:Id;index"` + DutyDepartment int64 `json:"dutydepartment" gorm:"column:deid;type:bigint(20) unsigned;default:0;not null;comment:职责部门"` + FldId int64 `json:"fldid" gorm:"column:fldid;type:bigint(20) unsigned;not null;comment:Id;index"` + Score float64 `json:"score" gorm:"column:score;type:bigint(20) unsigned;default:0;not null;comment:数据"` + ScoringScore float64 `json:"scoringscore" gorm:"column:sscore;type:bigint(20) unsigned;default:0;not null;comment:手动分"` + + EtId int64 `json:"etid" gorm:"column:etid;type:bigint(20) unsigned;not null;comment:Id;index"` + Title string `json:"title" gorm:"column:title;type:varchar(255);comment:指标名称"` + + Year int64 `json:"year" gorm:"column:year;type:int(7) unsigned;default:0;not null;comment:年分"` + Quarter int64 `json:"quarter" gorm:"column:quarter;type:int(2) unsigned;default:0;not null;comment:季度"` + Month int64 `json:"month" gorm:"column:month;type:int(2) unsigned;default:0;not null;comment:月"` + + Tjuser int64 `json:"tjuser" gorm:"column:tjuser;type:bigint(20) unsigned;not null;comment:Id;index"` +} + +func (Looknoepares *Looknoepares) TableName() string { + return "looknoepares" +} diff --git a/gin_server_admin/api/v1/shiyan/shiyan.go b/gin_server_admin/api/v1/shiyan/shiyan.go index f9b7c98..151f937 100644 --- a/gin_server_admin/api/v1/shiyan/shiyan.go +++ b/gin_server_admin/api/v1/shiyan/shiyan.go @@ -2112,3 +2112,28 @@ func (s *ShiyanApi) GuiDangDingXingKaoHeData(c *gin.Context) { } response.Result(0, err, "处理完成!", c) } + +//获取数据异常得提交 +func (s *ShiyanApi) Shujuyichang(c *gin.Context) { + var looknoepares []Looknoepares + idIns := []int{1, 2, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 58, 179, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198} + + err := global.GVA_DB_Performanceappraisal.Where("fid IN ?", idIns).Find(&looknoepares).Error + if err != nil { + response.Result(102, err, "没有数据!", c) + return + } + for _, v := range looknoepares { + whereDepart := commonus.MapOut() + whereDepart["id"] = v.DutyDepartment + orgContDer, _ := commonus.GetNewOrgCont(whereDepart, "name") + + // GetNewHrPeopleInfo + + whereUser := commonus.MapOut() + whereUser["key"] = v.Tjuser + userContDer, _ := commonus.GetNewHrPeopleInfo(whereUser, "name") + + fmt.Printf("%v %v %v %v-%v %v %v\n", v.Title, orgContDer.Name, commonus.Decimal(v.Score/100), v.Year, v.Month, userContDer.Name, v.ScoringScore) + } +} diff --git a/gin_server_admin/model/assessmentmodel/dutyclass.go b/gin_server_admin/model/assessmentmodel/dutyclass.go index a977b41..d8ab0c8 100644 --- a/gin_server_admin/model/assessmentmodel/dutyclass.go +++ b/gin_server_admin/model/assessmentmodel/dutyclass.go @@ -563,6 +563,8 @@ type EvalProcess struct { ClassTitle string `json:"class_title" gorm:"column:class_title;type:varchar(255);comment:指标名称"` TargetTitle string `json:"et_title" gorm:"column:target_title;type:varchar(255);comment:指标名称"` DetartTitle string `json:"dt_title" gorm:"column:detart_title;type:varchar(255);comment:指标名称"` + SfDepart int64 `json:"sfdepart" gorm:"column:sf_depart;type:bigint(20) unsigned;default:0;not null;comment:定性部门"` + FlDepart int64 `json:"fldepart" gorm:"column:fl_depart;type:bigint(20) unsigned;default:0;not null;comment:定量部门"` } func (EvalProcess *EvalProcess) TableName() string { diff --git a/gin_server_admin/model/assessmentmodel/performance_appraisal.go b/gin_server_admin/model/assessmentmodel/performance_appraisal.go index 6225ee4..0a3d8c5 100644 --- a/gin_server_admin/model/assessmentmodel/performance_appraisal.go +++ b/gin_server_admin/model/assessmentmodel/performance_appraisal.go @@ -80,9 +80,9 @@ type EvaluationProcess struct { NextStep int `json:"nextstep" gorm:"column:ep_next_step;type:int(7) unsigned;default:1;not null;comment:下一步"` NextExecutor string `json:"nextexecutor" gorm:"column:ep_next_executor;type:mediumtext;comment:下一步执行人"` SetupDepartment int64 `json:"setupdepartment" gorm:"column:ep_setup_department;type:bigint(20) unsigned;default:0;not null;comment:发起部门"` - Dimension string `json:"dimension" gorm:"column:sf_reason;type:mediumtext;comment:维度"` - Target string `json:"target" gorm:"column:sf_reason;type:mediumtext;comment:指标"` - DetailedTarget string `json:"detailedtarget" gorm:"column:sf_reason;type:mediumtext;comment:指标细则"` + Dimension string `json:"dimension" gorm:"column:ep_dimension;type:mediumtext;comment:维度"` + Target string `json:"target" gorm:"column:ep_target;type:mediumtext;comment:指标"` + DetailedTarget string `json:"detailedtarget" gorm:"column:ep_detailedtarget;type:mediumtext;comment:指标细则"` AcceptDepartment int64 `json:"acceptdepartment" gorm:"column:ep_accept_department;type:bigint(20) unsigned;default:0;not null;comment:接受考核部门"` } diff --git a/gin_server_admin/router/shiyan/sys_shiyan.go b/gin_server_admin/router/shiyan/sys_shiyan.go index 8aa88ae..9a1f15e 100644 --- a/gin_server_admin/router/shiyan/sys_shiyan.go +++ b/gin_server_admin/router/shiyan/sys_shiyan.go @@ -48,5 +48,7 @@ func (s *ShiyanRouter) InitShiyanRouter(Router *gin.RouterGroup) { shiyanCodeRouter.POST("guidangdingxingkaohedata", authorityApi.GuiDangDingXingKaoHeData) //归档定性考核数据 + shiyanCodeRouter.POST("shujuyichang", authorityApi.Shujuyichang) //获取数据异常得提交 + } }