package abacus.springboot.example.pi;

import java.util.List;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import abacus.springboot.example.dao.JcBill;
import abacus.springboot.example.dao.JcBillHg;
import abacus.springboot.example.dao.JcBillPhoto;
import abacus.springboot.example.dao.JcBillSourceItem;
import abacus.springboot.example.dao.JcSourceItem;
import abacus.springboot.example.vo.SiDepositlocation;

/**
 * <p>Title:ApiJcBillAccess</p>
   <p>Description: 底层实现-interface</p>
   @author chuanZeng 
   @date 2026年8月18日
 */
public interface JcBillAccessIF {
	
	

	/**
	 * 	根据条件查询图片
	 * @param srcid
	 * @param srcitemid
	 * @param typephoto
	 * @return
	 * @throws RuntimeException
	 */
	public List<JcBillPhoto> queryJcBillPhoto(String srcid, String srcitemid, String typephoto) throws RuntimeException;
	
	public List<JcBillPhoto> queryJcBillPhotoIn(List<String> srcids) throws RuntimeException;
	
	/**
	 * 修改
	 * @throws RuntimeException
	 */
	public void updateJcBill(JcBill bill) throws RuntimeException;
	
	/**
	 * 修改
	 * @throws RuntimeException
	 */
	public void updateJcBillSourceItem(List<JcBillSourceItem> items) throws RuntimeException;
	
	/**
	 * 修改
	 * @param photos
	 * @throws RuntimeException
	 */
	public void updateJcBillPhoto(List<JcBillPhoto> photos) throws RuntimeException;
	
	/**
	 * 当前明细行号
	 * @param billId
	 * @return
	 * @throws RuntimeException
	 */
	public int countJcBillItemIndexno(String billId) throws RuntimeException;
	
	/**
	 * 查询：下一单待提交的回购单号
	 * @return
	 * @throws RuntimeException
	 */
	public String lastBillHgId() throws RuntimeException;
	
	/**
	 * 	查询朔源明细
	 * @param billId
	 * @return
	 */
	public List<JcSourceItem> queryJcSourceItemByBillId(String billId);
	
	/**
	 * 	删除特定的来源
	 * @param billId
	 * @throws RuntimeException
	 */
	public void deleteJcSourceItemBySource(String billId) throws RuntimeException;
	
	/**
	 * 	界面查询
	 * @param fromDate
	 * @param thruDate
	 * @param applicant
	 * @param goods
	 * @param id
	 * @param billin
	 * @param goodsid
	 * @param product
	 * @param status
	 * @param pageable
	 * @return
	 * @throws RuntimeException
	 */
	public Page<JcBill> queryJcBill(String fromDate, String thruDate, String applicant,
			String goods, String id, String billin, String goodsid, String product, String status,
			int typ, Pageable pageable) throws RuntimeException;
	
	/**
	 * 	保存事件
	 * @return
	 * @throws RuntimeException
	 */
	public void saveEvent(String srcid, String typ, String billtyp) throws RuntimeException;
	
	
	/**
	 * 	分页查询 回购订单
	 * @param typ 1-回购认款，2-回购分仓
	 * @return
	 * @throws RuntimeException
	 */
	public Page<JcBillHg> queryJcBillHg(String fromDate, String thruDate, String account,
			String salearea, String id, String billId, String status, String product,
			String manager, 
			int typ, Pageable pageable) throws RuntimeException;
	
	
	/**
	 * 删除溯源明细信息
	 * @param ids
	 * @throws RuntimeException
	 */
	public void deleteJcSourceItem(List<Long> ids) throws RuntimeException;
	
	
	/**
	 * 删除溯源明细图片
	 * @param ids
	 * @throws RuntimeException
	 */
	public void deleteJcBillPhoto(String srcid, String srcitemid, String type) throws RuntimeException;
	
	/**
	 * 	获取百度token
	 * @return
	 * @throws RuntimeException
	 */
	public String getBaiduToken() throws RuntimeException;
	
	public List<JcBillSourceItem> queryJcBillSourceItemInBillId(List<String> billIds) throws RuntimeException;

	/**
	 * 稽查：根据稽查单号，稽查单关联物理仓管理策略
	 * @param dept
	 * @return
	 * @throws Exception
	 */
	public SiDepositlocation querySiDepositlocation(String srcid) throws Exception;
	
	/**
	 * 回购：根据回购单号，回购单关联物理仓管理策略
	 * @param dept
	 * @return
	 * @throws Exception
	 */
	public SiDepositlocation querySiDepositlocationHGfc(String srcid) throws Exception;
	

	/**
	 *	 删除事件
	 * @param srcid
	 * @param typ
	 * @param billtyp
	 * @throws RuntimeException
	 */
	public void deleteEvent(String srcid, String typ, String billtyp) throws RuntimeException;
}































































































