XMLWAN преди 4 години
родител
ревизия
f454db973c

+ 1 - 1
controllers/device_api_controller.go Целия файл

@@ -1194,7 +1194,7 @@ func (this *DeviceAPIController) GetMachineDetail() {
1194 1194
 	orgid := adminUserInfo.CurrentOrgId
1195 1195
 	fmt.Println("orgid", orgid)
1196 1196
 	addmacher, err := service.GetMachineDetail(id, orgid)
1197
-	fmt.Print("err--------------------------------------------", err)
1197
+	fmt.Print("err", err)
1198 1198
 	warning, err := service.GetTimeWarning(id, orgid)
1199 1199
 	germ, err := service.GetTimeLast(id, orgid)
1200 1200
 	clean, err := service.GetTimeLastData(id, orgid)

+ 98 - 98
controllers/new_mobile_api_controllers/common_api_controller.go Целия файл

@@ -219,7 +219,7 @@ func (this *CommonApiController) GetConfigurationDetail() {
219 219
 		}
220 220
 		this.ServeSuccessJSON(map[string]interface{}{
221 221
 			"configurationdetail": detail,
222
-			"vid": vid,
222
+			"vid":                 vid,
223 223
 		})
224 224
 	} else {
225 225
 		itemId, err := service.GetIdByItemId(detail.InspectionMinor, orgId)
@@ -229,7 +229,7 @@ func (this *CommonApiController) GetConfigurationDetail() {
229 229
 		}
230 230
 		this.ServeSuccessJSON(map[string]interface{}{
231 231
 			"configurationdetail": detail,
232
-			"vid": itemId.ID,
232
+			"vid":                 itemId.ID,
233 233
 		})
234 234
 	}
235 235
 
@@ -1877,156 +1877,156 @@ func (this *CommonApiController) GetMonthBloodList() {
1877 1877
 	//统计收缩压
1878 1878
 	if bloodtype == -1 {
1879 1879
 		//统计收缩压一月总数
1880
-		_, januaryTotal, err := service.GetSystolicBloodPressure(orgId, januaryStartStrUnix, januaryEndStrUnix)
1881
-		_, januaryStandTotal, err := service.GetStandSystolicBloodPressure(orgId, januaryStartStrUnix, januaryEndStrUnix)
1880
+		januarylist, januaryTotal, err := service.GetSystolicBloodPressure(orgId, januaryStartStrUnix, januaryEndStrUnix)
1881
+		//_, januaryStandTotal, err := service.GetStandSystolicBloodPressure(orgId, januaryStartStrUnix, januaryEndStrUnix)
1882 1882
 
1883 1883
 		//二月
1884
-		_, febTotal, err := service.GetSystolicBloodPressure(orgId, febStartStrStrUnix, febEndStrUnix)
1885
-		_, febStandTotal, err := service.GetStandSystolicBloodPressure(orgId, febStartStrStrUnix, febEndStrUnix)
1884
+		feblist, febTotal, err := service.GetSystolicBloodPressure(orgId, febStartStrStrUnix, febEndStrUnix)
1885
+		//_, febStandTotal, err := service.GetStandSystolicBloodPressure(orgId, febStartStrStrUnix, febEndStrUnix)
1886 1886
 
1887 1887
 		//三月
1888
-		_, marchTotal, err := service.GetSystolicBloodPressure(orgId, marchStartStrUnix, marchEndStrUnix)
1889
-		_, marchStandTotal, err := service.GetStandSystolicBloodPressure(orgId, marchStartStrUnix, marchEndStrUnix)
1888
+		marchlist, marchTotal, err := service.GetSystolicBloodPressure(orgId, marchStartStrUnix, marchEndStrUnix)
1889
+		//_, marchStandTotal, err := service.GetStandSystolicBloodPressure(orgId, marchStartStrUnix, marchEndStrUnix)
1890 1890
 
1891 1891
 		//四月
1892
-		_, aprTotal, err := service.GetSystolicBloodPressure(orgId, aprStartStrUnix, aprEndStrsUnix)
1893
-		_, aprStandTotal, err := service.GetStandSystolicBloodPressure(orgId, aprStartStrUnix, aprEndStrsUnix)
1892
+		aprlist, aprTotal, err := service.GetSystolicBloodPressure(orgId, aprStartStrUnix, aprEndStrsUnix)
1893
+		//_, aprStandTotal, err := service.GetStandSystolicBloodPressure(orgId, aprStartStrUnix, aprEndStrsUnix)
1894 1894
 
1895 1895
 		//五月
1896
-		_, mayTotal, err := service.GetSystolicBloodPressure(orgId, mayStartStrUnix, mayEndStrsUnix)
1897
-		_, mayStandTotal, err := service.GetStandSystolicBloodPressure(orgId, mayStartStrUnix, mayEndStrsUnix)
1896
+		maylist, mayTotal, err := service.GetSystolicBloodPressure(orgId, mayStartStrUnix, mayEndStrsUnix)
1897
+		//_, mayStandTotal, err := service.GetStandSystolicBloodPressure(orgId, mayStartStrUnix, mayEndStrsUnix)
1898 1898
 
1899 1899
 		//六月
1900
-		_, junTotal, err := service.GetSystolicBloodPressure(orgId, junStartStrUnix, junEndStrsUnix)
1901
-		_, junStandTotal, err := service.GetStandSystolicBloodPressure(orgId, junStartStrUnix, junEndStrsUnix)
1900
+		junlist, junTotal, err := service.GetSystolicBloodPressure(orgId, junStartStrUnix, junEndStrsUnix)
1901
+		//_, junStandTotal, err := service.GetStandSystolicBloodPressure(orgId, junStartStrUnix, junEndStrsUnix)
1902 1902
 		//7月
1903
-		_, julTotal, err := service.GetSystolicBloodPressure(orgId, julStartStrUnix, julEndStrsUnix)
1904
-		_, julStandTotal, err := service.GetStandSystolicBloodPressure(orgId, julStartStrUnix, julEndStrsUnix)
1903
+		jullist, julTotal, err := service.GetSystolicBloodPressure(orgId, julStartStrUnix, julEndStrsUnix)
1904
+		//_, julStandTotal, err := service.GetStandSystolicBloodPressure(orgId, julStartStrUnix, julEndStrsUnix)
1905 1905
 
1906 1906
 		//8月
1907
-		_, augTotal, err := service.GetSystolicBloodPressure(orgId, augStartStrUnix, augEndStrsUnix)
1908
-		_, augStandTotal, err := service.GetStandSystolicBloodPressure(orgId, augStartStrUnix, augEndStrsUnix)
1907
+		auglist, augTotal, err := service.GetSystolicBloodPressure(orgId, augStartStrUnix, augEndStrsUnix)
1908
+		//_, augStandTotal, err := service.GetStandSystolicBloodPressure(orgId, augStartStrUnix, augEndStrsUnix)
1909 1909
 
1910 1910
 		//9月
1911
-		_, sepTotal, err := service.GetSystolicBloodPressure(orgId, sepStartStrUnix, sepEndStrsUnix)
1912
-		_, sepStandTotal, err := service.GetStandSystolicBloodPressure(orgId, sepStartStrUnix, sepEndStrsUnix)
1911
+		seplist, sepTotal, err := service.GetSystolicBloodPressure(orgId, sepStartStrUnix, sepEndStrsUnix)
1912
+		//_, sepStandTotal, err := service.GetStandSystolicBloodPressure(orgId, sepStartStrUnix, sepEndStrsUnix)
1913 1913
 		//10月
1914
-		_, octTotal, err := service.GetSystolicBloodPressure(orgId, octStartStrUnix, octEndStrsUnix)
1915
-		_, octStandTotal, err := service.GetStandSystolicBloodPressure(orgId, octStartStrUnix, octEndStrsUnix)
1914
+		octlist, octTotal, err := service.GetSystolicBloodPressure(orgId, octStartStrUnix, octEndStrsUnix)
1915
+		//_, octStandTotal, err := service.GetStandSystolicBloodPressure(orgId, octStartStrUnix, octEndStrsUnix)
1916 1916
 		//11月
1917
-		_, novTotal, err := service.GetSystolicBloodPressure(orgId, novStartStrUnix, novEndStrsUnix)
1918
-		_, novStandTotal, err := service.GetStandSystolicBloodPressure(orgId, novStartStrUnix, novEndStrsUnix)
1917
+		novlist, novTotal, err := service.GetSystolicBloodPressure(orgId, novStartStrUnix, novEndStrsUnix)
1918
+		//_, novStandTotal, err := service.GetStandSystolicBloodPressure(orgId, novStartStrUnix, novEndStrsUnix)
1919 1919
 		//12月
1920
-		_, decTotal, err := service.GetSystolicBloodPressure(orgId, decStartStrUnix, decEndStrsUnix)
1921
-		_, decStandTotal, err := service.GetStandSystolicBloodPressure(orgId, decStartStrUnix, decEndStrsUnix)
1920
+		declist, decTotal, err := service.GetSystolicBloodPressure(orgId, decStartStrUnix, decEndStrsUnix)
1921
+		//_, decStandTotal, err := service.GetStandSystolicBloodPressure(orgId, decStartStrUnix, decEndStrsUnix)
1922 1922
 		if err != nil {
1923 1923
 			this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeSystemError)
1924 1924
 			return
1925 1925
 		}
1926 1926
 
1927 1927
 		this.ServeSuccessJSON(map[string]interface{}{
1928
-			"januaryTotal":      januaryTotal,
1929
-			"januaryStandTotal": januaryStandTotal,
1930
-			"febTotal":          febTotal,
1931
-			"febStandTotal":     febStandTotal,
1932
-			"marchTotal":        marchTotal,
1933
-			"marchStandTotal":   marchStandTotal,
1934
-			"aprTotal":          aprTotal,
1935
-			"aprStandTotal":     aprStandTotal,
1936
-			"mayTotal":          mayTotal,
1937
-			"mayStandTotal":     mayStandTotal,
1938
-			"junTotal":          junTotal,
1939
-			"junStandTotal":     junStandTotal,
1940
-			"julTotal":          julTotal,
1941
-			"julStandTotal":     julStandTotal,
1942
-			"augTotal":          augTotal,
1943
-			"augStandTotal":     augStandTotal,
1944
-			"sepTotal":          sepTotal,
1945
-			"sepStandTotal":     sepStandTotal,
1946
-			"octTotal":          octTotal,
1947
-			"octStandTotal":     octStandTotal,
1948
-			"novTotal":          novTotal,
1949
-			"novStandTotal":     novStandTotal,
1950
-			"decTotal":          decTotal,
1951
-			"decStandTotal":     decStandTotal,
1928
+			"januaryTotal": januaryTotal,
1929
+			"januarylist":  januarylist,
1930
+			"febTotal":     febTotal,
1931
+			"feblist":      feblist,
1932
+			"marchTotal":   marchTotal,
1933
+			"marchlist":    marchlist,
1934
+			"aprTotal":     aprTotal,
1935
+			"aprlist":      aprlist,
1936
+			"mayTotal":     mayTotal,
1937
+			"maylist":      maylist,
1938
+			"junTotal":     junTotal,
1939
+			"junlist":      junlist,
1940
+			"julTotal":     julTotal,
1941
+			"jullist":      jullist,
1942
+			"augTotal":     augTotal,
1943
+			"auglist":      auglist,
1944
+			"sepTotal":     sepTotal,
1945
+			"seplist":      seplist,
1946
+			"octTotal":     octTotal,
1947
+			"octlist":      octlist,
1948
+			"novTotal":     novTotal,
1949
+			"novlist":      novlist,
1950
+			"decTotal":     decTotal,
1951
+			"declist":      declist,
1952 1952
 		})
1953 1953
 	}
