| | |
| | | * @param orderNum |
| | | * @return |
| | | */ |
| | | @ApiOperation("获取订单详情") |
| | | @ApiOperation(value = "获取订单详情",response = GuideRepairOrder.class) |
| | | @GetMapping("/orderdata") |
| | | @Authorization |
| | | public ResultData selectConfigData(@RequestParam(value = "Id",required = false) String Id, |
| | |
| | | * @param order |
| | | * @return |
| | | */ |
| | | @ApiOperation("转派人员") |
| | | @ApiOperation(value = "转派人员",response = GuideRepairOrder.class) |
| | | @PostMapping("/redeploy") |
| | | @Authorization |
| | | public ResultData redeploy(@RequestBody GuideRepairOrder order, @CurrentUser SysUser sysUser) |
| | |
| | | return ResultData.error("导办人员id不能为空"); |
| | | } |
| | | |
| | | if(StringUtils.isEmpty(order.getGuideUserPhone())) |
| | | { |
| | | return ResultData.error("导办人员电话不能为空"); |
| | | } |
| | | |
| | | //已分配 |
| | | order.setState("2"); |
| | |
| | | * @param entity |
| | | * @return |
| | | */ |
| | | @ApiOperation("去处理") |
| | | @ApiOperation(value = "去处理",response = GuideRepairOrder.class) |
| | | @PostMapping("/dispose") |
| | | @Authorization |
| | | public ResultData dispose(@RequestBody GuideEvolveEntity entity, @CurrentUser SysUser sysUser) |
| | |
| | | { |
| | | return ResultData.error("该工单已办结!"); |
| | | } |
| | | |
| | | if(!StringUtils.equals(order.getState(),"2")) |
| | | { |
| | | return ResultData.error("该工单非是待办状态!"); |
| | | if(StringUtils.equals(entity.getState(),"2")){//如果用户选择未解决则状态改为待办 |
| | | order.setState("2"); |
| | | entity.setState("8"); |
| | | } |
| | | //待评价 |
| | | order.setState("4"); |
| | | else if(StringUtils.equals(entity.getState(),"4")){ |
| | | //待评价 |
| | | order.setState("4"); |
| | | entity.setState("9"); |
| | | } |
| | | //新增已办结记录 |
| | | entity.setCreateTime(LocalDateTime.now()); |
| | | entity.setUpdateTime(LocalDateTime.now()); |
| | | entity.setState("4"); |
| | | entity.setFromDepartmentalId(sysUser.getDepartmentId()); |
| | | entity.setFromUserId(sysUser.getUserId()+""); |
| | | entity.setGuideId(order.getId().toString()); |
| | | iGuideEvolveService.insertConfig(entity); |
| | | return toAjax(iGuideRepairOrderService.updateConfig(order)); |
| | | } |
| | |
| | | * @param entity |
| | | * @return |
| | | */ |
| | | @ApiOperation("取消导办工单") |
| | | @ApiOperation(value = "取消导办工单",response = GuideRepairOrder.class) |
| | | @PostMapping("/cancel") |
| | | @Authorization |
| | | public ResultData cancel(@RequestBody GuideEvolveEntity entity, @CurrentUser SysUser sysUser) |
| | |
| | | * @param entity |
| | | * @return |
| | | */ |
| | | @ApiOperation("工单评价") |
| | | @ApiOperation(value = "工单评价",response = GuideRepairOrder.class) |
| | | @PostMapping("/evaluate") |
| | | @Authorization |
| | | public ResultData evaluate(@RequestBody GuideRepairOrder entity, @CurrentUser SysUser sysUser) |
| | | { |
| | | if(entity==null) |
| | | // if(entity==null) |
| | | // { |
| | | // return ResultData.error("参数不能为空"); |
| | | // } |
| | | // |
| | | // if(entity.getId()<=0) |
| | | // { |
| | | // return ResultData.error("工单id不能为空"); |
| | | // } |
| | | // |
| | | // if(!StringUtils.equals(entity.getState(),"4")) |
| | | // { |
| | | // return ResultData.error("该工单不能评价!"); |
| | | // } |
| | | // |
| | | // if(StringUtils.isEmpty(entity.getEvaluateState())) |
| | | // { |
| | | // return ResultData.error("满意程度不能为空!"); |
| | | // } |
| | | |
| | | |
| | | if(sysUser==null) |
| | | { |
| | | return ResultData.error("参数不能为空"); |
| | | return ResultData.error("sysUser为空!"); |
| | | } |
| | | |
| | | if(entity.getId()<=0) |
| | | { |
| | | return ResultData.error("工单id不能为空"); |
| | | } |
| | | |
| | | if(!StringUtils.equals(entity.getState(),"4")) |
| | | { |
| | | return ResultData.error("该工单不能评价!"); |
| | | } |
| | | |
| | | if(StringUtils.isEmpty(entity.getEvaluateState())) |
| | | { |
| | | return ResultData.error("满意程度不能为空!"); |
| | | } |
| | | |
| | | //已办结 |
| | | entity.setState("3"); |
| | | //新增已办结记录 |
| | | GuideEvolveEntity guideEvolveEntity=new GuideEvolveEntity(); |
| | | guideEvolveEntity.setCreateTime(LocalDateTime.now()); |
| | | guideEvolveEntity.setUpdateTime(LocalDateTime.now()); |
| | | guideEvolveEntity.setState("3"); |
| | | guideEvolveEntity.setFromDepartmentalId(sysUser.getDepartmentId()); |
| | | guideEvolveEntity.setFromUserId(sysUser.getUserId()+""); |
| | | iGuideEvolveService.insertConfig(guideEvolveEntity); |
| | | // entity.setState("3"); |
| | | // //新增已办结记录 |
| | | // GuideEvolveEntity guideEvolveEntity=new GuideEvolveEntity(); |
| | | // guideEvolveEntity.setCreateTime(LocalDateTime.now()); |
| | | // guideEvolveEntity.setUpdateTime(LocalDateTime.now()); |
| | | // guideEvolveEntity.setState("3"); |
| | | // guideEvolveEntity.setFromDepartmentalId(sysUser.getDepartmentId()); |
| | | // guideEvolveEntity.setFromUserId(sysUser.getUserId()+""); |
| | | // iGuideEvolveService.insertConfig(guideEvolveEntity); |
| | | |
| | | return toAjax(iGuideRepairOrderService.updateConfig(entity)); |
| | | // return toAjax(iGuideRepairOrderService.updateConfig(entity)); |
| | | return ResultData.success(sysUser.getUserId()+""); |
| | | } |
| | | |
| | | /** |
| | |
| | | * @param sysUser 当前登录人员信息 |
| | | * @return |
| | | */ |
| | | @ApiOperation("获取个人中心工单数据") |
| | | @ApiOperation(value = "获取个人中心工单数据",response = GuideRepairOrder.class) |
| | | @GetMapping("/personalCenter") |
| | | @Authorization |
| | | public ResultData selectBySubmitId(@CurrentUser SysUser sysUser){ |