产品服务包的查询逻辑

This commit is contained in:
2024-12-24 14:13:16 +08:00
parent 0baa5720aa
commit 38a308dd47
2 changed files with 53 additions and 4 deletions

View File

@@ -16,6 +16,7 @@ use common\models\oldDb\Prescription;
use common\models\oldDb\ProductOrder;
use common\models\oldDb\ProductOrderItems;
use common\models\oldDb\Region;
use common\models\oldDb\ServicePackageRepice;
use common\models\oldDb\Store;
use common\models\oldDb\SystemConfig;
use common\models\oldDb\User;
@@ -180,9 +181,16 @@ class ProductOrderController extends BaseAppController
if($prescription['wr_ids']){
$wr_ids = explode(',', $prescription['wr_ids']);
$west = WestRepice::find()->select('content,number,total_price')->where([
'in', 'id', $wr_ids
])->all();
if ($prescription['prescription_type'] === 5) {
$west = ServicePackageRepice::find()->select('content,number,total_price')->where([
'in', 'id', $wr_ids
])->all();
} else {
$west = WestRepice::find()->select('content,number,total_price')->where([
'in', 'id', $wr_ids
])->all();
}
foreach ($west as $value) {
$value['content']=Json::decode($value['content']);
}