作者 tangxvhui

bug 修复

#app的名称
appname = ability
#运行模式
runmode =${RUN_MODE||dev}
runmode =${RUN_MODE||test}
#是否自动渲染页面
autorender = false
#是否复制请求body
... ...
... ... @@ -125,7 +125,7 @@ type ChanceSelfCheckData struct {
func (m *Chance) GetSelfCheckData() []ChanceSelfCheckData {
var data []ChanceSelfCheckData
json.Unmarshal([]byte(m.CheckResult), &data)
json.Unmarshal([]byte(m.SelfChecks), &data)
return data
}
... ...
... ... @@ -445,16 +445,13 @@ func getAuditFlowLog(chanceid int64) ([]protocol.ChanceFlowLog, error) {
func getChanceSelfChecks(chanceInfo *models.Chance) []ChanceSelfCheckData {
selfChecks := []models.ChanceSelfCheckData{}
switch chanceInfo.CheckResultStatus {
case models.CheckResultStatusNone: //未提交筛查结果
case models.CheckResultStatusNone, models.CheckResultStatusWait: //未提交筛查结果,未通过审核的返回所有筛查结果(一级/二级)
selfChecks = chanceInfo.GetSelfCheckData()
if len(selfChecks) != 0 {
models.ChanceSelfCheckList(selfChecks).SetSelfChecksLevel1ByRule()
}
break
case models.CheckResultStatusWait: //未通过审核的返回所有筛查结果(一级/二级)
selfChecks = chanceInfo.GetCheckResultData()
break
default: //审核通过/不通过只显示一级
case models.CheckResultStatusPass, models.CheckResultStatusNOPass: //审核通过/不通过只显示一级
checkResult := chanceInfo.GetCheckResultData()
for i := 0; i < len(checkResult); i++ {
if selfChecks[i].ParentId == 0 {
... ... @@ -469,6 +466,9 @@ func getChanceSelfChecks(chanceInfo *models.Chance) []ChanceSelfCheckData {
Title: selfChecks[i].CheckItem,
Result: selfChecks[i].Answer,
}
if selfChecks[i].Answer == "否" && len(selfChecks[i].Reason) > 0 {
d.Result = fmt.Sprintf("%s,理由:%s", selfChecks[i].Answer, selfChecks[i].Reason)
}
checkData = append(checkData, d)
}
return checkData
... ...