Browse Source

Merge branch 'master' of http://git.shengws.com/csx/XT_Admin_Api

csx 5 years ago
parent
commit
93dd62c4b3

+ 55 - 53
.idea/workspace.xml View File

@@ -3,9 +3,9 @@
3 3
   <component name="ChangeListManager">
4 4
     <list default="true" id="7aa7cc45-aece-4fa3-9063-5e3df12471b4" name="Default" comment="">
5 5
       <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
6
+      <change beforePath="$PROJECT_DIR$/XT_Admin_Api.exe" beforeDir="false" afterPath="$PROJECT_DIR$/XT_Admin_Api.exe" afterDir="false" />
6 7
       <change beforePath="$PROJECT_DIR$/controllers/function_api_controllers/function_api_base_controller.go" beforeDir="false" afterPath="$PROJECT_DIR$/controllers/function_api_controllers/function_api_base_controller.go" afterDir="false" />
7 8
       <change beforePath="$PROJECT_DIR$/controllers/function_api_controllers/function_api_router_register.go" beforeDir="false" afterPath="$PROJECT_DIR$/controllers/function_api_controllers/function_api_router_register.go" afterDir="false" />
8
-      <change beforePath="$PROJECT_DIR$/models/function_models/fuction_query_models.go" beforeDir="false" afterPath="$PROJECT_DIR$/models/function_models/fuction_query_models.go" afterDir="false" />
9 9
       <change beforePath="$PROJECT_DIR$/service/function_service.go" beforeDir="false" afterPath="$PROJECT_DIR$/service/function_service.go" afterDir="false" />
10 10
     </list>
11 11
     <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
@@ -17,20 +17,11 @@
17 17
   </component>
18 18
   <component name="FileEditorManager">
19 19
     <leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
20
-      <file leaf-file-name="analysis_api_controller.go" pinned="false" current-in-tab="false">
21
-        <entry file="file://$PROJECT_DIR$/controllers/admin_api_controllers/analysis_api_controller.go">
22
-          <provider selected="true" editor-type-id="text-editor">
23
-            <state relative-caret-position="437">
24
-              <caret line="427" selection-start-line="427" selection-end-line="427" />
25
-            </state>
26
-          </provider>
27
-        </entry>
28
-      </file>
29 20
       <file leaf-file-name="function_api_router_register.go" pinned="false" current-in-tab="false">
30 21
         <entry file="file://$PROJECT_DIR$/controllers/function_api_controllers/function_api_router_register.go">
31 22
           <provider selected="true" editor-type-id="text-editor">
32
-            <state relative-caret-position="388">
33
-              <caret line="95" selection-start-line="95" selection-end-line="95" />
23
+            <state relative-caret-position="47">
24
+              <caret line="87" column="79" selection-start-line="87" selection-start-column="54" selection-end-line="87" selection-end-column="79" />
34 25
               <folding>
35 26
                 <element signature="e#34#79#0" expanded="true" />
36 27
               </folding>
@@ -50,8 +41,8 @@
50 41
       <file leaf-file-name="function_service.go" pinned="false" current-in-tab="true">
51 42
         <entry file="file://$PROJECT_DIR$/service/function_service.go">
52 43
           <provider selected="true" editor-type-id="text-editor">
53
-            <state relative-caret-position="228">
54
-              <caret line="149" column="219" selection-start-line="149" selection-start-column="219" selection-end-line="149" selection-end-column="219" />
44
+            <state relative-caret-position="296">
45
+              <caret line="137" column="248" selection-start-line="137" selection-start-column="248" selection-end-line="137" selection-end-column="248" />
55 46
               <folding>
56 47
                 <element signature="e#17#73#0" expanded="true" />
57 48
               </folding>
@@ -62,7 +53,7 @@
62 53
       <file leaf-file-name="fuction_query_models.go" pinned="false" current-in-tab="false">
63 54
         <entry file="file://$PROJECT_DIR$/models/function_models/fuction_query_models.go">
64 55
           <provider selected="true" editor-type-id="text-editor">
65
-            <state relative-caret-position="471">
56
+            <state relative-caret-position="11286">
66 57
               <caret line="513" column="13" selection-start-line="513" selection-start-column="13" selection-end-line="513" selection-end-column="13" />
67 58
             </state>
68 59
           </provider>
@@ -71,8 +62,8 @@
71 62
       <file leaf-file-name="function_api_base_controller.go" pinned="false" current-in-tab="false">
72 63
         <entry file="file://$PROJECT_DIR$/controllers/function_api_controllers/function_api_base_controller.go">
73 64
           <provider selected="true" editor-type-id="text-editor">
74
-            <state relative-caret-position="168">
75
-              <caret line="3556" column="51" selection-start-line="3556" selection-start-column="35" selection-end-line="3556" selection-end-column="51" />
65
+            <state relative-caret-position="319">
66
+              <caret line="3601" column="90" selection-start-line="3601" selection-start-column="90" selection-end-line="3601" selection-end-column="90" />
76 67
             </state>
77 68
           </provider>
78 69
         </entry>
@@ -89,7 +80,7 @@
89 80
       <file leaf-file-name="router.go" pinned="false" current-in-tab="false">
90 81
         <entry file="file://$PROJECT_DIR$/routers/router.go">
91 82
           <provider selected="true" editor-type-id="text-editor">
92
-            <state relative-caret-position="104">
83
+            <state relative-caret-position="154">
93 84
               <caret line="12" column="80" selection-start-line="12" selection-start-column="71" selection-end-line="12" selection-end-column="80" />
94 85
             </state>
95 86
           </provider>
@@ -106,12 +97,6 @@
106 97
   </component>
107 98
   <component name="FindInProjectRecents">
108 99
     <findStrings>
109
-      <find>/admin/api/patient/analysis</find>
110
-      <find>PatientAnalysis</find>
111
-      <find>AdminAPIControllersRegisterRouters</find>
112
-      <find>admin_api_controllers</find>
113
-      <find>/admin/api/home/statistics</find>
114
-      <find>HomeStatistics</find>
115 100
       <find>SchedualPatient</find>
116 101
       <find>patient_count_list</find>
117 102
       <find>aaa</find>
@@ -124,6 +109,24 @@
124 109
       <find>/api/function/getBeforDislysis</find>
125 110
       <find>GetTodayBeforDislysisInfo</find>
126 111
       <find>GetTodayInfo</find>
112
+      <find>/api/function/getYesterdayDialysisinfo</find>
113
+      <find>GetYesterTodayDialysisInfo</find>
114
+      <find>GetYesTodayReceiveinfo</find>
115
+      <find>/api/function/getyesterdayBeforDislysis</find>
116
+      <find>GetYesterDayDoctorsOrderInfo</find>
117
+      <find>GetYesterTodayBeforDislysisInfo</find>
118
+      <find>/api/function/getyearstodayDoctorOrder</find>
119
+      <find>/api/function/getYesTodayDoubleCheckInfo</find>
120
+      <find>/api/function/getyesterdayDialysisMachine</find>
121
+      <find>GetYesterTodayDialysisMachinek</find>
122
+      <find>GetYesTodayDialysisExamination</find>
123
+      <find>/api/function/getyesterdaybeforpenetration</find>
124
+      <find>GetYesterDayBeforpinetration</find>
125
+      <find>/api/function/getYesterDayPostAssessment</find>
126
+      <find>/api/function/getyesterdayentrylist</find>
127
+      <find>GetYesterdayEntrylist</find>
128
+      <find>GetYesterdayExitlist</find>
129
+      <find>/api/function/getyestrdayexitlist</find>
127 130
     </findStrings>
