ソースを参照

机构功能相关接口

csx 5 年 前
コミット
f1c12e2ed1

+ 296 - 316
.idea/workspace.xml ファイルの表示

@@ -3,14 +3,13 @@
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" />
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
-      <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" />
10
-      <change beforePath="$PROJECT_DIR$/service/function_service.go" beforeDir="false" afterPath="$PROJECT_DIR$/service/function_service.go" afterDir="false" />
6
+      <change beforePath="$PROJECT_DIR$/controllers/admin_api_controllers/admin_api_router_register.go" beforeDir="false" afterPath="$PROJECT_DIR$/controllers/admin_api_controllers/admin_api_router_register.go" afterDir="false" />
7
+      <change beforePath="$PROJECT_DIR$/controllers/admin_api_controllers/analysis_api_controller.go" beforeDir="false" afterPath="$PROJECT_DIR$/controllers/admin_api_controllers/analysis_api_controller.go" afterDir="false" />
8
+      <change beforePath="$PROJECT_DIR$/controllers/admin_api_controllers/system_api_controller.go" beforeDir="false" afterPath="$PROJECT_DIR$/controllers/admin_api_controllers/system_api_controller.go" afterDir="false" />
9
+      <change beforePath="$PROJECT_DIR$/routers/router.go" beforeDir="false" afterPath="$PROJECT_DIR$/routers/router.go" afterDir="false" />
10
+      <change beforePath="$PROJECT_DIR$/service/admin_service.go" beforeDir="false" afterPath="$PROJECT_DIR$/service/admin_service.go" afterDir="false" />
11 11
     </list>
12 12
     <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
13
-    <option name="TRACKING_ENABLED" value="true" />
14 13
     <option name="SHOW_DIALOG" value="false" />
15 14
     <option name="HIGHLIGHT_CONFLICTS" value="true" />
16 15
     <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
@@ -18,56 +17,107 @@
18 17
   </component>
19 18
   <component name="FileEditorManager">
20 19
     <leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
21
-      <file leaf-file-name="analysis_api_controller.go" pinned="false" current-in-tab="false">
20
+      <file pinned="false" current-in-tab="false">
21
+        <entry file="file://$PROJECT_DIR$/controllers/admin_api_controllers/admin_api_router_register.go">
22
+          <provider selected="true" editor-type-id="text-editor">
23
+            <state relative-caret-position="200">
24
+              <caret line="31" column="50" selection-start-line="31" selection-start-column="50" selection-end-line="31" selection-end-column="50" />
25
+            </state>
26
+          </provider>
27
+        </entry>
28
+      </file>
29
+      <file pinned="false" current-in-tab="false">
22 30
         <entry file="file://$PROJECT_DIR$/controllers/admin_api_controllers/analysis_api_controller.go">
23 31
           <provider selected="true" editor-type-id="text-editor">
24
-            <state relative-caret-position="394">
25
-              <caret line="427" selection-start-line="427" selection-end-line="427" />
32
+            <state relative-caret-position="-612">
33
+              <caret line="487" column="36" selection-start-line="487" selection-start-column="36" selection-end-line="487" selection-end-column="36" />
26 34
             </state>
27 35
           </provider>
28 36
         </entry>
29 37
       </file>
30
-      <file leaf-file-name="function_api_router_register.go" pinned="false" current-in-tab="false">
31
-        <entry file="file://$PROJECT_DIR$/controllers/function_api_controllers/function_api_router_register.go">
38
+      <file pinned="false" current-in-tab="true">
39
+        <entry file="file://$PROJECT_DIR$/controllers/admin_api_controllers/system_api_controller.go">
32 40
           <provider selected="true" editor-type-id="text-editor">
33
-            <state relative-caret-position="207">
34
-              <caret line="80" column="81" selection-start-line="80" selection-start-column="56" selection-end-line="80" selection-end-column="81" />
41
+            <state relative-caret-position="192">
42
+              <caret line="74" column="33" selection-start-line="74" selection-start-column="33" selection-end-line="74" selection-end-column="33" />
35 43
               <folding>
36
-                <element signature="e#34#79#0" expanded="true" />
44
+                <element signature="e#31#211#0" expanded="true" />
37 45
               </folding>
38 46
             </state>
39 47
           </provider>
40 48
         </entry>
41 49
       </file>
42
-      <file leaf-file-name="admin_service.go" pinned="false" current-in-tab="false">
50
+      <file pinned="false" current-in-tab="false">
43 51
         <entry file="file://$PROJECT_DIR$/service/admin_service.go">
44 52
           <provider selected="true" editor-type-id="text-editor">
45
-            <state relative-caret-position="9636">
46
-              <caret line="444" selection-start-line="444" selection-end-line="444" />
53
+            <state relative-caret-position="120">
54
+              <caret line="823" column="305" selection-start-line="823" selection-start-column="305" selection-end-line="823" selection-end-column="305" />
55
+              <folding>
56
+                <element signature="e#35#157#0" expanded="true" />
57
+              </folding>
58
+            </state>
59
+          </provider>
60
+        </entry>
61
+      </file>
62
+      <file pinned="false" current-in-tab="false">
63
+        <entry file="file:///usr/local/Cellar/go/1.10.1/libexec/src/reflect/value.go">
64
+          <provider selected="true" editor-type-id="text-editor">
65
+            <state relative-caret-position="135">
66
+              <caret line="305" selection-start-line="305" selection-end-line="305" />
67
+            </state>
68
+          </provider>
69
+        </entry>
70
+      </file>
71
+      <file pinned="false" current-in-tab="false">
72
+        <entry file="file://$PROJECT_DIR$/controllers/admin_api_controllers/org_api_controller.go">
73
+          <provider selected="true" editor-type-id="text-editor">
74
+            <state relative-caret-position="298">
75
+              <caret line="114" column="40" selection-start-line="114" selection-start-column="40" selection-end-line="114" selection-end-column="40" />
47 76
               <folding>
48
-                <element signature="e#35#139#0" expanded="true" />
77
+                <element signature="e#31#160#0" expanded="true" />
49 78
               </folding>
50 79
             </state>
51 80
           </provider>
52 81
         </entry>
53 82
       </file>
54
-      <file leaf-file-name="function_service.go" pinned="false" current-in-tab="false">
55
-        <entry file="file://$PROJECT_DIR$/service/function_service.go">
83
+      <file pinned="false" current-in-tab="false">
84
+        <entry file="file://$PROJECT_DIR$/controllers/admin_api_controllers/admin_api_base_controller.go">
85
+          <provider selected="true" editor-type-id="text-editor">
86
+            <state relative-caret-position="279">
87
+              <caret line="50" column="41" selection-start-line="50" selection-start-column="41" selection-end-line="50" selection-end-column="41" />
88
+            </state>
89
+          </provider>
90
+        </entry>
91
+      </file>
92
+      <file pinned="false" current-in-tab="false">
93
+        <entry file="file://$PROJECT_DIR$/service/org_service.go">
56 94
           <provider selected="true" editor-type-id="text-editor">
57
-            <state relative-caret-position="-528">
58
-              <caret line="15" column="8" selection-start-line="15" selection-start-column="8" selection-end-line="15" selection-end-column="8" />
95
+            <state relative-caret-position="-4694">
96
+              <caret line="217" column="33" selection-start-line="217" selection-start-column="33" selection-end-line="217" selection-end-column="151" />
59 97
               <folding>
60
-                <element signature="e#17#66#0" expanded="true" />
98
+                <element signature="e#396#5796#0" />
61 99
               </folding>
62 100
             </state>
63 101
           </provider>
64 102
         </entry>
65 103
       </file>
66
-      <file leaf-file-name="function_api_base_controller.go" pinned="false" current-in-tab="true">
67
-        <entry file="file://$PROJECT_DIR$/controllers/function_api_controllers/function_api_base_controller.go">
104
+      <file pinned="false" current-in-tab="false">
105
+        <entry file="file://$PROJECT_DIR$/conf/app.conf">
106
+          <provider selected="true" editor-type-id="text-editor">
107
+            <state relative-caret-position="180">
108
+              <caret line="12" column="17" selection-start-line="12" selection-start-column="17" selection-end-line="12" selection-end-column="17" />
109
+            </state>
110
+          </provider>
111
+        </entry>
112
+      </file>
113
+      <file pinned="false" current-in-tab="false">
114
+        <entry file="file://$PROJECT_DIR$/routers/router.go">
68 115
           <provider selected="true" editor-type-id="text-editor">
69
-            <state relative-caret-position="1298">
70
-              <caret line="3065" column="22" selection-start-line="3065" selection-start-column="22" selection-end-line="3065" selection-end-column="22" />
116
+            <state relative-caret-position="315">
117
+              <caret line="21" column="31" selection-start-line="21" selection-start-column="31" selection-end-line="21" selection-end-column="31" />
118
+              <folding>
119
+                <element signature="e#17#222#0" expanded="true" />
120
+              </folding>
71 121
             </state>
72 122
           </provider>
73 123
         </entry>
@@ -83,12 +133,10 @@
83 133
   </component>
84 134
   <component name="FindInProjectRecents">
85 135
     <findStrings>
86
-      <find>/admin/api/patient/analysis</find>
87 136
       <find>PatientAnalysis</find>
88 137
       <find>AdminAPIControllersRegisterRouters</find>
89 138
       <find>admin_api_controllers</find>
90 139
       <find>/admin/api/home/statistics</find>
91
-      <find>HomeStatistics</find>
92 140
       <find>SchedualPatient</find>
93 141
       <find>patient_count_list</find>
94 142
       <find>aaa</find>
@@ -101,47 +149,70 @@
101 149
       <find>/api/function/getBeforDislysis</find>
102 150
       <find>GetTodayBeforDislysisInfo</find>
103 151
       <find>GetTodayInfo</find>
