...
|
...
|
@@ -116,12 +116,22 @@ type ChanceSelfCheckData struct { |
|
|
CheckItem string `json:"checkItem"`
|
|
|
GroupId int64 `json:"groupId"`
|
|
|
Answer string `json::"answer"`
|
|
|
Id int `json:"id"`
|
|
|
ParentId int `json:"parentId"`
|
|
|
}
|
|
|
|
|
|
func (m *Chance) GetSelfCheckData() []ChanceSelfCheckData {
|
|
|
var data []ChanceSelfCheckData
|
|
|
if m.CheckResultStatus > CheckResultStatusWait {
|
|
|
json.Unmarshal([]byte(m.CheckResult), &data)
|
|
|
var temp []ChanceSelfCheckData
|
|
|
json.Unmarshal([]byte(m.CheckResult), &temp)
|
|
|
//只要一级的数据
|
|
|
for i := range temp {
|
|
|
if temp[i].ParentId > 0 {
|
|
|
continue
|
|
|
}
|
|
|
data = append(data, temp[i])
|
|
|
}
|
|
|
} else {
|
|
|
json.Unmarshal([]byte(m.SelfChecks), &data)
|
|
|
}
|
...
|
...
|
|