128 131
     <dirStrings>
129 132
       <dir>D:\goyard\src\XT_Admin_Api\controllers\admin_api_controllers</dir>
@@ -155,9 +158,8 @@
155 158
     <sorting>DEFINITION_ORDER</sorting>
156 159
   </component>
157 160
   <component name="ProjectFrameBounds" extendedState="6">
158
-    <option name="x" value="37" />
159
-    <option name="y" value="53" />
160
-    <option name="width" value="1690" />
161
+    <option name="x" value="525" />
162
+    <option name="width" value="1230" />
161 163
     <option name="height" value="1040" />
162 164
   </component>
163 165
   <component name="ProjectView">
@@ -209,7 +211,7 @@
209 211
     <property name="DefaultGoTemplateProperty" value="Go Application" />
210 212
     <property name="go.gopath.indexing.explicitly.defined" value="true" />
211 213
     <property name="go.sdk.automatically.set" value="true" />
212
-    <property name="last_opened_file_path" value="$PROJECT_DIR$/../SCRM" />
214
+    <property name="last_opened_file_path" value="$PROJECT_DIR$/../XT" />
213 215
   </component>
214 216
   <component name="RunDashboard">
215 217
     <option name="ruleStates">
@@ -226,15 +228,15 @@
226 228
   <component name="ToolWindowManager">
227 229
     <frame x="-7" y="-7" width="1550" height="838" extended-state="6" />
228 230
     <layout>
229
-      <window_info content_ui="combo" id="Project" order="0" visible="true" weight="0.20442359" />
231
+      <window_info content_ui="combo" id="Project" order="0" visible="true" weight="0.20710456" />
230 232
       <window_info anchor="bottom" id="TODO" order="6" />
231
-      <window_info anchor="bottom" id="Event Log" order="7" sideWeight="0.102546915" side_tool="true" visible="true" weight="0.47075605" />
233
+      <window_info anchor="bottom" id="Event Log" order="7" sideWeight="0.113270774" side_tool="true" visible="true" weight="0.39372325" />
232 234
       <window_info anchor="right" id="Database" order="3" />
233 235
       <window_info anchor="bottom" id="Database Changes" order="8" show_stripe_button="false" />
234 236
       <window_info anchor="bottom" id="Version Control" order="9" />
235 237
       <window_info anchor="bottom" id="Run" order="2" />
236 238
       <window_info id="Structure" order="1" side_tool="true" weight="0.25" />
237
-      <window_info active="true" anchor="bottom" id="Terminal" order="10" sideWeight="0.89745307" visible="true" weight="0.47075605" />
239
+      <window_info active="true" anchor="bottom" id="Terminal" order="10" sideWeight="0.88672924" visible="true" weight="0.39372325" />
238 240
       <window_info id="Favorites" order="2" side_tool="true" />
239 241
       <window_info anchor="bottom" id="Debug" order="3" weight="0.4" />
240 242
       <window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" />
@@ -570,18 +572,11 @@
570 572
     </entry>
571 573
     <entry file="file://$PROJECT_DIR$/routers/router.go">
572 574
       <provider selected="true" editor-type-id="text-editor">
573
-        <state relative-caret-position="104">
575
+        <state relative-caret-position="154">
574 576
           <caret line="12" column="80" selection-start-line="12" selection-start-column="71" selection-end-line="12" selection-end-column="80" />
575 577
         </state>
576 578
       </provider>
577 579
     </entry>
578
-    <entry file="file://$PROJECT_DIR$/controllers/admin_api_controllers/analysis_api_controller.go">
579
-      <provider selected="true" editor-type-id="text-editor">
580
-        <state relative-caret-position="437">
581
-          <caret line="427" selection-start-line="427" selection-end-line="427" />
582
-        </state>
583
-      </provider>
584
-    </entry>
585 580
     <entry file="file://$PROJECT_DIR$/conf/app.conf">
586 581
       <provider selected="true" editor-type-id="text-editor">
587 582
         <state>
@@ -591,39 +586,46 @@
591 586
     </entry>
592 587
     <entry file="file://$PROJECT_DIR$/models/function_models/fuction_query_models.go">
593 588
       <provider selected="true" editor-type-id="text-editor">
594
-        <state relative-caret-position="471">
589
+        <state relative-caret-position="11286">
595 590
           <caret line="513" column="13" selection-start-line="513" selection-start-column="13" selection-end-line="513" selection-end-column="13" />
596 591
         </state>
597 592
       </provider>
598 593
     </entry>
599
-    <entry file="file://$PROJECT_DIR$/controllers/function_api_controllers/function_api_router_register.go">
594
+    <entry file="file://$PROJECT_DIR$/service/admin_service.go">
600 595
       <provider selected="true" editor-type-id="text-editor">
601
-        <state relative-caret-position="388">
602
-          <caret line="95" selection-start-line="95" selection-end-line="95" />
603
-          <folding>
604
-            <element signature="e#34#79#0" expanded="true" />
605
-          </folding>
596
+        <state relative-caret-position="572">
597
+          <caret line="34" column="1" selection-start-line="34" selection-start-column="1" selection-end-line="34" selection-end-column="1" />
606 598
         </state>
607 599
       </provider>
608 600
     </entry>
609
-    <entry file="file://$PROJECT_DIR$/service/admin_service.go">
601
+    <entry file="file://$PROJECT_DIR$/controllers/admin_api_controllers/analysis_api_controller.go">
610 602
       <provider selected="true" editor-type-id="text-editor">
611
-        <state relative-caret-position="572">
612
-          <caret line="34" column="1" selection-start-line="34" selection-start-column="1" selection-end-line="34" selection-end-column="1" />
603
+        <state relative-caret-position="9240">
604
+          <caret line="427" selection-start-line="427" selection-end-line="427" />
613 605
         </state>
614 606
       </provider>
615 607
     </entry>
616 608
     <entry file="file://$PROJECT_DIR$/controllers/function_api_controllers/function_api_base_controller.go">
617 609
       <provider selected="true" editor-type-id="text-editor">
618
-        <state relative-caret-position="168">
619
-          <caret line="3556" column="51" selection-start-line="3556" selection-start-column="35" selection-end-line="3556" selection-end-column="51" />
610
+        <state relative-caret-position="319">
611
+          <caret line="3601" column="90" selection-start-line="3601" selection-start-column="90" selection-end-line="3601" selection-end-column="90" />
612
+        </state>
613
+      </provider>
614
+    </entry>
615
+    <entry file="file://$PROJECT_DIR$/controllers/function_api_controllers/function_api_router_register.go">
616
+      <provider selected="true" editor-type-id="text-editor">
617
+        <state relative-caret-position="47">
618
+          <caret line="87" column="79" selection-start-line="87" selection-start-column="54" selection-end-line="87" selection-end-column="79" />
619
+          <folding>
620
+            <element signature="e#34#79#0" expanded="true" />
621
+          </folding>
620 622
         </state>
621 623
       </provider>
622 624
     </entry>
623 625
     <entry file="file://$PROJECT_DIR$/service/function_service.go">
624 626
       <provider selected="true" editor-type-id="text-editor">
625
-        <state relative-caret-position="228">
626
-          <caret line="149" column="219" selection-start-line="149" selection-start-column="219" selection-end-line="149" selection-end-column="219" />
627
+        <state relative-caret-position="296">
628
+          <caret line="137" column="248" selection-start-line="137" selection-start-column="248" selection-end-line="137" selection-end-column="248" />
627 629
           <folding>
628 630
             <element signature="e#17#73#0" expanded="true" />
629 631
           </folding>

BIN
XT_Admin_Api.exe View File