152
+      <find>admin/api/org</find>
153
+      <find>admin/api/follow/cancel</find>
154
+      <find>LoginByPwd</find>
155
+      <find>/admin/api/follow/edit</find>
156
+      <find>PostUnFollow</find>
157
+      <find>/admin/api/user/delete</find>
158
+      <find>ModifyFollowInfo</find>
159
+      <find>GetOrgList</find>
160
+      <find>GetOrgInfo</find>
161
+      <find>GetOrgDialysisOrderStatistics</find>
162
+      <find>HomeStatistics</find>
163
+      <find>GetFollowOrg</find>
164
+      <find>GetWaitFollowOrg</find>
165
+      <find>GetAllFollowOrg</find>
104 166
     </findStrings>
105 167
     <dirStrings>
106 168
       <dir>D:\goyard\src\XT_Admin_Api\controllers\admin_api_controllers</dir>
107 169
     </dirStrings>
108 170
   </component>
109
-  <component name="GOROOT" path="C:\Go" />
171
+  <component name="GOROOT" path="/usr/local/Cellar/go/1.10.1/libexec" />
110 172
   <component name="Git.Settings">
111 173
     <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
112 174
   </component>
113 175
   <component name="IdeDocumentHistory">
114 176
     <option name="CHANGED_PATHS">
115 177
       <list>
116
-        <option value="$PROJECT_DIR$/controllers/admin_api_controllers/admin_api_router_register.go" />
117
-        <option value="$PROJECT_DIR$/routers/router.go" />
118 178
         <option value="$PROJECT_DIR$/controllers/admin_api_controllers/admin_api_base_controller.go" />
119
-        <option value="$PROJECT_DIR$/service/admin_service.go" />
120
-        <option value="$PROJECT_DIR$/controllers/admin_api_controllers/analysis_api_controller.go" />
121 179
         <option value="$PROJECT_DIR$/models/function_models/fuction_query_models.go" />
122 180
         <option value="$PROJECT_DIR$/service/function_service.go" />
123 181
         <option value="$PROJECT_DIR$/controllers/function_api_controllers/function_api_router_register.go" />
124 182
         <option value="$PROJECT_DIR$/controllers/function_api_controllers/function_api_base_controller.go" />
183
+        <option value="$PROJECT_DIR$/controllers/admin_api_controllers/org_api_controller.go" />
184
+        <option value="$PROJECT_DIR$/service/db.go" />
185
+        <option value="$PROJECT_DIR$/conf/app.conf" />
186
+        <option value="$PROJECT_DIR$/controllers/admin_api_controllers/analysis_api_controller.go" />
187
+        <option value="$PROJECT_DIR$/controllers/admin_api_controllers/admin_api_router_register.go" />
188
+        <option value="$PROJECT_DIR$/routers/router.go" />
189
+        <option value="$PROJECT_DIR$/service/admin_service.go" />
190
+        <option value="$PROJECT_DIR$/controllers/admin_api_controllers/system_api_controller.go" />
125 191
       </list>
126 192
     </option>
127 193
   </component>
128
-  <component name="JsBuildToolGruntFileManager" detection-done="true" sorting="DEFINITION_ORDER" />
129
-  <component name="JsBuildToolPackageJson" detection-done="true" sorting="DEFINITION_ORDER" />
130
-  <component name="JsGulpfileManager">
131
-    <detection-done>true</detection-done>
132
-    <sorting>DEFINITION_ORDER</sorting>
133
-  </component>
134
-  <component name="ProjectFrameBounds" extendedState="6">
135
-    <option name="x" value="525" />
136
-    <option name="width" value="1230" />
137
-    <option name="height" value="1040" />
194
+  <component name="ProjectFrameBounds">
195
+    <option name="x" value="132" />
196
+    <option name="y" value="23" />
197
+    <option name="width" value="1440" />
198
+    <option name="height" value="834" />
138 199
   </component>
139 200
   <component name="ProjectView">
140 201
     <navigator proportions="" version="1">
141 202
       <foldersAlwaysOnTop value="true" />
142 203
     </navigator>
143 204
     <panes>
144
-      <pane id="Scope" />
205
+      <pane id="Scope">
206
+        <subPane subId="Scope 'Project Files'; set:Project Files; class com.intellij.psi.search.scope.ProjectFilesScope">
207
+          <expand>
208
+            <path>
209
+              <item name="XT_Admin_Api" type="3d21c010:ScopeViewTreeModel$ProjectNode" />
210
+              <item name="" type="442cc68d:ScopeViewTreeModel$RootNode" />
211
+            </path>
212
+          </expand>
213
+          <select />
214
+        </subPane>
215
+      </pane>
145 216
       <pane id="ProjectPane">
146 217
         <subPane>
147 218
           <expand>
@@ -159,11 +230,69 @@
159 230
               <item name="XT_Admin_Api" type="462c0819:PsiDirectoryNode" />
160 231
               <item name="controllers" type="462c0819:PsiDirectoryNode" />
161 232
             </path>
233
+            <path>
234
+              <item name="XT_Admin_Api" type="b2602c69:ProjectViewProjectNode" />
235
+              <item name="XT_Admin_Api" type="462c0819:PsiDirectoryNode" />
236
+              <item name="controllers" type="462c0819:PsiDirectoryNode" />
237
+              <item name="admin_api_controllers" type="462c0819:PsiDirectoryNode" />
238
+            </path>
239
+            <path>
240
+              <item name="XT_Admin_Api" type="b2602c69:ProjectViewProjectNode" />
241
+              <item name="XT_Admin_Api" type="462c0819:PsiDirectoryNode" />
242
+              <item name="enums" type="462c0819:PsiDirectoryNode" />
243
+            </path>
244
+            <path>
245
+              <item name="XT_Admin_Api" type="b2602c69:ProjectViewProjectNode" />
246
+              <item name="XT_Admin_Api" type="462c0819:PsiDirectoryNode" />
247
+              <item name="models" type="462c0819:PsiDirectoryNode" />
248
+            </path>
249
+            <path>
250
+              <item name="XT_Admin_Api" type="b2602c69:ProjectViewProjectNode" />
251
+              <item name="XT_Admin_Api" type="462c0819:PsiDirectoryNode" />
252
+              <item name="models" type="462c0819:PsiDirectoryNode" />
253
+              <item name="admin_models" type="462c0819:PsiDirectoryNode" />
254
+            </path>
255
+            <path>
256
+              <item name="XT_Admin_Api" type="b2602c69:ProjectViewProjectNode" />
257
+              <item name="XT_Admin_Api" type="462c0819:PsiDirectoryNode" />
258
+              <item name="models" type="462c0819:PsiDirectoryNode" />
259
+              <item name="function_models" type="462c0819:PsiDirectoryNode" />
260
+            </path>
162 261
             <path>
163 262
               <item name="XT_Admin_Api" type="b2602c69:ProjectViewProjectNode" />
164 263
               <item name="XT_Admin_Api" type="462c0819:PsiDirectoryNode" />
165 264
               <item name="service" type="462c0819:PsiDirectoryNode" />
166 265
             </path>
266
+            <path>
267
+              <item name="XT_Admin_Api" type="b2602c69:ProjectViewProjectNode" />
268
+              <item name="External Libraries" type="cb654da1:ExternalLibrariesNode" />
269
+            </path>
270
+            <path>
271
+              <item name="XT_Admin_Api" type="b2602c69:ProjectViewProjectNode" />
272
+              <item name="External Libraries" type="cb654da1:ExternalLibrariesNode" />
273
+              <item name="Go SDK 1.10.1" type="20ee2d1f:SyntheticLibraryElementNode" />
274
+            </path>
275
+            <path>
276
+              <item name="XT_Admin_Api" type="b2602c69:ProjectViewProjectNode" />
277
+              <item name="External Libraries" type="cb654da1:ExternalLibrariesNode" />
278
+              <item name="Go SDK 1.10.1" type="20ee2d1f:SyntheticLibraryElementNode" />
279
+              <item name="src" type="462c0819:PsiDirectoryNode" />
280
+            </path>
281
+            <path>
282
+              <item name="XT_Admin_Api" type="b2602c69:ProjectViewProjectNode" />
283
+              <item name="External Libraries" type="cb654da1:ExternalLibrariesNode" />
284
+              <item name="Go SDK 1.10.1" type="20ee2d1f:SyntheticLibraryElementNode" />
285
+              <item name="src" type="462c0819:PsiDirectoryNode" />
286
+              <item name="database" type="462c0819:PsiDirectoryNode" />
287
+            </path>
288
+            <path>
289
+              <item name="XT_Admin_Api" type="b2602c69:ProjectViewProjectNode" />
290
+              <item name="External Libraries" type="cb654da1:ExternalLibrariesNode" />
291
+              <item name="Go SDK 1.10.1" type="20ee2d1f:SyntheticLibraryElementNode" />
292
+              <item name="src" type="462c0819:PsiDirectoryNode" />
293
+              <item name="database" type="462c0819:PsiDirectoryNode" />
294
+              <item name="sql" type="462c0819:PsiDirectoryNode" />
295
+            </path>
167 296
           </expand>
168 297
           <select />
169 298
         </subPane>
@@ -172,9 +301,12 @@
172 301
   </component>
173 302
   <component name="PropertiesComponent">
174 303
     <property name="DefaultGoTemplateProperty" value="Go Application" />
304
+    <property name="GO_FMT" value="true" />
305
+    <property name="WebServerToolWindowFactoryState" value="false" />
175 306
     <property name="go.gopath.indexing.explicitly.defined" value="true" />
176 307
     <property name="go.sdk.automatically.set" value="true" />
177 308
     <property name="last_opened_file_path" value="$PROJECT_DIR$" />
309
+    <property name="settings.editor.selected.configurable" value="preferences.lookFeel" />
178 310
   </component>
179 311
   <component name="RunDashboard">
180 312
     <option name="ruleStates">
@@ -188,424 +320,272 @@
188 320
       </list>
189 321
     </option>
190 322
   </component>
323
+  <component name="SvnConfiguration">
324
+    <configuration />
325
+  </component>
191 326
   <component name="ToolWindowManager">
192
-    <frame x="-7" y="-7" width="1550" height="838" extended-state="6" />
327
+    <frame x="132" y="23" width="1440" height="834" extended-state="0" />
328
+    <editor active="true" />
193 329
     <layout>
