|
@@ -171,6 +171,8 @@ func (this *NewStockApiController) GetHisDrugCodeQuery() {
|
171
|
171
|
is_settle, _ := this.GetInt64("is_settle")
|
172
|
172
|
is_code, _ := this.GetInt64("is_code")
|
173
|
173
|
|
|
174
|
+ is_type, _ := this.GetInt64("is_type")
|
|
175
|
+
|
174
|
176
|
orgId := this.GetAdminUserInfo().CurrentOrgId
|
175
|
177
|
timeLayout := "2006-01-02"
|
176
|
178
|
loc, _ := time.LoadLocation("Local")
|
|
@@ -194,20 +196,40 @@ func (this *NewStockApiController) GetHisDrugCodeQuery() {
|
194
|
196
|
endTime = theTime.Unix()
|
195
|
197
|
}
|
196
|
198
|
|
197
|
|
- list, total, _ := service.GetHisDrugCodeQuery(orgId, startTime, endTime, limit, page, is_sale, is_settle, keywords, is_code)
|
|
199
|
+ if is_type == 1 {
|
|
200
|
+ list, total, _ := service.GetHisDrugCodeQuery(orgId, startTime, endTime, limit, page, is_sale, is_settle, keywords, is_code)
|
198
|
201
|
|
199
|
|
- drug, _ := service.GetAllDrugList(orgId)
|
|
202
|
+ drug, _ := service.GetAllDrugList(orgId)
|
200
|
203
|
|
201
|
|
- codeConfig, _ := service.GetDrugCodeConfig(orgId)
|
|
204
|
+ codeConfig, _ := service.GetDrugCodeConfig(orgId)
|
202
|
205
|
|
203
|
|
- patients, _ := service.GetAllpatient(orgId)
|
204
|
|
- this.ServeSuccessJSON(map[string]interface{}{
|
205
|
|
- "list": list,
|
206
|
|
- "total": total,
|
207
|
|
- "drug": drug,
|
208
|
|
- "patients": patients,
|
209
|
|
- "codeConfig": codeConfig,
|
210
|
|
- })
|
|
206
|
+ patients, _ := service.GetAllpatient(orgId)
|
|
207
|
+ this.ServeSuccessJSON(map[string]interface{}{
|
|
208
|
+ "list": list,
|
|
209
|
+ "total": total,
|
|
210
|
+ "drug": drug,
|
|
211
|
+ "patients": patients,
|
|
212
|
+ "codeConfig": codeConfig,
|
|
213
|
+ })
|
|
214
|
+ }
|
|
215
|
+
|
|
216
|
+ if is_type == 2 {
|
|
217
|
+ advice, total, _ := service.GetBloodDrugCode(orgId, startTime, endTime, limit, page, is_sale)
|
|
218
|
+
|
|
219
|
+ drug, _ := service.GetAllDrugList(orgId)
|
|
220
|
+
|
|
221
|
+ codeConfig, _ := service.GetDrugCodeConfig(orgId)
|
|
222
|
+
|
|
223
|
+ patients, _ := service.GetAllpatient(orgId)
|
|
224
|
+ this.ServeSuccessJSON(map[string]interface{}{
|
|
225
|
+ "list": advice,
|
|
226
|
+ "total": total,
|
|
227
|
+ "drug": drug,
|
|
228
|
+ "patients": patients,
|
|
229
|
+ "codeConfig": codeConfig,
|
|
230
|
+ })
|
|
231
|
+
|
|
232
|
+ }
|
211
|
233
|
|
212
|
234
|
return
|
213
|
235
|
}
|