|
...
|
...
|
@@ -97,8 +97,8 @@ class ProjectLogic extends BaseLogic |
|
|
|
* @time :2023/8/30 11:57
|
|
|
|
*/
|
|
|
|
public function projectSave(){
|
|
|
|
// DB::beginTransaction();
|
|
|
|
// try {
|
|
|
|
DB::beginTransaction();
|
|
|
|
try {
|
|
|
|
if($this->param['type'] == Project::TYPE_SEVEN){
|
|
|
|
//错误单直接返回,单独处理
|
|
|
|
$this->setTypeSevenEdit($this->param);
|
|
...
|
...
|
@@ -115,15 +115,15 @@ class ProjectLogic extends BaseLogic |
|
|
|
$this->saveProjectDeployOptimize($this->param['deploy_optimize']);
|
|
|
|
//保存售后信息
|
|
|
|
$this->saveProjectAfter($this->param['project_after']);
|
|
|
|
// //创建站点
|
|
|
|
// $this->createSite($this->param);
|
|
|
|
//创建站点
|
|
|
|
$this->createSite($this->param);
|
|
|
|
}
|
|
|
|
// DB::commit();
|
|
|
|
// }catch (\Exception $e){
|
|
|
|
// DB::rollBack();
|
|
|
|
// $this->fail('请填写完整后再提交');
|
|
|
|
// }
|
|
|
|
// (new SyncService())->projectAcceptAddress($this->param['id']);
|
|
|
|
DB::commit();
|
|
|
|
}catch (\Exception $e){
|
|
|
|
DB::rollBack();
|
|
|
|
$this->fail('请填写完整后再提交');
|
|
|
|
}
|
|
|
|
(new SyncService())->projectAcceptAddress($this->param['id']);
|
|
|
|
return $this->success();
|
|
|
|
}
|
|
|
|
|
|
...
|
...
|
@@ -562,6 +562,15 @@ class ProjectLogic extends BaseLogic |
|
|
|
$paymentData['project_id'] = $project_id;
|
|
|
|
$paymentModel->insert($paymentData);
|
|
|
|
}
|
|
|
|
//复制售后表
|
|
|
|
$afterModel = new After();
|
|
|
|
$afterData = $afterModel::where('project_id', $this->param['project_id'])->first();
|
|
|
|
if(!empty($afterData)){
|
|
|
|
$afterData = $afterData->getAttributes();
|
|
|
|
unset($afterData['id']);
|
|
|
|
$afterData['project_id'] = $project_id;
|
|
|
|
$afterModel->insert($afterData);
|
|
|
|
}
|
|
|
|
//复制用户
|
|
|
|
$userModel = new UserModel();
|
|
|
|
$userData = $userModel::where('project_id', $this->param['project_id'])->where('role_id',0)->first();
|
...
|
...
|
|