194
-      <window_info content_ui="combo" id="Project" order="0" visible="true" weight="0.19638069" />
195
-      <window_info anchor="bottom" id="TODO" order="6" />
196
-      <window_info anchor="bottom" id="Event Log" order="7" sideWeight="0.10522788" side_tool="true" visible="true" weight="0.29386592" />
197
-      <window_info anchor="right" id="Database" order="3" />
198
-      <window_info anchor="bottom" id="Database Changes" order="8" show_stripe_button="false" />
199
-      <window_info anchor="bottom" id="Version Control" order="9" />
200
-      <window_info anchor="bottom" id="Run" order="2" />
330
+      <window_info content_ui="combo" id="Project" order="0" visible="true" weight="0.23104435" />
201 331
       <window_info id="Structure" order="1" side_tool="true" weight="0.25" />
202
-      <window_info active="true" anchor="bottom" id="Terminal" order="10" sideWeight="0.8947721" visible="true" weight="0.29386592" />
203 332
       <window_info id="Favorites" order="2" side_tool="true" />
333
+      <window_info anchor="bottom" id="Message" order="0" />
334
+      <window_info anchor="bottom" id="Find" order="1" />
335
+      <window_info anchor="bottom" id="Run" order="2" />
204 336
       <window_info anchor="bottom" id="Debug" order="3" weight="0.4" />
205
-      <window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" />
337
+      <window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
206 338
       <window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
339
+      <window_info anchor="bottom" id="TODO" order="6" />
340
+      <window_info anchor="bottom" id="Event Log" order="7" sideWeight="0.10658083" side_tool="true" weight="0.29380053" />
341
+      <window_info anchor="bottom" id="Database Changes" order="8" show_stripe_button="false" />
342
+      <window_info anchor="bottom" id="Version Control" order="9" />
343
+      <window_info active="true" anchor="bottom" id="Terminal" order="10" sideWeight="0.89341915" visible="true" weight="0.29380053" />
344
+      <window_info anchor="bottom" id="Docker" order="11" show_stripe_button="false" />
207 345
       <window_info anchor="right" id="Commander" internal_type="SLIDING" order="0" type="SLIDING" weight="0.4" />
208 346
       <window_info anchor="right" id="Ant Build" order="1" weight="0.25" />
209
-      <window_info anchor="bottom" id="Message" order="0" />
210
-      <window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
211
-      <window_info anchor="bottom" id="Find" order="1" />
347
+      <window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" />
348
+      <window_info anchor="right" id="Database" order="3" />
212 349
     </layout>
213 350
   </component>
214 351
   <component name="TypeScriptGeneratedFilesManager">
215 352
     <option name="version" value="1" />
216 353
   </component>
217
-  <component name="VcsContentAnnotationSettings">
218
-    <option name="myLimit" value="2678400000" />
219
-  </component>
220
-  <component name="XDebuggerManager">
221
-    <breakpoint-manager>
222
-      <option name="time" value="1" />
223
-    </breakpoint-manager>
354
+  <component name="VcsManagerConfiguration">
355
+    <MESSAGE value="机构功能相关接口" />
356
+    <option name="LAST_COMMIT_MESSAGE" value="机构功能相关接口" />
224 357
   </component>
225 358
   <component name="editorHistoryManager">
226
-    <entry file="file://$PROJECT_DIR$/controllers/function_api_controllers/function_api_base_controller.go">
227
-      <provider selected="true" editor-type-id="text-editor">
228
-        <state relative-caret-position="65296">
229
-          <caret line="2975" column="6" selection-start-line="2975" selection-start-column="6" selection-end-line="2975" selection-end-column="6" />
230
-        </state>
231
-      </provider>
232
-    </entry>
233
-    <entry file="file://$PROJECT_DIR$/controllers/admin_api_controllers/analysis_api_controller.go">
234
-      <provider selected="true" editor-type-id="text-editor">
235
-        <state relative-caret-position="9240">
236
-          <caret line="427" selection-start-line="427" selection-end-line="427" />
237
-        </state>
238
-      </provider>
239
-    </entry>
240
-    <entry file="file://$PROJECT_DIR$/controllers/function_api_controllers/function_api_router_register.go">
241
-      <provider selected="true" editor-type-id="text-editor">
242
-        <state relative-caret-position="1650">
243
-          <caret line="78" column="81" selection-start-line="78" selection-start-column="56" selection-end-line="78" selection-end-column="81" />
244
-          <folding>
245
-            <element signature="e#34#79#0" expanded="true" />
246
-          </folding>
247
-        </state>
248
-      </provider>
249
-    </entry>
250
-    <entry file="file://$PROJECT_DIR$/models/function_models/fuction_query_models.go">
251
-      <provider selected="true" editor-type-id="text-editor">
252
-        <state relative-caret-position="11176">
253
-          <caret line="508" column="40" selection-start-line="508" selection-start-column="12" selection-end-line="508" selection-end-column="40" />
254
-        </state>
255
-      </provider>
256
-    </entry>
257
-    <entry file="file://$PROJECT_DIR$/service/admin_service.go">
359
+    <entry file="file://$PROJECT_DIR$/../XT/service/admin_service.go">
258 360
       <provider selected="true" editor-type-id="text-editor">
259
-        <state relative-caret-position="10274">
260
-          <caret line="473" column="124" selection-start-line="473" selection-start-column="124" selection-end-line="473" selection-end-column="124" />
261
-          <folding>
262
-            <element signature="e#35#139#0" expanded="true" />
263
-          </folding>
361
+        <state relative-caret-position="427">
362
+          <caret line="192" column="5" selection-start-line="192" selection-start-column="5" selection-end-line="192" selection-end-column="5" />
264 363
         </state>
265 364
       </provider>
266 365
     </entry>
267
-    <entry file="file://$PROJECT_DIR$/conf/app.conf">
366
+    <entry file="file://$PROJECT_DIR$/../XT/controllers/admin_api_controllers/analysis_api_controller.go">
268 367
       <provider selected="true" editor-type-id="text-editor">
269
-        <state>
270
-          <caret column="12" selection-start-column="12" selection-end-column="12" />
368
+        <state relative-caret-position="233">
369
+          <caret line="383" column="80" selection-start-line="383" selection-start-column="50" selection-end-line="383" selection-end-column="80" />
271 370
         </state>
272 371
       </provider>
273 372
     </entry>
274
-    <entry file="file://$PROJECT_DIR$/service/function_service.go">
373
+    <entry file="file://$PROJECT_DIR$/../XT/controllers/admin_api_controllers/admin_api_router_register.go">
275 374
       <provider selected="true" editor-type-id="text-editor">
276
-        <state relative-caret-position="1628">
277
-          <caret line="76" column="124" selection-start-line="76" selection-start-column="124" selection-end-line="76" selection-end-column="124" />
375
+        <state relative-caret-position="261">
376
+          <caret line="14" column="70" selection-start-line="14" selection-start-column="49" selection-end-line="14" selection-end-column="70" />
278 377
         </state>
279 378
       </provider>
280 379
     </entry>
281
-    <entry file="file://$PROJECT_DIR$/controllers/function_api_controllers/function_api_base_controller.go">
380
+    <entry file="file://$PROJECT_DIR$/service/verify_login_token_service.go">
282 381
       <provider selected="true" editor-type-id="text-editor">
283
-        <state relative-caret-position="41338">
284
-          <caret line="1886" column="62" selection-start-line="1886" selection-start-column="39" selection-end-line="1886" selection-end-column="62" />
382
+        <state relative-caret-position="132">
383
+          <caret line="18" column="4" selection-start-line="18" selection-start-column="4" selection-end-line="18" selection-end-column="4" />
285 384
         </state>
286 385
       </provider>
287 386
     </entry>
288
-    <entry file="file://$PROJECT_DIR$/controllers/admin_api_controllers/analysis_api_controller.go">
387
+    <entry file="file://$PROJECT_DIR$/controllers/base_controller.go">
289 388
       <provider selected="true" editor-type-id="text-editor">
290
-        <state relative-caret-position="11110">
291
-          <caret line="512" column="28" selection-start-line="512" selection-start-column="8" selection-end-line="512" selection-end-column="28" />
389
+        <state relative-caret-position="162">
390
+          <caret line="13" column="28" selection-start-line="13" selection-start-column="28" selection-end-line="13" selection-end-column="28" />
292 391
         </state>
293 392
       </provider>
294 393
     </entry>
295
-    <entry file="file://$PROJECT_DIR$/controllers/function_api_controllers/function_api_router_register.go">
394
+    <entry file="file://$PROJECT_DIR$/../SCRM/models/site_models.go" />
395
+    <entry file="file://$PROJECT_DIR$/controllers/base_api_controller.go">
296 396
       <provider selected="true" editor-type-id="text-editor">
297
-        <state relative-caret-position="1166">
298
-          <caret line="53" column="83" selection-start-line="53" selection-start-column="58" selection-end-line="53" selection-end-column="83" />
299
-          <folding>
300
-            <element signature="e#34#79#0" expanded="true" />
301
-          </folding>
397
+        <state relative-caret-position="198">
398
+          <caret line="20" column="2" lean-forward="true" selection-start-line="20" selection-start-column="2" selection-end-line="20" selection-end-column="2" />
302 399
         </state>
303 400
       </provider>
304 401
     </entry>
305
-    <entry file="file://$PROJECT_DIR$/service/function_service.go">
402
+    <entry file="file://$PROJECT_DIR$/models/admin_models/admin_models.go">
306 403
       <provider selected="true" editor-type-id="text-editor">
307
-        <state relative-caret-position="1122">
308
-          <caret line="53" column="19" selection-start-line="53" selection-start-column="11" selection-end-line="53" selection-end-column="19" />
404
+        <state relative-caret-position="330">
405
+          <caret line="15" column="21" selection-start-line="15" selection-start-column="12" selection-end-line="15" selection-end-column="21" />
309 406
         </state>
310 407
       </provider>
311 408
     </entry>
312 409
     <entry file="file://$PROJECT_DIR$/models/function_models/fuction_query_models.go">
