正在显示
4 个修改的文件
包含
13 行增加
和
4 行删除
@@ -79,8 +79,13 @@ func (s SelfChecks) Static() SelfCheckResults { | @@ -79,8 +79,13 @@ func (s SelfChecks) Static() SelfCheckResults { | ||
79 | return []selfCheckResult{} | 79 | return []selfCheckResult{} |
80 | } | 80 | } |
81 | results := []selfCheckResult{{Item: "是"}, {Item: "否"}, {Item: "不清楚"}} | 81 | results := []selfCheckResult{{Item: "是"}, {Item: "否"}, {Item: "不清楚"}} |
82 | + var gIdx int64 | ||
82 | for i := range s { | 83 | for i := range s { |
83 | check := (s)[i] | 84 | check := (s)[i] |
85 | + if gIdx == check.GroupId { | ||
86 | + continue | ||
87 | + } | ||
88 | + gIdx = check.GroupId | ||
84 | for k := range results { | 89 | for k := range results { |
85 | if strings.EqualFold(results[k].Item, strings.TrimSpace(check.Answer)) { | 90 | if strings.EqualFold(results[k].Item, strings.TrimSpace(check.Answer)) { |
86 | results[k].Total = results[k].Total + 1 | 91 | results[k].Total = results[k].Total + 1 |
@@ -549,6 +549,9 @@ func GetChanceSelfChecks(chanceInfo *models.Chance) []protocol.SelfCheck { | @@ -549,6 +549,9 @@ func GetChanceSelfChecks(chanceInfo *models.Chance) []protocol.SelfCheck { | ||
549 | switch chanceInfo.CheckResultStatus { | 549 | switch chanceInfo.CheckResultStatus { |
550 | case protocol.None: //未提交筛查结果 | 550 | case protocol.None: //未提交筛查结果 |
551 | utils.JsonUnmarshal(chanceInfo.SelfChecks, &selfChecks) | 551 | utils.JsonUnmarshal(chanceInfo.SelfChecks, &selfChecks) |
552 | + if len(selfChecks) != 0 { | ||
553 | + protocol.SelfChecks(selfChecks).SetSelfChecksLevel1ByRule() | ||
554 | + } | ||
552 | break | 555 | break |
553 | case protocol.Waiting: //未通过审核的返回所有筛查结果(一级/二级) | 556 | case protocol.Waiting: //未通过审核的返回所有筛查结果(一级/二级) |
554 | utils.JsonUnmarshal(chanceInfo.CheckResult, &selfChecks) | 557 | utils.JsonUnmarshal(chanceInfo.CheckResult, &selfChecks) |
@@ -1659,7 +1659,11 @@ func MyApproveChance(header *protocol.RequestHeader, request *protocol.MyApprove | @@ -1659,7 +1659,11 @@ func MyApproveChance(header *protocol.RequestHeader, request *protocol.MyApprove | ||
1659 | commItem.Score = approveData.Score | 1659 | commItem.Score = approveData.Score |
1660 | } | 1660 | } |
1661 | } | 1661 | } |
1662 | - commItem.SelfCheckResult = protocol.NewSelfChecks(ormItem.SelfChecks).Static() //自查统计数据 | 1662 | + |
1663 | + selfChecks := protocol.NewSelfChecks(ormItem.SelfChecks) | ||
1664 | + selfChecks.SetSelfChecksLevel1ByRule() | ||
1665 | + commItem.SelfCheckResult = selfChecks.Static() //自查统计数据 | ||
1666 | + | ||
1663 | rsp.List = append(rsp.List, commItem) | 1667 | rsp.List = append(rsp.List, commItem) |
1664 | } | 1668 | } |
1665 | return | 1669 | return |
@@ -144,15 +144,12 @@ func SubmitChecks(header *protocol.RequestHeader, request *protocol.SubmitChecks | @@ -144,15 +144,12 @@ func SubmitChecks(header *protocol.RequestHeader, request *protocol.SubmitChecks | ||
144 | } | 144 | } |
145 | } | 145 | } |
146 | //更新审核人提交状态 | 146 | //更新审核人提交状态 |
147 | - if p.SubmitCheckStatus == protocol.Submiting { | ||
148 | - //更新 | ||
149 | if err = utils.ExecuteSQLWithOrmer(o, UpdateCommitStatus, protocol.Submited, request.ChanceId, p.Id); err != nil { | 147 | if err = utils.ExecuteSQLWithOrmer(o, UpdateCommitStatus, protocol.Submited, request.ChanceId, p.Id); err != nil { |
150 | log.Error(err) | 148 | log.Error(err) |
151 | o.Rollback() | 149 | o.Rollback() |
152 | return | 150 | return |
153 | } | 151 | } |
154 | //插入一条数据 | 152 | //插入一条数据 |
155 | - } | ||
156 | o.Commit() | 153 | o.Commit() |
157 | 154 | ||
158 | //更新机会筛选状态 | 155 | //更新机会筛选状态 |
-
请 注册 或 登录 后发表评论