GoodsService.java 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270
  1. package com.kmall.admin.service;
  2. import com.kmall.admin.dto.GoodsDetailsDto;
  3. import com.kmall.admin.dto.GoodsDto;
  4. import com.kmall.admin.dto.GoodsPanoramaDto;
  5. import com.kmall.admin.entity.GoodsEntity;
  6. import com.kmall.admin.entity.TaxErrorRecordEntity;
  7. import com.kmall.admin.entity.haikong.StockChangeRecordEntity;
  8. import com.kmall.admin.fromcomm.entity.SysUserEntity;
  9. import com.kmall.admin.haikong.vo.QueryGoodsVO;
  10. import com.kmall.api.entity.exportpdf.PDFGoodsDto;
  11. import java.util.List;
  12. import java.util.Map;
  13. /**
  14. * Service接口
  15. *
  16. * @author Scott
  17. * @email
  18. * @date 2017-08-21 21:19:49
  19. */
  20. public interface GoodsService {
  21. /**
  22. * 根据主键查询实体
  23. *
  24. * @param id 主键
  25. * @return 实体
  26. */
  27. GoodsEntity queryObject(Integer id);
  28. GoodsEntity queryObjectByProdBarcodeAndBizType(String prodBarcode, Integer storeId);
  29. GoodsEntity queryObjectByProdBarcodeAndStoreId(String prodBarcode, Integer storeId);
  30. /**
  31. * 分页查询
  32. *
  33. * @param map 参数
  34. * @return list
  35. */
  36. List<GoodsEntity> queryList(Map<String, Object> map);
  37. List<GoodsEntity> querySame(Map<String, Object> map);
  38. /**
  39. * 分页统计总数
  40. *
  41. * @param map 参数
  42. * @return 总数
  43. */
  44. int queryTotal(Map<String, Object> map);
  45. /**
  46. * 保存实体
  47. *
  48. * @param goods 实体
  49. * @return 保存条数
  50. */
  51. int save(GoodsEntity goods);
  52. /**
  53. * 根据主键更新实体
  54. *
  55. * @param goods 实体
  56. * @return 更新条数
  57. */
  58. int update(GoodsEntity goods);
  59. /**
  60. * 根据主键删除
  61. *
  62. * @param id
  63. * @return 删除条数
  64. */
  65. int delete(Integer id);
  66. /**
  67. * 根据主键批量删除
  68. *
  69. * @param ids
  70. * @return 删除条数
  71. */
  72. int deleteBatch(Integer[] ids);
  73. /**
  74. * 商品从回收站恢复
  75. *
  76. * @param ids
  77. * @return
  78. */
  79. int back(Integer[] ids);
  80. /**
  81. * 上架
  82. *
  83. * @param id
  84. * @return
  85. */
  86. int enSale(Integer id);
  87. /**
  88. * 上架
  89. *
  90. * @param ids
  91. * @return
  92. */
  93. int enSaleBatch(Integer[] ids);
  94. /**
  95. * 下架
  96. *
  97. * @param id
  98. * @return
  99. */
  100. int unSale(Integer id);
  101. /**
  102. * 下架
  103. *
  104. * @param ids
  105. * @return
  106. */
  107. int unSaleBatch(Integer[] ids);
  108. /**
  109. * 导入商品
  110. *
  111. * @param goodsEntityList
  112. * @return
  113. */
  114. int uploadExcel(List<GoodsDto> goodsEntityList,int exportDataType);
  115. /**
  116. * 导入商品(修改库存版)
  117. *
  118. * @param goodsEntityList
  119. * @return
  120. */
  121. int uploadExcelByCover(List<GoodsDto> goodsEntityList,int exportDataType);
  122. /**
  123. * 条形码查询商品详情
  124. * @param prodBarcode 条形码
  125. * @param storeId
  126. * @return
  127. */
  128. GoodsDetailsDto queryGoodsDetailsByProdBarcode(String prodBarcode, String storeId,String sku);
  129. GoodsPanoramaDto searchGoodsPanoramaDtoByKeyword(String keyword);
  130. /**
  131. * 查询出要导出的列表
  132. * @param params 查询参数
  133. * @return
  134. */
  135. List<GoodsEntity> queryExportList(Map<String, Object> params);
  136. /**
  137. * 查出pdf需要的需要
  138. * @param sku 商品sku
  139. * @param storeId
  140. * @param prodBarcode
  141. * @return
  142. */
  143. PDFGoodsDto queryForPDFData(String sku, String storeId, String prodBarcode);
  144. /**
  145. * 查询产品价格
  146. * @param prodBarcode
  147. * @param storeId
  148. * @return
  149. */
  150. Map<String,Object> calculateGoodsDetail(String prodBarcode, String storeId,String sku, Integer sellVolume);
  151. /**
  152. * 根据条形码查询商品
  153. * @param barCode
  154. * @return
  155. */
  156. GoodsEntity queryByBarcode(String barCode);
  157. /**
  158. * 根据sku查询商品
  159. * @param sku
  160. * @return
  161. */
  162. GoodsEntity queryBySku(String sku);
  163. void updateForImgUrl(GoodsEntity goodsEntity);
  164. /**
  165. * 根据商品名称查询商品
  166. * @param storeId
  167. * @param goodsName
  168. * @return
  169. */
  170. List<GoodsEntity> queryByName(String storeId, String goodsName);
  171. void updateTaxErrorRecord(TaxErrorRecordEntity taxErrorRecordEntity);
  172. void insertTaxErrorRecord(TaxErrorRecordEntity taxErrorRecordEntity);
  173. void updateByEntity(GoodsEntity updateGoods);
  174. void checkGoodsPrice(SysUserEntity user);
  175. List<GoodsEntity> queryAllList(Integer page,Integer pageSize);
  176. void syncOmsHsCodeTask();
  177. void syncOmsHsCodeGoode(List<Integer> skuList);
  178. void syncGoodsRateGoode(List<Integer> skuList);
  179. void syncGoodsRateTask();
  180. List<Map<String,Object>> selectSkuDetails(String prodBarcode, String storeId);
  181. /**
  182. * 批量还原园区库存
  183. * @param goodsEntities 数据
  184. */
  185. int restoreBatch(List<GoodsEntity> goodsEntities);
  186. /**
  187. * 查询库存及sku的信息,查询出来的库存是门店的库存
  188. * @param prodBarcode 条码
  189. * @param storeId 门店id
  190. * @param sku sku
  191. * @return 商品信息
  192. */
  193. GoodsEntity queryGoodsStockByBarcodeAndStoreIdAndSku(String prodBarcode, Integer storeId, String sku);
  194. /**
  195. * 查询库存及sku的信息,查询出来的库存是门店的库存
  196. * @param queryGoodsVOList 查询条件,包含商品条码、sku、门店id
  197. * @return 商品信息
  198. */
  199. List<GoodsEntity> queryGoodsStockByQueryGoodsVoList(List<QueryGoodsVO> queryGoodsVOList);
  200. /**
  201. * 根据产品条码和sku查询保税展示补货的商品
  202. * @param prodBarcode 商品条码
  203. * @param sku sku
  204. * @return 商品信息
  205. */
  206. GoodsEntity queryGoodsInfoByProductBarcodeAndSku(String prodBarcode, String sku);
  207. /**
  208. * 更新园区库存
  209. * @param goodsEntity 商品实体
  210. * @return 更新数
  211. */
  212. int updateStockNumberByProductCodeAndSku(GoodsEntity goodsEntity);
  213. void validateWarehouseStock(GoodsDetailsDto goods, String prodBarcode, String sku, String storeId);
  214. /**
  215. * 出库单更新库存(扣减)
  216. * @param outboundList 出库sku
  217. */
  218. void updateStockNumberByOutbound(List<StockChangeRecordEntity> outboundList);
  219. /**
  220. * 入库单更新库存(增加)
  221. * @param storageList 入库sku
  222. */
  223. void updateStockNumberByStorage(List<StockChangeRecordEntity> storageList);
  224. }