更新
This commit is contained in:
parent
05313f8c18
commit
6300d00662
@ -70,7 +70,6 @@ class TaskSchedulingController extends BaseAdminController
|
||||
*/
|
||||
public function edit()
|
||||
{
|
||||
return $this->fail('暂未开放');
|
||||
$params = (new TaskSchedulingValidate())->post()->goCheck('edit');
|
||||
$result = TaskSchedulingLogic::edit($params);
|
||||
if (true === $result) {
|
||||
|
@ -4,6 +4,7 @@ namespace app\api\controller;
|
||||
|
||||
use app\common\model\informationg\UserInformationg;
|
||||
use app\common\logic\BaseLogic;
|
||||
use app\common\model\task\Task;
|
||||
use app\common\model\user\User;
|
||||
|
||||
class InformationController extends BaseApiController
|
||||
@ -84,6 +85,14 @@ class InformationController extends BaseApiController
|
||||
if ($res != true) {
|
||||
return $this->fail( BaseLogic::getError());
|
||||
}
|
||||
if(isset($param['task_id'])&& isset($param['id'])>0){
|
||||
$task=Task::where('id',$param['task_id'])->find();
|
||||
$extend=json_decode($task['extend'],true);
|
||||
$extend['informationg_demand']=$res['id'];
|
||||
$task->extend=json_encode($extend);
|
||||
$task->save();
|
||||
}
|
||||
|
||||
UserInformationg::where('id',$param['id'])->update(['update_time'=>time()]);
|
||||
return $this->success('成功');
|
||||
}
|
||||
|
@ -215,6 +215,7 @@ class CompanyLogic extends BaseLogic
|
||||
$data['other_contacts'] = json_decode($data['other_contacts'], true);
|
||||
$data['qualification'] = json_decode($data['qualification'], true);
|
||||
if($data['qualification'] && isset($data['qualification']['other_qualifications'])){
|
||||
halt($data['qualification']['other_qualifications']);
|
||||
$data['qualification']['other_qualifications']=json_decode($data['qualification']['other_qualifications'],true);
|
||||
}
|
||||
$find= Admin::where('id', $data['admin_id'])->field('avatar,id_card')->find();
|
||||
|
@ -73,14 +73,9 @@ class TaskSchedulingLogic extends BaseLogic
|
||||
{
|
||||
Db::startTrans();
|
||||
try {
|
||||
TaskScheduling::where('id', $params['id'])->update([
|
||||
'create_user_id' => $params['create_user_id'],
|
||||
'template_id' => $params['template_id'],
|
||||
'company_id' => $params['company_id'],
|
||||
'type' => $params['type'],
|
||||
'status' => $params['status']
|
||||
]);
|
||||
|
||||
$data=$params;
|
||||
unset($data['id']);
|
||||
TaskScheduling::where('id', $params['id'])->update($data);
|
||||
Db::commit();
|
||||
return true;
|
||||
} catch (\Exception $e) {
|
||||
|
@ -208,11 +208,8 @@ class User extends BaseModel
|
||||
}
|
||||
public function getBrigadeNameAttr($value)
|
||||
{
|
||||
if($this->brigade){
|
||||
return Db::name('geo_brigade')->where('id' ,'in' ,explode(',',$this->brigade))->field('brigade_name')->select()->toArray();
|
||||
}else{
|
||||
return [];
|
||||
}
|
||||
return Db::name('geo_brigade')->where('id' ,$this->brigade)->value('brigade_name');
|
||||
|
||||
}
|
||||
|
||||
public function getContractAttr(){
|
||||
|
Loading…
x
Reference in New Issue
Block a user