313 410
       <provider selected="true" editor-type-id="text-editor">
314
-        <state relative-caret-position="7832">
315
-          <caret line="356" column="29" selection-start-line="356" selection-start-column="12" selection-end-line="356" selection-end-column="29" />
411
+        <state relative-caret-position="329">
412
+          <caret line="531" column="36" selection-start-line="531" selection-start-column="36" selection-end-line="531" selection-end-column="36" />
316 413
         </state>
317 414
       </provider>
318 415
     </entry>
319
-    <entry file="file://$PROJECT_DIR$/service/admin_service.go">
416
+    <entry file="file://$PROJECT_DIR$/service/function_service.go">
320 417
       <provider selected="true" editor-type-id="text-editor">
321
-        <state relative-caret-position="10406">
322
-          <caret line="473" column="124" selection-start-line="473" selection-start-column="124" selection-end-line="473" selection-end-column="124" />
418
+        <state relative-caret-position="-528">
419
+          <caret line="15" column="8" selection-start-line="15" selection-start-column="8" selection-end-line="15" selection-end-column="8" />
323 420
           <folding>
324
-            <element signature="e#35#139#0" expanded="true" />
421
+            <element signature="e#17#66#0" expanded="true" />
325 422
           </folding>
326 423
         </state>
327 424
       </provider>
328 425
     </entry>
329
-    <entry file="file://$PROJECT_DIR$/conf/app.conf">
330
-      <provider selected="true" editor-type-id="text-editor">
331
-        <state>
332
-          <caret column="12" selection-start-column="12" selection-end-column="12" />
333
-        </state>
334
-      </provider>
335
-    </entry>
336
-    <entry file="file://$PROJECT_DIR$/controllers/function_api_controllers/function_api_base_controller.go">
337
-      <provider selected="true" editor-type-id="text-editor">
338
-        <state relative-caret-position="4158">
339
-          <caret line="189" column="48" selection-start-line="189" selection-start-column="36" selection-end-line="189" selection-end-column="48" />
340
-        </state>
341
-      </provider>
342
-    </entry>
343
-    <entry file="file://$PROJECT_DIR$/controllers/admin_api_controllers/analysis_api_controller.go">
344
-      <provider selected="true" editor-type-id="text-editor">
345
-        <state relative-caret-position="11264">
346
-          <caret line="512" column="28" selection-start-line="512" selection-start-column="8" selection-end-line="512" selection-end-column="28" />
347
-        </state>
348
-      </provider>
349
-    </entry>
350 426
     <entry file="file://$PROJECT_DIR$/controllers/function_api_controllers/function_api_router_register.go">
351 427
       <provider selected="true" editor-type-id="text-editor">
352
-        <state relative-caret-position="88">
353
-          <caret line="4" column="9" selection-start-line="4" selection-start-column="9" selection-end-line="4" selection-end-column="9" />
428
+        <state relative-caret-position="207">
429
+          <caret line="80" column="81" selection-start-line="80" selection-start-column="56" selection-end-line="80" selection-end-column="81" />
354 430
           <folding>
355 431
             <element signature="e#34#79#0" expanded="true" />
356 432
           </folding>
357 433
         </state>
358 434
       </provider>
359 435
     </entry>
360
-    <entry file="file://$PROJECT_DIR$/service/function_service.go">
361
-      <provider selected="true" editor-type-id="text-editor">
362
-        <state relative-caret-position="330">
363
-          <caret line="17" selection-start-line="17" selection-end-line="17" />
364
-        </state>
365
-      </provider>
366
-    </entry>
367
-    <entry file="file://$PROJECT_DIR$/models/function_models/fuction_query_models.go">
368
-      <provider selected="true" editor-type-id="text-editor">
369
-        <state relative-caret-position="1650">
370
-          <caret line="75" column="23" selection-start-line="75" selection-start-column="12" selection-end-line="75" selection-end-column="23" />
371
-        </state>
372
-      </provider>
373
-    </entry>
374
-    <entry file="file://$PROJECT_DIR$/service/admin_service.go">
375
-      <provider selected="true" editor-type-id="text-editor">
376
-        <state relative-caret-position="10274">
377
-          <caret line="473" column="124" selection-start-line="473" selection-start-column="67" selection-end-line="473" selection-end-column="124" />
378
-          <folding>
379
-            <element signature="e#35#139#0" expanded="true" />
380
-          </folding>
381
-        </state>
382
-      </provider>
383
-    </entry>
384
-    <entry file="file://$PROJECT_DIR$/conf/app.conf">
385
-      <provider selected="true" editor-type-id="text-editor">
386
-        <state>
387
-          <caret column="12" selection-start-column="12" selection-end-column="12" />
388
-        </state>
389
-      </provider>
390
-    </entry>
391 436
     <entry file="file://$PROJECT_DIR$/controllers/function_api_controllers/function_api_base_controller.go">
392 437
       <provider selected="true" editor-type-id="text-editor">
393
-        <state relative-caret-position="286">
394
-          <caret line="13" column="38" selection-start-line="13" selection-start-column="38" selection-end-line="13" selection-end-column="38" />
395
-        </state>
396
-      </provider>
397
-    </entry>
398
-    <entry file="file://$PROJECT_DIR$/controllers/function_api_controllers/function_api_router_register.go">
399
-      <provider selected="true" editor-type-id="text-editor">
400
-        <state relative-caret-position="132">
401
-          <caret line="9" column="72" selection-start-line="9" selection-start-column="47" selection-end-line="9" selection-end-column="72" />
402
-        </state>
403
-      </provider>
404
-    </entry>
405
-    <entry file="file://$PROJECT_DIR$/models/function_models/fuction_query_models.go">
406
-      <provider selected="true" editor-type-id="text-editor">
407
-        <state>
408
-          <caret column="23" selection-start-column="8" selection-end-column="23" />
409
-        </state>
410
-      </provider>
411
-    </entry>
412
-    <entry file="file://$PROJECT_DIR$/service/function_service.go">
413
-      <provider selected="true" editor-type-id="text-editor">
414
-        <state relative-caret-position="242">
415
-          <caret line="11" column="8" selection-start-line="11" selection-start-column="8" selection-end-line="11" selection-end-column="8" />
438
+        <state relative-caret-position="1298">
439
+          <caret line="3065" column="22" selection-start-line="3065" selection-start-column="22" selection-end-line="3065" selection-end-column="22" />
416 440
         </state>
417 441
       </provider>
418 442
     </entry>
419
-    <entry file="file://$PROJECT_DIR$/conf/app.conf">
420
-      <provider selected="true" editor-type-id="text-editor">
421
-        <state>
422
-          <caret column="12" selection-start-column="12" selection-end-column="12" />
423
-        </state>
424
-      </provider>
443
+    <entry file="file://$PROJECT_DIR$/models/data_models.go">
444
+      <provider selected="true" editor-type-id="text-editor" />
425 445
     </entry>
426
-    <entry file="file://$PROJECT_DIR$/controllers/function_api_controllers/function_api_base_controller.go">
446
+    <entry file="file://$PROJECT_DIR$/models/dialysis.go">
427 447
       <provider selected="true" editor-type-id="text-editor">
428
-        <state relative-caret-position="418">
429
-          <caret line="24" column="17" selection-start-line="24" selection-start-column="9" selection-end-line="24" selection-end-column="17" />
448
+        <state relative-caret-position="220">
449
+          <caret line="73" column="6" selection-start-line="73" selection-start-column="6" selection-end-line="73" selection-end-column="6" />
430 450
         </state>
431 451
       </provider>
432 452
     </entry>
433
-    <entry file="file://$PROJECT_DIR$/service/admin_service.go">
453
+    <entry file="file://$PROJECT_DIR$/models/patient_models.go">
434 454
       <provider selected="true" editor-type-id="text-editor">
435
-        <state relative-caret-position="10868">
436
-          <caret line="500" column="16" selection-start-line="500" selection-start-column="10" selection-end-line="500" selection-end-column="16" />
455
+        <state relative-caret-position="30">
456
+          <caret line="2" column="5" selection-start-line="2" selection-start-column="5" selection-end-line="2" selection-end-column="5" />
437 457
         </state>
438 458
       </provider>
439 459
     </entry>
440
-    <entry file="file://$PROJECT_DIR$/service/function_service.go">
460
+    <entry file="file://$PROJECT_DIR$/models/org_models.go">
441 461
       <provider selected="true" editor-type-id="text-editor">
442
-        <state relative-caret-position="154">
443
-          <caret line="7" column="23" selection-start-line="7" selection-start-column="23" selection-end-line="7" selection-end-column="23" />
462
+        <state relative-caret-position="105">
463
+          <caret line="7" column="80" selection-start-line="5" selection-start-column="4" selection-end-line="7" selection-end-column="80" />
444 464
         </state>
445 465
       </provider>
446 466
     </entry>
447
-    <entry file="file://$PROJECT_DIR$/conf/app.conf">
467
+    <entry file="file://$PROJECT_DIR$/main.go">
448 468
       <provider selected="true" editor-type-id="text-editor">
449
-        <state relative-caret-position="154">
450
-          <caret line="7" selection-start-line="7" selection-end-line="7" />
469
+        <state relative-caret-position="75">
470
+          <caret line="10" column="17" selection-start-line="10" selection-start-column="17" selection-end-line="10" selection-end-column="17" />
451 471
         </state>
452 472
       </provider>
453 473
     </entry>
454
-    <entry file="file://$PROJECT_DIR$/../SCRM/models/site_models.go">
474
+    <entry file="file://$PROJECT_DIR$/service/db.go">
455 475
       <provider selected="true" editor-type-id="text-editor">
456
-        <state relative-caret-position="418">
457
-          <caret line="19" column="5" selection-start-line="19" selection-start-column="5" selection-end-line="19" selection-end-column="5" />
476
+        <state relative-caret-position="1261">
477
+          <caret line="98" selection-start-line="98" selection-end-line="98" />
458 478
         </state>
459 479
       </provider>
460 480
     </entry>
