Browse Source

患者检验检查统计开发

XMLWAN 4 years ago
parent
commit
e731a394c1
1 changed files with 17 additions and 2 deletions
  1. 17 2
      controllers/new_mobile_api_controllers/new_common_api_controller.go

+ 17 - 2
controllers/new_mobile_api_controllers/new_common_api_controller.go View File

@@ -471,9 +471,9 @@ func (this *NewCommonApiController) GetMobileProjectlsit() {
471 471
 	fourQuarterEnds, _ := utils.ParseTimeStringToTime("2006-01-02 15:04:05", fourQuarterEndStr)
472 472
 	fourQuarterEndStrUnix := fourQuarterEnds.Unix()
473 473
 	//fmt.Println("第四季度结束时间", fourQuarterEndStrUnix)
474
-
474
+	rangetype, _ := this.GetInt64("range_type")
475 475
 	//按季度统计
476
-	if itemtype == 1 {
476
+	if rangetype == 1 {
477 477
 		//统计总共
478 478
 		list, err := service.GetProjectList(orgid, lapseto, modetype, firstQuarterStartUnix, fourQuarterEndStrUnix, firstQuarterStartUnix, fisrtQuarterEndStrUnix, secondeQuarterStartUnix, secondQuarterEndStrUnix, threeQuarterStartUnix, threeQuarterEndStrUnix, fourQuarterStartUnix, fourQuarterEndStrUnix)
479 479
 		//统计达标个数
@@ -488,6 +488,21 @@ func (this *NewCommonApiController) GetMobileProjectlsit() {
488 488
 			"standList": standList,
489 489
 		})
490 490
 	}
491
+
492
+	if rangetype == 2 {
493
+		list, err := service.GetProjectListOne(orgid, lapseto, modetype, firstQuarterStartUnix, fourQuarterEndStrUnix, firstQuarterStartUnix, fisrtQuarterEndStrUnix, secondeQuarterStartUnix, secondQuarterEndStrUnix, threeQuarterStartUnix, threeQuarterEndStrUnix, fourQuarterStartUnix, fourQuarterEndStrUnix)
494
+		//统计达标个数
495
+		standList, err := service.GetProjectStandListOne(orgid, lapseto, modetype, firstQuarterStartUnix, fourQuarterEndStrUnix, firstQuarterStartUnix, fisrtQuarterEndStrUnix, secondeQuarterStartUnix, secondQuarterEndStrUnix, threeQuarterStartUnix, threeQuarterEndStrUnix, fourQuarterStartUnix, fourQuarterEndStrUnix)
496
+		if err != nil {
497
+			this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeSystemError)
498
+			return
499
+		}
500
+
501
+		this.ServeSuccessJSON(map[string]interface{}{
502
+			"list":      list,
503
+			"standList": standList,
504
+		})
505
+	}
491 506
 }
492 507
 
493 508
 func (this *NewCommonApiController) GetMobileFirstQuarter() {