analysis_api_controller.go 2.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. package admin_api_controllers
  2. import (
  3. "XT_Admin_Api/service"
  4. )
  5. type AnalysisAPIController struct {
  6. AdminBaseAPIAuthController
  7. }
  8. func (this *AnalysisAPIController) HomeStatistics() {
  9. customCount, _ := service.GetCustomCount()
  10. curYearCustomCount, _ := service.GetCurYearCustomCount()
  11. curYearStandCustomCount, _ := service.GetCurYearStandCustomCount()
  12. curYearDeluxeCustomCount, _ := service.GetCurYearDeluxeCustomCount()
  13. curYearProfessionalCustomCount, _ := service.GetCurYearProfessionalCustomCount()
  14. curYearOtherCustomCount, _ := service.GetCurYearOtherCustomCount()
  15. curYearContractPriceCount, _ := service.GetCurYearContractPriceCount()
  16. curYearSoftwarePriceCount, _ := service.GetCurYearSoftwarePriceCount()
  17. curYearHardwarePriceCount, _ := service.GetCurYearHardwarePriceCount()
  18. curYearPaymentCollectionSumamtPriceCount, _ := service.GetCurYearPaymentCollectionSumamtPriceCount()
  19. curYearPaymentCollectionSoftwarePriceCount, _ := service.GetCurYearPaymentCollectionSoftwarePriceCount()
  20. curYearPaymentCollectionHardwarePriceCount, _ := service.GetCurYearPaymentCollectionHardwarePriceCount()
  21. oneMonthCount := service.GetOneMonthEndDate()
  22. threeMontheCount := service.GetThreeMonthEndDate()
  23. _, curYearRenewalCount := service.GetCurYearRenewal()
  24. _, curYearPaymentCollectionCount := service.GetCurYearPaymentCollection()
  25. curYearWaitPutIntoEffectCount, _ := service.GetCurYearWaitPutIntoEffect()
  26. curYearWaitAbutmentCount, _ := service.GetCurYearWaitAbutment()
  27. cure := service.GetCurePrice()
  28. this.ServeSuccessJSON(map[string]interface{}{
  29. "customCount": customCount,
  30. "curYearCustomCount": curYearCustomCount,
  31. "curYearStandCustomCount": curYearStandCustomCount,
  32. "curYearDeluxeCustomCount": curYearDeluxeCustomCount,
  33. "curYearProfessionalCustomCount": curYearProfessionalCustomCount,
  34. "curYearOtherCustomCount": curYearOtherCustomCount,
  35. "curYearContractPriceCount": curYearContractPriceCount,
  36. "curYearSoftwarePriceCount": curYearSoftwarePriceCount,
  37. "curYearHardwarePriceCount": curYearHardwarePriceCount,
  38. "curYearPaymentCollectionSumamtPriceCount": curYearPaymentCollectionSumamtPriceCount,
  39. "curYearPaymentCollectionSoftwarePriceCount": curYearPaymentCollectionSoftwarePriceCount,
  40. "curYearPaymentCollectionHardwarePriceCount": curYearPaymentCollectionHardwarePriceCount,
  41. "oneMonthCount": oneMonthCount,
  42. "threeMontheCount": threeMontheCount,
  43. "curYearRenewalCount": curYearRenewalCount,
  44. "curYearPaymentCollectionCount": curYearPaymentCollectionCount,
  45. "curYearWaitPutIntoEffectCount": curYearWaitPutIntoEffectCount,
  46. "curYearWaitAbutmentCount": curYearWaitAbutmentCount,
  47. "cure": cure,
  48. })
  49. }