update
This commit is contained in:
parent
de027c4ee7
commit
4eba3d5d55
@ -19,6 +19,7 @@ namespace app\adminapi\controller\cost_project;
|
||||
use app\adminapi\controller\BaseAdminController;
|
||||
use app\adminapi\lists\cost_project\CostApprovedProjectLists;
|
||||
use app\adminapi\logic\cost_project\CostApprovedProjectLogic;
|
||||
use app\adminapi\logic\cost_project\CostProjectLogic;
|
||||
use app\adminapi\validate\cost_project\CostApprovedProjectValidate;
|
||||
|
||||
|
||||
@ -104,5 +105,10 @@ class CostApprovedProjectController extends BaseAdminController
|
||||
return $this->data($result);
|
||||
}
|
||||
|
||||
|
||||
public function createProject()
|
||||
{
|
||||
$params = $this->request->param();
|
||||
$data = CostApprovedProjectLogic::detail($params);
|
||||
$re = CostProjectLogic::createProject($data);
|
||||
}
|
||||
}
|
@ -170,4 +170,36 @@ class CostProjectLogic extends BaseLogic
|
||||
}
|
||||
return $datas;
|
||||
}
|
||||
|
||||
public static function createProject($data)
|
||||
{
|
||||
return CostProject::create([
|
||||
'project_num' => generate_sn('cost_project'),
|
||||
'project_name' => $data['project_name'],
|
||||
'contract_id' => $data['contract_id'],
|
||||
'types' => $data['types'],
|
||||
'industry' => $data['industry'],
|
||||
'province' => $data['province'],
|
||||
'city' => $data['city'],
|
||||
'address' => $data['address'],
|
||||
'starting' => $data['starting'],
|
||||
'endtime' => $data['endtime'],
|
||||
'jhgq' => $data['jhgq'],
|
||||
'depar' => $data['depar'],
|
||||
'principal' => $data['principal'],
|
||||
'person' => $data['person'],
|
||||
'invest' => $data['invest'],
|
||||
'budget' => $data['budget'],
|
||||
'cost' => $data['cost'],
|
||||
'approval' => $data['approval'],
|
||||
'aunit' => $data['aunit'],
|
||||
'Acontact' => $data['Acontact'],
|
||||
'acontactnum' => $data['acontactnum'],
|
||||
'date' => $data['date'],
|
||||
'generalize' => $data['generalize'],
|
||||
'note' => $data['note'],
|
||||
'remark' => $data['remark'],
|
||||
'annex' => $data['annex']
|
||||
]);
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user