Compare commits
No commits in common. "94c4a8fae82277c4601847a20b1959fb08b6c4ec" and "c7e1bad7ef9da670d349dcaef29f65ab70a5ff03" have entirely different histories.
94c4a8fae8
...
c7e1bad7ef
|
|
@ -17,7 +17,8 @@ var IrregularTaskToolIndexMap = map[string]string{
|
|||
"knowledgeBase": "knowledge_qa",
|
||||
"zltxOrderStatistics": "account_statistics",
|
||||
"normalChat": "chat",
|
||||
"zltxOrderAfterSaleSupplier": "after_sales_supplier",
|
||||
"zltxOrderAfterSaleReseller": "after_sales_reseller",
|
||||
"zltxOrderAfterSaleResellerBatch": "after_sales_reseller_batch",
|
||||
"zltxOrderAfterSaleSupplier": "after_sale_supplier",
|
||||
"zltxOrderAfterSaleReseller": "after_sale_reseller",
|
||||
"zltxOrderAfterSaleResellerBatch": "after_sale_reseller_batch",
|
||||
"zltxLossRiskSearch": "loss_order_direct",
|
||||
}
|
||||
|
|
|
|||
|
|
@ -189,53 +189,53 @@ func (b *BbxtTools) StatisOursProductLossSum(ctx context.Context, now time.Time,
|
|||
report = make([]*ReportRes, 3)
|
||||
timeCh := now.Format("1月2日15点")
|
||||
//总量生成excel
|
||||
if len(total) > 0 {
|
||||
filePath := b.cacheDir + "/kshj_total" + fmt.Sprintf("%d%d", time.Now().Unix(), rand.Intn(1000)) + ".xlsx"
|
||||
err = b.SimpleFillExcelWithTitle(b.excelTempDir+"/"+"kshj_total.xlsx", filePath, total, "")
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
report[0] = &ReportRes{
|
||||
ReportName: "分销商负利润统计",
|
||||
Title: "截至" + timeCh + "利润累计亏损" + fmt.Sprintf("%.2f", totalSum),
|
||||
Path: filePath,
|
||||
Data: total,
|
||||
}
|
||||
}
|
||||
|
||||
if len(gt) > 0 {
|
||||
filePath := b.cacheDir + "/kshj_gt" + fmt.Sprintf("%d%d", time.Now().Unix(), rand.Intn(1000)) + ".xlsx"
|
||||
title := "截至" + timeCh + "亏损500以上的分销商和产品"
|
||||
err = b.resellerDetailFillExcelV2(b.excelTempDir+"/"+"kshj_gt.xlsx", filePath, gt, title)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
report[1] = &ReportRes{
|
||||
ReportName: "负利润分析(亏损500以上)",
|
||||
Title: "截至" + timeCh + "亏损500以上利润累计亏损" + fmt.Sprintf("%.2f", totalSum500),
|
||||
Path: filePath,
|
||||
Data: total,
|
||||
}
|
||||
}
|
||||
|
||||
//if len(totalDetail) > 0 {
|
||||
// err = initFunc(ctx, now, totalDetail, b)
|
||||
//if len(total) > 0 {
|
||||
// filePath := b.cacheDir + "/kshj_total" + fmt.Sprintf("%d%d", time.Now().Unix(), rand.Intn(1000)) + ".xlsx"
|
||||
// err = b.SimpleFillExcelWithTitle(b.excelTempDir+"/"+"kshj_total.xlsx", filePath, total, "")
|
||||
// if err != nil {
|
||||
// return
|
||||
// }
|
||||
// filePath := b.cacheDir + "/kshj_total_ana" + fmt.Sprintf("%d%d", time.Now().Unix(), rand.Intn(1000)) + ".xlsx"
|
||||
// title := "截至" + timeCh + "亏损100以上的分销商&产品负利润原因"
|
||||
// err = b.resellerDetailFillExcelAna(b.excelTempDir+"/"+"kshj_total_ana.xlsx", filePath, totalDetail, title)
|
||||
// if err != nil {
|
||||
// return
|
||||
// }
|
||||
// report[2] = &ReportRes{
|
||||
// ReportName: "负利润分析(亏损100以上)",
|
||||
// Title: "截至" + timeCh + "亏损100以上利润原因",
|
||||
// report[0] = &ReportRes{
|
||||
// ReportName: "分销商负利润统计",
|
||||
// Title: "截至" + timeCh + "利润累计亏损" + fmt.Sprintf("%.2f", totalSum),
|
||||
// Path: filePath,
|
||||
// Data: total,
|
||||
// }
|
||||
//}
|
||||
|
||||
//if len(gt) > 0 {
|
||||
// filePath := b.cacheDir + "/kshj_gt" + fmt.Sprintf("%d%d", time.Now().Unix(), rand.Intn(1000)) + ".xlsx"
|
||||
// title := "截至" + timeCh + "亏损500以上的分销商和产品"
|
||||
// err = b.resellerDetailFillExcelV2(b.excelTempDir+"/"+"kshj_gt.xlsx", filePath, gt, title)
|
||||
// if err != nil {
|
||||
// return
|
||||
// }
|
||||
// report[1] = &ReportRes{
|
||||
// ReportName: "负利润分析(亏损500以上)",
|
||||
// Title: "截至" + timeCh + "亏损500以上利润累计亏损" + fmt.Sprintf("%.2f", totalSum500),
|
||||
// Path: filePath,
|
||||
// Data: total,
|
||||
// }
|
||||
//}
|
||||
|
||||
if len(totalDetail) > 0 {
|
||||
err = initFunc(ctx, now, totalDetail, b)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
filePath := b.cacheDir + "/kshj_total_ana" + fmt.Sprintf("%d%d", time.Now().Unix(), rand.Intn(1000)) + ".xlsx"
|
||||
title := "截至" + timeCh + "亏损100以上的分销商&产品负利润原因"
|
||||
err = b.resellerDetailFillExcelAna(b.excelTempDir+"/"+"kshj_total_ana.xlsx", filePath, totalDetail, title)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
report[2] = &ReportRes{
|
||||
ReportName: "负利润分析(亏损100以上)",
|
||||
Title: "截至" + timeCh + "亏损100以上利润原因",
|
||||
Path: filePath,
|
||||
Data: total,
|
||||
}
|
||||
}
|
||||
return report, nil
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue