Преглед на файлове

修改检验检查相关

张保健 преди 4 години
родител
ревизия
6be9610ff7
променени са 4 файла, в които са добавени 8 реда и са изтрити 246 реда
  1. 0 5
      .gitignore
  2. 0 239
      conf/app.conf
  3. 1 1
      controllers/inspection_api_controller.go
  4. 7 1
      service/inspection_service.go

+ 0 - 5
.gitignore Целия файл

@@ -1,5 +0,0 @@
1
-.svn
2
-.git
3
-XT.ext
4
-/*.exe
5
-/*.exe~

+ 0 - 239
conf/app.conf Целия файл

@@ -1,239 +0,0 @@
1
-appname = 血透
2
-httpport = 9531
3
-runmode = dev
4
-
5
-
6
-copyrequestbody = true
7
-sessionon = true
8
-sessiongcmaxlifetime = 64800
9
-
10
-tokencookiemaxlifetime = 7200
11
-enablexsrf = false
12
-xsrfkey = 61oETzKXQAGaYdkL5gEmGeJJFuYh7EQnp2XdTP1o
13
-xsrfexpire = 3600
14
-
15
-qiniu_accesskey = -l_Pcc1YJs0gh3w0YwN2uoaZO_5fY5J9SIYnSjg0
16
-qiniu_secretkey = DmZSp_Bmnp-9aUB7xUvoyViZpzmx1Rs2RL69GvlW
17
-qiniu_domain = https://images.shengws.com/
18
-qiniu_bucket = syhclub-storage
19
-
20
-
21
-
22
-aes_key = "xuetou-201807319"
23
-
24
-wxtoken = gh_ac6cd0cdde3d
25
-wxoriId = gh_ac6cd0cdde3d
26
-wxappId = wxbb9223f20bc11612
27
-# wxappsecret = a78c793c377268db25dde2eb971a2ebb
28
-# wxEncodingAESKey = 1vRDzqltXYOc9iMqhsQT7AkIRRpUaGl8MZlUcP7x4UK
29
-
30
-sms_appId = dcabb3aa7afd402794046ebbbf652bce
31
-sms_sid = a26cb0ceb3a811ca82143972f4ef38a4
32
-sms_token = ea475ed8d3de6c54c2b3f9d78db76d1e
33
-sms_baseUrl = https://open.ucpaas.com/ol/sms/
34
-ip_max_send_count = 20
35
-moblie_max_send_count = 5
36
-sms_verification_code_templateid = 358429
37
-
38
-
39
-appid = "wx43ad410d9eef426e"
40
-mchid = "1509573721"
41
-key = "e4SHrkiZu0pQEwVoGBapDBTf9N1Q6MxV"
42
-appsecret="61ee2e6268497d5aa9de0b0187c39aea"
43
-
44
-
45
-
46
-[prod]
47
-mobile_token_expiration_second = 86400
48
-httpdomain = https://api.xt.kuyicloud.com
49
-sso_domain = https://sso.kuyicloud.com
50
-front_end_domain = "https://xt.kuyicloud.com/#"
51
-
52
-readmysqlhost = shengws1.mysql.rds.aliyuncs.com
53
-readmysqlport = 3306
54
-readmysqluser = syh
55
-readmysqlpass = xhPECP2nFObR8aUK
56
-readmysqlname = sgj_xt
57
-
58
-writemysqlhost = shengws1.mysql.rds.aliyuncs.com
59
-writemysqlport = 3306
60
-writemysqluser = syh
61
-writemysqlpass = xhPECP2nFObR8aUK
62
-writemysqlname = sgj_xt
63
-
64
-
65
-readuserhost = shengws1.mysql.rds.aliyuncs.com
66
-readuserport = 3306
67
-readuseruser = syh
68
-readuserpass = xhPECP2nFObR8aUK
69
-readusername = sgj_users
70
-
71
-writeuserhost = shengws1.mysql.rds.aliyuncs.com
72
-writeuserport = 3306
73
-writeuseruser = syh
74
-writeuserpass = xhPECP2nFObR8aUK
75
-writeusername = sgj_users
76
-
77
-readmiddlehost = shengws1.mysql.rds.aliyuncs.com
78
-readmiddleport = 3306
79
-readmiddleuser = syh
80
-readmiddlepass = xhPECP2nFObR8aUK
81
-readmiddlename = ky_xt_middle
82
-
83
-writemiddlehost = shengws1.mysql.rds.aliyuncs.com
84
-writemiddleport = 3306
85
-writemiddleuser = syh
86
-writemiddlepass = xhPECP2nFObR8aUK
87
-writemiddlename = ky_xt_middle
88
-
89
-
90
-readsgjpatientmysqlhost = shengws1.mysql.rds.aliyuncs.com
91
-readsgjpatientmysqlport = 3306
92
-readsgjpatientmysqluser = syh
93
-readsgjpatientmysqlpass = xhPECP2nFObR8aUK
94
-readsgjpatientmysqlname = sgj_patient
95
-
96
-writesgjpatientmysqlhost = shengws1.mysql.rds.aliyuncs.com
97
-writesgjpatientmysqlport = 3306
98
-writesgjpatientmysqluser = syh
99
-writesgjpatientmysqlpass = xhPECP2nFObR8aUK
100
-writesgjpatientmysqlname = sgj_patient
101
-
102
-
103
-readpatienthost = shengws1.mysql.rds.aliyuncs.com
104
-readpatientport = 3306
105
-readpatientuser = syh
106
-readpatientpass = xhPECP2nFObR8aUK
107
-readpatientname = sgj_cdm
108
-
109
-writepatienthost = shengws1.mysql.rds.aliyuncs.com
110
-writepatientport = 3306
111
-writepatientuser = syh
112
-writepatientpass = xhPECP2nFObR8aUK
113
-writepatientname = sgj_cdm
114
-
115
-redishost = 349e580b2a524290.redis.rds.aliyuncs.com
116
-redisport = 6379
117
-redispasswrod = TZtBW098WId3i27clkpj3q8dnUaVFP
118
-redisdb = 0
119
-
120
-
121
-
122
-
123
-
124
-
125
-niprocart =  63
126
-jms = 58
127
-fistula_needle_set = 65
128
-fistula_needle_set_16 = 64
129
-hemoperfusion = 55
130
-dialyser_sterilised = 12
131
-filtryzer = 53
132
-dialyzers = 8
133
-injector = 81
134
-bloodlines = 42
135
-tubingHemodialysis = 30
136
-package = 82
137
-aliquid = 83
138
-
139
-
140
-
141
-[dev]
142
-mobile_token_expiration_second = 3600
143
-httpdomain = http://api.xt.test.sgjyun.com
144
-sso_domain = https://testsso.sgjyun.com
145
-front_end_domain = "http://xt.test.sgjyun.com/#"
146
-
147
-readmysqlhost = rm-wz9rg531npf61q03tro.mysql.rds.aliyuncs.com
148
-readmysqlport = 3306
149
-readmysqluser = root
150
-readmysqlpass = 1Q2W3e4r!@#$
151
-readmysqlname = test_xt
152
-//readmysqlname = sgj_xt
153
-
154
-writemysqlhost = rm-wz9rg531npf61q03tro.mysql.rds.aliyuncs.com
155
-writemysqlport = 3306
156
-writemysqluser = root
157
-writemysqlpass = 1Q2W3e4r!@#$
158
-writemysqlname = test_xt
159
-//writemysqlname = sgj_xt
160
-
161
-readuserhost = rm-wz9rg531npf61q03tro.mysql.rds.aliyuncs.com
162
-readuserport = 3306
163
-readuseruser = root
164
-readuserpass = 1Q2W3e4r!@#$
165
-readusername = test_users
166
-//readusername = sgj_users
167
-
168
-writeuserhost = rm-wz9rg531npf61q03tro.mysql.rds.aliyuncs.com
169
-writeuserport = 3306
170
-writeuseruser = root
171
-writeuserpass = 1Q2W3e4r!@#$
172
-writeusername = test_users
173
-//writeusername = sgj_users
174
-
175
-
176
-readmiddlehost = rm-wz9rg531npf61q03tro.mysql.rds.aliyuncs.com
177
-readmiddleport = 3306
178
-readmiddleuser = root
179
-readmiddlepass = 1Q2W3e4r!@#$
180
-readmiddlename = ky_xt_middle
181
-
182
-writemiddlehost = rm-wz9rg531npf61q03tro.mysql.rds.aliyuncs.com
183
-writemiddleport = 3306
184
-writemiddleuser = root
185
-writemiddlepass = 1Q2W3e4r!@#$
186
-writemiddlename = ky_xt_middle
187
-
188
-
189
-
190
-readpatienthost = rm-wz9rg531npf61q03tro.mysql.rds.aliyuncs.com
191
-readpatientport = 3306
192
-readpatientuser = root
193
-readpatientpass = 1Q2W3e4r!@#$
194
-readpatientname = sgj_cdm
195
-
196
-writepatienthost = rm-wz9rg531npf61q03tro.mysql.rds.aliyuncs.com
197
-writepatientport = 3306
198
-writepatientuser = root
199
-writepatientpass = 1Q2W3e4r!@#$
200
-writepatientname = sgj_cdm
201
-
202
-readsgjpatientmysqlhost = rm-wz9rg531npf61q03tro.mysql.rds.aliyuncs.com
203
-readsgjpatientmysqlport = 3306
204
-readsgjpatientmysqluser = root
205
-readsgjpatientmysqlpass = 1Q2W3e4r!@#$
206
-readsgjpatientmysqlname = sgj_patient
207
-
208
-writesgjpatientmysqlhost = rm-wz9rg531npf61q03tro.mysql.rds.aliyuncs.com
209
-writesgjpatientmysqlport = 3306
210
-writesgjpatientmysqluser = root
211
-writesgjpatientmysqlpass = 1Q2W3e4r!@#$
212
-writesgjpatientmysqlname = sgj_patient
213
-
214
-
215
-
216
-
217
-
218
-
219
-
220
-#redishost = 120.77.235.13
221
-#redishost = 112.74.16.180
222
-redishost = localhost
223
-redisport = 6379
224
-redispasswrod = syh@#$%123456!
225
-redisdb = 0
226
-
227
-niprocart =  83
228
-jms = 80
229
-fistula_needle_set = 81
230
-fistula_needle_set_16 = 82
231
-hemoperfusion = 85
232
-dialyser_sterilised = 84
233
-filtryzer = 79
234
-dialyzers = 10000
235
-injector = 10001
236
-bloodlines = 10002
237
-tubingHemodialysis = 10003
238
-package = 10004
239
-aliquid = 10005

+ 1 - 1
controllers/inspection_api_controller.go Целия файл

@@ -432,7 +432,7 @@ func (c *InspectionApiController) GetPatientInspections() {
432 432
 
433 433
 	date := ""
434 434
 	if len(inspections) > 0 {
435
-		date = time.Unix(dateTime, 0).Format("2006-01-02")
435
+		date = time.Unix(dateTime, 0).Format("2006-01-02 15:04")
436 436
 	}
437 437
 
438 438
 	c.ServeSuccessJSON(map[string]interface{}{

+ 7 - 1
service/inspection_service.go Целия файл

@@ -8,7 +8,13 @@ import (
8 8
 )
9 9
 
10 10
 func GetInspectionReference(orgId int64) (reference []*models.InspectionReference, err error) {
11
-	err = readDb.Model(&models.InspectionReference{}).Where("(org_id=0 OR org_id=?) and status=1", orgId).Order("project_id").Find(&reference).Error
11
+	var count int
12
+	err = readDb.Model(&models.InspectionReference{}).Where("org_id=? and status=1", orgId).Count(&count).Error
13
+	if count > 0 {
14
+		err = readDb.Model(&models.InspectionReference{}).Where("org_id=? and status=1", orgId).Order("project_id").Find(&reference).Error
15
+	} else {
16
+		err = readDb.Model(&models.InspectionReference{}).Where("org_id=0 and status=1").Order("project_id").Find(&reference).Error
17
+	}
12 18
 	return
13 19
 }
14 20