Browse Source

功能查询

xiaoming_global 5 years ago
parent
commit
4c8a723c71
4 changed files with 90 additions and 63 deletions
  1. 75 49
      .idea/workspace.xml
  2. BIN
      XT_Admin_Api.exe
  3. BIN
      XT_Admin_Api.exe~
  4. 15 14
      service/function_service.go

+ 75 - 49
.idea/workspace.xml View File

@@ -4,8 +4,6 @@
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 6
       <change beforePath="$PROJECT_DIR$/XT_Admin_Api.exe" beforeDir="false" afterPath="$PROJECT_DIR$/XT_Admin_Api.exe" 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" />
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" />
9 7
       <change beforePath="$PROJECT_DIR$/service/function_service.go" beforeDir="false" afterPath="$PROJECT_DIR$/service/function_service.go" afterDir="false" />
10 8
     </list>
11 9
     <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
@@ -20,7 +18,7 @@
20 18
       <file leaf-file-name="function_api_router_register.go" pinned="false" current-in-tab="false">
21 19
         <entry file="file://$PROJECT_DIR$/controllers/function_api_controllers/function_api_router_register.go">
22 20
           <provider selected="true" editor-type-id="text-editor">
23
-            <state relative-caret-position="47">
21
+            <state relative-caret-position="391">
24 22
               <caret line="87" column="79" selection-start-line="87" selection-start-column="54" selection-end-line="87" selection-end-column="79" />
25 23
               <folding>
26 24
                 <element signature="e#34#79#0" expanded="true" />
@@ -41,8 +39,8 @@
41 39
       <file leaf-file-name="function_service.go" pinned="false" current-in-tab="true">
42 40
         <entry file="file://$PROJECT_DIR$/service/function_service.go">
43 41
           <provider selected="true" editor-type-id="text-editor">
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" />
42
+            <state relative-caret-position="373">
43
+              <caret line="149" column="138" selection-start-line="149" selection-start-column="138" selection-end-line="149" selection-end-column="138" />
46 44
               <folding>
47 45
                 <element signature="e#17#73#0" expanded="true" />
48 46
               </folding>
@@ -50,11 +48,38 @@
50 48
           </provider>
51 49
         </entry>
52 50
       </file>
51
+      <file leaf-file-name="admin_api_router_register.go" pinned="false" current-in-tab="false">
52
+        <entry file="file://$PROJECT_DIR$/controllers/admin_api_controllers/admin_api_router_register.go">
53
+          <provider selected="true" editor-type-id="text-editor">
54
+            <state relative-caret-position="279">
55
+              <caret line="24" column="62" selection-start-line="24" selection-start-column="46" selection-end-line="24" selection-end-column="62" />
56
+            </state>
57
+          </provider>
58
+        </entry>
59
+      </file>
60
+      <file leaf-file-name="org_api_controller.go" pinned="false" current-in-tab="false">
61
+        <entry file="file://$PROJECT_DIR$/controllers/admin_api_controllers/org_api_controller.go">
62
+          <provider selected="true" editor-type-id="text-editor">
63
+            <state relative-caret-position="230">
64
+              <caret line="278" column="72" selection-start-line="278" selection-start-column="47" selection-end-line="278" selection-end-column="72" />
65
+            </state>
66
+          </provider>
67
+        </entry>
68
+      </file>
69
+      <file leaf-file-name="org_service.go" pinned="false" current-in-tab="false">
70
+        <entry file="file://$PROJECT_DIR$/service/org_service.go">
71
+          <provider selected="true" editor-type-id="text-editor">
72
+            <state relative-caret-position="5020">
73
+              <caret line="566" column="267" selection-start-line="566" selection-start-column="176" selection-end-line="566" selection-end-column="267" />
74
+            </state>
75
+          </provider>
76
+        </entry>
77
+      </file>
53 78
       <file leaf-file-name="fuction_query_models.go" pinned="false" current-in-tab="false">
54 79
         <entry file="file://$PROJECT_DIR$/models/function_models/fuction_query_models.go">
55 80
           <provider selected="true" editor-type-id="text-editor">
56
-            <state relative-caret-position="11286">
57
-              <caret line="513" column="13" selection-start-line="513" selection-start-column="13" selection-end-line="513" selection-end-column="13" />
81
+            <state relative-caret-position="11264">
82
+              <caret line="512" column="5" selection-start-line="512" selection-start-column="5" selection-end-line="512" selection-end-column="5" />
58 83
             </state>
59 84
           </provider>
60 85
         </entry>
@@ -62,7 +87,7 @@
62 87
       <file leaf-file-name="function_api_base_controller.go" pinned="false" current-in-tab="false">
63 88
         <entry file="file://$PROJECT_DIR$/controllers/function_api_controllers/function_api_base_controller.go">
64 89
           <provider selected="true" editor-type-id="text-editor">
65
-            <state relative-caret-position="319">
90
+            <state relative-caret-position="79068">
66 91
               <caret line="3601" column="90" selection-start-line="3601" selection-start-column="90" selection-end-line="3601" selection-end-column="90" />
67 92
             </state>
68 93
           </provider>
@@ -97,10 +122,6 @@
97 122
   </component>
98 123
   <component name="FindInProjectRecents">
99 124
     <findStrings>
100
-      <find>SchedualPatient</find>
101
-      <find>patient_count_list</find>
102
-      <find>aaa</find>
103
-      <find>newPatientStatistics</find>
104 125
       <find>/api/dialysis/start_record</find>
105 126
       <find>GetMonthReceiveinfo</find>
106 127
       <find>GetTodayDialysisMachinek</find>
@@ -127,6 +148,10 @@
127 148
       <find>GetYesterdayEntrylist</find>
128 149
       <find>GetYesterdayExitlist</find>
129 150
       <find>/api/function/getyestrdayexitlist</find>
151
+      <find>/org/org_info</find>
152
+      <find>/admin/api/org/adminuser</find>
153
+      <find>GetOrgAdminUser</find>
154
+      <find>import</find>
130 155
     </findStrings>
131 156
     <dirStrings>
132 157
       <dir>D:\goyard\src\XT_Admin_Api\controllers\admin_api_controllers</dir>
@@ -211,7 +236,7 @@
211 236
     <property name="DefaultGoTemplateProperty" value="Go Application" />
212 237
     <property name="go.gopath.indexing.explicitly.defined" value="true" />
213 238
     <property name="go.sdk.automatically.set" value="true" />
214
-    <property name="last_opened_file_path" value="$PROJECT_DIR$/../XT" />
239
+    <property name="last_opened_file_path" value="$PROJECT_DIR$" />
215 240
   </component>
216 241
   <component name="RunDashboard">
217 242
     <option name="ruleStates">
@@ -227,16 +252,18 @@
227 252
   </component>
228 253
   <component name="ToolWindowManager">
229 254
     <frame x="-7" y="-7" width="1550" height="838" extended-state="6" />
255
+    <editor active="true" />
230 256
     <layout>
231
-      <window_info content_ui="combo" id="Project" order="0" visible="true" weight="0.20710456" />
257
+      <window_info content_ui="combo" id="Project" order="0" visible="true" weight="0.21782842" />
232 258
       <window_info anchor="bottom" id="TODO" order="6" />
233
-      <window_info anchor="bottom" id="Event Log" order="7" sideWeight="0.113270774" side_tool="true" visible="true" weight="0.39372325" />
259
+      <window_info anchor="bottom" id="Event Log" order="7" sideWeight="0.11461126" side_tool="true" weight="0.29101285" />
234 260
       <window_info anchor="right" id="Database" order="3" />
261
+      <window_info anchor="bottom" id="Find" order="1" />
235 262
       <window_info anchor="bottom" id="Database Changes" order="8" show_stripe_button="false" />
236 263
       <window_info anchor="bottom" id="Version Control" order="9" />
237 264
       <window_info anchor="bottom" id="Run" order="2" />
238 265
       <window_info id="Structure" order="1" side_tool="true" weight="0.25" />
239
-      <window_info active="true" anchor="bottom" id="Terminal" order="10" sideWeight="0.88672924" visible="true" weight="0.39372325" />
266
+      <window_info active="true" anchor="bottom" id="Terminal" order="10" sideWeight="0.88538873" visible="true" weight="0.0" />
240 267
       <window_info id="Favorites" order="2" side_tool="true" />
241 268
       <window_info anchor="bottom" id="Debug" order="3" weight="0.4" />
242 269
       <window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" />
@@ -245,7 +272,6 @@
245 272
       <window_info anchor="right" id="Ant Build" order="1" weight="0.25" />
246 273
       <window_info anchor="bottom" id="Message" order="0" />
247 274
       <window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
248
-      <window_info anchor="bottom" id="Find" order="1" />
249 275
     </layout>
250 276
   </component>
251 277
   <component name="TypeScriptGeneratedFilesManager">
@@ -260,20 +286,6 @@
260 286
     </breakpoint-manager>
261 287
   </component>
262 288
   <component name="editorHistoryManager">
263
-    <entry file="file://$PROJECT_DIR$/controllers/function_api_controllers/function_api_base_controller.go">
264
-      <provider selected="true" editor-type-id="text-editor">
265
-        <state relative-caret-position="65296">
266
-          <caret line="2975" column="6" selection-start-line="2975" selection-start-column="6" selection-end-line="2975" selection-end-column="6" />
267
-        </state>
268
-      </provider>
269
-    </entry>
270
-    <entry file="file://$PROJECT_DIR$/controllers/admin_api_controllers/analysis_api_controller.go">
271
-      <provider selected="true" editor-type-id="text-editor">
272
-        <state relative-caret-position="9240">
273
-          <caret line="427" selection-start-line="427" selection-end-line="427" />
274
-        </state>
275
-      </provider>
276
-    </entry>
277 289
     <entry file="file://$PROJECT_DIR$/controllers/function_api_controllers/function_api_router_register.go">
278 290
       <provider selected="true" editor-type-id="text-editor">
279 291
         <state relative-caret-position="1650">
@@ -507,13 +519,6 @@
507 519
         </state>
508 520
       </provider>
509 521
     </entry>
510
-    <entry file="file://$PROJECT_DIR$/controllers/admin_api_controllers/admin_api_router_register.go">
511
-      <provider selected="true" editor-type-id="text-editor">
512
-        <state relative-caret-position="308">
513
-          <caret line="19" lean-forward="true" selection-start-line="19" selection-end-line="19" />
514
-        </state>
515
-      </provider>
516
-    </entry>
517 522
     <entry file="file://$PROJECT_DIR$/controllers/admin_api_controllers/login_api_controller.go">
518 523
       <provider selected="true" editor-type-id="text-editor">
519 524
         <state relative-caret-position="110">
@@ -584,13 +589,6 @@
584 589
         </state>
585 590
       </provider>
586 591
     </entry>
587
-    <entry file="file://$PROJECT_DIR$/models/function_models/fuction_query_models.go">
588
-      <provider selected="true" editor-type-id="text-editor">
589
-        <state relative-caret-position="11286">
590
-          <caret line="513" column="13" selection-start-line="513" selection-start-column="13" selection-end-line="513" selection-end-column="13" />
591
-        </state>
592
-      </provider>
593
-    </entry>
594 592
     <entry file="file://$PROJECT_DIR$/service/admin_service.go">
595 593
       <provider selected="true" editor-type-id="text-editor">
596 594
         <state relative-caret-position="572">
@@ -607,14 +605,42 @@
607 605
     </entry>
608 606
     <entry file="file://$PROJECT_DIR$/controllers/function_api_controllers/function_api_base_controller.go">
609 607
       <provider selected="true" editor-type-id="text-editor">
610
-        <state relative-caret-position="319">
608
+        <state relative-caret-position="79068">
611 609
           <caret line="3601" column="90" selection-start-line="3601" selection-start-column="90" selection-end-line="3601" selection-end-column="90" />
612 610
         </state>
613 611
       </provider>
614 612
     </entry>
613
+    <entry file="file://$PROJECT_DIR$/models/function_models/fuction_query_models.go">
614
+      <provider selected="true" editor-type-id="text-editor">
615
+        <state relative-caret-position="11264">
616
+          <caret line="512" column="5" selection-start-line="512" selection-start-column="5" selection-end-line="512" selection-end-column="5" />
617
+        </state>
618
+      </provider>
619
+    </entry>
620
+    <entry file="file://$PROJECT_DIR$/controllers/admin_api_controllers/admin_api_router_register.go">
621
+      <provider selected="true" editor-type-id="text-editor">
622
+        <state relative-caret-position="279">
623
+          <caret line="24" column="62" selection-start-line="24" selection-start-column="46" selection-end-line="24" selection-end-column="62" />
624
+        </state>
625
+      </provider>
626
+    </entry>
627
+    <entry file="file://$PROJECT_DIR$/controllers/admin_api_controllers/org_api_controller.go">
628
+      <provider selected="true" editor-type-id="text-editor">
629
+        <state relative-caret-position="230">
630
+          <caret line="278" column="72" selection-start-line="278" selection-start-column="47" selection-end-line="278" selection-end-column="72" />
631
+        </state>
632
+      </provider>
633
+    </entry>
634
+    <entry file="file://$PROJECT_DIR$/service/org_service.go">
635
+      <provider selected="true" editor-type-id="text-editor">
636
+        <state relative-caret-position="5020">
637
+          <caret line="566" column="267" selection-start-line="566" selection-start-column="176" selection-end-line="566" selection-end-column="267" />
638
+        </state>
639
+      </provider>
640
+    </entry>
615 641
     <entry file="file://$PROJECT_DIR$/controllers/function_api_controllers/function_api_router_register.go">
