|
@@ -406,14 +406,7 @@ class Approveinfo extends Base
|
|
|
{
|
|
|
$id = input('id') ?: 0;
|
|
|
$user = $this->user;
|
|
|
- Db::startTrans();
|
|
|
- try {
|
|
|
- ApproveInfoService::make($id, $user, 'urging');
|
|
|
- Db::commit();
|
|
|
- } catch (Exception $e) {
|
|
|
- Db::rollback();
|
|
|
- $this->error($e->getMessage());
|
|
|
- }
|
|
|
+ ApproveInfoService::make($id, [],$user, 'urging');
|
|
|
$this->success('催办成功');
|
|
|
}
|
|
|
|
|
@@ -427,15 +420,28 @@ class Approveinfo extends Base
|
|
|
{
|
|
|
$id = input('id') ?: 0;
|
|
|
$user = $this->user;
|
|
|
- Db::startTrans();
|
|
|
- try {
|
|
|
- ApproveInfoService::make($id, $user, 'cancel');
|
|
|
- Db::commit();
|
|
|
- } catch (Exception $e) {
|
|
|
- Db::rollback();
|
|
|
- $this->error($e->getMessage());
|
|
|
- }
|
|
|
+ ApproveInfoService::make($id, [],$user, 'cancel');
|
|
|
$this->success('撤销成功');
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 评分
|
|
|
+ *
|
|
|
+ * @Apidoc\Desc("维修模块")
|
|
|
+ * @Apidoc\Method("POST")
|
|
|
+ * @Apidoc\Param("id", type="integer",require=true, desc="申请ID")
|
|
|
+ * @Apidoc\Param("comment_score", type="sting",require=true, desc="评分")
|
|
|
+ * @Apidoc\Param("comment", type="sting",require=false, desc="评价内容")
|
|
|
+ **/
|
|
|
+ public function comment()
|
|
|
+ {
|
|
|
+ $id = input('id') ?: 0;
|
|
|
+ $comment_score = input('comment_score') ?: '';
|
|
|
+ $comment = input('comment') ?: '';
|
|
|
+ $params = compact("id", "comment_score", "comment");
|
|
|
+ $user = $this->user;
|
|
|
+ ApproveInfoService::make($id, $params, $user, 'comment');
|
|
|
+ $this->success('评价成功');
|
|
|
+ }
|
|
|
+
|
|
|
}
|