|
@@ -544,11 +544,10 @@ func (this *CommonApiController) GetTotalLapseCount() {
|
544
|
544
|
startime := this.GetString("startime")
|
545
|
545
|
startTimes, _ := time.ParseInLocation(timeLayout+" 15:04:05", startime+" 00:00:00", loc)
|
546
|
546
|
startnunix := startTimes.Unix()
|
547
|
|
- fmt.Println("开始时间---------------", startnunix)
|
548
|
547
|
endtime := this.GetString("endtime")
|
549
|
548
|
endtimes, _ := time.ParseInLocation(timeLayout+" 15:04:05", endtime+" 23:59:59", loc)
|
550
|
549
|
endunix := endtimes.Unix()
|
551
|
|
- fmt.Println("endunix==========", endunix)
|
|
550
|
+
|
552
|
551
|
//统计该机构的转出人数
|
553
|
552
|
patients, err := service.GetTotalRollOutPatients(orgid, startnunix, endunix)
|
554
|
553
|
//统计该机构转出病人
|
|
@@ -558,10 +557,14 @@ func (this *CommonApiController) GetTotalLapseCount() {
|
558
|
557
|
this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeSystemError)
|
559
|
558
|
return
|
560
|
559
|
}
|
|
560
|
+
|
|
561
|
+ //统计当前机构转出的人数
|
|
562
|
+ rollout, err := service.GetCountRollout(orgid, startnunix, endunix)
|
561
|
563
|
this.ServeSuccessJSON(map[string]interface{}{
|
562
|
564
|
"patients": patients,
|
563
|
565
|
"count": count,
|
564
|
566
|
"patienttwo": patienttwo,
|
|
567
|
+ "rollout": rollout,
|
565
|
568
|
})
|
566
|
569
|
}
|
567
|
570
|
|
|
@@ -2059,3 +2062,59 @@ func (this *CommonApiController) GetIdsListTwo() {
|
2059
|
2062
|
})
|
2060
|
2063
|
|
2061
|
2064
|
}
|
|
2065
|
+
|
|
2066
|
+func (this *CommonApiController) GetTreatModeList() {
|
|
2067
|
+
|
|
2068
|
+ start_time, _ := this.GetInt64("start_time")
|
|
2069
|
+ end_time, _ := this.GetInt64("end_time")
|
|
2070
|
+ adminUserInfo := this.GetAdminUserInfo()
|
|
2071
|
+ orgId := adminUserInfo.CurrentOrgId
|
|
2072
|
+ list, err := service.GetTreatModeList(start_time, end_time, orgId)
|
|
2073
|
+ if err != nil {
|
|
2074
|
+ this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeSystemError)
|
|
2075
|
+ return
|
|
2076
|
+ }
|
|
2077
|
+ this.ServeSuccessJSON(map[string]interface{}{
|
|
2078
|
+ "list": list,
|
|
2079
|
+ })
|
|
2080
|
+}
|
|
2081
|
+
|
|
2082
|
+func (this *CommonApiController) GetCountModeId() {
|
|
2083
|
+
|
|
2084
|
+ start_time, _ := this.GetInt64("start_time")
|
|
2085
|
+ end_time, _ := this.GetInt64("end_time")
|
|
2086
|
+ mode_id, _ := this.GetInt64("mode_id")
|
|
2087
|
+ adminUserInfo := this.GetAdminUserInfo()
|
|
2088
|
+ orgId := adminUserInfo.CurrentOrgId
|
|
2089
|
+ fmt.Println("start_time", start_time)
|
|
2090
|
+ fmt.Println("end_time", end_time)
|
|
2091
|
+ fmt.Println("mode_id", mode_id)
|
|
2092
|
+
|
|
2093
|
+ modeCount, err := service.GetCountModeId(start_time, end_time, mode_id, orgId)
|
|
2094
|
+ if err != nil {
|
|
2095
|
+ this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeSystemError)
|
|
2096
|
+ return
|
|
2097
|
+ }
|
|
2098
|
+ this.ServeSuccessJSON(map[string]interface{}{
|
|
2099
|
+ "modeCount": modeCount,
|
|
2100
|
+ })
|
|
2101
|
+}
|
|
2102
|
+
|
|
2103
|
+func (this *CommonApiController) GetRolloutCount() {
|
|
2104
|
+
|
|
2105
|
+ start_time, _ := this.GetInt64("start_time")
|
|
2106
|
+ end_time, _ := this.GetInt64("end_time")
|
|
2107
|
+ adminUserInfo := this.GetAdminUserInfo()
|
|
2108
|
+ orgId := adminUserInfo.CurrentOrgId
|
|
2109
|
+
|
|
2110
|
+ //统计当前机构转出的人数
|
|
2111
|
+ rollout, err := service.GetCountRollout(orgId, start_time, end_time)
|
|
2112
|
+
|
|
2113
|
+ if err != nil {
|
|
2114
|
+ this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeSystemError)
|
|
2115
|
+ return
|
|
2116
|
+ }
|
|
2117
|
+ this.ServeSuccessJSON(map[string]interface{}{
|
|
2118
|
+ "rollout": rollout,
|
|
2119
|
+ })
|
|
2120
|
+}
|