/*
 * Author: wangjian
 * 生成Service
 */
package com.tofly.watermeter.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.tofly.common.core.entity.ResultRespone;
import com.tofly.watermeter.custom.dto.ForeignYhQyQdDto;
import com.tofly.watermeter.custom.entity.meterRead.Allocation;
import com.tofly.watermeter.custom.entity.meterRead.AppRead;
import com.tofly.watermeter.custom.entity.meterRead.ReadSearch;
import com.tofly.watermeter.custom.entity.meterRead.YhbhAndCbxhList;
import com.tofly.watermeter.custom.vo.ForeignYhQyQdVo;
import com.tofly.watermeter.entity.Qfcbplandetails;
import com.tofly.watermeter.entity.Readmeterhis;
import com.tofly.watermeter.entity.Yhbingqy;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;

/**
 * 用户编号与区域、区域段绑定中间表
 *
 * @author wangjieliu
 * @date Mon Jun 07 00:00:00 CST 2021
 */
public interface YhbingqyService extends IService<Yhbingqy> {

    boolean allocation(Allocation allocation);

    boolean allocationManager(Allocation allocation);

    boolean importFileAllcation(MultipartFile file, String qydbm, String qybm);

    IPage<Map> allocationPage(Page<Map> page, String yhbh, String qybm, String qydbm, String yhxm , String pqbm, String cbb, String yhdz, String inputcontent, HttpServletResponse response,String export);

    IPage<Map> getNoAllocationTwo(Page page, Allocation allocation);

    List<AppRead> getCbryXY(ReadSearch search);

    List<Map> getQyCllect(String inputcontent);

    boolean undock(Allocation allocation);

    boolean cbOrder(YhbhAndCbxhList yhbhAndCbxhList);

    boolean orderManager(YhbhAndCbxhList yhbhAndCbxhList);

    ResultRespone orderManagerTask(YhbhAndCbxhList yhbhAndCbxhList);

    IPage<Map> getNoOrderYh(Page<Map> page, String exclude, String qydbm, String inputcontent, String isPlan,String qybm);

    /**
     * 初始化每月生成抄表月计划数据
     * @param shouldDown 生成的用户
     * @param qfcbplandetail 计划信息
     * @param monthPlan 下一月计划
     * @return
     */
    boolean insertShouldCbYh(List<Readmeterhis> shouldDown, Qfcbplandetails qfcbplandetail, String monthPlan);

    List<Map> getCbbOrCbpq(String cbpq , String isPqOrCbb);

    Page<ForeignYhQyQdVo> getUserQy(Page page, ForeignYhQyQdDto dto);

    void synchroYhQyAndQyd();


    /**
     * 执行用户分配
     * @return boolean
     */
    boolean clientDistribution();



}