461
-    <entry file="file://$PROJECT_DIR$/../XT/service/admin_service.go">
481
+    <entry file="file://$PROJECT_DIR$/controllers/admin_api_controllers/login_api_controller.go">
462 482
       <provider selected="true" editor-type-id="text-editor">
463
-        <state relative-caret-position="427">
464
-          <caret line="192" column="5" selection-start-line="192" selection-start-column="5" selection-end-line="192" selection-end-column="5" />
483
+        <state relative-caret-position="225">
484
+          <caret line="18" column="42" selection-start-line="18" selection-start-column="42" selection-end-line="18" selection-end-column="42" />
465 485
         </state>
466 486
       </provider>
467 487
     </entry>
468
-    <entry file="file://$PROJECT_DIR$/../XT/controllers/admin_api_controllers/analysis_api_controller.go">
469
-      <provider selected="true" editor-type-id="text-editor">
470
-        <state relative-caret-position="233">
471
-          <caret line="383" column="80" selection-start-line="383" selection-start-column="50" selection-end-line="383" selection-end-column="80" />
472
-        </state>
473
-      </provider>
488
+    <entry file="file://$PROJECT_DIR$/models/service_models.go">
489
+      <provider selected="true" editor-type-id="text-editor" />
474 490
     </entry>
475
-    <entry file="file://$PROJECT_DIR$/../XT/controllers/admin_api_controllers/admin_api_router_register.go">
491
+    <entry file="file://$PROJECT_DIR$/../github.com/astaxie/beego/router.go">
476 492
       <provider selected="true" editor-type-id="text-editor">
477
-        <state relative-caret-position="261">
478
-          <caret line="14" column="70" selection-start-line="14" selection-start-column="49" selection-end-line="14" selection-end-column="70" />
493
+        <state relative-caret-position="662">
494
+          <caret line="851" selection-start-line="851" selection-end-line="851" />
479 495
         </state>
480 496
       </provider>
481 497
     </entry>
482
-    <entry file="file://$PROJECT_DIR$/controllers/admin_api_controllers/admin_api_router_register.go">
498
+    <entry file="file://$PROJECT_DIR$/../github.com/jinzhu/gorm/main.go">
483 499
       <provider selected="true" editor-type-id="text-editor">
484 500
         <state relative-caret-position="308">
485
-          <caret line="19" lean-forward="true" selection-start-line="19" selection-end-line="19" />
486
-        </state>
487
-      </provider>
488
-    </entry>
489
-    <entry file="file://$PROJECT_DIR$/controllers/admin_api_controllers/login_api_controller.go">
490
-      <provider selected="true" editor-type-id="text-editor">
491
-        <state relative-caret-position="110">
492
-          <caret line="9" column="26" selection-start-line="9" selection-start-column="4" selection-end-line="9" selection-end-column="26" />
493
-        </state>
494
-      </provider>
495
-    </entry>
496
-    <entry file="file://$PROJECT_DIR$/service/verify_login_token_service.go">
497
-      <provider selected="true" editor-type-id="text-editor">
498
-        <state relative-caret-position="132">
499
-          <caret line="18" column="4" selection-start-line="18" selection-start-column="4" selection-end-line="18" selection-end-column="4" />
500
-        </state>
501
-      </provider>
502
-    </entry>
503
-    <entry file="file://$PROJECT_DIR$/controllers/base_controller.go">
504
-      <provider selected="true" editor-type-id="text-editor">
505
-        <state relative-caret-position="162">
506
-          <caret line="13" column="28" selection-start-line="13" selection-start-column="28" selection-end-line="13" selection-end-column="28" />
501
+          <caret line="347" column="24" selection-start-line="347" selection-start-column="24" selection-end-line="347" selection-end-column="24" />
507 502
         </state>
508 503
       </provider>
509 504
     </entry>
510
-    <entry file="file://$PROJECT_DIR$/../SCRM/models/site_models.go">
505
+    <entry file="file://$PROJECT_DIR$/controllers/admin_api_controllers/admin_api_base_controller.go">
511 506
       <provider selected="true" editor-type-id="text-editor">
512
-        <state relative-caret-position="-506">
513
-          <caret line="19" column="5" selection-start-line="19" selection-start-column="5" selection-end-line="19" selection-end-column="5" />
507
+        <state relative-caret-position="279">
508
+          <caret line="50" column="41" selection-start-line="50" selection-start-column="41" selection-end-line="50" selection-end-column="41" />
514 509
         </state>
515 510
       </provider>
516 511
     </entry>
517
-    <entry file="file://$PROJECT_DIR$/routers/router.go">
512
+    <entry file="file://$PROJECT_DIR$/controllers/admin_api_controllers/org_api_controller.go">
518 513
       <provider selected="true" editor-type-id="text-editor">
519
-        <state relative-caret-position="506">
520
-          <caret line="23" column="54" selection-start-line="23" selection-start-column="17" selection-end-line="23" selection-end-column="54" />
514
+        <state relative-caret-position="298">
515
+          <caret line="114" column="40" selection-start-line="114" selection-start-column="40" selection-end-line="114" selection-end-column="40" />
516
+          <folding>
517
+            <element signature="e#31#160#0" expanded="true" />
518
+          </folding>
521 519
         </state>
522 520
       </provider>
523 521
     </entry>
524
-    <entry file="file://$PROJECT_DIR$/models/dialysis.go">
522
+    <entry file="file://$PROJECT_DIR$/controllers/admin_api_controllers/analysis_api_controller.go">
525 523
       <provider selected="true" editor-type-id="text-editor">
526
-        <state relative-caret-position="220">
527
-          <caret line="73" column="6" selection-start-line="73" selection-start-column="6" selection-end-line="73" selection-end-column="6" />
524
+        <state relative-caret-position="-612">
525
+          <caret line="487" column="36" selection-start-line="487" selection-start-column="36" selection-end-line="487" selection-end-column="36" />
528 526
         </state>
529 527
       </provider>
530 528
     </entry>
531
-    <entry file="file://$PROJECT_DIR$/controllers/base_api_controller.go">
529
+    <entry file="file://$PROJECT_DIR$/service/org_service.go">
532 530
       <provider selected="true" editor-type-id="text-editor">
533
-        <state relative-caret-position="198">
534
-          <caret line="20" column="2" lean-forward="true" selection-start-line="20" selection-start-column="2" selection-end-line="20" selection-end-column="2" />
531
+        <state relative-caret-position="-4694">
532
+          <caret line="217" column="33" selection-start-line="217" selection-start-column="33" selection-end-line="217" selection-end-column="151" />
533
+          <folding>
534
+            <element signature="e#396#5796#0" />
535
+          </folding>
535 536
         </state>
536 537
       </provider>
537 538
     </entry>
538 539
     <entry file="file://$PROJECT_DIR$/conf/app.conf">
539 540
       <provider selected="true" editor-type-id="text-editor">
540
-        <state>
541
-          <caret column="12" selection-start-column="12" selection-end-column="12" />
541
+        <state relative-caret-position="180">
542
+          <caret line="12" column="17" selection-start-line="12" selection-start-column="17" selection-end-line="12" selection-end-column="17" />
542 543
         </state>
543 544
       </provider>
544 545
     </entry>
545
-    <entry file="file://$PROJECT_DIR$/models/admin_models/admin_models.go">
546
+    <entry file="file://$PROJECT_DIR$/routers/router.go">
546 547
       <provider selected="true" editor-type-id="text-editor">
547
-        <state relative-caret-position="330">
548
-          <caret line="15" column="21" selection-start-line="15" selection-start-column="12" selection-end-line="15" selection-end-column="21" />
548
+        <state relative-caret-position="315">
549
+          <caret line="21" column="31" selection-start-line="21" selection-start-column="31" selection-end-line="21" selection-end-column="31" />
550
+          <folding>
551
+            <element signature="e#17#222#0" expanded="true" />
552
+          </folding>
549 553
         </state>
550 554
       </provider>
551 555
     </entry>
552
-    <entry file="file://$PROJECT_DIR$/controllers/admin_api_controllers/admin_api_base_controller.go">
556
+    <entry file="file:///usr/local/Cellar/go/1.10.1/libexec/src/reflect/value.go">
553 557
       <provider selected="true" editor-type-id="text-editor">
554
-        <state relative-caret-position="968">
555
-          <caret line="50" column="41" selection-start-line="50" selection-start-column="41" selection-end-line="50" selection-end-column="41" />
558
+        <state relative-caret-position="135">
559
+          <caret line="305" selection-start-line="305" selection-end-line="305" />
556 560
         </state>
557 561
       </provider>
558 562
     </entry>
559 563
     <entry file="file://$PROJECT_DIR$/service/admin_service.go">
560 564
       <provider selected="true" editor-type-id="text-editor">
561
-        <state relative-caret-position="9636">
562
-          <caret line="444" selection-start-line="444" selection-end-line="444" />
565
+        <state relative-caret-position="120">
566
+          <caret line="823" column="305" selection-start-line="823" selection-start-column="305" selection-end-line="823" selection-end-column="305" />
563 567
           <folding>
564
-            <element signature="e#35#139#0" expanded="true" />
568
+            <element signature="e#35#157#0" expanded="true" />
565 569
           </folding>
566 570
         </state>
567 571
       </provider>
568 572
     </entry>
569
-    <entry file="file://$PROJECT_DIR$/models/function_models/fuction_query_models.go">
570
-      <provider selected="true" editor-type-id="text-editor">
571
-        <state relative-caret-position="329">
572
-          <caret line="531" column="36" selection-start-line="531" selection-start-column="36" selection-end-line="531" selection-end-column="36" />
573
-        </state>
574
-      </provider>
575
-    </entry>
576
-    <entry file="file://$PROJECT_DIR$/service/function_service.go">
573
+    <entry file="file://$PROJECT_DIR$/controllers/admin_api_controllers/admin_api_router_register.go">
577 574
       <provider selected="true" editor-type-id="text-editor">
578
-        <state relative-caret-position="-528">
579
-          <caret line="15" column="8" selection-start-line="15" selection-start-column="8" selection-end-line="15" selection-end-column="8" />
580
-          <folding>
581
-            <element signature="e#17#66#0" expanded="true" />
582
-          </folding>
575
+        <state relative-caret-position="200">
576
+          <caret line="31" column="50" selection-start-line="31" selection-start-column="50" selection-end-line="31" selection-end-column="50" />
583 577
         </state>
