正在显示
4 个修改的文件
包含
8 行增加
和
6 行删除
@@ -222,7 +222,7 @@ func (c *AuditController) ChanceCheckResultPassOrNo() { | @@ -222,7 +222,7 @@ func (c *AuditController) ChanceCheckResultPassOrNo() { | ||
222 | }() | 222 | }() |
223 | type Parameter struct { | 223 | type Parameter struct { |
224 | ChanceId string `json:"chance_id"` | 224 | ChanceId string `json:"chance_id"` |
225 | - Status int `json:"status"` | 225 | + Status int `json:"status"` //【1:通过】【2:不通过】 |
226 | } | 226 | } |
227 | var param Parameter | 227 | var param Parameter |
228 | if err := json.Unmarshal(c.Ctx.Input.RequestBody, ¶m); err != nil { | 228 | if err := json.Unmarshal(c.Ctx.Input.RequestBody, ¶m); err != nil { |
@@ -7,7 +7,7 @@ import ( | @@ -7,7 +7,7 @@ import ( | ||
7 | ) | 7 | ) |
8 | 8 | ||
9 | type ChanceCheckResult struct { | 9 | type ChanceCheckResult struct { |
10 | - Id int `orm:"column(id);pk"` | 10 | + Id int `orm:"column(id);auto"` |
11 | ChanceId int64 `orm:"column(chance_id)"` | 11 | ChanceId int64 `orm:"column(chance_id)"` |
12 | GroupId int64 `orm:"column(group_id);null"` | 12 | GroupId int64 `orm:"column(group_id);null"` |
13 | CheckPid int64 `orm:"column(check_pid)"` | 13 | CheckPid int64 `orm:"column(check_pid)"` |
@@ -306,6 +306,7 @@ type ChanceCheckResultData struct { | @@ -306,6 +306,7 @@ type ChanceCheckResultData struct { | ||
306 | CheckPid int64 `json:"check_pid"` | 306 | CheckPid int64 `json:"check_pid"` |
307 | CheckId int64 `json:"check_id"` | 307 | CheckId int64 `json:"check_id"` |
308 | CheckItem string `json:"check_item"` | 308 | CheckItem string `json:"check_item"` |
309 | + CheckItemTwo string `json:"check_item_two"` | ||
309 | CustomItemData map[string]string `json:"custom_item_data"` | 310 | CustomItemData map[string]string `json:"custom_item_data"` |
310 | AnswerYes int `json:"-"` | 311 | AnswerYes int `json:"-"` |
311 | AnswerNo int `json:"-"` | 312 | AnswerNo int `json:"-"` |
@@ -105,13 +105,14 @@ func buildChanceCheckResultData(checkResultData []models.ChanceCheckResult) (pro | @@ -105,13 +105,14 @@ func buildChanceCheckResultData(checkResultData []models.ChanceCheckResult) (pro | ||
105 | } | 105 | } |
106 | } | 106 | } |
107 | checkReusltSlice[i].CustomItemData = customItemsData | 107 | checkReusltSlice[i].CustomItemData = customItemsData |
108 | - if checkReusltSlice[i].CheckPid == 0 { | ||
109 | - checkReusltSlice[i].Total = fmt.Sprintf("是:%d 否:%d 不清楚:%d", | ||
110 | - checkReusltSlice[i].AnswerYes, checkReusltSlice[i].AnswerNo, checkReusltSlice[i].AnswerAny) | ||
111 | - } | 108 | + checkReusltSlice[i].Total = fmt.Sprintf("是:%d 否:%d 不清楚:%d", |
109 | + checkReusltSlice[i].AnswerYes, checkReusltSlice[i].AnswerNo, checkReusltSlice[i].AnswerAny) | ||
110 | + | ||
112 | if checkReusltSlice[i].CheckPid > 0 { | 111 | if checkReusltSlice[i].CheckPid > 0 { |
113 | //子集归并到父级 | 112 | //子集归并到父级 |
114 | pid := checkReusltSlice[i].CheckPid | 113 | pid := checkReusltSlice[i].CheckPid |
114 | + checkReusltSlice[i].CheckItemTwo = checkReusltSlice[i].CheckItem | ||
115 | + checkReusltSlice[i].CheckItem = checkResultMap[pid].CheckItem | ||
115 | checkResultMap[pid].Child = append(checkResultMap[pid].Child, checkReusltSlice[i]) | 116 | checkResultMap[pid].Child = append(checkResultMap[pid].Child, checkReusltSlice[i]) |
116 | } | 117 | } |
117 | } | 118 | } |
-
请 注册 或 登录 后发表评论