1954 1954
 
1955 1955
 	//统计舒张压
1956 1956
 	if bloodtype == -2 {
1957 1957
 		//统计收缩压一月总数
1958
-		_, januaryTotal, err := service.GetDiastolicBloodPressure(orgId, januaryStartStrUnix, januaryEndStrUnix)
1959
-		_, januaryStandTotal, err := service.GetDiastolicStandPressure(orgId, januaryStartStrUnix, januaryEndStrUnix)
1958
+		januarylist, januaryTotal, err := service.GetDiastolicBloodPressure(orgId, januaryStartStrUnix, januaryEndStrUnix)
1959
+		//_, januaryStandTotal, err := service.GetDiastolicStandPressure(orgId, januaryStartStrUnix, januaryEndStrUnix)
1960 1960
 
1961 1961
 		//二月
1962
-		_, febTotal, err := service.GetDiastolicBloodPressure(orgId, febStartStrStrUnix, febEndStrUnix)
1963
-		_, febStandTotal, err := service.GetDiastolicStandPressure(orgId, febStartStrStrUnix, febEndStrUnix)
1962
+		feblist, febTotal, err := service.GetDiastolicBloodPressure(orgId, febStartStrStrUnix, febEndStrUnix)
1963
+		//_, febStandTotal, err := service.GetDiastolicStandPressure(orgId, febStartStrStrUnix, febEndStrUnix)
1964 1964
 
1965 1965
 		//三月
1966
-		_, marchTotal, err := service.GetDiastolicBloodPressure(orgId, marchStartStrUnix, marchEndStrUnix)
1967
-		_, marchStandTotal, err := service.GetDiastolicStandPressure(orgId, marchStartStrUnix, marchEndStrUnix)
1966
+		marchlist, marchTotal, err := service.GetDiastolicBloodPressure(orgId, marchStartStrUnix, marchEndStrUnix)
1967
+		//_, marchStandTotal, err := service.GetDiastolicStandPressure(orgId, marchStartStrUnix, marchEndStrUnix)
1968 1968
 
1969 1969
 		//四月
1970
-		_, aprTotal, err := service.GetDiastolicBloodPressure(orgId, aprStartStrUnix, aprEndStrsUnix)
1971
-		_, aprStandTotal, err := service.GetDiastolicStandPressure(orgId, aprStartStrUnix, aprEndStrsUnix)
1970
+		aprlist, aprTotal, err := service.GetDiastolicBloodPressure(orgId, aprStartStrUnix, aprEndStrsUnix)
1971
+		//_, aprStandTotal, err := service.GetDiastolicStandPressure(orgId, aprStartStrUnix, aprEndStrsUnix)
1972 1972
 
1973 1973
 		//五月
1974
-		_, mayTotal, err := service.GetDiastolicBloodPressure(orgId, mayStartStrUnix, mayEndStrsUnix)
1975
-		_, mayStandTotal, err := service.GetDiastolicStandPressure(orgId, mayStartStrUnix, mayEndStrsUnix)
1974
+		maylist, mayTotal, err := service.GetDiastolicBloodPressure(orgId, mayStartStrUnix, mayEndStrsUnix)
1975
+		//_, mayStandTotal, err := service.GetDiastolicStandPressure(orgId, mayStartStrUnix, mayEndStrsUnix)
1976 1976
 
1977 1977
 		//六月
1978
-		_, junTotal, err := service.GetDiastolicBloodPressure(orgId, junStartStrUnix, junEndStrsUnix)
1979
-		_, junStandTotal, err := service.GetDiastolicStandPressure(orgId, junStartStrUnix, junEndStrsUnix)
1978
+		junlist, junTotal, err := service.GetDiastolicBloodPressure(orgId, junStartStrUnix, junEndStrsUnix)
1979
+		//_, junStandTotal, err := service.GetDiastolicStandPressure(orgId, junStartStrUnix, junEndStrsUnix)
1980 1980
 		//7月
1981
-		_, julTotal, err := service.GetDiastolicBloodPressure(orgId, julStartStrUnix, julEndStrsUnix)
1982
-		_, julStandTotal, err := service.GetDiastolicStandPressure(orgId, julStartStrUnix, julEndStrsUnix)
1981
+		jullist, julTotal, err := service.GetDiastolicBloodPressure(orgId, julStartStrUnix, julEndStrsUnix)
1982
+		//_, julStandTotal, err := service.GetDiastolicStandPressure(orgId, julStartStrUnix, julEndStrsUnix)
1983 1983
 
1984 1984
 		//8月
1985
-		_, augTotal, err := service.GetDiastolicBloodPressure(orgId, augStartStrUnix, augEndStrsUnix)
1986
-		_, augStandTotal, err := service.GetDiastolicStandPressure(orgId, augStartStrUnix, augEndStrsUnix)
1985
+		auglist, augTotal, err := service.GetDiastolicBloodPressure(orgId, augStartStrUnix, augEndStrsUnix)
1986
+		//_, augStandTotal, err := service.GetDiastolicStandPressure(orgId, augStartStrUnix, augEndStrsUnix)
1987 1987
 
1988 1988
 		//9月
1989
-		_, sepTotal, err := service.GetDiastolicBloodPressure(orgId, sepStartStrUnix, sepEndStrsUnix)
1990
-		_, sepStandTotal, err := service.GetDiastolicStandPressure(orgId, sepStartStrUnix, sepEndStrsUnix)
1989
+		seplist, sepTotal, err := service.GetDiastolicBloodPressure(orgId, sepStartStrUnix, sepEndStrsUnix)
1990
+		//_, sepStandTotal, err := service.GetDiastolicStandPressure(orgId, sepStartStrUnix, sepEndStrsUnix)
1991 1991
 		//10月
1992
-		_, octTotal, err := service.GetDiastolicBloodPressure(orgId, octStartStrUnix, octEndStrsUnix)
1993
-		_, octStandTotal, err := service.GetDiastolicStandPressure(orgId, octStartStrUnix, octEndStrsUnix)
1992
+		octlist, octTotal, err := service.GetDiastolicBloodPressure(orgId, octStartStrUnix, octEndStrsUnix)
1993
+		//_, octStandTotal, err := service.GetDiastolicStandPressure(orgId, octStartStrUnix, octEndStrsUnix)
1994 1994
 		//11月
1995
-		_, novTotal, err := service.GetDiastolicBloodPressure(orgId, novStartStrUnix, novEndStrsUnix)
1996
-		_, novStandTotal, err := service.GetDiastolicStandPressure(orgId, novStartStrUnix, novEndStrsUnix)
1995
+		novlist, novTotal, err := service.GetDiastolicBloodPressure(orgId, novStartStrUnix, novEndStrsUnix)
1996
+		//_, novStandTotal, err := service.GetDiastolicStandPressure(orgId, novStartStrUnix, novEndStrsUnix)
1997 1997
 		//12月
1998
-		_, decTotal, err := service.GetDiastolicBloodPressure(orgId, decStartStrUnix, decEndStrsUnix)
1999
-		_, decStandTotal, err := service.GetDiastolicStandPressure(orgId, decStartStrUnix, decEndStrsUnix)
1998
+		declist, decTotal, err := service.GetDiastolicBloodPressure(orgId, decStartStrUnix, decEndStrsUnix)
1999
+		//_, decStandTotal, err := service.GetDiastolicStandPressure(orgId, decStartStrUnix, decEndStrsUnix)
2000 2000
 		if err != nil {
2001 2001
 			this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeSystemError)
2002 2002
 			return
2003 2003
 		}
