|
@@ -5292,3 +5292,54 @@ func GetDrugWarhouseHouseOutInfo(org_id int64, start_time int64, end_time int64)
|
5292
|
5292
|
return flow, err
|
5293
|
5293
|
|
5294
|
5294
|
}
|
|
5295
|
+
|
|
5296
|
+func GetDrugMonthWarehouseInfo(org_id int64, start_time int64) (flow []*models.XtDrugFlowList, err error) {
|
|
5297
|
+
|
|
5298
|
+ db := XTReadDB().Model(&flow).Where("status=1 and (consumable_type=1 or consumable_type=10)")
|
|
5299
|
+
|
|
5300
|
+ if org_id > 0 {
|
|
5301
|
+ db = db.Where("user_org_id = ?", org_id)
|
|
5302
|
+ }
|
|
5303
|
+
|
|
5304
|
+ if start_time > 0 {
|
|
5305
|
+ db = db.Where("ctime < ?", start_time)
|
|
5306
|
+ }
|
|
5307
|
+
|
|
5308
|
+ err = db.Find(&flow).Error
|
|
5309
|
+
|
|
5310
|
+ return flow, err
|
|
5311
|
+}
|
|
5312
|
+
|
|
5313
|
+func GetDrugMonthWarehouseOutInfo(org_id int64, start_time int64) (flow []*models.XtDrugFlowList, err error) {
|
|
5314
|
+
|
|
5315
|
+ db := XTReadDB().Model(&flow).Where("status=1 and (consumable_type=2 or consumable_type=3 or consumable_type=11)")
|
|
5316
|
+
|
|
5317
|
+ if org_id > 0 {
|
|
5318
|
+ db = db.Where("user_org_id = ?", org_id)
|
|
5319
|
+ }
|
|
5320
|
+
|
|
5321
|
+ if start_time > 0 {
|
|
5322
|
+ db = db.Where("ctime < ?", start_time)
|
|
5323
|
+ }
|
|
5324
|
+
|
|
5325
|
+ err = db.Find(&flow).Error
|
|
5326
|
+
|
|
5327
|
+ return flow, err
|
|
5328
|
+}
|
|
5329
|
+
|
|
5330
|
+func GetDrugMonthCancelOutInfo(org_id int64, start_time int64) (flow []*models.XtDrugFlowList, err error) {
|
|
5331
|
+
|
|
5332
|
+ db := XTReadDB().Model(&flow).Where("status=1 and (consumable_type=7)")
|
|
5333
|
+
|
|
5334
|
+ if org_id > 0 {
|
|
5335
|
+ db = db.Where("user_org_id = ?", org_id)
|
|
5336
|
+ }
|
|
5337
|
+
|
|
5338
|
+ if start_time > 0 {
|
|
5339
|
+ db = db.Where("ctime < ?", start_time)
|
|
5340
|
+ }
|
|
5341
|
+
|
|
5342
|
+ err = db.Find(&flow).Error
|
|
5343
|
+
|
|
5344
|
+ return flow, err
|
|
5345
|
+}
|