|
|
@@ -316,7 +316,7 @@ func SelfSupportForSchoolDataStatisticsExport(req md.SelfSupportForSchoolDataSta |
|
|
|
|
|
|
|
//查询出所有的设备 |
|
|
|
var deviceList []*model.Device |
|
|
|
err := db.Db.Where("enterprise_id != 0").Find(&deviceList) |
|
|
|
err := db.Db.Where("enterprise_id != 0").Asc("id").Find(&deviceList) |
|
|
|
if err != nil { |
|
|
|
logx.Error(err) |
|
|
|
println("<<<<SelfSupportForSchoolDataStatisticsExport2>>>>>1111Error:::", err.Error()) |
|
|
@@ -381,6 +381,7 @@ func SelfSupportForSchoolDataStatisticsExport(req md.SelfSupportForSchoolDataSta |
|
|
|
xlsx.SetSheetRow("", "A1", &titleList) |
|
|
|
sheetIndex := 2 //第一个表是模板表 |
|
|
|
for k, v := range data { |
|
|
|
xlsx.SetSheetRow(k, "A1"+strconv.Itoa(1), &[]interface{}{"商 家 分 餐 数 据 统 计 表 " + "(" + req.StartDate + "至" + req.EndDate + ")"}) |
|
|
|
if k == "" { |
|
|
|
k = "未知" |
|
|
|
} |
|
|
|