|
@@ -185,8 +185,17 @@ func (this *PharmacyController) IssuedDrug() {
|
185
|
185
|
etime = stime + 86399
|
186
|
186
|
}
|
187
|
187
|
|
|
188
|
+ var patientsId []int64
|
|
189
|
+
|
|
190
|
+ patient, _ := service.GetPatientKeyWord(keyword, orgid)
|
|
191
|
+ if len(patient) > 0 {
|
|
192
|
+ for _, item := range patient {
|
|
193
|
+ patientsId = append(patientsId, item.ID)
|
|
194
|
+ }
|
|
195
|
+ }
|
|
196
|
+
|
188
|
197
|
//获取排班班次
|
189
|
|
- schedule, _ := service.GetSchedulePatientId(stime, etime, orgid, shift, partition)
|
|
198
|
+ schedule, _ := service.GetSchedulePatientId(stime, etime, orgid, shift, partition, patientsId)
|
190
|
199
|
|
191
|
200
|
var ids []int64
|
192
|
201
|
for _, item := range schedule {
|
|
@@ -262,34 +271,19 @@ func (this *PharmacyController) WaitingDrug() {
|
262
|
271
|
etime = stime + 86399
|
263
|
272
|
}
|
264
|
273
|
|
265
|
|
- //if orgid != 9671 && orgid != 10188 && orgid != 10217 && orgid != 3877 && orgid != 10164 && orgid != 10387 && orgid != 10375 && orgid != 10480 && orgid != 10344 {
|
266
|
|
- // //查询表里当天的数据
|
267
|
|
- // var flist []*models.TmpPatient
|
268
|
|
- // flist, err = service.GetTodayDrug(stime, etime, orgid, 0, keyword)
|
269
|
|
- //
|
270
|
|
- // if err != nil {
|
271
|
|
- // utils.ErrorLog(err.Error())
|
272
|
|
- // this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)
|
273
|
|
- // return
|
274
|
|
- // }
|
275
|
|
- // listt, err := service.PartitionAndLayout(stime, etime, orgid, shift, partition, flist)
|
276
|
|
- //
|
277
|
|
- // if err != nil {
|
278
|
|
- // utils.ErrorLog(err.Error())
|
279
|
|
- // this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)
|
280
|
|
- // return
|
281
|
|
- // }
|
282
|
|
- // baseList, _ := service.GetAllBaseDrugListTwo(orgid)
|
283
|
|
- // this.ServeSuccessJSON(map[string]interface{}{
|
284
|
|
- // "list": listt,
|
285
|
|
- // "baseList": baseList,
|
286
|
|
- // })
|
287
|
|
- // return
|
288
|
|
- //}
|
289
|
|
- fmt.Println(keyword)
|
|
274
|
+ var patientsId []int64
|
|
275
|
+
|
|
276
|
+ patient, _ := service.GetPatientKeyWord(keyword, orgid)
|
|
277
|
+ fmt.Println("hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh", patient)
|
|
278
|
+ if len(patient) > 0 {
|
|
279
|
+ for _, item := range patient {
|
|
280
|
+ patientsId = append(patientsId, item.ID)
|
|
281
|
+ }
|
|
282
|
+ }
|
|
283
|
+
|
290
|
284
|
//当未发药的人数
|
291
|
285
|
//获取排班班次
|
292
|
|
- schedule, _ := service.GetSchedulePatientId(stime, etime, orgid, shift, partition)
|
|
286
|
+ schedule, _ := service.GetSchedulePatientId(stime, etime, orgid, shift, partition, patientsId)
|
293
|
287
|
var ids []int64
|
294
|
288
|
for _, item := range schedule {
|
295
|
289
|
ids = append(ids, item.PatientId)
|