DepotHeadService.java 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233
  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.dto.DepotItemDTO;
  5. import com.jsh.erp.datasource.entities.DepotHead;
  6. import com.jsh.erp.datasource.entities.DepotItem;
  7. import com.jsh.erp.datasource.pda.dto.PDADepotHeadDTO;
  8. import com.jsh.erp.datasource.pda.vo.PDADepotHeadVO;
  9. import com.jsh.erp.datasource.vo.DepotHeadVo4InDetail;
  10. import com.jsh.erp.datasource.vo.DepotHeadVo4InOutMCount;
  11. import com.jsh.erp.datasource.vo.DepotHeadVo4List;
  12. import com.jsh.erp.datasource.vo.DepotHeadVo4StatementAccount;
  13. import com.jsh.erp.datasource.vo.DepotHeadXsddRequestVO;
  14. import com.jsh.erp.datasource.vo.DepotItemXsddRequestVO;
  15. import org.springframework.transaction.annotation.Transactional;
  16. import javax.servlet.http.HttpServletRequest;
  17. import javax.servlet.http.HttpServletResponse;
  18. import java.math.BigDecimal;
  19. import java.util.List;
  20. import java.util.Map;
  21. public interface DepotHeadService extends IService<DepotHead> {
  22. /**
  23. * PDA查询订单
  24. * @param pdaDepotHeadDTO 筛选条件
  25. * @return
  26. */
  27. List<PDADepotHeadVO> pdaList(PDADepotHeadDTO pdaDepotHeadDTO);
  28. /**
  29. * PDA查询订单详情
  30. * @param id
  31. * @return
  32. */
  33. PDADepotHeadVO pdaDetail(Long id);
  34. /**
  35. * pda订单提交
  36. * @param pdaDepotHeadDTO
  37. * @return
  38. */
  39. boolean pdaOrderSubmit(PDADepotHeadDTO pdaDepotHeadDTO) throws Exception;
  40. /**
  41. * pda复核任务列表
  42. */
  43. List<PDADepotHeadVO> reviewTaskList(PDADepotHeadDTO pdaDepotHeadDTO);
  44. /**
  45. * pda设置复核任务状态
  46. */
  47. boolean setReviewStatus(PDADepotHeadDTO pdaDepotHeadDTO);
  48. /**
  49. * 根据id获取订单主表信息
  50. */
  51. DepotHead getDepotHead(long id);
  52. List<DepotHead> getDepotHead()throws Exception;
  53. List<DepotHeadVo4List> select(String type, String subType, String hasDebt, String status, String purchaseStatus, String number, String linkApply, String linkNumber,
  54. String beginTime, String endTime, String materialParam, Long organId, Long creator, Long depotId, Long accountId, String remark) throws Exception;
  55. String[] getDepotArray(String subType) throws Exception;
  56. String[] getCreatorArray() throws Exception;
  57. String[] getCreatorArrayByOrg(Long organizationId) throws Exception;
  58. String[] getOrganArray(String subType, String purchaseStatus) throws Exception;
  59. String getCreatorByCurrentUser() throws Exception;
  60. Map<String, BigDecimal> getFinishDepositMapByNumberList(List<String> numberList);
  61. Map<String, Integer> getBillSizeMapByLinkNumberList(List<String> numberList) throws Exception;
  62. Map<Long,Integer> getFinancialBillNoMapByBillIdList(List<Long> idList);
  63. @Transactional(value = "transactionManager", rollbackFor = Exception.class)
  64. int insertDepotHead(JSONObject obj, HttpServletRequest request)throws Exception;
  65. @Transactional(value = "transactionManager", rollbackFor = Exception.class)
  66. int updateDepotHead(JSONObject obj, HttpServletRequest request) throws Exception;
  67. @Transactional(value = "transactionManager", rollbackFor = Exception.class)
  68. int deleteDepotHead(Long id, HttpServletRequest request)throws Exception;
  69. @Transactional(value = "transactionManager", rollbackFor = Exception.class)
  70. int batchDeleteDepotHead(String ids, HttpServletRequest request)throws Exception;
  71. @Transactional(value = "transactionManager", rollbackFor = Exception.class)
  72. int batchDeleteBillByIds(String ids)throws Exception;
  73. @Transactional(value = "transactionManager", rollbackFor = Exception.class)
  74. int batchDeleteDepotHeadByIds(String ids)throws Exception;
  75. List<DepotHead> getDepotHeadListByIds(String ids)throws Exception;
  76. int checkIsBillNumberExist(Long id, String number)throws Exception;
  77. @Transactional(value = "transactionManager", rollbackFor = Exception.class)
  78. int batchSetStatus(String status, String depotHeadIDs)throws Exception;
  79. Map<Long,String> findMaterialsListMapByHeaderIdList(List<Long> idList)throws Exception;
  80. Map<Long,BigDecimal> getMaterialCountListMapByHeaderIdList(List<Long> idList)throws Exception;
  81. /**
  82. * 按条件查询出入库明细
  83. */
  84. List<DepotHeadVo4InDetail> findInOutDetail(String beginTime, String endTime, String type, String[] creatorArray,
  85. String[] organArray, List<Long> categoryList, Boolean forceFlag, Boolean inOutManageFlag,
  86. String materialParam, List<Long> depotList, Integer oId, String number,
  87. Long creator, String remark, String column, String order, Integer offset, Integer rows) throws Exception;
  88. int findInOutDetailCount(String beginTime, String endTime, String type, String[] creatorArray,
  89. String[] organArray, List<Long> categoryList, Boolean forceFlag, Boolean inOutManageFlag, String materialParam, List<Long> depotList, Integer oId, String number,
  90. Long creator, String remark) throws Exception;
  91. DepotHeadVo4InDetail findInOutDetailStatistic(String beginTime, String endTime, String type, String[] creatorArray,
  92. String[] organArray, List<Long> categoryList, Boolean forceFlag, Boolean inOutManageFlag,
  93. String materialParam, List<Long> depotList, Integer oId, String number,
  94. Long creator, String remark) throws Exception;
  95. List<DepotHeadVo4InOutMCount> findInOutMaterialCount(String beginTime, String endTime, String type, List<Long> categoryList,
  96. Boolean forceFlag, Boolean inOutManageFlag, String materialParam,
  97. List<Long> depotList, Long organizationId, Integer oId, String column, String order,
  98. Integer offset, Integer rows)throws Exception;
  99. int findInOutMaterialCountTotal(String beginTime, String endTime, String type, List<Long> categoryList,
  100. Boolean forceFlag, Boolean inOutManageFlag, String materialParam,
  101. List<Long> depotList, Long organizationId, Integer oId)throws Exception;
  102. DepotHeadVo4InOutMCount findInOutMaterialCountStatistic(String beginTime, String endTime, String type, List<Long> categoryList,
  103. Boolean forceFlag, Boolean inOutManageFlag, String materialParam,
  104. List<Long> depotList, Long organizationId, Integer oId) throws Exception;
  105. List<DepotHeadVo4InDetail> findAllocationDetail(String beginTime, String endTime, String subType, String number,
  106. String[] creatorArray, List<Long> categoryList, Boolean forceFlag, String materialParam, List<Long> depotList, List<Long> depotFList,
  107. String remark, String column, String order, Integer offset, Integer rows) throws Exception;
  108. int findAllocationDetailCount(String beginTime, String endTime, String subType, String number,
  109. String[] creatorArray, List<Long> categoryList, Boolean forceFlag, String materialParam, List<Long> depotList, List<Long> depotFList,
  110. String remark) throws Exception;
  111. DepotHeadVo4InDetail findAllocationStatistic(String beginTime, String endTime, String subType, String number,
  112. String[] creatorArray, List<Long> categoryList, Boolean forceFlag, String materialParam, List<Long> depotList, List<Long> depotFList,
  113. String remark) throws Exception;
  114. List<DepotHeadVo4StatementAccount> getStatementAccount(String beginTime, String endTime, Integer organId, String[] organArray,
  115. Integer hasDebt, String supplierType, String type, String subType, String typeBack,
  116. String subTypeBack, String billType, Integer offset, Integer rows);
  117. int getStatementAccountCount(String beginTime, String endTime, Integer organId, String[] organArray,
  118. Integer hasDebt, String supplierType, String type, String subType, String typeBack, String subTypeBack, String billType);
  119. List<DepotHeadVo4StatementAccount> getStatementAccountTotalPay(String beginTime, String endTime, Integer organId, String[] organArray,
  120. Integer hasDebt, String supplierType, String type, String subType,
  121. String typeBack, String subTypeBack, String billType);
  122. List<DepotHeadVo4List> getDetailByNumber(String number, HttpServletRequest request)throws Exception;
  123. List<DepotHead> getListByLinkNumberExceptCurrent(String linkNumber, String number, String type)throws Exception;
  124. List<DepotHead> getListByLinkApplyExceptCurrent(String linkApply, String number, String type)throws Exception;
  125. List<DepotHead> getBillListByLinkNumberList(List<String> linkNumberList)throws Exception;
  126. List<DepotHead> getBillListByLinkNumber(String linkNumber)throws Exception;
  127. /**
  128. * 新增单据主表及单据子表信息
  129. * @param beanJson 主表信息
  130. * @param rows 子表信息
  131. */
  132. void addDepotHeadAndDetail(String beanJson, String rows,
  133. HttpServletRequest request) throws Exception;
  134. /**
  135. * 更新单据主表及单据子表信息
  136. * @param beanJson 主表信息
  137. * @param rows 子表信息
  138. */
  139. @Transactional(value = "transactionManager", rollbackFor = Exception.class)
  140. void updateDepotHeadAndDetail(String beanJson, String rows, HttpServletRequest request)throws Exception;
  141. Map<String, Object> getBuyAndSaleStatistics(String today, String monthFirstDay, String yesterdayBegin, String yesterdayEnd,
  142. String yearBegin, String yearEnd, HttpServletRequest request) throws Exception;
  143. /**
  144. * 根据单据号获取单据主表信息
  145. */
  146. DepotHead getDepotHead(String number);
  147. List<DepotHeadVo4List> debtList(Long organId, String materialParam, String number, String beginTime, String endTime,
  148. String status, Integer offset, Integer rows);
  149. int debtListCount(Long organId, String materialParam, String number, String beginTime, String endTime,
  150. String status);
  151. void debtExport(Long organId, String materialParam, String number, String type, String subType,
  152. String beginTime, String endTime, String status, String mpList,
  153. HttpServletRequest request, HttpServletResponse response);
  154. List<DepotHeadVo4List> parseDebtBillList(List<DepotHeadVo4List> list) throws Exception;
  155. String getBillCategory(String subType);
  156. List<DepotHeadVo4List> waitBillList(String number, String materialParam, String type, String subType,
  157. String beginTime, String endTime, String status, int offset, int rows);
  158. Long waitBillCount(String number, String materialParam, String type, String subType,
  159. String beginTime, String endTime, String status);
  160. @Transactional(value = "transactionManager", rollbackFor = Exception.class)
  161. void batchAddDepotHeadAndDetail(String ids, HttpServletRequest request) throws Exception;
  162. String syncOrderToXsdd(DepotHeadXsddRequestVO depotHead, List<DepotItemXsddRequestVO> depotItemList) throws Exception;
  163. /**
  164. * 根据商品id查询最后一条商品订单
  165. * @param mid 商品ID
  166. * @return
  167. */
  168. DepotHead getDepotLastByMaterialId(long mid);
  169. void sendMsg(Long dhId);
  170. }