package admin_api_controllers import ( "XT_Admin_Api/service" ) type AnalysisAPIController struct { AdminBaseAPIAuthController } func (this *AnalysisAPIController) HomeStatistics() { customCount, _ := service.GetCustomCount() curYearCustomCount, _ := service.GetCurYearCustomCount() curYearStandCustomCount, _ := service.GetCurYearStandCustomCount() curYearDeluxeCustomCount, _ := service.GetCurYearDeluxeCustomCount() curYearProfessionalCustomCount, _ := service.GetCurYearProfessionalCustomCount() curYearOtherCustomCount, _ := service.GetCurYearOtherCustomCount() curYearContractPriceCount, _ := service.GetCurYearContractPriceCount() curYearSoftwarePriceCount, _ := service.GetCurYearSoftwarePriceCount() curYearHardwarePriceCount, _ := service.GetCurYearHardwarePriceCount() curYearPaymentCollectionSumamtPriceCount, _ := service.GetCurYearPaymentCollectionSumamtPriceCount() curYearPaymentCollectionSoftwarePriceCount, _ := service.GetCurYearPaymentCollectionSoftwarePriceCount() curYearPaymentCollectionHardwarePriceCount, _ := service.GetCurYearPaymentCollectionHardwarePriceCount() oneMonthCount := service.GetOneMonthEndDate() threeMontheCount := service.GetThreeMonthEndDate() _, curYearRenewalCount := service.GetCurYearRenewal() _, curYearPaymentCollectionCount := service.GetCurYearPaymentCollection() curYearWaitPutIntoEffectCount, _ := service.GetCurYearWaitPutIntoEffect() curYearWaitAbutmentCount, _ := service.GetCurYearWaitAbutment() cure := service.GetCurePrice() this.ServeSuccessJSON(map[string]interface{}{ "customCount": customCount, "curYearCustomCount": curYearCustomCount, "curYearStandCustomCount": curYearStandCustomCount, "curYearDeluxeCustomCount": curYearDeluxeCustomCount, "curYearProfessionalCustomCount": curYearProfessionalCustomCount, "curYearOtherCustomCount": curYearOtherCustomCount, "curYearContractPriceCount": curYearContractPriceCount, "curYearSoftwarePriceCount": curYearSoftwarePriceCount, "curYearHardwarePriceCount": curYearHardwarePriceCount, "curYearPaymentCollectionSumamtPriceCount": curYearPaymentCollectionSumamtPriceCount, "curYearPaymentCollectionSoftwarePriceCount": curYearPaymentCollectionSoftwarePriceCount, "curYearPaymentCollectionHardwarePriceCount": curYearPaymentCollectionHardwarePriceCount, "oneMonthCount": oneMonthCount, "threeMontheCount": threeMontheCount, "curYearRenewalCount": curYearRenewalCount, "curYearPaymentCollectionCount": curYearPaymentCollectionCount, "curYearWaitPutIntoEffectCount": curYearWaitPutIntoEffectCount, "curYearWaitAbutmentCount": curYearWaitAbutmentCount, "cure": cure, }) }