diff --git a/api/version1/honoraryArchives/honors.go b/api/version1/honoraryArchives/honors.go index 1c75bb5..be5cfd2 100644 --- a/api/version1/honoraryArchives/honors.go +++ b/api/version1/honoraryArchives/honors.go @@ -74,7 +74,9 @@ func (a *ApiMethod) HonorList(c *gin.Context) { gshscCont.Userid = v.Userid //归属人员"` gshscCont.Time = v.Time //创建时间"` gshscCont.State = v.State // 状态(1:启用;2:禁用;3:删除)"` - + var carrierCont modelshonory.CarrierType + carrierCont.GetCont(map[string]interface{}{"`id`": v.Carrier}, "`name`") + gshscCont.CarrierName = carrierCont.Name if v.AwardTime != 0 { gshscCont.AwardTimeStr = publicmethod.UnixTimeToDay(v.AwardTime, 14) } diff --git a/api/version1/honoraryArchives/type.go b/api/version1/honoraryArchives/type.go index 680f2d9..e2aa517 100644 --- a/api/version1/honoraryArchives/type.go +++ b/api/version1/honoraryArchives/type.go @@ -76,6 +76,7 @@ type honorslist struct { modelshonory.HonoraryArchives AwardTimeStr string `json:"awardtimestr"` //获奖时间 TermOfValidityStr string `json:"termvaliditytr"` //获奖时间 + CarrierName string `json:"carriername"` //载体名称 } // 查询荣誉详情输出 diff --git a/api/version1/postseting/postweb/posttarget.go b/api/version1/postseting/postweb/posttarget.go index 989888a..7e8f742 100644 --- a/api/version1/postseting/postweb/posttarget.go +++ b/api/version1/postseting/postweb/posttarget.go @@ -277,7 +277,89 @@ func (a *ApiMethod) GetPostDeimensoInfo(c *gin.Context) { } else { outCont.MoneyStr = fmt.Sprintf("%v", v.Maxmoney) } + outCont.UserKey = receivedValue.UserKey outList = append(outList, outCont) } publicmethod.ResultList(0, receivedValue.Page, receivedValue.PageSize, total, int64(len(outList)), outList, c) } + +// 获取被考核人定性指标细则详细内容 +func (a *ApiMethod) GetNaturePostDimerons(c *gin.Context) { + var receivedValue postNaturcInfo + err := c.ShouldBindJSON(&receivedValue) + if err != nil { + publicmethod.Result(100, err, c) + return + } + if receivedValue.UserKey == "" { + publicmethod.Result(101, receivedValue, c) + return + } + if receivedValue.Id == "" { + publicmethod.Result(101, receivedValue, c) + return + } + var shemeCont modelskpi.QualitativeEvaluationScheme + errSheme := shemeCont.GetCont(map[string]interface{}{"`id`": receivedValue.Id}) + if errSheme != nil { + publicmethod.Result(107, receivedValue, c) + return + } + var outCont outNatureDimePostCont + outCont.Id = shemeCont.Id + outCont.VersionNumber = shemeCont.VersionNumber // 版本编号"` + outCont.CompanyId = shemeCont.CompanyId // 归属公司"` + outCont.DepartmentId = shemeCont.DepartmentId // 归属部门"` + outCont.OrgId = shemeCont.OrgId // 归属行政组织"` + outCont.PostId = shemeCont.PostId // 归属岗位"` + outCont.Title = shemeCont.Title //考核项名称"` + outCont.DimensionId = shemeCont.DimensionId //维度"` + outCont.TargetId = shemeCont.TargetId // 指标"` + outCont.SonTargetId = shemeCont.SonTargetId //子栏目"` + outCont.DetailsId = shemeCont.DetailsId //细则"` + outCont.Attribute = shemeCont.Attribute // 属性 1:定性考核;2:定量考核"` + outCont.MinScore = shemeCont.MinScore // 最小分*100保存"` + outCont.MaxScore = shemeCont.MaxScore //最大分*100保存"` + outCont.ScoringMethod = shemeCont.ScoringMethod //计分方式(1:自动;2:手动)"` + outCont.State = shemeCont.State //状态(1:启用;2:禁用;3:删除)"` + outCont.Addtime = shemeCont.Addtime //添加时间"` + outCont.Eitetime = shemeCont.Eitetime // 编辑时间"` + outCont.CensorType = shemeCont.CensorType //检查方式(1:现场检查;2:资料检查;3:事件触发)"` + outCont.Source = shemeCont.Source //来源(1:岗位;2:部门引用)"` + outCont.RunState = shemeCont.RunState //运行状态(1:启用;2:禁用;3:观察)"` + + outCont.Punishmode = shemeCont.Punishmode //处罚方式 1:扣分;2:现金处罚;3:扣分加现金 + outCont.Maxmoney = shemeCont.Maxmoney //最高罚款 + outCont.Minmoney = shemeCont.Minmoney //最低罚款 + if shemeCont.CensorType != "" { + outCont.CensorTypeAry = strings.Split(shemeCont.CensorType, ",") + } + if shemeCont.DetailsId != 0 { + //获取指标信息 + if shemeCont.Source == 1 { //岗位 + var targetCont modelskpi.PostTargetDetails + targetCont.GetCont(map[string]interface{}{"`id`": shemeCont.DetailsId}, "content", "add_reduce", "censor_cont") + outCont.Context = targetCont.Content //指标说明"` + outCont.AddReduce = targetCont.AddReduce //1:减少;2:增加;3:无属性,现场确认加或减"` + outCont.CensorCont = targetCont.CensorCont //检查依据"` + } else { //部门 + var departTarDeta modelskpi.DetailedTarget + departTarDeta.GetCont(map[string]interface{}{"`dt_id`": shemeCont.DetailsId}, "`dt_add_reduce`") + outCont.Context = departTarDeta.Content //指标说明"` + outCont.AddReduce = departTarDeta.AddReduce //1:减少;2:增加;3:无属性,现场确认加或减"` + outCont.CensorCont = departTarDeta.CensorCont //检查依据"` + } + } + if shemeCont.MinScore != 0 { + outCont.ScoreStr = fmt.Sprintf("%v-%v", shemeCont.MinScore, shemeCont.MaxScore) + } else { + outCont.ScoreStr = fmt.Sprintf("%v", shemeCont.MaxScore) + } + if shemeCont.Minmoney != 0 { + outCont.MoneyStr = fmt.Sprintf("%v-%v", shemeCont.Minmoney, shemeCont.Maxmoney) + } else { + outCont.MoneyStr = fmt.Sprintf("%v", shemeCont.Maxmoney) + } + outCont.UserKey = receivedValue.UserKey + publicmethod.Result(0, outCont, c) +} diff --git a/api/version1/postseting/postweb/type.go b/api/version1/postseting/postweb/type.go index c902c98..0f753a6 100644 --- a/api/version1/postseting/postweb/type.go +++ b/api/version1/postseting/postweb/type.go @@ -56,4 +56,23 @@ type outNatureDimeCont struct { CensorCont string `json:"censorcont"` //检查依据 ScoreStr string `json:"scorestr"` //基础考核标准 MoneyStr string `json:"moneystr"` //现金 + UserKey string `json:"userkey"` +} + +// 岗位定性考核细致获取数据 +type postNaturcInfo struct { + publicmethod.PublicId + UserKey string `json:"userkey"` +} + +// 输出岗位定性考核细致获取数据 +type outNatureDimePostCont struct { + modelskpi.QualitativeEvaluationScheme + CensorTypeAry []string `json:"censortypeary"` + Context string `json:"content"` //指标说明 + AddReduce int `json:"addreduce"` //1:减少;2:增加;3:无属性,现场确认加或减 + CensorCont string `json:"censorcont"` //检查依据 + ScoreStr string `json:"scorestr"` //基础考核标准 + MoneyStr string `json:"moneystr"` //现金 + UserKey string `json:"userkey"` } diff --git a/apirouter/v1/postseting/web.go b/apirouter/v1/postseting/web.go index a54818b..626139a 100644 --- a/apirouter/v1/postseting/web.go +++ b/apirouter/v1/postseting/web.go @@ -15,9 +15,10 @@ func (a *ApiRouter) RouterGroupWeb(router *gin.RouterGroup) { apiRouter.GET("", methodBinding.Index) //入口 apiRouter.POST("", methodBinding.Index) //入口 - apiRouter.POST("getposttarget", methodBinding.GetPostTarget) //获取指定人要考核的项目列表 - apiRouter.POST("getpostnature", methodBinding.GetPostNature) //定性指标列表 - apiRouter.POST("getpostration", methodBinding.GetPostRation) //定量指标列表 - apiRouter.POST("get_post_deimenso_info", methodBinding.GetPostDeimensoInfo) //获取岗位定性考核指标细则列表 + apiRouter.POST("getposttarget", methodBinding.GetPostTarget) //获取指定人要考核的项目列表 + apiRouter.POST("getpostnature", methodBinding.GetPostNature) //定性指标列表 + apiRouter.POST("getpostration", methodBinding.GetPostRation) //定量指标列表 + apiRouter.POST("get_post_deimenso_info", methodBinding.GetPostDeimensoInfo) //获取岗位定性考核指标细则列表 + apiRouter.POST("get_nature_post_dimerons", methodBinding.GetNaturePostDimerons) //获取被考核人定性指标细则详细内容 } }