DepotItemService.java 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184
  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.pda.vo.PDADepotItemVO;
  7. import com.jsh.erp.datasource.vo.DepotHeadXsddRequestVO;
  8. import com.jsh.erp.datasource.vo.DepotItemStockWarningCount;
  9. import com.jsh.erp.datasource.vo.DepotItemVoBatchNumberList;
  10. import com.jsh.erp.datasource.vo.DepotItemXsddRequestVO;
  11. import com.jsh.erp.datasource.vo.InOutPriceVo;
  12. import org.springframework.transaction.annotation.Transactional;
  13. import javax.servlet.http.HttpServletRequest;
  14. import java.math.BigDecimal;
  15. import java.util.List;
  16. import java.util.Map;
  17. public interface DepotItemService extends IService<DepotItem> {
  18. /**
  19. * pda根据订单信息查询商品列表
  20. * @return
  21. */
  22. List<PDADepotItemVO> pdaList(Long id);
  23. /**
  24. * pda根据商品订单ID查询商品详情
  25. * @param id 商品订单ID
  26. * @return
  27. */
  28. PDADepotItemVO pdaDetail(Long id);
  29. /**
  30. * 商品库存详情列表
  31. * @param materialId 商品ID
  32. * @return
  33. */
  34. List<PDADepotItemVO> materialDepotDetail(String type, Long materialId);
  35. DepotItem getDepotItem(long id)throws Exception;
  36. List<DepotItem> getDepotItem()throws Exception;
  37. List<DepotItem> select(String name, Integer type, String remark, int offset, int rows)throws Exception;
  38. Long countDepotItem(String name, Integer type, String remark) throws Exception;
  39. @Transactional(value = "transactionManager", rollbackFor = Exception.class)
  40. int insertDepotItem(JSONObject obj, HttpServletRequest request)throws Exception;
  41. @Transactional(value = "transactionManager", rollbackFor = Exception.class)
  42. int updateDepotItem(JSONObject obj, HttpServletRequest request)throws Exception;
  43. @Transactional(value = "transactionManager", rollbackFor = Exception.class)
  44. int deleteDepotItem(Long id, HttpServletRequest request)throws Exception;
  45. @Transactional(value = "transactionManager", rollbackFor = Exception.class)
  46. int batchDeleteDepotItem(String ids, HttpServletRequest request)throws Exception;
  47. int checkIsNameExist(Long id, String name)throws Exception;
  48. List<DepotItemVo4DetailByTypeAndMId> findDetailByDepotIdsAndMaterialIdList(String depotIds, Boolean forceFlag, Boolean inOutManageFlag, String sku, String batchNumber,
  49. String number, String beginTime, String endTime, Long mId, Integer offset, Integer rows)throws Exception;
  50. Long findDetailByDepotIdsAndMaterialIdCount(String depotIds, Boolean forceFlag, Boolean inOutManageFlag, String sku, String batchNumber,
  51. String number, String beginTime, String endTime, Long mId)throws Exception;
  52. @Transactional(value = "transactionManager", rollbackFor = Exception.class)
  53. int insertDepotItemWithObj(DepotItem depotItem)throws Exception;
  54. @Transactional(value = "transactionManager", rollbackFor = Exception.class)
  55. int updateDepotItemWithObj(DepotItem depotItem)throws Exception;
  56. List<DepotItem> getListByHeaderId(Long headerId)throws Exception;
  57. DepotItem getItemByHeaderIdAndMaterial(Long headerId, Long meId)throws Exception;
  58. DepotItem getPreItemByHeaderIdAndMaterial(String linkStr, Long meId, Long linkId)throws Exception;
  59. List<DepotItemVo4WithInfoEx> getDetailList(Long headerId)throws Exception;
  60. List<DepotItemVo4WithInfoEx> getInOutStock(String materialParam, List<Long> categoryIdList, String endTime, Integer offset, Integer rows)throws Exception;
  61. int getInOutStockCount(String materialParam, List<Long> categoryIdList, String endTime)throws Exception;
  62. List<DepotItemVo4WithInfoEx> getListWithBuyOrSale(String materialParam, String billType,
  63. String beginTime, String endTime, String[] creatorArray, Long organId, String[] organArray, List<Long> categoryList, List<Long> depotList, Boolean forceFlag, Integer offset, Integer rows)throws Exception;
  64. int getListWithBuyOrSaleCount(String materialParam, String billType,
  65. String beginTime, String endTime, String[] creatorArray, Long organId, String[] organArray, List<Long> categoryList, List<Long> depotList, Boolean forceFlag)throws Exception;
  66. BigDecimal buyOrSale(String type, String subType, Long MId, String beginTime, String endTime,
  67. String[] creatorArray, Long organId, String[] organArray, List<Long> depotList, Boolean forceFlag, String sumType) throws Exception;
  68. BigDecimal buyOrSalePriceTotal(String type, String subType, String materialParam, String beginTime, String endTime,
  69. String[] creatorArray, Long organId, String[] organArray, List<Long> categoryList, List<Long> depotList, Boolean forceFlag) throws Exception;
  70. List<InOutPriceVo> inOrOutPriceList(String beginTime, String endTime) throws Exception;
  71. /**
  72. * 保存单据子表信息
  73. * @param rows 子表信息
  74. * @param headerId 主表id
  75. * @param actionType 操作类型
  76. */
  77. @Transactional(value = "transactionManager", rollbackFor = Exception.class)
  78. void saveDetials(String rows, Long headerId, String actionType, HttpServletRequest request) throws Exception;
  79. @Transactional(value = "transactionManager", rollbackFor = Exception.class)
  80. void saveOrderItem(DepotHeadXsddRequestVO order, List<DepotItemXsddRequestVO> itemList) throws Exception;
  81. @Transactional(value = "transactionManager", rollbackFor = Exception.class)
  82. String getBillStatusByParam(DepotHead depotHead, String linkStr, String linkType);
  83. @Transactional(value = "transactionManager", rollbackFor = Exception.class)
  84. void changeBillStatus(String linkStr, String billStatus);
  85. @Transactional(value = "transactionManager", rollbackFor = Exception.class)
  86. void changeBillPurchaseStatus(String linkStr, String billStatus);
  87. DepotItem getDepotItemByBatchNumber(Long materialExtendId, String batchNumber);
  88. @Transactional(value = "transactionManager", rollbackFor = Exception.class)
  89. void deleteDepotItemHeadId(Long headerId)throws Exception;
  90. @Transactional(value = "transactionManager", rollbackFor = Exception.class)
  91. void deleteOrCancelSerialNumber(String actionType, DepotHead depotHead, Long headerId) throws Exception;
  92. void checkAssembleWithMaterialType(JSONArray rowArr, String subType);
  93. @Transactional(value = "transactionManager", rollbackFor = Exception.class)
  94. void updateMaterialExtendPrice(Long meId, String subType, String billType, JSONObject rowObj) throws Exception;
  95. @Transactional(value = "transactionManager", rollbackFor = Exception.class)
  96. List<DepotItemStockWarningCount> findStockWarningCount(Integer offset, Integer rows, String materialParam, List<Long> depotList, List<Long> categoryList);
  97. @Transactional(value = "transactionManager", rollbackFor = Exception.class)
  98. int findStockWarningCountTotal(String materialParam, List<Long> depotList, List<Long> categoryList);
  99. BigDecimal getSkuStockByParam(Long depotId, Long meId, String beginTime, String endTime) throws Exception;
  100. BigDecimal getStockByParam(Long depotId, Long mId, String beginTime, String endTime) throws Exception;
  101. BigDecimal getStockByParamWithDepotList(List<Long> depotList, Long mId, String beginTime, String endTime) throws Exception;
  102. Map<String, BigDecimal> getIntervalMapByParamWithDepotList(List<Long> depotList, Long mId, String beginTime, String endTime) throws Exception;
  103. @Transactional(value = "transactionManager", rollbackFor = Exception.class)
  104. void updateCurrentStock(DepotItem depotItem) throws Exception;
  105. @Transactional(value = "transactionManager", rollbackFor = Exception.class)
  106. void updateCurrentUnitPrice(DepotItem depotItem) throws Exception;
  107. void updateCurrentStockFun(Long mId, Long dId) throws Exception;
  108. @Transactional(value = "transactionManager", rollbackFor = Exception.class)
  109. BigDecimal getFinishNumber(Long meId, Long id, Long headerId, Unit unitInfo, String materialUnit, String linkType);
  110. @Transactional(value = "transactionManager", rollbackFor = Exception.class)
  111. BigDecimal getRealFinishNumber(String currentSubType, Long meId, Long linkId, Long preHeaderId, Long currentHeaderId, Unit unitInfo, String materialUnit);
  112. List<DepotItemVoBatchNumberList> getBatchNumberList(String number, String name, Long depotId, String barCode,
  113. String batchNumber, Boolean forceFlag, Boolean inOutManageFlag) throws Exception;
  114. BigDecimal getOneBatchNumberStock(Long depotId, String barCode, String batchNumber) throws Exception;
  115. Long getCountByMaterialAndDepot(Long mId, Long depotId);
  116. /**
  117. * 解析excel表格数据
  118. * @param batchNumber 批次号
  119. * @param detailList 数据明细
  120. * @param prefixNo 单据类型
  121. */
  122. JSONObject parseMapByExcelData(String batchNumber, List<Map<String, String>> detailList, String prefixNo) throws Exception;
  123. BigDecimal getLastUnitPriceByParam(Long organId, Long meId, String prefixNo);
  124. BigDecimal getCurrentStockByParam(Long depotId, Long mId);
  125. String getOtherInfo(String[] mpArr, DepotItemVo4WithInfoEx diEx)throws Exception;
  126. }