+ 344 - 104
controllers/function_api_controllers/function_api_base_controller.go View File

@@ -79,22 +79,42 @@ func  (this *FunctionBaseAPIController) GetYestodayInfo()  {
79 79
 	}
80 80
 	range_data := this.GetString("range_data")
81 81
 	fmt.Println("昨日日期",range_data)
82
+	starttime := this.GetString("starttime")
83
+	fmt.Println("昨日开始时间",starttime)
84
+	endtime := this.GetString("endtime")
85
+	fmt.Println("昨日结束时间",endtime)
82 86
 	var rangeDate *time.Time
83 87
 	var parseDateErr error
84
-	var rangeTimeStamp int64
88
+	var startrangeTimeStamp int64
89
+    var endrangeTimeStamp  int64
85 90
 
86
-	if len(range_data) > 0 {
87
-		rangeDate, parseDateErr = utils.ParseTimeStringToTime("2006-01-02", range_data)
91
+	if len(starttime) > 0 {
92
+		rangeDate, parseDateErr = utils.ParseTimeStringToTime("2006-01-02 15:04:05", starttime)
93
+		fmt.Println("rangeData是什么",rangeDate)
94
+		fmt.Println("parseDateErr",parseDateErr)
88 95
 		if parseDateErr != nil {
89
-			this.ErrorLog("日期(%v)解析错误:%v", range_data, parseDateErr)
96
+			this.ErrorLog("日期(%v)解析错误:%v", starttime, parseDateErr)
90 97
 			return
91 98
 		}
92
-		rangeTimeStamp = rangeDate.Unix()
99
+		startrangeTimeStamp = rangeDate.Unix()
100
+		fmt.Println("startrangeTimeStamp是多少?",startrangeTimeStamp)
93 101
 	} else {
94
-		rangeTimeStamp = 0
102
+		startrangeTimeStamp = 0
95 103
 	}
96
-	now := time.Now().Unix()
97
-	patients, total, err := service.GetTodayInfo(rangeTimeStamp, now,page,limit)
104
+	if len(endtime) > 0 {
105
+		rangeDate, parseDateErr = utils.ParseTimeStringToTime("2006-01-02 15:04:05", endtime)
106
+		fmt.Println("rangeData是什么",rangeDate)
107
+		fmt.Println("parseDateErr",parseDateErr)
108
+		if parseDateErr != nil {
109
+			this.ErrorLog("日期(%v)解析错误:%v", endtime, parseDateErr)
110
+			return
111
+		}
112
+		endrangeTimeStamp = rangeDate.Unix()
113
+		fmt.Println("endrangeTimeStamp是多少?",endrangeTimeStamp)
114
+	} else {
115
+		endrangeTimeStamp = 0
116
+	}
117
+	patients, total, err := service.GetTodayInfo(startrangeTimeStamp, endrangeTimeStamp,page,limit)
98 118
 	fmt.Println("total",total)
99 119
 	fmt.Println("patients是什么",patients)
100 120
 	fmt.Println("查询错误是什么",err)
@@ -383,23 +403,43 @@ func  (this *FunctionBaseAPIController) GetYesterTodayDialysisInfo()  {
383 403
 	if limit <= 0 {
384 404
 		limit = 10
385 405
 	}
386
-
406
+	starttime := this.GetString("starttime")
407
+	fmt.Println("昨日开始时间",starttime)
408
+	endtime := this.GetString("endtime")
409
+	fmt.Println("昨日结束时间",endtime)
387 410
 	var rangeDate *time.Time
388 411
 	var parseDateErr error
389
-	var rangeTimeStamp int64
412
+	var startrangeTimeStamp int64
413
+	var endrangeTimeStamp  int64
390 414
 
391
-	if len(range_data) > 0 {
392
-		rangeDate, parseDateErr = utils.ParseTimeStringToTime("2006-01-02", range_data)
415
+	if len(starttime) > 0 {
416
+		rangeDate, parseDateErr = utils.ParseTimeStringToTime("2006-01-02 15:04:05", starttime)
417
+		fmt.Println("rangeData是什么",rangeDate)
418
+		fmt.Println("parseDateErr",parseDateErr)
393 419
 		if parseDateErr != nil {
394
-			this.ErrorLog("日期(%v)解析错误:%v", range_data, parseDateErr)
420
+			this.ErrorLog("日期(%v)解析错误:%v", starttime, parseDateErr)
395 421
 			return
396 422
 		}
397
-		rangeTimeStamp = rangeDate.Unix()
423
+		startrangeTimeStamp = rangeDate.Unix()
424
+		fmt.Println("startrangeTimeStamp是多少?",startrangeTimeStamp)
398 425
 	} else {
399
-		rangeTimeStamp = 0
426
+		startrangeTimeStamp = 0
400 427
 	}
401
-	now := time.Now().Unix()
402
-	dialysis, total, err := service.GetTodayDialysisPatientsInfo(rangeTimeStamp, now, page, limit)
428
+	if len(endtime) > 0 {
429
+		rangeDate, parseDateErr = utils.ParseTimeStringToTime("2006-01-02 15:04:05", endtime)
430
+		fmt.Println("rangeData是什么",rangeDate)
431
+		fmt.Println("parseDateErr",parseDateErr)
432
+		if parseDateErr != nil {
433
+			this.ErrorLog("日期(%v)解析错误:%v", endtime, parseDateErr)
434
+			return
435
+		}
436
+		endrangeTimeStamp = rangeDate.Unix()
437
+		fmt.Println("endrangeTimeStamp是多少?",endrangeTimeStamp)
438
+	} else {
439
+		endrangeTimeStamp = 0
440
+	}
441
+
442
+	dialysis, total, err := service.GetTodayDialysisPatientsInfo(startrangeTimeStamp, endrangeTimeStamp, page, limit)
403 443
 	fmt.Println("dialysis",dialysis)
404 444
 	fmt.Println("total",total)
405 445
 	fmt.Println("报错",err)
@@ -668,7 +708,7 @@ func  (this *FunctionBaseAPIController) GetReceiveinfo()  {
668 708
 
669 709
 func (this *FunctionBaseAPIController) GetYesTodayReceiveinfo()  {
670 710
 	range_data := this.GetString("range_data")
671
-	fmt.Println("本月透析处方日期",range_data)
711
+	fmt.Println("昨日接诊评估",range_data)
672 712
 	page, _ := this.GetInt64("page", 1)
673 713
 	fmt.Println("页面",page)
674 714
 	limit, _ := this.GetInt64("limit", 10)
@@ -679,22 +719,42 @@ func (this *FunctionBaseAPIController) GetYesTodayReceiveinfo()  {
679 719
 	if limit <= 0 {
680 720
 		limit = 10
681 721
 	}
722
+	starttime := this.GetString("starttime")
723
+	fmt.Println("昨日开始时间",starttime)
724
+	endtime := this.GetString("endtime")
725
+	fmt.Println("昨日结束时间",endtime)
682 726
 	var rangeDate *time.Time
683 727
 	var parseDateErr error
684
-	var rangeTimeStamp int64
728
+	var startrangeTimeStamp int64
729
+	var endrangeTimeStamp  int64
685 730
 
686
-	if len(range_data) > 0 {
687
-		rangeDate, parseDateErr = utils.ParseTimeStringToTime("2006-01-02", range_data)
731
+	if len(starttime) > 0 {
732
+		rangeDate, parseDateErr = utils.ParseTimeStringToTime("2006-01-02 15:04:05", starttime)
733
+		fmt.Println("rangeData是什么",rangeDate)
734
+		fmt.Println("parseDateErr",parseDateErr)
688 735
 		if parseDateErr != nil {
689
-			this.ErrorLog("日期(%v)解析错误:%v", range_data, parseDateErr)
736
+			this.ErrorLog("日期(%v)解析错误:%v", starttime, parseDateErr)
690 737
 			return
691 738
 		}
692
-		rangeTimeStamp = rangeDate.Unix()
739
+		startrangeTimeStamp = rangeDate.Unix()
740
+		fmt.Println("startrangeTimeStamp是多少?",startrangeTimeStamp)
693 741
 	} else {
694
-		rangeTimeStamp = 0
742
+		startrangeTimeStamp = 0
695 743
 	}
696
-	now := time.Now().Unix()
697
-	receive, total, err := service.GetTodayReceivePatientsInfo(rangeTimeStamp, now, page, limit)
744
+	if len(endtime) > 0 {
745
+		rangeDate, parseDateErr = utils.ParseTimeStringToTime("2006-01-02 15:04:05", endtime)
746
+		fmt.Println("rangeData是什么",rangeDate)
747
+		fmt.Println("parseDateErr",parseDateErr)
748
+		if parseDateErr != nil {
749
+			this.ErrorLog("日期(%v)解析错误:%v", endtime, parseDateErr)
750
+			return
751
+		}
752
+		endrangeTimeStamp = rangeDate.Unix()
753
+		fmt.Println("endrangeTimeStamp是多少?",endrangeTimeStamp)
754
+	} else {
755
+		endrangeTimeStamp = 0
756
+	}
757
+	receive, total, err := service.GetTodayReceivePatientsInfo(startrangeTimeStamp, endrangeTimeStamp, page, limit)
698 758
 	fmt.Println("patients",receive)
699 759
 	fmt.Println("total",total)
700 760
 	fmt.Println("错误",err)
@@ -963,7 +1023,7 @@ func  (this *FunctionBaseAPIController) GetTodayBeforDislysisInfo()  {
963 1023
 
964 1024
 func (this *FunctionBaseAPIController) GetYesterTodayBeforDislysisInfo()  {
965 1025
 	range_data := this.GetString("range_data")
966
-	fmt.Println("本月透析处方日期",range_data)
1026
+	fmt.Println("昨日透前评估日期",range_data)
967 1027
 	page, _ := this.GetInt64("page", 1)
968 1028
 	fmt.Println("页面",page)
969 1029
 	limit, _ := this.GetInt64("limit", 10)
@@ -974,22 +1034,42 @@ func (this *FunctionBaseAPIController) GetYesterTodayBeforDislysisInfo()  {
974 1034
 	if limit <= 0 {
975 1035
 		limit = 10
976 1036
 	}
1037
+	starttime := this.GetString("starttime")
1038
+	fmt.Println("昨日开始时间",starttime)
1039
+	endtime := this.GetString("endtime")
1040
+	fmt.Println("昨日结束时间",endtime)
977 1041
 	var rangeDate *time.Time
978 1042
 	var parseDateErr error
979
-	var rangeTimeStamp int64
1043
+	var startrangeTimeStamp int64
1044
+	var endrangeTimeStamp  int64
980 1045
 
981
-	if len(range_data) > 0 {
982
-		rangeDate, parseDateErr = utils.ParseTimeStringToTime("2006-01-02", range_data)
1046
+	if len(starttime) > 0 {
1047
+		rangeDate, parseDateErr = utils.ParseTimeStringToTime("2006-01-02 15:04:05", starttime)
1048
+		fmt.Println("rangeData是什么",rangeDate)
1049
+		fmt.Println("parseDateErr",parseDateErr)
983 1050
 		if parseDateErr != nil {
984
-			this.ErrorLog("日期(%v)解析错误:%v", range_data, parseDateErr)
1051
+			this.ErrorLog("日期(%v)解析错误:%v", starttime, parseDateErr)
985 1052
 			return
986 1053
 		}
987
-		rangeTimeStamp = rangeDate.Unix()
1054
+		startrangeTimeStamp = rangeDate.Unix()
1055
+		fmt.Println("startrangeTimeStamp是多少?",startrangeTimeStamp)
988 1056
 	} else {
989
-		rangeTimeStamp = 0
1057
+		startrangeTimeStamp = 0
990 1058
 	}
991
-	now := time.Now().Unix()
992
-	receive, total, err := service.GetTodayReceivePatientsInfo(rangeTimeStamp, now, page, limit)
1059
+	if len(endtime) > 0 {
1060
+		rangeDate, parseDateErr = utils.ParseTimeStringToTime("2006-01-02 15:04:05", endtime)
1061
+		fmt.Println("rangeData是什么",rangeDate)
1062
+		fmt.Println("parseDateErr",parseDateErr)
1063
+		if parseDateErr != nil {
1064
+			this.ErrorLog("日期(%v)解析错误:%v", endtime, parseDateErr)
1065
+			return
1066
+		}
1067
+		endrangeTimeStamp = rangeDate.Unix()
1068
+		fmt.Println("endrangeTimeStamp是多少?",endrangeTimeStamp)
1069
+	} else {
1070
+		endrangeTimeStamp = 0
1071
+	}
1072
+	receive, total, err := service.GetTodayReceivePatientsInfo(startrangeTimeStamp, endrangeTimeStamp, page, limit)
993 1073
 	fmt.Println("patients",receive)
994 1074
 	fmt.Println("total",total)
995 1075
 	fmt.Println("错误",err)
@@ -1257,7 +1337,7 @@ func  (this *FunctionBaseAPIController)  GetTodayDoctorsOrderInfo()  {
1257 1337
 
1258 1338
 func (this *FunctionBaseAPIController) GetYesterDayDoctorsOrderInfo()  {
1259 1339
 	range_data := this.GetString("range_data")
1260
-	fmt.Println("本月透析处方日期",range_data)
1340
+	fmt.Println("昨日零时意识",range_data)
1261 1341
 	page, _ := this.GetInt64("page", 1)
1262 1342
 	fmt.Println("页面",page)
1263 1343
 	limit, _ := this.GetInt64("limit", 10)
@@ -1268,22 +1348,42 @@ func (this *FunctionBaseAPIController) GetYesterDayDoctorsOrderInfo()  {
1268 1348
 	if limit <= 0 {
1269 1349
 		limit = 10
1270 1350
 	}
1351
+	starttime := this.GetString("starttime")
1352
+	fmt.Println("昨日开始时间",starttime)
1353
+	endtime := this.GetString("endtime")
1354
+	fmt.Println("昨日结束时间",endtime)
1271 1355
 	var rangeDate *time.Time
1272 1356
 	var parseDateErr error
1273
-	var rangeTimeStamp int64
1357
+	var startrangeTimeStamp int64
1358
+	var endrangeTimeStamp  int64
1274 1359
 
1275
-	if len(range_data) > 0 {
1276
-		rangeDate, parseDateErr = utils.ParseTimeStringToTime("2006-01-02", range_data)
1360
+	if len(starttime) > 0 {
1361
+		rangeDate, parseDateErr = utils.ParseTimeStringToTime("2006-01-02 15:04:05", starttime)
1362
+		fmt.Println("rangeData是什么",rangeDate)
1363
+		fmt.Println("parseDateErr",parseDateErr)
1277 1364
 		if parseDateErr != nil {
1278
-			this.ErrorLog("日期(%v)解析错误:%v", range_data, parseDateErr)
1365
+			this.ErrorLog("日期(%v)解析错误:%v", starttime, parseDateErr)
1279 1366
 			return
1280 1367
 		}
1281
-		rangeTimeStamp = rangeDate.Unix()
1368
+		startrangeTimeStamp = rangeDate.Unix()
1369
+		fmt.Println("startrangeTimeStamp是多少?",startrangeTimeStamp)
1282 1370
 	} else {
1283
-		rangeTimeStamp = 0
1371
+		startrangeTimeStamp = 0
1284 1372
 	}
1285
-	now := time.Now().Unix()
1286
-	receive, total, err := service.GetTodayDoctorsOrderInfo(rangeTimeStamp, now, page, limit)
1373
+	if len(endtime) > 0 {
1374
+		rangeDate, parseDateErr = utils.ParseTimeStringToTime("2006-01-02 15:04:05", endtime)
1375
+		fmt.Println("rangeData是什么",rangeDate)
1376
+		fmt.Println("parseDateErr",parseDateErr)
1377
+		if parseDateErr != nil {
1378
+			this.ErrorLog("日期(%v)解析错误:%v", endtime, parseDateErr)
1379
+			return
1380
+		}
1381
+		endrangeTimeStamp = rangeDate.Unix()
1382
+		fmt.Println("endrangeTimeStamp是多少?",endrangeTimeStamp)
1383
+	} else {
1384
+		endrangeTimeStamp = 0
1385
+	}
1386
+	receive, total, err := service.GetTodayDoctorsOrderInfo(startrangeTimeStamp, endrangeTimeStamp, page, limit)
1287 1387
 	fmt.Println("patients",receive)
1288 1388
 	fmt.Println("total",total)
1289 1389
 	fmt.Println("错误",err)
@@ -1551,7 +1651,7 @@ func  (this *FunctionBaseAPIController) GetTodayDoubleCheckInfo()  {
1551 1651
 
1552 1652
 func (this *FunctionBaseAPIController) GetYesTodayDoubleCheckInfo()  {
1553 1653
 	range_data := this.GetString("range_data")
1554
-	fmt.Println("本月透析处方日期",range_data)
1654
+	fmt.Println("昨日双人核对",range_data)
1555 1655
 	page, _ := this.GetInt64("page", 1)
1556 1656
 	fmt.Println("页面",page)
1557 1657
 	limit, _ := this.GetInt64("limit", 10)
@@ -1562,22 +1662,42 @@ func (this *FunctionBaseAPIController) GetYesTodayDoubleCheckInfo()  {
1562 1662
 	if limit <= 0 {
1563 1663
 		limit = 10
1564 1664
 	}
1665
+	starttime := this.GetString("starttime")
1666
+	fmt.Println("昨日开始时间",starttime)
1667
+	endtime := this.GetString("endtime")
1668
+	fmt.Println("昨日结束时间",endtime)
1565 1669
 	var rangeDate *time.Time
1566 1670
 	var parseDateErr error
1567
-	var rangeTimeStamp int64
1671
+	var startrangeTimeStamp int64
1672
+	var endrangeTimeStamp  int64
1568 1673
 
1569
-	if len(range_data) > 0 {
1570
-		rangeDate, parseDateErr = utils.ParseTimeStringToTime("2006-01-02", range_data)
1674
+	if len(starttime) > 0 {
1675
+		rangeDate, parseDateErr = utils.ParseTimeStringToTime("2006-01-02 15:04:05", starttime)
1676
+		fmt.Println("rangeData是什么",rangeDate)
1677
+		fmt.Println("parseDateErr",parseDateErr)
1571 1678
 		if parseDateErr != nil {
1572
-			this.ErrorLog("日期(%v)解析错误:%v", range_data, parseDateErr)
1679
+			this.ErrorLog("日期(%v)解析错误:%v", starttime, parseDateErr)
1573 1680
 			return
1574 1681
 		}
1575
-		rangeTimeStamp = rangeDate.Unix()
1682
+		startrangeTimeStamp = rangeDate.Unix()
1683
+		fmt.Println("startrangeTimeStamp是多少?",startrangeTimeStamp)
1576 1684
 	} else {
1577
-		rangeTimeStamp = 0
1685
+		startrangeTimeStamp = 0
1578 1686
 	}
1579
-	now := time.Now().Unix()
1580
-	receive, total, err := service.GetTodayDoubleCheckInfo(rangeTimeStamp, now, page, limit)
1687
+	if len(endtime) > 0 {
1688
+		rangeDate, parseDateErr = utils.ParseTimeStringToTime("2006-01-02 15:04:05", endtime)
1689
+		fmt.Println("rangeData是什么",rangeDate)
1690
+		fmt.Println("parseDateErr",parseDateErr)
1691
+		if parseDateErr != nil {
1692
+			this.ErrorLog("日期(%v)解析错误:%v", endtime, parseDateErr)
1693
+			return
1694
+		}
1695
+		endrangeTimeStamp = rangeDate.Unix()
1696
+		fmt.Println("endrangeTimeStamp是多少?",endrangeTimeStamp)
1697
+	} else {
1698
+		endrangeTimeStamp = 0
1699
+	}
1700
+	receive, total, err := service.GetTodayDoubleCheckInfo(startrangeTimeStamp, endrangeTimeStamp, page, limit)
1581 1701
 	fmt.Println("patients",receive)
1582 1702
 	fmt.Println("total",total)
1583 1703
 	fmt.Println("错误",err)
@@ -1845,7 +1965,7 @@ func (this *FunctionBaseAPIController) GetTodayDialysisMachinek()  {
1845 1965
 
1846 1966
 func (this *FunctionBaseAPIController) GetYesterTodayDialysisMachinek()  {
1847 1967
 	range_data := this.GetString("range_data")
1848
-	fmt.Println("本月透析处方日期",range_data)
1968
+	fmt.Println("昨日透析上机",range_data)
1849 1969
 	page, _ := this.GetInt64("page", 1)
1850 1970
 	fmt.Println("页面",page)
1851 1971
 	limit, _ := this.GetInt64("limit", 10)
@@ -1856,22 +1976,42 @@ func (this *FunctionBaseAPIController) GetYesterTodayDialysisMachinek()  {
1856 1976
 	if limit <= 0 {
1857 1977
 		limit = 10
1858 1978
 	}
1979
+	starttime := this.GetString("starttime")
1980
+	fmt.Println("昨日开始时间",starttime)
1981
+	endtime := this.GetString("endtime")
1982
+	fmt.Println("昨日结束时间",endtime)
1859 1983
 	var rangeDate *time.Time
1860 1984
 	var parseDateErr error
1861
-	var rangeTimeStamp int64
1985
+	var startrangeTimeStamp int64
1986
+	var endrangeTimeStamp  int64
1862 1987
 
1863
-	if len(range_data) > 0 {
1864
-		rangeDate, parseDateErr = utils.ParseTimeStringToTime("2006-01-02", range_data)
1988
+	if len(starttime) > 0 {
1989
+		rangeDate, parseDateErr = utils.ParseTimeStringToTime("2006-01-02 15:04:05", starttime)
1990
+		fmt.Println("rangeData是什么",rangeDate)
1991
+		fmt.Println("parseDateErr",parseDateErr)
1865 1992
 		if parseDateErr != nil {
1866
-			this.ErrorLog("日期(%v)解析错误:%v", range_data, parseDateErr)
1993
+			this.ErrorLog("日期(%v)解析错误:%v", starttime, parseDateErr)
1867 1994
 			return
1868 1995
 		}
1869
-		rangeTimeStamp = rangeDate.Unix()
1996
+		startrangeTimeStamp = rangeDate.Unix()
1997
+		fmt.Println("startrangeTimeStamp是多少?",startrangeTimeStamp)
1870 1998
 	} else {
1871
-		rangeTimeStamp = 0
1999
+		startrangeTimeStamp = 0
1872 2000
 	}
1873
-	now := time.Now().Unix()
1874
-	patients, total, err := service.GetTodayDialysisMachinek(rangeTimeStamp, now, page, limit)
2001
+	if len(endtime) > 0 {
2002
+		rangeDate, parseDateErr = utils.ParseTimeStringToTime("2006-01-02 15:04:05", endtime)
2003
+		fmt.Println("rangeData是什么",rangeDate)
2004
+		fmt.Println("parseDateErr",parseDateErr)
2005
+		if parseDateErr != nil {
2006
+			this.ErrorLog("日期(%v)解析错误:%v", endtime, parseDateErr)
2007
+			return
2008
+		}
2009
+		endrangeTimeStamp = rangeDate.Unix()
2010
+		fmt.Println("endrangeTimeStamp是多少?",endrangeTimeStamp)
2011
+	} else {
2012
+		endrangeTimeStamp = 0
2013
+	}
2014
+	patients, total, err := service.GetTodayDialysisMachinek(startrangeTimeStamp, endrangeTimeStamp, page, limit)
1875 2015
 	fmt.Println("patients",patients)
1876 2016
 	fmt.Println("total",total)
1877 2017
 	fmt.Println("错误",err)
@@ -2139,7 +2279,7 @@ func  (this *FunctionBaseAPIController) GetTodayDialysisExamination()  {
2139 2279
 
2140 2280
 func  (this *FunctionBaseAPIController) GetYesTodayDialysisExamination()  {
2141 2281
 	range_data := this.GetString("range_data")
2142
-	fmt.Println("本月透析处方日期",range_data)
2282
+	fmt.Println("昨日透析检测",range_data)
2143 2283
 	page, _ := this.GetInt64("page", 1)
2144 2284
 	fmt.Println("页面",page)
2145 2285
 	limit, _ := this.GetInt64("limit", 10)
@@ -2150,22 +2290,42 @@ func  (this *FunctionBaseAPIController) GetYesTodayDialysisExamination()  {
2150 2290
 	if limit <= 0 {
2151 2291
 		limit = 10
2152 2292
 	}
2293
+	starttime := this.GetString("starttime")
2294
+	fmt.Println("昨日开始时间",starttime)
2295
+	endtime := this.GetString("endtime")
2296
+	fmt.Println("昨日结束时间",endtime)
2153 2297
 	var rangeDate *time.Time
2154 2298
 	var parseDateErr error
2155
-	var rangeTimeStamp int64
2299
+	var startrangeTimeStamp int64
2300
+	var endrangeTimeStamp  int64
2156 2301
 
2157
-	if len(range_data) > 0 {
2158
-		rangeDate, parseDateErr = utils.ParseTimeStringToTime("2006-01-02", range_data)
2302
+	if len(starttime) > 0 {
2303
+		rangeDate, parseDateErr = utils.ParseTimeStringToTime("2006-01-02 15:04:05", starttime)
2304
+		fmt.Println("rangeData是什么",rangeDate)
2305
+		fmt.Println("parseDateErr",parseDateErr)
2159 2306
 		if parseDateErr != nil {
2160
-			this.ErrorLog("日期(%v)解析错误:%v", range_data, parseDateErr)
2307
+			this.ErrorLog("日期(%v)解析错误:%v", starttime, parseDateErr)
2161 2308
 			return
2162 2309
 		}
2163
-		rangeTimeStamp = rangeDate.Unix()
2310
+		startrangeTimeStamp = rangeDate.Unix()
2311
+		fmt.Println("startrangeTimeStamp是多少?",startrangeTimeStamp)
2164 2312
 	} else {
2165
-		rangeTimeStamp = 0
2313
+		startrangeTimeStamp = 0
2166 2314
 	}
2167
-	now := time.Now().Unix()
2168
-	patients, total, err := service.GetTodayDialysisExamination(rangeTimeStamp, now, page, limit)
2315
+	if len(endtime) > 0 {
2316
+		rangeDate, parseDateErr = utils.ParseTimeStringToTime("2006-01-02 15:04:05", endtime)
2317
+		fmt.Println("rangeData是什么",rangeDate)
2318
+		fmt.Println("parseDateErr",parseDateErr)
2319
+		if parseDateErr != nil {
2320
+			this.ErrorLog("日期(%v)解析错误:%v", endtime, parseDateErr)
2321
+			return
2322
+		}
2323
+		endrangeTimeStamp = rangeDate.Unix()
2324
+		fmt.Println("endrangeTimeStamp是多少?",endrangeTimeStamp)
2325
+	} else {
2326
+		endrangeTimeStamp = 0
2327
+	}
2328
+	patients, total, err := service.GetTodayDialysisExamination(startrangeTimeStamp, endrangeTimeStamp, page, limit)
2169 2329
 	fmt.Println("patients",patients)
2170 2330
 	fmt.Println("total",total)
2171 2331
 	fmt.Println("错误",err)
@@ -2433,7 +2593,7 @@ func (this *FunctionBaseAPIController) GetTodayBeforOrpenetration()  {
2433 2593
 
2434 2594
 func (this *FunctionBaseAPIController) GetYesterDayBeforpinetration()  {
2435 2595
 	range_data := this.GetString("range_data")
2436
-	fmt.Println("本月透析处方日期",range_data)
2596
+	fmt.Println("昨日",range_data)
2437 2597
 	page, _ := this.GetInt64("page", 1)
2438 2598
 	fmt.Println("页面",page)
2439 2599
 	limit, _ := this.GetInt64("limit", 10)
@@ -2444,22 +2604,42 @@ func (this *FunctionBaseAPIController) GetYesterDayBeforpinetration()  {
2444 2604
 	if limit <= 0 {
2445 2605
 		limit = 10
2446 2606
 	}
2607
+	starttime := this.GetString("starttime")
2608
+	fmt.Println("昨日开始时间",starttime)
2609
+	endtime := this.GetString("endtime")
2610
+	fmt.Println("昨日结束时间",endtime)
2447 2611
 	var rangeDate *time.Time
2448 2612
 	var parseDateErr error
2449
-	var rangeTimeStamp int64
2613
+	var startrangeTimeStamp int64
2614
+	var endrangeTimeStamp  int64
2450 2615
 
2451
-	if len(range_data) > 0 {
2452
-		rangeDate, parseDateErr = utils.ParseTimeStringToTime("2006-01-02", range_data)
2616
+	if len(starttime) > 0 {
2617
+		rangeDate, parseDateErr = utils.ParseTimeStringToTime("2006-01-02 15:04:05", starttime)
2618
+		fmt.Println("rangeData是什么",rangeDate)
2619
+		fmt.Println("parseDateErr",parseDateErr)
2453 2620
 		if parseDateErr != nil {
2454
-			this.ErrorLog("日期(%v)解析错误:%v", range_data, parseDateErr)
2621
+			this.ErrorLog("日期(%v)解析错误:%v", starttime, parseDateErr)
2455 2622
 			return
2456 2623
 		}
2457
-		rangeTimeStamp = rangeDate.Unix()
2624
+		startrangeTimeStamp = rangeDate.Unix()
2625
+		fmt.Println("startrangeTimeStamp是多少?",startrangeTimeStamp)
2458 2626
 	} else {
2459
-		rangeTimeStamp = 0
2627
+		startrangeTimeStamp = 0
2460 2628
 	}
2461
-	now := time.Now().Unix()
2462
-	patients, total, err := service.GetTodayBeforOrpenetration(rangeTimeStamp, now, page, limit)
2629
+	if len(endtime) > 0 {
2630
+		rangeDate, parseDateErr = utils.ParseTimeStringToTime("2006-01-02 15:04:05", endtime)
2631
+		fmt.Println("rangeData是什么",rangeDate)
2632
+		fmt.Println("parseDateErr",parseDateErr)
2633
+		if parseDateErr != nil {
2634
+			this.ErrorLog("日期(%v)解析错误:%v", endtime, parseDateErr)
2635
+			return
2636
+		}
2637
+		endrangeTimeStamp = rangeDate.Unix()
2638
+		fmt.Println("endrangeTimeStamp是多少?",endrangeTimeStamp)
2639
+	} else {
2640
+		endrangeTimeStamp = 0
2641
+	}
2642
+	patients, total, err := service.GetTodayBeforOrpenetration(startrangeTimeStamp, endrangeTimeStamp, page, limit)
2463 2643
 	fmt.Println("patients",patients)
2464 2644
 	fmt.Println("total",total)
2465 2645
 	fmt.Println("错误",err)
@@ -2738,22 +2918,42 @@ func (this *FunctionBaseAPIController) GetYesterDayPostAssessment()  {
2738 2918
 	if limit <= 0 {
2739 2919
 		limit = 10
2740 2920
 	}
2921
+	starttime := this.GetString("starttime")
2922
+	fmt.Println("昨日开始时间",starttime)
2923
+	endtime := this.GetString("endtime")
2924
+	fmt.Println("昨日结束时间",endtime)
2741 2925
 	var rangeDate *time.Time
2742 2926
 	var parseDateErr error
2743
-	var rangeTimeStamp int64
2927
+	var startrangeTimeStamp int64
2928
+	var endrangeTimeStamp  int64
2744 2929
 
2745
-	if len(range_data) > 0 {
2746
-		rangeDate, parseDateErr = utils.ParseTimeStringToTime("2006-01-02", range_data)
2930
+	if len(starttime) > 0 {
2931
+		rangeDate, parseDateErr = utils.ParseTimeStringToTime("2006-01-02 15:04:05", starttime)
2932
+		fmt.Println("rangeData是什么",rangeDate)
2933
+		fmt.Println("parseDateErr",parseDateErr)
2747 2934
 		if parseDateErr != nil {
2748
-			this.ErrorLog("日期(%v)解析错误:%v", range_data, parseDateErr)
2935
+			this.ErrorLog("日期(%v)解析错误:%v", starttime, parseDateErr)
2749 2936
 			return
2750 2937
 		}
2751
-		rangeTimeStamp = rangeDate.Unix()
2938
+		startrangeTimeStamp = rangeDate.Unix()
2939
+		fmt.Println("startrangeTimeStamp是多少?",startrangeTimeStamp)
2752 2940
 	} else {
2753
-		rangeTimeStamp = 0
2941
+		startrangeTimeStamp = 0
2754 2942
 	}
2755
-	now := time.Now().Unix()
2756
-	patients, total, err := service.GetTodayPostAssessment(rangeTimeStamp, now, page, limit)
2943
+	if len(endtime) > 0 {
2944
+		rangeDate, parseDateErr = utils.ParseTimeStringToTime("2006-01-02 15:04:05", endtime)
2945
+		fmt.Println("rangeData是什么",rangeDate)
2946
+		fmt.Println("parseDateErr",parseDateErr)
2947
+		if parseDateErr != nil {
2948
+			this.ErrorLog("日期(%v)解析错误:%v", endtime, parseDateErr)
2949
+			return
2950
+		}
2951
+		endrangeTimeStamp = rangeDate.Unix()
2952
+		fmt.Println("endrangeTimeStamp是多少?",endrangeTimeStamp)
2953
+	} else {
2954
+		endrangeTimeStamp = 0
2955
+	}
2956
+	patients, total, err := service.GetTodayPostAssessment(startrangeTimeStamp, endrangeTimeStamp, page, limit)
2757 2957
 	fmt.Println("patients",patients)
2758 2958
 	fmt.Println("total",total)
2759 2959
 	fmt.Println("错误",err)
@@ -3035,22 +3235,42 @@ func  (this *FunctionBaseAPIController) GetYesterdayEntrylist()  {
3035 3235
 	if limit <= 0 {
3036 3236
 		limit = 10
3037 3237
 	}
3238
+	starttime := this.GetString("starttime")
3239
+	fmt.Println("昨日开始时间",starttime)
3240
+	endtime := this.GetString("endtime")
3241
+	fmt.Println("昨日结束时间",endtime)
3038 3242
 	var rangeDate *time.Time
3039 3243
 	var parseDateErr error
3040
-	var rangeTimeStamp int64
3244
+	var startrangeTimeStamp int64
3245
+	var endrangeTimeStamp  int64
3041 3246
 
3042
-	if len(range_data) > 0 {
3043
-		rangeDate, parseDateErr = utils.ParseTimeStringToTime("2006-01-02", range_data)
3247
+	if len(starttime) > 0 {
3248
+		rangeDate, parseDateErr = utils.ParseTimeStringToTime("2006-01-02 15:04:05", starttime)
3249
+		fmt.Println("rangeData是什么",rangeDate)
3250
+		fmt.Println("parseDateErr",parseDateErr)
3044 3251
 		if parseDateErr != nil {
3045
-			this.ErrorLog("日期(%v)解析错误:%v", range_data, parseDateErr)
3252
+			this.ErrorLog("日期(%v)解析错误:%v", starttime, parseDateErr)
3046 3253
 			return
3047 3254
 		}
3048
-		rangeTimeStamp = rangeDate.Unix()
3255
+		startrangeTimeStamp = rangeDate.Unix()
3256
+		fmt.Println("startrangeTimeStamp是多少?",startrangeTimeStamp)
3049 3257
 	} else {
3050
-		rangeTimeStamp = 0
3258
+		startrangeTimeStamp = 0
3051 3259
 	}
3052
-	now := time.Now().Unix()
3053
-	userorg, total, err := service.GetTodayEntrylist(rangeTimeStamp, now, limit, page)
3260
+	if len(endtime) > 0 {
3261
+		rangeDate, parseDateErr = utils.ParseTimeStringToTime("2006-01-02 15:04:05", endtime)
3262
+		fmt.Println("rangeData是什么",rangeDate)
3263
+		fmt.Println("parseDateErr",parseDateErr)
3264
+		if parseDateErr != nil {
3265
+			this.ErrorLog("日期(%v)解析错误:%v", endtime, parseDateErr)
3266
+			return
3267
+		}
3268
+		endrangeTimeStamp = rangeDate.Unix()
3269
+		fmt.Println("endrangeTimeStamp是多少?",endrangeTimeStamp)
3270
+	} else {
3271
+		endrangeTimeStamp = 0
3272
+	}
3273
+	userorg, total, err := service.GetTodayEntrylist(startrangeTimeStamp, endrangeTimeStamp, limit, page)
3054 3274
 	//3代表血透,2//退出登录状态
3055 3275
 	//userorgs, err := service.GetTodayLogout(0, 2)
3056 3276
 	//fmt.Scan("userorgs是什么",userorgs)
@@ -3344,22 +3564,42 @@ func (this *FunctionBaseAPIController) GetYesterdayExitlist()  {
3344 3564
 	if limit <= 0 {
3345 3565
 		limit = 10
3346 3566
 	}
3567
+	starttime := this.GetString("starttime")
3568
+	fmt.Println("昨日开始时间",starttime)
3569
+	endtime := this.GetString("endtime")
3570
+	fmt.Println("昨日结束时间",endtime)
3347 3571
 	var rangeDate *time.Time
3348 3572
 	var parseDateErr error
3349
-	var rangeTimeStamp int64
3573
+	var startrangeTimeStamp int64
3574
+	var endrangeTimeStamp  int64
3350 3575
 
3351
-	if len(range_data) > 0 {
3352
-		rangeDate, parseDateErr = utils.ParseTimeStringToTime("2006-01-02", range_data)
3576
+	if len(starttime) > 0 {
3577
+		rangeDate, parseDateErr = utils.ParseTimeStringToTime("2006-01-02 15:04:05", starttime)
3578
+		fmt.Println("rangeData是什么",rangeDate)
3579
+		fmt.Println("parseDateErr",parseDateErr)
3353 3580
 		if parseDateErr != nil {
3354
-			this.ErrorLog("日期(%v)解析错误:%v", range_data, parseDateErr)
3581
+			this.ErrorLog("日期(%v)解析错误:%v", starttime, parseDateErr)
3355 3582
 			return
3356 3583
 		}
3357
-		rangeTimeStamp = rangeDate.Unix()
3584
+		startrangeTimeStamp = rangeDate.Unix()
3585
+		fmt.Println("startrangeTimeStamp是多少?",startrangeTimeStamp)
3358 3586
 	} else {
3359
-		rangeTimeStamp = 0
3587
+		startrangeTimeStamp = 0
3360 3588
 	}
3361
-	now := time.Now().Unix()
3362
-	userorg, total, err := service.GetTodayExitlist(rangeTimeStamp, now, limit, page)
3589
+	if len(endtime) > 0 {
3590
+		rangeDate, parseDateErr = utils.ParseTimeStringToTime("2006-01-02 15:04:05", endtime)
3591
+		fmt.Println("rangeData是什么",rangeDate)
3592
+		fmt.Println("parseDateErr",parseDateErr)
3593
+		if parseDateErr != nil {
3594
+			this.ErrorLog("日期(%v)解析错误:%v", endtime, parseDateErr)
3595
+			return
3596
+		}
3597
+		endrangeTimeStamp = rangeDate.Unix()
3598
+		fmt.Println("endrangeTimeStamp是多少?",endrangeTimeStamp)
3599
+	} else {
3600
+		endrangeTimeStamp = 0
3601
+	}
3602
+	userorg, total, err := service.GetTodayExitlist(startrangeTimeStamp, endrangeTimeStamp, limit, page)
3363 3603
 	if err !=nil{
3364 3604
 		this.ServeFailJsonSend(enums.ErrorCodeDataException, "更改数据失败")
3365 3605
 		return

+ 1 - 1
controllers/function_api_controllers/function_api_router_register.go View File

@@ -22,7 +22,7 @@ func FunctionAPIControllersRegisterRouters() {
22 22
 	beego.Router("/api/function/gethalfyeardialysisinfo",&FunctionBaseAPIController{},"Get:GetHalfYearDailysisInfo")
23 23
 	beego.Router("/api/function/getyeardialysisinfo",&FunctionBaseAPIController{},"Get:GetYearDailysisInfo")
24 24
 	beego.Router("/api/function/gettodayreceiveinfo",&FunctionBaseAPIController{},"Get:GetReceiveinfo")
25
-	beego.Router("/api/function/getyesterdayinfo",&FunctionBaseAPIController{},"Get:GetYesTodayReceiveinfo")
25
+	beego.Router("/api/function/getReceiveyesterdayinfo",&FunctionBaseAPIController{},"Get:GetYesTodayReceiveinfo")
26 26
 	beego.Router("/api/function/getweekreceiveinfo",&FunctionBaseAPIController{},"Get:GetWeekReceiveinfo")
27 27
 	beego.Router("/api/function/getMonthreceiveinfo",&FunctionBaseAPIController{},"Get:GetMonthReceiveinfo")
28 28
 	beego.Router("/api/function/getMonthreereceiveinfo",&FunctionBaseAPIController{},"Get:GetThreeMonthReceiveinfo")

+ 3 - 3
service/function_service.go View File

@@ -135,8 +135,8 @@ func GetTodayPostAssessment(to int64,ctime int64,page int64,limit int64)(patient
135 135
 
136 136
 func GetTodayEntrylist(to int64,ctime int64,limit int64,page int64)(patientinfo []function_models.PatientInfo,total int64, err error)  {
137 137
 	 offset := (page - 1) * limit
138
-	 err = readUserDb.Raw("select * from sgj_users.sgj_user_org as u join sgj_org_follow as f On f.org_id = u.id JoIN sgj_admin as a On a.id = f.admin_user_id  join sgj_xt.xt_warehouse as x on x.org_id = u.id JOIN sgj_xt.xt_patients as p On p.id = x.creater  where x.warehousing_time >= ? AND x.warehousing_time<= ? GROUP BY x.org_id",to,ctime).Scan(&patientinfo).Error
139
-	rows, err := readUserDb.Offset(offset).Limit(limit).Raw("select Count(1) from sgj_users.sgj_user_org as u join sgj_xt.xt_warehouse as x on x.org_id = u.id where x.warehousing_time >= ? AND x.warehousing_time <= ?", to, ctime).Rows()
138
+	 err = readUserDb.Raw("select * from sgj_users.sgj_user_org as u  join sgj_xt.xt_warehouse_info as x on x.org_id = u.id  LEFT JOIN  sgj_users.sgj_org_follow as f ON f.org_id = u.id  LEFT JOIN   sgj_users.sgj_admin as a on a.id = f.admin_user_id  where x.ctime >= ? AND x.ctime<= ? GROUP BY x.org_id",to,ctime).Scan(&patientinfo).Error
139
+	rows, err := readUserDb.Offset(offset).Limit(limit).Raw("select Count(1) from sgj_users.sgj_user_org as u join sgj_xt.xt_warehouse_info as x on x.org_id = u.id where x.ctime >= ? AND x.ctime <= ?", to, ctime).Rows()
140 140
 	if rows.Next() {
141 141
 		rows.Scan(&total)
142 142
 	}
@@ -146,7 +146,7 @@ func GetTodayEntrylist(to int64,ctime int64,limit int64,page int64)(patientinfo
146 146
 
147 147
 func GetTodayExitlist(to int64,ctime int64,limit int64,page int64)(patientinfo []function_models.PatientInfo,total int64,err error)  {
148 148
 	offset := (page - 1) * limit
149
-	err = readUserDb.Raw("select * from sgj_users.sgj_user_org as u join sgj_org_follow as f On f.org_id = u.id JoIN sgj_admin as a On a.id = f.admin_user_id  join sgj_xt.xt_warehouse_out as x on x.org_id = u.id JOIN sgj_xt.xt_patients as p On p.id = x.creater  where x.warehouse_out_time >= ? AND x.warehouse_out_time<= ? GROUP BY x.org_id",to,ctime).Scan(&patientinfo).Error
149
+	err = readUserDb.Raw("select * from sgj_users.sgj_user_org as u   join sgj_xt.xt_warehouse_out as x on x.org_id = u.id  where x.warehouse_out_time >= ? AND x.warehouse_out_time<= ? GROUP BY x.org_id",to,ctime).Scan(&patientinfo).Error
150 150
 	rows, err := readUserDb.Offset(offset).Limit(limit).Raw("select Count(1) from sgj_users.sgj_user_org as u join sgj_xt.xt_warehouse_out as x on x.org_id = u.id where x.warehouse_out_time >= ? AND x.warehouse_out_time <= ?", to, ctime).Rows()
151 151
 	if rows.Next() {
152 152
 		rows.Scan(&total)