正在显示
1 个修改的文件
包含
26 行增加
和
26 行删除
@@ -283,7 +283,7 @@ type chanceCheckResultTotal struct { | @@ -283,7 +283,7 @@ type chanceCheckResultTotal struct { | ||
283 | Child []*chanceCheckResultTotal | 283 | Child []*chanceCheckResultTotal |
284 | } | 284 | } |
285 | 285 | ||
286 | -//collectChanceCheckResultData 汇总机会自查内容筛选结果 | 286 | +//collectChanceCheckResultData 汇总机会自查内容筛选结果(只要一级) |
287 | func collectChanceCheckResultData(checkResultData []models.ChanceCheckResult) []models.ChanceSelfCheckData { | 287 | func collectChanceCheckResultData(checkResultData []models.ChanceCheckResult) []models.ChanceSelfCheckData { |
288 | checkResultMap := map[int64]*chanceCheckResultTotal{} | 288 | checkResultMap := map[int64]*chanceCheckResultTotal{} |
289 | checkReusltSlice := []*chanceCheckResultTotal{} | 289 | checkReusltSlice := []*chanceCheckResultTotal{} |
@@ -318,15 +318,15 @@ func collectChanceCheckResultData(checkResultData []models.ChanceCheckResult) [] | @@ -318,15 +318,15 @@ func collectChanceCheckResultData(checkResultData []models.ChanceCheckResult) [] | ||
318 | } | 318 | } |
319 | } | 319 | } |
320 | //构建层级关系 | 320 | //构建层级关系 |
321 | - for i := range checkReusltSlice { | ||
322 | - if checkReusltSlice[i].CheckPid == 0 { | ||
323 | - continue | ||
324 | - } | ||
325 | - pid := checkReusltSlice[i].CheckPid | ||
326 | - if _, ok := checkResultMap[pid]; ok { | ||
327 | - checkResultMap[pid].Child = append(checkResultMap[pid].Child, checkReusltSlice[i]) | ||
328 | - } | ||
329 | - } | 321 | + // for i := range checkReusltSlice { |
322 | + // if checkReusltSlice[i].CheckPid == 0 { | ||
323 | + // continue | ||
324 | + // } | ||
325 | + // pid := checkReusltSlice[i].CheckPid | ||
326 | + // if _, ok := checkResultMap[pid]; ok { | ||
327 | + // checkResultMap[pid].Child = append(checkResultMap[pid].Child, checkReusltSlice[i]) | ||
328 | + // } | ||
329 | + // } | ||
330 | var selfCheckData []models.ChanceSelfCheckData | 330 | var selfCheckData []models.ChanceSelfCheckData |
331 | for i := range checkReusltSlice { | 331 | for i := range checkReusltSlice { |
332 | if checkReusltSlice[i].CheckPid > 0 { | 332 | if checkReusltSlice[i].CheckPid > 0 { |
@@ -346,22 +346,22 @@ func collectChanceCheckResultData(checkResultData []models.ChanceCheckResult) [] | @@ -346,22 +346,22 @@ func collectChanceCheckResultData(checkResultData []models.ChanceCheckResult) [] | ||
346 | dd.Answer = "不清楚" | 346 | dd.Answer = "不清楚" |
347 | } | 347 | } |
348 | selfCheckData = append(selfCheckData, dd) | 348 | selfCheckData = append(selfCheckData, dd) |
349 | - for _, childdata := range checkReusltSlice[i].Child { | ||
350 | - dd := models.ChanceSelfCheckData{ | ||
351 | - CheckItem: childdata.CheckItem, | ||
352 | - GroupId: childdata.GroupId, | ||
353 | - } | ||
354 | - if childdata.AnswerNo > 0 { | ||
355 | - dd.Answer = "否" | ||
356 | - } | ||
357 | - if childdata.AnswerYes > 0 && childdata.AnswerNo == 0 && childdata.AnswerAny == 0 { | ||
358 | - dd.Answer = "是" | ||
359 | - } | ||
360 | - if childdata.AnswerNo == 0 && childdata.AnswerAny > 0 { | ||
361 | - dd.Answer = "不清楚" | ||
362 | - } | ||
363 | - selfCheckData = append(selfCheckData, dd) | ||
364 | - } | 349 | + // for _, childdata := range checkReusltSlice[i].Child { |
350 | + // dd := models.ChanceSelfCheckData{ | ||
351 | + // CheckItem: childdata.CheckItem, | ||
352 | + // GroupId: childdata.GroupId, | ||
353 | + // } | ||
354 | + // if childdata.AnswerNo > 0 { | ||
355 | + // dd.Answer = "否" | ||
356 | + // } | ||
357 | + // if childdata.AnswerYes > 0 && childdata.AnswerNo == 0 && childdata.AnswerAny == 0 { | ||
358 | + // dd.Answer = "是" | ||
359 | + // } | ||
360 | + // if childdata.AnswerNo == 0 && childdata.AnswerAny > 0 { | ||
361 | + // dd.Answer = "不清楚" | ||
362 | + // } | ||
363 | + // selfCheckData = append(selfCheckData, dd) | ||
364 | + // } | ||
365 | } | 365 | } |
366 | return selfCheckData | 366 | return selfCheckData |
367 | } | 367 | } |
-
请 注册 或 登录 后发表评论