|
@@ -79,3 +79,47 @@ func (this *NewCommonApiController) GetMobileTotalSexCount() {
|
79
|
79
|
"totalSex": totalSex,
|
80
|
80
|
})
|
81
|
81
|
}
|
|
82
|
+
|
|
83
|
+func (this *NewCommonApiController) GetMobileTotalInfectiousCout() {
|
|
84
|
+ startime, _ := this.GetInt64("startime")
|
|
85
|
+ fmt.Println("startime", startime)
|
|
86
|
+ endtime, _ := this.GetInt64("endtime")
|
|
87
|
+ fmt.Println("endtime", endtime)
|
|
88
|
+ adminUser := this.GetMobileAdminUserInfo()
|
|
89
|
+ orgid := adminUser.Org.Id
|
|
90
|
+ //统计透析总人数
|
|
91
|
+ total := service.GetPatientTotalCount(orgid)
|
|
92
|
+ //统计透析人数传染病所占比例
|
|
93
|
+ count, err := service.GetPatientInfectiousCount(orgid)
|
|
94
|
+ //统计其他
|
|
95
|
+ _, otherTotal, err := service.GetPatientOtherInfectious(orgid)
|
|
96
|
+ if err != nil {
|
|
97
|
+ this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeSystemError)
|
|
98
|
+ return
|
|
99
|
+ }
|
|
100
|
+ this.ServeSuccessJSON(map[string]interface{}{
|
|
101
|
+ "total": total,
|
|
102
|
+ "count": count,
|
|
103
|
+ "otherTotal": otherTotal,
|
|
104
|
+ })
|
|
105
|
+}
|
|
106
|
+
|
|
107
|
+func (this *NewCommonApiController) GetMobileTotalAgeCount() {
|
|
108
|
+ startime, _ := this.GetInt64("startime")
|
|
109
|
+ fmt.Println("开始时间", startime)
|
|
110
|
+ endtime, _ := this.GetInt64("endtime")
|
|
111
|
+ fmt.Println("结束时间", endtime)
|
|
112
|
+ adminUser := this.GetMobileAdminUserInfo()
|
|
113
|
+ orgid := adminUser.Org.Id
|
|
114
|
+ total := service.GetPatientTotalCount(orgid)
|
|
115
|
+ agecount, err := service.GetTotalAgeCount(orgid)
|
|
116
|
+ //two, err := service.GetTotalAgeCountTwo(orgid, startime, endtime)
|
|
117
|
+ if err != nil {
|
|
118
|
+ this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeSystemError)
|
|
119
|
+ return
|
|
120
|
+ }
|
|
121
|
+ this.ServeSuccessJSON(map[string]interface{}{
|
|
122
|
+ "total": total,
|
|
123
|
+ "ageCount": agecount,
|
|
124
|
+ })
|
|
125
|
+}
|