package com.palmnest.service.repair;

import com.palmnest.application.bean.Page;
import com.palmnest.application.dto.CommonDto;
import com.palmnest.application.dto.RepairUserDto;
import com.palmnest.application.dto.input.RepairBillInputDto;
import com.palmnest.application.dto.output.RepairBillDto;
import com.palmnest.application.dto.output.RepairSendUserDataDto;
import com.palmnest.application.dto.output.RepairSumIndexDto;
import com.palmnest.model.User;
import com.palmnest.model.estateserve.WxUser;
import com.palmnest.model.repair.RepairBill;
import org.springframework.web.multipart.MultipartHttpServletRequest;

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

public interface RepairBillService {

	public RepairBill repair(RepairBillInputDto dto, MultipartHttpServletRequest request) throws Exception;

	public RepairBillDto convert(RepairBill repairBill);

	public RepairBillDto findById(Long id);

	public Page findPageByStatus(Integer status, String repairTypeIds, Long serviceUser, int pageSize, int pageNo, Integer orgId);

	public Page findPageBy(Map<String, Object> params, int pageSize, int pageNo);

	public List<CommonDto> findByTypeId(Long repairTypeId);

	public List<CommonDto> findByTypeId(Long repairTypeId, Integer orgId);

	public void audit(Long id, Integer operateType, User user) throws Exception;

	public String getPushContent(RepairBill bill);

	public String pendBillOvertimePush() throws Exception;

	public String grabBillOvertimePush() throws Exception;

	//自动好好评
	public String automaticHighPraise() throws Exception;

	public String managePendBillPush() throws Exception;

	public RepairSumIndexDto findBy(String userName);
	public RepairSendUserDataDto getSendUserData(String userName);

	public void auditPush(Integer operateType, RepairBill bill) throws Exception;

	public void push(RepairBill bill) throws Exception;

	public void pushMessage(Long id, String code, String title, String content, List<User> users) throws Exception;

	public void pushWechatTemplateMsg(RepairBill bill, Integer type);

	public void pushServiceMsg(RepairBill bill, Integer type);

	public List<RepairUserDto> getRepairUsers(Long repairType, Integer orgId);

    Page findPageByRepairUser(Map<String, Object> params, int pageSize, int pageNo);

    void cancelOrder(String id, WxUser wxUser);

	void cancelOrder(String id, User user);
}