2004 2004
 
2005 2005
 		this.ServeSuccessJSON(map[string]interface{}{
2006
-			"januaryTotal":      januaryTotal,
2007
-			"januaryStandTotal": januaryStandTotal,
2008
-			"febTotal":          febTotal,
2009
-			"febStandTotal":     febStandTotal,
2010
-			"marchTotal":        marchTotal,
2011
-			"marchStandTotal":   marchStandTotal,
2012
-			"aprTotal":          aprTotal,
2013
-			"aprStandTotal":     aprStandTotal,
2014
-			"mayTotal":          mayTotal,
2015
-			"mayStandTotal":     mayStandTotal,
2016
-			"junTotal":          junTotal,
2017
-			"junStandTotal":     junStandTotal,
2018
-			"julTotal":          julTotal,
2019
-			"julStandTotal":     julStandTotal,
2020
-			"augTotal":          augTotal,
2021
-			"augStandTotal":     augStandTotal,
2022
-			"sepTotal":          sepTotal,
2023
-			"sepStandTotal":     sepStandTotal,
2024
-			"octTotal":          octTotal,
2025
-			"octStandTotal":     octStandTotal,
2026
-			"novTotal":          novTotal,
2027
-			"novStandTotal":     novStandTotal,
2028
-			"decTotal":          decTotal,
2029
-			"decStandTotal":     decStandTotal,
2006
+			"januaryTotal": januaryTotal,
2007
+			"januarylist":  januarylist,
2008
+			"febTotal":     febTotal,
2009
+			"feblist":      feblist,
2010
+			"marchTotal":   marchTotal,
2011
+			"marchlist":    marchlist,
2012
+			"aprTotal":     aprTotal,
2013
+			"aprlist":      aprlist,
2014
+			"mayTotal":     mayTotal,
2015
+			"maylist":      maylist,
2016
+			"junTotal":     junTotal,
2017
+			"junlist":      junlist,
2018
+			"julTotal":     julTotal,
2019
+			"jullist":      jullist,
2020
+			"augTotal":     augTotal,
2021
+			"auglist":      auglist,
2022
+			"sepTotal":     sepTotal,
2023
+			"seplist":      seplist,
2024
+			"octTotal":     octTotal,
2025
+			"octlist":      octlist,
2026
+			"novTotal":     novTotal,
2027
+			"novlist":      novlist,
2028
+			"decTotal":     decTotal,
2029
+			"declist":      declist,
2030 2030
 		})
2031 2031
 	}
2032 2032
 }

+ 220 - 144
controllers/new_mobile_api_controllers/new_common_api_controller.go Целия файл

@@ -7,6 +7,7 @@ import (
7 7
 	"XT_New/utils"
8 8
 	"encoding/json"
9 9
 	"fmt"
10
+	"strconv"
10 11
 	"time"
11 12
 )
12 13
 
@@ -522,29 +523,27 @@ func (this *NewCommonApiController) GetMobileFirstQuarter() {
522 523
 	count, err := service.GetQuarterTotalCount(orgid, statime, entime, lapseto)
523 524
 	countwo, _ := service.GetQuarterTotalCountTwo(orgid, statime, entime, lapseto)
524 525
 	//获取收缩压数据
525
-	_, systolicTotal, parseDateErr := service.GetSystolicBloodPressure(orgid, statime, entime)
526
+	systolic, systolicTotal, parseDateErr := service.GetSystolicBloodPressure(orgid, statime, entime)
526 527
 	//统计收缩压合格的数据
527
-	systolic, sysstandTotal, parseDateErr := service.GetStandSystolicBloodPressure(orgid, statime, entime)
528
+	//systolic, sysstandTotal, parseDateErr := service.GetStandSystolicBloodPressure(orgid, statime, entime)
528 529
 
529 530
 	//获取舒张压数据
530
-	_, diastotal, parseDateErr := service.GetDiastolicBloodPressure(orgid, statime, entime)
531
+	diastolic, diastotal, parseDateErr := service.GetDiastolicBloodPressure(orgid, statime, entime)
531 532
 	//获取合格舒张压数据
532
-	diastolic, diasstandtotal, parseDateErr := service.GetDiastolicStandPressure(orgid, statime, entime)
533
-	normData, _ := service.GetNormData(orgid)
533
+	//diastolic, diasstandtotal, parseDateErr := service.GetDiastolicStandPressure(orgid, statime, entime)
534
+	normData, _ := service.GetNormDataByOrgId(orgid)
534 535
 	if err != nil {
535 536
 		this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeSystemError)
536 537
 		return
537 538
 	}
538 539
 	this.ServeSuccessJSON(map[string]interface{}{
539
-		"count":          count,
540
-		"countwo":        countwo,
541
-		"systolic":       systolic,
542
-		"systolicTotal":  systolicTotal,
543
-		"sysstandTotal":  sysstandTotal,
544
-		"diastolic":      diastolic,
545
-		"diastotal":      diastotal,
546
-		"diasstandtotal": diasstandtotal,
547
-		"normData":       normData,
540
+		"count":         count,
541
+		"countwo":       countwo,
542
+		"systolic":      systolic,
543
+		"systolicTotal": systolicTotal,
544
+		"diastolic":     diastolic,
545
+		"diastotal":     diastotal,
546
+		"normData":      normData,
548 547
 	})
549 548
 }
550 549
 
@@ -1029,47 +1028,47 @@ func (this *NewCommonApiController) GetMoblieBloodList() {
1029 1028
 	fmt.Println("第四季度", fourQuarterEndStrUnix)
1030 1029
 	if bloodType == -1 {
1031 1030
 		//统计收缩压第一季度的总数
1032
-		_, firstTotal, err := service.GetSystolicBloodPressure(orgId, firstQuarterStartUnix, fisrtQuarterEndStrUnix)
1031
+		firstlist, firstTotal, err := service.GetSystolicBloodPressure(orgId, firstQuarterStartUnix, fisrtQuarterEndStrUnix)
1033 1032
 		//统计收缩压第一季合格的总数
1034
-		_, firstStandTotal, err := service.GetStandSystolicBloodPressure(orgId, firstQuarterStartUnix, fisrtQuarterEndStrUnix)
1033
+		//_, firstStandTotal, err := service.GetStandSystolicBloodPressure(orgId, firstQuarterStartUnix, fisrtQuarterEndStrUnix)
1035 1034
 		//统计第二季收缩压总数
1036
-		_, secondeTotal, err := service.GetSystolicBloodPressure(orgId, secondeQuarterStartUnix, secondQuarterEndStrUnix)
1035
+		secondelist, secondeTotal, err := service.GetSystolicBloodPressure(orgId, secondeQuarterStartUnix, secondQuarterEndStrUnix)
1037 1036
 		//第二季度合格总数
1038
-		_, secondeStandTotal, err := service.GetStandSystolicBloodPressure(orgId, secondeQuarterStartUnix, secondQuarterEndStrUnix)
1037
+		//_, secondeStandTotal, err := service.GetStandSystolicBloodPressure(orgId, secondeQuarterStartUnix, secondQuarterEndStrUnix)
1039 1038
 		//统计第三季收缩压总数
1040
-		_, threeTotal, err := service.GetSystolicBloodPressure(orgId, threeQuarterStartUnix, threeQuarterEndStrUnix)
1039
+		threelist, threeTotal, err := service.GetSystolicBloodPressure(orgId, threeQuarterStartUnix, threeQuarterEndStrUnix)
1041 1040
 		//第三季度合格数
1042
-		_, threeStandTotal, err := service.GetStandSystolicBloodPressure(orgId, threeQuarterStartUnix, threeQuarterEndStrUnix)
1041
+		//_, threeStandTotal, err := service.GetStandSystolicBloodPressure(orgId, threeQuarterStartUnix, threeQuarterEndStrUnix)
1043 1042
 		//第四季度总数
1044
-		_, fourTotal, err := service.GetSystolicBloodPressure(orgId, fourQuarterStartUnix, fourQuarterEndStrUnix)
1043
+		fourlist, fourTotal, err := service.GetSystolicBloodPressure(orgId, fourQuarterStartUnix, fourQuarterEndStrUnix)
1045 1044
 		//第四季度合格总数
1046
-		_, fourStandTotal, err := service.GetStandSystolicBloodPressure(orgId, fourQuarterStartUnix, fourQuarterEndStrUnix)
1045
+		//_, fourStandTotal, err := service.GetStandSystolicBloodPressure(orgId, fourQuarterStartUnix, fourQuarterEndStrUnix)
1047 1046
 		if err != nil {
1048 1047
 			this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeSystemError)
1049 1048
 			return
1050 1049
 		}
1051 1050
 
1052 1051
 		this.ServeSuccessJSON(map[string]interface{}{
1053
-			"firstTotal":        firstTotal,
1054
-			"firstStandTotal":   firstStandTotal,
1055
-			"secondeTotal":      secondeTotal,
1056
-			"secondeStandTotal": secondeStandTotal,
1057
-			"threeTotal":        threeTotal,
1058
-			"threeStandTotal":   threeStandTotal,
1059
-			"fourTotal":         fourTotal,
1060
-			"fourStandTotal":    fourStandTotal,
1052
+			"firstTotal":   firstTotal,
1053
+			"firstlist":    firstlist,
1054
+			"secondeTotal": secondeTotal,
1055
+			"secondelist":  secondelist,
1056
+			"threeTotal":   threeTotal,
1057
+			"threelist":    threelist,
1058
+			"fourTotal":    fourTotal,
1059
+			"fourlist":     fourlist,
1061 1060
 		})
1062 1061
 	}
