作者 tangxvhui

bug 修复

... ... @@ -396,7 +396,6 @@ func (c *AuditController) ChanceDataExcel() {
if err == nil && len(param.CreateTimeEndS) > 0 {
param.CreateTimeEnd = endTime.Unix() + 86399
}
fmt.Println(err, param.CreateTimeBegin, param.CreateTimeEnd)
if len(param.StatusS) > 0 {
param.Status, _ = strconv.Atoi(param.StatusS)
}
... ... @@ -409,7 +408,7 @@ func (c *AuditController) ChanceDataExcel() {
uid := c.GetUserId()
companyId := c.GetCompanyId()
param.PageIndex = 1
param.PageIndex = 10
param.PageSize = 10000
sourceData, excelHead := serveaudit.GetAuditListForExcel(param, companyId, uid)
xlsMaker := exceltool.NewExcelMaker()
xlsMaker.SetListHead(excelHead)
... ...
... ... @@ -7,6 +7,7 @@ import (
"oppmg/common/log"
"oppmg/models"
"oppmg/protocol"
"oppmg/utils"
"oppmg/utils/exceltool"
"oppmg/utils/signature"
"strconv"
... ... @@ -24,12 +25,12 @@ func GetAuditListForExcel(param protocol.RequestAuditList, companyid int64, user
_, datasql, cond := GetAuditListSql(param, companyid, userid, usercompany.Id)
var soureData []orm.Params
o := orm.NewOrm()
_, err = o.Raw(datasql, cond...).Values(&soureData)
err = utils.ExecuteQueryValue(&soureData, datasql, cond...)
if err != nil {
log.Error("获取机会数据失败err:%s", err)
return nil, nil
}
//https://web-open.fjmaimaimai.com/#/ 生产
// mmm-web-open-test.fjmaimaimai.com/
// SELECT a.id,a.department_id,a.audit_template_id,a.chance_type_id
... ...