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
   <component name="ChangeListManager">
3
   <component name="ChangeListManager">
4
     <list default="true" id="7aa7cc45-aece-4fa3-9063-5e3df12471b4" name="Default" comment="">
4
     <list default="true" id="7aa7cc45-aece-4fa3-9063-5e3df12471b4" name="Default" comment="">
5
       <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
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
       <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
       <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
       <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$/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
       <change beforePath="$PROJECT_DIR$/service/function_service.go" beforeDir="false" afterPath="$PROJECT_DIR$/service/function_service.go" afterDir="false" />
9
       <change beforePath="$PROJECT_DIR$/service/function_service.go" beforeDir="false" afterPath="$PROJECT_DIR$/service/function_service.go" afterDir="false" />
10
     </list>
10
     </list>
11
     <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
11
     <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
17
   </component>
17
   </component>
18
   <component name="FileEditorManager">
18
   <component name="FileEditorManager">
19
     <leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
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
       <file leaf-file-name="function_api_router_register.go" pinned="false" current-in-tab="false">
20
       <file leaf-file-name="function_api_router_register.go" pinned="false" current-in-tab="false">
30
         <entry file="file://$PROJECT_DIR$/controllers/function_api_controllers/function_api_router_register.go">
21
         <entry file="file://$PROJECT_DIR$/controllers/function_api_controllers/function_api_router_register.go">
31
           <provider selected="true" editor-type-id="text-editor">
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
               <folding>
25
               <folding>
35
                 <element signature="e#34#79#0" expanded="true" />
26
                 <element signature="e#34#79#0" expanded="true" />
36
               </folding>
27
               </folding>
50
       <file leaf-file-name="function_service.go" pinned="false" current-in-tab="true">
41
       <file leaf-file-name="function_service.go" pinned="false" current-in-tab="true">
51
         <entry file="file://$PROJECT_DIR$/service/function_service.go">
42
         <entry file="file://$PROJECT_DIR$/service/function_service.go">
52
           <provider selected="true" editor-type-id="text-editor">
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
               <folding>
46
               <folding>
56
                 <element signature="e#17#73#0" expanded="true" />
47
                 <element signature="e#17#73#0" expanded="true" />
57
               </folding>
48
               </folding>
62
       <file leaf-file-name="fuction_query_models.go" pinned="false" current-in-tab="false">
53
       <file leaf-file-name="fuction_query_models.go" pinned="false" current-in-tab="false">
63
         <entry file="file://$PROJECT_DIR$/models/function_models/fuction_query_models.go">
54
         <entry file="file://$PROJECT_DIR$/models/function_models/fuction_query_models.go">
64
           <provider selected="true" editor-type-id="text-editor">
55
           <provider selected="true" editor-type-id="text-editor">
65
-            <state relative-caret-position="471">
56
+            <state relative-caret-position="11286">
66
               <caret line="513" column="13" selection-start-line="513" selection-start-column="13" selection-end-line="513" selection-end-column="13" />
57
               <caret line="513" column="13" selection-start-line="513" selection-start-column="13" selection-end-line="513" selection-end-column="13" />
67
             </state>
58
             </state>
68
           </provider>
59
           </provider>
71
       <file leaf-file-name="function_api_base_controller.go" pinned="false" current-in-tab="false">
62
       <file leaf-file-name="function_api_base_controller.go" pinned="false" current-in-tab="false">
72
         <entry file="file://$PROJECT_DIR$/controllers/function_api_controllers/function_api_base_controller.go">
63
         <entry file="file://$PROJECT_DIR$/controllers/function_api_controllers/function_api_base_controller.go">
73
           <provider selected="true" editor-type-id="text-editor">
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
             </state>
67
             </state>
77
           </provider>
68
           </provider>
78
         </entry>
69
         </entry>
89
       <file leaf-file-name="router.go" pinned="false" current-in-tab="false">
80
       <file leaf-file-name="router.go" pinned="false" current-in-tab="false">
90
         <entry file="file://$PROJECT_DIR$/routers/router.go">
81
         <entry file="file://$PROJECT_DIR$/routers/router.go">
91
           <provider selected="true" editor-type-id="text-editor">
82
           <provider selected="true" editor-type-id="text-editor">
92
-            <state relative-caret-position="104">
83
+            <state relative-caret-position="154">
93
               <caret line="12" column="80" selection-start-line="12" selection-start-column="71" selection-end-line="12" selection-end-column="80" />
