DepotItemService.java 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  1. package com.jsh.erp.service;
  2. import com.alibaba.fastjson.JSONArray;
  3. import com.alibaba.fastjson.JSONObject;
  4. import com.baomidou.mybatisplus.extension.service.IService;
  5. import com.jsh.erp.datasource.entities.*;
  6. import com.jsh.erp.datasource.vo.DepotItemStockWarningCount;
  7. import com.jsh.erp.datasource.vo.DepotItemVoBatchNumberList;
  8. import com.jsh.erp.datasource.vo.InOutPriceVo;
  9. import org.springframework.transaction.annotation.Transactional;
  10. import javax.servlet.http.HttpServletRequest;
  11. import java.math.BigDecimal;
  12. import java.util.List;
  13. import java.util.Map;
  14. public interface DepotItemService extends IService<DepotItem> {
  15. DepotItem getDepotItem(long id)throws Exception;
  16. List<DepotItem> getDepotItem()throws Exception;
  17. List<DepotItem> select(String name, Integer type, String remark, int offset, int rows)throws Exception;
  18. Long countDepotItem(String name, Integer type, String remark) throws Exception;
  19. @Transactional(value = "transactionManager", rollbackFor = Exception.class)
  20. int insertDepotItem(JSONObject obj, HttpServletRequest request)throws Exception;
  21. @Transactional(value = "transactionManager", rollbackFor = Exception.class)
  22. int updateDepotItem(JSONObject obj, HttpServletRequest request)throws Exception;
  23. @Transactional(value = "transactionManager", rollbackFor = Exception.class)
  24. int deleteDepotItem(Long id, HttpServletRequest request)throws Exception;
  25. @Transactional(value = "transactionManager", rollbackFor = Exception.class)
  26. int batchDeleteDepotItem(String ids, HttpServletRequest request)throws Exception;
  27. int checkIsNameExist(Long id, String name)throws Exception;
  28. List<DepotItemVo4DetailByTypeAndMId> findDetailByDepotIdsAndMaterialIdList(String depotIds, Boolean forceFlag, Boolean inOutManageFlag, String sku, String batchNumber,
  29. String number, String beginTime, String endTime, Long mId, Integer offset, Integer rows)throws Exception;
  30. Long findDetailByDepotIdsAndMaterialIdCount(String depotIds, Boolean forceFlag, Boolean inOutManageFlag, String sku, String batchNumber,
  31. String number, String beginTime, String endTime, Long mId)throws Exception;
  32. @Transactional(value = "transactionManager", rollbackFor = Exception.class)
  33. int insertDepotItemWithObj(DepotItem depotItem)throws Exception;
  34. @Transactional(value = "transactionManager", rollbackFor = Exception.class)
  35. int updateDepotItemWithObj(DepotItem depotItem)throws Exception;
  36. List<DepotItem> getListByHeaderId(Long headerId)throws Exception;
  37. DepotItem getItemByHeaderIdAndMaterial(Long headerId, Long meId)throws Exception;
  38. DepotItem getPreItemByHeaderIdAndMaterial(String linkStr, Long meId, Long linkId)throws Exception;
  39. List<DepotItemVo4WithInfoEx> getDetailList(Long headerId)throws Exception;
  40. List<DepotItemVo4WithInfoEx> getInOutStock(String materialParam, List<Long> categoryIdList, String endTime, Integer offset, Integer rows)throws Exception;
  41. int getInOutStockCount(String materialParam, List<Long> categoryIdList, String endTime)throws Exception;
  42. List<DepotItemVo4WithInfoEx> getListWithBuyOrSale(String materialParam, String billType,
  43. String beginTime, String endTime, String[] creatorArray, Long organId, String[] organArray, List<Long> categoryList, List<Long> depotList, Boolean forceFlag, Integer offset, Integer rows)throws Exception;
  44. int getListWithBuyOrSaleCount(String materialParam, String billType,
  45. String beginTime, String endTime, String[] creatorArray, Long organId, String[] organArray, List<Long> categoryList, List<Long> depotList, Boolean forceFlag)throws Exception;
  46. BigDecimal buyOrSale(String type, String subType, Long MId, String beginTime, String endTime,
  47. String[] creatorArray, Long organId, String[] organArray, List<Long> depotList, Boolean forceFlag, String sumType) throws Exception;
  48. BigDecimal buyOrSalePriceTotal(String type, String subType, String materialParam, String beginTime, String endTime,
  49. String[] creatorArray, Long organId, String[] organArray, List<Long> categoryList, List<Long> depotList, Boolean forceFlag) throws Exception;
  50. List<InOutPriceVo> inOrOutPriceList(String beginTime, String endTime) throws Exception;
  51. /**
  52. * 保存单据子表信息
  53. * @param rows 子表信息
  54. * @param headerId 主表id
  55. * @param actionType 操作类型
  56. */
  57. @Transactional(value = "transactionManager", rollbackFor = Exception.class)
  58. void saveDetials(String rows, Long headerId, String actionType, HttpServletRequest request) throws Exception;
  59. @Transactional(value = "transactionManager", rollbackFor = Exception.class)
  60. String getBillStatusByParam(DepotHead depotHead, String linkStr, String linkType);
  61. @Transactional(value = "transactionManager", rollbackFor = Exception.class)
  62. void changeBillStatus(String linkStr, String billStatus);
  63. @Transactional(value = "transactionManager", rollbackFor = Exception.class)
  64. void changeBillPurchaseStatus(String linkStr, String billStatus);
  65. DepotItem getDepotItemByBatchNumber(Long materialExtendId, String batchNumber);
  66. @Transactional(value = "transactionManager", rollbackFor = Exception.class)
  67. void deleteDepotItemHeadId(Long headerId)throws Exception;
  68. @Transactional(value = "transactionManager", rollbackFor = Exception.class)
  69. void deleteOrCancelSerialNumber(String actionType, DepotHead depotHead, Long headerId) throws Exception;
  70. void checkAssembleWithMaterialType(JSONArray rowArr, String subType);
  71. @Transactional(value = "transactionManager", rollbackFor = Exception.class)
  72. void updateMaterialExtendPrice(Long meId, String subType, String billType, JSONObject rowObj) throws Exception;
  73. @Transactional(value = "transactionManager", rollbackFor = Exception.class)
  74. List<DepotItemStockWarningCount> findStockWarningCount(Integer offset, Integer rows, String materialParam, List<Long> depotList, List<Long> categoryList);
  75. @Transactional(value = "transactionManager", rollbackFor = Exception.class)
  76. int findStockWarningCountTotal(String materialParam, List<Long> depotList, List<Long> categoryList);
  77. BigDecimal getSkuStockByParam(Long depotId, Long meId, String beginTime, String endTime) throws Exception;
  78. BigDecimal getStockByParam(Long depotId, Long mId, String beginTime, String endTime) throws Exception;
  79. BigDecimal getStockByParamWithDepotList(List<Long> depotList, Long mId, String beginTime, String endTime) throws Exception;
  80. Map<String, BigDecimal> getIntervalMapByParamWithDepotList(List<Long> depotList, Long mId, String beginTime, String endTime) throws Exception;
  81. @Transactional(value = "transactionManager", rollbackFor = Exception.class)
  82. void updateCurrentStock(DepotItem depotItem) throws Exception;
  83. @Transactional(value = "transactionManager", rollbackFor = Exception.class)
  84. void updateCurrentUnitPrice(DepotItem depotItem) throws Exception;
  85. void updateCurrentStockFun(Long mId, Long dId) throws Exception;
  86. @Transactional(value = "transactionManager", rollbackFor = Exception.class)
  87. BigDecimal getFinishNumber(Long meId, Long id, Long headerId, Unit unitInfo, String materialUnit, String linkType);
  88. @Transactional(value = "transactionManager", rollbackFor = Exception.class)
  89. BigDecimal getRealFinishNumber(String currentSubType, Long meId, Long linkId, Long preHeaderId, Long currentHeaderId, Unit unitInfo, String materialUnit);
  90. List<DepotItemVoBatchNumberList> getBatchNumberList(String number, String name, Long depotId, String barCode,
  91. String batchNumber, Boolean forceFlag, Boolean inOutManageFlag) throws Exception;
  92. BigDecimal getOneBatchNumberStock(Long depotId, String barCode, String batchNumber) throws Exception;
  93. Long getCountByMaterialAndDepot(Long mId, Long depotId);
  94. JSONObject parseMapByExcelData(String barCodes, List<Map<String, String>> detailList, String prefixNo) throws Exception;
  95. BigDecimal getLastUnitPriceByParam(Long organId, Long meId, String prefixNo);
  96. BigDecimal getCurrentStockByParam(Long depotId, Long mId);
  97. String getOtherInfo(String[] mpArr, DepotItemVo4WithInfoEx diEx)throws Exception;
  98. }