日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

编码-指标变量分别独立处理

發布時間:2025/3/15 编程问答 17 豆豆
生活随笔 收集整理的這篇文章主要介紹了 编码-指标变量分别独立处理 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

背景:如果提問不是普通提問(consultTag==0) 而是重癥提問(consultTag==1)必須填寫患病時長、病情描述圖片、就診醫院、疾病名稱四個指標變量,否則無法提交

//患病時長(天)
$illTime = $arrInput['params']['ill_time'];
if($consultTag == 1 && !$illTime){ ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ---->患病時長為空的重癥提問
  $errmsg = "error[ill_time is not valid] ill_time[$illTime]";
? ? ? Log::warning($errmsg);
  $arrResult['errno'] = Dcna_ExceptionCodes::PARAM_ERROR;
  $arrResult['errmsg'] = $errmsg;

  return $arrResult;
}
$arrRequest['doctor_ext']['ill_time'] = $illTime; ? ? ? ? ? ? ? ? ? ? ? ? ? ---->正常獲取變量值

//病情描述圖片(','分割)
$picUrls = $arrInput['params']['pic_urls']; ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ??
if($consultTag == 1 && !$picUrls){ ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?---->病情描述圖片為空的重癥提問
  $errmsg = "error[pic_urls is not valid] pic_urls[$picUrls]";
? ? ?Log::warning($errmsg);
  $arrResult['errno'] = Dcna_ExceptionCodes::PARAM_ERROR;
  $arrResult['errmsg'] = $errmsg;

  return $arrResult;
}
if($picUrls){
  $picUrls = explode(',', $picUrls);
  array_filter($picUrls);
  $arrRequest['doctor_ext']['desc_pics'] = $picUrls; ? ? ? ?---->正常賦值
}

//就診醫院
$hospital = $arrInput['params']['hospital'];
if($consultTag == 1 && !$hospital){ ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ---->就診醫院為空的重癥提問
  $errmsg = "error[hospital is not valid] hospital[$hospital]";
? ? ? Log::warning($errmsg);
  $arrResult['errno'] = Dcna_ExceptionCodes::PARAM_ERROR;
  $arrResult['errmsg'] = $errmsg;

  return $arrResult;
}
$arrRequest['doctor_ext']['hospital'] = $hospital; ? ? ? ? ? ? ? ?---->正常賦值

//疾病名稱
$illness = $arrInput['params']['illness'];
if($consultTag == 1 && !$illness){ ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ---->疾病名稱為空的重癥提問
  $errmsg = "error[illness is not valid] illness[$illness]";
  Log::warning($errmsg);
  $arrResult['errno'] = Dcna_ExceptionCodes::PARAM_ERROR;
  $arrResult['errmsg'] = $errmsg;

  return $arrResult;
}
$arrRequest['doctor_ext']['illness'] = $illness; ? ? ? ? ? ? ? ? ? ? ? ---->正常賦值

轉載于:https://www.cnblogs.com/myhenghai/p/4488544.html

總結

以上是生活随笔為你收集整理的编码-指标变量分别独立处理的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。