584 578
       </provider>
585 579
     </entry>
586
-    <entry file="file://$PROJECT_DIR$/controllers/function_api_controllers/function_api_router_register.go">
580
+    <entry file="file://$PROJECT_DIR$/controllers/admin_api_controllers/system_api_controller.go">
587 581
       <provider selected="true" editor-type-id="text-editor">
588
-        <state relative-caret-position="207">
589
-          <caret line="80" column="81" selection-start-line="80" selection-start-column="56" selection-end-line="80" selection-end-column="81" />
582
+        <state relative-caret-position="192">
583
+          <caret line="74" column="33" selection-start-line="74" selection-start-column="33" selection-end-line="74" selection-end-column="33" />
590 584
           <folding>
591
-            <element signature="e#34#79#0" expanded="true" />
585
+            <element signature="e#31#211#0" expanded="true" />
592 586
           </folding>
593 587
         </state>
594 588
       </provider>
595 589
     </entry>
596
-    <entry file="file://$PROJECT_DIR$/controllers/admin_api_controllers/analysis_api_controller.go">
597
-      <provider selected="true" editor-type-id="text-editor">
598
-        <state relative-caret-position="394">
599
-          <caret line="427" selection-start-line="427" selection-end-line="427" />
600
-        </state>
601
-      </provider>
602
-    </entry>
603
-    <entry file="file://$PROJECT_DIR$/controllers/function_api_controllers/function_api_base_controller.go">
604
-      <provider selected="true" editor-type-id="text-editor">
605
-        <state relative-caret-position="1298">
606
-          <caret line="3065" column="22" selection-start-line="3065" selection-start-column="22" selection-end-line="3065" selection-end-column="22" />
607
-        </state>
608
-      </provider>
609
-    </entry>
610 590
   </component>
611 591
 </project>

+ 3 - 0
controllers/admin_api_controllers/admin_api_router_register.go ファイルの表示

@@ -42,4 +42,7 @@ func AdminAPIControllersRegisterRouters() {
42 42
 	beego.Router("/admin/api/user/get", &SystemApiController{}, "get:GetAdminUserById")
43 43
 	beego.Router("/admin/api/follow/cancel", &SystemApiController{}, "post:CancelFollowInfo")
44 44
 
45
+	beego.Router("/admin/api/followorg/list", &SystemApiController{}, "get:GetWaitFollowOrg")
46
+	beego.Router("/admin/api/unfolloworg/list", &SystemApiController{}, "get:GetAllFollowOrg")
47
+
45 48
 }

+ 24 - 29
controllers/admin_api_controllers/analysis_api_controller.go ファイルの表示

@@ -6,7 +6,6 @@ import (
6 6
 	"XT_Admin_Api/service"
7 7
 	"XT_Admin_Api/utils"
8 8
 	"time"
9
-	"fmt"
10 9
 )
11 10
 
