|
|
@@ -133,4 +133,35 @@ class IssueWorkLogic extends BaseLogic
|
|
|
}
|
|
|
return $issue_work;
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @notes 完结投诉
|
|
|
+ * @param $params
|
|
|
+ * @return array|false
|
|
|
+ */
|
|
|
+ public static function complaintComplete($params)
|
|
|
+ {
|
|
|
+ try {
|
|
|
+ $issue = IssueWork::where(['user_id'=>$params['user_id'],'id'=>$params['id']])->findOrEmpty();
|
|
|
+ if($issue->isEmpty()){
|
|
|
+ throw new Exception('投诉不存在');
|
|
|
+ }
|
|
|
+ if($issue['responsible'] != 3){
|
|
|
+ throw new Exception('定责不可操作');
|
|
|
+ }
|
|
|
+ $issue->issue_approval = 4;
|
|
|
+ $issue->complaint_status = 2;
|
|
|
+ $issue->finished_time = time();
|
|
|
+ $issue->save();
|
|
|
+
|
|
|
+ $return = ReturnWork::where('service_work_id',$issue->service_work_id)->findOrEmpty();
|
|
|
+ if(!$return->isEmpty()){
|
|
|
+ $return->return_status = 4;
|
|
|
+ }
|
|
|
+ return [];
|
|
|
+ } catch (\Exception $e) {
|
|
|
+ self::setError($e->getMessage());
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|