analysis_api_controller.go 2.8KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  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. }