...
|
...
|
@@ -115,7 +115,11 @@ func GetAuditListForExcel(param protocol.RequestAuditList, companyid int64, user |
|
|
err := json.Unmarshal([]byte(soureContentJson), &soureContentData)
|
|
|
if err == nil {
|
|
|
for ii := range soureContentData {
|
|
|
soureContentText.WriteString(soureContentData[ii].Label + ":" + soureContentData[ii].CurrentValue + ",")
|
|
|
valueString := strings.TrimSpace(soureContentData[ii].CurrentValue)
|
|
|
if len(valueString) == 0 {
|
|
|
continue
|
|
|
}
|
|
|
soureContentText.WriteString(soureContentData[ii].Label + ":" + valueString + ",")
|
|
|
}
|
|
|
}
|
|
|
soureData[i]["source_content"] = soureContentText.String()
|
...
|
...
|
@@ -127,9 +131,26 @@ func GetAuditListForExcel(param protocol.RequestAuditList, companyid int64, user |
|
|
frontHost = "http://mmm-web-open-test.fjmaimaimai.com/#/ability/opportunity/export-detail"
|
|
|
}
|
|
|
soureData[i]["media"] = fmt.Sprintf("%s?chance_id=%v&check_sum=%s", frontHost, soureData[i]["id"], signString)
|
|
|
if soureData[i]["review_status"] == "0" || soureData[i]["review_status"] == "1" {
|
|
|
|
|
|
if int8(reviewStatus) != models.ChanceReviewStatusYes {
|
|
|
soureData[i]["approve_time"] = ""
|
|
|
}
|
|
|
//整合自查内容列数据
|
|
|
checkResultJson := fmt.Sprint(soureData[i]["check_result"])
|
|
|
selfChecksJson := fmt.Sprint(soureData[i]["self_checks"])
|
|
|
checkResultStatusS := fmt.Sprint(soureData[i]["check_result_status"])
|
|
|
checkResultStatus, _ := strconv.Atoi(checkResultStatusS)
|
|
|
chanceM := &models.Chance{
|
|
|
CheckResult: checkResultJson,
|
|
|
SelfChecks: selfChecksJson,
|
|
|
CheckResultStatus: int8(checkResultStatus),
|
|
|
}
|
|
|
selfCheckData := getChanceSelfChecks(chanceM)
|
|
|
var selfCheckString strings.Builder
|
|
|
for ii := range selfCheckData {
|
|
|
selfCheckString.WriteString(selfCheckData[ii].Title + ":" + selfCheckData[ii].Result + ";")
|
|
|
}
|
|
|
soureData[i]["self_checks"] = selfCheckString.String()
|
|
|
}
|
|
|
excelhead := []exceltool.ExcelHead{
|
|
|
exceltool.ExcelHead{Key: "type", Name: "类型"},
|
...
|
...
|
@@ -147,6 +168,7 @@ func GetAuditListForExcel(param protocol.RequestAuditList, companyid int64, user |
|
|
exceltool.ExcelHead{Key: "source_content", Name: "内容"},
|
|
|
exceltool.ExcelHead{Key: "media", Name: "视频/图片/语音"},
|
|
|
exceltool.ExcelHead{Key: "discovery_score", Name: "发现得分"},
|
|
|
exceltool.ExcelHead{Key: "self_checks", Name: "自查内容"},
|
|
|
}
|
|
|
return soureData, excelhead
|
|
|
} |
...
|
...
|
|