1063 1062
 	if bloodType == -2 {
1064 1063
 		//统计舒张压第一季度的总数
1065
-		_, firstTotal, err := service.GetDiastolicBloodPressure(orgId, firstQuarterStartUnix, fisrtQuarterEndStrUnix)
1066
-		_, firstStandTotal, err := service.GetDiastolicStandPressure(orgId, firstQuarterStartUnix, fisrtQuarterEndStrUnix)
1067
-		_, secondeTotal, err := service.GetDiastolicBloodPressure(orgId, secondeQuarterStartUnix, secondQuarterEndStrUnix)
1068
-		_, secondeStandTotal, err := service.GetDiastolicStandPressure(orgId, secondeQuarterStartUnix, secondQuarterEndStrUnix)
1069
-		_, threeTotal, err := service.GetDiastolicBloodPressure(orgId, threeQuarterStartUnix, threeQuarterEndStrUnix)
1070
-		_, threeStandTotal, err := service.GetDiastolicStandPressure(orgId, threeQuarterStartUnix, threeQuarterEndStrUnix)
1071
-		_, fourTotal, err := service.GetDiastolicBloodPressure(orgId, fourQuarterStartUnix, fourQuarterEndStrUnix)
1072
-		_, fourStandTotal, err := service.GetDiastolicStandPressure(orgId, fourQuarterStartUnix, fourQuarterEndStrUnix)
1064
+		firstlist, firstTotal, err := service.GetDiastolicBloodPressure(orgId, firstQuarterStartUnix, fisrtQuarterEndStrUnix)
1065
+		//_, firstStandTotal, err := service.GetDiastolicStandPressure(orgId, firstQuarterStartUnix, fisrtQuarterEndStrUnix)
1066
+		secondelist, secondeTotal, err := service.GetDiastolicBloodPressure(orgId, secondeQuarterStartUnix, secondQuarterEndStrUnix)
1067
+		//_, secondeStandTotal, err := service.GetDiastolicStandPressure(orgId, secondeQuarterStartUnix, secondQuarterEndStrUnix)
1068
+		threelist, threeTotal, err := service.GetDiastolicBloodPressure(orgId, threeQuarterStartUnix, threeQuarterEndStrUnix)
1069
+		//_, threeStandTotal, err := service.GetDiastolicStandPressure(orgId, threeQuarterStartUnix, threeQuarterEndStrUnix)
1070
+		fourlist, fourTotal, err := service.GetDiastolicBloodPressure(orgId, fourQuarterStartUnix, fourQuarterEndStrUnix)
1071
+		//_, fourStandTotal, err := service.GetDiastolicStandPressure(orgId, fourQuarterStartUnix, fourQuarterEndStrUnix)
1073 1072
 
1074 1073
 		if err != nil {
1075 1074
 			this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeSystemError)
@@ -1077,14 +1076,14 @@ func (this *NewCommonApiController) GetMoblieBloodList() {
1077 1076
 		}
1078 1077
 
1079 1078
 		this.ServeSuccessJSON(map[string]interface{}{
1080
-			"firstTotal":        firstTotal,
1081
-			"firstStandTotal":   firstStandTotal,
1082
-			"secondeTotal":      secondeTotal,
1083
-			"secondeStandTotal": secondeStandTotal,
1084
-			"threeTotal":        threeTotal,
1085
-			"threeStandTotal":   threeStandTotal,
1086
-			"fourTotal":         fourTotal,
1087
-			"fourStandTotal":    fourStandTotal,
1079
+			"firstTotal":   firstTotal,
1080
+			"firstlist":    firstlist,
1081
+			"secondeTotal": secondeTotal,
1082
+			"secondelist":  secondelist,
1083
+			"threeTotal":   threeTotal,
1084
+			"threelist":    threelist,
1085
+			"fourTotal":    fourTotal,
1086
+			"fourlist":     fourlist,
1088 1087
 		})
1089 1088
 	}
1090 1089
 }