84
               <caret line="12" column="80" selection-start-line="12" selection-start-column="71" selection-end-line="12" selection-end-column="80" />
94
             </state>
85
             </state>
95
           </provider>
86
           </provider>
106
   </component>
97
   </component>
107
   <component name="FindInProjectRecents">
98
   <component name="FindInProjectRecents">
108
     <findStrings>
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
       <find>SchedualPatient</find>
100
       <find>SchedualPatient</find>
116
       <find>patient_count_list</find>
101
       <find>patient_count_list</find>
117
       <find>aaa</find>
102
       <find>aaa</find>
124
       <find>/api/function/getBeforDislysis</find>
109
       <find>/api/function/getBeforDislysis</find>
125
       <find>GetTodayBeforDislysisInfo</find>
110
       <find>GetTodayBeforDislysisInfo</find>
126
       <find>GetTodayInfo</find>
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
     </findStrings>
130
     </findStrings>
128
     <dirStrings>
131
     <dirStrings>
129
       <dir>D:\goyard\src\XT_Admin_Api\controllers\admin_api_controllers</dir>
132
       <dir>D:\goyard\src\XT_Admin_Api\controllers\admin_api_controllers</dir>
155
     <sorting>DEFINITION_ORDER</sorting>
158
     <sorting>DEFINITION_ORDER</sorting>
156
   </component>
159
   </component>
157
   <component name="ProjectFrameBounds" extendedState="6">
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
     <option name="height" value="1040" />
163
     <option name="height" value="1040" />
162
   </component>
164
   </component>
163
   <component name="ProjectView">
165
   <component name="ProjectView">
209
     <property name="DefaultGoTemplateProperty" value="Go Application" />
211
     <property name="DefaultGoTemplateProperty" value="Go Application" />
210
     <property name="go.gopath.indexing.explicitly.defined" value="true" />
212
     <property name="go.gopath.indexing.explicitly.defined" value="true" />
211
     <property name="go.sdk.automatically.set" value="true" />
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
   </component>
215
   </component>
214
   <component name="RunDashboard">
216
   <component name="RunDashboard">
215
     <option name="ruleStates">
217
     <option name="ruleStates">
226
   <component name="ToolWindowManager">
228
   <component name="ToolWindowManager">
227
     <frame x="-7" y="-7" width="1550" height="838" extended-state="6" />
229
     <frame x="-7" y="-7" width="1550" height="838" extended-state="6" />
228
     <layout>
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
       <window_info anchor="bottom" id="TODO" order="6" />
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
       <window_info anchor="right" id="Database" order="3" />
234
       <window_info anchor="right" id="Database" order="3" />
233
       <window_info anchor="bottom" id="Database Changes" order="8" show_stripe_button="false" />
235
       <window_info anchor="bottom" id="Database Changes" order="8" show_stripe_button="false" />
234
       <window_info anchor="bottom" id="Version Control" order="9" />
236
       <window_info anchor="bottom" id="Version Control" order="9" />
235
       <window_info anchor="bottom" id="Run" order="2" />
237
       <window_info anchor="bottom" id="Run" order="2" />
236
       <window_info id="Structure" order="1" side_tool="true" weight="0.25" />
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
       <window_info id="Favorites" order="2" side_tool="true" />
240
       <window_info id="Favorites" order="2" side_tool="true" />
239
       <window_info anchor="bottom" id="Debug" order="3" weight="0.4" />
241
       <window_info anchor="bottom" id="Debug" order="3" weight="0.4" />
240
       <window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" />
242
       <window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" />
570
     </entry>
572
     </entry>
571
     <entry file="file://$PROJECT_DIR$/routers/router.go">
573
     <entry file="file://$PROJECT_DIR$/routers/router.go">
572
       <provider selected="true" editor-type-id="text-editor">
574
       <provider selected="true" editor-type-id="text-editor">
573
-        <state relative-caret-position="104">
575
+        <state relative-caret-position="154">
574
           <caret line="12" column="80" selection-start-line="12" selection-start-column="71" selection-end-line="12" selection-end-column="80" />
576
           <caret line="12" column="80" selection-start-line="12" selection-start-column="71" selection-end-line="12" selection-end-column="80" />
575
         </state>
577
         </state>
576
       </provider>
578
       </provider>
577
     </entry>
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
     <entry file="file://$PROJECT_DIR$/conf/app.conf">
580
     <entry file="file://$PROJECT_DIR$/conf/app.conf">
586
       <provider selected="true" editor-type-id="text-editor">
