|
|
@@ -190,7 +190,7 @@ class DeclarationUpgradeForm extends Model
|
|
|
$this->_insertUserId = $baseInfo['ID']; // 被报单人,通过insername 查找用户id
|
|
|
$insertConId = $baseInfo['CON_UID'];
|
|
|
$insertRecId = $baseInfo['REC_UID'];
|
|
|
- if(!($decResult = $this->addDecOrder($insertConId,$insertRecId, $baseInfo['DEC_LV'],$isObserve))) {
|
|
|
+ if(!($decResult = $this->addDecOrder($insertConId,$insertRecId, $baseInfo['DEC_LV'],$isObserve,$this->remark))) {
|
|
|
throw new Exception(Form::formatErrorsForApi($decResult->getErrors()));
|
|
|
}
|
|
|
}
|
|
|
@@ -202,7 +202,7 @@ class DeclarationUpgradeForm extends Model
|
|
|
* @return bool|UserInfo|null
|
|
|
* @throws \yii\db\Exception
|
|
|
*/
|
|
|
- public function addDecOrder($insertConId,$insertRecId,$oriDecLv,$isObserve){
|
|
|
+ public function addDecOrder($insertConId,$insertRecId,$oriDecLv,$isObserve,$remark=''){
|
|
|
$warehouse = Region::getWarehouseByCode($this->province);//仓库
|
|
|
if(!$warehouse){
|
|
|
throw new Exception('地区暂时不支持配送,具体联系客服');
|
|
|
@@ -232,6 +232,7 @@ class DeclarationUpgradeForm extends Model
|
|
|
$decOrderModel->DETAIL_TYPE = 2;
|
|
|
$decOrderModel->CREATED_AT = Date::nowTime();
|
|
|
$decOrderModel->UPGRADE_TYPE = $upgradeType;
|
|
|
+ $decOrderModel->REMARK = $remark;
|
|
|
if(!$decOrderModel->save()){
|
|
|
throw new Exception(Form::formatErrorsForApi($decOrderModel->getErrors()));
|
|
|
}
|