@@ -1231,156 +1230,156 @@ func (this *NewCommonApiController) GetBloodMonthList() {
1231 1230
 	//统计收缩压
1232 1231
 	if bloodtype == -1 {
1233 1232
 		//统计收缩压一月总数
1234
-		_, januaryTotal, err := service.GetSystolicBloodPressure(orgId, januaryStartStrUnix, januaryEndStrUnix)
1235
-		_, januaryStandTotal, err := service.GetStandSystolicBloodPressure(orgId, januaryStartStrUnix, januaryEndStrUnix)
1233
+		januarylist, januaryTotal, err := service.GetSystolicBloodPressure(orgId, januaryStartStrUnix, januaryEndStrUnix)
1234
+		//_, januaryStandTotal, err := service.GetStandSystolicBloodPressure(orgId, januaryStartStrUnix, januaryEndStrUnix)
1236 1235
 
1237 1236
 		//二月
1238
-		_, febTotal, err := service.GetSystolicBloodPressure(orgId, febStartStrStrUnix, febEndStrUnix)
1239
-		_, febStandTotal, err := service.GetStandSystolicBloodPressure(orgId, febStartStrStrUnix, febEndStrUnix)
1237
+		feblist, febTotal, err := service.GetSystolicBloodPressure(orgId, febStartStrStrUnix, febEndStrUnix)
1238
+		//_, febStandTotal, err := service.GetStandSystolicBloodPressure(orgId, febStartStrStrUnix, febEndStrUnix)
1240 1239
 
1241 1240
 		//三月
1242
-		_, marchTotal, err := service.GetSystolicBloodPressure(orgId, marchStartStrUnix, marchEndStrUnix)
1243
-		_, marchStandTotal, err := service.GetStandSystolicBloodPressure(orgId, marchStartStrUnix, marchEndStrUnix)
1241
+		marlist, marchTotal, err := service.GetSystolicBloodPressure(orgId, marchStartStrUnix, marchEndStrUnix)
1242
+		//_, marchStandTotal, err := service.GetStandSystolicBloodPressure(orgId, marchStartStrUnix, marchEndStrUnix)
1244 1243
 
1245 1244
 		//四月
1246
-		_, aprTotal, err := service.GetSystolicBloodPressure(orgId, aprStartStrUnix, aprEndStrsUnix)
1247
-		_, aprStandTotal, err := service.GetStandSystolicBloodPressure(orgId, aprStartStrUnix, aprEndStrsUnix)
1245
+		aprlist, aprTotal, err := service.GetSystolicBloodPressure(orgId, aprStartStrUnix, aprEndStrsUnix)
1246
+		//_, aprStandTotal, err := service.GetStandSystolicBloodPressure(orgId, aprStartStrUnix, aprEndStrsUnix)
1248 1247
 
1249 1248
 		//五月
1250
-		_, mayTotal, err := service.GetSystolicBloodPressure(orgId, mayStartStrUnix, mayEndStrsUnix)
1251
-		_, mayStandTotal, err := service.GetStandSystolicBloodPressure(orgId, mayStartStrUnix, mayEndStrsUnix)
1249
+		maylist, mayTotal, err := service.GetSystolicBloodPressure(orgId, mayStartStrUnix, mayEndStrsUnix)
1250
+		//_, mayStandTotal, err := service.GetStandSystolicBloodPressure(orgId, mayStartStrUnix, mayEndStrsUnix)
1252 1251
 
1253 1252
 		//六月
1254
-		_, junTotal, err := service.GetSystolicBloodPressure(orgId, junStartStrUnix, junEndStrsUnix)
1255
-		_, junStandTotal, err := service.GetStandSystolicBloodPressure(orgId, junStartStrUnix, junEndStrsUnix)
1253
+		junlist, junTotal, err := service.GetSystolicBloodPressure(orgId, junStartStrUnix, junEndStrsUnix)
1254
+		//_, junStandTotal, err := service.GetStandSystolicBloodPressure(orgId, junStartStrUnix, junEndStrsUnix)
1256 1255
 		//7月
1257
-		_, julTotal, err := service.GetSystolicBloodPressure(orgId, julStartStrUnix, julEndStrsUnix)
1258
-		_, julStandTotal, err := service.GetStandSystolicBloodPressure(orgId, julStartStrUnix, julEndStrsUnix)
1256
+		jullist, julTotal, err := service.GetSystolicBloodPressure(orgId, julStartStrUnix, julEndStrsUnix)
1257
+		//_, julStandTotal, err := service.GetStandSystolicBloodPressure(orgId, julStartStrUnix, julEndStrsUnix)
1259 1258
 
1260 1259
 		//8月
1261
-		_, augTotal, err := service.GetSystolicBloodPressure(orgId, augStartStrUnix, augEndStrsUnix)
1262
-		_, augStandTotal, err := service.GetStandSystolicBloodPressure(orgId, augStartStrUnix, augEndStrsUnix)
1260
+		auglist, augTotal, err := service.GetSystolicBloodPressure(orgId, augStartStrUnix, augEndStrsUnix)
1261
+		//_, augStandTotal, err := service.GetStandSystolicBloodPressure(orgId, augStartStrUnix, augEndStrsUnix)
1263 1262
 
1264 1263
 		//9月
1265
-		_, sepTotal, err := service.GetSystolicBloodPressure(orgId, sepStartStrUnix, sepEndStrsUnix)
1266
-		_, sepStandTotal, err := service.GetStandSystolicBloodPressure(orgId, sepStartStrUnix, sepEndStrsUnix)
1264
+		seplist, sepTotal, err := service.GetSystolicBloodPressure(orgId, sepStartStrUnix, sepEndStrsUnix)
1265
+		//_, sepStandTotal, err := service.GetStandSystolicBloodPressure(orgId, sepStartStrUnix, sepEndStrsUnix)
1267 1266
 		//10月
1268
-		_, octTotal, err := service.GetSystolicBloodPressure(orgId, octStartStrUnix, octEndStrsUnix)
1269
-		_, octStandTotal, err := service.GetStandSystolicBloodPressure(orgId, octStartStrUnix, octEndStrsUnix)
1267
+		octlist, octTotal, err := service.GetSystolicBloodPressure(orgId, octStartStrUnix, octEndStrsUnix)
1268
+		//_, octStandTotal, err := service.GetStandSystolicBloodPressure(orgId, octStartStrUnix, octEndStrsUnix)
1270 1269
 		//11月
1271
-		_, novTotal, err := service.GetSystolicBloodPressure(orgId, novStartStrUnix, novEndStrsUnix)
1272
-		_, novStandTotal, err := service.GetStandSystolicBloodPressure(orgId, novStartStrUnix, novEndStrsUnix)
1270
+		novlist, novTotal, err := service.GetSystolicBloodPressure(orgId, novStartStrUnix, novEndStrsUnix)
1271
+		//_, novStandTotal, err := service.GetStandSystolicBloodPressure(orgId, novStartStrUnix, novEndStrsUnix)
1273 1272
 		//12月
1274
-		_, decTotal, err := service.GetSystolicBloodPressure(orgId, decStartStrUnix, decEndStrsUnix)
1275
-		_, decStandTotal, err := service.GetStandSystolicBloodPressure(orgId, decStartStrUnix, decEndStrsUnix)
1273
+		declist, decTotal, err := service.GetSystolicBloodPressure(orgId, decStartStrUnix, decEndStrsUnix)
1274
+		//_, decStandTotal, err := service.GetStandSystolicBloodPressure(orgId, decStartStrUnix, decEndStrsUnix)
1276 1275
 		if err != nil {
1277 1276
 			this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeSystemError)
1278 1277
 			return
1279 1278
 		}
1280 1279
 
1281 1280
 		this.ServeSuccessJSON(map[string]interface{}{
1282
-			"januaryTotal":      januaryTotal,
1283
-			"januaryStandTotal": januaryStandTotal,
1284
-			"febTotal":          febTotal,
1285
-			"febStandTotal":     febStandTotal,
1286
-			"marchTotal":        marchTotal,
1287
-			"marchStandTotal":   marchStandTotal,
1288
-			"aprTotal":          aprTotal,
1289
-			"aprStandTotal":     aprStandTotal,
1290
-			"mayTotal":          mayTotal,
1291
-			"mayStandTotal":     mayStandTotal,
1292
-			"junTotal":          junTotal,
1293
-			"junStandTotal":     junStandTotal,
1294
-			"julTotal":          julTotal,
1295
-			"julStandTotal":     julStandTotal,
1296
-			"augTotal":          augTotal,
1297
-			"augStandTotal":     augStandTotal,
1298
-			"sepTotal":          sepTotal,
1299
-			"sepStandTotal":     sepStandTotal,
1300
-			"octTotal":          octTotal,
1301
-			"octStandTotal":     octStandTotal,
1302
-			"novTotal":          novTotal,
1303
-			"novStandTotal":     novStandTotal,
1304
-			"decTotal":          decTotal,
1305
-			"decStandTotal":     decStandTotal,
1281
+			"januaryTotal": januaryTotal,
1282
+			"januarylist":  januarylist,
1283
+			"febTotal":     febTotal,
1284
+			"feblist":      feblist,
1285
+			"marchTotal":   marchTotal,
1286
+			"marlist":      marlist,
1287
+			"aprTotal":     aprTotal,
1288
+			"aprlist":      aprlist,
1289
+			"mayTotal":     mayTotal,
1290
+			"maylist":      maylist,
1291
+			"junTotal":     junTotal,
1292
+			"junlist":      junlist,
1293
+			"julTotal":     julTotal,
1294
+			"jullist":      jullist,
1295
+			"augTotal":     augTotal,
1296
+			"auglist":      auglist,
1297
+			"sepTotal":     sepTotal,
1298
+			"seplist":      seplist,
1299
+			"octTotal":     octTotal,
1300
+			"octlist":      octlist,
1301
+			"novTotal":     novTotal,
1302
+			"novlist":      novlist,
1303
+			"decTotal":     decTotal,
1304
+			"declist":      declist,
1306 1305
 		})
1307 1306
 	}
1308 1307
 
1309 1308
 	//统计舒张压
1310 1309
 	if bloodtype == -2 {
1311 1310
 		//统计收缩压一月总数
1312
-		_, januaryTotal, err := service.GetDiastolicBloodPressure(orgId, januaryStartStrUnix, januaryEndStrUnix)
1313
-		_, januaryStandTotal, err := service.GetDiastolicStandPressure(orgId, januaryStartStrUnix, januaryEndStrUnix)
1311
+		januarylist, januaryTotal, err := service.GetDiastolicBloodPressure(orgId, januaryStartStrUnix, januaryEndStrUnix)
1312
+		//_, januaryStandTotal, err := service.GetDiastolicStandPressure(orgId, januaryStartStrUnix, januaryEndStrUnix)
1314 1313
 
1315 1314
 		//二月
1316
-		_, febTotal, err := service.GetDiastolicBloodPressure(orgId, febStartStrStrUnix, febEndStrUnix)
1317
-		_, febStandTotal, err := service.GetDiastolicStandPressure(orgId, febStartStrStrUnix, febEndStrUnix)
1315
+		feblist, febTotal, err := service.GetDiastolicBloodPressure(orgId, febStartStrStrUnix, febEndStrUnix)
1316
+		//_, febStandTotal, err := service.GetDiastolicStandPressure(orgId, febStartStrStrUnix, febEndStrUnix)
1318 1317
 
1319 1318
 		//三月
1320
-		_, marchTotal, err := service.GetDiastolicBloodPressure(orgId, marchStartStrUnix, marchEndStrUnix)
1321
-		_, marchStandTotal, err := service.GetDiastolicStandPressure(orgId, marchStartStrUnix, marchEndStrUnix)
1319
+		marlist, marchTotal, err := service.GetDiastolicBloodPressure(orgId, marchStartStrUnix, marchEndStrUnix)
1320
+		//_, marchStandTotal, err := service.GetDiastolicStandPressure(orgId, marchStartStrUnix, marchEndStrUnix)
1322 1321
 
1323 1322
 		//四月
1324
-		_, aprTotal, err := service.GetDiastolicBloodPressure(orgId, aprStartStrUnix, aprEndStrsUnix)
1325
-		_, aprStandTotal, err := service.GetDiastolicStandPressure(orgId, aprStartStrUnix, aprEndStrsUnix)
1323
+		aprlist, aprTotal, err := service.GetDiastolicBloodPressure(orgId, aprStartStrUnix, aprEndStrsUnix)
1324
+		//_, aprStandTotal, err := service.GetDiastolicStandPressure(orgId, aprStartStrUnix, aprEndStrsUnix)
1326 1325
 
1327 1326
 		//五月
1328
-		_, mayTotal, err := service.GetDiastolicBloodPressure(orgId, mayStartStrUnix, mayEndStrsUnix)
1329
-		_, mayStandTotal, err := service.GetDiastolicStandPressure(orgId, mayStartStrUnix, mayEndStrsUnix)
1327
+		maylist, mayTotal, err := service.GetDiastolicBloodPressure(orgId, mayStartStrUnix, mayEndStrsUnix)
1328
+		//_, mayStandTotal, err := service.GetDiastolicStandPressure(orgId, mayStartStrUnix, mayEndStrsUnix)
1330 1329
 
1331 1330
 		//六月
1332
-		_, junTotal, err := service.GetDiastolicBloodPressure(orgId, junStartStrUnix, junEndStrsUnix)
1333
-		_, junStandTotal, err := service.GetDiastolicStandPressure(orgId, junStartStrUnix, junEndStrsUnix)
1331
+		junlist, junTotal, err := service.GetDiastolicBloodPressure(orgId, junStartStrUnix, junEndStrsUnix)
1332
+		//_, junStandTotal, err := service.GetDiastolicStandPressure(orgId, junStartStrUnix, junEndStrsUnix)
1334 1333
 		//7月
1335
-		_, julTotal, err := service.GetDiastolicBloodPressure(orgId, julStartStrUnix, julEndStrsUnix)
1336
-		_, julStandTotal, err := service.GetDiastolicStandPressure(orgId, julStartStrUnix, julEndStrsUnix)
1334
+		jullist, julTotal, err := service.GetDiastolicBloodPressure(orgId, julStartStrUnix, julEndStrsUnix)
1335
+		//_, julStandTotal, err := service.GetDiastolicStandPressure(orgId, julStartStrUnix, julEndStrsUnix)
1337 1336
 
1338 1337
 		//8月
1339
-		_, augTotal, err := service.GetDiastolicBloodPressure(orgId, augStartStrUnix, augEndStrsUnix)
1340
-		_, augStandTotal, err := service.GetDiastolicStandPressure(orgId, augStartStrUnix, augEndStrsUnix)
1338
+		auglist, augTotal, err := service.GetDiastolicBloodPressure(orgId, augStartStrUnix, augEndStrsUnix)
1339
+		//_, augStandTotal, err := service.GetDiastolicStandPressure(orgId, augStartStrUnix, augEndStrsUnix)
1341 1340
 
1342 1341
 		//9月
1343
-		_, sepTotal, err := service.GetDiastolicBloodPressure(orgId, sepStartStrUnix, sepEndStrsUnix)
1344
-		_, sepStandTotal, err := service.GetDiastolicStandPressure(orgId, sepStartStrUnix, sepEndStrsUnix)
1342
+		seplist, sepTotal, err := service.GetDiastolicBloodPressure(orgId, sepStartStrUnix, sepEndStrsUnix)
1343
+		//_, sepStandTotal, err := service.GetDiastolicStandPressure(orgId, sepStartStrUnix, sepEndStrsUnix)
1345 1344
 		//10月
1346
-		_, octTotal, err := service.GetDiastolicBloodPressure(orgId, octStartStrUnix, octEndStrsUnix)
1347
-		_, octStandTotal, err := service.GetDiastolicStandPressure(orgId, octStartStrUnix, octEndStrsUnix)
1345
+		octlist, octTotal, err := service.GetDiastolicBloodPressure(orgId, octStartStrUnix, octEndStrsUnix)
1346
+		//_, octStandTotal, err := service.GetDiastolicStandPressure(orgId, octStartStrUnix, octEndStrsUnix)
1348 1347
 		//11月
1349
-		_, novTotal, err := service.GetDiastolicBloodPressure(orgId, novStartStrUnix, novEndStrsUnix)
1350
-		_, novStandTotal, err := service.GetDiastolicStandPressure(orgId, novStartStrUnix, novEndStrsUnix)
1348
+		novlist, novTotal, err := service.GetDiastolicBloodPressure(orgId, novStartStrUnix, novEndStrsUnix)
1349
+		//_, novStandTotal, err := service.GetDiastolicStandPressure(orgId, novStartStrUnix, novEndStrsUnix)
1351 1350
 		//12月
1352
-		_, decTotal, err := service.GetDiastolicBloodPressure(orgId, decStartStrUnix, decEndStrsUnix)
1353
-		_, decStandTotal, err := service.GetDiastolicStandPressure(orgId, decStartStrUnix, decEndStrsUnix)
1351
+		declist, decTotal, err := service.GetDiastolicBloodPressure(orgId, decStartStrUnix, decEndStrsUnix)
1352
+		//_, decStandTotal, err := service.GetDiastolicStandPressure(orgId, decStartStrUnix, decEndStrsUnix)
1354 1353
 		if err != nil {
1355 1354
 			this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeSystemError)
1356 1355
 			return
1357 1356
 		}
