作者 yangfu

修改 审核列表(自查统计)/机会详情自查内容/筛选池已提交(提交时间)

... ... @@ -79,8 +79,13 @@ func (s SelfChecks) Static() SelfCheckResults {
return []selfCheckResult{}
}
results := []selfCheckResult{{Item: "是"}, {Item: "否"}, {Item: "不清楚"}}
var gIdx int64
for i := range s {
check := (s)[i]
if gIdx == check.GroupId {
continue
}
gIdx = check.GroupId
for k := range results {
if strings.EqualFold(results[k].Item, strings.TrimSpace(check.Answer)) {
results[k].Total = results[k].Total + 1
... ...
... ... @@ -549,6 +549,9 @@ func GetChanceSelfChecks(chanceInfo *models.Chance) []protocol.SelfCheck {
switch chanceInfo.CheckResultStatus {
case protocol.None: //未提交筛查结果
utils.JsonUnmarshal(chanceInfo.SelfChecks, &selfChecks)
if len(selfChecks) != 0 {
protocol.SelfChecks(selfChecks).SetSelfChecksLevel1ByRule()
}
break
case protocol.Waiting: //未通过审核的返回所有筛查结果(一级/二级)
utils.JsonUnmarshal(chanceInfo.CheckResult, &selfChecks)
... ...
... ... @@ -1659,7 +1659,11 @@ func MyApproveChance(header *protocol.RequestHeader, request *protocol.MyApprove
commItem.Score = approveData.Score
}
}
commItem.SelfCheckResult = protocol.NewSelfChecks(ormItem.SelfChecks).Static() //自查统计数据
selfChecks := protocol.NewSelfChecks(ormItem.SelfChecks)
selfChecks.SetSelfChecksLevel1ByRule()
commItem.SelfCheckResult = selfChecks.Static() //自查统计数据
rsp.List = append(rsp.List, commItem)
}
return
... ...
... ... @@ -144,15 +144,12 @@ func SubmitChecks(header *protocol.RequestHeader, request *protocol.SubmitChecks
}
}
//更新审核人提交状态
if p.SubmitCheckStatus == protocol.Submiting {
//更新
if err = utils.ExecuteSQLWithOrmer(o, UpdateCommitStatus, protocol.Submited, request.ChanceId, p.Id); err != nil {
log.Error(err)
o.Rollback()
return
}
//插入一条数据
if err = utils.ExecuteSQLWithOrmer(o, UpdateCommitStatus, protocol.Submited, request.ChanceId, p.Id); err != nil {
log.Error(err)
o.Rollback()
return
}
//插入一条数据
o.Commit()
//更新机会筛选状态
... ...