修补api/gm接口的几处错误

This commit is contained in:
2025-07-16 03:12:35 +08:00
parent d76625fb34
commit 974cc83476
9 changed files with 80 additions and 29 deletions
+23 -11
View File
@@ -690,6 +690,15 @@
$search['is_commission'] = (int)$search['is_commission'];
$where[] = ['=', 'is_commission', $search['is_commission']];
}
//是否验车 TD:查询结果异常,待
if (isset($search['is_check'])) {
$search['is_check'] = (int)$search['is_check'];
if($search['is_check']){
$where[] = ['<>', 'checker', ''];
}else{
$where[] = ['=', 'checker', ''];
}
}
//运单是否通过了财务确认
$search['is_cwqr'] = $search['is_cwqr'] ?? ($get['is_cwqr'] ?? '');
if ($search['is_cwqr'] != '') {
@@ -1113,16 +1122,18 @@
{
$detail = $order->toArray();
$model = new Fans();
$fans = $model->findOne($detail['from_mid']);
$user = $fans->toArray();
$model = new AcFansExt();
$_exts = $model->find()->where(['mid' => $detail['from_mid'],'mobile'=>$fans->mobile, 'pid' => $this->pid, 'deleted' => 0])->indexBy('id')->all();
foreach ($_exts as $ext) {
$ext = $ext->toArray();
$user[$ext['key']] = $ext['value'];
if($detail['from_mid']){
$model = new Fans();
$fans = $model->findOne($detail['from_mid']);
$user = $fans->toArray();
$model = new AcFansExt();
$_exts = $model->find()->where(['mid' => $detail['from_mid'],'mobile'=>$fans->mobile, 'pid' => $this->pid, 'deleted' => 0])->indexBy('id')->all();
foreach ($_exts as $ext) {
$ext = $ext->toArray();
$user[$ext['key']] = $ext['value'];
}
$detail['_user'] = $user;
}
$detail['_user'] = $user;
if ($detail['store_id']) {
$model = new AcStore();
@@ -1180,7 +1191,7 @@
$detail['sn'] = $detail['sn'] ? $detail['sn'] : $sn;
$weekdays = [0 => '日', 1 => '一', 2 => '二', 3 => '三', 4 => '四', 5 => '五', 6 => '六'];
$wk = date('w', $detail['date']);
$wk = date('w', $detail['sign_date']);
$detail['signdate'] = date('Y-m-d 星期' . $weekdays[$wk], $detail['sign_date']);
$detail['from_province'] = isset($detail['start_province']) ? Yii::$app->params['regionAreas'][$detail['start_province']] : '';
$detail['to_province'] = isset($detail['aim_province']) ? Yii::$app->params['regionAreas'][$detail['aim_province']] : '';
@@ -1193,7 +1204,8 @@
$detail[$k] = $detail[$k] ? $detail[$k] : '/pics/nopic.jpg';
$url_pre = substr($detail[$k], 0, 4);
if ($url_pre == '/pic') {
$detail[$k . '_url'] = Url::to('@upload' . $detail[$k], $this->imgHttp);
// $detail[$k . '_url'] = Url::to('@upload' . $detail[$k], $this->imgHttp);
$detail[$k . '_url'] = Yii::$app->params['mainDomain'] .'/'.$imgDir. $detail[$k];
} else if ($url_pre == 'http') {
$detail[$k . '_url'] = $detail[$k];
}