1358 1357
 
1359 1358
 		this.ServeSuccessJSON(map[string]interface{}{
1360
-			"januaryTotal":      januaryTotal,
1361
-			"januaryStandTotal": januaryStandTotal,
1362
-			"febTotal":          febTotal,
1363
-			"febStandTotal":     febStandTotal,
1364
-			"marchTotal":        marchTotal,
1365
-			"marchStandTotal":   marchStandTotal,
1366
-			"aprTotal":          aprTotal,
1367
-			"aprStandTotal":     aprStandTotal,
1368
-			"mayTotal":          mayTotal,
1369
-			"mayStandTotal":     mayStandTotal,
1370
-			"junTotal":          junTotal,
1371
-			"junStandTotal":     junStandTotal,
1372
-			"julTotal":          julTotal,
1373
-			"julStandTotal":     julStandTotal,
1374
-			"augTotal":          augTotal,
1375
-			"augStandTotal":     augStandTotal,
1376
-			"sepTotal":          sepTotal,
1377
-			"sepStandTotal":     sepStandTotal,
1378
-			"octTotal":          octTotal,
1379
-			"octStandTotal":     octStandTotal,
1380
-			"novTotal":          novTotal,
1381
-			"novStandTotal":     novStandTotal,
1382
-			"decTotal":          decTotal,
1383
-			"decStandTotal":     decStandTotal,
1359
+			"januaryTotal": januaryTotal,
1360
+			"januarylist":  januarylist,
1361
+			"febTotal":     febTotal,
1362
+			"feblist":      feblist,
1363
+			"marchTotal":   marchTotal,
1364
+			"marlist":      marlist,
1365
+			"aprTotal":     aprTotal,
1366
+			"aprlist":      aprlist,
1367
+			"mayTotal":     mayTotal,
1368
+			"maylist":      maylist,
1369
+			"junTotal":     junTotal,
1370
+			"junlist":      junlist,
1371
+			"julTotal":     julTotal,
1372
+			"jullist":      jullist,
1373
+			"augTotal":     augTotal,
1374
+			"auglist":      auglist,
1375
+			"sepTotal":     sepTotal,
1376
+			"seplist":      seplist,
1377
+			"octTotal":     octTotal,
1378
+			"octlist":      octlist,
1379
+			"novTotal":     novTotal,
1380
+			"novlist":      novlist,
1381
+			"decTotal":     decTotal,
1382
+			"declist":      declist,
1384 1383
 		})
1385 1384
 	}
1386 1385
 }
@@ -1946,15 +1945,37 @@ func (this *NewCommonApiController) GetSystolicBloodStand() {
1946 1945
 	fmt.Println(endtimeUnix)
1947 1946
 
1948 1947
 	//获取数据
1949
-	recordList, err := service.GetDiastolicStand(orgId, startimeUnix, endtimeUnix)
1948
+	//recordList, err := service.GetDiastolicStand(orgId, startimeUnix, endtimeUnix,page,limit)
1950 1949
 	bloodPressure, err := service.GetDefaultBloodPressure(orgId)
1950
+	var sysMin string
1951
+	var sysLarge string
1952
+	var diaMin string
1953
+	var diaLarge string
1954
+	for index, value := range bloodPressure {
1955
+		fmt.Println("index", index)
1956
+		if value.InspectionMajor == 0 && value.InspectionMinor == -1 {
1957
+			sysMin = value.MinRange
1958
+			sysLarge = value.LargeRange
1959
+		}
1960
+		if value.InspectionMajor == 0 && value.InspectionMinor == -2 {
1961
+			diaMin = value.MinRange
1962
+			diaLarge = value.LargeRange
1963
+		}
1964
+	}
1965
+	sysmin, err := strconv.ParseInt(sysMin, 10, 64)
1966
+	syslarge, err := strconv.ParseInt(sysLarge, 10, 64)
1967
+	diamin, err := strconv.ParseInt(diaMin, 10, 64)
1968
+	dialarge, err := strconv.ParseInt(diaLarge, 10, 64)
1969
+	recordtwo, err := service.TotalSysStandCountTwo(orgId, startimeUnix, endtimeUnix, sysmin, syslarge, diamin, dialarge)
1970
+	record, err := service.TotalSysStandCount(orgId, startimeUnix, endtimeUnix, sysmin, syslarge, diamin, dialarge, page, limit)
1951 1971
 	if err != nil {
1952 1972
 		this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeSystemError)
1953 1973
 		return
1954 1974
 	}
1955 1975
 	this.ServeSuccessJSON(map[string]interface{}{
1956
-		"recordList":    recordList,
1976
+		"record":        record,
1957 1977
 		"bloodPressure": bloodPressure,
1978
+		"recordtwo":     recordtwo,
1958 1979
 	})
1959 1980
 }
1960 1981
 
@@ -1981,3 +2002,58 @@ func (this *NewCommonApiController) GetMobileIdsList() {
1981 2002
 		"vlist": vlist,
1982 2003
 	})
1983 2004
 }
