|
@@ -74,10 +74,7 @@ func ReportProduceDownload(c *gin.Context, apictx *ApiSession) (interface{}, err
|
|
|
Border: border,
|
|
|
})
|
|
|
offset := 0
|
|
|
- info := model.Setting{}
|
|
|
- repo.RepoSeachDoc(apictx.CreateRepoCtx(), &repo.DocSearchOptions{
|
|
|
- CollectName: "infos",
|
|
|
- }, &info)
|
|
|
+ companyName := getCompanyName(apictx)
|
|
|
|
|
|
var budgetCount float64 = 0
|
|
|
var realCount float64 = 0
|
|
@@ -87,7 +84,7 @@ func ReportProduceDownload(c *gin.Context, apictx *ApiSession) (interface{}, err
|
|
|
produceExcel := NewReportProduceExcel(f)
|
|
|
produceExcel.Content = &produce
|
|
|
|
|
|
- produceExcel.Title = fmt.Sprintf("%s加工单", info.CompanyName)
|
|
|
+ produceExcel.Title = fmt.Sprintf("%s加工单", companyName)
|
|
|
//设置对应的数据
|
|
|
produceExcel.Offset = offset
|
|
|
produceExcel.Draws()
|
|
@@ -163,11 +160,7 @@ func ReportPurchaseDownload(c *gin.Context, apictx *ApiSession) (interface{}, er
|
|
|
Border: border,
|
|
|
})
|
|
|
offset := 0
|
|
|
- info := model.Setting{}
|
|
|
- repo.RepoSeachDoc(apictx.CreateRepoCtx(), &repo.DocSearchOptions{
|
|
|
- CollectName: "infos",
|
|
|
- }, &info)
|
|
|
-
|
|
|
+ companyName := getCompanyName(apictx)
|
|
|
var budgetCount float64 = 0
|
|
|
var realCount float64 = 0
|
|
|
var row int = 0
|
|
@@ -175,7 +168,7 @@ func ReportPurchaseDownload(c *gin.Context, apictx *ApiSession) (interface{}, er
|
|
|
for _, purchase := range purchases {
|
|
|
purchaseExcel := NewReportPurchaseExcel(f)
|
|
|
purchaseExcel.Content = &purchase
|
|
|
- purchaseExcel.Title = fmt.Sprintf("%s原材料采购单", info.CompanyName)
|
|
|
+ purchaseExcel.Title = fmt.Sprintf("%s原材料采购单", companyName)
|
|
|
//设置对应的数据
|
|
|
purchaseExcel.Offset = offset
|
|
|
purchaseExcel.Draws()
|