12 11
 type AnalysisAPIController struct {
@@ -469,9 +468,7 @@ func (this *AnalysisAPIController) PatientAnalysis() {
469 468
 
470 469
 func (this *AnalysisAPIController) HomeStatistics() {
471 470
 	range_data := this.GetString("range_data")
472
-	fmt.Println("range_data是什么",range_data)
473 471
 	range_type, _ := this.GetInt64("range_type")
474
-    fmt.Println("range_type是设么",range_type)
475 472
 	var rangeDate *time.Time
476 473
 	var parseDateErr error
477 474
 	var rangeTimeStamp int64
@@ -498,8 +495,7 @@ func (this *AnalysisAPIController) HomeStatistics() {
498 495
 	activeAdminCount, _ := service.GetActiveAdminUserCount(rangeTimeStamp, now)
499 496
 	adminTotalCount, _ := service.GetAdminUserTotalCount()
500 497
 
501
-	patientCount, _ :=service.GetNewPatientCount(rangeTimeStamp, now)
502
-	fmt.Println("patientCout",patientCount)
498
+	patientCount, _ := service.GetNewPatientCount(rangeTimeStamp, now)
503 499
 	patientTotalCount, _ := service.GetPatientTotalCount()
504 500
 
505 501
 	var orgRegisterStatistics []*admin_models.Statistics
@@ -508,63 +504,62 @@ func (this *AnalysisAPIController) HomeStatistics() {
508 504
 	var orgActiveStatistics []*admin_models.Statistics
509 505
 
510 506
 	switch range_type {
507
+	case 1:
508
+
509
+		break
510
+
511
+	case 2:
512
+
513
+		break
511 514
 	case 3:
512 515
 		orgRegisterStatistics, _ = service.GetWeekRegistedOrgCount()
513 516
 		newPatientStatistics, _ = service.GetWeekNewPatientCount()
514 517
 		orgActiveAdminStatistics, _ = service.GetWeekActiveAdminUserCount()
515
-		orgActiveStatistics,_ = service.GetWeekActiveOrgCount()
516
-
517
-		//newOrgCount, _ = service.GetWeekRegistedOrgTotalCount()
518
-		//activeOrgCount, _ = service.GetWeekRegistedOrgTotalCount()
519
-		//activeAdminCount, _ = service.GetWeekRegistedOrgTotalCount()
520
-		//activeAdminCount, _ = service.GetWeekRegistedOrgTotalCount()
521
-		//
522
-		//
518
+		orgActiveStatistics, _ = service.GetWeekActiveOrgCount()
523 519
 
524 520
 		break
525 521
 	case 4:
526 522
 		orgRegisterStatistics, _ = service.GetMonthRegistedOrgCount()
527 523
 		newPatientStatistics, _ = service.GetMonthNewPatientCount()
528 524
 		orgActiveAdminStatistics, _ = service.GetMonthActiveAdminUserCount()
529
-		orgActiveStatistics,_ = service.GetMonthActiveOrgCount()
525
+		orgActiveStatistics, _ = service.GetMonthActiveOrgCount()
530 526
 
531 527
 		break
532 528
 	case 5:
533 529
 		orgRegisterStatistics, _ = service.GetThreeMonthRegistedOrgCount()
534 530
 		newPatientStatistics, _ = service.GetThreeMonthNewPatientCount()
535 531
 		orgActiveAdminStatistics, _ = service.GetThreeMonthActiveAdminUserCount()
536
-		orgActiveStatistics,_ = service.GetThreeMonthActiveOrgCount()
532
+		orgActiveStatistics, _ = service.GetThreeMonthActiveOrgCount()
537 533
 
538 534
 		break
539 535
 	case 6:
540 536
 		orgRegisterStatistics, _ = service.GetSixMonthRegistedOrgCount()
541 537
 		newPatientStatistics, _ = service.GetSixMonthNewPatientCount()
542 538
 		orgActiveAdminStatistics, _ = service.GetSixMonthActiveAdminUserCount()
543
-		orgActiveStatistics,_ = service.GetSixMonthActiveOrgCount()
539
+		orgActiveStatistics, _ = service.GetSixMonthActiveOrgCount()
544 540
 
545 541
 		break
546 542
 	case 7:
547 543
 		orgRegisterStatistics, _ = service.GetYearRegistedOrgCount()
548 544
 		newPatientStatistics, _ = service.GetYearNewPatientCount()
549 545
 		orgActiveAdminStatistics, _ = service.GetYearActiveAdminUserCount()
550
-		orgActiveStatistics,_ = service.GetYearActiveOrgCount()
551
-
546
+		orgActiveStatistics, _ = service.GetYearActiveOrgCount()
552 547
 		break
553 548
 	}
554 549
 
555 550
 	this.ServeSuccessJSON(map[string]interface{}{
556
-		"org_count":  newOrgCount,
557
-		"org_total_count":   totalOrg,
558
-		"active_org_count":  activeOrgCount,
559
-		"active_org_total_count": totalActiveOrg,
560
-		"active_admin_count":   activeAdminCount,
551
+		"org_count":                newOrgCount,
552
+		"org_total_count":          totalOrg,
553
+		"active_org_count":         activeOrgCount,
554
+		"active_org_total_count":   totalActiveOrg,
555
+		"active_admin_count":       activeAdminCount,
561 556
 		"active_admin_total_count": adminTotalCount,
562
-		"patient_count":  patientCount,
563
-		"patient_total_count":  patientTotalCount,
564
-		"org_count_list": orgRegisterStatistics,
565
-		"patient_count_list": newPatientStatistics,
566
-		"active_count_list": orgActiveAdminStatistics,
567
-		"active_org_list": orgActiveStatistics,
557
+		"patient_count":            patientCount,
558
+		"patient_total_count":      patientTotalCount,
559
+		"org_count_list":           orgRegisterStatistics,
560
+		"patient_count_list":       newPatientStatistics,
561
+		"active_count_list":        orgActiveAdminStatistics,
562
+		"active_org_list":          orgActiveStatistics,
568 563
 	})
569 564
 
570 565
 }

+ 59 - 7
controllers/admin_api_controllers/system_api_controller.go ファイルの表示

@@ -72,10 +72,13 @@ func (this *SystemApiController) ModifyAdminUser() {
72 72
 		Mtime:        time.Now().Unix(),
73 73
 	}
74 74
 
75
-	info, _ := service.FindUserInfoByAccount(mobile)
76
-	if info.ID > 0 {
77
-		this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeNameException)
78
-		return
75
+	if admins.Account != mobile {
76
+		info, _ := service.FindUserInfoByAccount(mobile)
77
+		if info.ID > 0 {
78
+			this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeNameException)
79
+			return
80
+
81
+		}
79 82
 
80 83
 	}
81 84
 
@@ -343,9 +346,6 @@ func (this *SystemApiController) ModifyFollowInfo() {
343 346
 			}
344 347
 		}
345 348
 	}
346
-
347
-	fmt.Println(orgFollow)
348
-
349 349
 	//防止数据冗余,先查出之前被删的数据是否存在,存在则直接改变删除状态,不插入新数据
350 350
 	for index, follow := range orgFollow {
351 351
 		info, err := service.FindFollowRecordByID(follow)
@@ -382,3 +382,55 @@ func (this *SystemApiController) ModifyFollowInfo() {
382 382
 	}
383 383
 
384 384
 }
385
+
386
+func (this *SystemApiController) GetWaitFollowOrg() {
387
+	admin_id, _ := this.GetInt64("admin_id", 0)
388
+	keyword := this.GetString("keyword")
389
+	page, _ := this.GetInt64("page", 0)
390
+	limit, _ := this.GetInt64("limit", 0)
391
+	if page <= 0 {
392
+		page = 1
393
+	}
394
+	if limit <= 0 {
395
+		limit = 7
396
+	}
397
+
398
+	list, err, total := service.GetAllWaitFollowOrgList(keyword, page, limit, admin_id)
399
+	if err != nil {
400
+
401
+	} else {
402
+		this.ServeSuccessJSON(map[string]interface{}{
403
+			"list":  list,
404
+			"total": total,
405
+		})
406
+	}
407
+
408
+}
409
+
410
+func (this *SystemApiController) GetAllFollowOrg() {
411
+	admin_id, _ := this.GetInt64("admin_id", 0)
412
+	keyword := this.GetString("keyword")
413
+	page, _ := this.GetInt64("page", 0)
414
+	limit, _ := this.GetInt64("limit", 0)
415
+	if page <= 0 {
416
+		page = 1
417
+	}
418
+	if limit <= 0 {
419
+		limit = 7
420
+	}
421
+
422
+	list, err, total := service.FindAllFollowOrg(keyword, page, limit, admin_id)
423
+	fmt.Println(list)
424
+	fmt.Println(err)
425
+	fmt.Println(total)
426
+
427
+	if err != nil {
428
+
429
+	} else {
430
+		this.ServeSuccessJSON(map[string]interface{}{
431
+			"list":  list,
432
+			"total": total,
433
+		})
434
+	}
435
+
436
+}

+ 1 - 1
routers/router.go ファイルの表示

@@ -10,7 +10,7 @@ import (
10 10
 func init() {
11 11
 	beego.InsertFilter("*", beego.BeforeRouter, cors.Allow(&cors.Options{
12 12
 		// AllowAllOrigins:  true,
13
-		AllowOrigins:     []string{"https://xt.kuyicloud.com", "http://localhost:9527", "http://xt.test.shengws.com", "https://xt.test.shengws.com", "http://xt.test.sgjyun.com", "https://xt.test.sgjyun.com", "http://localhost:8081", "http://localhost:8082", "https://pad.kuyicloud.com", "http://pad.kuyicloud.com", "http://pad.test.sgjyun.com", "https://pad.test.sgjyun.com", "http://admin.xt.test.sgjyun.com", "http://admin.xt.kuyicloud.com", "http://api.szjkhd.com"},
13
+		AllowOrigins:     []string{"http://api.szjkhd.com", "http://admin.xt.test.szjkhd.com", "http://localhost:9527"},
14 14
 		AllowMethods:     []string{"GET", "POST", "PUT", "DELETE", "OPTIONS"},
15 15
 		AllowHeaders:     []string{"Origin", "Authorization", "Access-Control-Allow-Origin", "Access-Control-Allow-Headers", "Content-Type"},
16 16
 		ExposeHeaders:    []string{"Content-Length", "Access-Control-Allow-Origin", "Access-Control-Allow-Headers", "Content-Type"},

+ 79 - 7
service/admin_service.go ファイルの表示

@@ -5,6 +5,7 @@ package service
5 5
 import (
6 6
 	"XT_Admin_Api/models"
7 7
 	"XT_Admin_Api/models/admin_models"
8
+	"database/sql"
8 9
 	"fmt"
9 10
 	"strings"
10 11
 	"time"
@@ -422,7 +423,7 @@ func GetRegistedOrgCount(from int64, to int64) (int64, error) {
422 423
 // 获取一段时间内的活跃机构数
423 424
 func GetActiveOrgCount(from int64, to int64) (int64, error) {
424 425
 	var count int64
425
-	rows, err := readUserDb.Raw("SELECT COUNT(DISTINCT org_id) AS count FROM sgj_user_admin_login_log  JOIN sgj_xt.xt_dialysis_order  ON sgj_user_admin_login_log.org_id = sgj_xt.xt_dialysis_order.user_org_id AND DATE_FORMAT(date(from_unixtime(sgj_user_admin_login_log.ctime)) ,'%Y-%m-%d') = DATE_FORMAT(date(from_unixtime(sgj_xt.xt_dialysis_order.dialysis_date)),'%Y-%m-%d') where sgj_user_admin_login_log.app_type = 3 AND sgj_user_admin_login_log.operate_type = 1 AND sgj_user_admin_login_log.ctime >= ? AND sgj_user_admin_login_log.ctime <= ? ", from, to).Rows()
426
+	rows, err := readDb.Raw("SELECT COUNT(DISTINCT user_org_id) AS count FROM  xt_dialysis_order where  created_time >= ? AND created_time <= ? AND status = 1 ", from, to).Rows()
426 427
 	if err != nil {
427 428
 		return 0, err
428 429
 	}
@@ -435,7 +436,7 @@ func GetActiveOrgCount(from int64, to int64) (int64, error) {
435 436
 // 获取所有活跃机构数
436 437
 func GetActiveOrgTotalCount() (int64, error) {
437 438
 	var count int64
438
-	rows, err := readUserDb.Raw("SELECT COUNT(DISTINCT org_id) AS count FROM sgj_user_admin_login_log  JOIN sgj_xt.xt_dialysis_order ON sgj_user_admin_login_log.org_id = sgj_xt.xt_dialysis_order.user_org_id AND DATE_FORMAT(date(from_unixtime(sgj_user_admin_login_log.ctime)) ,'%Y-%m-%d') = DATE_FORMAT(date(from_unixtime(sgj_xt.xt_dialysis_order.dialysis_date)),'%Y-%m-%d') where sgj_user_admin_login_log.app_type = 3 AND sgj_user_admin_login_log.operate_type = 1").Rows()
439
+	rows, err := readDb.Raw("SELECT COUNT(DISTINCT user_org_id) AS count FROM sgj_xt.xt_dialysis_order Where status = 1").Rows()
439 440
 	if err != nil {
440 441
 		return 0, err
441 442
 	}
@@ -458,7 +459,7 @@ func GetWeekRegistedOrgCount() (weekStatistics []*admin_models.Statistics, err e
458 459
 
459 460
 //获取近七天每天的机构活跃总量
460 461
 func GetWeekActiveOrgCount() (weekStatistics []*admin_models.Statistics, err error) {
461
-	db := readUserDb.Raw("select count(DISTINCT(org_id)) as count, DATE_FORMAT(date(from_unixtime(ctime)) ,'%Y-%m-%d') as times  from sgj_user_admin_login_log   join sgj_xt.xt_dialysis_order ON sgj_xt.xt_dialysis_order.user_org_id = sgj_user_admin_login_log.org_id AND  DATE_FORMAT(date(from_unixtime(sgj_user_admin_login_log.ctime)) ,'%Y-%m-%d') = DATE_FORMAT(date(from_unixtime(sgj_xt.xt_dialysis_order.dialysis_date)) ,'%Y-%m-%d')  where DATE_SUB(CURDATE(), INTERVAL 7 DAY) <= date(from_unixtime(sgj_user_admin_login_log.ctime))  AND operate_type = 1 AND app_type = 3 GROUP BY date(from_unixtime(ctime));")
462
+	db := readDb.Raw("select count(DISTINCT(user_org_id)) as count, DATE_FORMAT(date(from_unixtime(created_time)) ,'%Y-%m-%d') as times  from  xt_dialysis_order   where DATE_SUB(CURDATE(), INTERVAL 7 DAY) <= date(from_unixtime(created_time)) AND status = 1 GROUP BY date(from_unixtime(created_time));")
462 463
 	err = db.Scan(&weekStatistics).Error
463 464
 	return
464 465
 }
@@ -509,7 +510,7 @@ func GetMonthRegistedOrgCount() (weekStatistics []*admin_models.Statistics, err
509 510
 
510 511
 //获取近30天每天的机构活跃总量
511 512
 func GetMonthActiveOrgCount() (weekStatistics []*admin_models.Statistics, err error) {
512
-	err = readUserDb.Raw("select DATE_FORMAT(date(from_unixtime(ctime)) ,'%Y-%m') as times,count(DISTINCT(org_id)) as count From  (select ctime,org_id FROM sgj_user_admin_login_log where app_type = 3 AND org_id > 0 ) T  join sgj_xt.xt_dialysis_order ON sgj_xt.xt_dialysis_order.user_org_id = T.org_id AND  DATE_FORMAT(date(from_unixtime(T.ctime)) ,'%Y-%m') =DATE_FORMAT(date(from_unixtime(sgj_xt.xt_dialysis_order.dialysis_date)) ,'%Y-%m') where  DATE_FORMAT(date(from_unixtime(T.ctime)),'%Y-%m')>DATE_FORMAT(date_sub(curdate(), interval 1 month),'%Y-%m') group by times").Scan(&weekStatistics).Error
513
+	err = readDb.Raw("select count(DISTINCT(user_org_id)) as count, DATE_FORMAT(date(from_unixtime(created_time)) ,'%Y-%m-%d') as times  from  xt_dialysis_order   where DATE_SUB(CURDATE(), INTERVAL 30 DAY) <= date(from_unixtime(created_time)) AND status = 1 GROUP BY date(from_unixtime(created_time));").Scan(&weekStatistics).Error
513 514
 	return
514 515
 }
515 516
 
@@ -563,7 +564,7 @@ func GetThreeMonthActiveAdminUserCount() (weekStatistics []*admin_models.Statist
563 564
 
564 565
 //获取近3个月每个月的机构活跃总量
565 566
 func GetThreeMonthActiveOrgCount() (weekStatistics []*admin_models.Statistics, err error) {
566
-	err = readUserDb.Raw("select DATE_FORMAT(date(from_unixtime(ctime)) ,'%Y-%m') as times,count(DISTINCT(org_id)) as count From  (select ctime,org_id FROM sgj_user_admin_login_log where app_type = 3 AND org_id > 0 AND operate_type = 1 ) T  join sgj_xt.xt_dialysis_order ON sgj_xt.xt_dialysis_order.user_org_id = T.org_id AND  DATE_FORMAT(date(from_unixtime(T.ctime)) ,'%Y-%m') =DATE_FORMAT(date(from_unixtime(sgj_xt.xt_dialysis_order.dialysis_date)) ,'%Y-%m') where  DATE_FORMAT(date(from_unixtime(T.ctime)),'%Y-%m')>=DATE_FORMAT(date_sub(curdate(), interval 3 month),'%Y-%m') group by times").Scan(&weekStatistics).Error
567
+	err = readDb.Raw("select DATE_FORMAT(date(from_unixtime(created_time)) ,'%Y-%m') as times,count(DISTINCT(user_org_id)) as count From  xt_dialysis_order  where  DATE_FORMAT(date(from_unixtime(created_time)),'%Y-%m')>=DATE_FORMAT(date_sub(curdate(), interval 3 month),'%Y-%m') AND status = 1  group by times").Scan(&weekStatistics).Error
567 568
 	return
568 569
 }
569 570
 
@@ -614,7 +615,7 @@ func GetSixMonthActiveAdminUserCount() (weekStatistics []*admin_models.Statistic
614 615
 
615 616
 //获取近半年每个月的机构活跃总量
616 617
 func GetSixMonthActiveOrgCount() (weekStatistics []*admin_models.Statistics, err error) {
617
-	err = readUserDb.Raw("select DATE_FORMAT(date(from_unixtime(ctime)) ,'%Y-%m') as times,count(DISTINCT(org_id)) as count From  (select ctime,org_id FROM sgj_user_admin_login_log where app_type = 3 AND org_id > 0 AND operate_type = 1  ) T  join sgj_xt.xt_dialysis_order ON sgj_xt.xt_dialysis_order.user_org_id = T.org_id AND  DATE_FORMAT(date(from_unixtime(T.ctime)) ,'%Y-%m') =DATE_FORMAT(date(from_unixtime(sgj_xt.xt_dialysis_order.dialysis_date)) ,'%Y-%m') where  DATE_FORMAT(date(from_unixtime(T.ctime)),'%Y-%m')>=DATE_FORMAT(date_sub(curdate(), interval 6 month),'%Y-%m') group by times").Scan(&weekStatistics).Error
618
+	err = readDb.Raw("select DATE_FORMAT(date(from_unixtime(created_time)) ,'%Y-%m') as times,count(DISTINCT(user_org_id)) as count From  xt_dialysis_order  where  DATE_FORMAT(date(from_unixtime(created_time)),'%Y-%m')>=DATE_FORMAT(date_sub(curdate(), interval 6 month),'%Y-%m') AND status = 1  group by times").Scan(&weekStatistics).Error
618 619
 	return
619 620
 }
620 621
 
@@ -664,7 +665,7 @@ func GetYearActiveAdminUserCount() (weekStatistics []*admin_models.Statistics, e
664 665
 
665 666
 //获取近1年每个月的机构活跃总量
666 667
 func GetYearActiveOrgCount() (weekStatistics []*admin_models.Statistics, err error) {
667
-	err = readUserDb.Raw("select DATE_FORMAT(date(from_unixtime(ctime)) ,'%Y-%m') as times,count(DISTINCT(org_id)) as count From  (select ctime,org_id FROM sgj_user_admin_login_log where app_type = 3 AND org_id > 0 AND operate_type = 1 ) T  join sgj_xt.xt_dialysis_order ON sgj_xt.xt_dialysis_order.user_org_id = T.org_id AND  DATE_FORMAT(date(from_unixtime(T.ctime)) ,'%Y-%m') =DATE_FORMAT(date(from_unixtime(sgj_xt.xt_dialysis_order.dialysis_date)) ,'%Y-%m') where  DATE_FORMAT(date(from_unixtime(T.ctime)),'%Y-%m')>=DATE_FORMAT(date_sub(curdate(), interval 12 month),'%Y-%m')  group by times").Scan(&weekStatistics).Error
668
+	err = readDb.Raw("select DATE_FORMAT(date(from_unixtime(created_time)) ,'%Y-%m') as times,count(DISTINCT(user_org_id)) as count From  xt_dialysis_order  where  DATE_FORMAT(date(from_unixtime(created_time)),'%Y-%m')>=DATE_FORMAT(date_sub(curdate(), interval 12 month),'%Y-%m') AND status = 1  group by times").Scan(&weekStatistics).Error
668 669
 	return
669 670
 }
670 671
 
@@ -810,3 +811,74 @@ func FindFollowInfoById(org_id int64, admin_user_id int64) (info models.OrgFollo
810 811
 	err = readUserDb.Model(&models.OrgFollow{}).Where("org_id = ? AND status = 1 AND admin_user_id = ?", org_id, admin_user_id).First(&info).Error
811 812
 	return
812 813
 }
814
+
815
+func GetAllWaitFollowOrgList(keyword string, page int64, limit int64, id int64) (orgViewModel []*OrgViewModel, err error, total int64) {
816
+	type Total struct {
817
+		Count int64
818
+	}
819
+	var totals Total
820
+	offset := (page - 1) * limit
821
+	db := readUserDb
822
+	if len(keyword) > 0 {
823
+		likeKey := "%" + keyword + "%"
824
+		err = db.Raw("Select id, org_name From  sgj_user_org  Where NOT EXISTS (Select id, org_name FROM sgj_org_follow Where sgj_org_follow.org_id = sgj_user_org.id AND sgj_org_follow.admin_user_id = ? AND sgj_org_follow.status = 1 AND (sgj_user_org.org_name Like ? OR sgj_user_org.org_short_name Like ?))", id, likeKey, likeKey).Count(&total).Offset(offset).Limit(limit).Scan(&orgViewModel).Error
825
+		readUserDb.Raw("Select count(id) as count From  sgj_user_org  Where NOT EXISTS (Select id, org_name FROM sgj_org_follow Where sgj_org_follow.org_id = sgj_user_org.id AND sgj_org_follow.admin_user_id = ? AND sgj_org_follow.status = 1 (sgj_user_org.org_name Like ? OR sgj_user_org.org_short_name Like ?))  ", id, likeKey, likeKey).Scan(&totals)
826
+
827
+	} else {
828
+		db = db.Raw("Select id, org_name From  sgj_user_org  Where NOT EXISTS (Select id, org_name FROM sgj_org_follow Where sgj_org_follow.org_id = sgj_user_org.id AND sgj_org_follow.admin_user_id = ? AND sgj_org_follow.status = 1)", id)
829
+		err = db.Offset(offset).Limit(limit).Scan(&orgViewModel).Error
830
+		readUserDb.Raw("Select count(id) as count From  sgj_user_org  Where NOT EXISTS (Select id, org_name FROM sgj_org_follow Where sgj_org_follow.org_id = sgj_user_org.id AND sgj_org_follow.admin_user_id = ? AND sgj_org_follow.status = 1)", id).Scan(&totals)
831
+
832
+	}
833
+
834
+	return orgViewModel, err, totals.Count
835
+}
836
+
837
+func FindAllFollowOrg(keyword string, page int64, limit int64, admin_id int64) (follow []*FollowViewModel, err error, total int64) {
838
+	type Total struct {
839
+		Count int64
840
+	}
841
+	var totals Total
842
+
843
+	offset := (page - 1) * limit
844
+
845
+	if len(keyword) > 0 {
846
+		var vms []*FollowViewModel = make([]*FollowViewModel, 0)
847
+		var rows *sql.Rows
848
+		var errs error
849
+		likeKey := "%" + keyword + "%"
850
+		rows, errs = readUserDb.Raw("SELECT follow.*, org.org_name as org_name FROM sgj_org_follow as follow join sgj_user_org as org on org.id = follow.org_id AND (org.org_name Like ? OR org.org_short_name Like ?) WHERE (follow.admin_user_id = ? AND follow.status = 1)", likeKey, likeKey, admin_id).Offset(offset).Limit(limit).Rows()
851
+		readUserDb.Raw("SELECT count(follow.id) as count FROM sgj_org_follow as follow join sgj_user_org as org on org.id = follow.org_id AND (org.org_name Like ? OR org.org_short_name Like ?)  WHERE follow.admin_user_id = ? AND follow.status = 1", likeKey, likeKey, admin_id).Scan(&totals)
852
+
853
+		defer rows.Close()
854
+		if errs != nil {
855
+			return nil, errs, totals.Count
856
+		}
857
+		for rows.Next() {
858
+			var vm FollowViewModel
859
+			readDb.ScanRows(rows, &vm)
860
+			vms = append(vms, &vm)
861
+		}
862
+
863
+		return vms, nil, totals.Count
864
+	} else {
865
+		var vms []*FollowViewModel = make([]*FollowViewModel, 0)
866
+		var rows *sql.Rows
867
+		var errs error
868
+		rows, errs = readUserDb.Raw("SELECT follow.*, org.org_name as org_name FROM sgj_org_follow as follow join sgj_user_org as org on org.id = follow.org_id  WHERE follow.admin_user_id = ? AND follow.status = 1", admin_id).Offset(offset).Limit(limit).Rows()
869
+		readUserDb.Raw("SELECT count(follow.id) as count FROM sgj_org_follow as follow join sgj_user_org as org on org.id = follow.org_id  WHERE follow.admin_user_id = ? AND follow.status = 1", admin_id).Scan(&totals)
870
+
871
+		defer rows.Close()
872
+		if errs != nil {
873
+			return nil, errs, totals.Count
874
+		}
875
+		for rows.Next() {
876
+			var vm FollowViewModel
877
+			readDb.ScanRows(rows, &vm)
878
+			vms = append(vms, &vm)
879
+		}
880
+
881
+		return vms, nil, totals.Count
882
+	}
883
+
884
+}