2005
+
2006
+func (this *NewCommonApiController) GetSystolicBloodNoStand() {
2007
+	adminUser := this.GetMobileAdminUserInfo()
2008
+	orgId := adminUser.Org.Id
2009
+	fmt.Println("orgID", orgId)
2010
+	timeLayout := "2006-01-02"
2011
+	loc, _ := time.LoadLocation("Local")
2012
+	startime := this.GetString("startime")
2013
+	endtime := this.GetString("endtime")
2014
+	limit, _ := this.GetInt64("limit")
2015
+	fmt.Println("limit", limit)
2016
+	page, _ := this.GetInt64("page")
2017
+	fmt.Println("page", page)
2018
+	startTimes, _ := time.ParseInLocation(timeLayout+" 15:04:05", startime+" 00:00:00", loc)
2019
+	startimeUnix := startTimes.Unix()
2020
+	fmt.Println(startimeUnix)
2021
+	endtimes, _ := time.ParseInLocation(timeLayout+" 15:04:05", endtime+" 23:59:59", loc)
2022
+	endtimeUnix := endtimes.Unix()
2023
+	fmt.Println(endtimeUnix)
2024
+
2025
+	//获取数据
2026
+	//recordList, err := service.GetDiastolicStand(orgId, startimeUnix, endtimeUnix,page,limit)
2027
+	bloodPressure, err := service.GetDefaultBloodPressure(orgId)
2028
+	var sysMin string
2029
+	var sysLarge string
2030
+	var diaMin string
2031
+	var diaLarge string
2032
+	for index, value := range bloodPressure {
2033
+		fmt.Println("index", index)
2034
+		if value.InspectionMajor == 0 && value.InspectionMinor == -1 {
2035
+			sysMin = value.MinRange
2036
+			sysLarge = value.LargeRange
2037
+		}
2038
+		if value.InspectionMajor == 0 && value.InspectionMinor == -2 {
2039
+			diaMin = value.MinRange
2040
+			diaLarge = value.LargeRange
2041
+		}
2042
+	}
2043
+	sysmin, err := strconv.ParseInt(sysMin, 10, 64)
2044
+	syslarge, err := strconv.ParseInt(sysLarge, 10, 64)
2045
+	diamin, err := strconv.ParseInt(diaMin, 10, 64)
2046
+	dialarge, err := strconv.ParseInt(diaLarge, 10, 64)
2047
+
2048
+	recoredtwo, err := service.TotalSysNoStandCountTwo(orgId, startimeUnix, endtimeUnix, sysmin, syslarge, diamin, dialarge)
2049
+	record, err := service.TotalSysNoStandCount(orgId, startimeUnix, endtimeUnix, sysmin, syslarge, diamin, dialarge, page, limit)
2050
+	if err != nil {
2051
+		this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeSystemError)
2052
+		return
2053
+	}
2054
+	this.ServeSuccessJSON(map[string]interface{}{
2055
+		"record":        record,
2056
+		"bloodPressure": bloodPressure,
2057
+		"recoredtwo":    recoredtwo,
2058
+	})
2059
+}

+ 1 - 0
controllers/new_mobile_api_controllers/new_common_api_router.go Целия файл

@@ -41,4 +41,5 @@ func NewCommonApiControllersRegisterRouters() {
41 41
 	beego.Router("/m/api/gettargestanddetail", &NewCommonApiController{}, "Get:GetTargetStandDetail")
42 42
 	beego.Router("/m/api/getsystolicbloodstand", &NewCommonApiController{}, "Get:GetSystolicBloodStand")
43 43
 	beego.Router("/m/api/getmobileidslist", &NewCommonApiController{}, "post:GetMobileIdsList")
44
+	beego.Router("/m/api/getsystolicbloodnostand", &NewCommonApiController{}, "Get:GetSystolicBloodNoStand")
44 45
 }

+ 10 - 0
models/device_models.go Целия файл

@@ -869,3 +869,13 @@ func (DeviceMode) TableName() string {
869 869
 
870 870
 	return "xt_device_mode"
871 871
 }
872
+
873
+type VmDeviceInformation struct {
874
+	Total     int64
875
+	BedNumber int64 `gorm:"column:bed_number" json:"bed_number" form:"bed_number"`
876
+}
877
+
878
+func (VmDeviceInformation) TableName() string {
879
+
880
+	return "xt_device_information"
881
+}

+ 93 - 2
service/common_service.go Целия файл

@@ -3214,10 +3214,11 @@ func GetStandList(orgid int64, startime int64, endtime int64, limit int64, page
3214 3214
 	return inspection, err
3215 3215
 }
3216 3216
 