616 642
       <provider selected="true" editor-type-id="text-editor">
617
-        <state relative-caret-position="47">
643
+        <state relative-caret-position="391">
618 644
           <caret line="87" column="79" selection-start-line="87" selection-start-column="54" selection-end-line="87" selection-end-column="79" />
619 645
           <folding>
620 646
             <element signature="e#34#79#0" expanded="true" />
@@ -624,8 +650,8 @@
624 650
     </entry>
625 651
     <entry file="file://$PROJECT_DIR$/service/function_service.go">
626 652
       <provider selected="true" editor-type-id="text-editor">
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" />
653
+        <state relative-caret-position="373">
654
+          <caret line="149" column="138" selection-start-line="149" selection-start-column="138" selection-end-line="149" selection-end-column="138" />
629 655
           <folding>
630 656
             <element signature="e#17#73#0" expanded="true" />
631 657
           </folding>

BIN
XT_Admin_Api.exe View File


BIN
XT_Admin_Api.exe~ View File


+ 15 - 14
service/function_service.go View File

@@ -9,7 +9,7 @@ import (
9 9
 func GetTodayInfo(to int64,ctime int64,page int64,limit int64)(patientinfo []function_models.PatientInfo,total int64,err error) {
10 10
 
11 11
 	offset := (page - 1) * limit
12
-	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_patients as x on x.user_org_id = u.id where x.created_time >= ? AND x.created_time <= ? GROUP BY x.user_org_id",to,ctime).Scan(&patientinfo).Error
12
+	err = readUserDb.Raw("select * from sgj_users.sgj_user_org as u left join sgj_org_follow as f On f.org_id = u.id left JoIN sgj_admin as a On a.id = f.admin_user_id left join sgj_xt.xt_patients as x on x.user_org_id = u.id where x.created_time >= ? AND x.created_time <= ?  GROUP BY x.user_org_id",to,ctime).Scan(&patientinfo).Error
13 13
 	rows, err := readUserDb.Offset(offset).Limit(limit).Raw("select Count(1) from sgj_users.sgj_user_org as u join sgj_xt.xt_patients as x on x.user_org_id = u.id where x.created_time >= ? AND x.created_time <= ?", to, ctime).Rows()
14 14
 	fmt.Println("rows是什么",rows)
15 15
 	if rows.Next() {
@@ -23,7 +23,7 @@ func GetTodayInfo(to int64,ctime int64,page int64,limit int64)(patientinfo []fun
23 23
 func GetTodayDialysisPatientsInfo(to int64,ctime int64,page int64,limit int64)(patientinfo []function_models.PatientInfo,total int64,err error)  {
24 24
 
25 25
 	offset := (page - 1) * limit
26
-	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_dialysis_prescription as x on x.user_org_id = u.id JOIN sgj_xt.xt_patients as p On p.id = x.patient_id  where x.created_time >= ? AND x.created_time <= ? GROUP BY x.user_org_id",to,ctime).Scan(&patientinfo).Error
26
+	err = readUserDb.Raw("select * from sgj_users.sgj_user_org as u left join sgj_org_follow as f On f.org_id = u.id left JoIN sgj_admin as a On a.id = f.admin_user_id left join sgj_xt.xt_dialysis_prescription as x on x.user_org_id = u.id left JOIN sgj_xt.xt_patients as p On p.id = x.patient_id  where x.created_time >= ? AND x.created_time <= ? GROUP BY x.user_org_id",to,ctime).Scan(&patientinfo).Error
27 27
 	rows, err := readUserDb.Offset(offset).Limit(limit).Raw("select Count(1) from sgj_users.sgj_user_org as u join sgj_xt.xt_dialysis_prescription as x on x.user_org_id = u.id  where x.created_time >= ? AND x.created_time <= ?", to, ctime).Rows()
28 28
 	if rows.Next() {
29 29
 		rows.Scan(&total)
@@ -37,7 +37,7 @@ func GetTodayDialysisPatientsInfo(to int64,ctime int64,page int64,limit int64)(p
37 37
 func GetTodayReceivePatientsInfo(to int64,ctime int64,page int64,limit int64)(patientinfo []function_models.PatientInfo,total int64,err error)  {
38 38
 
39 39
 	offset := (page - 1) * limit
40
-	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_receive_treatment_asses as x on x.user_org_id = u.id JOIN sgj_xt.xt_patients as p On p.id = x.patient_id  where x.created_time >= ? AND x.created_time <= ? GROUP BY x.user_org_id",to,ctime).Scan(&patientinfo).Error
40
+	err = readUserDb.Raw("select * from sgj_users.sgj_user_org as u  left join sgj_org_follow as f On f.org_id = u.id left JoIN sgj_admin as a On a.id = f.admin_user_id left join sgj_xt.xt_receive_treatment_asses as x on x.user_org_id = u.id left JOIN sgj_xt.xt_patients as p On p.id = x.patient_id  where x.created_time >= ? AND x.created_time <= ? GROUP BY x.user_org_id",to,ctime).Scan(&patientinfo).Error
41 41
 	rows, err := readUserDb.Offset(offset).Limit(limit).Raw("select Count(1) from sgj_users.sgj_user_org as u join sgj_xt.xt_receive_treatment_asses as x on x.user_org_id = u.id  where x.created_time >= ? AND x.created_time <= ?", to, ctime).Rows()
42 42
 	if rows.Next() {
43 43
 		rows.Scan(&total)
@@ -48,7 +48,7 @@ func GetTodayReceivePatientsInfo(to int64,ctime int64,page int64,limit int64)(pa
48 48
 // 透前评估
49 49
 func GetTodayBeforDislysisInfo(to int64,ctime int64,page int64,limit int64)(patientinfo []function_models.PatientInfo,total int64,err error)  {
50 50
 	offset := (page - 1) * limit
51
-	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_assessment_before_dislysis as x on x.user_org_id = u.id JOIN sgj_xt.xt_patients as p On p.id = x.patient_id  where x.created_time >= ? AND x.created_time <= ? GROUP BY x.user_org_id",to,ctime).Scan(&patientinfo).Error
51
+	err = readUserDb.Raw("select * from sgj_users.sgj_user_org as u left join sgj_org_follow as f On f.org_id = u.id left JoIN sgj_admin as a On a.id = f.admin_user_id left join sgj_xt.xt_assessment_before_dislysis as x on x.user_org_id = u.id left JOIN sgj_xt.xt_patients as p On p.id = x.patient_id  where x.created_time >= ? AND x.created_time <= ? GROUP BY x.user_org_id",to,ctime).Scan(&patientinfo).Error
52 52
 	rows, err := readUserDb.Offset(offset).Limit(limit).Raw("select Count(1) from sgj_users.sgj_user_org as u join sgj_xt.xt_assessment_before_dislysis as x on x.user_org_id = u.id  where x.created_time >= ? AND x.created_time <= ?", to, ctime).Rows()
53 53
 	if rows.Next() {
54 54
 		rows.Scan(&total)
@@ -62,7 +62,7 @@ func GetTodayDoctorsOrderInfo(to int64,ctime int64,page int64,limit int64)(patie
62 62
 
63 63
 
64 64
 	offset := (page - 1) * limit
65
-	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_doctor_advice as x on x.user_org_id = u.id JOIN sgj_xt.xt_patients as p On p.id = x.patient_id  where x.created_time >= ? AND x.created_time <= ? GROUP BY x.user_org_id",to,ctime).Scan(&patientinfo).Error
65
+	err = readUserDb.Raw("select * from sgj_users.sgj_user_org as u left join sgj_org_follow as f On f.org_id = u.id left JoIN sgj_admin as a On a.id = f.admin_user_id join sgj_xt.xt_doctor_advice as x on x.user_org_id = u.id left JOIN sgj_xt.xt_patients as p On p.id = x.patient_id  where x.created_time >= ? AND x.created_time <= ? GROUP BY x.user_org_id",to,ctime).Scan(&patientinfo).Error
66 66
 	rows, err := readUserDb.Offset(offset).Limit(limit).Raw("select Count(1) from sgj_users.sgj_user_org as u join sgj_xt.xt_doctor_advice as x on x.user_org_id = u.id  where x.created_time >= ? AND x.created_time <= ?", to, ctime).Rows()
67 67
 	if rows.Next() {
68 68
 		rows.Scan(&total)
@@ -74,7 +74,7 @@ func GetTodayDoctorsOrderInfo(to int64,ctime int64,page int64,limit int64)(patie
74 74
 func GetTodayDoubleCheckInfo(to int64,ctime int64,page int64,limit int64)(patientinfo []function_models.PatientInfo,total int64,err error)  {
75 75
 
76 76
 	offset := (page - 1) * limit
77
-	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_double_check as x on x.user_org_id = u.id JOIN sgj_xt.xt_patients as p On p.id = x.patient_id  where x.created_time >= ? AND x.created_time <= ? GROUP BY x.user_org_id",to,ctime).Scan(&patientinfo).Error
77
+	err = readUserDb.Raw("select * from sgj_users.sgj_user_org as u left join sgj_org_follow as f On f.org_id = u.id left JoIN sgj_admin as a On a.id = f.admin_user_id join sgj_xt.xt_double_check as x on x.user_org_id = u.id left JOIN sgj_xt.xt_patients as p On p.id = x.patient_id  where x.created_time >= ? AND x.created_time <= ? GROUP BY x.user_org_id",to,ctime).Scan(&patientinfo).Error
78 78
 	rows, err := readUserDb.Offset(offset).Limit(limit).Raw("select Count(1) from sgj_users.sgj_user_org as u join sgj_xt.xt_double_check as x on x.user_org_id = u.id  where x.created_time >= ? AND x.created_time <= ?", to, ctime).Rows()
79 79
 	if rows.Next() {
80 80
 		rows.Scan(&total)
@@ -86,7 +86,7 @@ func GetTodayDoubleCheckInfo(to int64,ctime int64,page int64,limit int64)(patien
86 86
 func GetTodayDialysisMachinek(to int64,ctime int64,page int64,limit int64)(patientinfo []function_models.PatientInfo,total int64,err error)  {
87 87
 
88 88
 	offset := (page - 1) * limit
89
-	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_dialysis_order as x on x.user_org_id = u.id JOIN sgj_xt.xt_patients as p On p.id = x.patient_id  where x.created_time >= ? AND x.created_time <= ? GROUP BY x.user_org_id",to,ctime).Scan(&patientinfo).Error
89
+	err = readUserDb.Raw("select * from sgj_users.sgj_user_org as u left join sgj_org_follow as f On f.org_id = u.id left JoIN sgj_admin as a On a.id = f.admin_user_id left join sgj_xt.xt_dialysis_order as x on x.user_org_id = u.id left JOIN sgj_xt.xt_patients as p On p.id = x.patient_id  where x.created_time >= ? AND x.created_time <= ? GROUP BY x.user_org_id",to,ctime).Scan(&patientinfo).Error
90 90
 	rows, err := readUserDb.Offset(offset).Limit(limit).Raw("select Count(1) from sgj_users.sgj_user_org as u join sgj_xt.xt_dialysis_order as x on x.user_org_id = u.id  where x.created_time >= ? AND x.created_time <= ?", to, ctime).Rows()
91 91
 	if rows.Next() {
92 92
 		rows.Scan(&total)
@@ -99,7 +99,7 @@ func GetTodayDialysisMachinek(to int64,ctime int64,page int64,limit int64)(patie
99 99
 func GetTodayDialysisExamination(to int64,ctime int64,page int64,limit int64)(patientinfo []function_models.PatientInfo,total int64,err error) {
100 100
 
101 101
 	offset := (page - 1) * limit
102
-	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_monitoring_record as x on x.user_org_id = u.id JOIN sgj_xt.xt_patients as p On p.id = x.patient_id  where x.created_time >= ? AND x.created_time <= ? GROUP BY x.user_org_id",to,ctime).Scan(&patientinfo).Error
102
+	err = readUserDb.Raw("select * from sgj_users.sgj_user_org as u left join sgj_org_follow as f On f.org_id = u.id left JoIN sgj_admin as a On a.id = f.admin_user_id join sgj_xt.xt_monitoring_record as x on x.user_org_id = u.id left JOIN sgj_xt.xt_patients as p On p.id = x.patient_id  where x.created_time >= ? AND x.created_time <= ? GROUP BY x.user_org_id",to,ctime).Scan(&patientinfo).Error
103 103
 	rows, err := readUserDb.Offset(offset).Limit(limit).Raw("select Count(1) from sgj_users.sgj_user_org as u join sgj_xt.xt_monitoring_record as x on x.user_org_id = u.id  where x.created_time >= ? AND x.created_time <= ?", to, ctime).Rows()
104 104
 	if rows.Next() {
105 105
 		rows.Scan(&total)
@@ -112,7 +112,7 @@ func GetTodayDialysisExamination(to int64,ctime int64,page int64,limit int64)(pa
112 112
 func GetTodayBeforOrpenetration(to int64,ctime int64,page int64,limit int64)(patientinfo []function_models.PatientInfo,total int64,err error)  {
113 113
 
114 114
 	offset := (page - 1) * limit
115
-	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_dialysis_order as x on x.user_org_id = u.id JOIN sgj_xt.xt_patients as p On p.id = x.patient_id  where x.created_time >= ? AND x.created_time <= ? GROUP BY x.user_org_id",to,ctime).Scan(&patientinfo).Error
115
+	err = readUserDb.Raw("select * from sgj_users.sgj_user_org as u left join sgj_org_follow as f On f.org_id = u.id left JoIN sgj_admin as a On a.id = f.admin_user_id join sgj_xt.xt_dialysis_order as x on x.user_org_id = u.id left JOIN sgj_xt.xt_patients as p On p.id = x.patient_id  where x.created_time >= ? AND x.created_time <= ? GROUP BY x.user_org_id",to,ctime).Scan(&patientinfo).Error
116 116
 	rows, err := readUserDb.Offset(offset).Limit(limit).Raw("select Count(1) from sgj_users.sgj_user_org as u join sgj_xt.xt_dialysis_order as x on x.user_org_id = u.id  where x.created_time >= ? AND x.created_time <= ?", to, ctime).Rows()
117 117
 	if rows.Next() {
118 118
 		rows.Scan(&total)
@@ -124,7 +124,7 @@ func GetTodayBeforOrpenetration(to int64,ctime int64,page int64,limit int64)(pat
124 124
 //透后评估
125 125
 func GetTodayPostAssessment(to int64,ctime int64,page int64,limit int64)(patientinfo []function_models.PatientInfo,total int64,err error)  {
126 126
 	offset := (page - 1) * limit
127
-	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_assessment_after_dislysis as x on x.user_org_id = u.id JOIN sgj_xt.xt_patients as p On p.id = x.patient_id  where x.created_time >= ? AND x.created_time <= ? GROUP BY x.user_org_id",to,ctime).Scan(&patientinfo).Error
127
+	err = readUserDb.Raw("select * from sgj_users.sgj_user_org as u left join sgj_org_follow as f On f.org_id = u.id left JoIN sgj_admin as a On a.id = f.admin_user_id join sgj_xt.xt_assessment_after_dislysis as x on x.user_org_id = u.id left JOIN sgj_xt.xt_patients as p On p.id = x.patient_id  where x.created_time >= ? AND x.created_time <= ? GROUP BY x.user_org_id",to,ctime).Scan(&patientinfo).Error
128 128
 	rows, err := readUserDb.Offset(offset).Limit(limit).Raw("select Count(1) from sgj_users.sgj_user_org as u join sgj_xt.xt_assessment_after_dislysis as x on x.user_org_id = u.id  where x.created_time >= ? AND x.created_time <= ?", to, ctime).Rows()
129 129
 	if rows.Next() {
130 130
 		rows.Scan(&total)
@@ -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_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()
138
+	 err = readUserDb.Raw("select * from sgj_users.sgj_user_org as u  join sgj_xt.xt_warehouse 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 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,10 +146,11 @@ 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_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()
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  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
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.ctime >= ? AND x.ctime <= ?", to, ctime).Rows()
151 151
 	if rows.Next() {
152 152
 		rows.Scan(&total)
153 153
 	}
154
+
154 155
 	return patientinfo,total,err
155 156
 }