| | |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.admin.entity.Franchisee; |
| | | import com.ruoyi.admin.entity.MasterWorker; |
| | | import com.ruoyi.admin.netty.NettyChannelMap; |
| | | import com.ruoyi.admin.netty.NettyWebSocketController; |
| | | import com.ruoyi.admin.service.FranchiseeService; |
| | | import com.ruoyi.admin.service.MasterWorkerService; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.security.annotation.RequiresPermissions; |
| | |
| | | private MasterWorkerService masterWorkerService; |
| | | @Resource |
| | | private TokenService tokenService; |
| | | |
| | | @Resource |
| | | private FranchiseeService franchiseeService; |
| | | /** |
| | | * 订单改派分页列表 |
| | | * |
| | |
| | | @ApiImplicitParam(value = "师傅名称", name = "workerName", dataType = "String"), |
| | | @ApiImplicitParam(value = "订单编号", name = "orderNumber", dataType = "String"), |
| | | @ApiImplicitParam(value = "下单用户名称", name = "userName", dataType = "String"), |
| | | @ApiImplicitParam(value = "地址", name = "reservationAddress", dataType = "String"), |
| | | @ApiImplicitParam(value = "页码", name = "pageNum", dataType = "Integer", required = true), |
| | | @ApiImplicitParam(value = "每页条数", name = "pageSize", dataType = "Integer", required = true) |
| | | }) |
| | | public R<Page<ChangeDispatch>> queryPageList(String workerName, String orderNumber, String userName, |
| | | public R<Page<ChangeDispatch>> queryPageList(String workerName, String orderNumber, String userName,String reservationAddress, |
| | | @RequestParam(name = "pageNum", defaultValue = "1") Integer pageNum, |
| | | @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize) { |
| | | LoginUser loginUser = tokenService.getLoginUser(); |
| | |
| | | changeDispatchRequest.setWorkerName(workerName); |
| | | changeDispatchRequest.setOrderNumber(orderNumber); |
| | | changeDispatchRequest.setUserName(userName); |
| | | changeDispatchRequest.setReservationAddress(reservationAddress); |
| | | changeDispatchRequest.setPageNum(pageNum); |
| | | changeDispatchRequest.setPageSize(pageSize); |
| | | changeDispatchRequest.setCityList(cityList); |
| | | |
| | | Integer franchiseeId = loginUser.getSysUser().getFranchiseeId(); |
| | | if (franchiseeId!=null) { |
| | | Franchisee byId = franchiseeService.getById(franchiseeId); |
| | | String[] siteIds = byId.getSiteIds().split(","); |
| | | if (loginUser.getIsFranchisee() && siteIds.length == 0) { |
| | | return R.ok(new Page<ChangeDispatch>()); |
| | | } |
| | | changeDispatchRequest.setSiteIds(siteIds); |
| | | } |
| | | return dispatchClient.queryPageList(changeDispatchRequest); |
| | | } |
| | | |