| | |
| | | import com.matrix.system.app.mapper.SysProjUseMapper; |
| | | import com.matrix.system.app.vo.*; |
| | | import com.matrix.system.common.bean.SysUsers; |
| | | import com.matrix.system.common.tools.DataAuthUtil; |
| | | import com.matrix.system.constance.Dictionary; |
| | | import com.matrix.system.hive.bean.SysBeauticianState; |
| | | import com.matrix.system.hive.bean.SysProjServices; |
| | |
| | | pageVo.setOffset(offset); |
| | | pageVo.setLimit(limit); |
| | | |
| | | SysUsers user = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); |
| | | orderListDto.setShopId(user.getShopId()); |
| | | if (!DataAuthUtil.hasAllShopAuth()) { |
| | | SysUsers user = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); |
| | | orderListDto.setShopId(user.getShopId()); |
| | | orderListDto.setUserId(user.getSuId()); |
| | | } |
| | | return AjaxResult.buildSuccessInstance(projServicesService.findApiServiceOrderListInPage(orderListDto, pageVo), projServicesService.findApiServiceOrderListTotal(orderListDto)); |
| | | } |
| | | |
| | |
| | | ajaxResult.putInMap("detail", detailVo); |
| | | return ajaxResult; |
| | | } |
| | | |
| | | @ApiOperation(value = "开始服务", notes = "开始服务") |
| | | @GetMapping(value = "/startService/{id}") |
| | | public AjaxResult startService(@PathVariable("id") Long id) { |
| | | SysProjServices sysProjServices = new SysProjServices(); |
| | | sysProjServices.setId(id); |
| | | int i = projServicesService.modifyFWKSProjServices(sysProjServices); |
| | | if (i > 0) { |
| | | return AjaxResult.buildSuccessInstance("开始服务成功"); |
| | | } |
| | | return AjaxResult.buildFailInstance("开始服务失败"); |
| | | } |
| | | |
| | | @ApiOperation(value = "结束服务", notes = "结束服务") |
| | | @GetMapping(value = "/stopService/{id}") |
| | | public AjaxResult stopService(@PathVariable("id") Long id) { |
| | | SysProjServices projServvices = new SysProjServices(); |
| | | projServvices.setId(id); |
| | | int result = projServicesService.modifyFWJSrojServices(projServvices); |
| | | if (result > 0) { |
| | | return new AjaxResult(AjaxResult.STATUS_SUCCESS, "结束服务成功"); |
| | | } else { |
| | | return new AjaxResult(AjaxResult.STATUS_FAIL, "结束服务失败"); |
| | | } |
| | | } |
| | | |
| | | @ApiOperation(value = "取消服务", notes = "取消服务") |
| | | @GetMapping(value = "/cancelService/{id}") |
| | | public AjaxResult cancelService(@PathVariable("id") Long id) { |
| | | SysProjServices services = new SysProjServices(); |
| | | services.setId(id); |
| | | int i = projServicesService.modifyCancelProjServices(services); |
| | | if (i > 0) { |
| | | return new AjaxResult(AjaxResult.STATUS_SUCCESS, "取消预约成功"); |
| | | } else { |
| | | return new AjaxResult(AjaxResult.STATUS_FAIL, "取消预约失败"); |
| | | } |
| | | } |
| | | } |