|
|
package audit
|
|
|
|
|
|
import (
|
|
|
"encoding/json"
|
|
|
"fmt"
|
|
|
"oppmg/common/log"
|
|
|
"oppmg/models"
|
...
|
...
|
@@ -244,15 +243,7 @@ func ChanceCheckResultPass(chanceId int64, companyId int64) error { |
|
|
return protocol.NewErrWithMessage("1")
|
|
|
}
|
|
|
chanceData.CheckResultStatus = models.CheckResultStatusPass
|
|
|
checkResultData, err := models.GetChanceCheckResultByChancce(chanceId)
|
|
|
if err != nil {
|
|
|
log.Error("未找到相应的筛选结果")
|
|
|
}
|
|
|
collectCheckData := collectChanceCheckResultData(checkResultData)
|
|
|
if jsonBt, err := json.Marshal(collectCheckData); err == nil {
|
|
|
chanceData.CheckResult = string(jsonBt)
|
|
|
}
|
|
|
err = models.UpdateChanceById(chanceData, []string{"CheckResultStatus", "CheckResult"})
|
|
|
err = models.UpdateChanceById(chanceData, []string{"CheckResultStatus"})
|
|
|
if err != nil {
|
|
|
log.Error("更新chance数据失败,err;%s", err)
|
|
|
}
|
...
|
...
|
@@ -274,15 +265,7 @@ func ChanceCheckResultNoPass(chanceId int64, companyId int64) error { |
|
|
return protocol.NewErrWithMessage("1")
|
|
|
}
|
|
|
chanceData.CheckResultStatus = models.CheckResultStatusNOPass
|
|
|
checkResultData, err := models.GetChanceCheckResultByChancce(chanceId)
|
|
|
if err != nil {
|
|
|
log.Error("未找到相应的筛选结果")
|
|
|
}
|
|
|
collectCheckData := collectChanceCheckResultData(checkResultData)
|
|
|
if jsonBt, err := json.Marshal(collectCheckData); err == nil {
|
|
|
chanceData.CheckResult = string(jsonBt)
|
|
|
}
|
|
|
err = models.UpdateChanceById(chanceData, []string{"CheckResultStatus", "CheckResult"})
|
|
|
err = models.UpdateChanceById(chanceData, []string{"CheckResultStatus"})
|
|
|
if err != nil {
|
|
|
log.Error("更新chance数据失败,err;%s", err)
|
|
|
}
|
...
|
...
|
|