package com.palmnest.service.estateserve.release;

import com.palmnest.application.bean.AppResultDto;
import com.palmnest.application.bean.Page;
import com.palmnest.application.dto.input.GoodsReleaseBillInputDto;
import com.palmnest.application.dto.input.GoodsReleaseOpRecorInputDto;
import com.palmnest.application.dto.output.GoodsReleaseOutDto;
import com.palmnest.application.dto.output.enterprise.GoodsReleaseVo;
import com.palmnest.model.User;
import com.palmnest.model.release.GoodsRelease;

import org.springframework.web.multipart.MultipartHttpServletRequest;

import javax.servlet.http.HttpServletRequest;

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

public interface GoodsReleaseService {

	/**
	 * 物品放行申请
	 */
	public AppResultDto apply(GoodsReleaseBillInputDto dto, MultipartHttpServletRequest request);

	public GoodsReleaseOutDto convert(GoodsRelease goodsBill) throws Exception;

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

	public AppResultDto exportList(Map<String, Object> params);

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

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

	public GoodsReleaseOutDto findById(String id);

	/**
	 * 同意放行
	 *
	 * @param Dto
	 * @param request
	 * @return
	 */
	public AppResultDto agree(GoodsReleaseBillInputDto Dto, MultipartHttpServletRequest request);

	public AppResultDto refuse(GoodsReleaseBillInputDto dto, HttpServletRequest request);

	public AppResultDto releaseOperation(GoodsReleaseOpRecorInputDto dto, HttpServletRequest request);

	//物品放行待处理数量
	public Integer findCountBy(Map<String, Object> params);

	public List<GoodsRelease> getGoodsReleaseByParams(Map<String, Object> params);

	public GoodsReleaseVo getGoodsCompany(Long orgId);
	public List<User> getReleaseUser(Integer orgId, String sysCodes);

	public void push(String id) throws Exception;

	public void scanDoNum(Long id);

	boolean getGoodsConfig(Long id, Integer applyType);

	boolean check(Integer virtualArchId);

	public AppResultDto reportExcel(Map<String, Object> params);

	public AppResultDto reportStatistics(Map<String, Object> params);

	public AppResultDto reportRecord(Map<String, Object> params);

	List<Map<String, Object>> getGoodsConfigByTypes(Long orgId, String types);
}
