|
@@ -1,416 +0,0 @@
|
|
-package com.care.operate.controller;
|
|
|
|
-
|
|
|
|
-import cn.hutool.core.collection.CollUtil;
|
|
|
|
-import cn.hutool.core.util.StrUtil;
|
|
|
|
-import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
|
-import com.care.bigscreen.service.BigScreenService;
|
|
|
|
-import com.care.bms.service.BmsEventOrderService;
|
|
|
|
-import com.care.common.annotation.Permission;
|
|
|
|
-import com.care.common.entity.CareEventOrderChamb;
|
|
|
|
-import com.care.common.enums.CallResultEnum;
|
|
|
|
-import com.care.common.enums.OrderStatusEnum;
|
|
|
|
-import com.care.common.exception.BDException;
|
|
|
|
-import com.care.common.service.CareEventOrderChambService;
|
|
|
|
-import com.care.common.util.PageResult;
|
|
|
|
-import com.care.common.util.Result;
|
|
|
|
-import com.care.common.util.WebPageUtils;
|
|
|
|
-import com.care.common.vo.PageReqVO;
|
|
|
|
-import com.care.common.vo.UserLogindConvertVO;
|
|
|
|
-import com.care.common.vo.order.*;
|
|
|
|
-import com.care.common.vo.outcall.CcCallResultVO;
|
|
|
|
-import com.google.common.collect.Maps;
|
|
|
|
-import io.swagger.annotations.Api;
|
|
|
|
-import io.swagger.annotations.ApiImplicitParam;
|
|
|
|
-import io.swagger.annotations.ApiImplicitParams;
|
|
|
|
-import io.swagger.annotations.ApiOperation;
|
|
|
|
-import lombok.extern.slf4j.Slf4j;
|
|
|
|
-import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
-import org.springframework.web.bind.annotation.*;
|
|
|
|
-
|
|
|
|
-import javax.annotation.Resource;
|
|
|
|
-import javax.servlet.http.HttpServletRequest;
|
|
|
|
-import java.util.ArrayList;
|
|
|
|
-import java.util.Arrays;
|
|
|
|
-import java.util.List;
|
|
|
|
-import java.util.Map;
|
|
|
|
-
|
|
|
|
-/**
|
|
|
|
- * @Author: lilt
|
|
|
|
- * @Date: 2021/5/26
|
|
|
|
- * @Desc:
|
|
|
|
- */
|
|
|
|
-@RestController
|
|
|
|
-@Api(value = "OpEventHandleController", tags = { "运营端-事件处理" })
|
|
|
|
-@Slf4j
|
|
|
|
-@RequestMapping("/operate/event")
|
|
|
|
-@Permission
|
|
|
|
-public class OpEventHandleController {
|
|
|
|
-
|
|
|
|
- @Autowired
|
|
|
|
- private BmsEventOrderService bmsEventOrderService;
|
|
|
|
- @Resource
|
|
|
|
- private BigScreenService bigScreenService;
|
|
|
|
- @Resource
|
|
|
|
- private CareEventOrderChambService careEventOrderChambService;
|
|
|
|
-
|
|
|
|
- /**
|
|
|
|
- *未处理事件查询
|
|
|
|
- * @param request
|
|
|
|
- * @return
|
|
|
|
- */
|
|
|
|
- @GetMapping("/not-handle/list")
|
|
|
|
- @ApiOperation(tags = {"未处理事件"},value = "未处理事件查询")
|
|
|
|
- public Result<List<EventOrderVO>> listNotHandle(HttpServletRequest request, @RequestHeader(value = "token") String token){
|
|
|
|
- try {
|
|
|
|
- UserLogindConvertVO loginUser = WebPageUtils.getCurrentLoginedUser(request);
|
|
|
|
- List<EventOrderVO> datas = this.bmsEventOrderService.listTodoOrder(OrderStatusEnum.TODO.getValue(), null,loginUser);
|
|
|
|
- return PageResult.success(datas);
|
|
|
|
- }catch (BDException e) {
|
|
|
|
- log.error("未处理事件查询列表出现异常",e);
|
|
|
|
- return PageResult.error(e.getMessage());
|
|
|
|
- } catch (Exception e) {
|
|
|
|
- log.error("事件处理: 未处理事件查询出现异常",e);
|
|
|
|
- return PageResult.error( "获取列表失败");
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- /**
|
|
|
|
- *未处理事件数量查询
|
|
|
|
- * @param request
|
|
|
|
- * @return
|
|
|
|
- */
|
|
|
|
- @GetMapping("/not-handle/getCount")
|
|
|
|
- @ApiOperation(tags = {"未处理事件"},value = "未处理事件数量查询 --二期新增")
|
|
|
|
- public Result<Integer> getNotHandleCount(HttpServletRequest request, @RequestHeader(value = "token") String token){
|
|
|
|
- try {
|
|
|
|
- UserLogindConvertVO loginUser = WebPageUtils.getCurrentLoginedUser(request);
|
|
|
|
- Integer count = this.bmsEventOrderService.getTodoOrderCount(OrderStatusEnum.TODO.getValue(), null,loginUser);
|
|
|
|
- return Result.success(count);
|
|
|
|
- }catch (BDException e) {
|
|
|
|
- log.error("未处理事件数量查询出现异常",e);
|
|
|
|
- return Result.error(e.getMessage());
|
|
|
|
- } catch (Exception e) {
|
|
|
|
- log.error("事件处理: 未处理事件数量查询出现异常",e);
|
|
|
|
- return Result.error( "获取未处理事件数量失败");
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- @GetMapping("/my-handle/list")
|
|
|
|
- @ApiOperation(tags = {"我的处理事件"},value = "我的处理事件查询 分页 --二期修改")
|
|
|
|
- @ApiImplicitParams(value = {
|
|
|
|
- @ApiImplicitParam(paramType = "header", name = "status", value = "状态"),
|
|
|
|
- @ApiImplicitParam(paramType = "query", name = "status", value = "状态"),
|
|
|
|
- @ApiImplicitParam(paramType = "query", name = "title", value = "工单标题"),
|
|
|
|
- @ApiImplicitParam(paramType = "query", name = "olderName", value = "老人姓名"),
|
|
|
|
- })
|
|
|
|
- public PageResult<List<EventOrderVO>> listMyHandle(HttpServletRequest request,@RequestHeader(value = "token") String token,
|
|
|
|
- @RequestParam(value = "status", required = false) String status,
|
|
|
|
- @RequestParam(value = "title", required = false) String title,
|
|
|
|
- @RequestParam(value = "olderName", required = false) String olderName,
|
|
|
|
- PageReqVO pageReqVo){
|
|
|
|
- try {
|
|
|
|
- UserLogindConvertVO loginUser = WebPageUtils.getCurrentLoginedUser(request);
|
|
|
|
- IPage<EventOrderVO> pageResponse = this.bmsEventOrderService.listEvent4MyDo(status, title, olderName,loginUser ,pageReqVo);
|
|
|
|
- return PageResult.success(pageResponse.getRecords(),pageResponse.getCurrent(),pageResponse.getSize(),pageResponse.getTotal());
|
|
|
|
- }catch (BDException e) {
|
|
|
|
- log.error("我的处理事件查询-分页列表出现异常",e);
|
|
|
|
- return PageResult.error(e.getMessage());
|
|
|
|
- } catch (Exception e) {
|
|
|
|
- log.error("事件处理: 未处理事件查询出现异常",e);
|
|
|
|
- return PageResult.error( "获取列表失败");
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- /**
|
|
|
|
- *历史告警查询
|
|
|
|
- * @param request
|
|
|
|
- * @return
|
|
|
|
- */
|
|
|
|
- @GetMapping("/my-handle/listHisWarn")
|
|
|
|
- @ApiOperation(tags = {"我的处理事件"},value = "历史告警查询 -- 二期新增")
|
|
|
|
- public Result<List<OrderHandleHisVO>> listHisWarn(HttpServletRequest request, @RequestHeader(value = "token") String token,
|
|
|
|
- @RequestParam(value = "orderId", required = true) Long orderId){
|
|
|
|
- try {
|
|
|
|
- List<OrderHandleHisVO> datas = this.bmsEventOrderService.listHisWarn(orderId);
|
|
|
|
- return PageResult.success(datas);
|
|
|
|
- }catch (BDException e) {
|
|
|
|
- log.error("历史告警查询列表出现异常",e);
|
|
|
|
- return PageResult.error(e.getMessage());
|
|
|
|
- } catch (Exception e) {
|
|
|
|
- log.error("事件处理: 历史告警查询出现异常",e);
|
|
|
|
- return PageResult.error( "获取列表失败");
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- @GetMapping("/list")
|
|
|
|
- @ApiOperation(tags = {"事件查询"},value = "事件查询 分页")
|
|
|
|
- public PageResult<List<EventOrderVO>> list(HttpServletRequest request,
|
|
|
|
- @RequestParam(value = "status", required = false) String status,
|
|
|
|
- @RequestParam(value = "type", required = false) String type,
|
|
|
|
- @RequestParam(value = "title", required = false) String title,
|
|
|
|
- @RequestParam(value = "olderName", required = false) String olderName,
|
|
|
|
- @RequestParam(value = "chambId", required = false) String chambId,
|
|
|
|
- @RequestParam(value = "deviceCode", required = false) String deviceCode,
|
|
|
|
- PageReqVO pageReqVo){
|
|
|
|
- try {
|
|
|
|
- UserLogindConvertVO loginUser = WebPageUtils.getCurrentLoginedUser(request);
|
|
|
|
- IPage<EventOrderVO> pageResponse = this.bmsEventOrderService.listEvent(status, type, title, olderName, chambId, deviceCode, loginUser ,pageReqVo);
|
|
|
|
- return PageResult.success(pageResponse.getRecords(),pageResponse.getCurrent(),pageResponse.getSize(),pageResponse.getTotal());
|
|
|
|
- }catch (BDException e) {
|
|
|
|
- log.error("我的处理事件查询-分页列表出现异常",e);
|
|
|
|
- return PageResult.error(e.getMessage());
|
|
|
|
- } catch (Exception e) {
|
|
|
|
- log.error("事件处理: 未处理事件查询出现异常",e);
|
|
|
|
- return PageResult.error( "获取列表失败");
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- @GetMapping("/listByChamb")
|
|
|
|
- @ApiOperation(tags = {"事件查询"},value = "事件查询 分页")
|
|
|
|
- public PageResult<List<EventOrderVO>> listByChamb(HttpServletRequest request,
|
|
|
|
- @RequestParam(value = "status", required = false) String status,
|
|
|
|
- @RequestParam(value = "chambId", required = false) String chambId,
|
|
|
|
- PageReqVO pageReqVo){
|
|
|
|
- try {
|
|
|
|
- UserLogindConvertVO loginUser = WebPageUtils.getCurrentLoginedUser(request);
|
|
|
|
- IPage<EventOrderVO> pageResponse = this.bmsEventOrderService.listEventByChamb(status, chambId, loginUser ,pageReqVo);
|
|
|
|
- return PageResult.success(pageResponse.getRecords(),pageResponse.getCurrent(),pageResponse.getSize(),pageResponse.getTotal());
|
|
|
|
- }catch (BDException e) {
|
|
|
|
- log.error("我的处理事件查询-分页列表出现异常",e);
|
|
|
|
- return PageResult.error(e.getMessage());
|
|
|
|
- } catch (Exception e) {
|
|
|
|
- log.error("事件处理: 未处理事件查询出现异常",e);
|
|
|
|
- return PageResult.error( "获取列表失败");
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- @GetMapping("/listByDevice")
|
|
|
|
- @ApiOperation(tags = {"事件查询"},value = "事件查询 分页")
|
|
|
|
- public PageResult<List<EventOrderVO>> listByDevice(HttpServletRequest request,
|
|
|
|
- @RequestParam(value = "status", required = false) String status,
|
|
|
|
- @RequestParam(value = "deviceCode", required = false) String deviceCode,
|
|
|
|
- PageReqVO pageReqVo){
|
|
|
|
- try {
|
|
|
|
- UserLogindConvertVO loginUser = WebPageUtils.getCurrentLoginedUser(request);
|
|
|
|
- IPage<EventOrderVO> pageResponse = this.bmsEventOrderService.listEventByDevice(status, deviceCode, loginUser ,pageReqVo);
|
|
|
|
- return PageResult.success(pageResponse.getRecords(),pageResponse.getCurrent(),pageResponse.getSize(),pageResponse.getTotal());
|
|
|
|
- }catch (BDException e) {
|
|
|
|
- log.error("我的处理事件查询-分页列表出现异常",e);
|
|
|
|
- return PageResult.error(e.getMessage());
|
|
|
|
- } catch (Exception e) {
|
|
|
|
- log.error("事件处理: 未处理事件查询出现异常",e);
|
|
|
|
- return PageResult.error( "获取列表失败");
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- /**
|
|
|
|
- *近期处理事件(处理中事件)
|
|
|
|
- * @param request
|
|
|
|
- * @return
|
|
|
|
- */
|
|
|
|
- @GetMapping("/recent-handle/list")
|
|
|
|
- @ApiOperation(tags = {"近期处理事件"},value = "近期处理事件(只有坐席能用)--二期新增")
|
|
|
|
- public Result<List<EventOrderVO>> listRecentHandle(HttpServletRequest request, @RequestHeader(value = "token") String token){
|
|
|
|
- try {
|
|
|
|
- UserLogindConvertVO loginUser = WebPageUtils.getCurrentLoginedUser(request);
|
|
|
|
- List<EventOrderVO> datas = this.bmsEventOrderService.listRecentHandle(OrderStatusEnum.DOING.getValue(),loginUser);
|
|
|
|
- return PageResult.success(datas);
|
|
|
|
- }catch (BDException e) {
|
|
|
|
- log.error("近期处理事件查询列表出现异常",e);
|
|
|
|
- return PageResult.error(e.getMessage());
|
|
|
|
- } catch (Exception e) {
|
|
|
|
- log.error("事件处理: 近期处理事件查询出现异常",e);
|
|
|
|
- return PageResult.error( "获取列表失败");
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- @PostMapping("/receive/{orderId}")
|
|
|
|
- @ApiOperation(tags = {"未处理事件"},value = "立即处理-领取工单")
|
|
|
|
- public Result<Object> receiveOrder(HttpServletRequest request,@RequestHeader("token") String token,@PathVariable("orderId") Long orderId){
|
|
|
|
- UserLogindConvertVO loginUser = WebPageUtils.getCurrentLoginedUser(request);
|
|
|
|
- this.bmsEventOrderService.receiveOrder(orderId,loginUser);
|
|
|
|
- bigScreenService.pushRtEventFlag(loginUser.getOrgId(),loginUser.getStationId(),String.valueOf(orderId),"orderHandle");
|
|
|
|
- return Result.success("领取工单成功!");
|
|
|
|
- }
|
|
|
|
- @GetMapping("/getEventInfo/{orderId}")
|
|
|
|
- @ApiOperation(tags = {"事件处理"},value = "事件详情")
|
|
|
|
- public Result<EventOrderVO> getEventInfo(HttpServletRequest request,@RequestHeader("token") String token,@PathVariable("orderId") Long orderId){
|
|
|
|
- EventOrderVO orderInfo = this.bmsEventOrderService.getOrderInfo(orderId);
|
|
|
|
- return Result.success("查询成功!",orderInfo);
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- @GetMapping("/getChambList/{orderId}")
|
|
|
|
- @ApiOperation(tags = {"事件处理"},value = "主管家和改派管家列表查询 --二期新增")
|
|
|
|
- public Result<List<ChamberlainVO>> getChambList(HttpServletRequest request,@RequestHeader("token") String token,@PathVariable("orderId") Long orderId){
|
|
|
|
- List<ChamberlainVO> older = this.bmsEventOrderService.queryChambList(orderId);
|
|
|
|
- return Result.success("查询成功!",older);
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- @GetMapping("/getOlderList/{orderId}")
|
|
|
|
- @ApiOperation(tags = {"事件处理"},value = "被监护人信息列表")
|
|
|
|
- public Result<List<OrderOlderVO>> getOlderList(HttpServletRequest request,@RequestHeader("token") String token,@PathVariable("orderId") Long orderId){
|
|
|
|
- List<OrderOlderVO> older = this.bmsEventOrderService.queryOrderOlderList(orderId);
|
|
|
|
- return Result.success("查询成功!",older);
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- @GetMapping("/getChamberlain/{orderId}")
|
|
|
|
- @ApiOperation(tags = {"事件处理"},value = "事件定单管家查询")
|
|
|
|
- public Result<CareEventOrderChamb> getChamberlain(HttpServletRequest request, @RequestHeader("token") String token, @PathVariable("orderId") Long orderId){
|
|
|
|
- CareEventOrderChamb chamb = this.bmsEventOrderService.queryChamberlain(orderId);
|
|
|
|
- return Result.success("查询成功!",chamb);
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- @GetMapping("/queryDoHis/{orderId}")
|
|
|
|
- @ApiOperation(tags = {"事件处理"},value = "事件处理历史记录")
|
|
|
|
- public Result<List<OrderHandleHisVO>> queryDoHis(HttpServletRequest request, @RequestHeader("token") String token, @PathVariable("orderId") Long orderId){
|
|
|
|
- return Result.success("查询成功!",this.bmsEventOrderService.queryOrderHandleHis(orderId));
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- @GetMapping("/queryContactList/{orderId}")
|
|
|
|
- @ApiOperation(tags = {"事件处理"},value = "跟事件相关的联系人列表")
|
|
|
|
- public Result<Object> queryContactList(HttpServletRequest request,@RequestHeader("token") String token,@PathVariable("orderId") Long orderId){
|
|
|
|
- return Result.success("查询成功!",this.bmsEventOrderService.queryContactList(orderId));
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- @PostMapping("/complete/{orderId}")
|
|
|
|
- @ApiOperation(tags = {"事件处理"},value = "完成工单")
|
|
|
|
- public Result<Object> complete(HttpServletRequest request,@RequestHeader("token") String token,@PathVariable("orderId") Long orderId){
|
|
|
|
- UserLogindConvertVO loginUser = WebPageUtils.getCurrentLoginedUser(request);
|
|
|
|
- this.bmsEventOrderService.complete(orderId,loginUser);
|
|
|
|
- this.bmsEventOrderService.sendSmsToMemberAndLianxiren(orderId,"工单完成");
|
|
|
|
- return Result.success("操作成功!");
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- @PostMapping("/completeByIds/{ids}")
|
|
|
|
- @ApiOperation(tags = {"事件处理"},value = "完成工单")
|
|
|
|
- public Result<Object> completeByIds(HttpServletRequest request, @RequestHeader("token") String token, @PathVariable("ids") String ids){
|
|
|
|
- UserLogindConvertVO loginUser = WebPageUtils.getCurrentLoginedUser(request);
|
|
|
|
- boolean execFlag = this.bmsEventOrderService.completeByIds(Arrays.asList(ids.split(",")), loginUser);
|
|
|
|
- return execFlag ? Result.success("操作成功!") : Result.error();
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- @GetMapping("/keyAuth/list/{orderId}")
|
|
|
|
- @ApiOperation(tags = {"事件处理"},value = "钥匙申请列表")
|
|
|
|
- public Result<List<OrderKeyApplyVO>> queryKeyAuthList(HttpServletRequest request, @RequestHeader("token") String token, @PathVariable("orderId") Long orderId){
|
|
|
|
- return Result.success("查询成功!",this.bmsEventOrderService.queryKeyAuthList(orderId));
|
|
|
|
- }
|
|
|
|
- @PostMapping("/key/auth/{applyId}")
|
|
|
|
- @ApiOperation(tags = {"事件处理"},value = "钥匙授权")
|
|
|
|
- public Result<Object> keyAuth(HttpServletRequest request,@RequestHeader("token") String token,@PathVariable("applyId") Long applyId){
|
|
|
|
- UserLogindConvertVO loginUser = WebPageUtils.getCurrentLoginedUser(request);
|
|
|
|
- if (this.bmsEventOrderService.keyAuth(applyId,loginUser)) {
|
|
|
|
- return Result.success("钥匙授权成功!");
|
|
|
|
- }else{
|
|
|
|
- return Result.error("钥匙授权失败!");
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- @PostMapping("/contact/updateStatus/{orderContactId}/{status}")
|
|
|
|
- @ApiOperation(tags = {"事件处理"},value = "更新联系人状态")
|
|
|
|
- public Result<Object> updateOrderContactStatus(HttpServletRequest request,@RequestHeader("token") String token,
|
|
|
|
- @PathVariable("orderContactId") Long orderContactId,
|
|
|
|
- @PathVariable("status") Integer status){
|
|
|
|
- UserLogindConvertVO loginUser = WebPageUtils.getCurrentLoginedUser(request);
|
|
|
|
- if (this.bmsEventOrderService.updateOrderContactStatus(orderContactId,status,loginUser)) {
|
|
|
|
- return Result.success("更新成功!");
|
|
|
|
- }else{
|
|
|
|
- return Result.error("更新失败!");
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- }
|
|
|
|
- @GetMapping("/getSmsTemplate/{orderId}")
|
|
|
|
- @ApiOperation(tags = {"事件处理"},value = "查询要发送的短息内容")
|
|
|
|
- public Result<String> getSmsTemplate( @PathVariable("orderId") Long orderId){
|
|
|
|
- return Result.success("查询成功!",this.bmsEventOrderService.getSmsTemplate(orderId));
|
|
|
|
- }
|
|
|
|
- @PostMapping("/sendSms/{orderContactId}")
|
|
|
|
- @ApiOperation(tags = {"事件处理"},value = "发送短信")
|
|
|
|
- public Result<Object> sendSms(HttpServletRequest request,@RequestHeader("token") String token,
|
|
|
|
- @PathVariable("orderContactId") Long orderContactId){
|
|
|
|
- UserLogindConvertVO loginUser = WebPageUtils.getCurrentLoginedUser(request);
|
|
|
|
- boolean flag = this.bmsEventOrderService.sendSmsToLianxiren(orderContactId);
|
|
|
|
- if (flag){
|
|
|
|
- return Result.success("发送短信成功!");
|
|
|
|
- }else {
|
|
|
|
- return Result.error("发送短信失败!");
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- }
|
|
|
|
- @GetMapping("/getCallRadio/{hisId}")
|
|
|
|
- @ApiOperation(tags = {"事件处理"},value = "获取通话录音")
|
|
|
|
- public Result<CcCallResultVO> getCallRadio(HttpServletRequest request,@RequestHeader("token") String token,@PathVariable("hisId") Long hisId){
|
|
|
|
- CcCallResultVO ccCallResultVO = this.bmsEventOrderService.getCallRadio(hisId);
|
|
|
|
- if (ccCallResultVO != null) {
|
|
|
|
- return Result.success("获取通话录音!");
|
|
|
|
- }else{
|
|
|
|
- return Result.error("通话记录不存在!");
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- @GetMapping("/stat")
|
|
|
|
- @ApiOperation(tags = {"事件查询"},value = "查询事件统计信息")
|
|
|
|
- public Result<Object> stat(HttpServletRequest request,@RequestHeader("token") String token, @RequestParam(value = "chambId", required = false) Long chambId,
|
|
|
|
- @RequestParam(value = "deviceCode", required = false) String deviceCode){
|
|
|
|
- UserLogindConvertVO loginUser = WebPageUtils.getCurrentLoginedUser(request);
|
|
|
|
- EventStaVO ccCallResultVO = this.bmsEventOrderService.statOrder(loginUser, chambId, deviceCode);
|
|
|
|
- if (ccCallResultVO != null) {
|
|
|
|
- return Result.success("查询成功!",ccCallResultVO);
|
|
|
|
- }else{
|
|
|
|
- return Result.error("查询失败!");
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- @GetMapping("/callResultCode")
|
|
|
|
- @ApiOperation(tags = {"事件处理"},value = "呼叫结果编码")
|
|
|
|
- public Result<List<Map<String,Object>>>getChamberlain(){
|
|
|
|
- List<Map<String,Object>> datas = new ArrayList<>();
|
|
|
|
- for (CallResultEnum callResultEnum : CallResultEnum.values()){
|
|
|
|
- Map<String,Object> data = Maps.newHashMap();
|
|
|
|
- data.put("name",callResultEnum.getName());
|
|
|
|
- data.put("value",callResultEnum.getValue());
|
|
|
|
- datas.add(data);
|
|
|
|
- }
|
|
|
|
- return Result.success("查询成功!",datas);
|
|
|
|
- }
|
|
|
|
- @GetMapping("/getRealTimeMonitorUrl/{orderId}")
|
|
|
|
- @ApiOperation(tags = {"事件处理"},value = "获取实时监控URL")
|
|
|
|
- public Result<String> getRealTimeMonitorUrl(HttpServletRequest request,@RequestHeader("token") String token, @PathVariable("orderId") Long orderId){
|
|
|
|
- String url = this.bmsEventOrderService.getRealTimeMonitorUrl(orderId);
|
|
|
|
- if (StrUtil.isNotEmpty(url)) {
|
|
|
|
- return Result.success("查询成功!",url);
|
|
|
|
- }else{
|
|
|
|
- return Result.error("查询失败!");
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- @GetMapping("/getFreeKeeperList/{orderId}")
|
|
|
|
- @ApiOperation(tags = {"事件处理"},value = "获取空闲管家列表 --二期新增")
|
|
|
|
- public Result<List<ChamberlainVO> > getFreeKeeperList(HttpServletRequest request,@RequestHeader("token") String token, @PathVariable("orderId") Long orderId){
|
|
|
|
- List<ChamberlainVO> chamberlainVOList = this.bmsEventOrderService.getFreeChamberlainList(orderId);
|
|
|
|
- if (CollUtil.isNotEmpty(chamberlainVOList)) {
|
|
|
|
- return Result.success("查询成功!",chamberlainVOList);
|
|
|
|
- }else{
|
|
|
|
- return Result.error("没有空闲管家!");
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
-
|
|
|
|
- @PostMapping("/assignKeeper/{orderId}/{chambId}")
|
|
|
|
- @ApiOperation(tags = {"事件处理"},value = "指派管家 --二期新增")
|
|
|
|
- public Result<Object> assignKeeper(HttpServletRequest request,@RequestHeader("token") String token,
|
|
|
|
- @PathVariable("orderId") Long orderId,
|
|
|
|
- @PathVariable("chambId") Long chambId){
|
|
|
|
-
|
|
|
|
- if (this.bmsEventOrderService.updateCareEventOrderChamb(orderId,chambId)) {
|
|
|
|
- return Result.success("指派管家成功!");
|
|
|
|
- }else{
|
|
|
|
- return Result.error("指派管家失败!");
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- @GetMapping("/getEventOrderChamb")
|
|
|
|
- @ApiOperation(tags = {"事件处理"},value = "获取管家处理结果 -- 三期修改")
|
|
|
|
- public Result<ChambEventOrderVO> getEventInfo(HttpServletRequest request, @RequestHeader("token") String token, @RequestParam("orderId") Long orderId, @RequestParam("chambId") Long chambId) {
|
|
|
|
- ChambEventOrderVO chambEventOrderVO = this.careEventOrderChambService.getChambOrderByOrderIdAndChambId(orderId, chambId);
|
|
|
|
- return Result.success("查询成功!", chambEventOrderVO);
|
|
|
|
- }
|
|
|
|
-}
|
|
|