581
       <provider selected="true" editor-type-id="text-editor">
587
         <state>
582
         <state>
591
     </entry>
586
     </entry>
592
     <entry file="file://$PROJECT_DIR$/models/function_models/fuction_query_models.go">
587
     <entry file="file://$PROJECT_DIR$/models/function_models/fuction_query_models.go">
593
       <provider selected="true" editor-type-id="text-editor">
588
       <provider selected="true" editor-type-id="text-editor">
594
-        <state relative-caret-position="471">
589
+        <state relative-caret-position="11286">
595
           <caret line="513" column="13" selection-start-line="513" selection-start-column="13" selection-end-line="513" selection-end-column="13" />
590
           <caret line="513" column="13" selection-start-line="513" selection-start-column="13" selection-end-line="513" selection-end-column="13" />
596
         </state>
591
         </state>
597
       </provider>
592
       </provider>
598
     </entry>
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
       <provider selected="true" editor-type-id="text-editor">
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
         </state>
598
         </state>
607
       </provider>
599
       </provider>
608
     </entry>
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
       <provider selected="true" editor-type-id="text-editor">
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
         </state>
605
         </state>
614
       </provider>
606
       </provider>
615
     </entry>
607
     </entry>
616
     <entry file="file://$PROJECT_DIR$/controllers/function_api_controllers/function_api_base_controller.go">
608
     <entry file="file://$PROJECT_DIR$/controllers/function_api_controllers/function_api_base_controller.go">
617
       <provider selected="true" editor-type-id="text-editor">
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
         </state>
622
         </state>
621
       </provider>
623
       </provider>
622
     </entry>
624
     </entry>
623
     <entry file="file://$PROJECT_DIR$/service/function_service.go">
625
     <entry file="file://$PROJECT_DIR$/service/function_service.go">
624
       <provider selected="true" editor-type-id="text-editor">
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
           <folding>
629
           <folding>
628
             <element signature="e#17#73#0" expanded="true" />
630
             <element signature="e#17#73#0" expanded="true" />
629
           </folding>
631
           </folding>

BIN
XT_Admin_Api.exe View File


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

79
 	}
79
 	}
80
 	range_data := this.GetString("range_data")
80
 	range_data := this.GetString("range_data")
81
 	fmt.Println("昨日日期",range_data)
81
 	fmt.Println("昨日日期",range_data)
82
+	starttime := this.GetString("starttime")
83
+	fmt.Println("昨日开始时间",starttime)
84
+	endtime := this.GetString("endtime")
85
+	fmt.Println("昨日结束时间",endtime)
82
 	var rangeDate *time.Time
86
 	var rangeDate *time.Time
83
 	var parseDateErr error
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
 		if parseDateErr != nil {
95
 		if parseDateErr != nil {
89
-			this.ErrorLog("日期(%v)解析错误:%v", range_data, parseDateErr)
96
+			this.ErrorLog("日期(%v)解析错误:%v", starttime, parseDateErr)
90
 			return
97
 			return
91
 		}
98
 		}
