SupplierService.java 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. package com.jsh.erp.service;
  2. import com.alibaba.fastjson.JSONObject;
  3. import com.baomidou.mybatisplus.extension.service.IService;
  4. import com.jsh.erp.datasource.entities.Supplier;
  5. import com.jsh.erp.utils.BaseResponseInfo;
  6. import org.springframework.transaction.annotation.Transactional;
  7. import org.springframework.web.multipart.MultipartFile;
  8. import javax.servlet.http.HttpServletRequest;
  9. import java.io.File;
  10. import java.math.BigDecimal;
  11. import java.util.List;
  12. import java.util.Map;
  13. public interface SupplierService extends IService<Supplier> {
  14. Supplier getSupplier(long id)throws Exception;
  15. List<Supplier> getSupplierListByIds(String ids)throws Exception;
  16. List<Supplier> getSupplier()throws Exception;
  17. List<Supplier> select(String supplier, String type, String phonenum, String telephone) throws Exception;
  18. @Transactional(value = "transactionManager", rollbackFor = Exception.class)
  19. int insertSupplier(JSONObject obj, HttpServletRequest request)throws Exception;
  20. @Transactional(value = "transactionManager", rollbackFor = Exception.class)
  21. int updateSupplier(JSONObject obj, HttpServletRequest request)throws Exception;
  22. @Transactional(value = "transactionManager", rollbackFor = Exception.class)
  23. int deleteSupplier(Long id, HttpServletRequest request)throws Exception;
  24. @Transactional(value = "transactionManager", rollbackFor = Exception.class)
  25. int batchDeleteSupplier(String ids, HttpServletRequest request) throws Exception;
  26. @Transactional(value = "transactionManager", rollbackFor = Exception.class)
  27. int batchDeleteSupplierByIds(String ids)throws Exception;
  28. int checkIsNameExist(Long id, String name)throws Exception;
  29. int checkIsNameAndTypeExist(Long id, String name, String type)throws Exception;
  30. @Transactional(value = "transactionManager", rollbackFor = Exception.class)
  31. void updateAdvanceIn(Long supplierId);
  32. List<Supplier> findBySelectCus()throws Exception;
  33. List<Supplier> findBySelectSup()throws Exception;
  34. List<Supplier> findBySelectRetail()throws Exception;
  35. List<Supplier> findById(Long supplierId)throws Exception;
  36. @Transactional(value = "transactionManager", rollbackFor = Exception.class)
  37. int batchSetStatus(Boolean status, String ids)throws Exception;
  38. List<Supplier> findUserCustomer()throws Exception;
  39. List<Supplier> findByAll(String supplier, String type, String phonenum, String telephone) throws Exception;
  40. Map<String, Object> getBeginNeedByOrganId(Long organId) throws Exception;
  41. @Transactional(value = "transactionManager", rollbackFor = Exception.class)
  42. void importVendor(MultipartFile file, HttpServletRequest request) throws Exception;
  43. Integer parseIntegerFromExcel(String content);
  44. @Transactional(value = "transactionManager", rollbackFor = Exception.class)
  45. void importCustomer(MultipartFile file, HttpServletRequest request) throws Exception;
  46. @Transactional(value = "transactionManager", rollbackFor = Exception.class)
  47. void importMember(MultipartFile file, HttpServletRequest request) throws Exception;
  48. @Transactional(value = "transactionManager", rollbackFor = Exception.class)
  49. BaseResponseInfo importExcel(List<Supplier> mList, String type, HttpServletRequest request) throws Exception;
  50. BigDecimal parseBigDecimalEx(String str)throws Exception;
  51. File exportExcel(List<Supplier> dataList, String type) throws Exception;
  52. File exportExcelVendorOrCustomer(List<Supplier> dataList, String type) throws Exception;
  53. String mapInvoiceType(String invoiceType);
  54. String mapSettlementMethod(String settlementMethod);
  55. void setUserCustomerPermission(HttpServletRequest request, Supplier supplier) throws Exception;
  56. @Transactional(value = "transactionManager", rollbackFor = Exception.class)
  57. int batchSetAdvanceIn(String ids) throws Exception;
  58. /**
  59. * 根据类型 和 电话号码查询供应商/客户信息
  60. * @param type
  61. * @param telephone
  62. * @return
  63. */
  64. Supplier getSupplierByPhone(String type,String telephone );
  65. Supplier getCustomerByPhone(String telephone );
  66. // 创建新客户
  67. Supplier createCustomer(Supplier supplier);
  68. }