正在显示
1 个修改的文件
包含
5 行增加
和
2 行删除
| @@ -310,11 +310,13 @@ func GetCheckQuestionsByChanceId(header *protocol.RequestHeader, id int64) (rsp | @@ -310,11 +310,13 @@ func GetCheckQuestionsByChanceId(header *protocol.RequestHeader, id int64) (rsp | ||
| 310 | var tmpGroupId int64 | 310 | var tmpGroupId int64 |
| 311 | var idx int = 0 //组内排序 | 311 | var idx int = 0 //组内排序 |
| 312 | var groupIdx = 0 //分组序号 | 312 | var groupIdx = 0 //分组序号 |
| 313 | + var parentId = 0 | ||
| 313 | for i := range selfChecks { | 314 | for i := range selfChecks { |
| 314 | c := selfChecks[i] | 315 | c := selfChecks[i] |
| 315 | if tmpGroupId != c.GroupId { | 316 | if tmpGroupId != c.GroupId { |
| 316 | groupIdx++ | 317 | groupIdx++ |
| 317 | idx = 0 | 318 | idx = 0 |
| 319 | + parentId = i + 1 | ||
| 318 | } | 320 | } |
| 319 | tmpGroupId = c.GroupId | 321 | tmpGroupId = c.GroupId |
| 320 | item := protocol.NewCheckQuestion(c.CheckItem, getQuestionTitle(groupIdx, idx, c.CheckItem), c.GroupId, protocol.CheckOptionsApprove) | 322 | item := protocol.NewCheckQuestion(c.CheckItem, getQuestionTitle(groupIdx, idx, c.CheckItem), c.GroupId, protocol.CheckOptionsApprove) |
| @@ -325,7 +327,7 @@ func GetCheckQuestionsByChanceId(header *protocol.RequestHeader, id int64) (rsp | @@ -325,7 +327,7 @@ func GetCheckQuestionsByChanceId(header *protocol.RequestHeader, id int64) (rsp | ||
| 325 | } | 327 | } |
| 326 | } | 328 | } |
| 327 | if item.Id == 0 { | 329 | if item.Id == 0 { |
| 328 | - item.Id, item.ParentId = genCustomizeQuestionId(i, idx, tmpGroupId) | 330 | + item.Id, item.ParentId = genCustomizeQuestionId(i, idx, int64(parentId)) |
| 329 | } | 331 | } |
| 330 | rsp = append(rsp, item) | 332 | rsp = append(rsp, item) |
| 331 | idx++ | 333 | idx++ |
| @@ -405,7 +407,8 @@ func getQuestionTitle(groupIdx int, idx int, title string) string { | @@ -405,7 +407,8 @@ func getQuestionTitle(groupIdx int, idx int, title string) string { | ||
| 405 | if idx == 0 { | 407 | if idx == 0 { |
| 406 | return fmt.Sprintf("%v、%v", groupIdx, title) | 408 | return fmt.Sprintf("%v、%v", groupIdx, title) |
| 407 | } | 409 | } |
| 408 | - return fmt.Sprintf("%v.%v、%v", groupIdx, idx, title) | 410 | + //return fmt.Sprintf("%v.%v、%v", groupIdx, idx, title) |
| 411 | + return fmt.Sprintf("%v", title) | ||
| 409 | } | 412 | } |
| 410 | 413 | ||
| 411 | //自定义id | 414 | //自定义id |
-
请 注册 或 登录 后发表评论