3217
-func GetDiastolicStand(orgid int64, startime int64, endtime int64) (record []*models.XTMonitoringRecords, err error) {
3217
+func GetDiastolicStand(orgid int64, startime int64, endtime int64, page int64, limit int64) (record []*models.XTMonitoringRecords, err error) {
3218 3218
 
3219 3219
 	db := XTReadDB().Table("xt_monitoring_record as x")
3220
-	err = db.Select("x.id,x.systolic_blood_pressure,x.diastolic_blood_pressure,x.patient_id,x.monitoring_date,s.name").Joins("left join xt_patients as s on s.id = x.patient_id").Where("x.user_org_id = ? and x.monitoring_date >=? and x.monitoring_date<=? and x.status = 1 and (x.systolic_blood_pressure <> 0 or x.diastolic_blood_pressure)", orgid, startime, endtime).Group("x.monitoring_date,x.patient_id").Scan(&record).Error
3220
+	offset := (page - 1) * limit
3221
+	err = db.Select("x.id,x.systolic_blood_pressure,x.diastolic_blood_pressure,x.patient_id,x.monitoring_date,s.name").Joins("left join xt_patients as s on s.id = x.patient_id").Where("x.user_org_id = ? and x.monitoring_date >=? and x.monitoring_date<=? and x.status = 1 and x.systolic_blood_pressure <> 0 and x.diastolic_blood_pressure <> 0)", orgid, startime, endtime).Offset(offset).Limit(limit).Group("x.monitoring_date,x.patient_id").Scan(&record).Error
3221 3222
 	return record, err
3222 3223
 }
3223 3224
 
@@ -3226,3 +3227,93 @@ func GetInspectionMoninList(id int64, orgid int64, patientid int64) (models.XtIn
3226 3227
 	err = XTReadDB().Model(&inspection).Where("item_id=? and org_id = ? and status = 1 and patient_id = ?", id, orgid, patientid).Last(&inspection).Error
3227 3228
 	return inspection, err
3228 3229
 }
3230
+
3231
+func TotalSysStandCountTwo(orgid int64, startime int64, endtime int64, sysmin int64, syslarge int64, diamin int64, dialarge int64) (record []*models.XTMonitoringRecords, err error) {
3232
+
3233
+	db := XTReadDB().Table("xt_monitoring_record as x").Where("x.status = 1")
3234
+	if orgid > 0 {
3235
+		db = db.Where("x.user_org_id = ? and x.systolic_blood_pressure<>0 and x.diastolic_blood_pressure<>0 ", orgid)
3236
+	}
3237
+	if startime > 0 {
3238
+		db = db.Where("x.monitoring_date>=?", startime)
3239
+	}
3240
+	if endtime > 0 {
3241
+		db = db.Where("x.monitoring_date<=?", endtime)
3242
+	}
3243
+	if sysmin > 0 {
3244
+		db = db.Where(" x.systolic_blood_pressure>=?", sysmin)
3245
+	}
3246
+	if syslarge > 0 {
3247
+		db = db.Where("x.systolic_blood_pressure<=?", syslarge)
3248
+	}
3249
+	if diamin > 0 {
3250
+		db = db.Where(" x.diastolic_blood_pressure>=?", diamin)
3251
+	}
3252
+	if dialarge > 0 {
3253
+		db = db.Where("x.diastolic_blood_pressure<=?", dialarge)
3254
+	}
3255
+	err = db.Select("x.id,x.user_org_id,x.systolic_blood_pressure,x.diastolic_blood_pressure,x.patient_id,x.monitoring_date,s.name").Joins("left join xt_patients as s on s.id = x.patient_id").Where("s.status = 1").Group("x.monitoring_date,x.patient_id").Order("x.monitoring_date desc").Scan(&record).Error
3256
+	return record, err
3257
+}
3258
+
3259
+func TotalSysStandCount(orgid int64, startime int64, endtime int64, sysmin int64, syslarge int64, diamin int64, dialarge int64, page int64, limit int64) (record []*models.XTMonitoringRecords, err error) {
3260
+
3261
+	db := XTReadDB().Table("xt_monitoring_record as x").Where("x.status = 1")
3262
+	if orgid > 0 {
3263
+		db = db.Where("x.user_org_id = ? and x.systolic_blood_pressure<>0 and x.diastolic_blood_pressure<>0 ", orgid)
3264
+	}
3265
+	if startime > 0 {
3266
+		db = db.Where("x.monitoring_date>=?", startime)
3267
+	}
3268
+	if endtime > 0 {
3269
+		db = db.Where("x.monitoring_date<=?", endtime)
3270
+	}
3271
+	if sysmin > 0 {
3272
+		db = db.Where(" x.systolic_blood_pressure>=?", sysmin)
3273
+	}
3274
+	if syslarge > 0 {
3275
+		db = db.Where("x.systolic_blood_pressure<=?", syslarge)
3276
+	}
3277
+	if diamin > 0 {
3278
+		db = db.Where(" x.diastolic_blood_pressure>=?", diamin)
3279
+	}
3280
+	if dialarge > 0 {
3281
+		db = db.Where("x.diastolic_blood_pressure<=?", dialarge)
3282
+	}
3283
+	offset := (page - 1) * limit
3284
+	err = db.Select("x.id,x.user_org_id,x.systolic_blood_pressure,x.diastolic_blood_pressure,x.patient_id,x.monitoring_date,s.name").Joins("left join xt_patients as s on s.id = x.patient_id").Where("s.status = 1").Group("x.monitoring_date,x.patient_id").Offset(offset).Limit(limit).Order("x.monitoring_date desc").Scan(&record).Error
3285
+	return record, err
3286
+}
3287
+
3288
+func TotalSysNoStandCountTwo(orgid int64, startime int64, endtime int64, sysmin int64, syslarge int64, diamin int64, dialarge int64) (record []*models.XTMonitoringRecords, err error) {
3289
+
3290
+	db := XTReadDB().Table("xt_monitoring_record as x").Where("x.status = 1")
3291
+	if orgid > 0 {
3292
+		db = db.Where("x.user_org_id = ? and x.systolic_blood_pressure<>0 and x.diastolic_blood_pressure<>0 ", orgid)
3293
+	}
3294
+	if startime > 0 {
3295
+		db = db.Where("x.monitoring_date>=?", startime)
3296
+	}
3297
+	if endtime > 0 {
3298
+		db = db.Where("x.monitoring_date<=?", endtime)
3299
+	}
3300
+	err = db.Select("x.id,x.user_org_id,x.systolic_blood_pressure,x.diastolic_blood_pressure,x.patient_id,x.monitoring_date,s.name").Joins("left join xt_patients as s on s.id = x.patient_id").Where("s.status = 1 and(x.systolic_blood_pressure<=? or x.systolic_blood_pressure>=?) or (x.diastolic_blood_pressure<=? or x.diastolic_blood_pressure>=?)", sysmin, syslarge, diamin, dialarge).Group("x.monitoring_date,x.patient_id").Order("x.monitoring_date desc").Scan(&record).Error
3301
+	return record, err
3302
+}
3303
+
3304
+func TotalSysNoStandCount(orgid int64, startime int64, endtime int64, sysmin int64, syslarge int64, diamin int64, dialarge int64, page int64, limit int64) (record []*models.XTMonitoringRecords, err error) {
3305
+
3306
+	db := XTReadDB().Table("xt_monitoring_record as x").Where("x.status = 1")
3307
+	if orgid > 0 {
3308
+		db = db.Where("x.user_org_id = ? and x.systolic_blood_pressure<>0 and x.diastolic_blood_pressure<>0 ", orgid)
3309
+	}
3310
+	if startime > 0 {
3311
+		db = db.Where("x.monitoring_date>=?", startime)
3312
+	}
3313
+	if endtime > 0 {
3314
+		db = db.Where("x.monitoring_date<=?", endtime)
3315
+	}
3316
+	offset := (page - 1) * limit
3317
+	err = db.Select("x.id,x.user_org_id,x.systolic_blood_pressure,x.diastolic_blood_pressure,x.patient_id,x.monitoring_date,s.name").Joins("left join xt_patients as s on s.id = x.patient_id").Where("s.status = 1 and(x.systolic_blood_pressure<=? or x.systolic_blood_pressure>=?) or (x.diastolic_blood_pressure<=? or x.diastolic_blood_pressure>=?)", sysmin, syslarge, diamin, dialarge).Group("x.monitoring_date,x.patient_id").Offset(offset).Limit(limit).Order("x.monitoring_date desc").Scan(&record).Error
3318
+	return record, err
3319
+}

+ 93 - 0
service/manage_service.go Целия файл

@@ -1112,3 +1112,96 @@ func GetOrgs(id int64) (roles []*models.SgjUserAdminRole, err error) {
1112 1112
 
1113 1113
 	return roles, err
1114 1114
 }
1115
+
1116
+func GetUserMachTotalCount(orgid int64) (vm []*models.VmDeviceInformation, err error) {
1117
+
1118
+	err = UserReadDB().Raw("SELECT x.bed_number,count(*) as total  FROM xt_device_information  as x WHERE user_org_id = ? and `status` = 1 GROUP BY x.bed_number ", orgid).Scan(&vm).Error
1119
+	return vm, err
1120
+}
1121
+
1122
+func GetUserTotalByMacher(id int64) (models.DeviceAddmacher, error) {
1123
+	addmacher := models.DeviceAddmacher{}
1124
+	err := UserReadDB().Model(&addmacher).Where("id=? and status = 1", id).Find(&addmacher).Error
1125
+	return addmacher, err
1126
+}
1127
+
1128
+func GetUserTotalCount(orgid int64, bedid int64) (vm []*models.VmDeviceInformation, err error) {
1129
+
1130
+	err = UserReadDB().Raw("SELECT x.bed_number,count(*) as total  FROM xt_device_information  as x WHERE user_org_id = ? and `status` = 1 and bed_number= ? GROUP BY x.bed_number ", orgid, bedid).Scan(&vm).Error
1131
+	return vm, err
1132
+
1133
+}
1134
+
1135
+func GetUserTotal(orgid int64, id int64) (models.DeviceAddmacher, error) {
1136
+	addmacher := models.DeviceAddmacher{}
1137
+	err := UserReadDB().Model(&addmacher).Where("user_org_id = ? and bed_id = ? and status = 1", orgid, id).Find(&addmacher).Error
1138
+	return addmacher, err
1139
+}
1140
+
1141
+func GetDisInfectionTime(orgid int64, bedid int64, scheduletype int64, scheduleweek int64) (*models.DevicePlan, error) {
1142
+	plan := models.DevicePlan{}
1143
+	err = UserReadDB().Model(&plan).Where("user_org_id = ? and bed_id = ? and classtime = ? and time = ? and status = 1", orgid, bedid, scheduletype, scheduleweek).Find(&plan).Error
1144
+	if err == gorm.ErrRecordNotFound {
1145
+		return nil, err
1146
+	}
1147
+	if err != nil {
1148
+		return nil, err
1149
+	}
1150
+	return &plan, nil
1151
+}
1152
+
1153
+func GetLaseDeviceInfomation(orgid int64, bedid int64) (models.DeviceInformation, error) {
1154
+
1155
+	information := models.DeviceInformation{}
1156
+	err := UserReadDB().Model(&information).Where("bed_number = ? and user_org_id =? and status = 1", bedid, orgid).Last(&information).Error
1157
+	return information, err
1158
+}
1159
+
1160
+func GetAssessmentAfterDissDataTwo(patientid int64, orgID int64, timenow int64) (models.XtAssessmentAfterDislysis, error) {
1161
+	dislysis := models.XtAssessmentAfterDislysis{}
1162
+	err := XTReadDB().Where("patient_id = ? AND user_org_id = ? AND assessment_date = ?", patientid, orgID, timenow).Find(&dislysis).Error
1163
+	return dislysis, err
1164
+}
1165
+
1166
+func GetEquimentIDTwo(bedId int64, orgID int64) (models.DeviceAddmacher, error) {
1167
+	addmacher := models.DeviceAddmacher{}
1168
+	err := readUserDb.Model(&addmacher).Where("bed_id = ? AND user_org_id = ? AND status = ?", bedId, orgID, 1).Find(&addmacher).Error
1169
+	return addmacher, err
1170
+}
1171
+
1172
+func GetDisinfectionTwo(equitType int64, enquitType int64, orgID int64) (*models.DevicePlan, error) {
1173
+	var plan models.DevicePlan
1174
+	var err error
1175
+	err = readUserDb.Model(&plan).Where("device_type = ? AND classtime = ? AND user_org_id = ? AND status = 1", equitType, enquitType, orgID).Find(&plan).Error
1176
+	if err == gorm.ErrRecordNotFound {
1177
+		return nil, err
1178
+	}
1179
+	if err != nil {
1180
+		return nil, err
1181
+	}
1182
+	return &plan, nil
1183
+}
1184
+
1185
+func GetInforTwo(patientid int64, timenow int64, orgid int64, class int64) (*models.DeviceInformation, error) {
1186
+	var pre models.DeviceInformation
1187
+	var err error
1188
+	err = readUserDb.Model(&pre).Where("patient_id = ? AND date = ? AND user_org_id = ? AND class = ? AND status = 1", patientid, timenow, orgid, class).Find(&pre).Error
1189
+	if err == gorm.ErrRecordNotFound {
1190
+		return nil, err
1191
+	}
1192
+	if err != nil {
1193
+		return nil, err
1194
+	}
1195
+	return &pre, nil
1196
+}
1197
+
1198
+func GetPatientOrderInfo(schduledate int64, patientid int64, orgid int64) (models.XtDialysisOrder, error) {
1199
+	order := models.XtDialysisOrder{}
1200
+	err := XTReadDB().Model(&order).Where("dialysis_date = ? and patient_id = ? and user_org_id = ? and status = 1", schduledate, patientid, orgid).Find(&order).Error
1201
+	return order, err
1202
+}
1203
+
1204
+func CreateInformationTwo(information *models.DeviceInformation) error {
1205
+	err := UserWriteDB().Create(&information).Error
1206
+	return err
1207
+}

+ 1 - 0
service/mobile_dialysis_service.go Целия файл

@@ -80,6 +80,7 @@ type MDialysisScheduleVM struct {
80 80
 	PatientId    int64 `gorm:"column:patient_id" json:"patient_id"`
81 81
 	ScheduleDate int64 `gorm:"column:schedule_date" json:"schedule_date"`
82 82
 	ScheduleType int64 `gorm:"column:schedule_type" json:"schedule_type"`
83
+	ScheduleWeek int64 `gorm:"column:schedule_week" json:"schedule_week"`
83 84
 	ModeId       int64 `gorm:"column:mode_id" json:"mode_id"`
84 85
 	Status       int64 `gorm:"column:status" json:"status"`
85 86