package com.palmnest.service.washcar.manager;

import com.palmnest.application.bean.Page;
import com.palmnest.application.dto.input.WashCarOrderDto;
import com.palmnest.model.washcar.WashCarOrder;
import com.palmnest.service.GenericManager;

import java.util.List;
import java.util.Map;

public interface WashCarOrderManager extends GenericManager<WashCarOrder, Long> {

	public Page findSearch(WashCarOrderDto dto, int pageNo, int pageSize) throws Exception;

	public Map<String, Object> getExtAmount(Long id) throws Exception;

	public Integer deleteOrder(Long id) throws Exception;

	public WashCarOrder saveWashCarOrder(WashCarOrder washCarOrder) throws Exception;

	public List<Map<String, Object>> getWashCarService(String orgId, String syscode) throws Exception;

	/**
	 * 判断该用户是否有该权限
	 *
	 * @param syscode
	 * @param userId
	 * @return
	 * @throws Exception
	 */
	public String isPower(String syscode, String userId) throws Exception;

	public List<WashCarOrder> getWashOrderByCarWasherId(String carWashId, String status, Integer type) throws Exception;

	public WashCarOrder updateWashOrder(WashCarOrder washCarOrder) throws Exception;

	/**
	 * 获取当天的剩余名额
	 *
	 * @param userId 洗车的用户
	 * @param status 单据状态   status格式('1','2')
	 * @param type   1代表in 2代表not in
	 * @return
	 * @throws Exception
	 */
	public List<WashCarOrder> getWashListByDas(String userId, String status, int type) throws Exception;

	/**
	 * 获取洗车人为carWashId的未取钥匙的订单
	 *
	 * @param carWashId
	 * @return
	 */
	public int getWashByUserId(String carWashId, String orgId);

	/**
	 * 获取排队中的单据
	 *
	 * @return
	 */
	public int getWashByManager(String orgId);
}
