产品服务包

This commit is contained in:
2024-12-19 19:32:37 +08:00
parent 30523ae6c2
commit a125dc008f

View File

@@ -2135,7 +2135,7 @@ class PrescriptionController extends BaseAppController
])->joinWith([
'drug d' => function($q){
$q->andWhere([
'in','d.type',[5]
'in','d.type', [2,4]
]);
}
])->joinWith([
@@ -2170,7 +2170,7 @@ class PrescriptionController extends BaseAppController
}
$unCollect = Drug::find()->alias('d')->select('d.*')->where([
'in','d.type', [5]
'in','d.type', [2,4]
])->joinWith(['drugStoreDrug dsd' => function($q){
$q->andWhere(['dsd.status' => 2]);
}])->joinWith(['drugStoreRelation dsr' => function ($q) use ($store_id){
@@ -2189,7 +2189,7 @@ class PrescriptionController extends BaseAppController
}
//搜索
$allDrug = Drug::find()->alias('d')->select('d.*')->where([
'in','d.type', [5]
'in','d.type', [2,4]
])->andWhere([
'or',
['like', 'd.drug_name', '%' . $name . "%", false],
@@ -2222,7 +2222,7 @@ class PrescriptionController extends BaseAppController
])->joinWith([
'drug d' => function ($q){
$q->andWhere([
'in','d.type', [5]
'in','d.type', [2,4]
]);
}
])->joinWith([
@@ -2244,7 +2244,7 @@ class PrescriptionController extends BaseAppController
$no_collect = Drug::find()->alias('d')->select('d.*')->where([
'in', 'd.id', $ids
])->andWhere([
'in','d.type', [5]
'in','d.type', [2,4]
])->joinWith(['drugStoreDrug dsd' => function($q){
$q->andWhere(['dsd.status' => 2]);
}])->joinWith(['drugStoreRelation dsr' => function ($q) use ($store_id){
@@ -2262,7 +2262,7 @@ class PrescriptionController extends BaseAppController
$collected = Drug::find()->alias('d')->select('d.*')->where([
'in', 'd.id', $is_collect
])->andWhere([
'in','d.type', [5]
'in','d.type', [2,4]
])->joinWith(['drugStoreDrug dsd' => function($q){
$q->andWhere(['dsd.status' => 2]);
}])->joinWith(['drugStoreRelation dsr' => function ($q) use ($store_id){
@@ -2301,7 +2301,7 @@ class PrescriptionController extends BaseAppController
])->joinWith([
'drug d' => function ($q) use ($name){
$q->andWhere([
'in','d.type',[5]
'in','d.type', [2,4]
]);
if($name){
$q->andWhere([