|
@@ -91,14 +91,11 @@ class Resigninfo extends BaseController
|
|
|
if($resign_date==""){
|
|
|
return error_show(1005,'离职日期不能为空');
|
|
|
}
|
|
|
-// $resign_depart_id = isset($this->post['resign_depart_uid']) && $this->post['resign_depart_uid'] !=="" ?$this->post['resign_depart_uid'] :"";
|
|
|
-// if($resign_depart_id==""){
|
|
|
-// return error_show(1005,"离职人部门id不能为空");
|
|
|
-// }
|
|
|
-// $hand_depart_id = isset($this->post['hand_depart_uid']) && $this->post['hand_depart_uid'] !=="" ? $this->post['hand_depart_uid']:"";
|
|
|
-// if($hand_depart_id==""){
|
|
|
-// return error_show(1005,"交接人部门id不能为空");
|
|
|
-// }
|
|
|
+ $expire_date = isset($this->post['expire_date']) && $this->post['expire_date']!== "" ?
|
|
|
+ $this->post['expire_date']:date("Y-m-d H:i:s");
|
|
|
+ if($expire_date==""){
|
|
|
+ return error_show(1005,'生效时间不能为空');
|
|
|
+ }
|
|
|
$is_hand = isset($this->post['is_hand']) && $this->post['is_hand'] !=="" ? trim($this->post['is_hand']):"0";
|
|
|
$status = isset($this->post['status']) && $this->post['status'] !== "" ? intval($this->post['status']) : "0";
|
|
|
$remark = isset($this->post['remark']) && $this->post['remark'] !== "" ? intval($this->post['remark']) : "";
|
|
@@ -215,12 +212,12 @@ class Resigninfo extends BaseController
|
|
|
}
|
|
|
$tn =$st['status'];
|
|
|
$st['remark']=$remark;
|
|
|
- $st['status']=$stauts;
|
|
|
+ $st['status']=$stauts==2 && strtotime($st['expire_date'])>=time() ? 3 :$stauts;
|
|
|
$st['updatetime']= date('Y-m-d H:i:s');
|
|
|
$sv = Db::name('resign_info')->save($st);
|
|
|
if($sv){
|
|
|
- $stn = ["order_code"=>"BH","status"=>$tn,"action_remark"=>'',"action_type"=>"edit"];
|
|
|
- ActionLog::logAdd($this->post['token'],$stn,"resign_info",$stauts,$stn);
|
|
|
+ $stn = ["order_code"=>$id,"status"=>$tn,"action_remark"=>'',"action_type"=>"edit"];
|
|
|
+ ActionLog::logAdd($this->post['token'],$stn,"resign_info",$stauts,$st);
|
|
|
return error_show(0,"状态更新成功");
|
|
|
}else{
|
|
|
return error_show(1002,"状态更新失败");
|