|
@@ -89,20 +89,20 @@ func (this *CommonApiController) SaveConfiguration() {
|
89
|
89
|
err := json.Unmarshal(this.Ctx.Input.RequestBody, &dataBody)
|
90
|
90
|
fmt.Println("err", err)
|
91
|
91
|
inspectionmajor := int64(dataBody["inspectionMajor"].(float64))
|
92
|
|
- fmt.Println("大项", inspectionmajor)
|
|
92
|
+
|
93
|
93
|
inspectionMinor := int64(dataBody["inspectionMinor"].(float64))
|
94
|
|
- fmt.Println("小项", inspectionMinor)
|
|
94
|
+
|
95
|
95
|
minrange := dataBody["min_range"].(string)
|
96
|
|
- fmt.Println("minragne", minrange)
|
|
96
|
+
|
97
|
97
|
largerange := dataBody["large_range"].(string)
|
98
|
98
|
fmt.Println("largerange", largerange)
|
99
|
99
|
sort := dataBody["sort"].(string)
|
100
|
100
|
sorts, err := strconv.ParseInt(sort, 10, 64)
|
101
|
|
- fmt.Println("sort", sort)
|
|
101
|
+
|
102
|
102
|
checktype := int64(dataBody["check_type"].(float64))
|
103
|
|
- fmt.Println("检查类型", checktype)
|
|
103
|
+
|
104
|
104
|
rangvalue := dataBody["range_value"].(string)
|
105
|
|
- fmt.Println("rangvalue", rangvalue)
|
|
105
|
+
|
106
|
106
|
if rangvalue == "0" {
|
107
|
107
|
rangvalue = ""
|
108
|
108
|
}
|
|
@@ -154,7 +154,7 @@ func (this *CommonApiController) GetConfigurationlist() {
|
154
|
154
|
|
155
|
155
|
func (this *CommonApiController) GetConfigurationDetail() {
|
156
|
156
|
id, _ := this.GetInt64("id")
|
157
|
|
- fmt.Println("id是", id)
|
|
157
|
+
|
158
|
158
|
detail, err := service.GetConfigurationDetail(id)
|
159
|
159
|
if err != nil {
|
160
|
160
|
this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeSystemError)
|
|
@@ -179,22 +179,22 @@ func (this *CommonApiController) GetAllInspectionminor() {
|
179
|
179
|
|
180
|
180
|
func (this *CommonApiController) UpdateConfiguration() {
|
181
|
181
|
id, _ := this.GetInt64("id")
|
182
|
|
- fmt.Println("id", id)
|
|
182
|
+
|
183
|
183
|
dataBody := make(map[string]interface{}, 0)
|
184
|
184
|
err := json.Unmarshal(this.Ctx.Input.RequestBody, &dataBody)
|
185
|
|
- fmt.Println("err", err)
|
|
185
|
+
|
186
|
186
|
inspectionmajor := int64(dataBody["inspectionMajor"].(float64))
|
187
|
|
- fmt.Println("大项", inspectionmajor)
|
|
187
|
+
|
188
|
188
|
inspectionMinor := int64(dataBody["inspectionMinor"].(float64))
|
189
|
|
- fmt.Println("小项", inspectionMinor)
|
|
189
|
+
|
190
|
190
|
minrange := dataBody["min_range"].(string)
|
191
|
|
- fmt.Println("minragne", minrange)
|
|
191
|
+
|
192
|
192
|
largerange := dataBody["large_range"].(string)
|
193
|
|
- fmt.Println("largerange", largerange)
|
|
193
|
+
|
194
|
194
|
sort := int64(dataBody["sort"].(float64))
|
195
|
|
- fmt.Println("排序", sort)
|
|
195
|
+
|
196
|
196
|
rangvalue := dataBody["range_value"].(string)
|
197
|
|
- fmt.Println("范围", rangvalue)
|
|
197
|
+
|
198
|
198
|
if rangvalue == "0" {
|
199
|
199
|
rangvalue = ""
|
200
|
200
|
}
|
|
@@ -279,12 +279,12 @@ func (this *CommonApiController) SaveCheckConfiguration() {
|
279
|
279
|
adminUser := this.GetAdminUserInfo()
|
280
|
280
|
orgid := adminUser.CurrentOrgId
|
281
|
281
|
inspectionmajor := int64(dataBody["inspectionMajor"].(float64))
|
282
|
|
- fmt.Println("大项", inspectionmajor)
|
|
282
|
+
|
283
|
283
|
frequency := dataBody["frequency"].(string)
|
284
|
|
- fmt.Println("凭次", frequency)
|
|
284
|
+
|
285
|
285
|
sort := dataBody["sort"].(string)
|
286
|
286
|
sorts, err := strconv.ParseInt(sort, 10, 64)
|
287
|
|
- fmt.Println("sort", sort)
|
|
287
|
+
|
288
|
288
|
_, errcode := service.GetInspectionMajorById(inspectionmajor, orgid)
|
289
|
289
|
if errcode == gorm.ErrRecordNotFound {
|
290
|
290
|
configuration := models.XtCheckConfiguration{
|
|
@@ -312,7 +312,7 @@ func (this *CommonApiController) SaveCheckConfiguration() {
|
312
|
312
|
func (this *CommonApiController) GetAllCheckList() {
|
313
|
313
|
adminUser := this.GetAdminUserInfo()
|
314
|
314
|
orgid := adminUser.CurrentOrgId
|
315
|
|
- fmt.Println("org", orgid)
|
|
315
|
+
|
316
|
316
|
page, _ := this.GetInt64("page")
|
317
|
317
|
limit, _ := this.GetInt64("limit")
|
318
|
318
|
checkList, total, err := service.GetAllCheckList(orgid, page, limit)
|
|
@@ -346,11 +346,11 @@ func (this *CommonApiController) UpdateCheck() {
|
346
|
346
|
err := json.Unmarshal(this.Ctx.Input.RequestBody, &dataBody)
|
347
|
347
|
fmt.Println(err)
|
348
|
348
|
inspectionmajor := int64(dataBody["inspectionMajor"].(float64))
|
349
|
|
- fmt.Println("大项", inspectionmajor)
|
|
349
|
+
|
350
|
350
|
frequency := dataBody["frequency"].(string)
|
351
|
|
- fmt.Println("凭次", frequency)
|
|
351
|
+
|
352
|
352
|
sort := int64(dataBody["sort"].(float64))
|
353
|
|
- fmt.Println("sort", sort)
|
|
353
|
+
|
354
|
354
|
adminInfo := this.GetAdminUserInfo()
|
355
|
355
|
orgId := adminInfo.CurrentOrgId
|
356
|
356
|
Inspection, err := service.GetInspectionMajorByIdTwo(inspectionmajor, orgId)
|
|
@@ -393,7 +393,7 @@ func (this *CommonApiController) GetDialysisModeType() {
|
393
|
393
|
loc, _ := time.LoadLocation("Local")
|
394
|
394
|
startime := this.GetString("startime")
|
395
|
395
|
endtime := this.GetString("endtime")
|
396
|
|
- fmt.Println("endtime", endtime)
|
|
396
|
+
|
397
|
397
|
startTimes, _ := time.ParseInLocation(timeLayout+" 15:04:05", startime+" 00:00:00", loc)
|
398
|
398
|
startimes := startTimes.Unix()
|
399
|
399
|
|
|
@@ -424,19 +424,15 @@ func (this *CommonApiController) GetTotalLapseCount() {
|
424
|
424
|
startime := this.GetString("startime")
|
425
|
425
|
startTimes, _ := time.ParseInLocation(timeLayout+" 15:04:05", startime+" 00:00:00", loc)
|
426
|
426
|
startnunix := startTimes.Unix()
|
427
|
|
-
|
|
427
|
+ fmt.Println("开始时间---------------", startnunix)
|
428
|
428
|
endtime := this.GetString("endtime")
|
429
|
429
|
endtimes, _ := time.ParseInLocation(timeLayout+" 15:04:05", endtime+" 23:59:59", loc)
|
430
|
430
|
endunix := endtimes.Unix()
|
431
|
|
-
|
432
|
|
-
|
433
|
|
-
|
|
431
|
+ fmt.Println("endunix==========", endunix)
|
434
|
432
|
|
435
|
433
|
patients, err := service.GetTotalRollOutPatients(orgid, startnunix, endunix)
|
436
|
434
|
|
437
|
435
|
patienttwo, err := service.GetTotalRollOutPatientsTwo(orgid, startnunix, endunix)
|
438
|
|
-
|
439
|
|
-
|
440
|
436
|
count := service.GetPatientTotalCount(orgid)
|
441
|
437
|
if err != nil {
|
442
|
438
|
this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeSystemError)
|
|
@@ -682,12 +678,12 @@ func (this *CommonApiController) GetPrescritionByName() {
|
682
|
678
|
endDate, _ := utils.ParseTimeStringToTime("2006-01-02", endtime)
|
683
|
679
|
|
684
|
680
|
entime := endDate.Unix()
|
685
|
|
- fmt.Println("开始时间", statime)
|
686
|
|
- fmt.Println(endtime)
|
|
681
|
+
|
|
682
|
+
|
687
|
683
|
limit, _ := this.GetInt64("limit")
|
688
|
|
- fmt.Println("limit", limit)
|
|
684
|
+
|
689
|
685
|
page, _ := this.GetInt64("page")
|
690
|
|
- fmt.Println("page", page)
|
|
686
|
+
|
691
|
687
|
patient, total, err := service.GetPrescritionByName(orgId, patientid, statime, entime, limit, page)
|
692
|
688
|
if err != nil {
|
693
|
689
|
this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeSystemError)
|
|
@@ -702,23 +698,23 @@ func (this *CommonApiController) GetPrescritionByName() {
|
702
|
698
|
func (this *CommonApiController) GetStatistics() {
|
703
|
699
|
adminUser := this.GetAdminUserInfo()
|
704
|
700
|
orgId := adminUser.CurrentOrgId
|
705
|
|
- fmt.Println("orgid", orgId)
|
|
701
|
+
|
706
|
702
|
startime := this.GetString("start_time")
|
707
|
|
- fmt.Println(startime)
|
|
703
|
+
|
708
|
704
|
endtime := this.GetString("end_time")
|
709
|
705
|
startDate, parseDateErr := utils.ParseTimeStringToTime("2006-01-02", startime)
|
710
|
706
|
fmt.Println("parseDateErr", parseDateErr)
|
711
|
707
|
statime := startDate.Unix()
|
712
|
|
- fmt.Println("开始时间", statime)
|
|
708
|
+
|
713
|
709
|
endDate, _ := utils.ParseTimeStringToTime("2006-01-02", endtime)
|
714
|
710
|
entime := endDate.Unix()
|
715
|
|
- fmt.Println("结束日期", entime)
|
|
711
|
+
|
716
|
712
|
value, _ := this.GetInt64("value")
|
717
|
|
- fmt.Println("value", value)
|
|
713
|
+
|
718
|
714
|
limit, _ := this.GetInt64("limit")
|
719
|
|
- fmt.Println("limit", limit)
|
|
715
|
+
|
720
|
716
|
page, _ := this.GetInt64("page")
|
721
|
|
- fmt.Println("page", page)
|
|
717
|
+
|
722
|
718
|
modeId, _ := this.GetInt64("mode_id")
|
723
|
719
|
treatinfo, total, err := service.GetTreateInfo(orgId, statime, entime, value, limit, page)
|
724
|
720
|
statistics, ttd, _ := service.GetStatistics(orgId, statime, entime, modeId)
|