92
-		rangeTimeStamp = rangeDate.Unix()
99
+		startrangeTimeStamp = rangeDate.Unix()
100
+		fmt.Println("startrangeTimeStamp是多少?",startrangeTimeStamp)
93
 	} else {
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
 	fmt.Println("total",total)
118
 	fmt.Println("total",total)
99
 	fmt.Println("patients是什么",patients)
119
 	fmt.Println("patients是什么",patients)
100
 	fmt.Println("查询错误是什么",err)
120
 	fmt.Println("查询错误是什么",err)
383
 	if limit <= 0 {
403
 	if limit <= 0 {
384
 		limit = 10
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
 	var rangeDate *time.Time
410
 	var rangeDate *time.Time
388
 	var parseDateErr error
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
 		if parseDateErr != nil {
419
 		if parseDateErr != nil {
394
-			this.ErrorLog("日期(%v)解析错误:%v", range_data, parseDateErr)
420
+			this.ErrorLog("日期(%v)解析错误:%v", starttime, parseDateErr)
395
 			return
421
 			return
396
 		}
422
 		}
397
-		rangeTimeStamp = rangeDate.Unix()
423
+		startrangeTimeStamp = rangeDate.Unix()
424
+		fmt.Println("startrangeTimeStamp是多少?",startrangeTimeStamp)
398
 	} else {
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
 	fmt.Println("dialysis",dialysis)
443
 	fmt.Println("dialysis",dialysis)
404
 	fmt.Println("total",total)
444
 	fmt.Println("total",total)
405
 	fmt.Println("报错",err)
445
 	fmt.Println("报错",err)
668
 
708
 
669
 func (this *FunctionBaseAPIController) GetYesTodayReceiveinfo()  {
709
 func (this *FunctionBaseAPIController) GetYesTodayReceiveinfo()  {
670
 	range_data := this.GetString("range_data")
710
 	range_data := this.GetString("range_data")
671
-	fmt.Println("本月透析处方日期",range_data)
711
+	fmt.Println("昨日接诊评估",range_data)
672
 	page, _ := this.GetInt64("page", 1)
712
 	page, _ := this.GetInt64("page", 1)
673
 	fmt.Println("页面",page)
713
 	fmt.Println("页面",page)
674
 	limit, _ := this.GetInt64("limit", 10)
714
 	limit, _ := this.GetInt64("limit", 10)
679
 	if limit <= 0 {
719
 	if limit <= 0 {
680
 		limit = 10
720
 		limit = 10
681
 	}
721
 	}
722
+	starttime := this.GetString("starttime")
723
+	fmt.Println("昨日开始时间",starttime)
724
+	endtime := this.GetString("endtime")
725
+	fmt.Println("昨日结束时间",endtime)
682
 	var rangeDate *time.Time
726
 	var rangeDate *time.Time
683
 	var parseDateErr error
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
 		if parseDateErr != nil {
735
 		if parseDateErr != nil {
689
-			this.ErrorLog("日期(%v)解析错误:%v", range_data, parseDateErr)
736
+			this.ErrorLog("日期(%v)解析错误:%v", starttime, parseDateErr)
690
 			return
737
 			return
691
 		}
738
 		}
692
-		rangeTimeStamp = rangeDate.Unix()
739
+		startrangeTimeStamp = rangeDate.Unix()
740
+		fmt.Println("startrangeTimeStamp是多少?",startrangeTimeStamp)
693
 	} else {
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
 	fmt.Println("patients",receive)
758
 	fmt.Println("patients",receive)
699
 	fmt.Println("total",total)
759
 	fmt.Println("total",total)
700
 	fmt.Println("错误",err)
760
 	fmt.Println("错误",err)
963
 
1023
 
964
 func (this *FunctionBaseAPIController) GetYesterTodayBeforDislysisInfo()  {
1024
 func (this *FunctionBaseAPIController) GetYesterTodayBeforDislysisInfo()  {
965
 	range_data := this.GetString("range_data")
1025
 	range_data := this.GetString("range_data")
966
-	fmt.Println("本月透析处方日期",range_data)
1026
+	fmt.Println("昨日透前评估日期",range_data)
967
 	page, _ := this.GetInt64("page", 1)
1027
 	page, _ := this.GetInt64("page", 1)
968
 	fmt.Println("页面",page)
1028
 	fmt.Println("页面",page)
969
 	limit, _ := this.GetInt64("limit", 10)
1029
 	limit, _ := this.GetInt64("limit", 10)
974
 	if limit <= 0 {
1034
 	if limit <= 0 {
975
 		limit = 10
1035
 		limit = 10
976
 	}
1036
 	}
1037
+	starttime := this.GetString("starttime")
1038
+	fmt.Println("昨日开始时间",starttime)
1039
+	endtime := this.GetString("endtime")
1040
+	fmt.Println("昨日结束时间",endtime)
977
 	var rangeDate *time.Time
1041
 	var rangeDate *time.Time
978
 	var parseDateErr error
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
 		if parseDateErr != nil {
1050
 		if parseDateErr != nil {
984
-			this.ErrorLog("日期(%v)解析错误:%v", range_data, parseDateErr)
1051
+			this.ErrorLog("日期(%v)解析错误:%v", starttime, parseDateErr)
985
 			return
1052
 			return
986
 		}
1053
 		}
987
-		rangeTimeStamp = rangeDate.Unix()
1054
+		startrangeTimeStamp = rangeDate.Unix()
1055
+		fmt.Println("startrangeTimeStamp是多少?",startrangeTimeStamp)
988
 	} else {
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
 	fmt.Println("patients",receive)
1073
 	fmt.Println("patients",receive)
994
 	fmt.Println("total",total)
1074
 	fmt.Println("total",total)
995
 	fmt.Println("错误",err)
1075
 	fmt.Println("错误",err)
1257
 
1337
 
1258
 func (this *FunctionBaseAPIController) GetYesterDayDoctorsOrderInfo()  {
1338
 func (this *FunctionBaseAPIController) GetYesterDayDoctorsOrderInfo()  {
1259
 	range_data := this.GetString("range_data")
1339
 	range_data := this.GetString("range_data")
1260
-	fmt.Println("本月透析处方日期",range_data)
1340
+	fmt.Println("昨日零时意识",range_data)
1261
 	page, _ := this.GetInt64("page", 1)
1341
 	page, _ := this.GetInt64("page", 1)
1262
 	fmt.Println("页面",page)
1342
 	fmt.Println("页面",page)
1263
 	limit, _ := this.GetInt64("limit", 10)
1343
 	limit, _ := this.GetInt64("limit", 10)
1268
 	if limit <= 0 {
1348
 	if limit <= 0 {
1269
 		limit = 10
1349
 		limit = 10
1270
 	}
1350
 	}
1351
+	starttime := this.GetString("starttime")
1352
+	fmt.Println("昨日开始时间",starttime)
1353
+	endtime := this.GetString("endtime")
1354
+	fmt.Println("昨日结束时间",endtime)
1271
 	var rangeDate *time.Time
1355
 	var rangeDate *time.Time
1272
 	var parseDateErr error
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
 		if parseDateErr != nil {
1364
 		if parseDateErr != nil {
1278
-			this.ErrorLog("日期(%v)解析错误:%v", range_data, parseDateErr)
1365
+			this.ErrorLog("日期(%v)解析错误:%v", starttime, parseDateErr)
1279
 			return
1366
 			return
1280
 		}
1367
 		}
1281
-		rangeTimeStamp = rangeDate.Unix()
1368
+		startrangeTimeStamp = rangeDate.Unix()
1369
+		fmt.Println("startrangeTimeStamp是多少?",startrangeTimeStamp)
1282
 	} else {
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
 	fmt.Println("patients",receive)
1387
 	fmt.Println("patients",receive)
1288
 	fmt.Println("total",total)
1388
 	fmt.Println("total",total)
1289
 	fmt.Println("错误",err)
1389
 	fmt.Println("错误",err)
1551
 
1651
 
1552
 func (this *FunctionBaseAPIController) GetYesTodayDoubleCheckInfo()  {
1652
 func (this *FunctionBaseAPIController) GetYesTodayDoubleCheckInfo()  {
1553
 	range_data := this.GetString("range_data")
1653
 	range_data := this.GetString("range_data")
1554
-	fmt.Println("本月透析处方日期",range_data)
1654
+	fmt.Println("昨日双人核对",range_data)
1555
 	page, _ := this.GetInt64("page", 1)
1655
 	page, _ := this.GetInt64("page", 1)
1556
 	fmt.Println("页面",page)
1656
 	fmt.Println("页面",page)
1557
 	limit, _ := this.GetInt64("limit", 10)
1657
 	limit, _ := this.GetInt64("limit", 10)
1562
 	if limit <= 0 {
1662
 	if limit <= 0 {
1563
 		limit = 10
1663
 		limit = 10
1564
 	}
1664
 	}
1665
+	starttime := this.GetString("starttime")
1666
+	fmt.Println("昨日开始时间",starttime)
1667
+	endtime := this.GetString("endtime")
1668
+	fmt.Println("昨日结束时间",endtime)
1565
 	var rangeDate *time.Time
1669
 	var rangeDate *time.Time
1566
 	var parseDateErr error
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
 		if parseDateErr != nil {
1678
 		if parseDateErr != nil {
1572
-			this.ErrorLog("日期(%v)解析错误:%v", range_data, parseDateErr)
1679
+			this.ErrorLog("日期(%v)解析错误:%v", starttime, parseDateErr)
1573
 			return
1680
 			return
1574
 		}
1681
 		}
1575
-		rangeTimeStamp = rangeDate.Unix()
1682
+		startrangeTimeStamp = rangeDate.Unix()
1683
+		fmt.Println("startrangeTimeStamp是多少?",startrangeTimeStamp)
1576
 	} else {
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
 	fmt.Println("patients",receive)
1701
 	fmt.Println("patients",receive)
1582
 	fmt.Println("total",total)
1702
 	fmt.Println("total",total)
1583
 	fmt.Println("错误",err)
1703
 	fmt.Println("错误",err)
1845
 
1965
 
1846
 func (this *FunctionBaseAPIController) GetYesterTodayDialysisMachinek()  {
1966
 func (this *FunctionBaseAPIController) GetYesterTodayDialysisMachinek()  {
1847
 	range_data := this.GetString("range_data")
1967
 	range_data := this.GetString("range_data")
1848
-	fmt.Println("本月透析处方日期",range_data)
1968
+	fmt.Println("昨日透析上机",range_data)
1849
 	page, _ := this.GetInt64("page", 1)
1969
 	page, _ := this.GetInt64("page", 1)
1850
 	fmt.Println("页面",page)
1970
 	fmt.Println("页面",page)
1851
 	limit, _ := this.GetInt64("limit", 10)
1971
 	limit, _ := this.GetInt64("limit", 10)
1856
 	if limit <= 0 {
1976
 	if limit <= 0 {
1857
 		limit = 10
1977
 		limit = 10
1858
 	}
1978
 	}
1979
+	starttime := this.GetString("starttime")
1980
+	fmt.Println("昨日开始时间",starttime)
1981
+	endtime := this.GetString("endtime")
1982
+	fmt.Println("昨日结束时间",endtime)
1859
 	var rangeDate *time.Time
1983
 	var rangeDate *time.Time
1860
 	var parseDateErr error
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
 		if parseDateErr != nil {
1992
 		if parseDateErr != nil {
1866
-			this.ErrorLog("日期(%v)解析错误:%v", range_data, parseDateErr)
1993
+			this.ErrorLog("日期(%v)解析错误:%v", starttime, parseDateErr)
1867
 			return
1994
 			return
1868
 		}
1995
 		}
1869
-		rangeTimeStamp = rangeDate.Unix()
1996
+		startrangeTimeStamp = rangeDate.Unix()
1997
+		fmt.Println("startrangeTimeStamp是多少?",startrangeTimeStamp)
1870
 	} else {
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
 	fmt.Println("patients",patients)
2015
 	fmt.Println("patients",patients)
1876
 	fmt.Println("total",total)
2016
 	fmt.Println("total",total)
1877
 	fmt.Println("错误",err)
2017
 	fmt.Println("错误",err)
2139
 
2279
 
2140
 func  (this *FunctionBaseAPIController) GetYesTodayDialysisExamination()  {
2280
 func  (this *FunctionBaseAPIController) GetYesTodayDialysisExamination()  {
2141
 	range_data := this.GetString("range_data")
2281
 	range_data := this.GetString("range_data")
2142
-	fmt.Println("本月透析处方日期",range_data)
2282
+	fmt.Println("昨日透析检测",range_data)
2143
 	page, _ := this.GetInt64("page", 1)
2283
 	page, _ := this.GetInt64("page", 1)
2144
 	fmt.Println("页面",page)
2284
 	fmt.Println("页面",page)
2145
 	limit, _ := this.GetInt64("limit", 10)
2285
 	limit, _ := this.GetInt64("limit", 10)
2150
 	if limit <= 0 {
2290
 	if limit <= 0 {
2151
 		limit = 10
2291
 		limit = 10
2152
 	}
2292
 	}
2293
+	starttime := this.GetString("starttime")
2294
+	fmt.Println("昨日开始时间",starttime)
2295
+	endtime := this.GetString("endtime")
2296
+	fmt.Println("昨日结束时间",endtime)
2153
 	var rangeDate *time.Time
2297
 	var rangeDate *time.Time
2154
 	var parseDateErr error
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
 		if parseDateErr != nil {
2306
 		if parseDateErr != nil {
2160
-			this.ErrorLog("日期(%v)解析错误:%v", range_data, parseDateErr)
2307
+			this.ErrorLog("日期(%v)解析错误:%v", starttime, parseDateErr)
2161
 			return
2308
 			return
2162
 		}
2309
 		}
2163
-		rangeTimeStamp = rangeDate.Unix()
2310
+		startrangeTimeStamp = rangeDate.Unix()
2311
+		fmt.Println("startrangeTimeStamp是多少?",startrangeTimeStamp)
2164
 	} else {
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
 	fmt.Println("patients",patients)
2329
 	fmt.Println("patients",patients)
2170
 	fmt.Println("total",total)
2330
 	fmt.Println("total",total)
2171
 	fmt.Println("错误",err)
2331
 	fmt.Println("错误",err)
2433
 
2593
 
2434
 func (this *FunctionBaseAPIController) GetYesterDayBeforpinetration()  {
2594
 func (this *FunctionBaseAPIController) GetYesterDayBeforpinetration()  {
2435
 	range_data := this.GetString("range_data")
2595
 	range_data := this.GetString("range_data")
2436
-	fmt.Println("本月透析处方日期",range_data)
2596
+	fmt.Println("昨日",range_data)
2437
 	page, _ := this.GetInt64("page", 1)
2597
 	page, _ := this.GetInt64("page", 1)
2438
 	fmt.Println("页面",page)
2598
 	fmt.Println("页面",page)
2439
 	limit, _ := this.GetInt64("limit", 10)
2599
 	limit, _ := this.GetInt64("limit", 10)
2444
 	if limit <= 0 {
2604
 	if limit <= 0 {
2445
 		limit = 10
2605
 		limit = 10
2446
 	}
2606
 	}
2607
+	starttime := this.GetString("starttime")
2608
+	fmt.Println("昨日开始时间",starttime)
2609
+	endtime := this.GetString("endtime")
2610
+	fmt.Println("昨日结束时间",endtime)
2447
 	var rangeDate *time.Time
2611
 	var rangeDate *time.Time
2448
 	var parseDateErr error
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
 		if parseDateErr != nil {
2620
 		if parseDateErr != nil {
2454
-			this.ErrorLog("日期(%v)解析错误:%v", range_data, parseDateErr)
2621
+			this.ErrorLog("日期(%v)解析错误:%v", starttime, parseDateErr)
2455
 			return
2622
 			return
2456
 		}
2623
 		}
2457
-		rangeTimeStamp = rangeDate.Unix()
2624
+		startrangeTimeStamp = rangeDate.Unix()
2625
+		fmt.Println("startrangeTimeStamp是多少?",startrangeTimeStamp)
2458
 	} else {
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
 	fmt.Println("patients",patients)
2643
 	fmt.Println("patients",patients)
2464
 	fmt.Println("total",total)
2644
 	fmt.Println("total",total)
2465
 	fmt.Println("错误",err)
2645
 	fmt.Println("错误",err)
2738
 	if limit <= 0 {
2918
 	if limit <= 0 {
2739
 		limit = 10
2919
 		limit = 10
2740
 	}
2920
 	}
2921
+	starttime := this.GetString("starttime")
2922
+	fmt.Println("昨日开始时间",starttime)
2923
+	endtime := this.GetString("endtime")
2924
+	fmt.Println("昨日结束时间",endtime)
2741
 	var rangeDate *time.Time
2925
 	var rangeDate *time.Time
2742
 	var parseDateErr error
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
 		if parseDateErr != nil {
2934
 		if parseDateErr != nil {
2748
-			this.ErrorLog("日期(%v)解析错误:%v", range_data, parseDateErr)
2935
+			this.ErrorLog("日期(%v)解析错误:%v", starttime, parseDateErr)
2749
 			return
2936
 			return
2750
 		}
2937
 		}
2751
-		rangeTimeStamp = rangeDate.Unix()
2938
+		startrangeTimeStamp = rangeDate.Unix()
2939
+		fmt.Println("startrangeTimeStamp是多少?",startrangeTimeStamp)
2752
 	} else {
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
 	fmt.Println("patients",patients)
2957
 	fmt.Println("patients",patients)
2758
 	fmt.Println("total",total)
2958
 	fmt.Println("total",total)
2759
 	fmt.Println("错误",err)
2959
 	fmt.Println("错误",err)
3035
 	if limit <= 0 {
3235
 	if limit <= 0 {
3036
 		limit = 10
3236
 		limit = 10
3037
 	}
3237
 	}
3238
+	starttime := this.GetString("starttime")
3239
+	fmt.Println("昨日开始时间",starttime)
3240
+	endtime := this.GetString("endtime")
3241
+	fmt.Println("昨日结束时间",endtime)
3038
 	var rangeDate *time.Time
3242
 	var rangeDate *time.Time
3039
 	var parseDateErr error
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
 		if parseDateErr != nil {
3251
 		if parseDateErr != nil {
3045
-			this.ErrorLog("日期(%v)解析错误:%v", range_data, parseDateErr)
3252
+			this.ErrorLog("日期(%v)解析错误:%v", starttime, parseDateErr)
3046
 			return
3253
 			return
3047
 		}
3254
 		}
3048
-		rangeTimeStamp = rangeDate.Unix()
3255
+		startrangeTimeStamp = rangeDate.Unix()
3256
+		fmt.Println("startrangeTimeStamp是多少?",startrangeTimeStamp)
3049
 	} else {
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
 	//3代表血透,2//退出登录状态
3274
 	//3代表血透,2//退出登录状态
3055
 	//userorgs, err := service.GetTodayLogout(0, 2)
3275
 	//userorgs, err := service.GetTodayLogout(0, 2)
3056
 	//fmt.Scan("userorgs是什么",userorgs)
3276
 	//fmt.Scan("userorgs是什么",userorgs)
3344
 	if limit <= 0 {
3564
 	if limit <= 0 {
3345
 		limit = 10
3565
 		limit = 10
3346
 	}
3566
 	}
3567
+	starttime := this.GetString("starttime")
3568
+	fmt.Println("昨日开始时间",starttime)
3569
+	endtime := this.GetString("endtime")
3570
+	fmt.Println("昨日结束时间",endtime)
3347
 	var rangeDate *time.Time
3571
 	var rangeDate *time.Time
3348
 	var parseDateErr error
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
 		if parseDateErr != nil {
3580
 		if parseDateErr != nil {
3354
-			this.ErrorLog("日期(%v)解析错误:%v", range_data, parseDateErr)
3581
+			this.ErrorLog("日期(%v)解析错误:%v", starttime, parseDateErr)
3355
 			return
3582
 			return
3356
 		}
3583
 		}
3357
-		rangeTimeStamp = rangeDate.Unix()
3584
+		startrangeTimeStamp = rangeDate.Unix()
3585
+		fmt.Println("startrangeTimeStamp是多少?",startrangeTimeStamp)
3358
 	} else {
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
 	if err !=nil{
3603
 	if err !=nil{
3364
 		this.ServeFailJsonSend(enums.ErrorCodeDataException, "更改数据失败")
3604
 		this.ServeFailJsonSend(enums.ErrorCodeDataException, "更改数据失败")
3365
 		return
3605
 		return

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

22
 	beego.Router("/api/function/gethalfyeardialysisinfo",&FunctionBaseAPIController{},"Get:GetHalfYearDailysisInfo")
22
 	beego.Router("/api/function/gethalfyeardialysisinfo",&FunctionBaseAPIController{},"Get:GetHalfYearDailysisInfo")
23
 	beego.Router("/api/function/getyeardialysisinfo",&FunctionBaseAPIController{},"Get:GetYearDailysisInfo")
23
 	beego.Router("/api/function/getyeardialysisinfo",&FunctionBaseAPIController{},"Get:GetYearDailysisInfo")
24
 	beego.Router("/api/function/gettodayreceiveinfo",&FunctionBaseAPIController{},"Get:GetReceiveinfo")
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
 	beego.Router("/api/function/getweekreceiveinfo",&FunctionBaseAPIController{},"Get:GetWeekReceiveinfo")
26
 	beego.Router("/api/function/getweekreceiveinfo",&FunctionBaseAPIController{},"Get:GetWeekReceiveinfo")
27
 	beego.Router("/api/function/getMonthreceiveinfo",&FunctionBaseAPIController{},"Get:GetMonthReceiveinfo")
27
 	beego.Router("/api/function/getMonthreceiveinfo",&FunctionBaseAPIController{},"Get:GetMonthReceiveinfo")
28
 	beego.Router("/api/function/getMonthreereceiveinfo",&FunctionBaseAPIController{},"Get:GetThreeMonthReceiveinfo")
28
 	beego.Router("/api/function/getMonthreereceiveinfo",&FunctionBaseAPIController{},"Get:GetThreeMonthReceiveinfo")

+ 3 - 3
service/function_service.go View File

135
 
135
 
136
 func GetTodayEntrylist(to int64,ctime int64,limit int64,page int64)(patientinfo []function_models.PatientInfo,total int64, err error)  {
136
 func GetTodayEntrylist(to int64,ctime int64,limit int64,page int64)(patientinfo []function_models.PatientInfo,total int64, err error)  {
137
 	 offset := (page - 1) * limit
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
 	if rows.Next() {
140
 	if rows.Next() {
141
 		rows.Scan(&total)
141
 		rows.Scan(&total)
142
 	}
142
 	}
146
 
146
 
147
 func GetTodayExitlist(to int64,ctime int64,limit int64,page int64)(patientinfo []function_models.PatientInfo,total int64,err error)  {
147
 func GetTodayExitlist(to int64,ctime int64,limit int64,page int64)(patientinfo []function_models.PatientInfo,total int64,err error)  {
148
 	offset := (page - 1) * limit
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
 	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()
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
 	if rows.Next() {
151
 	if rows.Next() {
152
 		rows.Scan(&total)
152
 		rows.Scan(&total)