|
|
@ -277,7 +277,89 @@ func (a *ApiMethod) GetPostDeimensoInfo(c *gin.Context) { |
|
|
} else { |
|
|
} else { |
|
|
outCont.MoneyStr = fmt.Sprintf("%v", v.Maxmoney) |
|
|
outCont.MoneyStr = fmt.Sprintf("%v", v.Maxmoney) |
|
|
} |
|
|
} |
|
|
|
|
|
outCont.UserKey = receivedValue.UserKey |
|
|
outList = append(outList, outCont) |
|
|
outList = append(outList, outCont) |
|
|
} |
|
|
} |
|
|
publicmethod.ResultList(0, receivedValue.Page, receivedValue.PageSize, total, int64(len(outList)), outList, c) |
|
|
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) |
|
|
|
|
|
} |
|
|
|