package com.jsh.erp.service; import com.alibaba.fastjson.JSONObject; import com.baomidou.mybatisplus.extension.service.IService; import com.jsh.erp.datasource.entities.Supplier; import com.jsh.erp.utils.BaseResponseInfo; import org.springframework.transaction.annotation.Transactional; import org.springframework.web.multipart.MultipartFile; import javax.servlet.http.HttpServletRequest; import java.io.File; import java.math.BigDecimal; import java.util.List; import java.util.Map; public interface SupplierService extends IService { Supplier getSupplier(long id)throws Exception; List getSupplierListByIds(String ids)throws Exception; List getSupplier()throws Exception; List select(String supplier, String type, String phonenum, String telephone) throws Exception; @Transactional(value = "transactionManager", rollbackFor = Exception.class) int insertSupplier(JSONObject obj, HttpServletRequest request)throws Exception; @Transactional(value = "transactionManager", rollbackFor = Exception.class) int updateSupplier(JSONObject obj, HttpServletRequest request)throws Exception; @Transactional(value = "transactionManager", rollbackFor = Exception.class) int deleteSupplier(Long id, HttpServletRequest request)throws Exception; @Transactional(value = "transactionManager", rollbackFor = Exception.class) int batchDeleteSupplier(String ids, HttpServletRequest request) throws Exception; @Transactional(value = "transactionManager", rollbackFor = Exception.class) int batchDeleteSupplierByIds(String ids)throws Exception; int checkIsNameExist(Long id, String name)throws Exception; int checkIsNameAndTypeExist(Long id, String name, String type)throws Exception; @Transactional(value = "transactionManager", rollbackFor = Exception.class) void updateAdvanceIn(Long supplierId); List findBySelectCus()throws Exception; List findBySelectSup()throws Exception; List findBySelectRetail()throws Exception; List findById(Long supplierId)throws Exception; @Transactional(value = "transactionManager", rollbackFor = Exception.class) int batchSetStatus(Boolean status, String ids)throws Exception; List findUserCustomer()throws Exception; List findByAll(String supplier, String type, String phonenum, String telephone) throws Exception; Map getBeginNeedByOrganId(Long organId) throws Exception; @Transactional(value = "transactionManager", rollbackFor = Exception.class) void importVendor(MultipartFile file, HttpServletRequest request) throws Exception; Integer parseIntegerFromExcel(String content); @Transactional(value = "transactionManager", rollbackFor = Exception.class) void importCustomer(MultipartFile file, HttpServletRequest request) throws Exception; @Transactional(value = "transactionManager", rollbackFor = Exception.class) void importMember(MultipartFile file, HttpServletRequest request) throws Exception; @Transactional(value = "transactionManager", rollbackFor = Exception.class) BaseResponseInfo importExcel(List mList, String type, HttpServletRequest request) throws Exception; BigDecimal parseBigDecimalEx(String str)throws Exception; File exportExcel(List dataList, String type) throws Exception; File exportExcelVendorOrCustomer(List dataList, String type) throws Exception; String mapInvoiceType(String invoiceType); String mapSettlementMethod(String settlementMethod); void setUserCustomerPermission(HttpServletRequest request, Supplier supplier) throws Exception; @Transactional(value = "transactionManager", rollbackFor = Exception.class) int batchSetAdvanceIn(String ids) throws Exception; /** * 根据类型 和 电话号码查询供应商/客户信息 * @param type * @param telephone * @return */ Supplier getSupplierByPhone(String type,String telephone ); Supplier getCustomerByPhone(String telephone ); // 创建新客户 Supplier createCustomer(Supplier supplier); }